import { z } from 'zod';
import { toJSONSchema, JSONSchemaMeta, $ZodType } from 'zod/v4/core';

/** BL-0499 TASK-3A. A configured snapshot is not an application receipt.
 * Transient internal result metadata; no settings store or capability switch. */

/** Unwrap storage defaults/nullability: normalized values must be present. */
declare const AnalyticsGateSettingsValuesSchema: z.ZodObject<{
    analytics_min_sample: z.ZodNumber;
    quiet_days: z.ZodNumber;
    gate_follow_up_days: z.ZodNumber;
    gate_window_days: z.ZodObject<{
        min_age_days: z.ZodNumber;
        max_age_days: z.ZodNumber;
    }, z.core.$strict>;
}, z.core.$strict>;
declare const AnalyticsGateSettingsProvenanceSchema: z.ZodObject<{
    analytics_min_sample: z.ZodEnum<{
        default: "default";
        override: "override";
    }>;
    quiet_days: z.ZodEnum<{
        default: "default";
        override: "override";
    }>;
    gate_follow_up_days: z.ZodEnum<{
        default: "default";
        override: "override";
    }>;
    gate_window_days: z.ZodEnum<{
        default: "default";
        override: "override";
    }>;
}, z.core.$strict>;
declare const AnalyticsGateSettingsConfiguredSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    status: z.ZodLiteral<"resolved">;
    source: z.ZodEnum<{
        tenant_row: "tenant_row";
        missing_row: "missing_row";
    }>;
    policy: z.ZodLiteral<"gate-placement-settings-approved-v1">;
    values: z.ZodObject<{
        analytics_min_sample: z.ZodNumber;
        quiet_days: z.ZodNumber;
        gate_follow_up_days: z.ZodNumber;
        gate_window_days: z.ZodObject<{
            min_age_days: z.ZodNumber;
            max_age_days: z.ZodNumber;
        }, z.core.$strict>;
    }, z.core.$strict>;
    provenance: z.ZodObject<{
        analytics_min_sample: z.ZodEnum<{
            default: "default";
            override: "override";
        }>;
        quiet_days: z.ZodEnum<{
            default: "default";
            override: "override";
        }>;
        gate_follow_up_days: z.ZodEnum<{
            default: "default";
            override: "override";
        }>;
        gate_window_days: z.ZodEnum<{
            default: "default";
            override: "override";
        }>;
    }, z.core.$strict>;
}, z.core.$strict>, z.ZodObject<{
    status: z.ZodLiteral<"unavailable">;
    reason: z.ZodLiteral<"schema_capability_unsupported">;
}, z.core.$strict>], "status">;
declare const AnalyticsGateSettingsAppliedSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    status: z.ZodLiteral<"legacy">;
    policy: z.ZodLiteral<"gate-placement-legacy-v1">;
    values: z.ZodObject<{
        quiet_days: z.ZodLiteral<7>;
        analytics_min_sample: z.ZodLiteral<30>;
    }, z.core.$strict>;
}, z.core.$strict>, z.ZodObject<{
    status: z.ZodLiteral<"not_applied">;
}, z.core.$strict>], "status">;
declare const AnalyticsGateSettingsTargetSchema: z.ZodObject<{
    status: z.ZodLiteral<"unavailable">;
    prerequisite: z.ZodLiteral<"BL-0497">;
}, z.core.$strict>;
declare const AnalyticsGateSettingsMetaSchema: z.ZodObject<{
    snapshot_id: z.ZodString;
    configured: z.ZodDiscriminatedUnion<[z.ZodObject<{
        status: z.ZodLiteral<"resolved">;
        source: z.ZodEnum<{
            tenant_row: "tenant_row";
            missing_row: "missing_row";
        }>;
        policy: z.ZodLiteral<"gate-placement-settings-approved-v1">;
        values: z.ZodObject<{
            analytics_min_sample: z.ZodNumber;
            quiet_days: z.ZodNumber;
            gate_follow_up_days: z.ZodNumber;
            gate_window_days: z.ZodObject<{
                min_age_days: z.ZodNumber;
                max_age_days: z.ZodNumber;
            }, z.core.$strict>;
        }, z.core.$strict>;
        provenance: z.ZodObject<{
            analytics_min_sample: z.ZodEnum<{
                default: "default";
                override: "override";
            }>;
            quiet_days: z.ZodEnum<{
                default: "default";
                override: "override";
            }>;
            gate_follow_up_days: z.ZodEnum<{
                default: "default";
                override: "override";
            }>;
            gate_window_days: z.ZodEnum<{
                default: "default";
                override: "override";
            }>;
        }, z.core.$strict>;
    }, z.core.$strict>, z.ZodObject<{
        status: z.ZodLiteral<"unavailable">;
        reason: z.ZodLiteral<"schema_capability_unsupported">;
    }, z.core.$strict>], "status">;
    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
        status: z.ZodLiteral<"legacy">;
        policy: z.ZodLiteral<"gate-placement-legacy-v1">;
        values: z.ZodObject<{
            quiet_days: z.ZodLiteral<7>;
            analytics_min_sample: z.ZodLiteral<30>;
        }, z.core.$strict>;
    }, z.core.$strict>, z.ZodObject<{
        status: z.ZodLiteral<"not_applied">;
    }, z.core.$strict>], "status">;
    target: z.ZodObject<{
        status: z.ZodLiteral<"unavailable">;
        prerequisite: z.ZodLiteral<"BL-0497">;
    }, z.core.$strict>;
}, z.core.$strict>;

/**
 * Canonical handle pattern: lowercase letters, digits, dots, underscores
 * (no uppercase, no hyphens). Length 1-100.
 *
 * Applied by `toWritableSchema` to every entity's `handle` field at create
 * time — pre-existing rows are grandfathered (update/read paths do not
 * pattern-check). Web re-imports this from `@revt-eng/schema` rather than
 * maintaining its own copy.
 *
 * Lives in its own file (rather than `common.ts`) to break the circular
 * import that would otherwise form between `common.ts` and
 * `classification.ts` (which uses HANDLE_PATTERN inside `toWritableSchema`).
 * `common.ts` re-exports it so consumers still see it alongside `HandleField`.
 */
declare const HANDLE_PATTERN: RegExp;

/**
 * Common Zod schemas used across multiple domain schemas.
 * These define shared enums, pagination shapes, and base types.
 */

/** Minimum actual base-unit sample for analytics rates (TASK-47). */
declare const ANALYTICS_MIN_SAMPLE_DEFAULT = 30;
/**
 * Default paid-conversion window in days (ST-517, Kent 2026-10-14 / DEC-522):
 * an account converts if it pays within this many days of its first app
 * activity. The tenant setting `paid_conversion_window_days`; a tenant with a
 * long trial raises it.
 */
declare const PAID_CONVERSION_WINDOW_DAYS_DEFAULT = 30;
declare const PaginationParamsSchema: z.ZodObject<{
    page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    per_page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
}, z.core.$strip>;
declare const PaginatedResponseSchema: <T extends z.ZodTypeAny>(itemSchema: T) => z.ZodObject<{
    items: z.ZodArray<T>;
    total: z.ZodNumber;
    page: z.ZodNumber;
    per_page: z.ZodNumber;
    has_more: z.ZodBoolean;
}, z.core.$strip>;
declare const TimestampFields: z.ZodObject<{
    created_at: z.ZodString;
    updated_at: z.ZodString;
}, z.core.$strip>;
declare const IdField: z.ZodObject<{
    id: z.ZodString;
}, z.core.$strip>;
declare const TenantIdField: z.ZodObject<{
    tenant_id: z.ZodString;
}, z.core.$strip>;
declare const BillingCadenceSchema: z.ZodEnum<{
    monthly: "monthly";
    annual: "annual";
    quarterly: "quarterly";
    one_time: "one_time";
    usage_based: "usage_based";
}>;
declare const COMPONENT_TYPE_VALUES: readonly ["banner", "modal", "tooltip", "sidebar", "inline", "toast", "fullscreen", "email", "sms", "push", "in_page", "button", "full_page", "agent", "cli", "custom"];
/** What rendering component a template uses. Wire values are unchanged from SurfaceType. */
declare const ComponentTypeSchema: z.ZodEnum<{
    push: "push";
    custom: "custom";
    banner: "banner";
    modal: "modal";
    tooltip: "tooltip";
    sidebar: "sidebar";
    inline: "inline";
    toast: "toast";
    fullscreen: "fullscreen";
    email: "email";
    sms: "sms";
    in_page: "in_page";
    button: "button";
    full_page: "full_page";
    agent: "agent";
    cli: "cli";
}>;
type ComponentType$1 = (typeof COMPONENT_TYPE_VALUES)[number];
/** @deprecated Use {@link ComponentTypeSchema}. */
declare const SurfaceTypeSchema: z.ZodEnum<{
    push: "push";
    custom: "custom";
    banner: "banner";
    modal: "modal";
    tooltip: "tooltip";
    sidebar: "sidebar";
    inline: "inline";
    toast: "toast";
    fullscreen: "fullscreen";
    email: "email";
    sms: "sms";
    in_page: "in_page";
    button: "button";
    full_page: "full_page";
    agent: "agent";
    cli: "cli";
}>;
/** Built-in template catalog. Customer-defined template ids remain free strings. */
declare const DefaultTemplateIdsSchema: z.ZodEnum<{
    push: "push";
    banner: "banner";
    tooltip: "tooltip";
    toast: "toast";
    email: "email";
    sms: "sms";
    button: "button";
    cli: "cli";
    plans_page_ctas: "plans_page_ctas";
    plans_page_full: "plans_page_full";
    inline_gate_message: "inline_gate_message";
    in_page_card: "in_page_card";
    usage_counter: "usage_counter";
    credit_counter: "credit_counter";
    trial_counter: "trial_counter";
    modal_optional: "modal_optional";
    modal_blocking: "modal_blocking";
    agent_connector: "agent_connector";
    custom_in_app: "custom_in_app";
}>;
/** @deprecated These values identify default templates, not rendering types. */
declare const StudioSurfaceTypeSchema: z.ZodEnum<{
    push: "push";
    banner: "banner";
    tooltip: "tooltip";
    toast: "toast";
    email: "email";
    sms: "sms";
    button: "button";
    cli: "cli";
    plans_page_ctas: "plans_page_ctas";
    plans_page_full: "plans_page_full";
    inline_gate_message: "inline_gate_message";
    in_page_card: "in_page_card";
    usage_counter: "usage_counter";
    credit_counter: "credit_counter";
    trial_counter: "trial_counter";
    modal_optional: "modal_optional";
    modal_blocking: "modal_blocking";
    agent_connector: "agent_connector";
    custom_in_app: "custom_in_app";
}>;
/** Canonical Appendix A template → rendering-component mapping. */
declare const DEFAULT_TEMPLATE_COMPONENT_TYPES: {
    readonly button: "button";
    readonly plans_page_ctas: "in_page";
    readonly plans_page_full: "full_page";
    readonly inline_gate_message: "inline";
    readonly tooltip: "tooltip";
    readonly in_page_card: "in_page";
    readonly usage_counter: "in_page";
    readonly credit_counter: "in_page";
    readonly trial_counter: "in_page";
    readonly banner: "banner";
    readonly modal_optional: "modal";
    readonly modal_blocking: "modal";
    readonly toast: "toast";
    readonly email: "email";
    readonly sms: "sms";
    readonly push: "push";
    readonly cli: "cli";
    readonly agent_connector: "agent";
    readonly custom_in_app: "custom";
};
/**
 * Built-in payload template ids, including the legacy seed handles still read by
 * local Playbooks. Resolver code consumes this schema-owned table rather than
 * carrying a private patch map.
 */
declare const BUILT_IN_TEMPLATE_COMPONENT_TYPES: Readonly<Record<string, ComponentType$1>>;
/** Resolve a canonical ComponentType or a legacy default-template classification. */
declare function resolveComponentType(value: string): ComponentType$1 | undefined;
/**
 * The entitlement verdict vocabulary, declared once (plan 182 REQ-8).
 *
 * Two published schema components carry this same value list — `EntitlementStatus`
 * (the decision-side check result) and `EntitlementGrantStatus` (the grant-side
 * projection). Both ids stay, because each is a real component in the published
 * JSON Schema / OpenAPI surface and removing either would break consumers; they
 * now share this array so the values cannot drift apart.
 */
declare const ENTITLEMENT_STATUS_VALUES: readonly ["allowed", "limited", "denied"];
/**
 * Outcome vocabulary for a placement presentation — the `outcome` column on the
 * `placement_presentations` analytics datasource (plan 182 REQ-4).
 *
 * Declared here because it is the contract between the interaction writer and the
 * analytics pipes that count it: `clicked` and `converted` drive click/conversion
 * rates, so a writer emitting an undeclared value silently produces rows no pipe
 * counts. Values mirror the shipped `TreatmentInteractionType` mapping.
 */
declare const PresentationOutcomeSchema: z.ZodEnum<{
    presented: "presented";
    clicked: "clicked";
    converted: "converted";
    dismissed: "dismissed";
    reminded: "reminded";
    suppressed: "suppressed";
}>;
declare const EntitlementTypeSchema: z.ZodEnum<{
    feature: "feature";
    capability_tier: "capability_tier";
    usage_limit: "usage_limit";
    price_per_unit: "price_per_unit";
    rate_limit: "rate_limit";
    credits: "credits";
    seat: "seat";
}>;
declare const CurrencySchema: z.ZodDefault<z.ZodString>;
declare const FeatureFlagValueSchema: z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodString]>;
/** Entity display name: `z.string().min(1).max(200)` */
declare const NameField: z.ZodString;
/** Unique handle / slug: `z.string().min(1).max(100)` */
declare const HandleField: z.ZodString;

/** Optional description: `z.string().max(500).optional()` */
declare const DescriptionField: z.ZodOptional<z.ZodString>;
/** Extensible metadata bag: `z.record(z.string(), z.unknown()).default({})` */
declare const MetadataField: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
/** Nullable datetime with null default: `z.string().datetime().nullable().default(null)` */
declare const NullableDatetimeField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
/** AnchorFields — the anchor-scope column shared by the anchor + version tables. */
declare const AnchorFields: z.ZodObject<{
    environment_id: z.ZodDefault<z.ZodString>;
}, z.core.$strip>;
/**
 * VersionFields — the append-only ledger columns (delta rows + `is_current`) plus
 * version-level soft-delete (plan 125). A staged delete inserts a new version with
 * `is_deleted = true`; the activate step promotes it to current and flips the
 * anchor inactive (with cascade). `delete_date` records when it was tombstoned.
 * This supersedes the interim `metadata._deleted` tombstone convention.
 */
declare const VersionFields: z.ZodObject<{
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
}, z.core.$strip>;
/**
 * Build a standalone anchor entity schema — only for an entity that warrants a
 * physically separate `<entity>` anchor table (its versions living in an
 * `<entity>_versions` ledger). Single-table entities compose `AnchorFields` +
 * `VersionFields` directly instead of using this.
 */
declare const AnchorBaseSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    handle: z.ZodString;
    active: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
/** The Zod type of a config entity's anchor schema (see {@link makeAnchor}). */
type AnchorSchema = typeof AnchorBaseSchema;
declare function makeAnchor(id: string): AnchorSchema;
/** Severity level for alerts, drift reports, and suggestions. */
declare const SeveritySchema: z.ZodEnum<{
    info: "info";
    warning: "warning";
    critical: "critical";
}>;
/** CTA action type — canonical set of user journey actions. */
declare const CtaActionTypeSchema: z.ZodEnum<{
    custom: "custom";
    open_checkout: "open_checkout";
    view_plans: "view_plans";
    book_demo: "book_demo";
    contact_sales: "contact_sales";
    complete_onboarding: "complete_onboarding";
    invite_teammate: "invite_teammate";
    refer_friend: "refer_friend";
    verify_work_email: "verify_work_email";
    update_payment_method: "update_payment_method";
    enable_auto_renewal: "enable_auto_renewal";
    manage_subscription: "manage_subscription";
    switch_billing_period: "switch_billing_period";
    extend_trial: "extend_trial";
    open_rt_placement: "open_rt_placement";
    dismiss: "dismiss";
    snooze: "snooze";
}>;
/**
 * Business objective a placement or entitlement rule is monetizing for —
 * the analytics "objective" slice (worksheet gap G4).
 *
 * Optional, and a **reference by handle** to a first-class Objective entity
 * (ruling D-15, BL-0176 / BL-0178): the Playbook's `objectives[]` collection,
 * persisted in the control plane as the `objectives` anchor + the
 * `objective_versions` ledger. The value set is per-tenant rather than a
 * platform enum — the war-games spec forbids assuming one: "RevTurbine must not
 * assume CTR, conversion, trial-to-paid, ARPA, retention, or revenue is
 * universally the optimization target" (`experiment-war-games-qualification.md`
 * §4.4). A reference no objective declares is `VAL-OBJ-01` (`error_launch`,
 * config-validation.md §5.9); it resolves by `handle`, never by row id.
 *
 * Config-only. The slice resolves through a configuration snapshot, not a
 * stamp: "Configuration is owned by Postgres and reaches the warehouse only
 * as immutable tenant-scoped snapshots keyed by canonical identity and
 * release digest … never by a request-time join"
 * (`metric-primitives-and-dimensions.md`). Nothing about the runtime decision
 * changes: the field round-trips through the portable Playbook projection so a
 * CLI export/import cycle preserves it, but it never lowers into the compiled
 * IR — no `SCHEMA_VERSION` bump.
 *
 * BL-0065, BL-0176, BL-0178.
 */
declare const ObjectiveField: z.ZodOptional<z.ZodString>;

declare const SchemaPersistence: {
    readonly Persisted: "persisted";
    readonly Transient: "transient";
};
type SchemaPersistence = (typeof SchemaPersistence)[keyof typeof SchemaPersistence];
declare const SchemaExposure: {
    readonly Internal: "internal";
    readonly External: "external";
};
type SchemaExposure = (typeof SchemaExposure)[keyof typeof SchemaExposure];
declare const DataClassification: {
    readonly Pii: {
        readonly 'x-revturbine-data-classification': "pii";
    };
    readonly Financial: {
        readonly 'x-revturbine-data-classification': "financial";
    };
    readonly Unrestricted: {
        readonly 'x-revturbine-data-classification': "unrestricted";
    };
    /**
     * Machine-generated evaluation exhaust — supersession records, entitlement
     * grants, placement decision traces. Carries no personal or financial data
     * itself, but describes what the engine decided about a user, so it is not
     * `Unrestricted` either. Applied at the MODEL level (plan 182 REQ-7); it was
     * already in use as a raw string literal on four schemas before being
     * declared here, which left `DataClassificationValue` unable to represent it.
     */
    readonly Operational: {
        readonly 'x-revturbine-data-classification': "operational";
    };
};
type DataClassification = (typeof DataClassification)[keyof typeof DataClassification];
type DataClassificationValue = DataClassification['x-revturbine-data-classification'];
declare const ContextVisibility: {
    /** Returnable to the browser. */
    readonly ClientSafe: "client_safe";
    /** Never returned to the browser. */
    readonly ServerOnly: "server_only";
    /** Influences Playbook evaluation server-side but is never returned to the browser. */
    readonly DecisionOnly: "decision_only";
};
type ContextVisibility = (typeof ContextVisibility)[keyof typeof ContextVisibility];
type SchemaClassification = {
    persistence: SchemaPersistence;
    exposure: SchemaExposure;
};
/**
 * The one genuinely-new field marker for the client-context boundary (plan 157).
 * A field flagged `decision_only` may drive a Playbook decision on the server but
 * MUST NEVER be serialized to the browser. Combine with a data classification,
 * e.g. `.meta({ ...Financial, ...DecisionOnly })`.
 */
declare const DecisionOnly: {
    readonly "x-revturbine-decision-only": true;
};
/** Field marker: expose this field to the browser (field-level `external`). */
declare const ClientSafe: {
    readonly "x-revturbine-schema-exposure": "external";
};
/** Field marker: hide this field from the browser (field-level `internal`). */
declare const ServerOnly: {
    readonly "x-revturbine-schema-exposure": "internal";
};
declare function getSchemaClassification(schema: z.ZodTypeAny): SchemaClassification | undefined;
declare function getFieldClassification(schema: z.ZodTypeAny): DataClassificationValue | undefined;
declare function getObjectFieldClassifications(schema: z.ZodObject<z.ZodRawShape>): Record<string, DataClassificationValue | undefined>;
/**
 * Read the schema-level exposure from a Zod schema's .meta().
 */
declare function getSchemaExposure(schema: z.ZodTypeAny): SchemaExposure | undefined;
/**
 * Read the schema-level persistence from a Zod schema's .meta().
 */
declare function getSchemaPersistence(schema: z.ZodTypeAny): SchemaPersistence | undefined;
/**
 * Filter a map of named Zod schemas to only those with exposure: 'external'.
 */
declare function filterExternalSchemas(allSchemas: Record<string, z.ZodTypeAny>): Record<string, z.ZodTypeAny>;
/**
 * Filter a map of named Zod schemas to only those with persistence: 'persisted'.
 */
declare function filterPersistedSchemas(allSchemas: Record<string, z.ZodTypeAny>): Record<string, z.ZodTypeAny>;
/**
 * Derive a write/input schema from a canonical object schema by dropping
 * fields marked with OpenAPI readOnly metadata.
 *
 * Used for both update (PATCH) and as the substrate for `toCreateSchema`.
 * Does NOT enforce `HANDLE_PATTERN` — update paths must leave pre-existing
 * out-of-pattern handles grandfathered (plan 51 Kent Q-3). Create paths
 * use `toCreateSchema` for the additional pattern check.
 */
declare function toWritableSchema<T extends z.ZodObject<z.ZodRawShape>>(schema: T): z.ZodObject<Record<string, z.ZodTypeAny>>;
/**
 * Derive a create (POST) input schema from a canonical object schema.
 *
 * Behaves like `toWritableSchema` (drops readOnly fields), and additionally
 * applies `HANDLE_PATTERN` to any `handle` field. The `handle` is
 * RevTurbine's universal API identifier and must be lowercase letters /
 * digits / dots / underscores only (plan 51 REQ-2). Updates skip this check
 * so pre-existing out-of-pattern rows stay valid (Kent Q-3 grandfathering).
 *
 * Use this for POST operations; use `toWritableSchema` for PATCH operations.
 */
declare function toCreateSchema<T extends z.ZodObject<z.ZodRawShape>>(schema: T): z.ZodObject<Record<string, z.ZodTypeAny>>;
/**
 * Resolve a field's client-context visibility from its `.meta()`. DERIVED, not
 * stored: `decision_only` marker wins; then Pii/Financial data is never
 * client-safe; then field-level `external` exposure makes it client-safe. Any
 * field without explicit `external` exposure defaults to `server_only`
 * (fail-closed / default-deny). Read the meta off the field schema as authored
 * (visibility markers sit on the outermost wrapper, matching the codebase idiom
 * `(z....optional()).meta(...)`).
 */
declare function getFieldVisibility(schema: z.ZodTypeAny): ContextVisibility;
/**
 * Project a value to the browser-safe subset of a schema (plan 157 exposure
 * policy). ALLOWLIST + recursive per-leaf: for a `ZodObject` schema, only fields
 * resolving to `client_safe` are kept, and each kept field is itself projected —
 * so a `server_only` / `decision_only` leaf nested inside an otherwise
 * `client_safe` object is dropped, and any unannotated field is dropped
 * (fail-closed). Arrays recurse through their element schema. Invalid container
 * or leaf shapes are omitted; scalar/record leaves use their declared schema.
 *
 * Single-sourced here so web (the endpoint) and the SDK derive one exposure
 * policy from the same schema annotations.
 */
declare function projectClientSafe(schema: z.ZodTypeAny, value: unknown): unknown;
/**
 * The per-field visibility map for an object schema — for tooling / tests that
 * want to inspect the policy without projecting a value.
 */
declare function getObjectFieldVisibilities(schema: z.ZodObject<z.ZodRawShape>): Record<string, ContextVisibility>;

declare const SchemaContext: {
    readonly Playbook: "playbook";
    readonly Branding: "branding";
    readonly Billing: "billing";
    readonly Metering: "metering";
    readonly CustomerOperations: "customer_operations";
    readonly EventIngestion: "event_ingestion";
};
type SchemaContext = (typeof SchemaContext)[keyof typeof SchemaContext];
declare const SchemaSource: {
    readonly Customer: "customer";
    readonly Stripe: "stripe";
    readonly CodeConstant: "code-constant";
    readonly Runtime: "runtime";
};
type SchemaSource = (typeof SchemaSource)[keyof typeof SchemaSource];
interface SchemaFacets {
    context: SchemaContext;
    inConfig: boolean;
    sdkInput: boolean;
    source: SchemaSource;
}
interface SchemaFacetOptions {
    sdkInput: boolean;
    inConfig?: boolean;
    source?: SchemaSource;
}
interface SchemaDeprecation {
    since: string;
    replacement: string;
    removeAfter: string;
    reason: string;
}
declare const SCHEMA_CONTEXT_META_KEY = "x-revturbine-context";
declare const SCHEMA_IN_CONFIG_META_KEY = "x-revturbine-in-config";
declare const SCHEMA_SDK_INPUT_META_KEY = "x-revturbine-sdk-input";
declare const SCHEMA_SOURCE_META_KEY = "x-revturbine-source";
declare const SCHEMA_DEPRECATION_META_KEY = "x-revturbine-deprecation";
type SchemaFacetMeta = {
    readonly [SCHEMA_CONTEXT_META_KEY]: SchemaContext;
    readonly [SCHEMA_IN_CONFIG_META_KEY]: boolean;
    readonly [SCHEMA_SDK_INPUT_META_KEY]: boolean;
    readonly [SCHEMA_SOURCE_META_KEY]: SchemaSource;
};
type SchemaDeprecationMeta = {
    readonly deprecated: true;
    readonly [SCHEMA_DEPRECATION_META_KEY]: {
        readonly since: string;
        readonly replacement: string;
        readonly remove_after: string;
        readonly reason: string;
    };
};
declare function schemaFacets(context: SchemaContext, options: SchemaFacetOptions): SchemaFacetMeta;
declare function schemaDeprecation(declaration: SchemaDeprecation): SchemaDeprecationMeta;
declare function getSchemaFacets(schema: z.ZodTypeAny): SchemaFacets | undefined;
declare function requireSchemaFacets(schema: z.ZodTypeAny, label: string): SchemaFacets;
declare function getSchemaDeprecation(schema: z.ZodTypeAny): SchemaDeprecation | undefined;
/**
 * Discover every named schema that declares persisted storage semantics.
 * Authored schemas in this set must carry facets; non-authored infrastructure
 * must be individually named in PERSISTED_SCHEMA_FACET_EXEMPTIONS.
 */
declare function collectPersistedSchemas(allExports: Record<string, unknown>): Record<string, z.ZodTypeAny>;
declare const PERSISTED_SCHEMA_FACET_EXEMPTIONS: {
    readonly AlertSchema: "Operational analytics output is not authored portable configuration.";
    readonly AuditActorTypeSchema: "Audit vocabulary is control-plane infrastructure, not authored strategy.";
    readonly AuditEventSchema: "Audit history is control-plane infrastructure, not authored strategy.";
    readonly AuthAccountSchema: "Authentication account state is infrastructure, not authored strategy.";
    readonly AuthApiKeySchema: "Authentication credential state is infrastructure, not authored strategy.";
    readonly AuthInvitationSchema: "Authentication invitation state is infrastructure, not authored strategy.";
    readonly AuthMemberSchema: "Authentication membership state is infrastructure, not authored strategy.";
    readonly AuthOrganizationSchema: "Authentication organization state is infrastructure, not authored strategy.";
    readonly AuthPasskeySchema: "Authentication passkey state is infrastructure, not authored strategy.";
    readonly AuthSessionSchema: "Authentication session state is infrastructure, not authored strategy.";
    readonly AuthSsoProviderSchema: "Authentication provider state is infrastructure, not authored strategy.";
    readonly AuthTwoFactorSchema: "Authentication factor state is infrastructure, not authored strategy.";
    readonly AuthUserSchema: "Authentication user state is infrastructure, not authored strategy.";
    readonly AuthVerificationSchema: "Authentication verification state is infrastructure, not authored strategy.";
    readonly ChangeLogActionSchema: "Change-log vocabulary is lifecycle infrastructure, not authored strategy.";
    readonly ChangeLogEntrySchema: "Change-log history is lifecycle infrastructure, not authored strategy.";
    readonly CustomerSchema: "Runtime customer state is not authored portable configuration.";
    readonly DriftReportSchema: "Operational drift output is not authored portable configuration.";
    readonly EnvironmentSchema: "Target environment infrastructure is not authored portable configuration.";
    readonly FeatureFlagSchema: "Studio feature-flag infrastructure is not authored Playbook strategy.";
    readonly FlagValueTypeSchema: "Studio feature-flag vocabulary is not authored Playbook strategy.";
    readonly IdentitySchema: "Runtime customer identity data is not authored portable configuration.";
    readonly IngestedEventSchema: "Event-ingestion records are runtime data, not authored strategy.";
    readonly InvitationStatusSchema: "Authentication invitation vocabulary is infrastructure, not authored strategy.";
    readonly McpConfigSchema: "Tenant MCP integration state is infrastructure, not authored strategy.";
    readonly McpTokenScopeSchema: "Authentication token vocabulary is infrastructure, not authored strategy.";
    readonly OnboardingChecklistSchema: "Tenant onboarding progress is operational state, not authored strategy.";
    readonly OptimizationSuggestionSchema: "Generated optimization advice is operational output, not authored strategy.";
    readonly OrgMemberRoleSchema: "Organization authorization vocabulary is infrastructure, not authored strategy.";
    readonly PlacementTestUserSchema: "Runtime test-audience state is not authored Playbook strategy and is not portable config.";
    readonly PlacementTestUserIdentifierTypeSchema: "Runtime test-audience vocabulary is not authored Playbook strategy or portable config.";
    readonly PlaybookVersionSchema: "Review and deployment lifecycle state is infrastructure, not authored strategy.";
    readonly RoleSchema: "Authorization role definitions are infrastructure, not authored Playbook strategy.";
    readonly SupersessionRecordSchema: "Version supersession history is lifecycle infrastructure, not authored strategy.";
    readonly TenantConfigSchema: "Tenant platform settings are infrastructure, not authored Playbook strategy.";
    readonly TenantSchema: "Tenant ownership infrastructure is not authored portable configuration.";
    readonly TrialInstanceSchema: "Per-customer trial runtime state is not authored portable configuration.";
    readonly UiPreferenceSchema: "Per-user Studio preferences are not authored portable configuration.";
    readonly UserContextSchema: "Runtime user evaluation context is not authored portable configuration.";
    readonly UserInstanceContextSchema: "Runtime user-instance state is not authored portable configuration.";
    readonly UserRoleSchema: "Application authorization vocabulary is infrastructure, not authored strategy.";
    readonly WebhookEventLogSchema: "Webhook delivery history is runtime data, not authored strategy.";
};

/**
 * Config identity model — declared on the Zod schema.
 *
 * See `docs/specs/scaffold/config-identity-model.md` (revturbine-devkit). Every
 * config entity's stable logical identity is its `handle` — a human-meaningful
 * name for a NAMED entity, or an opaque machine-minted slug for an UNNAMED one
 * (variations, entitlement_rules, payloads). `handle` is the sole cross-entity
 * reference; the physical `id` is storage only and is never a logical reference.
 *
 * The only per-entity classification is **named vs minted** — it tells the write
 * path whether the author supplies the handle or the system mints a slug. There
 * is no natural-key judgment. Identity + versioning columns are composed from the
 * `AnchorFields` / `VersionFields` mixins in `common.ts`.
 *
 * This rides the same `.meta()` vendor-extension pipeline as the
 * persistence/exposure metadata in `classification.ts`, and — like those keys —
 * is emitted as an `x-revturbine-*` extension that survives `zod-openapi`'s emit
 * into `generated/openapi.json`.
 */
/** How an entity's `handle` is assigned. */
declare const IdentityKind: {
    /** Author-given, human-meaningful handle (plans, entitlements, segments, …). */
    readonly Named: "named";
    /** Opaque machine-minted slug (variations, entitlement_rules, payloads, …). */
    readonly Minted: "minted";
};
type IdentityKind = (typeof IdentityKind)[keyof typeof IdentityKind];
interface IdentityDeclaration {
    kind: IdentityKind;
    /** The handle field name (default `handle`; e.g. `surface_slot_handle`). */
    handleField: string;
}
/**
 * The `.meta()` key under which the identity declaration lives. Vendor-extension
 * prefixed (like `x-revturbine-schema-persistence`) so it survives OpenAPI emit;
 * kept private so the declaration source can change without touching call sites
 * (spread the constructor helpers below into `.meta({...})`).
 */
declare const SCHEMA_IDENTITY_META_KEY = "x-revturbine-schema-identity";
type IdentityMeta = {
    readonly [SCHEMA_IDENTITY_META_KEY]: IdentityDeclaration;
};
/** Named entity — `handle` is the author-given name. Spread into a schema's `.meta({...})`. */
declare function namedIdentity(handleField?: string): IdentityMeta;
/** Unnamed entity — `handle` is an opaque minted slug. Spread into `.meta({...})`. */
declare function mintedIdentity(handleField?: string): IdentityMeta;
/**
 * Read the identity declaration off a Zod schema's `.meta()`. Returns undefined
 * when absent or malformed (so codegen/CI can treat "no declaration" uniformly).
 */
declare function getSchemaIdentity(schema: z.ZodTypeAny): IdentityDeclaration | undefined;
/**
 * True when a schema is a versioned config entity — i.e. it composes the version
 * ledger mixin (detected by the `playbook_version_id` + `is_current` shape keys).
 * This is exactly the set that must carry an identity declaration: every such row
 * is versioned and coalesced by its logical `handle`.
 */
declare function isVersionedConfigEntity(schema: z.ZodTypeAny): boolean;
/**
 * From a map of named schemas (e.g. the `core/zod` barrel via `import * as`),
 * return the versioned config entities keyed by their export name. Requires
 * `tenant_id` to select actual entities and exclude the bare mixins, which are
 * versioned-shaped but not entities. Used by the identity coverage test and
 * (later) the CI drift-check.
 */
declare function collectVersionedConfigEntities(allExports: Record<string, unknown>): Record<string, z.ZodObject<z.ZodRawShape>>;

type OverrideParameters = Parameters<NonNullable<NonNullable<Parameters<typeof toJSONSchema>[1]>['override']>>[0];
type OverrideSchemaParameters = Omit<OverrideParameters, 'zodSchema'>;
type IExtensionType = any;
type ISpecificationExtension = {
  [extensionName: IExtensionName]: IExtensionType;
};
//#endregion
//#region packages/openapi3-ts/lib-types/dist/model/oas-common.d.ts
interface ServerObject extends ISpecificationExtension {
  url: string;
  description?: string;
  variables?: {
    [v: string]: ServerVariableObject;
  };
}
interface ServerVariableObject extends ISpecificationExtension {
  enum?: string[] | boolean[] | number[];
  default: string | boolean | number;
  description?: string;
}
interface PathItemObject extends ISpecificationExtension {
  $ref?: string;
  summary?: string;
  description?: string;
  get?: OperationObject;
  put?: OperationObject;
  post?: OperationObject;
  delete?: OperationObject;
  options?: OperationObject;
  head?: OperationObject;
  patch?: OperationObject;
  trace?: OperationObject;
  servers?: ServerObject[];
  parameters?: (ParameterObject | ReferenceObject)[];
}
interface OperationObject extends ISpecificationExtension {
  tags?: string[];
  summary?: string;
  description?: string;
  externalDocs?: ExternalDocumentationObject;
  operationId?: string;
  parameters?: (ParameterObject | ReferenceObject)[];
  requestBody?: RequestBodyObject | ReferenceObject;
  responses?: ResponsesObject;
  callbacks?: CallbacksObject;
  deprecated?: boolean;
  security?: SecurityRequirementObject[];
  servers?: ServerObject[];
}
interface ExternalDocumentationObject extends ISpecificationExtension {
  description?: string;
  url: string;
}
type ParameterLocation = 'query' | 'header' | 'path' | 'cookie';
type ParameterStyle = 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';
interface BaseParameterObject extends ISpecificationExtension {
  description?: string;
  required?: boolean;
  deprecated?: boolean;
  allowEmptyValue?: boolean;
  style?: ParameterStyle;
  explode?: boolean;
  allowReserved?: boolean;
  schema?: SchemaObject | ReferenceObject;
  examples?: {
    [param: string]: ExampleObject | ReferenceObject;
  };
  example?: any;
  content?: ContentObject;
}
interface ParameterObject extends BaseParameterObject {
  name: string;
  in: ParameterLocation;
}
interface RequestBodyObject extends ISpecificationExtension {
  description?: string;
  content: ContentObject;
  required?: boolean;
}
interface ContentObject {
  [mediatype: string]: MediaTypeObject;
}
interface MediaTypeObject extends ISpecificationExtension {
  schema?: SchemaObject | ReferenceObject;
  examples?: ExamplesObject;
  example?: any;
  encoding?: EncodingObject;
}
interface EncodingObject extends ISpecificationExtension {
  [property: string]: EncodingPropertyObject | any;
}
interface EncodingPropertyObject {
  contentType?: string;
  headers?: {
    [key: string]: HeaderObject | ReferenceObject;
  };
  style?: string;
  explode?: boolean;
  allowReserved?: boolean;
  [key: string]: any;
}
interface ResponsesObject extends ISpecificationExtension {
  default?: ResponseObject | ReferenceObject;
  [statuscode: string]: ResponseObject | ReferenceObject | any;
}
interface ResponseObject extends ISpecificationExtension {
  description: string;
  headers?: HeadersObject;
  content?: ContentObject;
  links?: LinksObject;
}
interface CallbacksObject extends ISpecificationExtension {
  [name: string]: CallbackObject | ReferenceObject | any;
}
interface CallbackObject extends ISpecificationExtension {
  [name: string]: PathItemObject | any;
}
interface HeadersObject {
  [name: string]: HeaderObject | ReferenceObject;
}
interface ExampleObject {
  summary?: string;
  description?: string;
  value?: any;
  externalValue?: string;
  [property: string]: any;
}
interface LinksObject {
  [name: string]: LinkObject | ReferenceObject;
}
interface LinkObject extends ISpecificationExtension {
  operationRef?: string;
  operationId?: string;
  parameters?: LinkParametersObject;
  requestBody?: any | string;
  description?: string;
  server?: ServerObject;
  [property: string]: any;
}
interface LinkParametersObject {
  [name: string]: any | string;
}
interface HeaderObject extends BaseParameterObject {
  $ref?: string;
}
interface ExamplesObject {
  [name: string]: ExampleObject | ReferenceObject;
}
interface ReferenceObject {
  $ref: string;
  summary?: string;
  description?: string;
}
type SchemaObjectType = 'integer' | 'number' | 'string' | 'boolean' | 'object' | 'null' | 'array';
interface SchemaObject extends ISpecificationExtension {
  $ref?: string;
  discriminator?: DiscriminatorObject;
  readOnly?: boolean;
  writeOnly?: boolean;
  xml?: XmlObject;
  externalDocs?: ExternalDocumentationObject;
  example?: any;
  examples?: any[];
  deprecated?: boolean;
  type?: SchemaObjectType | SchemaObjectType[];
  format?: 'int32' | 'int64' | 'float' | 'double' | 'byte' | 'binary' | 'date' | 'date-time' | 'password' | string;
  allOf?: (SchemaObject | ReferenceObject)[];
  oneOf?: (SchemaObject | ReferenceObject)[];
  anyOf?: (SchemaObject | ReferenceObject)[];
  not?: SchemaObject | ReferenceObject;
  items?: SchemaObject | ReferenceObject;
  properties?: {
    [propertyName: string]: SchemaObject | ReferenceObject;
  };
  additionalProperties?: SchemaObject | ReferenceObject | boolean;
  propertyNames?: SchemaObject | ReferenceObject;
  description?: string;
  default?: any;
  title?: string;
  multipleOf?: number;
  maximum?: number;
  const?: any;
  exclusiveMaximum?: number;
  minimum?: number;
  exclusiveMinimum?: number;
  maxLength?: number;
  minLength?: number;
  pattern?: string;
  maxItems?: number;
  minItems?: number;
  uniqueItems?: boolean;
  maxProperties?: number;
  minProperties?: number;
  required?: string[];
  enum?: any[];
  prefixItems?: (SchemaObject | ReferenceObject)[];
  contentMediaType?: string;
  contentEncoding?: string;
}
interface DiscriminatorObject {
  propertyName: string;
  mapping?: {
    [key: string]: string;
  };
}
interface XmlObject extends ISpecificationExtension {
  name?: string;
  namespace?: string;
  prefix?: string;
  attribute?: boolean;
  wrapped?: boolean;
}
interface SecurityRequirementObject {
  [name: string]: string[];
}
type ZodOpenApiOverrideMetaContext = OverrideSchemaParameters;
type ZodOpenApiOverrideMeta = (ctx: ZodOpenApiOverrideMetaContext) => void;
interface ZodOpenApiBaseMetadata {
  /**
   * Used to set metadata for a parameter
   */
  param?: Partial<ParameterObject> & {
    /**
     * Used to output this Zod Schema in the components parameters section. Any usage of this Zod Schema will then be transformed into a $ref.
     */
    id?: string;
  };
  /**
   * Used to set metadata for a response header
   */
  header?: Partial<HeaderObject> & {
    /**
     * Used to output this Zod Schema in the components headers section. Any usage of this Zod Schema will then be transformed into a $ref.
     */
    id?: string;
  };
  /**
   * Use to override the rendered schema
   */
  override?: SchemaObject | ZodOpenApiOverrideMeta;
  /**
   * For use only if this Zod Schema is manually registered in the `components` section
   * and is not used anywhere else in the document.
   * Defaults to `output` if not specified.
   */
  unusedIO?: 'input' | 'output';
  /**
   * An alternate id to use for this schema in the event a registered schema is used in both a request and response schema.
   * If not specified, the id will be simply derived as the id of the schema plus an `Output` suffix. Please note that `id` must be set.
   */
  outputId?: string;
}
interface ZodOpenApiMetadata extends ZodOpenApiBaseMetadata, JSONSchemaMeta {
  examples?: unknown[];
  /**
   * @deprecated - Use `examples` instead.
   * Use of `example` is discouraged, and later versions of OpenAPI specification may remove it.
   */
  example?: unknown;
}
declare module 'zod/v4' {
  interface GlobalMeta extends ZodOpenApiMetadata {}
}
//#endregion
//#region src/create/document.d.ts
interface ZodOpenApiMediaTypeObject extends Omit<MediaTypeObject, 'schema'> {
  schema?: $ZodType | SchemaObject | ReferenceObject;
}
interface ZodOpenApiContentObject {
  'application/json'?: ZodOpenApiMediaTypeObject;
  [mediatype: string]: ZodOpenApiMediaTypeObject | undefined;
}
interface ZodOpenApiRequestBodyObject extends Omit<RequestBodyObject, 'content'> {
  content: ZodOpenApiContentObject;
  /** Use this field to auto register this request body as a component */
  id?: string;
}
type ZodOpenApiHeadersObject = ZodObjectInput | HeadersObject;
interface ZodOpenApiResponseObject extends Omit<ResponseObject, 'content' | 'headers' | 'links'> {
  content?: ZodOpenApiContentObject;
  headers?: ZodOpenApiHeadersObject;
  links?: ZodOpenApiLinksObject;
  /** Use this field to auto register this response object as a component */
  id?: string;
}
interface ZodOpenApiResponsesObject extends ISpecificationExtension {
  default?: ZodOpenApiResponseObject | ReferenceObject;
  [statuscode: `${1 | 2 | 3 | 4 | 5}${string}`]: ZodOpenApiResponseObject | ReferenceObject;
}
type ZodOpenApiParameters = Partial<Record<ParameterLocation, ZodObjectInput>>;
interface ZodOpenApiCallbacksObject extends ISpecificationExtension {
  [name: string]: ZodOpenApiCallbackObject;
}
interface ZodOpenApiCallbackObject extends ISpecificationExtension {
  /** Use this field to auto register this callback object as a component */
  id?: string;
  [name: string]: ZodOpenApiPathItemObject | string | undefined;
}
interface ZodOpenApiOperationObject extends Omit<OperationObject, 'requestBody' | 'responses' | 'parameters' | 'callbacks'> {
  parameters?: Array<$ZodType | ParameterObject | ReferenceObject>;
  requestBody?: ZodOpenApiRequestBodyObject;
  requestParams?: ZodOpenApiParameters;
  responses: ZodOpenApiResponsesObject;
  callbacks?: ZodOpenApiCallbacksObject;
}
interface ZodOpenApiPathItemObject extends Omit<PathItemObject, 'get' | 'put' | 'post' | 'delete' | 'options' | 'head' | 'patch' | 'trace'> {
  get?: ZodOpenApiOperationObject;
  put?: ZodOpenApiOperationObject;
  post?: ZodOpenApiOperationObject;
  delete?: ZodOpenApiOperationObject;
  options?: ZodOpenApiOperationObject;
  head?: ZodOpenApiOperationObject;
  patch?: ZodOpenApiOperationObject;
  trace?: ZodOpenApiOperationObject;
  /**
   * Used to register this path item as a component.
   */
  id?: string;
}
interface ZodOpenApiPathsObject extends ISpecificationExtension {
  [path: string]: ZodOpenApiPathItemObject;
}
interface ZodOpenApiLinkObject extends LinkObject {
  /** Use this field to auto register this link object as a component */
  id?: string;
}
type ZodOpenApiLinksObject = Record<string, ZodOpenApiLinkObject | ReferenceObject>;
type ZodObjectInput = $ZodType<unknown, Record<string, unknown>>;

/**
 * Plan schemas — Zod definitions for pricing plans.
 *
 * These are the single source of truth for Plan types.
 * TypeScript types are inferred via z.infer<>.
 */

declare const PlanVisibilitySchema: z.ZodEnum<{
    legacy: "legacy";
    public: "public";
    unlisted: "unlisted";
}>;
declare const PricingModelSchema: z.ZodEnum<{
    flat: "flat";
    per_unit: "per_unit";
    tiered: "tiered";
    metered: "metered";
}>;
declare const PriceSourceSchema: z.ZodEnum<{
    stripe: "stripe";
    static: "static";
    clerk: "clerk";
}>;
declare function isValidClerkPlanVariation(value: {
    price_source?: string;
    stripe_price_id?: string | null;
    billing_period?: string;
}): boolean;
declare const PlanSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    name: z.ZodString;
    handle: z.ZodString;
    tier_position: z.ZodDefault<z.ZodNumber>;
    sort_order: z.ZodDefault<z.ZodNumber>;
    visibility: z.ZodDefault<z.ZodEnum<{
        legacy: "legacy";
        public: "public";
        unlisted: "unlisted";
    }>>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const PlanVariationSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    handle: z.ZodString;
    plan_id: z.ZodString;
    billing_period: z.ZodEnum<{
        custom: "custom";
        monthly: "monthly";
        annual: "annual";
        one_time: "one_time";
    }>;
    segment_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    price_amount: z.ZodNumber;
    currency: z.ZodDefault<z.ZodString>;
    pricing_model: z.ZodEnum<{
        flat: "flat";
        per_unit: "per_unit";
        tiered: "tiered";
        metered: "metered";
    }>;
    visibility: z.ZodDefault<z.ZodEnum<{
        legacy: "legacy";
        public: "public";
        unlisted: "unlisted";
    }>>;
    stripe_price_id: z.ZodOptional<z.ZodString>;
    price_source: z.ZodDefault<z.ZodEnum<{
        stripe: "stripe";
        static: "static";
        clerk: "clerk";
    }>>;
}, z.core.$strip>;
declare const AddOnSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    name: z.ZodString;
    handle: z.ZodString;
    sort_order: z.ZodDefault<z.ZodNumber>;
    visibility: z.ZodDefault<z.ZodEnum<{
        legacy: "legacy";
        public: "public";
        unlisted: "unlisted";
    }>>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const AddOnVariationSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    handle: z.ZodString;
    addon_id: z.ZodString;
    billing_period: z.ZodEnum<{
        custom: "custom";
        monthly: "monthly";
        annual: "annual";
        one_time: "one_time";
    }>;
    segment_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    price_amount: z.ZodNumber;
    currency: z.ZodDefault<z.ZodString>;
    pricing_model: z.ZodEnum<{
        flat: "flat";
        per_unit: "per_unit";
        tiered: "tiered";
        metered: "metered";
    }>;
    visibility: z.ZodDefault<z.ZodEnum<{
        legacy: "legacy";
        public: "public";
        unlisted: "unlisted";
    }>>;
    stripe_price_id: z.ZodOptional<z.ZodString>;
    price_source: z.ZodDefault<z.ZodEnum<{
        stripe: "stripe";
        static: "static";
    }>>;
}, z.core.$strip>;
declare const StripePriceBillingPeriodSchema: z.ZodEnum<{
    custom: "custom";
    monthly: "monthly";
    annual: "annual";
    one_time: "one_time";
}>;
declare const StripePriceSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    stripe_price_id: z.ZodString;
    stripe_product_id: z.ZodString;
    billing_period: z.ZodEnum<{
        custom: "custom";
        monthly: "monthly";
        annual: "annual";
        one_time: "one_time";
    }>;
    unit_amount_cents: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    currency: z.ZodDefault<z.ZodString>;
    pricing_model: z.ZodEnum<{
        flat: "flat";
        per_unit: "per_unit";
        tiered: "tiered";
        metered: "metered";
    }>;
    nickname: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_mock: z.ZodDefault<z.ZodBoolean>;
    last_updated_from_stripe: z.ZodDefault<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
/**
 * @deprecated Renamed to `StripePriceSchema` (plan 118 TASK-16). This alias is
 * kept for one migration window so consumers pinning the new @revt-eng/schema
 * don't break; it re-exports the identical shape. Migrate to `StripePriceSchema`.
 * (The generated `StripePriceMock` type follows automatically from this export.)
 */
declare const StripePriceMockSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    stripe_price_id: z.ZodString;
    stripe_product_id: z.ZodString;
    billing_period: z.ZodEnum<{
        custom: "custom";
        monthly: "monthly";
        annual: "annual";
        one_time: "one_time";
    }>;
    unit_amount_cents: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    currency: z.ZodDefault<z.ZodString>;
    pricing_model: z.ZodEnum<{
        flat: "flat";
        per_unit: "per_unit";
        tiered: "tiered";
        metered: "metered";
    }>;
    nickname: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_mock: z.ZodDefault<z.ZodBoolean>;
    last_updated_from_stripe: z.ZodDefault<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
/** @deprecated Renamed to `StripePriceBillingPeriodSchema` (plan 118 TASK-16). */
declare const StripePriceMockBillingPeriodSchema: z.ZodEnum<{
    custom: "custom";
    monthly: "monthly";
    annual: "annual";
    one_time: "one_time";
}>;
declare const planPaths: ZodOpenApiPathsObject;

/**
 * Entitlement schemas — Zod definitions for entitlements, rules, and rule variants.
 */

declare const UsagePeriodScopeSchema: z.ZodEnum<{
    per_month: "per_month";
    per_year: "per_year";
    per_billing_period: "per_billing_period";
    lifetime: "lifetime";
    concurrent: "concurrent";
    per_instance: "per_instance";
    per_second: "per_second";
    per_minute: "per_minute";
    per_hour: "per_hour";
    per_6_hours: "per_6_hours";
    per_day: "per_day";
    per_week: "per_week";
}>;
declare const UsageAllocationSchema$1: z.ZodEnum<{
    per_instance: "per_instance";
    account_pool: "account_pool";
    per_user: "per_user";
    per_user_pooled: "per_user_pooled";
}>;
declare const EntitlementGrantStatusSchema: z.ZodEnum<{
    allowed: "allowed";
    limited: "limited";
    denied: "denied";
}>;
declare const EntitlementGrantSourceSchema: z.ZodEnum<{
    override: "override";
    rule: "rule";
    user_context: "user_context";
}>;
declare const EnforcementModeSchema: z.ZodEnum<{
    hard_block: "hard_block";
    block_with_upsell: "block_with_upsell";
    degrade: "degrade";
    allow_overage: "allow_overage";
}>;
/**
 * A resolved entitlement grant.
 *
 * Grants are derived from entitlement rules matched by plan_id + segment_id
 * (+ optional seat_type_id), or alternatively provided directly as part of
 * user context.  The `source` field indicates which derivation path produced
 * the grant so downstream consumers can audit/debug.
 */
declare const EntitlementGrantSchema: z.ZodObject<{
    entitlement_id: z.ZodString;
    entitlement_handle: z.ZodString;
    status: z.ZodEnum<{
        allowed: "allowed";
        limited: "limited";
        denied: "denied";
    }>;
    limit: z.ZodOptional<z.ZodNumber>;
    used: z.ZodOptional<z.ZodNumber>;
    allocation: z.ZodOptional<z.ZodEnum<{
        per_instance: "per_instance";
        account_pool: "account_pool";
        per_user: "per_user";
        per_user_pooled: "per_user_pooled";
    }>>;
    enforcement: z.ZodOptional<z.ZodEnum<{
        hard_block: "hard_block";
        block_with_upsell: "block_with_upsell";
        degrade: "degrade";
        allow_overage: "allow_overage";
    }>>;
    source: z.ZodOptional<z.ZodEnum<{
        override: "override";
        rule: "rule";
        user_context: "user_context";
    }>>;
    plan_id: z.ZodOptional<z.ZodString>;
    segment_id: z.ZodOptional<z.ZodString>;
    seat_type_id: z.ZodOptional<z.ZodString>;
    rule_id: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/**
 * Entitlement grants at each level of the identity hierarchy.
 *
 * Resolution order (most-specific wins per entitlement handle):
 * account → instance → user.
 */
declare const EntitlementGrantSetSchema: z.ZodObject<{
    account: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        entitlement_id: z.ZodString;
        entitlement_handle: z.ZodString;
        status: z.ZodEnum<{
            allowed: "allowed";
            limited: "limited";
            denied: "denied";
        }>;
        limit: z.ZodOptional<z.ZodNumber>;
        used: z.ZodOptional<z.ZodNumber>;
        allocation: z.ZodOptional<z.ZodEnum<{
            per_instance: "per_instance";
            account_pool: "account_pool";
            per_user: "per_user";
            per_user_pooled: "per_user_pooled";
        }>>;
        enforcement: z.ZodOptional<z.ZodEnum<{
            hard_block: "hard_block";
            block_with_upsell: "block_with_upsell";
            degrade: "degrade";
            allow_overage: "allow_overage";
        }>>;
        source: z.ZodOptional<z.ZodEnum<{
            override: "override";
            rule: "rule";
            user_context: "user_context";
        }>>;
        plan_id: z.ZodOptional<z.ZodString>;
        segment_id: z.ZodOptional<z.ZodString>;
        seat_type_id: z.ZodOptional<z.ZodString>;
        rule_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    instance: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        entitlement_id: z.ZodString;
        entitlement_handle: z.ZodString;
        status: z.ZodEnum<{
            allowed: "allowed";
            limited: "limited";
            denied: "denied";
        }>;
        limit: z.ZodOptional<z.ZodNumber>;
        used: z.ZodOptional<z.ZodNumber>;
        allocation: z.ZodOptional<z.ZodEnum<{
            per_instance: "per_instance";
            account_pool: "account_pool";
            per_user: "per_user";
            per_user_pooled: "per_user_pooled";
        }>>;
        enforcement: z.ZodOptional<z.ZodEnum<{
            hard_block: "hard_block";
            block_with_upsell: "block_with_upsell";
            degrade: "degrade";
            allow_overage: "allow_overage";
        }>>;
        source: z.ZodOptional<z.ZodEnum<{
            override: "override";
            rule: "rule";
            user_context: "user_context";
        }>>;
        plan_id: z.ZodOptional<z.ZodString>;
        segment_id: z.ZodOptional<z.ZodString>;
        seat_type_id: z.ZodOptional<z.ZodString>;
        rule_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    user: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        entitlement_id: z.ZodString;
        entitlement_handle: z.ZodString;
        status: z.ZodEnum<{
            allowed: "allowed";
            limited: "limited";
            denied: "denied";
        }>;
        limit: z.ZodOptional<z.ZodNumber>;
        used: z.ZodOptional<z.ZodNumber>;
        allocation: z.ZodOptional<z.ZodEnum<{
            per_instance: "per_instance";
            account_pool: "account_pool";
            per_user: "per_user";
            per_user_pooled: "per_user_pooled";
        }>>;
        enforcement: z.ZodOptional<z.ZodEnum<{
            hard_block: "hard_block";
            block_with_upsell: "block_with_upsell";
            degrade: "degrade";
            allow_overage: "allow_overage";
        }>>;
        source: z.ZodOptional<z.ZodEnum<{
            override: "override";
            rule: "rule";
            user_context: "user_context";
        }>>;
        plan_id: z.ZodOptional<z.ZodString>;
        segment_id: z.ZodOptional<z.ZodString>;
        seat_type_id: z.ZodOptional<z.ZodString>;
        rule_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
}, z.core.$strip>;
declare const RuleVisibilitySchema: z.ZodEnum<{
    public: "public";
    non_public: "non_public";
}>;
declare const EntitlementRuleTargetKindSchema: z.ZodEnum<{
    plan: "plan";
    addon: "addon";
    plan_variation: "plan_variation";
    addon_variation: "addon_variation";
}>;
declare const EntitlementRuleTargetSchema: z.ZodObject<{
    kind: z.ZodEnum<{
        plan: "plan";
        addon: "addon";
        plan_variation: "plan_variation";
        addon_variation: "addon_variation";
    }>;
    id: z.ZodString;
}, z.core.$strip>;
declare const EntitlementRulePeriodUnitSchema: z.ZodEnum<{
    day: "day";
    week: "week";
    month: "month";
    year: "year";
    quarter: "quarter";
    billing_period: "billing_period";
    hour: "hour";
    six_hours: "six_hours";
}>;
declare const EntitlementSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    name: z.ZodString;
    handle: z.ZodString;
    customer_facing_description: z.ZodOptional<z.ZodString>;
    type: z.ZodEnum<{
        feature: "feature";
        capability_tier: "capability_tier";
        usage_limit: "usage_limit";
        price_per_unit: "price_per_unit";
        rate_limit: "rate_limit";
        credits: "credits";
        seat: "seat";
    }>;
    unit: z.ZodOptional<z.ZodString>;
    period_scope: z.ZodOptional<z.ZodEnum<{
        per_month: "per_month";
        per_year: "per_year";
        per_billing_period: "per_billing_period";
        lifetime: "lifetime";
        concurrent: "concurrent";
        per_instance: "per_instance";
        per_second: "per_second";
        per_minute: "per_minute";
        per_hour: "per_hour";
        per_6_hours: "per_6_hours";
        per_day: "per_day";
        per_week: "per_week";
    }>>;
    allocation: z.ZodOptional<z.ZodEnum<{
        per_instance: "per_instance";
        account_pool: "account_pool";
        per_user: "per_user";
        per_user_pooled: "per_user_pooled";
    }>>;
    tier_definitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        handle: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    sort_order: z.ZodDefault<z.ZodNumber>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const EntitlementRuleSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    handle: z.ZodString;
    entitlement_id: z.ZodString;
    targets: z.ZodArray<z.ZodObject<{
        kind: z.ZodEnum<{
            plan: "plan";
            addon: "addon";
            plan_variation: "plan_variation";
            addon_variation: "addon_variation";
        }>;
        id: z.ZodString;
    }, z.core.$strip>>;
    segment_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
    visibility: z.ZodDefault<z.ZodEnum<{
        public: "public";
        non_public: "non_public";
    }>>;
    objective: z.ZodNullable<z.ZodOptional<z.ZodString>>;
    period_scope: z.ZodOptional<z.ZodEnum<{
        per_month: "per_month";
        per_year: "per_year";
        per_billing_period: "per_billing_period";
        lifetime: "lifetime";
        concurrent: "concurrent";
        per_instance: "per_instance";
        per_second: "per_second";
        per_minute: "per_minute";
        per_hour: "per_hour";
        per_6_hours: "per_6_hours";
        per_day: "per_day";
        per_week: "per_week";
    }>>;
    instance: z.ZodOptional<z.ZodString>;
    reset_period: z.ZodOptional<z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        year: "year";
        quarter: "quarter";
        billing_period: "billing_period";
        hour: "hour";
        six_hours: "six_hours";
    }>>;
    limit_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
    enforcement: z.ZodOptional<z.ZodEnum<{
        hard_block: "hard_block";
        block_with_upsell: "block_with_upsell";
        degrade: "degrade";
        allow_overage: "allow_overage";
    }>>;
    warning_threshold_percent: z.ZodOptional<z.ZodNumber>;
    overage_price_ref: z.ZodOptional<z.ZodString>;
    grace_period_hours: z.ZodOptional<z.ZodNumber>;
    tier_value: z.ZodOptional<z.ZodString>;
    rate_value: z.ZodOptional<z.ZodNumber>;
    initial_grant: z.ZodOptional<z.ZodNumber>;
    allowance_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
    rollover_enabled: z.ZodOptional<z.ZodBoolean>;
    max_balance: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>>;
    seat_type_id: z.ZodOptional<z.ZodString>;
    included_count: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
    at_limit_behavior: z.ZodOptional<z.ZodEnum<{
        hard_cap: "hard_cap";
        auto_upgrade_at_renewal: "auto_upgrade_at_renewal";
    }>>;
    stripe_metered_price_id: z.ZodOptional<z.ZodString>;
    enabled: z.ZodOptional<z.ZodBoolean>;
    allocation: z.ZodOptional<z.ZodEnum<{
        per_instance: "per_instance";
        account_pool: "account_pool";
        per_user: "per_user";
        per_user_pooled: "per_user_pooled";
    }>>;
    max_seats: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>>;
    amount_cents: z.ZodOptional<z.ZodNumber>;
    currency: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/**
 * Validated EntitlementRule — adds the structural BLOCK that `reset_period =
 * 'billing_period'` requires targets that carry a billing period (only
 * plan_variation / addon_variation do). Plan-level and addon-level targets
 * span all their variations and have no single billing period to resolve.
 *
 * The full "do these variations share THE SAME billing period?" check
 * requires a Plan/AddonVariation lookup and is enforced server-side via
 * `validateEntitlementRuleAgainstVariations()` below (plan #35 REQ-5);
 * this refinement is the structural prerequisite.
 *
 * Use this schema in server-side POST/PATCH handlers (revturbine-web) when
 * validating request bodies. The canonical `EntitlementRuleSchema` stays a
 * plain `z.ZodObject` so `toWritableSchema()` and OpenAPI generation work.
 */
declare const EntitlementRuleValidatedSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    handle: z.ZodString;
    entitlement_id: z.ZodString;
    targets: z.ZodArray<z.ZodObject<{
        kind: z.ZodEnum<{
            plan: "plan";
            addon: "addon";
            plan_variation: "plan_variation";
            addon_variation: "addon_variation";
        }>;
        id: z.ZodString;
    }, z.core.$strip>>;
    segment_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
    visibility: z.ZodDefault<z.ZodEnum<{
        public: "public";
        non_public: "non_public";
    }>>;
    objective: z.ZodNullable<z.ZodOptional<z.ZodString>>;
    period_scope: z.ZodOptional<z.ZodEnum<{
        per_month: "per_month";
        per_year: "per_year";
        per_billing_period: "per_billing_period";
        lifetime: "lifetime";
        concurrent: "concurrent";
        per_instance: "per_instance";
        per_second: "per_second";
        per_minute: "per_minute";
        per_hour: "per_hour";
        per_6_hours: "per_6_hours";
        per_day: "per_day";
        per_week: "per_week";
    }>>;
    instance: z.ZodOptional<z.ZodString>;
    reset_period: z.ZodOptional<z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        year: "year";
        quarter: "quarter";
        billing_period: "billing_period";
        hour: "hour";
        six_hours: "six_hours";
    }>>;
    limit_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
    enforcement: z.ZodOptional<z.ZodEnum<{
        hard_block: "hard_block";
        block_with_upsell: "block_with_upsell";
        degrade: "degrade";
        allow_overage: "allow_overage";
    }>>;
    warning_threshold_percent: z.ZodOptional<z.ZodNumber>;
    overage_price_ref: z.ZodOptional<z.ZodString>;
    grace_period_hours: z.ZodOptional<z.ZodNumber>;
    tier_value: z.ZodOptional<z.ZodString>;
    rate_value: z.ZodOptional<z.ZodNumber>;
    initial_grant: z.ZodOptional<z.ZodNumber>;
    allowance_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
    rollover_enabled: z.ZodOptional<z.ZodBoolean>;
    max_balance: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>>;
    seat_type_id: z.ZodOptional<z.ZodString>;
    included_count: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
    at_limit_behavior: z.ZodOptional<z.ZodEnum<{
        hard_cap: "hard_cap";
        auto_upgrade_at_renewal: "auto_upgrade_at_renewal";
    }>>;
    stripe_metered_price_id: z.ZodOptional<z.ZodString>;
    enabled: z.ZodOptional<z.ZodBoolean>;
    allocation: z.ZodOptional<z.ZodEnum<{
        per_instance: "per_instance";
        account_pool: "account_pool";
        per_user: "per_user";
        per_user_pooled: "per_user_pooled";
    }>>;
    max_seats: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>>;
    amount_cents: z.ZodOptional<z.ZodNumber>;
    currency: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const EntitlementRuleVariantSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    handle: z.ZodString;
    rule_id: z.ZodString;
    experiment_id: z.ZodString;
    variant_name: z.ZodString;
    is_control: z.ZodDefault<z.ZodBoolean>;
    override_fields: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const entitlementPaths: ZodOpenApiPathsObject;

/**
 * Placement schemas — Zod definitions for placements, payloads, variants, and surface slots.
 */

declare const PlacementCategorySchema: z.ZodEnum<{
    fixed: "fixed";
    usage_limit: "usage_limit";
    other_conversion: "other_conversion";
    retention: "retention";
    gated_feature: "gated_feature";
    trial: "trial";
}>;
declare const CapPeriodSchema$1: z.ZodEnum<{
    day: "day";
    week: "week";
    month: "month";
    lifetime: "lifetime";
    session: "session";
}>;
declare const PlacementCapRuleSchema: z.ZodObject<{
    count: z.ZodNumber;
    period: z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        lifetime: "lifetime";
        session: "session";
    }>;
}, z.core.$strip>;
declare const SurfaceTypeCapRuleSchema: z.ZodObject<{
    surface_type: z.ZodString;
    rules: z.ZodArray<z.ZodObject<{
        count: z.ZodNumber;
        period: z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            lifetime: "lifetime";
            session: "session";
        }>;
    }, z.core.$strip>>;
    cooldown_ms: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
declare const CtaPathTypeSchema: z.ZodEnum<{
    custom: "custom";
    open_checkout: "open_checkout";
    view_plans: "view_plans";
    book_demo: "book_demo";
    contact_sales: "contact_sales";
    complete_onboarding: "complete_onboarding";
    invite_teammate: "invite_teammate";
    refer_friend: "refer_friend";
    verify_work_email: "verify_work_email";
    update_payment_method: "update_payment_method";
    enable_auto_renewal: "enable_auto_renewal";
    manage_subscription: "manage_subscription";
    switch_billing_period: "switch_billing_period";
    extend_trial: "extend_trial";
    open_rt_placement: "open_rt_placement";
    dismiss: "dismiss";
    snooze: "snooze";
}>;
declare const PlacementSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    name: z.ZodString;
    handle: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    category: z.ZodEnum<{
        fixed: "fixed";
        usage_limit: "usage_limit";
        other_conversion: "other_conversion";
        retention: "retention";
        gated_feature: "gated_feature";
        trial: "trial";
    }>;
    objective: z.ZodNullable<z.ZodOptional<z.ZodString>>;
    drag_order_in_category: z.ZodDefault<z.ZodNumber>;
    surface_slot_id: z.ZodOptional<z.ZodString>;
    entitlement_id: z.ZodOptional<z.ZodString>;
    tier_threshold: z.ZodOptional<z.ZodString>;
    threshold_percent: z.ZodOptional<z.ZodNumber>;
    trial_type: z.ZodOptional<z.ZodEnum<{
        reverse: "reverse";
        free: "free";
    }>>;
    trigger_type: z.ZodOptional<z.ZodString>;
    trial_progress_percent: z.ZodOptional<z.ZodNumber>;
    days_before_end: z.ZodOptional<z.ZodNumber>;
    qualifier: z.ZodOptional<z.ZodEnum<{
        none_always_on: "none_always_on";
        overage_vs_upgrade: "overage_vs_upgrade";
        time_bound: "time_bound";
        payment_failed: "payment_failed";
        payment_at_risk: "payment_at_risk";
    }>>;
    activation_window_start: z.ZodOptional<z.ZodString>;
    activation_window_end: z.ZodOptional<z.ZodString>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
/**
 * Non-blocking warning emitted by placement write operations (POST/PATCH).
 * Surfaced in the response body alongside the persisted placement so the studio
 * can render advisory messages without blocking submit — the same pattern the
 * entitlement-rule write path uses (`EntitlementRuleWarning`; plan 138 Q-2).
 */
declare const PlacementWarningCodeSchema: z.ZodEnum<{
    threshold_not_emitted: "threshold_not_emitted";
}>;
declare const PlacementWarningSchema: z.ZodObject<{
    code: z.ZodEnum<{
        threshold_not_emitted: "threshold_not_emitted";
    }>;
    message: z.ZodString;
    path: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
}, z.core.$strip>;
/**
 * Emitter-half thresholds for an entitlement: the `warning_threshold_percent`
 * values across its rules. Web supplies the lookup (it owns DB access);
 * returning `undefined` for an unknown/absent entitlement skips the check.
 */
type PlacementEmittedThresholdLookup = (entitlementId: string) => readonly number[] | undefined;
/**
 * REQ-13: a placement whose `threshold_percent` is not among the target
 * entitlement's emitted warning thresholds saves successfully but returns a
 * non-blocking warning ("should match one of those global values",
 * placement-studio-ui.md §3.4 L460). Only threshold-kind triggers
 * (`usage_threshold` / `credit_threshold` / `seat_threshold`) with a numeric
 * percent and a target entitlement are checked; everything else returns no
 * warnings. An entitlement the lookup cannot resolve (`undefined`) is skipped;
 * a resolvable entitlement that emits no thresholds (`[]`) still warns.
 */
declare function validatePlacementThresholdWarnings(placement: Pick<z.infer<typeof PlacementSchema>, 'trigger_type' | 'threshold_percent' | 'entitlement_id'>, lookup: PlacementEmittedThresholdLookup): z.infer<typeof PlacementWarningSchema>[];
declare const CtaObjectSchema: z.ZodObject<{
    label: z.ZodString;
    cta_path_type: z.ZodEnum<{
        custom: "custom";
        open_checkout: "open_checkout";
        view_plans: "view_plans";
        book_demo: "book_demo";
        contact_sales: "contact_sales";
        complete_onboarding: "complete_onboarding";
        invite_teammate: "invite_teammate";
        refer_friend: "refer_friend";
        verify_work_email: "verify_work_email";
        update_payment_method: "update_payment_method";
        enable_auto_renewal: "enable_auto_renewal";
        manage_subscription: "manage_subscription";
        switch_billing_period: "switch_billing_period";
        extend_trial: "extend_trial";
        open_rt_placement: "open_rt_placement";
        dismiss: "dismiss";
        snooze: "snooze";
    }>;
    config_fields: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const PlacementPayloadSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    handle: z.ZodString;
    placement_id: z.ZodString;
    drag_order: z.ZodDefault<z.ZodNumber>;
    target_plan_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
    target_plan_billing_cadences: z.ZodDefault<z.ZodArray<z.ZodString>>;
    target_segments: z.ZodDefault<z.ZodArray<z.ZodString>>;
    surface_slot_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
    surface_template_id: z.ZodString;
    content_fields: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    cta_list: z.ZodDefault<z.ZodArray<z.ZodObject<{
        label: z.ZodString;
        cta_path_type: z.ZodEnum<{
            custom: "custom";
            open_checkout: "open_checkout";
            view_plans: "view_plans";
            book_demo: "book_demo";
            contact_sales: "contact_sales";
            complete_onboarding: "complete_onboarding";
            invite_teammate: "invite_teammate";
            refer_friend: "refer_friend";
            verify_work_email: "verify_work_email";
            update_payment_method: "update_payment_method";
            enable_auto_renewal: "enable_auto_renewal";
            manage_subscription: "manage_subscription";
            switch_billing_period: "switch_billing_period";
            extend_trial: "extend_trial";
            open_rt_placement: "open_rt_placement";
            dismiss: "dismiss";
            snooze: "snooze";
        }>;
        config_fields: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strip>>>;
    max_per_period: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    max_period_unit: z.ZodDefault<z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        lifetime: "lifetime";
        session: "session";
    }>>;
    cooldown_after_dismiss_days: z.ZodDefault<z.ZodNumber>;
    remind_later_minutes: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    recommendation_strategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
        custom: "custom";
        next_tier_up: "next_tier_up";
        best_value: "best_value";
    }>>>;
    recommendation_plan_override: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/**
 * The ONE surface-slot status vocabulary (BL-0207; Placement Studio UI spec
 * §3.8.2): `live` — the SDK reported the slot within the tenant's configurable
 * idle window (default 24h); `idle` — it did not. A slot is a delivery
 * location, not a configured object, so this is deliberately NOT the
 * payload/placement Runtime Status vocabulary (New/Active/Inactive/Mixed).
 *
 * It replaces three that disagreed: this schema's `active|inactive|new`, the
 * `discovered_surface_slots` pipe's `Experimenting|New|Active|Inactive`, and
 * the spec's `Live|Idle`. The pipe's extra values were never statuses:
 * "Experimenting" is an orthogonal flag (a live slot can be under
 * experiment), and "New" is derivable from `first_seen`.
 */
declare const SURFACE_SLOT_STATUS_VALUES: readonly ["live", "idle"];
declare const SurfaceSlotStatusSchema: z.ZodEnum<{
    live: "live";
    idle: "idle";
}>;
/** Upper bound on a slot route — a path, never a URL with a query string. */
declare const SURFACE_SLOT_ROUTE_MAX_LENGTH = 512;
/** Upper bound on a discovered slot name — a display label, not prose. */
declare const SURFACE_SLOT_NAME_MAX_LENGTH = 200;
declare const SurfaceSlotSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    surface_slot_handle: z.ZodString;
    surface_type: z.ZodEnum<{
        push: "push";
        custom: "custom";
        banner: "banner";
        modal: "modal";
        tooltip: "tooltip";
        sidebar: "sidebar";
        inline: "inline";
        toast: "toast";
        fullscreen: "fullscreen";
        email: "email";
        sms: "sms";
        in_page: "in_page";
        button: "button";
        full_page: "full_page";
        agent: "agent";
        cli: "cli";
    }>;
    surface_template_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
    surface_slot_category: z.ZodDefault<z.ZodEnum<{
        fixed: "fixed";
        gated: "gated";
        triggered: "triggered";
    }>>;
    first_seen: z.ZodString;
    last_seen: z.ZodString;
    route: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    slot_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    status: z.ZodDefault<z.ZodEnum<{
        live: "live";
        idle: "idle";
    }>>;
    placement_count: z.ZodDefault<z.ZodNumber>;
}, z.core.$strip>;
declare const placementPaths: ZodOpenApiPathsObject;

/**
 * User schemas — Zod definitions for user context, trial status, and usage.
 *
 * These are external/SDK-facing types that describe an identified user's
 * current state (plan, entitlements, usage, personalization tokens).
 */

declare const UserTrialStatusSchema: z.ZodObject<{
    in_trial: z.ZodBoolean;
    instance_id: z.ZodOptional<z.ZodString>;
    started_at: z.ZodOptional<z.ZodString>;
    trial_type: z.ZodOptional<z.ZodString>;
    plan_handle: z.ZodOptional<z.ZodString>;
    state: z.ZodOptional<z.ZodEnum<{
        converted: "converted";
        active: "active";
        none: "none";
        expired: "expired";
        running_out: "running_out";
    }>>;
    trial_limit_type: z.ZodOptional<z.ZodEnum<{
        time: "time";
        usage: "usage";
    }>>;
    progress_percent: z.ZodOptional<z.ZodNumber>;
    day_number: z.ZodOptional<z.ZodNumber>;
    days_remaining: z.ZodOptional<z.ZodNumber>;
    usage_entitlement_handle: z.ZodOptional<z.ZodString>;
    usage_consumed: z.ZodOptional<z.ZodNumber>;
    usage_remaining: z.ZodOptional<z.ZodNumber>;
    usage_limit: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
/** One current purchased holding; quantities are aggregates, not purchase events. */
declare const PurchasedAddonSchema$1: z.ZodObject<{
    addon_handle: z.ZodString;
    addon_variation_handle: z.ZodOptional<z.ZodString>;
    quantity: z.ZodNumber;
}, z.core.$strip>;
/** Reject duplicate or overlapping aggregate/variation quantities at admission. */
declare const PurchasedAddonsSchema: z.ZodArray<z.ZodObject<{
    addon_handle: z.ZodString;
    addon_variation_handle: z.ZodOptional<z.ZodString>;
    quantity: z.ZodNumber;
}, z.core.$strip>>;
/** A single usage entry derived from a credits / usage_limit entitlement. */
declare const UserUsageEntrySchema: z.ZodObject<{
    entitlement_handle: z.ZodString;
    unit: z.ZodString;
    amount: z.ZodNumber;
    limit: z.ZodOptional<z.ZodNumber>;
    reset_date: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/**
 * Activity level derived from the persisted `activity_score` at context
 * retrieval (plan 180 D5): tenant thresholds bucket the score; `new` = no
 * score ever computed; `inactive` = score 0 (or below the low cut point).
 * NEVER persisted — stamped onto retrieval traits (`traits.activity_level`).
 * `active` remains a matchable targeting value as the union of
 * high|medium|low (D1) via `activityLevelSatisfies`.
 */
declare const ActivityLevelSchema: z.ZodEnum<{
    new: "new";
    high: "high";
    medium: "medium";
    low: "low";
    inactive: "inactive";
}>;
/**
 * Plan context for the identified user (plan 191 Q-1 amendment): `handle` is
 * the plan's `unique_handle` — the same matching identity as the flat
 * top-level `plan_handle` — renamed from `id`, which in practice was always
 * populated with the handle anyway. There is no `id` in plan context.
 */
declare const UserPlanContextSchema: z.ZodObject<{
    handle: z.ZodString;
    name: z.ZodString;
    price: z.ZodOptional<z.ZodString>;
    billing_period: z.ZodOptional<z.ZodEnum<{
        monthly: "monthly";
        annual: "annual";
        none: "none";
    }>>;
}, z.core.$strip>;
/**
 * Server-evaluated built-in segment dimension values for the user (plan 279
 * PD-3). `buildTargetingState` stamps each present, in-vocabulary leaf onto
 * the reserved `rt_<dimension>` segment trait; nothing else may set an `rt_*`
 * trait (PD-1). An ABSENT leaf means "not evaluated" and stamps nothing, so
 * every built-in of that dimension fails closed (PD-4, unknown is absence);
 * when the control plane evaluated a dimension and found no classification it
 * delivers the dimension's explicit fallback value instead.
 *
 * Assembled at retrieval — never persisted as a blob; the sources keep their
 * own columns.
 */
declare const UserBuiltinDimensionsSchema: z.ZodObject<{
    activity_level: z.ZodOptional<z.ZodEnum<{
        new: "new";
        high: "high";
        medium: "medium";
        low: "low";
        inactive: "inactive";
    }>>;
    subscription_state: z.ZodOptional<z.ZodEnum<{
        trial: "trial";
        none: "none";
        paid: "paid";
        cancelled: "cancelled";
    }>>;
    trial_type: z.ZodOptional<z.ZodEnum<{
        none: "none";
        free_trial: "free_trial";
        reverse_trial: "reverse_trial";
    }>>;
    seat_type: z.ZodOptional<z.ZodString>;
    buyer_role: z.ZodOptional<z.ZodEnum<{
        buyer: "buyer";
        non_buyer: "non_buyer";
    }>>;
    email_type: z.ZodOptional<z.ZodEnum<{
        unknown: "unknown";
        business: "business";
        personal: "personal";
    }>>;
    billing_health: z.ZodOptional<z.ZodEnum<{
        payment_failed: "payment_failed";
        payment_method_missing: "payment_method_missing";
        cancelled: "cancelled";
        no_billing: "no_billing";
        good_standing: "good_standing";
        trial_payment_method_attached: "trial_payment_method_attached";
        payment_overdue: "payment_overdue";
    }>>;
    region: z.ZodOptional<z.ZodEnum<{
        us_canada: "us_canada";
        europe: "europe";
        rest_of_world: "rest_of_world";
    }>>;
    device_type: z.ZodOptional<z.ZodEnum<{
        unknown: "unknown";
        desktop: "desktop";
        mobile: "mobile";
        tablet: "tablet";
    }>>;
}, z.core.$strip>;
/**
 * The built-in dimensions the tenant's backend may set through the server-key
 * upsert (BL-0382, D-46): every delivered catalogue key except `seat_type`,
 * which keeps its own validated write (`seat_type_handle`, D-36) so one value
 * never has two write paths. Registration State is SDK-local and absent here
 * as it is from {@link UserBuiltinDimensionsSchema}.
 */
declare const CUSTOMER_SETTABLE_BUILTIN_DIMENSION_KEYS: readonly ["activity_level", "subscription_state", "trial_type", "buyer_role", "email_type", "billing_health", "region", "device_type"];
/** One key of {@link CUSTOMER_SETTABLE_BUILTIN_DIMENSION_KEYS}. */
declare const CustomerSettableBuiltinDimensionKeySchema: z.ZodEnum<{
    trial_type: "trial_type";
    activity_level: "activity_level";
    subscription_state: "subscription_state";
    buyer_role: "buyer_role";
    email_type: "email_type";
    billing_health: "billing_health";
    region: "region";
    device_type: "device_type";
}>;
type CustomerSettableBuiltinDimensionKey = z.infer<typeof CustomerSettableBuiltinDimensionKeySchema>;
/**
 * The customer-set built-in dimension values of one user, keyed by dimension
 * (BL-0382; D-46, D-47) — persisted as the `user_contexts.customer_builtin_dimensions`
 * jsonb column. Written ONLY by the server-key upsert
 * (`upsertServerUserContext`); the generic CRUD write drops it for every
 * writer that is not a dashboard session, exactly like `seat_type_handle`.
 *
 * It is an INPUT to delivery, not the delivered value: the control plane
 * resolves `builtin_dimensions` per key as
 *  - `override: true` → the customer value wins over enrichment;
 *  - `override: false` → last writer wins between this value (`set_at`) and
 *    the RevTurbine enrichment source's own timestamp; enrichment with no
 *    datable source change never supersedes it.
 * An absent key means the customer never set (or cleared) that dimension.
 */
declare const CustomerBuiltinDimensionsSchema: z.ZodObject<{
    activity_level: z.ZodOptional<z.ZodObject<{
        value: z.ZodEnum<{
            new: "new";
            high: "high";
            medium: "medium";
            low: "low";
            inactive: "inactive";
        }>;
        set_at: z.ZodString;
        override: z.ZodBoolean;
    }, z.core.$strict>>;
    subscription_state: z.ZodOptional<z.ZodObject<{
        value: z.ZodEnum<{
            trial: "trial";
            none: "none";
            paid: "paid";
            cancelled: "cancelled";
        }>;
        set_at: z.ZodString;
        override: z.ZodBoolean;
    }, z.core.$strict>>;
    trial_type: z.ZodOptional<z.ZodObject<{
        value: z.ZodEnum<{
            none: "none";
            free_trial: "free_trial";
            reverse_trial: "reverse_trial";
        }>;
        set_at: z.ZodString;
        override: z.ZodBoolean;
    }, z.core.$strict>>;
    buyer_role: z.ZodOptional<z.ZodObject<{
        value: z.ZodEnum<{
            buyer: "buyer";
            non_buyer: "non_buyer";
        }>;
        set_at: z.ZodString;
        override: z.ZodBoolean;
    }, z.core.$strict>>;
    email_type: z.ZodOptional<z.ZodObject<{
        value: z.ZodEnum<{
            unknown: "unknown";
            business: "business";
            personal: "personal";
        }>;
        set_at: z.ZodString;
        override: z.ZodBoolean;
    }, z.core.$strict>>;
    billing_health: z.ZodOptional<z.ZodObject<{
        value: z.ZodEnum<{
            payment_failed: "payment_failed";
            payment_method_missing: "payment_method_missing";
            cancelled: "cancelled";
            no_billing: "no_billing";
            good_standing: "good_standing";
            trial_payment_method_attached: "trial_payment_method_attached";
            payment_overdue: "payment_overdue";
        }>;
        set_at: z.ZodString;
        override: z.ZodBoolean;
    }, z.core.$strict>>;
    region: z.ZodOptional<z.ZodObject<{
        value: z.ZodEnum<{
            us_canada: "us_canada";
            europe: "europe";
            rest_of_world: "rest_of_world";
        }>;
        set_at: z.ZodString;
        override: z.ZodBoolean;
    }, z.core.$strict>>;
    device_type: z.ZodOptional<z.ZodObject<{
        value: z.ZodEnum<{
            unknown: "unknown";
            desktop: "desktop";
            mobile: "mobile";
            tablet: "tablet";
        }>;
        set_at: z.ZodString;
        override: z.ZodBoolean;
    }, z.core.$strict>>;
}, z.core.$strict>;
/**
 * The `builtin_dimensions` of a server-key upsert body (BL-0382): a partial map
 * of settable key → a value from that dimension's closed vocabulary, or `null`
 * to CLEAR the customer value (and its pin) for that key. Strict: `seat_type`
 * and unknown keys are rejected.
 */
declare const ServerBuiltinDimensionsWriteSchema: z.ZodObject<{
    activity_level: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
        new: "new";
        high: "high";
        medium: "medium";
        low: "low";
        inactive: "inactive";
    }>>>;
    subscription_state: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
        trial: "trial";
        none: "none";
        paid: "paid";
        cancelled: "cancelled";
    }>>>;
    trial_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
        none: "none";
        free_trial: "free_trial";
        reverse_trial: "reverse_trial";
    }>>>;
    buyer_role: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
        buyer: "buyer";
        non_buyer: "non_buyer";
    }>>>;
    email_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
        unknown: "unknown";
        business: "business";
        personal: "personal";
    }>>>;
    billing_health: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
        payment_failed: "payment_failed";
        payment_method_missing: "payment_method_missing";
        cancelled: "cancelled";
        no_billing: "no_billing";
        good_standing: "good_standing";
        trial_payment_method_attached: "trial_payment_method_attached";
        payment_overdue: "payment_overdue";
    }>>>;
    region: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
        us_canada: "us_canada";
        europe: "europe";
        rest_of_world: "rest_of_world";
    }>>>;
    device_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
        unknown: "unknown";
        desktop: "desktop";
        mobile: "mobile";
        tablet: "tablet";
    }>>>;
}, z.core.$strict>;
/**
 * Usage and entitlements for a specific product instance.
 *
 * When a user has access to multiple product instances within an account,
 * each instance carries its own usage balances and entitlement state.
 */
declare const UserInstanceContextSchema: z.ZodObject<{
    product_instance_id: z.ZodString;
    user_id: z.ZodString;
    plan: z.ZodOptional<z.ZodObject<{
        handle: z.ZodString;
        name: z.ZodString;
        price: z.ZodOptional<z.ZodString>;
        billing_period: z.ZodOptional<z.ZodEnum<{
            monthly: "monthly";
            annual: "annual";
            none: "none";
        }>>;
    }, z.core.$strip>>;
    usage: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
        entitlement_handle: z.ZodString;
        unit: z.ZodString;
        amount: z.ZodNumber;
        limit: z.ZodOptional<z.ZodNumber>;
        reset_date: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    trial: z.ZodOptional<z.ZodObject<{
        in_trial: z.ZodBoolean;
        instance_id: z.ZodOptional<z.ZodString>;
        started_at: z.ZodOptional<z.ZodString>;
        trial_type: z.ZodOptional<z.ZodString>;
        plan_handle: z.ZodOptional<z.ZodString>;
        state: z.ZodOptional<z.ZodEnum<{
            converted: "converted";
            active: "active";
            none: "none";
            expired: "expired";
            running_out: "running_out";
        }>>;
        trial_limit_type: z.ZodOptional<z.ZodEnum<{
            time: "time";
            usage: "usage";
        }>>;
        progress_percent: z.ZodOptional<z.ZodNumber>;
        day_number: z.ZodOptional<z.ZodNumber>;
        days_remaining: z.ZodOptional<z.ZodNumber>;
        usage_entitlement_handle: z.ZodOptional<z.ZodString>;
        usage_consumed: z.ZodOptional<z.ZodNumber>;
        usage_remaining: z.ZodOptional<z.ZodNumber>;
        usage_limit: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
    entitlements: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
        entitlement_id: z.ZodString;
        entitlement_handle: z.ZodString;
        status: z.ZodEnum<{
            allowed: "allowed";
            limited: "limited";
            denied: "denied";
        }>;
        limit: z.ZodOptional<z.ZodNumber>;
        used: z.ZodOptional<z.ZodNumber>;
        allocation: z.ZodOptional<z.ZodEnum<{
            per_instance: "per_instance";
            account_pool: "account_pool";
            per_user: "per_user";
            per_user_pooled: "per_user_pooled";
        }>>;
        enforcement: z.ZodOptional<z.ZodEnum<{
            hard_block: "hard_block";
            block_with_upsell: "block_with_upsell";
            degrade: "degrade";
            allow_overage: "allow_overage";
        }>>;
        source: z.ZodOptional<z.ZodEnum<{
            override: "override";
            rule: "rule";
            user_context: "user_context";
        }>>;
        plan_id: z.ZodOptional<z.ZodString>;
        segment_id: z.ZodOptional<z.ZodString>;
        seat_type_id: z.ZodOptional<z.ZodString>;
        rule_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>]>>>;
}, z.core.$strip>;
/**
 * Aggregate user context across all product instances.
 *
 * Top-level `plan`, `usage`, `entitlements`, and `trial` represent the
 * account-level aggregate view.  The optional `instances` array holds
 * per-instance breakdowns when the account has multiple product instances.
 */
declare const UserContextSchema: z.ZodObject<{
    id: z.ZodString;
    tenant_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    user_id: z.ZodString;
    account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    provisional: z.ZodOptional<z.ZodBoolean>;
    merged_into: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    retired_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    email_type: z.ZodOptional<z.ZodString>;
    plan_handle: z.ZodOptional<z.ZodString>;
    seat_type_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    plan: z.ZodOptional<z.ZodObject<{
        handle: z.ZodString;
        name: z.ZodString;
        price: z.ZodOptional<z.ZodString>;
        billing_period: z.ZodOptional<z.ZodEnum<{
            monthly: "monthly";
            annual: "annual";
            none: "none";
        }>>;
    }, z.core.$strip>>;
    addons: z.ZodOptional<z.ZodArray<z.ZodObject<{
        addon_handle: z.ZodString;
        addon_variation_handle: z.ZodOptional<z.ZodString>;
        quantity: z.ZodNumber;
    }, z.core.$strip>>>;
    usage: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
        entitlement_handle: z.ZodString;
        unit: z.ZodString;
        amount: z.ZodNumber;
        limit: z.ZodOptional<z.ZodNumber>;
        reset_date: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    trial: z.ZodOptional<z.ZodObject<{
        in_trial: z.ZodBoolean;
        instance_id: z.ZodOptional<z.ZodString>;
        started_at: z.ZodOptional<z.ZodString>;
        trial_type: z.ZodOptional<z.ZodString>;
        plan_handle: z.ZodOptional<z.ZodString>;
        state: z.ZodOptional<z.ZodEnum<{
            converted: "converted";
            active: "active";
            none: "none";
            expired: "expired";
            running_out: "running_out";
        }>>;
        trial_limit_type: z.ZodOptional<z.ZodEnum<{
            time: "time";
            usage: "usage";
        }>>;
        progress_percent: z.ZodOptional<z.ZodNumber>;
        day_number: z.ZodOptional<z.ZodNumber>;
        days_remaining: z.ZodOptional<z.ZodNumber>;
        usage_entitlement_handle: z.ZodOptional<z.ZodString>;
        usage_consumed: z.ZodOptional<z.ZodNumber>;
        usage_remaining: z.ZodOptional<z.ZodNumber>;
        usage_limit: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
    payment_failed: z.ZodOptional<z.ZodBoolean>;
    payment_at_risk: z.ZodOptional<z.ZodBoolean>;
    tiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    entitlements: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
        entitlement_id: z.ZodString;
        entitlement_handle: z.ZodString;
        status: z.ZodEnum<{
            allowed: "allowed";
            limited: "limited";
            denied: "denied";
        }>;
        limit: z.ZodOptional<z.ZodNumber>;
        used: z.ZodOptional<z.ZodNumber>;
        allocation: z.ZodOptional<z.ZodEnum<{
            per_instance: "per_instance";
            account_pool: "account_pool";
            per_user: "per_user";
            per_user_pooled: "per_user_pooled";
        }>>;
        enforcement: z.ZodOptional<z.ZodEnum<{
            hard_block: "hard_block";
            block_with_upsell: "block_with_upsell";
            degrade: "degrade";
            allow_overage: "allow_overage";
        }>>;
        source: z.ZodOptional<z.ZodEnum<{
            override: "override";
            rule: "rule";
            user_context: "user_context";
        }>>;
        plan_id: z.ZodOptional<z.ZodString>;
        segment_id: z.ZodOptional<z.ZodString>;
        seat_type_id: z.ZodOptional<z.ZodString>;
        rule_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>]>>>;
    instances: z.ZodOptional<z.ZodArray<z.ZodObject<{
        product_instance_id: z.ZodString;
        user_id: z.ZodString;
        plan: z.ZodOptional<z.ZodObject<{
            handle: z.ZodString;
            name: z.ZodString;
            price: z.ZodOptional<z.ZodString>;
            billing_period: z.ZodOptional<z.ZodEnum<{
                monthly: "monthly";
                annual: "annual";
                none: "none";
            }>>;
        }, z.core.$strip>>;
        usage: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
            entitlement_handle: z.ZodString;
            unit: z.ZodString;
            amount: z.ZodNumber;
            limit: z.ZodOptional<z.ZodNumber>;
            reset_date: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
        trial: z.ZodOptional<z.ZodObject<{
            in_trial: z.ZodBoolean;
            instance_id: z.ZodOptional<z.ZodString>;
            started_at: z.ZodOptional<z.ZodString>;
            trial_type: z.ZodOptional<z.ZodString>;
            plan_handle: z.ZodOptional<z.ZodString>;
            state: z.ZodOptional<z.ZodEnum<{
                converted: "converted";
                active: "active";
                none: "none";
                expired: "expired";
                running_out: "running_out";
            }>>;
            trial_limit_type: z.ZodOptional<z.ZodEnum<{
                time: "time";
                usage: "usage";
            }>>;
            progress_percent: z.ZodOptional<z.ZodNumber>;
            day_number: z.ZodOptional<z.ZodNumber>;
            days_remaining: z.ZodOptional<z.ZodNumber>;
            usage_entitlement_handle: z.ZodOptional<z.ZodString>;
            usage_consumed: z.ZodOptional<z.ZodNumber>;
            usage_remaining: z.ZodOptional<z.ZodNumber>;
            usage_limit: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>;
        entitlements: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
            entitlement_id: z.ZodString;
            entitlement_handle: z.ZodString;
            status: z.ZodEnum<{
                allowed: "allowed";
                limited: "limited";
                denied: "denied";
            }>;
            limit: z.ZodOptional<z.ZodNumber>;
            used: z.ZodOptional<z.ZodNumber>;
            allocation: z.ZodOptional<z.ZodEnum<{
                per_instance: "per_instance";
                account_pool: "account_pool";
                per_user: "per_user";
                per_user_pooled: "per_user_pooled";
            }>>;
            enforcement: z.ZodOptional<z.ZodEnum<{
                hard_block: "hard_block";
                block_with_upsell: "block_with_upsell";
                degrade: "degrade";
                allow_overage: "allow_overage";
            }>>;
            source: z.ZodOptional<z.ZodEnum<{
                override: "override";
                rule: "rule";
                user_context: "user_context";
            }>>;
            plan_id: z.ZodOptional<z.ZodString>;
            segment_id: z.ZodOptional<z.ZodString>;
            seat_type_id: z.ZodOptional<z.ZodString>;
            rule_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>]>>>;
    }, z.core.$strip>>>;
    custom: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
    personalization: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
    builtin_dimensions: z.ZodOptional<z.ZodObject<{
        activity_level: z.ZodOptional<z.ZodEnum<{
            new: "new";
            high: "high";
            medium: "medium";
            low: "low";
            inactive: "inactive";
        }>>;
        subscription_state: z.ZodOptional<z.ZodEnum<{
            trial: "trial";
            none: "none";
            paid: "paid";
            cancelled: "cancelled";
        }>>;
        trial_type: z.ZodOptional<z.ZodEnum<{
            none: "none";
            free_trial: "free_trial";
            reverse_trial: "reverse_trial";
        }>>;
        seat_type: z.ZodOptional<z.ZodString>;
        buyer_role: z.ZodOptional<z.ZodEnum<{
            buyer: "buyer";
            non_buyer: "non_buyer";
        }>>;
        email_type: z.ZodOptional<z.ZodEnum<{
            unknown: "unknown";
            business: "business";
            personal: "personal";
        }>>;
        billing_health: z.ZodOptional<z.ZodEnum<{
            payment_failed: "payment_failed";
            payment_method_missing: "payment_method_missing";
            cancelled: "cancelled";
            no_billing: "no_billing";
            good_standing: "good_standing";
            trial_payment_method_attached: "trial_payment_method_attached";
            payment_overdue: "payment_overdue";
        }>>;
        region: z.ZodOptional<z.ZodEnum<{
            us_canada: "us_canada";
            europe: "europe";
            rest_of_world: "rest_of_world";
        }>>;
        device_type: z.ZodOptional<z.ZodEnum<{
            unknown: "unknown";
            desktop: "desktop";
            mobile: "mobile";
            tablet: "tablet";
        }>>;
    }, z.core.$strip>>;
    customer_builtin_dimensions: z.ZodOptional<z.ZodNullable<z.ZodObject<{
        activity_level: z.ZodOptional<z.ZodObject<{
            value: z.ZodEnum<{
                new: "new";
                high: "high";
                medium: "medium";
                low: "low";
                inactive: "inactive";
            }>;
            set_at: z.ZodString;
            override: z.ZodBoolean;
        }, z.core.$strict>>;
        subscription_state: z.ZodOptional<z.ZodObject<{
            value: z.ZodEnum<{
                trial: "trial";
                none: "none";
                paid: "paid";
                cancelled: "cancelled";
            }>;
            set_at: z.ZodString;
            override: z.ZodBoolean;
        }, z.core.$strict>>;
        trial_type: z.ZodOptional<z.ZodObject<{
            value: z.ZodEnum<{
                none: "none";
                free_trial: "free_trial";
                reverse_trial: "reverse_trial";
            }>;
            set_at: z.ZodString;
            override: z.ZodBoolean;
        }, z.core.$strict>>;
        buyer_role: z.ZodOptional<z.ZodObject<{
            value: z.ZodEnum<{
                buyer: "buyer";
                non_buyer: "non_buyer";
            }>;
            set_at: z.ZodString;
            override: z.ZodBoolean;
        }, z.core.$strict>>;
        email_type: z.ZodOptional<z.ZodObject<{
            value: z.ZodEnum<{
                unknown: "unknown";
                business: "business";
                personal: "personal";
            }>;
            set_at: z.ZodString;
            override: z.ZodBoolean;
        }, z.core.$strict>>;
        billing_health: z.ZodOptional<z.ZodObject<{
            value: z.ZodEnum<{
                payment_failed: "payment_failed";
                payment_method_missing: "payment_method_missing";
                cancelled: "cancelled";
                no_billing: "no_billing";
                good_standing: "good_standing";
                trial_payment_method_attached: "trial_payment_method_attached";
                payment_overdue: "payment_overdue";
            }>;
            set_at: z.ZodString;
            override: z.ZodBoolean;
        }, z.core.$strict>>;
        region: z.ZodOptional<z.ZodObject<{
            value: z.ZodEnum<{
                us_canada: "us_canada";
                europe: "europe";
                rest_of_world: "rest_of_world";
            }>;
            set_at: z.ZodString;
            override: z.ZodBoolean;
        }, z.core.$strict>>;
        device_type: z.ZodOptional<z.ZodObject<{
            value: z.ZodEnum<{
                unknown: "unknown";
                desktop: "desktop";
                mobile: "mobile";
                tablet: "tablet";
            }>;
            set_at: z.ZodString;
            override: z.ZodBoolean;
        }, z.core.$strict>>;
    }, z.core.$strict>>>;
    derived_config_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    context_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    derived_computed_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    activity_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    activity_score_computed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    experiments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>;
/**
 * Request body of `upsertServerUserContext` (`POST /api/sdk/user-contexts`):
 * the tenant backend's server-side write for one user — its seat assignment
 * and/or its built-in segment dimension values. The ONE server-key
 * user-context write (BL-0382 widened it rather than adding a sibling op).
 *
 * Deliberately NARROW and STRICT (plan 279 Q-2 (e)). The generic
 * `createUserContext` write accepts the whole writable {@link UserContextSchema}
 * — entitlement cache, `activity_score`, derived stamps — and stays
 * `exposure: 'internal'`; this is the only external user-context write, and it
 * carries exactly `user_id`, `seat_type_handle`, `builtin_dimensions` and
 * `override`. Every other key is rejected, so a tenant can never write
 * `entitlements`, `activity_score`, `custom` or a tenant id through a server key.
 *
 * - `seat_type_handle` (D-36): a handle assigns, `null` clears, OMITTED leaves
 *   the assignment unchanged. The shape check here is the handle pattern only;
 *   the control plane validates membership in the token tenant's CURRENT seat
 *   types and answers 422 for an unknown handle (D-36 (c)).
 * - `builtin_dimensions` (D-46): a partial map of settable built-in dimension
 *   (every delivered catalogue key except `seat_type`, which is
 *   `seat_type_handle`) → a value from its closed vocabulary; `null` clears the
 *   customer value and its pin for that key. Keys not named are untouched.
 *   The control plane re-checks every value against the catalogue (422).
 * - `override` (D-47; default `false`) applies to the keys this call writes in
 *   `builtin_dimensions`:
 *     - `false` — an UPDATE. The value is delivered until a newer RevTurbine
 *       enrichment change (Stripe subscription / trial / billing, the activity
 *       job, request signals) supersedes it: last writer wins, enrichment
 *       included. Writing a pinned key without the flag UNPINS it.
 *     - `true` — an OVERRIDE. The customer pins the value: enrichment never
 *       replaces it until the customer writes that key again without the flag,
 *       or clears it with `null`.
 *   `override` without `builtin_dimensions` is rejected.
 *
 * At least one of `seat_type_handle` / a non-empty `builtin_dimensions` must be
 * present: an empty write is neither an assignment nor an update. There is no
 * `tenant_id`: the tenant comes from the server token (D-27).
 */
declare const ServerUserContextUpsertSchema: z.ZodObject<{
    user_id: z.ZodString;
    seat_type_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    builtin_dimensions: z.ZodOptional<z.ZodObject<{
        activity_level: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
            new: "new";
            high: "high";
            medium: "medium";
            low: "low";
            inactive: "inactive";
        }>>>;
        subscription_state: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
            trial: "trial";
            none: "none";
            paid: "paid";
            cancelled: "cancelled";
        }>>>;
        trial_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
            none: "none";
            free_trial: "free_trial";
            reverse_trial: "reverse_trial";
        }>>>;
        buyer_role: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
            buyer: "buyer";
            non_buyer: "non_buyer";
        }>>>;
        email_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
            unknown: "unknown";
            business: "business";
            personal: "personal";
        }>>>;
        billing_health: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
            payment_failed: "payment_failed";
            payment_method_missing: "payment_method_missing";
            cancelled: "cancelled";
            no_billing: "no_billing";
            good_standing: "good_standing";
            trial_payment_method_attached: "trial_payment_method_attached";
            payment_overdue: "payment_overdue";
        }>>>;
        region: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
            us_canada: "us_canada";
            europe: "europe";
            rest_of_world: "rest_of_world";
        }>>>;
        device_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
            unknown: "unknown";
            desktop: "desktop";
            mobile: "mobile";
            tablet: "tablet";
        }>>>;
    }, z.core.$strict>>;
    override: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strict>;
/**
 * Response of `upsertServerUserContext`: the user's server-written state as
 * stored after the upsert. `tenant_id` is the tenant the server token resolved
 * to (never a request value).
 *
 * - `seat_type_handle` — always present, `null` when the user has no assignment.
 * - `builtin_dimensions` — every customer-set dimension value currently stored
 *   (`{}` when none). These are the customer's INPUTS, not the delivered
 *   values: delivery applies the D-47 precedence against enrichment.
 * - `overrides` — the keys of `builtin_dimensions` currently pinned
 *   (`override: true`), sorted; `[]` when none.
 *
 * The generic context (entitlement cache, activity score, derived stamps) is
 * not echoed back.
 */
declare const ServerUserContextAssignmentSchema: z.ZodObject<{
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    user_id: z.ZodString;
    seat_type_handle: z.ZodNullable<z.ZodString>;
    builtin_dimensions: z.ZodObject<{
        activity_level: z.ZodOptional<z.ZodEnum<{
            new: "new";
            high: "high";
            medium: "medium";
            low: "low";
            inactive: "inactive";
        }>>;
        subscription_state: z.ZodOptional<z.ZodEnum<{
            trial: "trial";
            none: "none";
            paid: "paid";
            cancelled: "cancelled";
        }>>;
        trial_type: z.ZodOptional<z.ZodEnum<{
            none: "none";
            free_trial: "free_trial";
            reverse_trial: "reverse_trial";
        }>>;
        buyer_role: z.ZodOptional<z.ZodEnum<{
            buyer: "buyer";
            non_buyer: "non_buyer";
        }>>;
        email_type: z.ZodOptional<z.ZodEnum<{
            unknown: "unknown";
            business: "business";
            personal: "personal";
        }>>;
        billing_health: z.ZodOptional<z.ZodEnum<{
            payment_failed: "payment_failed";
            payment_method_missing: "payment_method_missing";
            cancelled: "cancelled";
            no_billing: "no_billing";
            good_standing: "good_standing";
            trial_payment_method_attached: "trial_payment_method_attached";
            payment_overdue: "payment_overdue";
        }>>;
        region: z.ZodOptional<z.ZodEnum<{
            us_canada: "us_canada";
            europe: "europe";
            rest_of_world: "rest_of_world";
        }>>;
        device_type: z.ZodOptional<z.ZodEnum<{
            unknown: "unknown";
            desktop: "desktop";
            mobile: "mobile";
            tablet: "tablet";
        }>>;
    }, z.core.$strip>;
    overrides: z.ZodArray<z.ZodEnum<{
        trial_type: "trial_type";
        activity_level: "activity_level";
        subscription_state: "subscription_state";
        buyer_role: "buyer_role";
        email_type: "email_type";
        billing_health: "billing_health";
        region: "region";
        device_type: "device_type";
    }>>;
}, z.core.$strip>;
/**
 * Response of `getServerUserBuiltinDimensions`
 * (`GET /api/sdk/user-contexts/{userId}/builtin-dimensions`): the control
 * plane's server-resolved built-in segment dimensions for one user of the
 * token tenant (BL-0366 — the server-port counterpart of the client-context
 * lane).
 *
 * `builtin_dimensions` is the SERVER view, {@link UserBuiltinDimensionsSchema}
 * — the same keys and closed vocabularies the SDK's `buildTargetingState`
 * stamps onto `rt_*` traits. It is not the client-safe projection: the caller
 * is the tenant's own backend holding a server key. Every leaf is coarse
 * enum data today (no email, IP, country code, provider id), so the two
 * shapes carry the same values; the server view is simply not re-filtered.
 * An absent leaf means "not evaluated" (PD-4). The read carries no request
 * signals, so `region` and `device_type` — derived from the browser request
 * in the client lane — are always absent here.
 *
 * The SDK applies this object as an OVERLAY that wins over any app-set
 * `builtin_dimensions` leaf (PD-3). `tenant_id` is the tenant the server
 * token resolved to (D-27), never a request value; `resolved_at` is when the
 * control plane assembled the values (nothing is persisted or cached).
 */
declare const ServerUserBuiltinDimensionsSchema: z.ZodObject<{
    tenant_id: z.ZodString;
    user_id: z.ZodString;
    builtin_dimensions: z.ZodObject<{
        activity_level: z.ZodOptional<z.ZodEnum<{
            new: "new";
            high: "high";
            medium: "medium";
            low: "low";
            inactive: "inactive";
        }>>;
        subscription_state: z.ZodOptional<z.ZodEnum<{
            trial: "trial";
            none: "none";
            paid: "paid";
            cancelled: "cancelled";
        }>>;
        trial_type: z.ZodOptional<z.ZodEnum<{
            none: "none";
            free_trial: "free_trial";
            reverse_trial: "reverse_trial";
        }>>;
        seat_type: z.ZodOptional<z.ZodString>;
        buyer_role: z.ZodOptional<z.ZodEnum<{
            buyer: "buyer";
            non_buyer: "non_buyer";
        }>>;
        email_type: z.ZodOptional<z.ZodEnum<{
            unknown: "unknown";
            business: "business";
            personal: "personal";
        }>>;
        billing_health: z.ZodOptional<z.ZodEnum<{
            payment_failed: "payment_failed";
            payment_method_missing: "payment_method_missing";
            cancelled: "cancelled";
            no_billing: "no_billing";
            good_standing: "good_standing";
            trial_payment_method_attached: "trial_payment_method_attached";
            payment_overdue: "payment_overdue";
        }>>;
        region: z.ZodOptional<z.ZodEnum<{
            us_canada: "us_canada";
            europe: "europe";
            rest_of_world: "rest_of_world";
        }>>;
        device_type: z.ZodOptional<z.ZodEnum<{
            unknown: "unknown";
            desktop: "desktop";
            mobile: "mobile";
            tablet: "tablet";
        }>>;
    }, z.core.$strip>;
    resolved_at: z.ZodString;
}, z.core.$strip>;
declare const ClientContextSchema: z.ZodObject<{
    subject: z.ZodString;
    context_version: z.ZodOptional<z.ZodString>;
    trial: z.ZodOptional<z.ZodObject<{
        instance_id: z.ZodOptional<z.ZodString>;
        started_at: z.ZodOptional<z.ZodString>;
        status: z.ZodEnum<{
            converted: "converted";
            active: "active";
            none: "none";
            expired: "expired";
            running_out: "running_out";
        }>;
        days_remaining: z.ZodOptional<z.ZodNumber>;
        ends_at: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    billing: z.ZodOptional<z.ZodObject<{
        health: z.ZodOptional<z.ZodEnum<{
            ok: "ok";
            attention_required: "attention_required";
        }>>;
        failed_payment_reason: z.ZodOptional<z.ZodString>;
        issues: z.ZodOptional<z.ZodArray<z.ZodEnum<{
            payment_failed: "payment_failed";
            payment_method_missing: "payment_method_missing";
        }>>>;
        provider_subscription_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    plan: z.ZodOptional<z.ZodObject<{
        handle: z.ZodOptional<z.ZodString>;
        name: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    addons: z.ZodOptional<z.ZodArray<z.ZodObject<{
        addon_handle: z.ZodString;
        addon_variation_handle: z.ZodOptional<z.ZodString>;
        quantity: z.ZodNumber;
    }, z.core.$strip>>>;
    capabilities: z.ZodOptional<z.ZodObject<{
        can_upgrade: z.ZodOptional<z.ZodBoolean>;
        can_manage_billing: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strip>>;
    builtin_dimensions: z.ZodOptional<z.ZodObject<{
        activity_level: z.ZodOptional<z.ZodEnum<{
            new: "new";
            high: "high";
            medium: "medium";
            low: "low";
            inactive: "inactive";
        }>>;
        subscription_state: z.ZodOptional<z.ZodEnum<{
            trial: "trial";
            none: "none";
            paid: "paid";
            cancelled: "cancelled";
        }>>;
        trial_type: z.ZodOptional<z.ZodEnum<{
            none: "none";
            free_trial: "free_trial";
            reverse_trial: "reverse_trial";
        }>>;
        seat_type: z.ZodOptional<z.ZodString>;
        buyer_role: z.ZodOptional<z.ZodEnum<{
            buyer: "buyer";
            non_buyer: "non_buyer";
        }>>;
        email_type: z.ZodOptional<z.ZodEnum<{
            unknown: "unknown";
            business: "business";
            personal: "personal";
        }>>;
        billing_health: z.ZodOptional<z.ZodEnum<{
            payment_failed: "payment_failed";
            payment_method_missing: "payment_method_missing";
            cancelled: "cancelled";
            no_billing: "no_billing";
            good_standing: "good_standing";
            trial_payment_method_attached: "trial_payment_method_attached";
            payment_overdue: "payment_overdue";
        }>>;
        region: z.ZodOptional<z.ZodEnum<{
            us_canada: "us_canada";
            europe: "europe";
            rest_of_world: "rest_of_world";
        }>>;
        device_type: z.ZodOptional<z.ZodEnum<{
            unknown: "unknown";
            desktop: "desktop";
            mobile: "mobile";
            tablet: "tablet";
        }>>;
    }, z.core.$strip>>;
}, z.core.$strip>;
declare const userContextPaths: ZodOpenApiPathsObject;

/**
 * Customer schemas — Zod definitions for customers, identities, and overrides.
 */

declare const IdentitySchema: z.ZodObject<{
    external_id: z.ZodString;
    traits: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    plan_id: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/**
 * A discrete billing-health problem on a customer (plan 156). An array of these
 * (empty = healthy) captures multiple concurrent issues and is extensible —
 * new statuses need no new column. Written by the Stripe webhook handlers;
 * the coarse `billing.health` the SDK sees (plan 157) is derived from whether
 * this array is non-empty, and the raw array is `decision_only` (never returned
 * to the browser).
 */
declare const BillingHealthStatusSchema: z.ZodEnum<{
    payment_failed: "payment_failed";
    payment_method_missing: "payment_method_missing";
}>;
declare const CustomerSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    external_id: z.ZodString;
    identity: z.ZodObject<{
        external_id: z.ZodString;
        traits: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        plan_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>;
    stripe_customer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    current_plan_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    subscription_status: z.ZodDefault<z.ZodEnum<{
        active: "active";
        none: "none";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
    }>>;
    status: z.ZodDefault<z.ZodEnum<{
        active: "active";
        trial: "trial";
        churned: "churned";
        suspended: "suspended";
    }>>;
    billing_health_issues: z.ZodDefault<z.ZodArray<z.ZodEnum<{
        payment_failed: "payment_failed";
        payment_method_missing: "payment_method_missing";
    }>>>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    provisional: z.ZodDefault<z.ZodBoolean>;
    merged_into: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    retired_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
/**
 * What the dashboard reads for a customer (BUG-563): the 200 response of
 * `listCustomers` / `getCustomer`. A read projection of `Customer` (declared by
 * `persistence.rowSchema: 'Customer'` on those operations) — every field is a
 * `Customer` field that is not `ServerOnly`, plus the derived `stripe_linked`.
 * `identity`, `metadata` and `stripe_customer_id` are never returned.
 */
declare const CustomerSummarySchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    status: z.ZodDefault<z.ZodEnum<{
        active: "active";
        trial: "trial";
        churned: "churned";
        suspended: "suspended";
    }>>;
    external_id: z.ZodString;
    current_plan_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    subscription_status: z.ZodDefault<z.ZodEnum<{
        active: "active";
        none: "none";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
    }>>;
    billing_health_issues: z.ZodDefault<z.ZodArray<z.ZodEnum<{
        payment_failed: "payment_failed";
        payment_method_missing: "payment_method_missing";
    }>>>;
    provisional: z.ZodDefault<z.ZodBoolean>;
    stripe_linked: z.ZodBoolean;
}, z.core.$strip>;
declare const CustomerOverrideDurationSchema: z.ZodEnum<{
    permanent: "permanent";
    for_duration: "for_duration";
}>;
declare const CustomerOverrideTypeSchema: z.ZodEnum<{
    grant_plan: "grant_plan";
    grant_addon: "grant_addon";
    grant_entitlement: "grant_entitlement";
}>;
declare const CustomerOverrideStatusSchema: z.ZodEnum<{
    active: "active";
    expired: "expired";
    revoked: "revoked";
}>;
declare const CustomerOverrideSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    handle: z.ZodString;
    customer_id: z.ZodString;
    customer_id_list: z.ZodOptional<z.ZodArray<z.ZodString>>;
    override_type: z.ZodEnum<{
        grant_plan: "grant_plan";
        grant_addon: "grant_addon";
        grant_entitlement: "grant_entitlement";
    }>;
    target_id: z.ZodString;
    value: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    duration_type: z.ZodDefault<z.ZodEnum<{
        permanent: "permanent";
        for_duration: "for_duration";
    }>>;
    duration_value: z.ZodOptional<z.ZodString>;
    expiry_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    status: z.ZodDefault<z.ZodEnum<{
        active: "active";
        expired: "expired";
        revoked: "revoked";
    }>>;
    reason: z.ZodOptional<z.ZodString>;
    created_by: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const customerPaths: ZodOpenApiPathsObject;

declare const CustomerAccountCreateSchema: z.ZodObject<{
    account_id: z.ZodString;
    name: z.ZodOptional<z.ZodString>;
}, z.core.$strict>;
declare const CustomerAccountSchema: z.ZodObject<{
    id: z.ZodString;
    tenant_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    provisional: z.ZodDefault<z.ZodBoolean>;
    no_app_account: z.ZodDefault<z.ZodBoolean>;
    merged_into: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    retired_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    account_id: z.ZodString;
}, z.core.$strip>;
declare const CustomerUserCreateSchema: z.ZodObject<{
    user_id: z.ZodString;
    account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strict>;
declare const CustomerUserSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    user_id: z.ZodString;
    account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
declare const CustomerAccountListQuerySchema: z.ZodObject<{
    account_id: z.ZodOptional<z.ZodString>;
    page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    per_page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
}, z.core.$strict>;
declare const CustomerUserListQuerySchema: z.ZodObject<{
    user_id: z.ZodOptional<z.ZodString>;
    page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    per_page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
}, z.core.$strict>;
declare const CustomerEntityLinkCreateSchema: z.ZodObject<{
    state: z.ZodOptional<z.ZodEnum<{
        live: "live";
        draft: "draft";
        release: "release";
    }>>;
    release_id: z.ZodOptional<z.ZodString>;
    external_entity_type: z.ZodEnum<{
        user: "user";
        organization: "organization";
        billing_plan: "billing_plan";
        billing_price: "billing_price";
    }>;
    external_id: z.ZodString;
    billing_period: z.ZodDefault<z.ZodEnum<{
        "": "";
        monthly: "monthly";
        annual: "annual";
    }>>;
    currency: z.ZodDefault<z.ZodString>;
    resource_type: z.ZodEnum<{
        plan: "plan";
        plan_variation: "plan_variation";
        customer_account: "customer_account";
        customer_user: "customer_user";
    }>;
    resource_key: z.ZodString;
    environment_id: z.ZodString;
    provider: z.ZodLiteral<"clerk">;
    provider_instance_id: z.ZodString;
}, z.core.$strict>;
declare const CustomerEntityLinkSchema: z.ZodObject<{
    id: z.ZodString;
    tenant_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    verification_status: z.ZodDefault<z.ZodLiteral<"unverified">>;
    external_entity_type: z.ZodEnum<{
        user: "user";
        organization: "organization";
        billing_plan: "billing_plan";
        billing_price: "billing_price";
    }>;
    external_id: z.ZodString;
    billing_period: z.ZodDefault<z.ZodEnum<{
        "": "";
        monthly: "monthly";
        annual: "annual";
    }>>;
    currency: z.ZodDefault<z.ZodString>;
    resource_type: z.ZodEnum<{
        plan: "plan";
        plan_variation: "plan_variation";
        customer_account: "customer_account";
        customer_user: "customer_user";
    }>;
    resource_key: z.ZodString;
    environment_id: z.ZodString;
    provider: z.ZodLiteral<"clerk">;
    provider_instance_id: z.ZodString;
}, z.core.$strip>;
declare const CustomerEntityLinkListQuerySchema: z.ZodObject<{
    resource_type: z.ZodEnum<{
        plan: "plan";
        plan_variation: "plan_variation";
        customer_account: "customer_account";
        customer_user: "customer_user";
    }>;
    resource_key: z.ZodOptional<z.ZodString>;
    state: z.ZodOptional<z.ZodEnum<{
        live: "live";
        draft: "draft";
        release: "release";
    }>>;
    release_id: z.ZodOptional<z.ZodString>;
    environment_id: z.ZodString;
    provider: z.ZodLiteral<"clerk">;
    provider_instance_id: z.ZodString;
    page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    per_page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
}, z.core.$strict>;
declare const CustomerCatalogQuerySchema: z.ZodObject<{
    environment_id: z.ZodString;
    state: z.ZodEnum<{
        live: "live";
        draft: "draft";
        release: "release";
    }>;
    release_id: z.ZodOptional<z.ZodString>;
    handle: z.ZodOptional<z.ZodString>;
    page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    per_page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
}, z.core.$strict>;
declare const customerProvisioningPaths: ZodOpenApiPathsObject;

/**
 * Segment schemas — Zod definitions for dimensional targeting model.
 */

declare const DimensionCategorySchema: z.ZodEnum<{
    default: "default";
    custom: "custom";
}>;
declare const DimensionSourceTypeSchema: z.ZodEnum<{
    system: "system";
    sdk_trait: "sdk_trait";
    sdk_trait_enum: "sdk_trait_enum";
    cdp_property: "cdp_property";
    manual_list: "manual_list";
}>;
declare const SegmentDimensionSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    name: z.ZodString;
    handle: z.ZodOptional<z.ZodString>;
    category: z.ZodDefault<z.ZodEnum<{
        default: "default";
        custom: "custom";
    }>>;
    visibility_toggle: z.ZodDefault<z.ZodBoolean>;
    source_type: z.ZodDefault<z.ZodEnum<{
        system: "system";
        sdk_trait: "sdk_trait";
        sdk_trait_enum: "sdk_trait_enum";
        cdp_property: "cdp_property";
        manual_list: "manual_list";
    }>>;
    estimated_size: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
declare const SegmentValueSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    dimension_id: z.ZodString;
    name: z.ZodString;
    handle: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    definition_rule: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    used_in_count: z.ZodDefault<z.ZodNumber>;
}, z.core.$strip>;
declare const SegmentSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    name: z.ZodString;
    handle: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    rules: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    experiment_handle: z.ZodOptional<z.ZodString>;
    is_active: z.ZodDefault<z.ZodBoolean>;
    estimated_size: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const segmentPaths: ZodOpenApiPathsObject;

/**
 * Content schemas — content surfaces, messages, CTA paths, surface templates, and message blocks.
 */

declare const MessageSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    handle: z.ZodString;
    name: z.ZodString;
    channel: z.ZodEnum<{
        push: "push";
        email: "email";
        sms: "sms";
        webhook: "webhook";
        in_app: "in_app";
    }>;
    subject: z.ZodOptional<z.ZodString>;
    body: z.ZodString;
    template_variables: z.ZodDefault<z.ZodArray<z.ZodString>>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;

declare const CtaPathSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    name: z.ZodString;
    handle: z.ZodString;
    action_type: z.ZodEnum<{
        custom: "custom";
        open_checkout: "open_checkout";
        view_plans: "view_plans";
        book_demo: "book_demo";
        contact_sales: "contact_sales";
        complete_onboarding: "complete_onboarding";
        invite_teammate: "invite_teammate";
        refer_friend: "refer_friend";
        verify_work_email: "verify_work_email";
        update_payment_method: "update_payment_method";
        enable_auto_renewal: "enable_auto_renewal";
        manage_subscription: "manage_subscription";
        switch_billing_period: "switch_billing_period";
        extend_trial: "extend_trial";
        open_rt_placement: "open_rt_placement";
        dismiss: "dismiss";
        snooze: "snooze";
    }>;
    target_url: z.ZodOptional<z.ZodString>;
    target_plan_id: z.ZodOptional<z.ZodString>;
    config_fields: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const TemplateFieldTypeSchema: z.ZodEnum<{
    message: "message";
    plan: "plan";
    json: "json";
    duration: "duration";
    header: "header";
    toggle: "toggle";
    image: "image";
    entitlement: "entitlement";
    body: "body";
    cta_label: "cta_label";
    secondary_body: "secondary_body";
    secondary_label: "secondary_label";
    send_delay: "send_delay";
    dropdown: "dropdown";
}>;
declare const FieldDefinitionSchema: z.ZodObject<{
    name: z.ZodString;
    field_type: z.ZodEnum<{
        message: "message";
        plan: "plan";
        json: "json";
        duration: "duration";
        header: "header";
        toggle: "toggle";
        image: "image";
        entitlement: "entitlement";
        body: "body";
        cta_label: "cta_label";
        secondary_body: "secondary_body";
        secondary_label: "secondary_label";
        send_delay: "send_delay";
        dropdown: "dropdown";
    }>;
    required: z.ZodDefault<z.ZodBoolean>;
    default_value: z.ZodOptional<z.ZodUnknown>;
    order: z.ZodOptional<z.ZodNumber>;
    help_text: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const SurfaceTemplateSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    name: z.ZodString;
    handle: z.ZodString;
    surface_type: z.ZodUnion<readonly [z.ZodEnum<{
        push: "push";
        custom: "custom";
        banner: "banner";
        modal: "modal";
        tooltip: "tooltip";
        sidebar: "sidebar";
        inline: "inline";
        toast: "toast";
        fullscreen: "fullscreen";
        email: "email";
        sms: "sms";
        in_page: "in_page";
        button: "button";
        full_page: "full_page";
        agent: "agent";
        cli: "cli";
    }>, z.ZodEnum<{
        push: "push";
        banner: "banner";
        tooltip: "tooltip";
        toast: "toast";
        email: "email";
        sms: "sms";
        button: "button";
        cli: "cli";
        plans_page_ctas: "plans_page_ctas";
        plans_page_full: "plans_page_full";
        inline_gate_message: "inline_gate_message";
        in_page_card: "in_page_card";
        usage_counter: "usage_counter";
        credit_counter: "credit_counter";
        trial_counter: "trial_counter";
        modal_optional: "modal_optional";
        modal_blocking: "modal_blocking";
        agent_connector: "agent_connector";
        custom_in_app: "custom_in_app";
    }>]>;
    field_definitions: z.ZodDefault<z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        field_type: z.ZodEnum<{
            message: "message";
            plan: "plan";
            json: "json";
            duration: "duration";
            header: "header";
            toggle: "toggle";
            image: "image";
            entitlement: "entitlement";
            body: "body";
            cta_label: "cta_label";
            secondary_body: "secondary_body";
            secondary_label: "secondary_label";
            send_delay: "send_delay";
            dropdown: "dropdown";
        }>;
        required: z.ZodDefault<z.ZodBoolean>;
        default_value: z.ZodOptional<z.ZodUnknown>;
        order: z.ZodOptional<z.ZodNumber>;
        help_text: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    description: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const MessageBlockRecordSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    name: z.ZodString;
    handle: z.ZodString;
    content_fields: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    variation_dimension_id: z.ZodOptional<z.ZodString>;
    variation_values: z.ZodOptional<z.ZodArray<z.ZodObject<{
        segment_value_id: z.ZodString;
        content_fields_override: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    }, z.core.$strip>>>;
    notes: z.ZodOptional<z.ZodString>;
    used_in_count: z.ZodDefault<z.ZodNumber>;
}, z.core.$strip>;
/** An entry in a payload's segment→message-block routing table. */
declare const ContentPayloadSegmentEntrySchema: z.ZodObject<{
    segment_id: z.ZodString;
    message_block_id: z.ZodString;
    ui_path_id: z.ZodOptional<z.ZodString>;
    promotion_id: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/**
 * A content delivery payload that binds a surface template to message blocks,
 * with optional segment-based content routing. Used by the SDK to resolve
 * which message block to display for a given user's segments.
 */
declare const ContentPlacementPayloadSchema: z.ZodObject<{
    payload_id: z.ZodString;
    tenant_id: z.ZodString;
    name: z.ZodString;
    surface_template_id: z.ZodString;
    default_message_block_id: z.ZodString;
    segment_content_map: z.ZodOptional<z.ZodArray<z.ZodObject<{
        segment_id: z.ZodString;
        message_block_id: z.ZodString;
        ui_path_id: z.ZodOptional<z.ZodString>;
        promotion_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    ui_path_id: z.ZodOptional<z.ZodString>;
    promotion_id: z.ZodOptional<z.ZodString>;
    status: z.ZodEnum<{
        active: "active";
        inactive: "inactive";
        draft: "draft";
    }>;
    created_at: z.ZodOptional<z.ZodString>;
    updated_at: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const contentPaths: ZodOpenApiPathsObject;

/**
 * UI schemas — Zod definitions for user-scoped UI preferences and themes.
 */

declare const ThemeSchema: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    mode: z.ZodDefault<z.ZodEnum<{
        system: "system";
        light: "light";
        dark: "dark";
    }>>;
    tokens: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>;
declare const UiPreferenceSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    user_id: z.ZodString;
    scope: z.ZodString;
    preferences: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const uiPreferencePaths: ZodOpenApiPathsObject;

/** BL-0442: global provider quotes stored in Neon, independent of tenant billing policy. */

declare const FxProviderSchema: z.ZodString;
/** Preserve provider decimal bytes; no numeric coercion, exponent notation or rounding. */
declare const FxRateDecimalSchema: z.ZodString;
/**
 * One source quote on its actual publication date, not the requested fact date.
 * Upserts use provider/date/base/quote; id remains stable for result provenance.
 * An adapter qualifies dated quotes before passing them to the conversion oracle.
 */
declare const FxDailyRateRowSchema: z.ZodObject<{
    id: z.ZodString;
    provider: z.ZodString;
    rate_date: z.ZodISODate;
    base_currency: z.ZodString;
    quote_currency: z.ZodString;
    rate: z.ZodString;
    retrieved_at: z.ZodISODateTime;
    source_reference: z.ZodString;
    response_sha256: z.ZodString;
}, z.core.$strict>;

/**
 * Analytics schemas — reporting, KPIs, attribution, journey, usage, drift.
 */

declare const CohortMonthSchema: z.ZodObject<{
    month: z.ZodString;
    cohort_size: z.ZodNumber;
    retained: z.ZodNumber;
    retention_rate: z.ZodNumber;
    revenue_cents: z.ZodNumber;
}, z.core.$strip>;
declare const FunnelStepSchema: z.ZodObject<{
    step: z.ZodString;
    label: z.ZodString;
    count: z.ZodNumber;
    conversion_rate: z.ZodNumber;
    drop_off_rate: z.ZodNumber;
}, z.core.$strip>;
declare const PlacementPerformanceRowSchema: z.ZodObject<{
    placement_id: z.ZodString;
    placement_name: z.ZodString;
    impressions: z.ZodNumber;
    clicks: z.ZodNumber;
    conversions: z.ZodNumber;
    ctr: z.ZodNumber;
    conversion_rate: z.ZodNumber;
    revenue_cents: z.ZodNumber;
}, z.core.$strip>;
declare const RevenueMetricSchema: z.ZodObject<{
    date: z.ZodString;
    mrr_cents: z.ZodNumber;
    arr_cents: z.ZodNumber;
    new_mrr_cents: z.ZodNumber;
    churned_mrr_cents: z.ZodNumber;
    expansion_mrr_cents: z.ZodNumber;
    net_new_mrr_cents: z.ZodNumber;
}, z.core.$strip>;
declare const KpiAggregateSchema: z.ZodObject<{
    metric_key: z.ZodString;
    label: z.ZodString;
    current_value: z.ZodNumber;
    previous_value: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    change_percent: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    period: z.ZodString;
    unit: z.ZodDefault<z.ZodEnum<{
        count: "count";
        percent: "percent";
        seconds: "seconds";
        ratio: "ratio";
        cents: "cents";
    }>>;
}, z.core.$strip>;
declare const DriftReportSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    report_type: z.ZodEnum<{
        plan_drift: "plan_drift";
        entitlement_drift: "entitlement_drift";
        usage_anomaly: "usage_anomaly";
        revenue_anomaly: "revenue_anomaly";
    }>;
    severity: z.ZodEnum<{
        info: "info";
        warning: "warning";
        critical: "critical";
    }>;
    resource_type: z.ZodString;
    resource_id: z.ZodString;
    summary: z.ZodString;
    expected_value: z.ZodOptional<z.ZodUnknown>;
    actual_value: z.ZodOptional<z.ZodUnknown>;
    affected_customer_count: z.ZodDefault<z.ZodNumber>;
    is_resolved: z.ZodDefault<z.ZodBoolean>;
    resolved_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const AlertSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    alert_type: z.ZodEnum<{
        custom: "custom";
        usage_threshold: "usage_threshold";
        revenue_drop: "revenue_drop";
        conversion_drop: "conversion_drop";
        experiment_significance: "experiment_significance";
        drift_detected: "drift_detected";
    }>;
    severity: z.ZodEnum<{
        info: "info";
        warning: "warning";
        critical: "critical";
    }>;
    title: z.ZodString;
    description: z.ZodString;
    resource_type: z.ZodOptional<z.ZodString>;
    resource_id: z.ZodOptional<z.ZodString>;
    is_acknowledged: z.ZodDefault<z.ZodBoolean>;
    acknowledged_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    acknowledged_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const analyticsPaths: ZodOpenApiPathsObject;

/** Shared by query time and retained generation provenance. */
declare const AnalyticsTimeGrainSchema: z.ZodEnum<{
    day: "day";
    week: "week";
    month: "month";
    quarter: "quarter";
    hour: "hour";
}>;

/**
 * Analytics View Framework schema family (plan 190 TASK-1).
 *
 * The contract for catalog-governed, agent-authorable analytics views:
 * Semantic Catalog entries, the AnalyticsViewDraft / AnalyticsView document
 * pair, the machine-actionable validation contract, and the query-result
 * envelope. Design of record: revturbine-devkit
 * docs/research/revturbine-analytics-view-framework.md (§3–§5, §7.4, §9).
 *
 * These are control-plane documents with Internal exposure. They never enter
 * the Playbook payload, so nothing here touches the payload contract.
 *
 * The authored document family (draft, canonical view, and every shape nested
 * in them) uses `z.strictObject`: a saved view may only select approved
 * semantics — SQL, credentials, and raw renderer configuration must be
 * REJECTED with a structured error an agent can repair, never silently
 * stripped and half-persisted. Server-produced envelopes (catalog entries,
 * results) stay plain objects.
 */

/**
 * Canonical semantic identifier — dotted, at least two snake_case segments
 * (`commercial.plan`, `conversion.rate`). Labels and translated text never
 * become query identifiers; only IDs matching this pattern do.
 */
declare const SEMANTIC_ID_PATTERN: RegExp;
/** Local element id (view / block / filter / handoff), URL- and pointer-safe. */
declare const VIEW_ELEMENT_ID_PATTERN: RegExp;
declare const AnalyticsSemanticIdSchema: z.ZodString;
declare const AnalyticsAnalyticalUnitSchema: z.ZodEnum<{
    user: "user";
    account: "account";
    billing_unit: "billing_unit";
    organization: "organization";
}>;
declare const AnalyticsQueryFamilySchema: z.ZodEnum<{
    scalar: "scalar";
    timeseries: "timeseries";
    breakdown: "breakdown";
    funnel: "funnel";
    table: "table";
    timeline: "timeline";
}>;
declare const AnalyticsSourceScopeSchema: z.ZodEnum<{
    total: "total";
    account_matched: "account_matched";
    revturbine_tracked: "revturbine_tracked";
    revturbine_influenced: "revturbine_influenced";
}>;
declare const AnalyticsHistoricalModeSchema: z.ZodEnum<{
    as_of_event: "as_of_event";
    current: "current";
}>;
declare const AnalyticsPeriodCompareModeSchema: z.ZodEnum<{
    none: "none";
    previous_period: "previous_period";
    previous_year: "previous_year";
    custom_period: "custom_period";
}>;
/**
 * The full comparison vocabulary (plan 219 TASK-1, additive over 217's
 * period modes): `segment` compares two members of one dimension, `variant`
 * compares an experiment variant against control (read from plan 200's
 * immutable causal results — never recomputed), `scope` compares against
 * another source scope, `intervention` compares the windows before and after
 * an annotation-anchored instant. Each parameterized mode carries its target
 * in the sibling `compare_*` query field; semantic validation pairs them.
 */
declare const AnalyticsCompareModeSchema: z.ZodEnum<{
    none: "none";
    previous_period: "previous_period";
    previous_year: "previous_year";
    custom_period: "custom_period";
    segment: "segment";
    variant: "variant";
    scope: "scope";
    intervention: "intervention";
}>;
/** Delta presentation for an active comparison: absolute difference or percentage change. */
declare const AnalyticsCompareDeltaSchema: z.ZodEnum<{
    percentage: "percentage";
    absolute: "absolute";
}>;
declare const AnalyticsFilterOperatorSchema: z.ZodEnum<{
    in: "in";
    eq: "eq";
    neq: "neq";
    not_in: "not_in";
    between: "between";
    gte: "gte";
    lte: "lte";
    is_null: "is_null";
    is_not_null: "is_not_null";
    contains: "contains";
}>;
declare const AnalyticsFilterControlSchema: z.ZodEnum<{
    date_range: "date_range";
    single_select: "single_select";
    multi_select: "multi_select";
    search_select: "search_select";
    number_range: "number_range";
    entity_picker: "entity_picker";
    toggle: "toggle";
}>;
declare const AnalyticsCardinalityClassSchema: z.ZodEnum<{
    high: "high";
    medium: "medium";
    low: "low";
}>;
/** Result-column data type (§7.4 `fields[].type`). */
declare const AnalyticsFieldTypeSchema: z.ZodEnum<{
    string: "string";
    number: "number";
    boolean: "boolean";
    date: "date";
    datetime: "datetime";
    currency: "currency";
    percent: "percent";
}>;
/** Optimization direction used when interpreting movement in a metric (§5.2). */
declare const AnalyticsMetricDirectionSchema: z.ZodEnum<{
    increase: "increase";
    decrease: "decrease";
    neutral: "neutral";
}>;
/** Statistical family used to choose valid analyses for a metric (§5.2). */
declare const AnalyticsMetricStatisticalTypeSchema: z.ZodEnum<{
    count: "count";
    ratio: "ratio";
    revenue: "revenue";
    binary: "binary";
    continuous: "continuous";
}>;
/** Whether a metric remains meaningful when rolled up across dimensions. */
declare const AnalyticsMetricAggregationSemanticsSchema: z.ZodEnum<{
    additive: "additive";
    semi_additive: "semi_additive";
    non_additive: "non_additive";
}>;
/** Catalog dimension data type (§3.3) — `id` marks anchor-identity dimensions. */
declare const AnalyticsDimensionTypeSchema: z.ZodEnum<{
    string: "string";
    number: "number";
    boolean: "boolean";
    id: "id";
    date: "date";
    enum: "enum";
    datetime: "datetime";
}>;
declare const AnalyticsDimensionCapabilitySchema: z.ZodEnum<{
    sort: "sort";
    filter: "filter";
    split: "split";
    group: "group";
}>;
declare const AnalyticsViewVisibilitySchema: z.ZodEnum<{
    private: "private";
    team: "team";
    tenant: "tenant";
}>;
/**
 * Customization-policy vocabulary (§12). One enum carries both allow- and
 * deny-side capabilities so a policy cannot reference a capability the
 * contract does not know.
 */
declare const AnalyticsCustomizationCapabilitySchema: z.ZodEnum<{
    title: "title";
    sort: "sort";
    limit: "limit";
    source_scope: "source_scope";
    filter_defaults: "filter_defaults";
    metric_selection: "metric_selection";
    grouping: "grouping";
    compatible_renderer: "compatible_renderer";
    block_visibility: "block_visibility";
    layout: "layout";
    handoff_target: "handoff_target";
    hidden_scope: "hidden_scope";
    raw_expression: "raw_expression";
    cross_filter: "cross_filter";
}>;
/**
 * Sensitivity axis for catalog entries — reuses the `DataClassification`
 * values rather than inventing a new axis (§3.3); a unit test pins the two
 * value sets together.
 */
declare const AnalyticsClassificationSchema: z.ZodEnum<{
    pii: "pii";
    financial: "financial";
    unrestricted: "unrestricted";
    operational: "operational";
}>;
/**
 * Plain display text. `key` is reserved for future localization and never
 * becomes a query identifier (§2.3). HTML is not accepted anywhere titles
 * appear (§9.3) — enforced semantically, structurally this is bounded text.
 */
declare const LocalizedTextSchema: z.ZodObject<{
    value: z.ZodString;
    key: z.ZodOptional<z.ZodString>;
}, z.core.$strict>;
/**
 * The bounded value space for filter defaults and fixed filters: scalars,
 * scalar lists, a date-range preset, an explicit date range, or a numeric
 * range. Deliberately not `unknown` — every persisted value must be
 * JSON-plain and enumerable.
 *
 * The explicit date-range variant (`type: 'date_range'`) exists precisely
 * because `z.array(FilterScalar)` (the scalar-list variant, used for
 * multi-select) is structurally indistinguishable from a two-element date
 * array — `["2026-06-01","2026-08-27"]` reads equally well as "either of
 * these two dates" or "the range between them" with no way to tell which
 * was meant (plan 226 REQ-5). A tagged shape removes the ambiguity at the
 * type level instead of leaving every consumer to re-derive the same
 * "is this array actually a range?" heuristic. The bare-array encoding
 * remains valid here (REQ-9): existing saved-view documents and URLs
 * already use it, and this is a strictly additive union member, not a
 * replacement — decoders should prefer the tagged shape going forward and
 * treat a bare two-date array as a legacy range for read compatibility.
 */
declare const AnalyticsFilterValueSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
    preset: z.ZodString;
    compare: z.ZodOptional<z.ZodEnum<{
        none: "none";
        previous_period: "previous_period";
        previous_year: "previous_year";
        custom_period: "custom_period";
    }>>;
    compare_start: z.ZodOptional<z.ZodString>;
    compare_end: z.ZodOptional<z.ZodString>;
}, z.core.$strict>, z.ZodObject<{
    min: z.ZodOptional<z.ZodNumber>;
    max: z.ZodOptional<z.ZodNumber>;
}, z.core.$strict>, z.ZodObject<{
    type: z.ZodLiteral<"date_range">;
    start: z.ZodString;
    end: z.ZodString;
}, z.core.$strict>]>;
/** Discriminant for the explicit date-range variant above. */
declare const ANALYTICS_DATE_RANGE_FILTER_VALUE_TYPE: "date_range";
interface AnalyticsDateRangeFilterValue {
    type: typeof ANALYTICS_DATE_RANGE_FILTER_VALUE_TYPE;
    start: string;
    end: string;
}
/** Guard distinguishing the tagged date-range shape from every other
 * `AnalyticsFilterValue` variant (including the legacy bare-array range and
 * a same-shaped multi-select list) — the type-safe alternative to each
 * consumer re-deriving "is this array/object actually a date range?". */
declare function isAnalyticsDateRangeFilterValue(value: unknown): value is AnalyticsDateRangeFilterValue;
/** Guard for the legacy bare two-element-array date-range encoding
 * (`["2026-06-01","2026-08-27"]`) that predates the tagged shape above —
 * distinguishes it from a same-shaped multi-select scalar list by requiring
 * both entries to look like ISO dates, matching every existing decoder's
 * heuristic (plan 226 REQ-5's rule-of-three consolidation target). */
declare function isLegacyDateRangeArray(value: unknown): value is [string, string];
declare const AnalyticsSemanticFilterSchema: z.ZodObject<{
    dimension: z.ZodString;
    operator: z.ZodEnum<{
        in: "in";
        eq: "eq";
        neq: "neq";
        not_in: "not_in";
        between: "between";
        gte: "gte";
        lte: "lte";
        is_null: "is_null";
        is_not_null: "is_not_null";
        contains: "contains";
    }>;
    value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
        preset: z.ZodString;
        compare: z.ZodOptional<z.ZodEnum<{
            none: "none";
            previous_period: "previous_period";
            previous_year: "previous_year";
            custom_period: "custom_period";
        }>>;
        compare_start: z.ZodOptional<z.ZodString>;
        compare_end: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>, z.ZodObject<{
        min: z.ZodOptional<z.ZodNumber>;
        max: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"date_range">;
        start: z.ZodString;
        end: z.ZodString;
    }, z.core.$strict>]>>;
}, z.core.$strict>;
/**
 * Segment-versus-segment target: two members of one catalog dimension
 * (`commercial.plan` pro vs starter). `null` names the dimension's null
 * cohort. The dimension must exist on the query's concept — semantic
 * validation enforces it.
 */
declare const AnalyticsCompareSegmentSchema: z.ZodObject<{
    dimension: z.ZodString;
    baseline: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
    against: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
}, z.core.$strict>;
/**
 * Variant-versus-control target. References the experiment by handle; the
 * view layer reads plan 200's immutable causal results and never recomputes
 * a conclusion (plan 219 REQ-3). `baseline` / `against` name variant keys;
 * absent, they resolve to the experiment's designated control and its
 * variants.
 */
declare const AnalyticsCompareExperimentSchema: z.ZodObject<{
    experiment: z.ZodString;
    baseline: z.ZodOptional<z.ZodString>;
    against: z.ZodOptional<z.ZodString>;
}, z.core.$strict>;
declare const AnalyticsFormatSpecSchema: z.ZodObject<{
    type: z.ZodEnum<{
        number: "number";
        duration: "duration";
        currency: "currency";
        percent: "percent";
    }>;
    decimals: z.ZodOptional<z.ZodNumber>;
    compact: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strict>;
/**
 * The full set of portable chart options (§4.4). Raw renderer props (Visx
 * component props, D3 scales) stay internal to the renderer registry and are
 * structurally unrepresentable here.
 */
declare const AnalyticsSafeChartOptionsSchema: z.ZodObject<{
    legend: z.ZodOptional<z.ZodEnum<{
        none: "none";
        top: "top";
        right: "right";
        bottom: "bottom";
        left: "left";
    }>>;
    value_labels: z.ZodOptional<z.ZodBoolean>;
    reference_lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
        value: z.ZodNumber;
        label: z.ZodOptional<z.ZodObject<{
            value: z.ZodString;
            key: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>>;
    }, z.core.$strict>>>;
    x_axis_format: z.ZodOptional<z.ZodObject<{
        type: z.ZodEnum<{
            number: "number";
            duration: "duration";
            currency: "currency";
            percent: "percent";
        }>;
        decimals: z.ZodOptional<z.ZodNumber>;
        compact: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strict>>;
    y_axis_format: z.ZodOptional<z.ZodObject<{
        type: z.ZodEnum<{
            number: "number";
            duration: "duration";
            currency: "currency";
            percent: "percent";
        }>;
        decimals: z.ZodOptional<z.ZodNumber>;
        compact: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strict>>;
    empty_state: z.ZodOptional<z.ZodEnum<{
        message: "message";
        blank: "blank";
    }>>;
}, z.core.$strict>;
declare const AnalyticsCatalogDeprecationSchema: z.ZodObject<{
    deprecated: z.ZodBoolean;
    replaced_by: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const AnalyticsCatalogDimensionSchema: z.ZodObject<{
    id: z.ZodString;
    label: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    when_to_use: z.ZodOptional<z.ZodString>;
    do_not_use_for: z.ZodOptional<z.ZodString>;
    type: z.ZodEnum<{
        string: "string";
        number: "number";
        boolean: "boolean";
        id: "id";
        date: "date";
        enum: "enum";
        datetime: "datetime";
    }>;
    operators: z.ZodArray<z.ZodEnum<{
        in: "in";
        eq: "eq";
        neq: "neq";
        not_in: "not_in";
        between: "between";
        gte: "gte";
        lte: "lte";
        is_null: "is_null";
        is_not_null: "is_not_null";
        contains: "contains";
    }>>;
    control: z.ZodEnum<{
        date_range: "date_range";
        single_select: "single_select";
        multi_select: "multi_select";
        search_select: "search_select";
        number_range: "number_range";
        entity_picker: "entity_picker";
        toggle: "toggle";
    }>;
    capabilities: z.ZodArray<z.ZodEnum<{
        sort: "sort";
        filter: "filter";
        split: "split";
        group: "group";
    }>>;
    cardinality: z.ZodEnum<{
        high: "high";
        medium: "medium";
        low: "low";
    }>;
    classification: z.ZodDefault<z.ZodEnum<{
        pii: "pii";
        financial: "financial";
        unrestricted: "unrestricted";
        operational: "operational";
    }>>;
    historical_mode: z.ZodOptional<z.ZodEnum<{
        as_of_event: "as_of_event";
        current: "current";
    }>>;
    allowed_concepts: z.ZodOptional<z.ZodArray<z.ZodString>>;
    exclude_from_segment_picker: z.ZodDefault<z.ZodBoolean>;
    deprecation: z.ZodOptional<z.ZodObject<{
        deprecated: z.ZodBoolean;
        replaced_by: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
}, z.core.$strip>;
/** Stable policy-defined identifiers, not display prose or a second metric registry. */
declare const AnalyticsMetricAccountingSchema: z.ZodObject<{
    economic_basis: z.ZodString;
    population: z.ZodString;
}, z.core.$strict>;
declare const AnalyticsCatalogMetricSchema: z.ZodObject<{
    id: z.ZodString;
    label: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    when_to_use: z.ZodOptional<z.ZodString>;
    do_not_use_for: z.ZodOptional<z.ZodString>;
    value_type: z.ZodEnum<{
        string: "string";
        number: "number";
        boolean: "boolean";
        date: "date";
        datetime: "datetime";
        currency: "currency";
        percent: "percent";
    }>;
    format: z.ZodOptional<z.ZodObject<{
        type: z.ZodEnum<{
            number: "number";
            duration: "duration";
            currency: "currency";
            percent: "percent";
        }>;
        decimals: z.ZodOptional<z.ZodNumber>;
        compact: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strict>>;
    source_scope: z.ZodOptional<z.ZodEnum<{
        total: "total";
        account_matched: "account_matched";
        revturbine_tracked: "revturbine_tracked";
        revturbine_influenced: "revturbine_influenced";
    }>>;
    direction: z.ZodOptional<z.ZodEnum<{
        increase: "increase";
        decrease: "decrease";
        neutral: "neutral";
    }>>;
    statistical_type: z.ZodOptional<z.ZodEnum<{
        count: "count";
        ratio: "ratio";
        revenue: "revenue";
        binary: "binary";
        continuous: "continuous";
    }>>;
    aggregation_semantics: z.ZodOptional<z.ZodEnum<{
        additive: "additive";
        semi_additive: "semi_additive";
        non_additive: "non_additive";
    }>>;
    accounting: z.ZodOptional<z.ZodObject<{
        economic_basis: z.ZodString;
        population: z.ZodString;
    }, z.core.$strict>>;
    preferred_analysis_unit: z.ZodOptional<z.ZodEnum<{
        user: "user";
        account: "account";
        billing_unit: "billing_unit";
        organization: "organization";
    }>>;
    numerator_metric: z.ZodOptional<z.ZodString>;
    denominator_metric: z.ZodOptional<z.ZodString>;
    derivation: z.ZodOptional<z.ZodObject<{
        input_origin: z.ZodEnum<{
            none: "none";
            platform: "platform";
            customer_authored: "customer_authored";
            mixed: "mixed";
        }>;
        ingested_events: z.ZodArray<z.ZodString>;
        ingested_datasources: z.ZodOptional<z.ZodArray<z.ZodString>>;
        carried_by: z.ZodOptional<z.ZodArray<z.ZodString>>;
        note: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    layer: z.ZodOptional<z.ZodEnum<{
        derived: "derived";
        primitive: "primitive";
    }>>;
    semantics: z.ZodOptional<z.ZodObject<{
        grain: z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            quarter: "quarter";
            hour: "hour";
        }>;
        window: z.ZodObject<{
            period: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                quarter: "quarter";
            }>;
            alignment: z.ZodEnum<{
                as_of: "as_of";
                calendar: "calendar";
                trailing: "trailing";
            }>;
            default_count: z.ZodNumber;
        }, z.core.$strict>;
        currency: z.ZodEnum<{
            reporting_currency: "reporting_currency";
            not_monetary: "not_monetary";
            per_currency: "per_currency";
        }>;
        timezone: z.ZodLiteral<"tenant_configs.timezone">;
    }, z.core.$strict>>;
    catalog_status: z.ZodOptional<z.ZodEnum<{
        unavailable: "unavailable";
        declared: "declared";
        bound: "bound";
        validated: "validated";
        tested: "tested";
    }>>;
    first_valid_date: z.ZodOptional<z.ZodISODate>;
    release_condition: z.ZodOptional<z.ZodString>;
    deprecation: z.ZodOptional<z.ZodObject<{
        deprecated: z.ZodBoolean;
        replaced_by: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
}, z.core.$strip>;
/**
 * Validated catalog metric — adds the structural check that ratio
 * composition refs travel with (and only with) `statistical_type: 'ratio'`:
 * a ratio metric MUST name both `numerator_metric` and `denominator_metric`,
 * and any other (or absent) statistical type MUST NOT carry either ref.
 *
 * The canonical `AnalyticsCatalogMetricSchema` stays a plain `z.ZodObject`
 * so OpenAPI / JSON Schema generation keeps working (same split as
 * `EntitlementRuleValidatedSchema`); use this schema wherever catalog
 * metrics are authored or generated.
 */
declare const AnalyticsCatalogMetricValidatedSchema: z.ZodObject<{
    id: z.ZodString;
    label: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    when_to_use: z.ZodOptional<z.ZodString>;
    do_not_use_for: z.ZodOptional<z.ZodString>;
    value_type: z.ZodEnum<{
        string: "string";
        number: "number";
        boolean: "boolean";
        date: "date";
        datetime: "datetime";
        currency: "currency";
        percent: "percent";
    }>;
    format: z.ZodOptional<z.ZodObject<{
        type: z.ZodEnum<{
            number: "number";
            duration: "duration";
            currency: "currency";
            percent: "percent";
        }>;
        decimals: z.ZodOptional<z.ZodNumber>;
        compact: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strict>>;
    source_scope: z.ZodOptional<z.ZodEnum<{
        total: "total";
        account_matched: "account_matched";
        revturbine_tracked: "revturbine_tracked";
        revturbine_influenced: "revturbine_influenced";
    }>>;
    direction: z.ZodOptional<z.ZodEnum<{
        increase: "increase";
        decrease: "decrease";
        neutral: "neutral";
    }>>;
    statistical_type: z.ZodOptional<z.ZodEnum<{
        count: "count";
        ratio: "ratio";
        revenue: "revenue";
        binary: "binary";
        continuous: "continuous";
    }>>;
    aggregation_semantics: z.ZodOptional<z.ZodEnum<{
        additive: "additive";
        semi_additive: "semi_additive";
        non_additive: "non_additive";
    }>>;
    accounting: z.ZodOptional<z.ZodObject<{
        economic_basis: z.ZodString;
        population: z.ZodString;
    }, z.core.$strict>>;
    preferred_analysis_unit: z.ZodOptional<z.ZodEnum<{
        user: "user";
        account: "account";
        billing_unit: "billing_unit";
        organization: "organization";
    }>>;
    numerator_metric: z.ZodOptional<z.ZodString>;
    denominator_metric: z.ZodOptional<z.ZodString>;
    derivation: z.ZodOptional<z.ZodObject<{
        input_origin: z.ZodEnum<{
            none: "none";
            platform: "platform";
            customer_authored: "customer_authored";
            mixed: "mixed";
        }>;
        ingested_events: z.ZodArray<z.ZodString>;
        ingested_datasources: z.ZodOptional<z.ZodArray<z.ZodString>>;
        carried_by: z.ZodOptional<z.ZodArray<z.ZodString>>;
        note: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    layer: z.ZodOptional<z.ZodEnum<{
        derived: "derived";
        primitive: "primitive";
    }>>;
    semantics: z.ZodOptional<z.ZodObject<{
        grain: z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            quarter: "quarter";
            hour: "hour";
        }>;
        window: z.ZodObject<{
            period: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                quarter: "quarter";
            }>;
            alignment: z.ZodEnum<{
                as_of: "as_of";
                calendar: "calendar";
                trailing: "trailing";
            }>;
            default_count: z.ZodNumber;
        }, z.core.$strict>;
        currency: z.ZodEnum<{
            reporting_currency: "reporting_currency";
            not_monetary: "not_monetary";
            per_currency: "per_currency";
        }>;
        timezone: z.ZodLiteral<"tenant_configs.timezone">;
    }, z.core.$strict>>;
    catalog_status: z.ZodOptional<z.ZodEnum<{
        unavailable: "unavailable";
        declared: "declared";
        bound: "bound";
        validated: "validated";
        tested: "tested";
    }>>;
    first_valid_date: z.ZodOptional<z.ZodISODate>;
    release_condition: z.ZodOptional<z.ZodString>;
    deprecation: z.ZodOptional<z.ZodObject<{
        deprecated: z.ZodBoolean;
        replaced_by: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
}, z.core.$strip>;
declare const AnalyticsCatalogConceptSchema: z.ZodObject<{
    id: z.ZodString;
    version: z.ZodNumber;
    label: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    when_to_use: z.ZodOptional<z.ZodString>;
    do_not_use_for: z.ZodOptional<z.ZodString>;
    grain: z.ZodArray<z.ZodString>;
    analytical_units: z.ZodArray<z.ZodEnum<{
        user: "user";
        account: "account";
        billing_unit: "billing_unit";
        organization: "organization";
    }>>;
    primary_time_dimension: z.ZodString;
    historical_mode: z.ZodEnum<{
        as_of_event: "as_of_event";
        current: "current";
    }>;
    dimensions: z.ZodArray<z.ZodString>;
    metrics: z.ZodArray<z.ZodString>;
    query_families: z.ZodArray<z.ZodEnum<{
        scalar: "scalar";
        timeseries: "timeseries";
        breakdown: "breakdown";
        funnel: "funnel";
        table: "table";
        timeline: "timeline";
    }>>;
    source_scope: z.ZodEnum<{
        total: "total";
        account_matched: "account_matched";
        revturbine_tracked: "revturbine_tracked";
        revturbine_influenced: "revturbine_influenced";
    }>;
    coverage_metric: z.ZodOptional<z.ZodString>;
    dimension_groundings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        kind: z.ZodEnum<{
            stamped: "stamped";
            membership_join: "membership_join";
            config_join: "config_join";
            derived: "derived";
        }>;
        source: z.ZodString;
        note: z.ZodOptional<z.ZodString>;
        anchor: z.ZodOptional<z.ZodEnum<{
            fixed: "fixed";
            current: "current";
            fact_time: "fact_time";
            period_opening: "period_opening";
            touch_time: "touch_time";
            cohort_entry: "cohort_entry";
            exposure_time: "exposure_time";
            assignment_time: "assignment_time";
            carried_version: "carried_version";
        }>>;
        selection: z.ZodOptional<z.ZodObject<{
            product: z.ZodOptional<z.ZodString>;
            environment: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        partitions: z.ZodOptional<z.ZodBoolean>;
        catalog_status: z.ZodOptional<z.ZodEnum<{
            unavailable: "unavailable";
            declared: "declared";
            bound: "bound";
            validated: "validated";
            tested: "tested";
        }>>;
        blocker: z.ZodOptional<z.ZodString>;
        served_metrics: z.ZodOptional<z.ZodArray<z.ZodString>>;
        unserved_blocker: z.ZodOptional<z.ZodString>;
        v1: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strip>>>;
    fact_kind: z.ZodOptional<z.ZodEnum<{
        transaction: "transaction";
        periodic_snapshot: "periodic_snapshot";
        accumulating_snapshot: "accumulating_snapshot";
    }>>;
    family: z.ZodOptional<z.ZodEnum<{
        billing: "billing";
        behavioral: "behavioral";
    }>>;
    primary_key: z.ZodOptional<z.ZodArray<z.ZodString>>;
    producer: z.ZodOptional<z.ZodEnum<{
        platform: "platform";
        customer_authored: "customer_authored";
        simulation: "simulation";
    }>>;
    materialization: z.ZodOptional<z.ZodObject<{
        mode: z.ZodEnum<{
            raw: "raw";
            rollup: "rollup";
            logical: "logical";
        }>;
        rollup_grain: z.ZodOptional<z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            quarter: "quarter";
            hour: "hour";
        }>>;
    }, z.core.$strip>>;
    livemode_qualified: z.ZodOptional<z.ZodBoolean>;
    record_contract: z.ZodOptional<z.ZodObject<{
        record_id: z.ZodArray<z.ZodString>;
        source_namespace: z.ZodString;
        occurred_time_field: z.ZodString;
        received_time_field: z.ZodOptional<z.ZodString>;
        dedup: z.ZodEnum<{
            unknown: "unknown";
            deduplicated_on_record_id: "deduplicated_on_record_id";
            summed_on_sorting_key: "summed_on_sorting_key";
            append_only: "append_only";
            upsert_on_primary_key: "upsert_on_primary_key";
            recomputed_at_query: "recomputed_at_query";
        }>;
        revision: z.ZodEnum<{
            unknown: "unknown";
            immutable: "immutable";
            re_emit_higher_version: "re_emit_higher_version";
            in_place_update: "in_place_update";
            recomputed_from_source: "recomputed_from_source";
        }>;
        late_arrival: z.ZodEnum<{
            unknown: "unknown";
            accepted: "accepted";
            accepted_within_retention: "accepted_within_retention";
            rejected: "rejected";
        }>;
        correlation_keys: z.ZodOptional<z.ZodArray<z.ZodString>>;
        livemode_field: z.ZodOptional<z.ZodString>;
        policy_version_fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
        note: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    keys: z.ZodOptional<z.ZodArray<z.ZodObject<{
        key: z.ZodString;
        path: z.ZodString;
        resolution: z.ZodEnum<{
            source: "source";
            enriched: "enriched";
            absent: "absent";
        }>;
        note: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    measures: z.ZodOptional<z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        source: z.ZodString;
        unit: z.ZodEnum<{
            count: "count";
            currency_minor: "currency_minor";
            seconds: "seconds";
            ratio: "ratio";
            timestamp: "timestamp";
            usage_unit: "usage_unit";
            polymorphic: "polymorphic";
        }>;
        temporal: z.ZodEnum<{
            stock: "stock";
            flow: "flow";
            gauge: "gauge";
        }>;
        sign: z.ZodEnum<{
            signed: "signed";
            positive_magnitude: "positive_magnitude";
            unsigned: "unsigned";
        }>;
        aggregation_semantics: z.ZodEnum<{
            additive: "additive";
            semi_additive: "semi_additive";
            non_additive: "non_additive";
        }>;
        note: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    event_attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        path: z.ZodString;
        note: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
        kind: z.ZodEnum<{
            unavailable: "unavailable";
            ingested_event: "ingested_event";
            datasource: "datasource";
            control_plane_table: "control_plane_table";
            build: "build";
        }>;
        ref: z.ZodString;
        blocker: z.ZodOptional<z.ZodString>;
        note: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    build: z.ZodOptional<z.ZodObject<{
        kind: z.ZodEnum<{
            pipe: "pipe";
            unavailable: "unavailable";
            materialized_view: "materialized_view";
            worker: "worker";
            query_time: "query_time";
        }>;
        ref: z.ZodString;
        inputs: z.ZodArray<z.ZodString>;
        blocker: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    maturity: z.ZodOptional<z.ZodObject<{
        status: z.ZodEnum<{
            unavailable: "unavailable";
            declared: "declared";
        }>;
        horizon_field: z.ZodOptional<z.ZodString>;
        observed_through_field: z.ZodOptional<z.ZodString>;
        blocker: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    oracle_family: z.ZodOptional<z.ZodObject<{
        family: z.ZodEnum<{
            recurring: "recurring";
            none: "none";
            funnel: "funnel";
            presentation: "presentation";
            gate: "gate";
            revenue: "revenue";
            attribution: "attribution";
            event_count: "event_count";
            cohort: "cohort";
            lifecycle: "lifecycle";
            recurring_exact: "recurring_exact";
            receivable_exact: "receivable_exact";
            captured_payment_exact: "captured_payment_exact";
            read_through: "read_through";
        }>;
        blocker: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    policy_dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
        kind: z.ZodEnum<{
            reporting_currency: "reporting_currency";
            attribution: "attribution";
            lifecycle: "lifecycle";
            mrr: "mrr";
            engagement: "engagement";
        }>;
        stamped: z.ZodBoolean;
        blocker: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    deprecation: z.ZodOptional<z.ZodObject<{
        deprecated: z.ZodBoolean;
        replaced_by: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
}, z.core.$strip>;
declare const AnalyticsViewQuerySchema: z.ZodObject<{
    concept: z.ZodString;
    family: z.ZodEnum<{
        scalar: "scalar";
        timeseries: "timeseries";
        breakdown: "breakdown";
        funnel: "funnel";
        table: "table";
        timeline: "timeline";
    }>;
    metrics: z.ZodArray<z.ZodString>;
    group_by: z.ZodOptional<z.ZodArray<z.ZodString>>;
    time: z.ZodOptional<z.ZodObject<{
        dimension: z.ZodString;
        grain: z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            quarter: "quarter";
            hour: "hour";
        }>;
    }, z.core.$strict>>;
    filters_from: z.ZodOptional<z.ZodArray<z.ZodString>>;
    fixed_filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
        dimension: z.ZodString;
        operator: z.ZodEnum<{
            in: "in";
            eq: "eq";
            neq: "neq";
            not_in: "not_in";
            between: "between";
            gte: "gte";
            lte: "lte";
            is_null: "is_null";
            is_not_null: "is_not_null";
            contains: "contains";
        }>;
        value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
            preset: z.ZodString;
            compare: z.ZodOptional<z.ZodEnum<{
                none: "none";
                previous_period: "previous_period";
                previous_year: "previous_year";
                custom_period: "custom_period";
            }>>;
            compare_start: z.ZodOptional<z.ZodString>;
            compare_end: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>, z.ZodObject<{
            min: z.ZodOptional<z.ZodNumber>;
            max: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"date_range">;
            start: z.ZodString;
            end: z.ZodString;
        }, z.core.$strict>]>>;
    }, z.core.$strict>>>;
    compare: z.ZodOptional<z.ZodEnum<{
        none: "none";
        previous_period: "previous_period";
        previous_year: "previous_year";
        custom_period: "custom_period";
        segment: "segment";
        variant: "variant";
        scope: "scope";
        intervention: "intervention";
    }>>;
    compare_delta: z.ZodOptional<z.ZodEnum<{
        percentage: "percentage";
        absolute: "absolute";
    }>>;
    compare_segment: z.ZodOptional<z.ZodObject<{
        dimension: z.ZodString;
        baseline: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
        against: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
    }, z.core.$strict>>;
    compare_experiment: z.ZodOptional<z.ZodObject<{
        experiment: z.ZodString;
        baseline: z.ZodOptional<z.ZodString>;
        against: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>>;
    compare_scope: z.ZodOptional<z.ZodEnum<{
        total: "total";
        account_matched: "account_matched";
        revturbine_tracked: "revturbine_tracked";
        revturbine_influenced: "revturbine_influenced";
    }>>;
    compare_anchor: z.ZodOptional<z.ZodString>;
    order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
        field: z.ZodString;
        direction: z.ZodEnum<{
            asc: "asc";
            desc: "desc";
        }>;
    }, z.core.$strict>>>;
    limit: z.ZodOptional<z.ZodNumber>;
}, z.core.$strict>;
declare const AnalyticsRenderMetricSchema: z.ZodObject<{
    type: z.ZodLiteral<"metric">;
    value: z.ZodString;
    comparison: z.ZodOptional<z.ZodString>;
    format: z.ZodOptional<z.ZodObject<{
        type: z.ZodEnum<{
            number: "number";
            duration: "duration";
            currency: "currency";
            percent: "percent";
        }>;
        decimals: z.ZodOptional<z.ZodNumber>;
        compact: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strict>>;
}, z.core.$strict>;
declare const AnalyticsRenderCartesianSchema: z.ZodObject<{
    type: z.ZodLiteral<"cartesian">;
    mark: z.ZodEnum<{
        line: "line";
        area: "area";
        bar: "bar";
        stacked_bar: "stacked_bar";
        scatter: "scatter";
        marimekko: "marimekko";
    }>;
    encoding: z.ZodObject<{
        x: z.ZodString;
        y: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
        color: z.ZodOptional<z.ZodString>;
        facet: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    options: z.ZodOptional<z.ZodObject<{
        legend: z.ZodOptional<z.ZodEnum<{
            none: "none";
            top: "top";
            right: "right";
            bottom: "bottom";
            left: "left";
        }>>;
        value_labels: z.ZodOptional<z.ZodBoolean>;
        reference_lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
            value: z.ZodNumber;
            label: z.ZodOptional<z.ZodObject<{
                value: z.ZodString;
                key: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
        x_axis_format: z.ZodOptional<z.ZodObject<{
            type: z.ZodEnum<{
                number: "number";
                duration: "duration";
                currency: "currency";
                percent: "percent";
            }>;
            decimals: z.ZodOptional<z.ZodNumber>;
            compact: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strict>>;
        y_axis_format: z.ZodOptional<z.ZodObject<{
            type: z.ZodEnum<{
                number: "number";
                duration: "duration";
                currency: "currency";
                percent: "percent";
            }>;
            decimals: z.ZodOptional<z.ZodNumber>;
            compact: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strict>>;
        empty_state: z.ZodOptional<z.ZodEnum<{
            message: "message";
            blank: "blank";
        }>>;
    }, z.core.$strict>>;
}, z.core.$strict>;
declare const AnalyticsRenderFunnelSchema: z.ZodObject<{
    type: z.ZodLiteral<"funnel">;
    stages: z.ZodArray<z.ZodString>;
    split_by: z.ZodOptional<z.ZodString>;
}, z.core.$strict>;
declare const AnalyticsRenderTableSchema: z.ZodObject<{
    type: z.ZodLiteral<"table">;
    columns: z.ZodArray<z.ZodString>;
}, z.core.$strict>;
declare const AnalyticsRenderTimelineSchema: z.ZodObject<{
    type: z.ZodLiteral<"timeline">;
    timestamp: z.ZodString;
    event_type: z.ZodString;
}, z.core.$strict>;
declare const AnalyticsRenderRecommendationsSchema: z.ZodObject<{
    type: z.ZodLiteral<"recommendations">;
    presentation: z.ZodEnum<{
        list: "list";
        ranked_cards: "ranked_cards";
    }>;
}, z.core.$strict>;
declare const AnalyticsRenderSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    type: z.ZodLiteral<"metric">;
    value: z.ZodString;
    comparison: z.ZodOptional<z.ZodString>;
    format: z.ZodOptional<z.ZodObject<{
        type: z.ZodEnum<{
            number: "number";
            duration: "duration";
            currency: "currency";
            percent: "percent";
        }>;
        decimals: z.ZodOptional<z.ZodNumber>;
        compact: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strict>>;
}, z.core.$strict>, z.ZodObject<{
    type: z.ZodLiteral<"cartesian">;
    mark: z.ZodEnum<{
        line: "line";
        area: "area";
        bar: "bar";
        stacked_bar: "stacked_bar";
        scatter: "scatter";
        marimekko: "marimekko";
    }>;
    encoding: z.ZodObject<{
        x: z.ZodString;
        y: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
        color: z.ZodOptional<z.ZodString>;
        facet: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    options: z.ZodOptional<z.ZodObject<{
        legend: z.ZodOptional<z.ZodEnum<{
            none: "none";
            top: "top";
            right: "right";
            bottom: "bottom";
            left: "left";
        }>>;
        value_labels: z.ZodOptional<z.ZodBoolean>;
        reference_lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
            value: z.ZodNumber;
            label: z.ZodOptional<z.ZodObject<{
                value: z.ZodString;
                key: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
        x_axis_format: z.ZodOptional<z.ZodObject<{
            type: z.ZodEnum<{
                number: "number";
                duration: "duration";
                currency: "currency";
                percent: "percent";
            }>;
            decimals: z.ZodOptional<z.ZodNumber>;
            compact: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strict>>;
        y_axis_format: z.ZodOptional<z.ZodObject<{
            type: z.ZodEnum<{
                number: "number";
                duration: "duration";
                currency: "currency";
                percent: "percent";
            }>;
            decimals: z.ZodOptional<z.ZodNumber>;
            compact: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strict>>;
        empty_state: z.ZodOptional<z.ZodEnum<{
            message: "message";
            blank: "blank";
        }>>;
    }, z.core.$strict>>;
}, z.core.$strict>, z.ZodObject<{
    type: z.ZodLiteral<"funnel">;
    stages: z.ZodArray<z.ZodString>;
    split_by: z.ZodOptional<z.ZodString>;
}, z.core.$strict>, z.ZodObject<{
    type: z.ZodLiteral<"table">;
    columns: z.ZodArray<z.ZodString>;
}, z.core.$strict>, z.ZodObject<{
    type: z.ZodLiteral<"timeline">;
    timestamp: z.ZodString;
    event_type: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    type: z.ZodLiteral<"recommendations">;
    presentation: z.ZodEnum<{
        list: "list";
        ranked_cards: "ranked_cards";
    }>;
}, z.core.$strict>], "type">;
declare const AnalyticsViewFilterSchema: z.ZodObject<{
    id: z.ZodString;
    dimension: z.ZodString;
    control: z.ZodEnum<{
        date_range: "date_range";
        single_select: "single_select";
        multi_select: "multi_select";
        search_select: "search_select";
        number_range: "number_range";
        entity_picker: "entity_picker";
        toggle: "toggle";
    }>;
    label: z.ZodOptional<z.ZodObject<{
        value: z.ZodString;
        key: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>>;
    operators: z.ZodArray<z.ZodEnum<{
        in: "in";
        eq: "eq";
        neq: "neq";
        not_in: "not_in";
        between: "between";
        gte: "gte";
        lte: "lte";
        is_null: "is_null";
        is_not_null: "is_not_null";
        contains: "contains";
    }>>;
    default_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
        preset: z.ZodString;
        compare: z.ZodOptional<z.ZodEnum<{
            none: "none";
            previous_period: "previous_period";
            previous_year: "previous_year";
            custom_period: "custom_period";
        }>>;
        compare_start: z.ZodOptional<z.ZodString>;
        compare_end: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>, z.ZodObject<{
        min: z.ZodOptional<z.ZodNumber>;
        max: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"date_range">;
        start: z.ZodString;
        end: z.ZodString;
    }, z.core.$strict>]>>;
    required: z.ZodDefault<z.ZodBoolean>;
    pinned: z.ZodDefault<z.ZodBoolean>;
    applies_to: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>;
    depends_on: z.ZodOptional<z.ZodString>;
    url_safe: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strict>;
declare const AnalyticsViewLayoutSchema: z.ZodObject<{
    type: z.ZodLiteral<"grid">;
    columns: z.ZodDefault<z.ZodNumber>;
    items: z.ZodArray<z.ZodObject<{
        block_id: z.ZodString;
        x: z.ZodNumber;
        y: z.ZodNumber;
        w: z.ZodNumber;
        h: z.ZodNumber;
    }, z.core.$strict>>;
}, z.core.$strict>;
declare const AnalyticsViewBlockSchema: z.ZodObject<{
    id: z.ZodString;
    title: z.ZodOptional<z.ZodObject<{
        value: z.ZodString;
        key: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>>;
    description: z.ZodOptional<z.ZodObject<{
        value: z.ZodString;
        key: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>>;
    query: z.ZodObject<{
        concept: z.ZodString;
        family: z.ZodEnum<{
            scalar: "scalar";
            timeseries: "timeseries";
            breakdown: "breakdown";
            funnel: "funnel";
            table: "table";
            timeline: "timeline";
        }>;
        metrics: z.ZodArray<z.ZodString>;
        group_by: z.ZodOptional<z.ZodArray<z.ZodString>>;
        time: z.ZodOptional<z.ZodObject<{
            dimension: z.ZodString;
            grain: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                quarter: "quarter";
                hour: "hour";
            }>;
        }, z.core.$strict>>;
        filters_from: z.ZodOptional<z.ZodArray<z.ZodString>>;
        fixed_filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
            dimension: z.ZodString;
            operator: z.ZodEnum<{
                in: "in";
                eq: "eq";
                neq: "neq";
                not_in: "not_in";
                between: "between";
                gte: "gte";
                lte: "lte";
                is_null: "is_null";
                is_not_null: "is_not_null";
                contains: "contains";
            }>;
            value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
                preset: z.ZodString;
                compare: z.ZodOptional<z.ZodEnum<{
                    none: "none";
                    previous_period: "previous_period";
                    previous_year: "previous_year";
                    custom_period: "custom_period";
                }>>;
                compare_start: z.ZodOptional<z.ZodString>;
                compare_end: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>, z.ZodObject<{
                min: z.ZodOptional<z.ZodNumber>;
                max: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"date_range">;
                start: z.ZodString;
                end: z.ZodString;
            }, z.core.$strict>]>>;
        }, z.core.$strict>>>;
        compare: z.ZodOptional<z.ZodEnum<{
            none: "none";
            previous_period: "previous_period";
            previous_year: "previous_year";
            custom_period: "custom_period";
            segment: "segment";
            variant: "variant";
            scope: "scope";
            intervention: "intervention";
        }>>;
        compare_delta: z.ZodOptional<z.ZodEnum<{
            percentage: "percentage";
            absolute: "absolute";
        }>>;
        compare_segment: z.ZodOptional<z.ZodObject<{
            dimension: z.ZodString;
            baseline: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
            against: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
        }, z.core.$strict>>;
        compare_experiment: z.ZodOptional<z.ZodObject<{
            experiment: z.ZodString;
            baseline: z.ZodOptional<z.ZodString>;
            against: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>>;
        compare_scope: z.ZodOptional<z.ZodEnum<{
            total: "total";
            account_matched: "account_matched";
            revturbine_tracked: "revturbine_tracked";
            revturbine_influenced: "revturbine_influenced";
        }>>;
        compare_anchor: z.ZodOptional<z.ZodString>;
        order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
            field: z.ZodString;
            direction: z.ZodEnum<{
                asc: "asc";
                desc: "desc";
            }>;
        }, z.core.$strict>>>;
        limit: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strict>;
    render: z.ZodDiscriminatedUnion<[z.ZodObject<{
        type: z.ZodLiteral<"metric">;
        value: z.ZodString;
        comparison: z.ZodOptional<z.ZodString>;
        format: z.ZodOptional<z.ZodObject<{
            type: z.ZodEnum<{
                number: "number";
                duration: "duration";
                currency: "currency";
                percent: "percent";
            }>;
            decimals: z.ZodOptional<z.ZodNumber>;
            compact: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strict>>;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"cartesian">;
        mark: z.ZodEnum<{
            line: "line";
            area: "area";
            bar: "bar";
            stacked_bar: "stacked_bar";
            scatter: "scatter";
            marimekko: "marimekko";
        }>;
        encoding: z.ZodObject<{
            x: z.ZodString;
            y: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
            color: z.ZodOptional<z.ZodString>;
            facet: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        options: z.ZodOptional<z.ZodObject<{
            legend: z.ZodOptional<z.ZodEnum<{
                none: "none";
                top: "top";
                right: "right";
                bottom: "bottom";
                left: "left";
            }>>;
            value_labels: z.ZodOptional<z.ZodBoolean>;
            reference_lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
                value: z.ZodNumber;
                label: z.ZodOptional<z.ZodObject<{
                    value: z.ZodString;
                    key: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>>>;
            x_axis_format: z.ZodOptional<z.ZodObject<{
                type: z.ZodEnum<{
                    number: "number";
                    duration: "duration";
                    currency: "currency";
                    percent: "percent";
                }>;
                decimals: z.ZodOptional<z.ZodNumber>;
                compact: z.ZodOptional<z.ZodBoolean>;
            }, z.core.$strict>>;
            y_axis_format: z.ZodOptional<z.ZodObject<{
                type: z.ZodEnum<{
                    number: "number";
                    duration: "duration";
                    currency: "currency";
                    percent: "percent";
                }>;
                decimals: z.ZodOptional<z.ZodNumber>;
                compact: z.ZodOptional<z.ZodBoolean>;
            }, z.core.$strict>>;
            empty_state: z.ZodOptional<z.ZodEnum<{
                message: "message";
                blank: "blank";
            }>>;
        }, z.core.$strict>>;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"funnel">;
        stages: z.ZodArray<z.ZodString>;
        split_by: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"table">;
        columns: z.ZodArray<z.ZodString>;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"timeline">;
        timestamp: z.ZodString;
        event_type: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"recommendations">;
        presentation: z.ZodEnum<{
            list: "list";
            ranked_cards: "ranked_cards";
        }>;
    }, z.core.$strict>], "type">;
}, z.core.$strict>;
declare const AnalyticsViewHandoffSchema: z.ZodObject<{
    id: z.ZodString;
    label: z.ZodObject<{
        value: z.ZodString;
        key: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    target: z.ZodString;
    bindings: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strict>;
declare const AnalyticsCustomizationPolicySchema: z.ZodObject<{
    allow: z.ZodDefault<z.ZodArray<z.ZodEnum<{
        title: "title";
        sort: "sort";
        limit: "limit";
        source_scope: "source_scope";
        filter_defaults: "filter_defaults";
        metric_selection: "metric_selection";
        grouping: "grouping";
        compatible_renderer: "compatible_renderer";
        block_visibility: "block_visibility";
        layout: "layout";
        handoff_target: "handoff_target";
        hidden_scope: "hidden_scope";
        raw_expression: "raw_expression";
        cross_filter: "cross_filter";
    }>>>;
    deny: z.ZodDefault<z.ZodArray<z.ZodEnum<{
        title: "title";
        sort: "sort";
        limit: "limit";
        source_scope: "source_scope";
        filter_defaults: "filter_defaults";
        metric_selection: "metric_selection";
        grouping: "grouping";
        compatible_renderer: "compatible_renderer";
        block_visibility: "block_visibility";
        layout: "layout";
        handoff_target: "handoff_target";
        hidden_scope: "hidden_scope";
        raw_expression: "raw_expression";
        cross_filter: "cross_filter";
    }>>>;
}, z.core.$strict>;
/** Version of the analytics-view document contract itself. */
declare const ANALYTICS_VIEW_SCHEMA_VERSION = "1.0";
declare const AnalyticsViewSchema: z.ZodObject<{
    kind: z.ZodLiteral<"revturbine.analytics-view">;
    schema_version: z.ZodString;
    id: z.ZodString;
    revision: z.ZodNumber;
    title: z.ZodObject<{
        value: z.ZodString;
        key: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    description: z.ZodOptional<z.ZodObject<{
        value: z.ZodString;
        key: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>>;
    analytical_unit: z.ZodEnum<{
        user: "user";
        account: "account";
        billing_unit: "billing_unit";
        organization: "organization";
    }>;
    base_template: z.ZodOptional<z.ZodObject<{
        id: z.ZodString;
        version: z.ZodNumber;
    }, z.core.$strict>>;
    catalog_version: z.ZodString;
    filters: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        dimension: z.ZodString;
        control: z.ZodEnum<{
            date_range: "date_range";
            single_select: "single_select";
            multi_select: "multi_select";
            search_select: "search_select";
            number_range: "number_range";
            entity_picker: "entity_picker";
            toggle: "toggle";
        }>;
        label: z.ZodOptional<z.ZodObject<{
            value: z.ZodString;
            key: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>>;
        operators: z.ZodArray<z.ZodEnum<{
            in: "in";
            eq: "eq";
            neq: "neq";
            not_in: "not_in";
            between: "between";
            gte: "gte";
            lte: "lte";
            is_null: "is_null";
            is_not_null: "is_not_null";
            contains: "contains";
        }>>;
        default_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
            preset: z.ZodString;
            compare: z.ZodOptional<z.ZodEnum<{
                none: "none";
                previous_period: "previous_period";
                previous_year: "previous_year";
                custom_period: "custom_period";
            }>>;
            compare_start: z.ZodOptional<z.ZodString>;
            compare_end: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>, z.ZodObject<{
            min: z.ZodOptional<z.ZodNumber>;
            max: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"date_range">;
            start: z.ZodString;
            end: z.ZodString;
        }, z.core.$strict>]>>;
        required: z.ZodDefault<z.ZodBoolean>;
        pinned: z.ZodDefault<z.ZodBoolean>;
        applies_to: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>;
        depends_on: z.ZodOptional<z.ZodString>;
        url_safe: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strict>>;
    layout: z.ZodObject<{
        type: z.ZodLiteral<"grid">;
        columns: z.ZodDefault<z.ZodNumber>;
        items: z.ZodArray<z.ZodObject<{
            block_id: z.ZodString;
            x: z.ZodNumber;
            y: z.ZodNumber;
            w: z.ZodNumber;
            h: z.ZodNumber;
        }, z.core.$strict>>;
    }, z.core.$strict>;
    blocks: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        title: z.ZodOptional<z.ZodObject<{
            value: z.ZodString;
            key: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>>;
        description: z.ZodOptional<z.ZodObject<{
            value: z.ZodString;
            key: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>>;
        query: z.ZodObject<{
            concept: z.ZodString;
            family: z.ZodEnum<{
                scalar: "scalar";
                timeseries: "timeseries";
                breakdown: "breakdown";
                funnel: "funnel";
                table: "table";
                timeline: "timeline";
            }>;
            metrics: z.ZodArray<z.ZodString>;
            group_by: z.ZodOptional<z.ZodArray<z.ZodString>>;
            time: z.ZodOptional<z.ZodObject<{
                dimension: z.ZodString;
                grain: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    quarter: "quarter";
                    hour: "hour";
                }>;
            }, z.core.$strict>>;
            filters_from: z.ZodOptional<z.ZodArray<z.ZodString>>;
            fixed_filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
                dimension: z.ZodString;
                operator: z.ZodEnum<{
                    in: "in";
                    eq: "eq";
                    neq: "neq";
                    not_in: "not_in";
                    between: "between";
                    gte: "gte";
                    lte: "lte";
                    is_null: "is_null";
                    is_not_null: "is_not_null";
                    contains: "contains";
                }>;
                value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
                    preset: z.ZodString;
                    compare: z.ZodOptional<z.ZodEnum<{
                        none: "none";
                        previous_period: "previous_period";
                        previous_year: "previous_year";
                        custom_period: "custom_period";
                    }>>;
                    compare_start: z.ZodOptional<z.ZodString>;
                    compare_end: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>, z.ZodObject<{
                    min: z.ZodOptional<z.ZodNumber>;
                    max: z.ZodOptional<z.ZodNumber>;
                }, z.core.$strict>, z.ZodObject<{
                    type: z.ZodLiteral<"date_range">;
                    start: z.ZodString;
                    end: z.ZodString;
                }, z.core.$strict>]>>;
            }, z.core.$strict>>>;
            compare: z.ZodOptional<z.ZodEnum<{
                none: "none";
                previous_period: "previous_period";
                previous_year: "previous_year";
                custom_period: "custom_period";
                segment: "segment";
                variant: "variant";
                scope: "scope";
                intervention: "intervention";
            }>>;
            compare_delta: z.ZodOptional<z.ZodEnum<{
                percentage: "percentage";
                absolute: "absolute";
            }>>;
            compare_segment: z.ZodOptional<z.ZodObject<{
                dimension: z.ZodString;
                baseline: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
                against: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
            }, z.core.$strict>>;
            compare_experiment: z.ZodOptional<z.ZodObject<{
                experiment: z.ZodString;
                baseline: z.ZodOptional<z.ZodString>;
                against: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>>;
            compare_scope: z.ZodOptional<z.ZodEnum<{
                total: "total";
                account_matched: "account_matched";
                revturbine_tracked: "revturbine_tracked";
                revturbine_influenced: "revturbine_influenced";
            }>>;
            compare_anchor: z.ZodOptional<z.ZodString>;
            order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
                field: z.ZodString;
                direction: z.ZodEnum<{
                    asc: "asc";
                    desc: "desc";
                }>;
            }, z.core.$strict>>>;
            limit: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strict>;
        render: z.ZodDiscriminatedUnion<[z.ZodObject<{
            type: z.ZodLiteral<"metric">;
            value: z.ZodString;
            comparison: z.ZodOptional<z.ZodString>;
            format: z.ZodOptional<z.ZodObject<{
                type: z.ZodEnum<{
                    number: "number";
                    duration: "duration";
                    currency: "currency";
                    percent: "percent";
                }>;
                decimals: z.ZodOptional<z.ZodNumber>;
                compact: z.ZodOptional<z.ZodBoolean>;
            }, z.core.$strict>>;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"cartesian">;
            mark: z.ZodEnum<{
                line: "line";
                area: "area";
                bar: "bar";
                stacked_bar: "stacked_bar";
                scatter: "scatter";
                marimekko: "marimekko";
            }>;
            encoding: z.ZodObject<{
                x: z.ZodString;
                y: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
                color: z.ZodOptional<z.ZodString>;
                facet: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            options: z.ZodOptional<z.ZodObject<{
                legend: z.ZodOptional<z.ZodEnum<{
                    none: "none";
                    top: "top";
                    right: "right";
                    bottom: "bottom";
                    left: "left";
                }>>;
                value_labels: z.ZodOptional<z.ZodBoolean>;
                reference_lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
                    value: z.ZodNumber;
                    label: z.ZodOptional<z.ZodObject<{
                        value: z.ZodString;
                        key: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>>>;
                x_axis_format: z.ZodOptional<z.ZodObject<{
                    type: z.ZodEnum<{
                        number: "number";
                        duration: "duration";
                        currency: "currency";
                        percent: "percent";
                    }>;
                    decimals: z.ZodOptional<z.ZodNumber>;
                    compact: z.ZodOptional<z.ZodBoolean>;
                }, z.core.$strict>>;
                y_axis_format: z.ZodOptional<z.ZodObject<{
                    type: z.ZodEnum<{
                        number: "number";
                        duration: "duration";
                        currency: "currency";
                        percent: "percent";
                    }>;
                    decimals: z.ZodOptional<z.ZodNumber>;
                    compact: z.ZodOptional<z.ZodBoolean>;
                }, z.core.$strict>>;
                empty_state: z.ZodOptional<z.ZodEnum<{
                    message: "message";
                    blank: "blank";
                }>>;
            }, z.core.$strict>>;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"funnel">;
            stages: z.ZodArray<z.ZodString>;
            split_by: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"table">;
            columns: z.ZodArray<z.ZodString>;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"timeline">;
            timestamp: z.ZodString;
            event_type: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"recommendations">;
            presentation: z.ZodEnum<{
                list: "list";
                ranked_cards: "ranked_cards";
            }>;
        }, z.core.$strict>], "type">;
    }, z.core.$strict>>;
    handoffs: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        label: z.ZodObject<{
            value: z.ZodString;
            key: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        target: z.ZodString;
        bindings: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
    }, z.core.$strict>>>;
    customization_policy: z.ZodObject<{
        allow: z.ZodDefault<z.ZodArray<z.ZodEnum<{
            title: "title";
            sort: "sort";
            limit: "limit";
            source_scope: "source_scope";
            filter_defaults: "filter_defaults";
            metric_selection: "metric_selection";
            grouping: "grouping";
            compatible_renderer: "compatible_renderer";
            block_visibility: "block_visibility";
            layout: "layout";
            handoff_target: "handoff_target";
            hidden_scope: "hidden_scope";
            raw_expression: "raw_expression";
            cross_filter: "cross_filter";
        }>>>;
        deny: z.ZodDefault<z.ZodArray<z.ZodEnum<{
            title: "title";
            sort: "sort";
            limit: "limit";
            source_scope: "source_scope";
            filter_defaults: "filter_defaults";
            metric_selection: "metric_selection";
            grouping: "grouping";
            compatible_renderer: "compatible_renderer";
            block_visibility: "block_visibility";
            layout: "layout";
            handoff_target: "handoff_target";
            hidden_scope: "hidden_scope";
            raw_expression: "raw_expression";
            cross_filter: "cross_filter";
        }>>>;
    }, z.core.$strict>;
}, z.core.$strict>;
declare const AnalyticsViewFilterDraftSchema: z.ZodObject<{
    id: z.ZodOptional<z.ZodString>;
    dimension: z.ZodString;
    control: z.ZodOptional<z.ZodEnum<{
        date_range: "date_range";
        single_select: "single_select";
        multi_select: "multi_select";
        search_select: "search_select";
        number_range: "number_range";
        entity_picker: "entity_picker";
        toggle: "toggle";
    }>>;
    label: z.ZodOptional<z.ZodObject<{
        value: z.ZodString;
        key: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>>;
    operators: z.ZodOptional<z.ZodArray<z.ZodEnum<{
        in: "in";
        eq: "eq";
        neq: "neq";
        not_in: "not_in";
        between: "between";
        gte: "gte";
        lte: "lte";
        is_null: "is_null";
        is_not_null: "is_not_null";
        contains: "contains";
    }>>>;
    default_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
        preset: z.ZodString;
        compare: z.ZodOptional<z.ZodEnum<{
            none: "none";
            previous_period: "previous_period";
            previous_year: "previous_year";
            custom_period: "custom_period";
        }>>;
        compare_start: z.ZodOptional<z.ZodString>;
        compare_end: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>, z.ZodObject<{
        min: z.ZodOptional<z.ZodNumber>;
        max: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"date_range">;
        start: z.ZodString;
        end: z.ZodString;
    }, z.core.$strict>]>>;
    required: z.ZodOptional<z.ZodBoolean>;
    pinned: z.ZodOptional<z.ZodBoolean>;
    applies_to: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>;
}, z.core.$strict>;
/**
 * Draft block — the compact convenience shape: query fields sit flat on the
 * block (§4.1's example) and `render` may be `auto`. The compiler nests them
 * into a canonical `AnalyticsViewBlock`; the two forms never differ
 * semantically (§17.9).
 */
declare const AnalyticsViewBlockDraftSchema: z.ZodObject<{
    id: z.ZodOptional<z.ZodString>;
    title: z.ZodOptional<z.ZodObject<{
        value: z.ZodString;
        key: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>>;
    concept: z.ZodString;
    family: z.ZodEnum<{
        scalar: "scalar";
        timeseries: "timeseries";
        breakdown: "breakdown";
        funnel: "funnel";
        table: "table";
        timeline: "timeline";
    }>;
    metrics: z.ZodArray<z.ZodString>;
    group_by: z.ZodOptional<z.ZodArray<z.ZodString>>;
    time: z.ZodOptional<z.ZodObject<{
        dimension: z.ZodString;
        grain: z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            quarter: "quarter";
            hour: "hour";
        }>;
    }, z.core.$strict>>;
    filters_from: z.ZodOptional<z.ZodArray<z.ZodString>>;
    fixed_filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
        dimension: z.ZodString;
        operator: z.ZodEnum<{
            in: "in";
            eq: "eq";
            neq: "neq";
            not_in: "not_in";
            between: "between";
            gte: "gte";
            lte: "lte";
            is_null: "is_null";
            is_not_null: "is_not_null";
            contains: "contains";
        }>;
        value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
            preset: z.ZodString;
            compare: z.ZodOptional<z.ZodEnum<{
                none: "none";
                previous_period: "previous_period";
                previous_year: "previous_year";
                custom_period: "custom_period";
            }>>;
            compare_start: z.ZodOptional<z.ZodString>;
            compare_end: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>, z.ZodObject<{
            min: z.ZodOptional<z.ZodNumber>;
            max: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"date_range">;
            start: z.ZodString;
            end: z.ZodString;
        }, z.core.$strict>]>>;
    }, z.core.$strict>>>;
    compare: z.ZodOptional<z.ZodEnum<{
        none: "none";
        previous_period: "previous_period";
        previous_year: "previous_year";
        custom_period: "custom_period";
        segment: "segment";
        variant: "variant";
        scope: "scope";
        intervention: "intervention";
    }>>;
    compare_delta: z.ZodOptional<z.ZodEnum<{
        percentage: "percentage";
        absolute: "absolute";
    }>>;
    compare_segment: z.ZodOptional<z.ZodObject<{
        dimension: z.ZodString;
        baseline: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
        against: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
    }, z.core.$strict>>;
    compare_experiment: z.ZodOptional<z.ZodObject<{
        experiment: z.ZodString;
        baseline: z.ZodOptional<z.ZodString>;
        against: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>>;
    compare_scope: z.ZodOptional<z.ZodEnum<{
        total: "total";
        account_matched: "account_matched";
        revturbine_tracked: "revturbine_tracked";
        revturbine_influenced: "revturbine_influenced";
    }>>;
    compare_anchor: z.ZodOptional<z.ZodString>;
    order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
        field: z.ZodString;
        direction: z.ZodEnum<{
            asc: "asc";
            desc: "desc";
        }>;
    }, z.core.$strict>>>;
    limit: z.ZodOptional<z.ZodNumber>;
    render: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodDiscriminatedUnion<[z.ZodObject<{
        type: z.ZodLiteral<"metric">;
        value: z.ZodString;
        comparison: z.ZodOptional<z.ZodString>;
        format: z.ZodOptional<z.ZodObject<{
            type: z.ZodEnum<{
                number: "number";
                duration: "duration";
                currency: "currency";
                percent: "percent";
            }>;
            decimals: z.ZodOptional<z.ZodNumber>;
            compact: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strict>>;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"cartesian">;
        mark: z.ZodEnum<{
            line: "line";
            area: "area";
            bar: "bar";
            stacked_bar: "stacked_bar";
            scatter: "scatter";
            marimekko: "marimekko";
        }>;
        encoding: z.ZodObject<{
            x: z.ZodString;
            y: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
            color: z.ZodOptional<z.ZodString>;
            facet: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        options: z.ZodOptional<z.ZodObject<{
            legend: z.ZodOptional<z.ZodEnum<{
                none: "none";
                top: "top";
                right: "right";
                bottom: "bottom";
                left: "left";
            }>>;
            value_labels: z.ZodOptional<z.ZodBoolean>;
            reference_lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
                value: z.ZodNumber;
                label: z.ZodOptional<z.ZodObject<{
                    value: z.ZodString;
                    key: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>>>;
            x_axis_format: z.ZodOptional<z.ZodObject<{
                type: z.ZodEnum<{
                    number: "number";
                    duration: "duration";
                    currency: "currency";
                    percent: "percent";
                }>;
                decimals: z.ZodOptional<z.ZodNumber>;
                compact: z.ZodOptional<z.ZodBoolean>;
            }, z.core.$strict>>;
            y_axis_format: z.ZodOptional<z.ZodObject<{
                type: z.ZodEnum<{
                    number: "number";
                    duration: "duration";
                    currency: "currency";
                    percent: "percent";
                }>;
                decimals: z.ZodOptional<z.ZodNumber>;
                compact: z.ZodOptional<z.ZodBoolean>;
            }, z.core.$strict>>;
            empty_state: z.ZodOptional<z.ZodEnum<{
                message: "message";
                blank: "blank";
            }>>;
        }, z.core.$strict>>;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"funnel">;
        stages: z.ZodArray<z.ZodString>;
        split_by: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"table">;
        columns: z.ZodArray<z.ZodString>;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"timeline">;
        timestamp: z.ZodString;
        event_type: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"recommendations">;
        presentation: z.ZodEnum<{
            list: "list";
            ranked_cards: "ranked_cards";
        }>;
    }, z.core.$strict>], "type">]>>;
}, z.core.$strict>;
declare const AnalyticsViewHandoffDraftSchema: z.ZodObject<{
    id: z.ZodOptional<z.ZodString>;
    label: z.ZodOptional<z.ZodObject<{
        value: z.ZodString;
        key: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>>;
    target: z.ZodString;
    bindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strict>;
declare const AnalyticsViewDraftSchema: z.ZodObject<{
    kind: z.ZodLiteral<"revturbine.analytics-view-draft">;
    schema_version: z.ZodString;
    title: z.ZodObject<{
        value: z.ZodString;
        key: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    analytical_unit: z.ZodOptional<z.ZodEnum<{
        user: "user";
        account: "account";
        billing_unit: "billing_unit";
        organization: "organization";
    }>>;
    filters: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"recommended">, z.ZodArray<z.ZodObject<{
        id: z.ZodOptional<z.ZodString>;
        dimension: z.ZodString;
        control: z.ZodOptional<z.ZodEnum<{
            date_range: "date_range";
            single_select: "single_select";
            multi_select: "multi_select";
            search_select: "search_select";
            number_range: "number_range";
            entity_picker: "entity_picker";
            toggle: "toggle";
        }>>;
        label: z.ZodOptional<z.ZodObject<{
            value: z.ZodString;
            key: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>>;
        operators: z.ZodOptional<z.ZodArray<z.ZodEnum<{
            in: "in";
            eq: "eq";
            neq: "neq";
            not_in: "not_in";
            between: "between";
            gte: "gte";
            lte: "lte";
            is_null: "is_null";
            is_not_null: "is_not_null";
            contains: "contains";
        }>>>;
        default_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
            preset: z.ZodString;
            compare: z.ZodOptional<z.ZodEnum<{
                none: "none";
                previous_period: "previous_period";
                previous_year: "previous_year";
                custom_period: "custom_period";
            }>>;
            compare_start: z.ZodOptional<z.ZodString>;
            compare_end: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>, z.ZodObject<{
            min: z.ZodOptional<z.ZodNumber>;
            max: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"date_range">;
            start: z.ZodString;
            end: z.ZodString;
        }, z.core.$strict>]>>;
        required: z.ZodOptional<z.ZodBoolean>;
        pinned: z.ZodOptional<z.ZodBoolean>;
        applies_to: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>;
    }, z.core.$strict>>]>>;
    layout: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodObject<{
        type: z.ZodLiteral<"grid">;
        columns: z.ZodDefault<z.ZodNumber>;
        items: z.ZodArray<z.ZodObject<{
            block_id: z.ZodString;
            x: z.ZodNumber;
            y: z.ZodNumber;
            w: z.ZodNumber;
            h: z.ZodNumber;
        }, z.core.$strict>>;
    }, z.core.$strict>]>>;
    blocks: z.ZodArray<z.ZodObject<{
        id: z.ZodOptional<z.ZodString>;
        title: z.ZodOptional<z.ZodObject<{
            value: z.ZodString;
            key: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>>;
        concept: z.ZodString;
        family: z.ZodEnum<{
            scalar: "scalar";
            timeseries: "timeseries";
            breakdown: "breakdown";
            funnel: "funnel";
            table: "table";
            timeline: "timeline";
        }>;
        metrics: z.ZodArray<z.ZodString>;
        group_by: z.ZodOptional<z.ZodArray<z.ZodString>>;
        time: z.ZodOptional<z.ZodObject<{
            dimension: z.ZodString;
            grain: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                quarter: "quarter";
                hour: "hour";
            }>;
        }, z.core.$strict>>;
        filters_from: z.ZodOptional<z.ZodArray<z.ZodString>>;
        fixed_filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
            dimension: z.ZodString;
            operator: z.ZodEnum<{
                in: "in";
                eq: "eq";
                neq: "neq";
                not_in: "not_in";
                between: "between";
                gte: "gte";
                lte: "lte";
                is_null: "is_null";
                is_not_null: "is_not_null";
                contains: "contains";
            }>;
            value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
                preset: z.ZodString;
                compare: z.ZodOptional<z.ZodEnum<{
                    none: "none";
                    previous_period: "previous_period";
                    previous_year: "previous_year";
                    custom_period: "custom_period";
                }>>;
                compare_start: z.ZodOptional<z.ZodString>;
                compare_end: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>, z.ZodObject<{
                min: z.ZodOptional<z.ZodNumber>;
                max: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"date_range">;
                start: z.ZodString;
                end: z.ZodString;
            }, z.core.$strict>]>>;
        }, z.core.$strict>>>;
        compare: z.ZodOptional<z.ZodEnum<{
            none: "none";
            previous_period: "previous_period";
            previous_year: "previous_year";
            custom_period: "custom_period";
            segment: "segment";
            variant: "variant";
            scope: "scope";
            intervention: "intervention";
        }>>;
        compare_delta: z.ZodOptional<z.ZodEnum<{
            percentage: "percentage";
            absolute: "absolute";
        }>>;
        compare_segment: z.ZodOptional<z.ZodObject<{
            dimension: z.ZodString;
            baseline: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
            against: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
        }, z.core.$strict>>;
        compare_experiment: z.ZodOptional<z.ZodObject<{
            experiment: z.ZodString;
            baseline: z.ZodOptional<z.ZodString>;
            against: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>>;
        compare_scope: z.ZodOptional<z.ZodEnum<{
            total: "total";
            account_matched: "account_matched";
            revturbine_tracked: "revturbine_tracked";
            revturbine_influenced: "revturbine_influenced";
        }>>;
        compare_anchor: z.ZodOptional<z.ZodString>;
        order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
            field: z.ZodString;
            direction: z.ZodEnum<{
                asc: "asc";
                desc: "desc";
            }>;
        }, z.core.$strict>>>;
        limit: z.ZodOptional<z.ZodNumber>;
        render: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodDiscriminatedUnion<[z.ZodObject<{
            type: z.ZodLiteral<"metric">;
            value: z.ZodString;
            comparison: z.ZodOptional<z.ZodString>;
            format: z.ZodOptional<z.ZodObject<{
                type: z.ZodEnum<{
                    number: "number";
                    duration: "duration";
                    currency: "currency";
                    percent: "percent";
                }>;
                decimals: z.ZodOptional<z.ZodNumber>;
                compact: z.ZodOptional<z.ZodBoolean>;
            }, z.core.$strict>>;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"cartesian">;
            mark: z.ZodEnum<{
                line: "line";
                area: "area";
                bar: "bar";
                stacked_bar: "stacked_bar";
                scatter: "scatter";
                marimekko: "marimekko";
            }>;
            encoding: z.ZodObject<{
                x: z.ZodString;
                y: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
                color: z.ZodOptional<z.ZodString>;
                facet: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            options: z.ZodOptional<z.ZodObject<{
                legend: z.ZodOptional<z.ZodEnum<{
                    none: "none";
                    top: "top";
                    right: "right";
                    bottom: "bottom";
                    left: "left";
                }>>;
                value_labels: z.ZodOptional<z.ZodBoolean>;
                reference_lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
                    value: z.ZodNumber;
                    label: z.ZodOptional<z.ZodObject<{
                        value: z.ZodString;
                        key: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>>>;
                x_axis_format: z.ZodOptional<z.ZodObject<{
                    type: z.ZodEnum<{
                        number: "number";
                        duration: "duration";
                        currency: "currency";
                        percent: "percent";
                    }>;
                    decimals: z.ZodOptional<z.ZodNumber>;
                    compact: z.ZodOptional<z.ZodBoolean>;
                }, z.core.$strict>>;
                y_axis_format: z.ZodOptional<z.ZodObject<{
                    type: z.ZodEnum<{
                        number: "number";
                        duration: "duration";
                        currency: "currency";
                        percent: "percent";
                    }>;
                    decimals: z.ZodOptional<z.ZodNumber>;
                    compact: z.ZodOptional<z.ZodBoolean>;
                }, z.core.$strict>>;
                empty_state: z.ZodOptional<z.ZodEnum<{
                    message: "message";
                    blank: "blank";
                }>>;
            }, z.core.$strict>>;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"funnel">;
            stages: z.ZodArray<z.ZodString>;
            split_by: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"table">;
            columns: z.ZodArray<z.ZodString>;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"timeline">;
            timestamp: z.ZodString;
            event_type: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"recommendations">;
            presentation: z.ZodEnum<{
                list: "list";
                ranked_cards: "ranked_cards";
            }>;
        }, z.core.$strict>], "type">]>>;
    }, z.core.$strict>>;
    handoffs: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"recommended">, z.ZodArray<z.ZodObject<{
        id: z.ZodOptional<z.ZodString>;
        label: z.ZodOptional<z.ZodObject<{
            value: z.ZodString;
            key: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>>;
        target: z.ZodString;
        bindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    }, z.core.$strict>>]>>;
    visibility: z.ZodOptional<z.ZodEnum<{
        private: "private";
        team: "team";
        tenant: "tenant";
    }>>;
}, z.core.$strict>;
declare const AnalyticsSuggestedPatchOpSchema: z.ZodObject<{
    op: z.ZodEnum<{
        replace: "replace";
        add: "add";
        remove: "remove";
    }>;
    path: z.ZodString;
    value: z.ZodOptional<z.ZodUnknown>;
}, z.core.$strict>;
declare const AnalyticsWarningSchema: z.ZodObject<{
    code: z.ZodString;
    message: z.ZodString;
}, z.core.$strip>;
declare const AnalyticsValidationIssueSchema: z.ZodObject<{
    code: z.ZodString;
    path: z.ZodString;
    message: z.ZodString;
    actual: z.ZodOptional<z.ZodUnknown>;
    allowed: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
    suggested_patch: z.ZodOptional<z.ZodArray<z.ZodObject<{
        op: z.ZodEnum<{
            replace: "replace";
            add: "add";
            remove: "remove";
        }>;
        path: z.ZodString;
        value: z.ZodOptional<z.ZodUnknown>;
    }, z.core.$strict>>>;
}, z.core.$strip>;
/** One deterministic default the compiler applied to a draft (§9.2). */
declare const AnalyticsCompileResolutionSchema: z.ZodObject<{
    path: z.ZodString;
    rule: z.ZodString;
    value: z.ZodOptional<z.ZodUnknown>;
}, z.core.$strip>;
declare const AnalyticsValidationResultSchema: z.ZodObject<{
    valid: z.ZodBoolean;
    errors: z.ZodDefault<z.ZodArray<z.ZodObject<{
        code: z.ZodString;
        path: z.ZodString;
        message: z.ZodString;
        actual: z.ZodOptional<z.ZodUnknown>;
        allowed: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
        suggested_patch: z.ZodOptional<z.ZodArray<z.ZodObject<{
            op: z.ZodEnum<{
                replace: "replace";
                add: "add";
                remove: "remove";
            }>;
            path: z.ZodString;
            value: z.ZodOptional<z.ZodUnknown>;
        }, z.core.$strict>>>;
    }, z.core.$strip>>>;
    warnings: z.ZodDefault<z.ZodArray<z.ZodObject<{
        code: z.ZodString;
        message: z.ZodString;
    }, z.core.$strip>>>;
    catalog_version: z.ZodString;
}, z.core.$strip>;
declare const AnalyticsResultFieldSchema: z.ZodObject<{
    id: z.ZodString;
    type: z.ZodEnum<{
        string: "string";
        number: "number";
        boolean: "boolean";
        date: "date";
        datetime: "datetime";
        currency: "currency";
        percent: "percent";
    }>;
    nullable: z.ZodBoolean;
}, z.core.$strip>;
declare const AnalyticsCoverageSchema: z.ZodObject<{
    numerator: z.ZodNumber;
    denominator: z.ZodNumber;
    rate: z.ZodNumber;
}, z.core.$strip>;
/**
 * The conversion a result's amounts were stated in (D-54; plan 282 REQ-14,
 * AC-15: "result metadata names the rate source, date basis and policy
 * version"). Revenue-accounting §1 asks for currency and policy version on
 * the existing result metadata rather than a parallel descriptor. The values
 * come from REPORTING_CURRENCY_V1_POLICY via `reportingCurrencyResultMeta` in
 * @revt-eng/optimization-core/oracles (plan 282 TASK-32); strings, not enums,
 * because `policy_version` is what fixes their meaning.
 */
/** View Framework §10: at most 8,000 predicted result rows per query. */
declare const ANALYTICS_FX_RATE_EVIDENCE_LIMIT = 8000;
/** One qualified lookup; a cross-rate contributes both stored source quotes. */
declare const AnalyticsFxRateEvidenceSchema: z.ZodObject<{
    provider: z.ZodString;
    requested_fact_date: z.ZodISODate;
    selected_rate_date: z.ZodISODate;
    stored_rate_id: z.ZodString;
}, z.core.$strict>;
/** Overflow carries the required size, never a truncated list posing as complete evidence. */
declare const AnalyticsFxRateEvidenceSetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    status: z.ZodLiteral<"complete">;
    entries: z.ZodArray<z.ZodObject<{
        provider: z.ZodString;
        requested_fact_date: z.ZodISODate;
        selected_rate_date: z.ZodISODate;
        stored_rate_id: z.ZodString;
    }, z.core.$strict>>;
}, z.core.$strict>, z.ZodObject<{
    status: z.ZodLiteral<"overflow">;
    required_entries: z.ZodNumber;
    limit: z.ZodLiteral<8000>;
}, z.core.$strict>], "status">;
declare const AnalyticsReportingCurrencyMetaSchema: z.ZodObject<{
    currency: z.ZodString;
    policy_version: z.ZodString;
    rate_source: z.ZodString;
    date_basis: z.ZodString;
    rate_evidence: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
        status: z.ZodLiteral<"complete">;
        entries: z.ZodArray<z.ZodObject<{
            provider: z.ZodString;
            requested_fact_date: z.ZodISODate;
            selected_rate_date: z.ZodISODate;
            stored_rate_id: z.ZodString;
        }, z.core.$strict>>;
    }, z.core.$strict>, z.ZodObject<{
        status: z.ZodLiteral<"overflow">;
        required_entries: z.ZodNumber;
        limit: z.ZodLiteral<8000>;
    }, z.core.$strict>], "status">>;
}, z.core.$strip>;
declare const AnalyticsRecurringMovementBasisSchema: z.ZodEnum<{
    atomic_occurrence: "atomic_occurrence";
    daily_series_net: "daily_series_net";
    interval_net: "interval_net";
}>;
/** Exact query evidence. Calendar version belongs only to the shared generation. */
declare const AnalyticsResultAccountingSchema: z.ZodObject<{
    metric: z.ZodString;
    row_index: z.ZodOptional<z.ZodNumber>;
    definition: z.ZodObject<{
        economic_basis: z.ZodString;
        population: z.ZodString;
    }, z.core.$strict>;
    generation: z.ZodObject<{
        policy_version: z.ZodString;
        calendar_version: z.ZodString;
        series_grain: z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            quarter: "quarter";
            hour: "hour";
        }>;
        generation_id: z.ZodString;
    }, z.core.$strict>;
    calendar: z.ZodObject<{
        timezone: z.ZodString;
        day_boundary_hour: z.ZodNumber;
    }, z.core.$strict>;
    mapping_generation_id: z.ZodString;
    population_key: z.ZodString;
    native_currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    effective_cutoff: z.ZodISODateTime;
    observed_cutoff: z.ZodISODateTime;
    selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"period">;
        start: z.ZodISODateTime;
        end: z.ZodISODateTime;
        stock_basis: z.ZodOptional<z.ZodEnum<{
            opening: "opening";
            closing: "closing";
        }>>;
        movement_basis: z.ZodOptional<z.ZodEnum<{
            atomic_occurrence: "atomic_occurrence";
            daily_series_net: "daily_series_net";
            interval_net: "interval_net";
        }>>;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"point">;
        at: z.ZodISODateTime;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"committed_projection">;
        base: z.ZodISODateTime;
        horizon: z.ZodISODateTime;
    }, z.core.$strict>], "kind">;
}, z.core.$strict>;
declare const AnalyticsResultMetaSchema: z.ZodObject<{
    query_hash: z.ZodString;
    concept: z.ZodString;
    analytical_unit: z.ZodEnum<{
        user: "user";
        account: "account";
        billing_unit: "billing_unit";
        organization: "organization";
    }>;
    source_scope: z.ZodEnum<{
        total: "total";
        account_matched: "account_matched";
        revturbine_tracked: "revturbine_tracked";
        revturbine_influenced: "revturbine_influenced";
    }>;
    coverage: z.ZodOptional<z.ZodObject<{
        numerator: z.ZodNumber;
        denominator: z.ZodNumber;
        rate: z.ZodNumber;
    }, z.core.$strip>>;
    as_of: z.ZodString;
    freshness_seconds: z.ZodNumber;
    gate_settings: z.ZodOptional<z.ZodObject<{
        snapshot_id: z.ZodString;
        configured: z.ZodDiscriminatedUnion<[z.ZodObject<{
            status: z.ZodLiteral<"resolved">;
            source: z.ZodEnum<{
                tenant_row: "tenant_row";
                missing_row: "missing_row";
            }>;
            policy: z.ZodLiteral<"gate-placement-settings-approved-v1">;
            values: z.ZodObject<{
                analytics_min_sample: z.ZodNumber;
                quiet_days: z.ZodNumber;
                gate_follow_up_days: z.ZodNumber;
                gate_window_days: z.ZodObject<{
                    min_age_days: z.ZodNumber;
                    max_age_days: z.ZodNumber;
                }, z.core.$strict>;
            }, z.core.$strict>;
            provenance: z.ZodObject<{
                analytics_min_sample: z.ZodEnum<{
                    default: "default";
                    override: "override";
                }>;
                quiet_days: z.ZodEnum<{
                    default: "default";
                    override: "override";
                }>;
                gate_follow_up_days: z.ZodEnum<{
                    default: "default";
                    override: "override";
                }>;
                gate_window_days: z.ZodEnum<{
                    default: "default";
                    override: "override";
                }>;
            }, z.core.$strict>;
        }, z.core.$strict>, z.ZodObject<{
            status: z.ZodLiteral<"unavailable">;
            reason: z.ZodLiteral<"schema_capability_unsupported">;
        }, z.core.$strict>], "status">;
        applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
            status: z.ZodLiteral<"legacy">;
            policy: z.ZodLiteral<"gate-placement-legacy-v1">;
            values: z.ZodObject<{
                quiet_days: z.ZodLiteral<7>;
                analytics_min_sample: z.ZodLiteral<30>;
            }, z.core.$strict>;
        }, z.core.$strict>, z.ZodObject<{
            status: z.ZodLiteral<"not_applied">;
        }, z.core.$strict>], "status">;
        target: z.ZodObject<{
            status: z.ZodLiteral<"unavailable">;
            prerequisite: z.ZodLiteral<"BL-0497">;
        }, z.core.$strict>;
    }, z.core.$strict>>;
    applied_filters: z.ZodDefault<z.ZodArray<z.ZodObject<{
        dimension: z.ZodString;
        operator: z.ZodEnum<{
            in: "in";
            eq: "eq";
            neq: "neq";
            not_in: "not_in";
            between: "between";
            gte: "gte";
            lte: "lte";
            is_null: "is_null";
            is_not_null: "is_not_null";
            contains: "contains";
        }>;
        value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
            preset: z.ZodString;
            compare: z.ZodOptional<z.ZodEnum<{
                none: "none";
                previous_period: "previous_period";
                previous_year: "previous_year";
                custom_period: "custom_period";
            }>>;
            compare_start: z.ZodOptional<z.ZodString>;
            compare_end: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>, z.ZodObject<{
            min: z.ZodOptional<z.ZodNumber>;
            max: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"date_range">;
            start: z.ZodString;
            end: z.ZodString;
        }, z.core.$strict>]>>;
    }, z.core.$strict>>>;
    next_cursor: z.ZodOptional<z.ZodString>;
    warnings: z.ZodDefault<z.ZodArray<z.ZodObject<{
        code: z.ZodString;
        message: z.ZodString;
    }, z.core.$strip>>>;
    reporting_currency: z.ZodOptional<z.ZodObject<{
        currency: z.ZodString;
        policy_version: z.ZodString;
        rate_source: z.ZodString;
        date_basis: z.ZodString;
        rate_evidence: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            status: z.ZodLiteral<"complete">;
            entries: z.ZodArray<z.ZodObject<{
                provider: z.ZodString;
                requested_fact_date: z.ZodISODate;
                selected_rate_date: z.ZodISODate;
                stored_rate_id: z.ZodString;
            }, z.core.$strict>>;
        }, z.core.$strict>, z.ZodObject<{
            status: z.ZodLiteral<"overflow">;
            required_entries: z.ZodNumber;
            limit: z.ZodLiteral<8000>;
        }, z.core.$strict>], "status">>;
    }, z.core.$strip>>;
    accounting: z.ZodOptional<z.ZodArray<z.ZodObject<{
        metric: z.ZodString;
        row_index: z.ZodOptional<z.ZodNumber>;
        definition: z.ZodObject<{
            economic_basis: z.ZodString;
            population: z.ZodString;
        }, z.core.$strict>;
        generation: z.ZodObject<{
            policy_version: z.ZodString;
            calendar_version: z.ZodString;
            series_grain: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                quarter: "quarter";
                hour: "hour";
            }>;
            generation_id: z.ZodString;
        }, z.core.$strict>;
        calendar: z.ZodObject<{
            timezone: z.ZodString;
            day_boundary_hour: z.ZodNumber;
        }, z.core.$strict>;
        mapping_generation_id: z.ZodString;
        population_key: z.ZodString;
        native_currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        effective_cutoff: z.ZodISODateTime;
        observed_cutoff: z.ZodISODateTime;
        selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"period">;
            start: z.ZodISODateTime;
            end: z.ZodISODateTime;
            stock_basis: z.ZodOptional<z.ZodEnum<{
                opening: "opening";
                closing: "closing";
            }>>;
            movement_basis: z.ZodOptional<z.ZodEnum<{
                atomic_occurrence: "atomic_occurrence";
                daily_series_net: "daily_series_net";
                interval_net: "interval_net";
            }>>;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"point">;
            at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"committed_projection">;
            base: z.ZodISODateTime;
            horizon: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
    }, z.core.$strict>>>;
    samples: z.ZodOptional<z.ZodArray<z.ZodObject<{
        metric: z.ZodString;
        unit: z.ZodEnum<{
            user: "user";
            account: "account";
            invoice: "invoice";
            presentation: "presentation";
            episode: "episode";
        }>;
        count: z.ZodNullable<z.ZodNumber>;
        minimum: z.ZodNumber;
        status: z.ZodEnum<{
            unknown: "unknown";
            available: "available";
            unavailable: "unavailable";
            below_minimum: "below_minimum";
            not_applicable: "not_applicable";
        }>;
    }, z.core.$strict>>>;
}, z.core.$strip>;
declare const AnalyticsResultSchema: z.ZodObject<{
    data: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    fields: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        type: z.ZodEnum<{
            string: "string";
            number: "number";
            boolean: "boolean";
            date: "date";
            datetime: "datetime";
            currency: "currency";
            percent: "percent";
        }>;
        nullable: z.ZodBoolean;
    }, z.core.$strip>>;
    meta: z.ZodObject<{
        query_hash: z.ZodString;
        concept: z.ZodString;
        analytical_unit: z.ZodEnum<{
            user: "user";
            account: "account";
            billing_unit: "billing_unit";
            organization: "organization";
        }>;
        source_scope: z.ZodEnum<{
            total: "total";
            account_matched: "account_matched";
            revturbine_tracked: "revturbine_tracked";
            revturbine_influenced: "revturbine_influenced";
        }>;
        coverage: z.ZodOptional<z.ZodObject<{
            numerator: z.ZodNumber;
            denominator: z.ZodNumber;
            rate: z.ZodNumber;
        }, z.core.$strip>>;
        as_of: z.ZodString;
        freshness_seconds: z.ZodNumber;
        gate_settings: z.ZodOptional<z.ZodObject<{
            snapshot_id: z.ZodString;
            configured: z.ZodDiscriminatedUnion<[z.ZodObject<{
                status: z.ZodLiteral<"resolved">;
                source: z.ZodEnum<{
                    tenant_row: "tenant_row";
                    missing_row: "missing_row";
                }>;
                policy: z.ZodLiteral<"gate-placement-settings-approved-v1">;
                values: z.ZodObject<{
                    analytics_min_sample: z.ZodNumber;
                    quiet_days: z.ZodNumber;
                    gate_follow_up_days: z.ZodNumber;
                    gate_window_days: z.ZodObject<{
                        min_age_days: z.ZodNumber;
                        max_age_days: z.ZodNumber;
                    }, z.core.$strict>;
                }, z.core.$strict>;
                provenance: z.ZodObject<{
                    analytics_min_sample: z.ZodEnum<{
                        default: "default";
                        override: "override";
                    }>;
                    quiet_days: z.ZodEnum<{
                        default: "default";
                        override: "override";
                    }>;
                    gate_follow_up_days: z.ZodEnum<{
                        default: "default";
                        override: "override";
                    }>;
                    gate_window_days: z.ZodEnum<{
                        default: "default";
                        override: "override";
                    }>;
                }, z.core.$strict>;
            }, z.core.$strict>, z.ZodObject<{
                status: z.ZodLiteral<"unavailable">;
                reason: z.ZodLiteral<"schema_capability_unsupported">;
            }, z.core.$strict>], "status">;
            applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                status: z.ZodLiteral<"legacy">;
                policy: z.ZodLiteral<"gate-placement-legacy-v1">;
                values: z.ZodObject<{
                    quiet_days: z.ZodLiteral<7>;
                    analytics_min_sample: z.ZodLiteral<30>;
                }, z.core.$strict>;
            }, z.core.$strict>, z.ZodObject<{
                status: z.ZodLiteral<"not_applied">;
            }, z.core.$strict>], "status">;
            target: z.ZodObject<{
                status: z.ZodLiteral<"unavailable">;
                prerequisite: z.ZodLiteral<"BL-0497">;
            }, z.core.$strict>;
        }, z.core.$strict>>;
        applied_filters: z.ZodDefault<z.ZodArray<z.ZodObject<{
            dimension: z.ZodString;
            operator: z.ZodEnum<{
                in: "in";
                eq: "eq";
                neq: "neq";
                not_in: "not_in";
                between: "between";
                gte: "gte";
                lte: "lte";
                is_null: "is_null";
                is_not_null: "is_not_null";
                contains: "contains";
            }>;
            value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
                preset: z.ZodString;
                compare: z.ZodOptional<z.ZodEnum<{
                    none: "none";
                    previous_period: "previous_period";
                    previous_year: "previous_year";
                    custom_period: "custom_period";
                }>>;
                compare_start: z.ZodOptional<z.ZodString>;
                compare_end: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>, z.ZodObject<{
                min: z.ZodOptional<z.ZodNumber>;
                max: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"date_range">;
                start: z.ZodString;
                end: z.ZodString;
            }, z.core.$strict>]>>;
        }, z.core.$strict>>>;
        next_cursor: z.ZodOptional<z.ZodString>;
        warnings: z.ZodDefault<z.ZodArray<z.ZodObject<{
            code: z.ZodString;
            message: z.ZodString;
        }, z.core.$strip>>>;
        reporting_currency: z.ZodOptional<z.ZodObject<{
            currency: z.ZodString;
            policy_version: z.ZodString;
            rate_source: z.ZodString;
            date_basis: z.ZodString;
            rate_evidence: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                status: z.ZodLiteral<"complete">;
                entries: z.ZodArray<z.ZodObject<{
                    provider: z.ZodString;
                    requested_fact_date: z.ZodISODate;
                    selected_rate_date: z.ZodISODate;
                    stored_rate_id: z.ZodString;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                status: z.ZodLiteral<"overflow">;
                required_entries: z.ZodNumber;
                limit: z.ZodLiteral<8000>;
            }, z.core.$strict>], "status">>;
        }, z.core.$strip>>;
        accounting: z.ZodOptional<z.ZodArray<z.ZodObject<{
            metric: z.ZodString;
            row_index: z.ZodOptional<z.ZodNumber>;
            definition: z.ZodObject<{
                economic_basis: z.ZodString;
                population: z.ZodString;
            }, z.core.$strict>;
            generation: z.ZodObject<{
                policy_version: z.ZodString;
                calendar_version: z.ZodString;
                series_grain: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    quarter: "quarter";
                    hour: "hour";
                }>;
                generation_id: z.ZodString;
            }, z.core.$strict>;
            calendar: z.ZodObject<{
                timezone: z.ZodString;
                day_boundary_hour: z.ZodNumber;
            }, z.core.$strict>;
            mapping_generation_id: z.ZodString;
            population_key: z.ZodString;
            native_currency: z.ZodString;
            currency_exponent: z.ZodNumber;
            effective_cutoff: z.ZodISODateTime;
            observed_cutoff: z.ZodISODateTime;
            selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"period">;
                start: z.ZodISODateTime;
                end: z.ZodISODateTime;
                stock_basis: z.ZodOptional<z.ZodEnum<{
                    opening: "opening";
                    closing: "closing";
                }>>;
                movement_basis: z.ZodOptional<z.ZodEnum<{
                    atomic_occurrence: "atomic_occurrence";
                    daily_series_net: "daily_series_net";
                    interval_net: "interval_net";
                }>>;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"point">;
                at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"committed_projection">;
                base: z.ZodISODateTime;
                horizon: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>>>;
        samples: z.ZodOptional<z.ZodArray<z.ZodObject<{
            metric: z.ZodString;
            unit: z.ZodEnum<{
                user: "user";
                account: "account";
                invoice: "invoice";
                presentation: "presentation";
                episode: "episode";
            }>;
            count: z.ZodNullable<z.ZodNumber>;
            minimum: z.ZodNumber;
            status: z.ZodEnum<{
                unknown: "unknown";
                available: "available";
                unavailable: "unavailable";
                below_minimum: "below_minimum";
                not_applicable: "not_applicable";
            }>;
        }, z.core.$strict>>>;
    }, z.core.$strip>;
}, z.core.$strip>;

/**
 * Metric semantics (RM-846 §4.5, ST-848): the time grain, window and currency
 * policy every metric declares once, so no reader restates them.
 *
 * The last revenue defect came from a window that was defined once in a View
 * and again in web. The declaration is the one place a window lives: Views take
 * their param defaults from it, web derives its query defaults from it, and a
 * window or grain literal anywhere else is a guard failure.
 *
 * Timezone is NOT declared per metric (RM-846 D11). Day, week and month
 * boundaries always come from the tenant's reporting timezone,
 * `tenant_configs.timezone`, resolved through `resolveReportingCalendar` /
 * `reportingBucket`. The block names that setting so the rule is visible in
 * every declaration, and accepts nothing else.
 */

/** The tenant setting that defines every window's day boundaries (D11). The only value the block's `timezone` accepts. */
declare const METRIC_TIMEZONE_SETTING: "tenant_configs.timezone";
/**
 * How a metric's window sits on the calendar.
 *
 * - `trailing`: the last `default_count` periods ending at the tenant-local
 *   current day (web's `30d`, `90d`, `12m` presets).
 * - `calendar`: `default_count` whole calendar periods (weeks, months) in the
 *   tenant's timezone.
 * - `as_of`: a point-in-time value read at the window's end; `default_count`
 *   is 1.
 */
declare const AnalyticsMetricWindowAlignmentSchema: z.ZodEnum<{
    as_of: "as_of";
    calendar: "calendar";
    trailing: "trailing";
}>;
/** The unit a window is counted in. Hours are a bucket grain, never a window unit. */
declare const AnalyticsMetricWindowPeriodSchema: z.ZodEnum<{
    day: "day";
    week: "week";
    month: "month";
    quarter: "quarter";
}>;
declare const AnalyticsMetricWindowSchema: z.ZodObject<{
    period: z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        quarter: "quarter";
    }>;
    alignment: z.ZodEnum<{
        as_of: "as_of";
        calendar: "calendar";
        trailing: "trailing";
    }>;
    default_count: z.ZodNumber;
}, z.core.$strict>;
/**
 * How a metric treats currency.
 *
 * - `not_monetary`: the value carries no currency (counts, durations, ratios
 *   of counts).
 * - `per_currency`: computed and reported per native currency in minor units;
 *   never summed across currencies (D-54 until FX). Ratios of money computed
 *   within one currency (NRR, shares of MRR) are `per_currency` too.
 * - `reporting_currency`: converted under the versioned reporting-currency
 *   policy (`REPORTING_CURRENCY_V1_POLICY`).
 */
declare const AnalyticsMetricCurrencyPolicySchema: z.ZodEnum<{
    reporting_currency: "reporting_currency";
    not_monetary: "not_monetary";
    per_currency: "per_currency";
}>;
/** The semantics block every metric declares once. */
declare const AnalyticsMetricSemanticsSchema: z.ZodObject<{
    grain: z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        quarter: "quarter";
        hour: "hour";
    }>;
    window: z.ZodObject<{
        period: z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            quarter: "quarter";
        }>;
        alignment: z.ZodEnum<{
            as_of: "as_of";
            calendar: "calendar";
            trailing: "trailing";
        }>;
        default_count: z.ZodNumber;
    }, z.core.$strict>;
    currency: z.ZodEnum<{
        reporting_currency: "reporting_currency";
        not_monetary: "not_monetary";
        per_currency: "per_currency";
    }>;
    timezone: z.ZodLiteral<"tenant_configs.timezone">;
}, z.core.$strict>;
type AnalyticsMetricSemantics$1 = z.output<typeof AnalyticsMetricSemanticsSchema>;
type AnalyticsMetricWindow$1 = z.output<typeof AnalyticsMetricWindowSchema>;
/**
 * The date-range filter preset a trailing window renders as (`30d`, `90d`,
 * `12m`): the value a view's period filter defaults to, derived instead of
 * typed. A calendar or as-of window has no trailing preset, so it returns
 * `undefined` and the reader must not offer one.
 */
declare function metricWindowPreset(span: AnalyticsMetricWindow$1): string | undefined;

/**
 * Saved analytics-view persistence contracts (plan 210 TASK-1).
 *
 * A saved view has one mutable metadata row, immutable full-document
 * revisions, and explicit access grants. Tenant and environment scope are
 * repeated on every row so no join is required to enforce isolation.
 */

declare const AnalyticsViewAccessRoleSchema: z.ZodEnum<{
    viewer: "viewer";
    editor: "editor";
}>;
/** Mutable metadata and the pointer to the current immutable revision. */
declare const AnalyticsSavedViewSchema: z.ZodObject<{
    id: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    owner_user_id: z.ZodString;
    name: z.ZodString;
    visibility: z.ZodEnum<{
        private: "private";
        team: "team";
        tenant: "tenant";
    }>;
    base_template_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    base_template_version: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    current_revision: z.ZodNumber;
    is_default: z.ZodDefault<z.ZodBoolean>;
    idempotency_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
/** Immutable, full canonical document for one saved-view revision. */
declare const AnalyticsViewRevisionSchema: z.ZodObject<{
    id: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodString;
    view_id: z.ZodString;
    revision: z.ZodNumber;
    schema_version: z.ZodString;
    catalog_version: z.ZodString;
    document_jsonb: z.ZodObject<{
        kind: z.ZodLiteral<"revturbine.analytics-view">;
        schema_version: z.ZodString;
        id: z.ZodString;
        revision: z.ZodNumber;
        title: z.ZodObject<{
            value: z.ZodString;
            key: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        description: z.ZodOptional<z.ZodObject<{
            value: z.ZodString;
            key: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>>;
        analytical_unit: z.ZodEnum<{
            user: "user";
            account: "account";
            billing_unit: "billing_unit";
            organization: "organization";
        }>;
        base_template: z.ZodOptional<z.ZodObject<{
            id: z.ZodString;
            version: z.ZodNumber;
        }, z.core.$strict>>;
        catalog_version: z.ZodString;
        filters: z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            dimension: z.ZodString;
            control: z.ZodEnum<{
                date_range: "date_range";
                single_select: "single_select";
                multi_select: "multi_select";
                search_select: "search_select";
                number_range: "number_range";
                entity_picker: "entity_picker";
                toggle: "toggle";
            }>;
            label: z.ZodOptional<z.ZodObject<{
                value: z.ZodString;
                key: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>>;
            operators: z.ZodArray<z.ZodEnum<{
                in: "in";
                eq: "eq";
                neq: "neq";
                not_in: "not_in";
                between: "between";
                gte: "gte";
                lte: "lte";
                is_null: "is_null";
                is_not_null: "is_not_null";
                contains: "contains";
            }>>;
            default_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
                preset: z.ZodString;
                compare: z.ZodOptional<z.ZodEnum<{
                    none: "none";
                    previous_period: "previous_period";
                    previous_year: "previous_year";
                    custom_period: "custom_period";
                }>>;
                compare_start: z.ZodOptional<z.ZodString>;
                compare_end: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>, z.ZodObject<{
                min: z.ZodOptional<z.ZodNumber>;
                max: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"date_range">;
                start: z.ZodString;
                end: z.ZodString;
            }, z.core.$strict>]>>;
            required: z.ZodDefault<z.ZodBoolean>;
            pinned: z.ZodDefault<z.ZodBoolean>;
            applies_to: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>;
            depends_on: z.ZodOptional<z.ZodString>;
            url_safe: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strict>>;
        layout: z.ZodObject<{
            type: z.ZodLiteral<"grid">;
            columns: z.ZodDefault<z.ZodNumber>;
            items: z.ZodArray<z.ZodObject<{
                block_id: z.ZodString;
                x: z.ZodNumber;
                y: z.ZodNumber;
                w: z.ZodNumber;
                h: z.ZodNumber;
            }, z.core.$strict>>;
        }, z.core.$strict>;
        blocks: z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            title: z.ZodOptional<z.ZodObject<{
                value: z.ZodString;
                key: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>>;
            description: z.ZodOptional<z.ZodObject<{
                value: z.ZodString;
                key: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>>;
            query: z.ZodObject<{
                concept: z.ZodString;
                family: z.ZodEnum<{
                    scalar: "scalar";
                    timeseries: "timeseries";
                    breakdown: "breakdown";
                    funnel: "funnel";
                    table: "table";
                    timeline: "timeline";
                }>;
                metrics: z.ZodArray<z.ZodString>;
                group_by: z.ZodOptional<z.ZodArray<z.ZodString>>;
                time: z.ZodOptional<z.ZodObject<{
                    dimension: z.ZodString;
                    grain: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        quarter: "quarter";
                        hour: "hour";
                    }>;
                }, z.core.$strict>>;
                filters_from: z.ZodOptional<z.ZodArray<z.ZodString>>;
                fixed_filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
                    dimension: z.ZodString;
                    operator: z.ZodEnum<{
                        in: "in";
                        eq: "eq";
                        neq: "neq";
                        not_in: "not_in";
                        between: "between";
                        gte: "gte";
                        lte: "lte";
                        is_null: "is_null";
                        is_not_null: "is_not_null";
                        contains: "contains";
                    }>;
                    value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
                        preset: z.ZodString;
                        compare: z.ZodOptional<z.ZodEnum<{
                            none: "none";
                            previous_period: "previous_period";
                            previous_year: "previous_year";
                            custom_period: "custom_period";
                        }>>;
                        compare_start: z.ZodOptional<z.ZodString>;
                        compare_end: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>, z.ZodObject<{
                        min: z.ZodOptional<z.ZodNumber>;
                        max: z.ZodOptional<z.ZodNumber>;
                    }, z.core.$strict>, z.ZodObject<{
                        type: z.ZodLiteral<"date_range">;
                        start: z.ZodString;
                        end: z.ZodString;
                    }, z.core.$strict>]>>;
                }, z.core.$strict>>>;
                compare: z.ZodOptional<z.ZodEnum<{
                    none: "none";
                    previous_period: "previous_period";
                    previous_year: "previous_year";
                    custom_period: "custom_period";
                    segment: "segment";
                    variant: "variant";
                    scope: "scope";
                    intervention: "intervention";
                }>>;
                compare_delta: z.ZodOptional<z.ZodEnum<{
                    percentage: "percentage";
                    absolute: "absolute";
                }>>;
                compare_segment: z.ZodOptional<z.ZodObject<{
                    dimension: z.ZodString;
                    baseline: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
                    against: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
                }, z.core.$strict>>;
                compare_experiment: z.ZodOptional<z.ZodObject<{
                    experiment: z.ZodString;
                    baseline: z.ZodOptional<z.ZodString>;
                    against: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>>;
                compare_scope: z.ZodOptional<z.ZodEnum<{
                    total: "total";
                    account_matched: "account_matched";
                    revturbine_tracked: "revturbine_tracked";
                    revturbine_influenced: "revturbine_influenced";
                }>>;
                compare_anchor: z.ZodOptional<z.ZodString>;
                order_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
                    field: z.ZodString;
                    direction: z.ZodEnum<{
                        asc: "asc";
                        desc: "desc";
                    }>;
                }, z.core.$strict>>>;
                limit: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strict>;
            render: z.ZodDiscriminatedUnion<[z.ZodObject<{
                type: z.ZodLiteral<"metric">;
                value: z.ZodString;
                comparison: z.ZodOptional<z.ZodString>;
                format: z.ZodOptional<z.ZodObject<{
                    type: z.ZodEnum<{
                        number: "number";
                        duration: "duration";
                        currency: "currency";
                        percent: "percent";
                    }>;
                    decimals: z.ZodOptional<z.ZodNumber>;
                    compact: z.ZodOptional<z.ZodBoolean>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"cartesian">;
                mark: z.ZodEnum<{
                    line: "line";
                    area: "area";
                    bar: "bar";
                    stacked_bar: "stacked_bar";
                    scatter: "scatter";
                    marimekko: "marimekko";
                }>;
                encoding: z.ZodObject<{
                    x: z.ZodString;
                    y: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
                    color: z.ZodOptional<z.ZodString>;
                    facet: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                options: z.ZodOptional<z.ZodObject<{
                    legend: z.ZodOptional<z.ZodEnum<{
                        none: "none";
                        top: "top";
                        right: "right";
                        bottom: "bottom";
                        left: "left";
                    }>>;
                    value_labels: z.ZodOptional<z.ZodBoolean>;
                    reference_lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
                        value: z.ZodNumber;
                        label: z.ZodOptional<z.ZodObject<{
                            value: z.ZodString;
                            key: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>>>;
                    x_axis_format: z.ZodOptional<z.ZodObject<{
                        type: z.ZodEnum<{
                            number: "number";
                            duration: "duration";
                            currency: "currency";
                            percent: "percent";
                        }>;
                        decimals: z.ZodOptional<z.ZodNumber>;
                        compact: z.ZodOptional<z.ZodBoolean>;
                    }, z.core.$strict>>;
                    y_axis_format: z.ZodOptional<z.ZodObject<{
                        type: z.ZodEnum<{
                            number: "number";
                            duration: "duration";
                            currency: "currency";
                            percent: "percent";
                        }>;
                        decimals: z.ZodOptional<z.ZodNumber>;
                        compact: z.ZodOptional<z.ZodBoolean>;
                    }, z.core.$strict>>;
                    empty_state: z.ZodOptional<z.ZodEnum<{
                        message: "message";
                        blank: "blank";
                    }>>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"funnel">;
                stages: z.ZodArray<z.ZodString>;
                split_by: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"table">;
                columns: z.ZodArray<z.ZodString>;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"timeline">;
                timestamp: z.ZodString;
                event_type: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"recommendations">;
                presentation: z.ZodEnum<{
                    list: "list";
                    ranked_cards: "ranked_cards";
                }>;
            }, z.core.$strict>], "type">;
        }, z.core.$strict>>;
        handoffs: z.ZodOptional<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            label: z.ZodObject<{
                value: z.ZodString;
                key: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            target: z.ZodString;
            bindings: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
        }, z.core.$strict>>>;
        customization_policy: z.ZodObject<{
            allow: z.ZodDefault<z.ZodArray<z.ZodEnum<{
                title: "title";
                sort: "sort";
                limit: "limit";
                source_scope: "source_scope";
                filter_defaults: "filter_defaults";
                metric_selection: "metric_selection";
                grouping: "grouping";
                compatible_renderer: "compatible_renderer";
                block_visibility: "block_visibility";
                layout: "layout";
                handoff_target: "handoff_target";
                hidden_scope: "hidden_scope";
                raw_expression: "raw_expression";
                cross_filter: "cross_filter";
            }>>>;
            deny: z.ZodDefault<z.ZodArray<z.ZodEnum<{
                title: "title";
                sort: "sort";
                limit: "limit";
                source_scope: "source_scope";
                filter_defaults: "filter_defaults";
                metric_selection: "metric_selection";
                grouping: "grouping";
                compatible_renderer: "compatible_renderer";
                block_visibility: "block_visibility";
                layout: "layout";
                handoff_target: "handoff_target";
                hidden_scope: "hidden_scope";
                raw_expression: "raw_expression";
                cross_filter: "cross_filter";
            }>>>;
        }, z.core.$strict>;
    }, z.core.$strict>;
    content_hash: z.ZodString;
    created_by: z.ZodString;
    created_at: z.ZodString;
}, z.core.$strip>;
/** Explicit principal grant; ownership alone never implies shared access. */
declare const AnalyticsViewAccessSchema: z.ZodObject<{
    id: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodString;
    view_id: z.ZodString;
    principal_type: z.ZodString;
    principal_id: z.ZodString;
    role: z.ZodEnum<{
        viewer: "viewer";
        editor: "editor";
    }>;
}, z.core.$strip>;

/**
 * Semantic Catalog container + agent catalog projection (plan 190 TASK-4).
 *
 * The catalog document validated here is the full application catalog an
 * in-memory adapter serves (fixture-sourced until plan 181's generated
 * metadata lands — the Q-1 ruling). `source` is load-bearing provenance:
 * a fixture catalog must never masquerade as generated truth, and the AC-4
 * drift gate keys off `generated`.
 *
 * The agent projection (§9.1) is the compact, guidance-carrying shape agents
 * search instead of loading the full catalog. Query-family entries use
 * `family.<name>` ids so one semantic-id grammar covers every entry.
 */

declare const AnalyticsCatalogSourceSchema: z.ZodEnum<{
    fixture: "fixture";
    generated: "generated";
}>;
declare const AnalyticsCatalogProvenanceKindSchema: z.ZodEnum<{
    event_taxonomy: "event_taxonomy";
    openapi_identity: "openapi_identity";
    tinybird_project: "tinybird_project";
    annotation_kinds: "annotation_kinds";
}>;
declare const AnalyticsCatalogProvenanceSchema: z.ZodObject<{
    kind: z.ZodEnum<{
        event_taxonomy: "event_taxonomy";
        openapi_identity: "openapi_identity";
        tinybird_project: "tinybird_project";
        annotation_kinds: "annotation_kinds";
    }>;
    location: z.ZodString;
    version: z.ZodOptional<z.ZodString>;
    entry_count: z.ZodNumber;
}, z.core.$strip>;
declare const AnalyticsCatalogSchema: z.ZodObject<{
    catalog_version: z.ZodString;
    source: z.ZodEnum<{
        fixture: "fixture";
        generated: "generated";
    }>;
    generated_at: z.ZodOptional<z.ZodString>;
    provenance: z.ZodOptional<z.ZodArray<z.ZodObject<{
        kind: z.ZodEnum<{
            event_taxonomy: "event_taxonomy";
            openapi_identity: "openapi_identity";
            tinybird_project: "tinybird_project";
            annotation_kinds: "annotation_kinds";
        }>;
        location: z.ZodString;
        version: z.ZodOptional<z.ZodString>;
        entry_count: z.ZodNumber;
    }, z.core.$strip>>>;
    concepts: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        version: z.ZodNumber;
        label: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        when_to_use: z.ZodOptional<z.ZodString>;
        do_not_use_for: z.ZodOptional<z.ZodString>;
        grain: z.ZodArray<z.ZodString>;
        analytical_units: z.ZodArray<z.ZodEnum<{
            user: "user";
            account: "account";
            billing_unit: "billing_unit";
            organization: "organization";
        }>>;
        primary_time_dimension: z.ZodString;
        historical_mode: z.ZodEnum<{
            as_of_event: "as_of_event";
            current: "current";
        }>;
        dimensions: z.ZodArray<z.ZodString>;
        metrics: z.ZodArray<z.ZodString>;
        query_families: z.ZodArray<z.ZodEnum<{
            scalar: "scalar";
            timeseries: "timeseries";
            breakdown: "breakdown";
            funnel: "funnel";
            table: "table";
            timeline: "timeline";
        }>>;
        source_scope: z.ZodEnum<{
            total: "total";
            account_matched: "account_matched";
            revturbine_tracked: "revturbine_tracked";
            revturbine_influenced: "revturbine_influenced";
        }>;
        coverage_metric: z.ZodOptional<z.ZodString>;
        dimension_groundings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
            kind: z.ZodEnum<{
                stamped: "stamped";
                membership_join: "membership_join";
                config_join: "config_join";
                derived: "derived";
            }>;
            source: z.ZodString;
            note: z.ZodOptional<z.ZodString>;
            anchor: z.ZodOptional<z.ZodEnum<{
                fixed: "fixed";
                current: "current";
                fact_time: "fact_time";
                period_opening: "period_opening";
                touch_time: "touch_time";
                cohort_entry: "cohort_entry";
                exposure_time: "exposure_time";
                assignment_time: "assignment_time";
                carried_version: "carried_version";
            }>>;
            selection: z.ZodOptional<z.ZodObject<{
                product: z.ZodOptional<z.ZodString>;
                environment: z.ZodOptional<z.ZodString>;
            }, z.core.$strip>>;
            partitions: z.ZodOptional<z.ZodBoolean>;
            catalog_status: z.ZodOptional<z.ZodEnum<{
                unavailable: "unavailable";
                declared: "declared";
                bound: "bound";
                validated: "validated";
                tested: "tested";
            }>>;
            blocker: z.ZodOptional<z.ZodString>;
            served_metrics: z.ZodOptional<z.ZodArray<z.ZodString>>;
            unserved_blocker: z.ZodOptional<z.ZodString>;
            v1: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strip>>>;
        fact_kind: z.ZodOptional<z.ZodEnum<{
            transaction: "transaction";
            periodic_snapshot: "periodic_snapshot";
            accumulating_snapshot: "accumulating_snapshot";
        }>>;
        family: z.ZodOptional<z.ZodEnum<{
            billing: "billing";
            behavioral: "behavioral";
        }>>;
        primary_key: z.ZodOptional<z.ZodArray<z.ZodString>>;
        producer: z.ZodOptional<z.ZodEnum<{
            platform: "platform";
            customer_authored: "customer_authored";
            simulation: "simulation";
        }>>;
        materialization: z.ZodOptional<z.ZodObject<{
            mode: z.ZodEnum<{
                raw: "raw";
                rollup: "rollup";
                logical: "logical";
            }>;
            rollup_grain: z.ZodOptional<z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                quarter: "quarter";
                hour: "hour";
            }>>;
        }, z.core.$strip>>;
        livemode_qualified: z.ZodOptional<z.ZodBoolean>;
        record_contract: z.ZodOptional<z.ZodObject<{
            record_id: z.ZodArray<z.ZodString>;
            source_namespace: z.ZodString;
            occurred_time_field: z.ZodString;
            received_time_field: z.ZodOptional<z.ZodString>;
            dedup: z.ZodEnum<{
                unknown: "unknown";
                deduplicated_on_record_id: "deduplicated_on_record_id";
                summed_on_sorting_key: "summed_on_sorting_key";
                append_only: "append_only";
                upsert_on_primary_key: "upsert_on_primary_key";
                recomputed_at_query: "recomputed_at_query";
            }>;
            revision: z.ZodEnum<{
                unknown: "unknown";
                immutable: "immutable";
                re_emit_higher_version: "re_emit_higher_version";
                in_place_update: "in_place_update";
                recomputed_from_source: "recomputed_from_source";
            }>;
            late_arrival: z.ZodEnum<{
                unknown: "unknown";
                accepted: "accepted";
                accepted_within_retention: "accepted_within_retention";
                rejected: "rejected";
            }>;
            correlation_keys: z.ZodOptional<z.ZodArray<z.ZodString>>;
            livemode_field: z.ZodOptional<z.ZodString>;
            policy_version_fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
            note: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        keys: z.ZodOptional<z.ZodArray<z.ZodObject<{
            key: z.ZodString;
            path: z.ZodString;
            resolution: z.ZodEnum<{
                source: "source";
                enriched: "enriched";
                absent: "absent";
            }>;
            note: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
        measures: z.ZodOptional<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            source: z.ZodString;
            unit: z.ZodEnum<{
                count: "count";
                currency_minor: "currency_minor";
                seconds: "seconds";
                ratio: "ratio";
                timestamp: "timestamp";
                usage_unit: "usage_unit";
                polymorphic: "polymorphic";
            }>;
            temporal: z.ZodEnum<{
                stock: "stock";
                flow: "flow";
                gauge: "gauge";
            }>;
            sign: z.ZodEnum<{
                signed: "signed";
                positive_magnitude: "positive_magnitude";
                unsigned: "unsigned";
            }>;
            aggregation_semantics: z.ZodEnum<{
                additive: "additive";
                semi_additive: "semi_additive";
                non_additive: "non_additive";
            }>;
            note: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
        event_attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            path: z.ZodString;
            note: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
        sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
            kind: z.ZodEnum<{
                unavailable: "unavailable";
                ingested_event: "ingested_event";
                datasource: "datasource";
                control_plane_table: "control_plane_table";
                build: "build";
            }>;
            ref: z.ZodString;
            blocker: z.ZodOptional<z.ZodString>;
            note: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
        build: z.ZodOptional<z.ZodObject<{
            kind: z.ZodEnum<{
                pipe: "pipe";
                unavailable: "unavailable";
                materialized_view: "materialized_view";
                worker: "worker";
                query_time: "query_time";
            }>;
            ref: z.ZodString;
            inputs: z.ZodArray<z.ZodString>;
            blocker: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        maturity: z.ZodOptional<z.ZodObject<{
            status: z.ZodEnum<{
                unavailable: "unavailable";
                declared: "declared";
            }>;
            horizon_field: z.ZodOptional<z.ZodString>;
            observed_through_field: z.ZodOptional<z.ZodString>;
            blocker: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        oracle_family: z.ZodOptional<z.ZodObject<{
            family: z.ZodEnum<{
                recurring: "recurring";
                none: "none";
                funnel: "funnel";
                presentation: "presentation";
                gate: "gate";
                revenue: "revenue";
                attribution: "attribution";
                event_count: "event_count";
                cohort: "cohort";
                lifecycle: "lifecycle";
                recurring_exact: "recurring_exact";
                receivable_exact: "receivable_exact";
                captured_payment_exact: "captured_payment_exact";
                read_through: "read_through";
            }>;
            blocker: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        policy_dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
            kind: z.ZodEnum<{
                reporting_currency: "reporting_currency";
                attribution: "attribution";
                lifecycle: "lifecycle";
                mrr: "mrr";
                engagement: "engagement";
            }>;
            stamped: z.ZodBoolean;
            blocker: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
        deprecation: z.ZodOptional<z.ZodObject<{
            deprecated: z.ZodBoolean;
            replaced_by: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
    }, z.core.$strip>>;
    dimensions: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        label: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        when_to_use: z.ZodOptional<z.ZodString>;
        do_not_use_for: z.ZodOptional<z.ZodString>;
        type: z.ZodEnum<{
            string: "string";
            number: "number";
            boolean: "boolean";
            id: "id";
            date: "date";
            enum: "enum";
            datetime: "datetime";
        }>;
        operators: z.ZodArray<z.ZodEnum<{
            in: "in";
            eq: "eq";
            neq: "neq";
            not_in: "not_in";
            between: "between";
            gte: "gte";
            lte: "lte";
            is_null: "is_null";
            is_not_null: "is_not_null";
            contains: "contains";
        }>>;
        control: z.ZodEnum<{
            date_range: "date_range";
            single_select: "single_select";
            multi_select: "multi_select";
            search_select: "search_select";
            number_range: "number_range";
            entity_picker: "entity_picker";
            toggle: "toggle";
        }>;
        capabilities: z.ZodArray<z.ZodEnum<{
            sort: "sort";
            filter: "filter";
            split: "split";
            group: "group";
        }>>;
        cardinality: z.ZodEnum<{
            high: "high";
            medium: "medium";
            low: "low";
        }>;
        classification: z.ZodDefault<z.ZodEnum<{
            pii: "pii";
            financial: "financial";
            unrestricted: "unrestricted";
            operational: "operational";
        }>>;
        historical_mode: z.ZodOptional<z.ZodEnum<{
            as_of_event: "as_of_event";
            current: "current";
        }>>;
        allowed_concepts: z.ZodOptional<z.ZodArray<z.ZodString>>;
        exclude_from_segment_picker: z.ZodDefault<z.ZodBoolean>;
        deprecation: z.ZodOptional<z.ZodObject<{
            deprecated: z.ZodBoolean;
            replaced_by: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
    }, z.core.$strip>>;
    metrics: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        label: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        when_to_use: z.ZodOptional<z.ZodString>;
        do_not_use_for: z.ZodOptional<z.ZodString>;
        value_type: z.ZodEnum<{
            string: "string";
            number: "number";
            boolean: "boolean";
            date: "date";
            datetime: "datetime";
            currency: "currency";
            percent: "percent";
        }>;
        format: z.ZodOptional<z.ZodObject<{
            type: z.ZodEnum<{
                number: "number";
                duration: "duration";
                currency: "currency";
                percent: "percent";
            }>;
            decimals: z.ZodOptional<z.ZodNumber>;
            compact: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strict>>;
        source_scope: z.ZodOptional<z.ZodEnum<{
            total: "total";
            account_matched: "account_matched";
            revturbine_tracked: "revturbine_tracked";
            revturbine_influenced: "revturbine_influenced";
        }>>;
        direction: z.ZodOptional<z.ZodEnum<{
            increase: "increase";
            decrease: "decrease";
            neutral: "neutral";
        }>>;
        statistical_type: z.ZodOptional<z.ZodEnum<{
            count: "count";
            ratio: "ratio";
            revenue: "revenue";
            binary: "binary";
            continuous: "continuous";
        }>>;
        aggregation_semantics: z.ZodOptional<z.ZodEnum<{
            additive: "additive";
            semi_additive: "semi_additive";
            non_additive: "non_additive";
        }>>;
        accounting: z.ZodOptional<z.ZodObject<{
            economic_basis: z.ZodString;
            population: z.ZodString;
        }, z.core.$strict>>;
        preferred_analysis_unit: z.ZodOptional<z.ZodEnum<{
            user: "user";
            account: "account";
            billing_unit: "billing_unit";
            organization: "organization";
        }>>;
        numerator_metric: z.ZodOptional<z.ZodString>;
        denominator_metric: z.ZodOptional<z.ZodString>;
        derivation: z.ZodOptional<z.ZodObject<{
            input_origin: z.ZodEnum<{
                none: "none";
                platform: "platform";
                customer_authored: "customer_authored";
                mixed: "mixed";
            }>;
            ingested_events: z.ZodArray<z.ZodString>;
            ingested_datasources: z.ZodOptional<z.ZodArray<z.ZodString>>;
            carried_by: z.ZodOptional<z.ZodArray<z.ZodString>>;
            note: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        layer: z.ZodOptional<z.ZodEnum<{
            derived: "derived";
            primitive: "primitive";
        }>>;
        semantics: z.ZodOptional<z.ZodObject<{
            grain: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                quarter: "quarter";
                hour: "hour";
            }>;
            window: z.ZodObject<{
                period: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    quarter: "quarter";
                }>;
                alignment: z.ZodEnum<{
                    as_of: "as_of";
                    calendar: "calendar";
                    trailing: "trailing";
                }>;
                default_count: z.ZodNumber;
            }, z.core.$strict>;
            currency: z.ZodEnum<{
                reporting_currency: "reporting_currency";
                not_monetary: "not_monetary";
                per_currency: "per_currency";
            }>;
            timezone: z.ZodLiteral<"tenant_configs.timezone">;
        }, z.core.$strict>>;
        catalog_status: z.ZodOptional<z.ZodEnum<{
            unavailable: "unavailable";
            declared: "declared";
            bound: "bound";
            validated: "validated";
            tested: "tested";
        }>>;
        first_valid_date: z.ZodOptional<z.ZodISODate>;
        release_condition: z.ZodOptional<z.ZodString>;
        deprecation: z.ZodOptional<z.ZodObject<{
            deprecated: z.ZodBoolean;
            replaced_by: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
    }, z.core.$strip>>;
    annotations: z.ZodOptional<z.ZodArray<z.ZodObject<{
        kind: z.ZodEnum<{
            playbook_published: "playbook_published";
            entitlement_change: "entitlement_change";
            price_change: "price_change";
            plan_change: "plan_change";
            experiment_started: "experiment_started";
            experiment_ended: "experiment_ended";
            sdk_release: "sdk_release";
            sdk_error_rate: "sdk_error_rate";
            metric_policy_changed: "metric_policy_changed";
            reporting_calendar_changed: "reporting_calendar_changed";
        }>;
        label: z.ZodString;
        description: z.ZodString;
        source: z.ZodEnum<{
            control_plane: "control_plane";
            events_billing: "events_billing";
            events_sdk_meta: "events_sdk_meta";
            events_sdk_diagnostics: "events_sdk_diagnostics";
        }>;
        marker: z.ZodEnum<{
            region: "region";
            point: "point";
        }>;
    }, z.core.$strip>>>;
}, z.core.$strip>;
declare const AnalyticsAgentCatalogEntryKindSchema: z.ZodEnum<{
    metric: "metric";
    concept: "concept";
    dimension: "dimension";
    query_family: "query_family";
}>;
declare const AnalyticsAgentCatalogEntrySchema: z.ZodObject<{
    id: z.ZodString;
    kind: z.ZodEnum<{
        metric: "metric";
        concept: "concept";
        dimension: "dimension";
        query_family: "query_family";
    }>;
    label: z.ZodString;
    description: z.ZodString;
    when_to_use: z.ZodOptional<z.ZodString>;
    do_not_use_for: z.ZodOptional<z.ZodString>;
    value_type: z.ZodOptional<z.ZodEnum<{
        string: "string";
        number: "number";
        boolean: "boolean";
        date: "date";
        datetime: "datetime";
        currency: "currency";
        percent: "percent";
    }>>;
    format: z.ZodOptional<z.ZodObject<{
        type: z.ZodEnum<{
            number: "number";
            duration: "duration";
            currency: "currency";
            percent: "percent";
        }>;
        decimals: z.ZodOptional<z.ZodNumber>;
        compact: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strict>>;
    capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
        sort: "sort";
        filter: "filter";
        split: "split";
        group: "group";
    }>>>;
    compatible_concepts: z.ZodOptional<z.ZodArray<z.ZodString>>;
    compatible_families: z.ZodOptional<z.ZodArray<z.ZodEnum<{
        scalar: "scalar";
        timeseries: "timeseries";
        breakdown: "breakdown";
        funnel: "funnel";
        table: "table";
        timeline: "timeline";
    }>>>;
    analytical_units: z.ZodOptional<z.ZodArray<z.ZodEnum<{
        user: "user";
        account: "account";
        billing_unit: "billing_unit";
        organization: "organization";
    }>>>;
    source_scope: z.ZodOptional<z.ZodEnum<{
        total: "total";
        account_matched: "account_matched";
        revturbine_tracked: "revturbine_tracked";
        revturbine_influenced: "revturbine_influenced";
    }>>;
    example: z.ZodOptional<z.ZodString>;
    deprecation: z.ZodOptional<z.ZodObject<{
        deprecated: z.ZodBoolean;
        replaced_by: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
}, z.core.$strip>;
declare const AnalyticsCatalogSearchResultSchema: z.ZodObject<{
    catalog_version: z.ZodString;
    query: z.ZodString;
    entries: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        kind: z.ZodEnum<{
            metric: "metric";
            concept: "concept";
            dimension: "dimension";
            query_family: "query_family";
        }>;
        label: z.ZodString;
        description: z.ZodString;
        when_to_use: z.ZodOptional<z.ZodString>;
        do_not_use_for: z.ZodOptional<z.ZodString>;
        value_type: z.ZodOptional<z.ZodEnum<{
            string: "string";
            number: "number";
            boolean: "boolean";
            date: "date";
            datetime: "datetime";
            currency: "currency";
            percent: "percent";
        }>>;
        format: z.ZodOptional<z.ZodObject<{
            type: z.ZodEnum<{
                number: "number";
                duration: "duration";
                currency: "currency";
                percent: "percent";
            }>;
            decimals: z.ZodOptional<z.ZodNumber>;
            compact: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strict>>;
        capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
            sort: "sort";
            filter: "filter";
            split: "split";
            group: "group";
        }>>>;
        compatible_concepts: z.ZodOptional<z.ZodArray<z.ZodString>>;
        compatible_families: z.ZodOptional<z.ZodArray<z.ZodEnum<{
            scalar: "scalar";
            timeseries: "timeseries";
            breakdown: "breakdown";
            funnel: "funnel";
            table: "table";
            timeline: "timeline";
        }>>>;
        analytical_units: z.ZodOptional<z.ZodArray<z.ZodEnum<{
            user: "user";
            account: "account";
            billing_unit: "billing_unit";
            organization: "organization";
        }>>>;
        source_scope: z.ZodOptional<z.ZodEnum<{
            total: "total";
            account_matched: "account_matched";
            revturbine_tracked: "revturbine_tracked";
            revturbine_influenced: "revturbine_influenced";
        }>>;
        example: z.ZodOptional<z.ZodString>;
        deprecation: z.ZodOptional<z.ZodObject<{
            deprecated: z.ZodBoolean;
            replaced_by: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
    }, z.core.$strip>>;
}, z.core.$strip>;

/** Version references resolve against retained history, never current settings.
 * Grain describes the stored series, not the chart's display aggregation.
 * Kept independent of annotation/view modules so result metadata can reuse it. */
declare const AnalyticsAnnotationGenerationSchema: z.ZodObject<{
    policy_version: z.ZodString;
    calendar_version: z.ZodString;
    series_grain: z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        quarter: "quarter";
        hour: "hour";
    }>;
    generation_id: z.ZodString;
}, z.core.$strict>;

/**
 * Annotation contract (plan 219 TASK-2).
 *
 * A bounded, catalog-governed vocabulary of semantic time events a chart may
 * overlay — Grafana's annotation pattern adopted as a pattern, not a system.
 * The original kinds derive from sources that already exist (Kent's ruling
 * 2026-08-31): Stripe billing events land in `events_billing`, playbook and
 * experiment lifecycle live in the customer's own control-plane records, and
 * the keyless SDK datasources resolve tenancy server-side by `config_hash_id`
 * exactly as the shipped `recent_sdk_diagnostics` endpoint does. No new
 * ingestion path exists or is implied. Policy/calendar markers (ST-385) name
 * authoritative tenant generation history; this contract does not supply its
 * producer or make those markers available before the history consumer ships.
 *
 * Deliberate absences, all load-bearing:
 * - No incident or data-quality kind — out of contract by ruling (AC-13);
 *   data-quality signals stay result `warnings`.
 * - No free-text tagging and no user-authored annotations (REQ-9).
 * - Annotation kinds carry no semantic ids and never join the query grammar:
 *   an overlay is presentation, not a filter (REQ-8) — toggling one changes
 *   what a chart explains, never what a query returns.
 */

declare const AnalyticsAnnotationKindSchema: z.ZodEnum<{
    playbook_published: "playbook_published";
    entitlement_change: "entitlement_change";
    price_change: "price_change";
    plan_change: "plan_change";
    experiment_started: "experiment_started";
    experiment_ended: "experiment_ended";
    sdk_release: "sdk_release";
    sdk_error_rate: "sdk_error_rate";
    metric_policy_changed: "metric_policy_changed";
    reporting_calendar_changed: "reporting_calendar_changed";
}>;
/**
 * Where an annotation's facts come from. `control_plane` means the customer's
 * own control-plane records (playbook versions carry their activation
 * timestamps; the experiment lifecycle lives beside them) — never the
 * RT-tenant-stamped control-plane event stream (REQ-7 / Q-1 default (a)).
 * The two SDK sources are keyless; tenancy resolves server-side by
 * `config_hash_id`, reusing the shipped resolution, never a second one.
 */
declare const AnalyticsAnnotationSourceSchema: z.ZodEnum<{
    control_plane: "control_plane";
    events_billing: "events_billing";
    events_sdk_meta: "events_sdk_meta";
    events_sdk_diagnostics: "events_sdk_diagnostics";
}>;
/** How a kind renders on a time axis: an instant line or a spanning region. */
declare const AnalyticsAnnotationMarkerSchema: z.ZodEnum<{
    region: "region";
    point: "point";
}>;
/** One vocabulary entry as the Semantic Catalog carries it. */
declare const AnalyticsCatalogAnnotationKindSchema: z.ZodObject<{
    kind: z.ZodEnum<{
        playbook_published: "playbook_published";
        entitlement_change: "entitlement_change";
        price_change: "price_change";
        plan_change: "plan_change";
        experiment_started: "experiment_started";
        experiment_ended: "experiment_ended";
        sdk_release: "sdk_release";
        sdk_error_rate: "sdk_error_rate";
        metric_policy_changed: "metric_policy_changed";
        reporting_calendar_changed: "reporting_calendar_changed";
    }>;
    label: z.ZodString;
    description: z.ZodString;
    source: z.ZodEnum<{
        control_plane: "control_plane";
        events_billing: "events_billing";
        events_sdk_meta: "events_sdk_meta";
        events_sdk_diagnostics: "events_sdk_diagnostics";
    }>;
    marker: z.ZodEnum<{
        region: "region";
        point: "point";
    }>;
}, z.core.$strip>;
type AnalyticsCatalogAnnotationKind$1 = z.infer<typeof AnalyticsCatalogAnnotationKindSchema>;
/**
 * The complete vocabulary — the single source the generated Semantic Catalog
 * wires in with provenance. Adding a kind means adding it here AND to the
 * enum; the catalog integrity check requires the two to stay complete.
 */
declare const ANALYTICS_ANNOTATION_KINDS: readonly AnalyticsCatalogAnnotationKind$1[];
/** Explanation-only series identity. Empty dimensions means every partition of
 * this metric/concept; supplied members narrow the affected partitions. These
 * values never become query filters or request scope. */
declare const AnalyticsAnnotationSeriesSchema: z.ZodObject<{
    concept: z.ZodString;
    metric: z.ZodString;
    dimensions: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
}, z.core.$strict>;
/** The activation marker's `at` and the restated [start,end) can differ: a
 * calendar change may restate previously published history. Neither snapshot
 * is defaulted from today's settings, and this overlay never rewrites results. */
declare const AnalyticsAnnotationChangeSchema: z.ZodObject<{
    affected_series: z.ZodArray<z.ZodObject<{
        concept: z.ZodString;
        metric: z.ZodString;
        dimensions: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
    }, z.core.$strict>>;
    affected_period: z.ZodObject<{
        start: z.ZodISODateTime;
        end: z.ZodISODateTime;
    }, z.core.$strict>;
    before: z.ZodObject<{
        policy_version: z.ZodString;
        calendar_version: z.ZodString;
        series_grain: z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            quarter: "quarter";
            hour: "hour";
        }>;
        generation_id: z.ZodString;
    }, z.core.$strict>;
    after: z.ZodObject<{
        policy_version: z.ZodString;
        calendar_version: z.ZodString;
        series_grain: z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            quarter: "quarter";
            hour: "hour";
        }>;
        generation_id: z.ZodString;
    }, z.core.$strict>;
}, z.core.$strict>;
declare const AnalyticsAnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    kind: z.ZodEnum<{
        playbook_published: "playbook_published";
        entitlement_change: "entitlement_change";
        price_change: "price_change";
        plan_change: "plan_change";
        experiment_started: "experiment_started";
        experiment_ended: "experiment_ended";
        sdk_release: "sdk_release";
        sdk_error_rate: "sdk_error_rate";
    }>;
    at: z.ZodString;
    until: z.ZodOptional<z.ZodString>;
    label: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    source: z.ZodEnum<{
        control_plane: "control_plane";
        events_billing: "events_billing";
        events_sdk_meta: "events_sdk_meta";
        events_sdk_diagnostics: "events_sdk_diagnostics";
    }>;
    subject: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"metric_policy_changed">;
    source: z.ZodLiteral<"control_plane">;
    subject: z.ZodString;
    description: z.ZodString;
    until: z.ZodOptional<z.ZodNever>;
    change: z.ZodObject<{
        affected_series: z.ZodArray<z.ZodObject<{
            concept: z.ZodString;
            metric: z.ZodString;
            dimensions: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
        }, z.core.$strict>>;
        affected_period: z.ZodObject<{
            start: z.ZodISODateTime;
            end: z.ZodISODateTime;
        }, z.core.$strict>;
        before: z.ZodObject<{
            policy_version: z.ZodString;
            calendar_version: z.ZodString;
            series_grain: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                quarter: "quarter";
                hour: "hour";
            }>;
            generation_id: z.ZodString;
        }, z.core.$strict>;
        after: z.ZodObject<{
            policy_version: z.ZodString;
            calendar_version: z.ZodString;
            series_grain: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                quarter: "quarter";
                hour: "hour";
            }>;
            generation_id: z.ZodString;
        }, z.core.$strict>;
    }, z.core.$strict>;
    at: z.ZodString;
    label: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"reporting_calendar_changed">;
    source: z.ZodLiteral<"control_plane">;
    subject: z.ZodString;
    description: z.ZodString;
    until: z.ZodOptional<z.ZodNever>;
    change: z.ZodObject<{
        affected_series: z.ZodArray<z.ZodObject<{
            concept: z.ZodString;
            metric: z.ZodString;
            dimensions: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
        }, z.core.$strict>>;
        affected_period: z.ZodObject<{
            start: z.ZodISODateTime;
            end: z.ZodISODateTime;
        }, z.core.$strict>;
        before: z.ZodObject<{
            policy_version: z.ZodString;
            calendar_version: z.ZodString;
            series_grain: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                quarter: "quarter";
                hour: "hour";
            }>;
            generation_id: z.ZodString;
        }, z.core.$strict>;
        after: z.ZodObject<{
            policy_version: z.ZodString;
            calendar_version: z.ZodString;
            series_grain: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                quarter: "quarter";
                hour: "hour";
            }>;
            generation_id: z.ZodString;
        }, z.core.$strict>;
    }, z.core.$strict>;
    at: z.ZodString;
    label: z.ZodString;
}, z.core.$strip>], "kind">;
/**
 * Annotation read request (served by plan 219 TASK-4). Strict: a stray field
 * fails with a repairable error. Deliberately independent of the view query —
 * fetching annotations can never change what a query returns (REQ-8), and
 * tenant/environment scope comes from the verified session, never the body.
 */
declare const AnalyticsAnnotationRequestSchema: z.ZodObject<{
    start: z.ZodString;
    end: z.ZodString;
    kinds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
        playbook_published: "playbook_published";
        entitlement_change: "entitlement_change";
        price_change: "price_change";
        plan_change: "plan_change";
        experiment_started: "experiment_started";
        experiment_ended: "experiment_ended";
        sdk_release: "sdk_release";
        sdk_error_rate: "sdk_error_rate";
        metric_policy_changed: "metric_policy_changed";
        reporting_calendar_changed: "reporting_calendar_changed";
    }>>>;
}, z.core.$strict>;
declare const AnalyticsAnnotationResponseSchema: z.ZodObject<{
    annotations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodEnum<{
            playbook_published: "playbook_published";
            entitlement_change: "entitlement_change";
            price_change: "price_change";
            plan_change: "plan_change";
            experiment_started: "experiment_started";
            experiment_ended: "experiment_ended";
            sdk_release: "sdk_release";
            sdk_error_rate: "sdk_error_rate";
        }>;
        at: z.ZodString;
        until: z.ZodOptional<z.ZodString>;
        label: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        source: z.ZodEnum<{
            control_plane: "control_plane";
            events_billing: "events_billing";
            events_sdk_meta: "events_sdk_meta";
            events_sdk_diagnostics: "events_sdk_diagnostics";
        }>;
        subject: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"metric_policy_changed">;
        source: z.ZodLiteral<"control_plane">;
        subject: z.ZodString;
        description: z.ZodString;
        until: z.ZodOptional<z.ZodNever>;
        change: z.ZodObject<{
            affected_series: z.ZodArray<z.ZodObject<{
                concept: z.ZodString;
                metric: z.ZodString;
                dimensions: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
            }, z.core.$strict>>;
            affected_period: z.ZodObject<{
                start: z.ZodISODateTime;
                end: z.ZodISODateTime;
            }, z.core.$strict>;
            before: z.ZodObject<{
                policy_version: z.ZodString;
                calendar_version: z.ZodString;
                series_grain: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    quarter: "quarter";
                    hour: "hour";
                }>;
                generation_id: z.ZodString;
            }, z.core.$strict>;
            after: z.ZodObject<{
                policy_version: z.ZodString;
                calendar_version: z.ZodString;
                series_grain: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    quarter: "quarter";
                    hour: "hour";
                }>;
                generation_id: z.ZodString;
            }, z.core.$strict>;
        }, z.core.$strict>;
        at: z.ZodString;
        label: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"reporting_calendar_changed">;
        source: z.ZodLiteral<"control_plane">;
        subject: z.ZodString;
        description: z.ZodString;
        until: z.ZodOptional<z.ZodNever>;
        change: z.ZodObject<{
            affected_series: z.ZodArray<z.ZodObject<{
                concept: z.ZodString;
                metric: z.ZodString;
                dimensions: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
            }, z.core.$strict>>;
            affected_period: z.ZodObject<{
                start: z.ZodISODateTime;
                end: z.ZodISODateTime;
            }, z.core.$strict>;
            before: z.ZodObject<{
                policy_version: z.ZodString;
                calendar_version: z.ZodString;
                series_grain: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    quarter: "quarter";
                    hour: "hour";
                }>;
                generation_id: z.ZodString;
            }, z.core.$strict>;
            after: z.ZodObject<{
                policy_version: z.ZodString;
                calendar_version: z.ZodString;
                series_grain: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    quarter: "quarter";
                    hour: "hour";
                }>;
                generation_id: z.ZodString;
            }, z.core.$strict>;
        }, z.core.$strict>;
        at: z.ZodString;
        label: z.ZodString;
    }, z.core.$strip>], "kind">>;
    as_of: z.ZodString;
}, z.core.$strip>;

/**
 * In-memory Semantic Catalog adapter (plan 190 TASK-4).
 *
 * Wraps a validated AnalyticsCatalog document in an indexed, read-only view
 * the semantic validator (TASK-2), compiler (TASK-3), and web catalog route
 * (TASK-7) consume. Construction enforces referential integrity: a catalog
 * whose concepts reference undeclared dimensions or metrics is rejected with
 * every dangling reference named — the same gate the plan-181-generated
 * catalog (TASK-5) must pass.
 *
 * Every derived listing is deterministic: global lists sort by id;
 * concept-scoped lists keep the concept's declared order (it is authored
 * ordering, meaningful to editors and agents alike).
 */

type AnalyticsCatalogData = z.infer<typeof AnalyticsCatalogSchema>;
type AnalyticsCatalogConcept$1 = z.infer<typeof AnalyticsCatalogConceptSchema>;
type AnalyticsCatalogDimension$1 = z.infer<typeof AnalyticsCatalogDimensionSchema>;
type AnalyticsCatalogMetric$1 = z.infer<typeof AnalyticsCatalogMetricSchema>;
type AnalyticsAgentCatalogEntry$1 = z.infer<typeof AnalyticsAgentCatalogEntrySchema>;
type AnalyticsCatalogSearchResult$1 = z.infer<typeof AnalyticsCatalogSearchResultSchema>;
interface AnalyticsCatalogView {
    readonly version: string;
    readonly source: AnalyticsCatalogData['source'];
    listConcepts(): AnalyticsCatalogConcept$1[];
    listDimensions(): AnalyticsCatalogDimension$1[];
    listMetrics(): AnalyticsCatalogMetric$1[];
    getConcept(id: string): AnalyticsCatalogConcept$1 | undefined;
    getDimension(id: string): AnalyticsCatalogDimension$1 | undefined;
    getMetric(id: string): AnalyticsCatalogMetric$1 | undefined;
    /** Dimensions of one concept, in the concept's declared order. */
    dimensionsFor(conceptId: string): AnalyticsCatalogDimension$1[];
    /** Metrics of one concept, in the concept's declared order. */
    metricsFor(conceptId: string): AnalyticsCatalogMetric$1[];
    /** The annotation-kind vocabulary this catalog carries, sorted by kind. */
    listAnnotationKinds(): AnalyticsCatalogAnnotationKind$1[];
    /**
     * The derived data products one INGESTED EVENT feeds, sorted by metric id.
     *
     * The question this answers is the one nobody could answer before: "a tenant
     * emits `gate_evaluated` — what lights up?" and, read backwards, "this chart
     * is empty, which event is missing?" Pass a platform event name from the
     * taxonomy or a datasource name; both sides of a metric's declared inputs
     * are indexed.
     */
    metricsFromIngestedSource(sourceName: string): AnalyticsCatalogMetric$1[];
    /**
     * Every ingested event and datasource the catalog reads, sorted. The set of
     * inputs the product depends on — useful for asking what a new tenant must
     * emit before its analytics are populated.
     */
    listIngestedSources(): string[];
    /**
     * The metrics one Tinybird pipe carries, sorted by metric id (plan 228
     * TASK-3). "Carries" is pipe-allowlist truth — the pipe accepts and serves
     * the metric id — not a claim that rows exist for it (a carried metric with
     * catalog_status='unavailable' is exactly the carried-but-dark state the
     * register surfaces). This is the read the web execution layer derives its
     * pipe allowlists from, replacing hand-maintained Record maps.
     */
    metricsForPipe(pipeName: string): AnalyticsCatalogMetric$1[];
    /** Every pipe name any metric declares carriage on, sorted. */
    listCarryingPipes(): string[];
}
declare function createInMemoryAnalyticsCatalog(data: unknown): AnalyticsCatalogView;
/**
 * The compact, deterministic projection agents search instead of loading the
 * full catalog: concepts, dimensions, metrics, and the query families in use
 * — each with enough compatibility information to compose a valid draft
 * without guessing ids from labels.
 */
declare function buildAgentCatalogProjection(catalog: AnalyticsCatalogView): AnalyticsAgentCatalogEntry$1[];
/**
 * Deterministic catalog search: token overlap scored id > label > prose,
 * ties broken by id. No randomness, no model — the same query against the
 * same catalog always returns the same ranking.
 */
declare function searchAgentCatalog(catalog: AnalyticsCatalogView, query: string, limit?: number): AnalyticsCatalogSearchResult$1;

/**
 * FIXTURE Semantic Catalog (plan 190 TASK-4).
 *
 * The hand-shaped catalog Phase 0/1 runs on until plan 181's data-dictionary
 * artifacts exist to generate the real one (TASK-5 — the Q-1 ruling). It is
 * deliberately stamped `source: 'fixture'`: nothing downstream may treat it
 * as generated truth, and the AC-4 provenance gate retires it.
 *
 * Shape follows the design of record: the entitlement-decision concept is
 * §3.1's worked example; the other concepts back the Phase 1 templates and
 * the six ported analytics surfaces. Config-entity dimensions carry the
 * anchor identity model — the values are anchor handles/ids, never labels.
 */

/**
 * Composed from one file per entry under `entries/` (plan 283 TASK-40, D-10a):
 * `entries/index.ts` fixes the order, the entry files carry the definitions
 * and their rationale, `entries/shared.ts` the notes more than one entry
 * cites. This object is the same document those files always produced; it
 * leaves source control when every entry is a definition the generator
 * derives the document from (TASK-44).
 */
declare const FIXTURE_ANALYTICS_CATALOG: AnalyticsCatalogData;
/** The fixture catalog wrapped in the indexed view (integrity-checked). */
declare function createFixtureAnalyticsCatalog(): AnalyticsCatalogView;

/**
 * The metric × slice matrix, GENERATED from dimension groundings (plan 252
 * TASK-58, metric-primitives §8/§9: "what a metric can be sliced by is
 * computed from its concept's groundings — never authored").
 *
 * R7: a slice applies only if the metric's fact table has a grounding for it.
 * So the matrix is a pure function of (concept.metrics × concept groundings) —
 * there is no list to maintain, and adding the fact-table contract to a
 * concept cannot change which pairs exist. The snapshot test beside this file
 * is what holds that invariant: a change to the matrix has to be a change to
 * the groundings.
 *
 * A grounding carries its OWN status and blocker, so a pair can be present and
 * unavailable — "MRR available, plan slice unavailable" — which is why the
 * verdict travels with the pair instead of the pair being dropped.
 */

/** One metric's readiness for one slice: the grounding's status, narrowed per metric. */
interface AnalyticsMetricSliceStatus {
    /** `unavailable`, a grounding's own status, or `inherited` (the metric's own status applies). */
    readonly status: string;
    /** Why the slice is unavailable for this metric; undefined when it is servable. */
    readonly blocker: string | undefined;
}
/**
 * Whether `metricId` may be cut by `dimensionId` on `concept` (ST-430). The
 * ONE place a consumer (web's executors, the agent catalog, the view editor)
 * reads a slice's readiness: a grounding may be servable for only some of its
 * concept's metrics (`served_metrics`), because a cut is served by a carrier
 * and the metrics of one fact need not share it. Undefined when the concept
 * does not ground the dimension at all.
 */
declare function metricSliceStatus(concept: AnalyticsCatalogConcept$1, metricId: string, dimensionId: string): AnalyticsMetricSliceStatus | undefined;

/**
 * The metric-to-metric graph of the Semantic Catalog (RM-846 §4.5, ST-848):
 * `dependencies(id)` beside `dependents(id)`, and the impact of a catalog
 * change on the metrics downstream of it.
 *
 * A derived metric names the metrics it is composed from
 * (`numerator_metric`, `denominator_metric`). Those are the edges. A change to
 * a metric's definition, window or currency policy changes every metric
 * composed from it, so the PR that makes the change lists them (the Metric
 * impact workflow renders `renderMetricImpact` as a PR comment).
 */
/** The fields of a catalog metric the graph reads. */
interface MetricGraphNode {
    readonly id: string;
    readonly numerator_metric?: string;
    readonly denominator_metric?: string;
}
interface MetricGraph {
    /** Every metric `id` is composed from, transitively, sorted. */
    dependencies(id: string): string[];
    /** Every metric composed from `id`, transitively, sorted. */
    dependents(id: string): string[];
}
/**
 * Build the graph. Refuses an input that names no catalog metric, so a typo'd
 * composition cannot hide a dependent.
 */
declare function createMetricGraph(metrics: readonly MetricGraphNode[]): MetricGraph;
type MetricChangeKind = 'added' | 'removed' | 'modified';
interface MetricChange {
    readonly id: string;
    readonly change: MetricChangeKind;
    /** The metrics downstream of this one: from the new catalog, or the old one for a removal. */
    readonly dependents: readonly string[];
}
interface MetricImpact {
    readonly changes: readonly MetricChange[];
    /** Every downstream metric the changes reach that is not itself changed, sorted. */
    readonly touched: readonly string[];
}
/** Compare two catalogs' metric lists and name what each change reaches. */
declare function catalogMetricImpact(before: readonly MetricGraphNode[], after: readonly MetricGraphNode[]): MetricImpact;
/** The marker the workflow finds its own comment by. */
declare const METRIC_IMPACT_COMMENT_MARKER = "<!-- revt:metric-impact -->";
/** Markdown for the PR comment. Long lists are cut at `maxRows` with the remainder counted. */
declare function renderMetricImpact(impact: MetricImpact, maxRows?: number): string;

/**
 * Metric semantics declarations (RM-846 §4.5, ST-848): the time grain, window
 * and currency policy of every catalog metric, declared once, here, keyed by
 * metric id. `declareMetricSemantics` attaches each block to its entry when the
 * catalog is composed, and refuses a metric with no declaration or a
 * declaration with no metric, so a new metric cannot ship without one.
 *
 * Windows are built from the tenant's reporting timezone (D11): every block's
 * `timezone` names `tenant_configs.timezone` and nothing else.
 *
 * The values are today's reading defaults, not new ones: the Revenue view's
 * MRR charts draw weekly buckets over a trailing 30 days, the cohort grid
 * draws months over a trailing 12, the opportunity table reads 90 days, the
 * account profile fields are point-in-time, and everything else is the
 * platform default the view compiler has always used, daily over a trailing
 * 30 days. Views take their param defaults from these blocks, and web takes
 * its query defaults from them, so a change here is a change to every reader.
 */

/** The block the view compiler applies when a draft names no window or grain. */
declare const PLATFORM_DEFAULT_METRIC_SEMANTICS: AnalyticsMetricSemantics$1;
/** One declaration per catalog metric id. */
declare const METRIC_SEMANTICS: Readonly<Record<string, AnalyticsMetricSemantics$1>>;
/** The semantics block of one metric, refusing an id with no declaration. */
declare function metricSemanticsFor(id: string): AnalyticsMetricSemantics$1;

/**
 * Catalog-driven metric availability (BL-0072).
 *
 * A surface must never present a metric it cannot actually source. The
 * Semantic Catalog already states, per metric, whether a value can be produced
 * at all. @revt-eng/schema 0.1.319 retired `derivation.kind` and split it in
 * two: `catalog_status: 'unavailable'` is the terminal declared-with-blocker
 * state (it carries the reason in `derivation.note`), and `layer` says whether
 * a servable metric is `primitive` or `derived`. A metric absent from the
 * catalog entirely is a third case — nothing has ever defined it.
 *
 * Reading that from the catalog, rather than hard-coding "this one is missing"
 * in a component, means a surface starts showing real data the moment a
 * producer lands and the catalog is regenerated: no consumer change, no second
 * place to forget. It is the plan-229 structural-zero lesson as a reusable
 * check — a zero rendered without consulting this is very likely a lie.
 *
 * Moved here from revturbine-web `src/lib/analytics/metric-availability.ts`
 * (plan 283 TASK-35): the check depends on nothing but the catalog, and the
 * catalog's vocabulary lives in scaffold. Web's module read a module-scoped
 * `ANALYTICS_CATALOG` (its parsed copy of the generated document); scaffold
 * holds no catalog instance, so the module is a factory over the catalog data.
 * `createMetricAvailability` indexes the catalog once and returns the same four
 * reads web's module exported, with the same semantics; web keeps a shim that
 * binds the factory to its catalog, so its consumers do not change.
 */

interface MetricReadiness {
    first_valid_date?: string;
    release_condition?: string;
}
type MetricAvailability = 
/** A binding exists; a rendered value is real. */
({
    status: 'available';
    id: string;
    label: string;
    kind: 'observed' | 'derived';
} & MetricReadiness)
/** The catalog defines it but states it cannot be served, and says why. */
 | ({
    status: 'unavailable';
    id: string;
    label: string;
    reason: string;
} & MetricReadiness)
/** No such metric is defined anywhere in the catalog. */
 | {
    status: 'absent';
    id: string;
};
/**
 * Classify a surface that needs several metrics at once. A surface is only
 * honest if EVERY metric behind it can be served, so this reports the first
 * blocker — the one to name in the UI — alongside the full list.
 */
interface SurfaceAvailability {
    ok: boolean;
    blockers: MetricAvailability[];
    /** Copy for the unavailable state: what is missing and why. */
    summary: string | null;
}
/** The reads `createMetricAvailability` binds to one catalog. */
interface MetricAvailabilityReads {
    /** Classify one metric id. Unknown ids are `absent`, never silently available. */
    metricAvailability(id: string): MetricAvailability;
    isAvailable(id: string): boolean;
    describeUnavailable(availability: MetricAvailability): string | null;
    surfaceAvailability(ids: readonly string[]): SurfaceAvailability;
}
/**
 * Reader-facing explanation for a metric that cannot be shown, or `null` when
 * it can. `absent` has no catalog note to quote — nothing ever defined the
 * metric — so it gets copy that says exactly that rather than a vague
 * "no data", which reads like an empty period instead of a missing definition.
 *
 * Pure over the classification, so it needs no catalog; it is also returned
 * from `createMetricAvailability` so a consumer can take all four reads from
 * one binding.
 */
declare function describeUnavailable(availability: MetricAvailability): string | null;
/**
 * Bind the availability reads to one catalog document. The index is built once
 * here, so a consumer that parses the generated catalog at module load (web's
 * `ANALYTICS_CATALOG`) pays for the scan exactly once per catalog.
 */
declare function createMetricAvailability(catalog: AnalyticsCatalogData): MetricAvailabilityReads;

/**
 * Deterministic render defaulting (§9.2) — the documented rules `auto`
 * resolves through. Shared by the semantic validator (suggested patches,
 * plan 190 TASK-2) and the draft compiler (TASK-3). No heuristics beyond
 * what is written here: same query + same catalog → same render, always.
 */

type AnalyticsViewQuery$1 = z.infer<typeof AnalyticsViewQuerySchema>;
type AnalyticsRenderSpec$1 = z.infer<typeof AnalyticsRenderSpecSchema>;
/**
 * The render types each query family may use. First entry is the default
 * `auto` resolves to (breakdown consults cardinality — see below).
 * `recommendations` is reserved for the Phase 3 Recommendations views and
 * rides the `table` family until those land.
 */
declare const FAMILY_RENDER_COMPATIBILITY: Record<AnalyticsViewQuery$1['family'], Array<AnalyticsRenderSpec$1['type']>>;
declare function defaultRenderForQuery(query: AnalyticsViewQuery$1, catalog: AnalyticsCatalogView): AnalyticsRenderSpec$1;

/**
 * Semantic validation for analytics view documents (plan 190 TASK-2, §5.2).
 *
 * Structural validation is the Zod schema family's job; this layer checks a
 * structurally-valid canonical view against an authorized Semantic Catalog:
 * every reference exists and is available on its concept, the query family
 * is supported, the render type fits the query shape, filters use supported
 * operators, and template-locked properties were not changed.
 *
 * Errors follow the §5.4 repair contract: stable UPPER_SNAKE codes, JSON
 * Pointer paths, `allowed` values where enumerable, and advisory
 * `suggested_patch` entries that themselves pass validation when applied.
 * Codes are API surface — never renumber or reuse one.
 */

type AnalyticsView$1 = z.infer<typeof AnalyticsViewSchema>;
type AnalyticsCustomizationPolicy$1 = z.infer<typeof AnalyticsCustomizationPolicySchema>;
type AnalyticsValidationIssue$1 = z.infer<typeof AnalyticsValidationIssueSchema>;
type AnalyticsValidationResult$1 = z.infer<typeof AnalyticsValidationResultSchema>;
declare const ANALYTICS_VALIDATION_CODES: readonly ["UNKNOWN_CONCEPT", "UNKNOWN_DIMENSION", "UNKNOWN_METRIC", "METRIC_NOT_IN_CONCEPT", "DIMENSION_NOT_IN_CONCEPT", "FAMILY_NOT_SUPPORTED", "FUNNEL_REQUIRES_STAGES", "RENDERER_INCOMPATIBLE_WITH_QUERY", "RENDER_FIELD_NOT_IN_QUERY", "OPERATOR_NOT_SUPPORTED", "DIMENSION_NOT_GROUPABLE", "ANALYTICAL_UNIT_NOT_SUPPORTED", "TIME_DIMENSION_INVALID", "ORDER_FIELD_NOT_IN_QUERY", "FILTER_REF_UNKNOWN", "APPLIES_TO_UNKNOWN_BLOCK", "DUPLICATE_ELEMENT_ID", "LAYOUT_UNKNOWN_BLOCK", "LAYOUT_MISSING_BLOCK", "TEMPLATE_LOCKED_PROPERTY_CHANGED", "COMPARE_TARGET_MISSING", "COMPARE_TARGET_MISMATCH", "LEGACY_STOCK_CONCEPT_NEEDS_ATTENTION", "RENDER_ENCODING_INVALID"];
type AnalyticsValidationCode = (typeof ANALYTICS_VALIDATION_CODES)[number];
/**
 * Validate one query against the catalog. Exported for the draft compiler
 * (TASK-3), which validates block queries before resolving renders.
 */
declare function validateAnalyticsQuery(query: AnalyticsViewQuery$1, catalog: AnalyticsCatalogView, basePath: string, options?: {
    resolveLegacyStockConcept?: boolean;
}): AnalyticsValidationIssue$1[];
interface ValidateAnalyticsViewOptions {
    /**
     * When validating a customized view against its base template, the base
     * document and the policy whose `deny` list locks properties (§5.2's
     * "locked template properties were not changed").
     */
    baseTemplate?: {
        view: AnalyticsView$1;
        policy: AnalyticsCustomizationPolicy$1;
    };
}
/**
 * Validate a canonical view document against an authorized catalog.
 * Deprecated catalog entries in use surface as warnings, not errors.
 */
declare function validateAnalyticsView(view: AnalyticsView$1, catalog: AnalyticsCatalogView, options?: ValidateAnalyticsViewOptions): AnalyticsValidationResult$1;

/**
 * Draft → canonical compiler (plan 190 TASK-3, §4.1 / §9.2).
 *
 * Resolves an AnalyticsViewDraft into a canonical AnalyticsView through the
 * documented deterministic rules — `auto` is never an opaque choice: every
 * default the compiler applies is reported as a `resolutions` entry with the
 * JSON Pointer it landed on and the named rule that produced it. Same draft +
 * same catalog → same canonical document, always.
 *
 * The two forms never differ semantically (§17.9): a draft block's flattened
 * query fields nest into the canonical block query unchanged; the compiler
 * only fills what the draft legitimately omitted.
 *
 * Validation errors use DRAFT-shaped JSON Pointer paths (e.g.
 * `/blocks/0/metrics/1`) so an agent can repair the document it actually
 * submitted (§5.4).
 */

type AnalyticsViewDraft$1 = z.infer<typeof AnalyticsViewDraftSchema>;
type AnalyticsCompileResolution$1 = z.infer<typeof AnalyticsCompileResolutionSchema>;
type AnalyticsViewVisibility$1 = z.infer<typeof AnalyticsViewVisibilitySchema>;
interface CompileAnalyticsDraftOptions {
    /** Persisted view identity; a new view gets a deterministic id from the title. */
    view_id?: string;
    revision?: number;
}
interface AnalyticsCompileOutput {
    /** Present only when the draft compiled and validated clean. */
    view?: AnalyticsView$1;
    /** Persistence-level visibility (not part of the document, §11). */
    visibility: AnalyticsViewVisibility$1;
    resolutions: AnalyticsCompileResolution$1[];
    validation: AnalyticsValidationResult$1;
}
declare function compileAnalyticsDraft(draft: AnalyticsViewDraft$1, catalog: AnalyticsCatalogView, options?: CompileAnalyticsDraftOptions): AnalyticsCompileOutput;

/**
 * Analytics View Framework route contract (plan 190 — TASK-7's contract
 * knot, §8 of the design of record).
 *
 * The Phase 1 read-only surface: catalog read + search, template listing,
 * view read, and the batch query endpoint. Request/response envelopes live
 * here — contract types never originate in revturbine-web — and the
 * operations join the generated OpenAPI artifacts so the typed client stays
 * in sync. Phase 2 adds the compile/validate/preview/persist operations.
 *
 * Request documents are strict objects for the same reason the view family
 * is: a stray `sql` or endpoint name in a query request must fail with a
 * repairable error, never strip silently. Tenant and environment scope come
 * from the verified session or API token — they are deliberately absent
 * from every params/body shape below.
 */

/**
 * Transient per-request filter values — the URL-held filter state a viewer
 * changed (§4.5). `value: null` clears the view's default for that filter.
 */
declare const AnalyticsFilterStateSchema: z.ZodObject<{
    filter_id: z.ZodString;
    value: z.ZodNullable<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
        preset: z.ZodString;
        compare: z.ZodOptional<z.ZodEnum<{
            none: "none";
            previous_period: "previous_period";
            previous_year: "previous_year";
            custom_period: "custom_period";
        }>>;
        compare_start: z.ZodOptional<z.ZodString>;
        compare_end: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>, z.ZodObject<{
        min: z.ZodOptional<z.ZodNumber>;
        max: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"date_range">;
        start: z.ZodString;
        end: z.ZodString;
    }, z.core.$strict>]>>;
}, z.core.$strict>;
/**
 * Phase 1 executes stored/system view blocks only: the request identifies a
 * view (optionally pinned to a revision), the blocks to run, and transient
 * filter state. The server loads the authoritative document — a request can
 * never smuggle query structure past the saved view. Draft preview
 * (`POST /api/analytics/preview`) is Phase 2.
 */
/**
 * Explore-mode execution overrides (plan 217 Q-5, ruled 2026-08-31; extended
 * by plan 219 TASK-1 with the comparison targets, delta presentation, and
 * the semantic-time basis): the toolbar knobs a reader may change
 * transiently. Every field is a closed vocabulary or a bounded target shape
 * — this is NOT query structure and cannot smuggle SQL, columns, or bindings
 * past the saved view. The execution provider must either honor an override
 * or reject the request with a validation error; silently ignoring one is
 * forbidden (a control that does nothing lies).
 */
declare const AnalyticsQueryOverridesSchema: z.ZodObject<{
    time_grain: z.ZodOptional<z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        quarter: "quarter";
        hour: "hour";
    }>>;
    compare: z.ZodOptional<z.ZodEnum<{
        none: "none";
        previous_period: "previous_period";
        previous_year: "previous_year";
        custom_period: "custom_period";
        segment: "segment";
        variant: "variant";
        scope: "scope";
        intervention: "intervention";
    }>>;
    compare_delta: z.ZodOptional<z.ZodEnum<{
        percentage: "percentage";
        absolute: "absolute";
    }>>;
    compare_segment: z.ZodOptional<z.ZodObject<{
        dimension: z.ZodString;
        baseline: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
        against: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
    }, z.core.$strict>>;
    compare_experiment: z.ZodOptional<z.ZodObject<{
        experiment: z.ZodString;
        baseline: z.ZodOptional<z.ZodString>;
        against: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>>;
    compare_scope: z.ZodOptional<z.ZodEnum<{
        total: "total";
        account_matched: "account_matched";
        revturbine_tracked: "revturbine_tracked";
        revturbine_influenced: "revturbine_influenced";
    }>>;
    compare_anchor: z.ZodOptional<z.ZodString>;
    source_scope: z.ZodOptional<z.ZodEnum<{
        total: "total";
        account_matched: "account_matched";
        revturbine_tracked: "revturbine_tracked";
        revturbine_influenced: "revturbine_influenced";
    }>>;
    historical_mode: z.ZodOptional<z.ZodEnum<{
        as_of_event: "as_of_event";
        current: "current";
    }>>;
}, z.core.$strict>;
declare const AnalyticsQueryRequestSchema: z.ZodObject<{
    view_id: z.ZodString;
    revision: z.ZodOptional<z.ZodNumber>;
    block_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
    filter_state: z.ZodOptional<z.ZodArray<z.ZodObject<{
        filter_id: z.ZodString;
        value: z.ZodNullable<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
            preset: z.ZodString;
            compare: z.ZodOptional<z.ZodEnum<{
                none: "none";
                previous_period: "previous_period";
                previous_year: "previous_year";
                custom_period: "custom_period";
            }>>;
            compare_start: z.ZodOptional<z.ZodString>;
            compare_end: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>, z.ZodObject<{
            min: z.ZodOptional<z.ZodNumber>;
            max: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"date_range">;
            start: z.ZodString;
            end: z.ZodString;
        }, z.core.$strict>]>>;
    }, z.core.$strict>>>;
    overrides: z.ZodOptional<z.ZodObject<{
        time_grain: z.ZodOptional<z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            quarter: "quarter";
            hour: "hour";
        }>>;
        compare: z.ZodOptional<z.ZodEnum<{
            none: "none";
            previous_period: "previous_period";
            previous_year: "previous_year";
            custom_period: "custom_period";
            segment: "segment";
            variant: "variant";
            scope: "scope";
            intervention: "intervention";
        }>>;
        compare_delta: z.ZodOptional<z.ZodEnum<{
            percentage: "percentage";
            absolute: "absolute";
        }>>;
        compare_segment: z.ZodOptional<z.ZodObject<{
            dimension: z.ZodString;
            baseline: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
            against: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
        }, z.core.$strict>>;
        compare_experiment: z.ZodOptional<z.ZodObject<{
            experiment: z.ZodString;
            baseline: z.ZodOptional<z.ZodString>;
            against: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>>;
        compare_scope: z.ZodOptional<z.ZodEnum<{
            total: "total";
            account_matched: "account_matched";
            revturbine_tracked: "revturbine_tracked";
            revturbine_influenced: "revturbine_influenced";
        }>>;
        compare_anchor: z.ZodOptional<z.ZodString>;
        source_scope: z.ZodOptional<z.ZodEnum<{
            total: "total";
            account_matched: "account_matched";
            revturbine_tracked: "revturbine_tracked";
            revturbine_influenced: "revturbine_influenced";
        }>>;
        historical_mode: z.ZodOptional<z.ZodEnum<{
            as_of_event: "as_of_event";
            current: "current";
        }>>;
    }, z.core.$strict>>;
}, z.core.$strict>;
/** Per-block failure — partial success is the contract (§8): one failing
 * block must not blank the view. Codes follow the validation-code grammar. */
declare const AnalyticsBlockErrorSchema: z.ZodObject<{
    block_id: z.ZodString;
    code: z.ZodString;
    message: z.ZodString;
}, z.core.$strip>;
declare const AnalyticsBlockResultSchema: z.ZodObject<{
    block_id: z.ZodString;
    result: z.ZodObject<{
        data: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        fields: z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            type: z.ZodEnum<{
                string: "string";
                number: "number";
                boolean: "boolean";
                date: "date";
                datetime: "datetime";
                currency: "currency";
                percent: "percent";
            }>;
            nullable: z.ZodBoolean;
        }, z.core.$strip>>;
        meta: z.ZodObject<{
            query_hash: z.ZodString;
            concept: z.ZodString;
            analytical_unit: z.ZodEnum<{
                user: "user";
                account: "account";
                billing_unit: "billing_unit";
                organization: "organization";
            }>;
            source_scope: z.ZodEnum<{
                total: "total";
                account_matched: "account_matched";
                revturbine_tracked: "revturbine_tracked";
                revturbine_influenced: "revturbine_influenced";
            }>;
            coverage: z.ZodOptional<z.ZodObject<{
                numerator: z.ZodNumber;
                denominator: z.ZodNumber;
                rate: z.ZodNumber;
            }, z.core.$strip>>;
            as_of: z.ZodString;
            freshness_seconds: z.ZodNumber;
            gate_settings: z.ZodOptional<z.ZodObject<{
                snapshot_id: z.ZodString;
                configured: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    status: z.ZodLiteral<"resolved">;
                    source: z.ZodEnum<{
                        tenant_row: "tenant_row";
                        missing_row: "missing_row";
                    }>;
                    policy: z.ZodLiteral<"gate-placement-settings-approved-v1">;
                    values: z.ZodObject<{
                        analytics_min_sample: z.ZodNumber;
                        quiet_days: z.ZodNumber;
                        gate_follow_up_days: z.ZodNumber;
                        gate_window_days: z.ZodObject<{
                            min_age_days: z.ZodNumber;
                            max_age_days: z.ZodNumber;
                        }, z.core.$strict>;
                    }, z.core.$strict>;
                    provenance: z.ZodObject<{
                        analytics_min_sample: z.ZodEnum<{
                            default: "default";
                            override: "override";
                        }>;
                        quiet_days: z.ZodEnum<{
                            default: "default";
                            override: "override";
                        }>;
                        gate_follow_up_days: z.ZodEnum<{
                            default: "default";
                            override: "override";
                        }>;
                        gate_window_days: z.ZodEnum<{
                            default: "default";
                            override: "override";
                        }>;
                    }, z.core.$strict>;
                }, z.core.$strict>, z.ZodObject<{
                    status: z.ZodLiteral<"unavailable">;
                    reason: z.ZodLiteral<"schema_capability_unsupported">;
                }, z.core.$strict>], "status">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    status: z.ZodLiteral<"legacy">;
                    policy: z.ZodLiteral<"gate-placement-legacy-v1">;
                    values: z.ZodObject<{
                        quiet_days: z.ZodLiteral<7>;
                        analytics_min_sample: z.ZodLiteral<30>;
                    }, z.core.$strict>;
                }, z.core.$strict>, z.ZodObject<{
                    status: z.ZodLiteral<"not_applied">;
                }, z.core.$strict>], "status">;
                target: z.ZodObject<{
                    status: z.ZodLiteral<"unavailable">;
                    prerequisite: z.ZodLiteral<"BL-0497">;
                }, z.core.$strict>;
            }, z.core.$strict>>;
            applied_filters: z.ZodDefault<z.ZodArray<z.ZodObject<{
                dimension: z.ZodString;
                operator: z.ZodEnum<{
                    in: "in";
                    eq: "eq";
                    neq: "neq";
                    not_in: "not_in";
                    between: "between";
                    gte: "gte";
                    lte: "lte";
                    is_null: "is_null";
                    is_not_null: "is_not_null";
                    contains: "contains";
                }>;
                value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
                    preset: z.ZodString;
                    compare: z.ZodOptional<z.ZodEnum<{
                        none: "none";
                        previous_period: "previous_period";
                        previous_year: "previous_year";
                        custom_period: "custom_period";
                    }>>;
                    compare_start: z.ZodOptional<z.ZodString>;
                    compare_end: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>, z.ZodObject<{
                    min: z.ZodOptional<z.ZodNumber>;
                    max: z.ZodOptional<z.ZodNumber>;
                }, z.core.$strict>, z.ZodObject<{
                    type: z.ZodLiteral<"date_range">;
                    start: z.ZodString;
                    end: z.ZodString;
                }, z.core.$strict>]>>;
            }, z.core.$strict>>>;
            next_cursor: z.ZodOptional<z.ZodString>;
            warnings: z.ZodDefault<z.ZodArray<z.ZodObject<{
                code: z.ZodString;
                message: z.ZodString;
            }, z.core.$strip>>>;
            reporting_currency: z.ZodOptional<z.ZodObject<{
                currency: z.ZodString;
                policy_version: z.ZodString;
                rate_source: z.ZodString;
                date_basis: z.ZodString;
                rate_evidence: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    status: z.ZodLiteral<"complete">;
                    entries: z.ZodArray<z.ZodObject<{
                        provider: z.ZodString;
                        requested_fact_date: z.ZodISODate;
                        selected_rate_date: z.ZodISODate;
                        stored_rate_id: z.ZodString;
                    }, z.core.$strict>>;
                }, z.core.$strict>, z.ZodObject<{
                    status: z.ZodLiteral<"overflow">;
                    required_entries: z.ZodNumber;
                    limit: z.ZodLiteral<8000>;
                }, z.core.$strict>], "status">>;
            }, z.core.$strip>>;
            accounting: z.ZodOptional<z.ZodArray<z.ZodObject<{
                metric: z.ZodString;
                row_index: z.ZodOptional<z.ZodNumber>;
                definition: z.ZodObject<{
                    economic_basis: z.ZodString;
                    population: z.ZodString;
                }, z.core.$strict>;
                generation: z.ZodObject<{
                    policy_version: z.ZodString;
                    calendar_version: z.ZodString;
                    series_grain: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        quarter: "quarter";
                        hour: "hour";
                    }>;
                    generation_id: z.ZodString;
                }, z.core.$strict>;
                calendar: z.ZodObject<{
                    timezone: z.ZodString;
                    day_boundary_hour: z.ZodNumber;
                }, z.core.$strict>;
                mapping_generation_id: z.ZodString;
                population_key: z.ZodString;
                native_currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                effective_cutoff: z.ZodISODateTime;
                observed_cutoff: z.ZodISODateTime;
                selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"period">;
                    start: z.ZodISODateTime;
                    end: z.ZodISODateTime;
                    stock_basis: z.ZodOptional<z.ZodEnum<{
                        opening: "opening";
                        closing: "closing";
                    }>>;
                    movement_basis: z.ZodOptional<z.ZodEnum<{
                        atomic_occurrence: "atomic_occurrence";
                        daily_series_net: "daily_series_net";
                        interval_net: "interval_net";
                    }>>;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"point">;
                    at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"committed_projection">;
                    base: z.ZodISODateTime;
                    horizon: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>>>;
            samples: z.ZodOptional<z.ZodArray<z.ZodObject<{
                metric: z.ZodString;
                unit: z.ZodEnum<{
                    user: "user";
                    account: "account";
                    invoice: "invoice";
                    presentation: "presentation";
                    episode: "episode";
                }>;
                count: z.ZodNullable<z.ZodNumber>;
                minimum: z.ZodNumber;
                status: z.ZodEnum<{
                    unknown: "unknown";
                    available: "available";
                    unavailable: "unavailable";
                    below_minimum: "below_minimum";
                    not_applicable: "not_applicable";
                }>;
            }, z.core.$strict>>>;
        }, z.core.$strip>;
    }, z.core.$strip>;
}, z.core.$strip>;
declare const AnalyticsQueryResponseSchema: z.ZodObject<{
    view_id: z.ZodString;
    revision: z.ZodNumber;
    catalog_version: z.ZodString;
    results: z.ZodArray<z.ZodObject<{
        block_id: z.ZodString;
        result: z.ZodObject<{
            data: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            fields: z.ZodArray<z.ZodObject<{
                id: z.ZodString;
                type: z.ZodEnum<{
                    string: "string";
                    number: "number";
                    boolean: "boolean";
                    date: "date";
                    datetime: "datetime";
                    currency: "currency";
                    percent: "percent";
                }>;
                nullable: z.ZodBoolean;
            }, z.core.$strip>>;
            meta: z.ZodObject<{
                query_hash: z.ZodString;
                concept: z.ZodString;
                analytical_unit: z.ZodEnum<{
                    user: "user";
                    account: "account";
                    billing_unit: "billing_unit";
                    organization: "organization";
                }>;
                source_scope: z.ZodEnum<{
                    total: "total";
                    account_matched: "account_matched";
                    revturbine_tracked: "revturbine_tracked";
                    revturbine_influenced: "revturbine_influenced";
                }>;
                coverage: z.ZodOptional<z.ZodObject<{
                    numerator: z.ZodNumber;
                    denominator: z.ZodNumber;
                    rate: z.ZodNumber;
                }, z.core.$strip>>;
                as_of: z.ZodString;
                freshness_seconds: z.ZodNumber;
                gate_settings: z.ZodOptional<z.ZodObject<{
                    snapshot_id: z.ZodString;
                    configured: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        status: z.ZodLiteral<"resolved">;
                        source: z.ZodEnum<{
                            tenant_row: "tenant_row";
                            missing_row: "missing_row";
                        }>;
                        policy: z.ZodLiteral<"gate-placement-settings-approved-v1">;
                        values: z.ZodObject<{
                            analytics_min_sample: z.ZodNumber;
                            quiet_days: z.ZodNumber;
                            gate_follow_up_days: z.ZodNumber;
                            gate_window_days: z.ZodObject<{
                                min_age_days: z.ZodNumber;
                                max_age_days: z.ZodNumber;
                            }, z.core.$strict>;
                        }, z.core.$strict>;
                        provenance: z.ZodObject<{
                            analytics_min_sample: z.ZodEnum<{
                                default: "default";
                                override: "override";
                            }>;
                            quiet_days: z.ZodEnum<{
                                default: "default";
                                override: "override";
                            }>;
                            gate_follow_up_days: z.ZodEnum<{
                                default: "default";
                                override: "override";
                            }>;
                            gate_window_days: z.ZodEnum<{
                                default: "default";
                                override: "override";
                            }>;
                        }, z.core.$strict>;
                    }, z.core.$strict>, z.ZodObject<{
                        status: z.ZodLiteral<"unavailable">;
                        reason: z.ZodLiteral<"schema_capability_unsupported">;
                    }, z.core.$strict>], "status">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        status: z.ZodLiteral<"legacy">;
                        policy: z.ZodLiteral<"gate-placement-legacy-v1">;
                        values: z.ZodObject<{
                            quiet_days: z.ZodLiteral<7>;
                            analytics_min_sample: z.ZodLiteral<30>;
                        }, z.core.$strict>;
                    }, z.core.$strict>, z.ZodObject<{
                        status: z.ZodLiteral<"not_applied">;
                    }, z.core.$strict>], "status">;
                    target: z.ZodObject<{
                        status: z.ZodLiteral<"unavailable">;
                        prerequisite: z.ZodLiteral<"BL-0497">;
                    }, z.core.$strict>;
                }, z.core.$strict>>;
                applied_filters: z.ZodDefault<z.ZodArray<z.ZodObject<{
                    dimension: z.ZodString;
                    operator: z.ZodEnum<{
                        in: "in";
                        eq: "eq";
                        neq: "neq";
                        not_in: "not_in";
                        between: "between";
                        gte: "gte";
                        lte: "lte";
                        is_null: "is_null";
                        is_not_null: "is_not_null";
                        contains: "contains";
                    }>;
                    value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodObject<{
                        preset: z.ZodString;
                        compare: z.ZodOptional<z.ZodEnum<{
                            none: "none";
                            previous_period: "previous_period";
                            previous_year: "previous_year";
                            custom_period: "custom_period";
                        }>>;
                        compare_start: z.ZodOptional<z.ZodString>;
                        compare_end: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>, z.ZodObject<{
                        min: z.ZodOptional<z.ZodNumber>;
                        max: z.ZodOptional<z.ZodNumber>;
                    }, z.core.$strict>, z.ZodObject<{
                        type: z.ZodLiteral<"date_range">;
                        start: z.ZodString;
                        end: z.ZodString;
                    }, z.core.$strict>]>>;
                }, z.core.$strict>>>;
                next_cursor: z.ZodOptional<z.ZodString>;
                warnings: z.ZodDefault<z.ZodArray<z.ZodObject<{
                    code: z.ZodString;
                    message: z.ZodString;
                }, z.core.$strip>>>;
                reporting_currency: z.ZodOptional<z.ZodObject<{
                    currency: z.ZodString;
                    policy_version: z.ZodString;
                    rate_source: z.ZodString;
                    date_basis: z.ZodString;
                    rate_evidence: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        status: z.ZodLiteral<"complete">;
                        entries: z.ZodArray<z.ZodObject<{
                            provider: z.ZodString;
                            requested_fact_date: z.ZodISODate;
                            selected_rate_date: z.ZodISODate;
                            stored_rate_id: z.ZodString;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        status: z.ZodLiteral<"overflow">;
                        required_entries: z.ZodNumber;
                        limit: z.ZodLiteral<8000>;
                    }, z.core.$strict>], "status">>;
                }, z.core.$strip>>;
                accounting: z.ZodOptional<z.ZodArray<z.ZodObject<{
                    metric: z.ZodString;
                    row_index: z.ZodOptional<z.ZodNumber>;
                    definition: z.ZodObject<{
                        economic_basis: z.ZodString;
                        population: z.ZodString;
                    }, z.core.$strict>;
                    generation: z.ZodObject<{
                        policy_version: z.ZodString;
                        calendar_version: z.ZodString;
                        series_grain: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            quarter: "quarter";
                            hour: "hour";
                        }>;
                        generation_id: z.ZodString;
                    }, z.core.$strict>;
                    calendar: z.ZodObject<{
                        timezone: z.ZodString;
                        day_boundary_hour: z.ZodNumber;
                    }, z.core.$strict>;
                    mapping_generation_id: z.ZodString;
                    population_key: z.ZodString;
                    native_currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    effective_cutoff: z.ZodISODateTime;
                    observed_cutoff: z.ZodISODateTime;
                    selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"period">;
                        start: z.ZodISODateTime;
                        end: z.ZodISODateTime;
                        stock_basis: z.ZodOptional<z.ZodEnum<{
                            opening: "opening";
                            closing: "closing";
                        }>>;
                        movement_basis: z.ZodOptional<z.ZodEnum<{
                            atomic_occurrence: "atomic_occurrence";
                            daily_series_net: "daily_series_net";
                            interval_net: "interval_net";
                        }>>;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"point">;
                        at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"committed_projection">;
                        base: z.ZodISODateTime;
                        horizon: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>>>;
                samples: z.ZodOptional<z.ZodArray<z.ZodObject<{
                    metric: z.ZodString;
                    unit: z.ZodEnum<{
                        user: "user";
                        account: "account";
                        invoice: "invoice";
                        presentation: "presentation";
                        episode: "episode";
                    }>;
                    count: z.ZodNullable<z.ZodNumber>;
                    minimum: z.ZodNumber;
                    status: z.ZodEnum<{
                        unknown: "unknown";
                        available: "available";
                        unavailable: "unavailable";
                        below_minimum: "below_minimum";
                        not_applicable: "not_applicable";
                    }>;
                }, z.core.$strict>>>;
            }, z.core.$strip>;
        }, z.core.$strip>;
    }, z.core.$strip>>;
    errors: z.ZodDefault<z.ZodArray<z.ZodObject<{
        block_id: z.ZodString;
        code: z.ZodString;
        message: z.ZodString;
    }, z.core.$strip>>>;
}, z.core.$strip>;
/** Listing row for system templates; the full document is served by
 * `GET /api/analytics/views/{viewId}`. */
declare const AnalyticsTemplateSummarySchema: z.ZodObject<{
    id: z.ZodString;
    version: z.ZodNumber;
    title: z.ZodObject<{
        value: z.ZodString;
        key: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    description: z.ZodOptional<z.ZodObject<{
        value: z.ZodString;
        key: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>>;
    block_count: z.ZodNumber;
}, z.core.$strip>;
declare const analyticsViewPaths: ZodOpenApiPathsObject;

/**
 * Growth optimization contracts (plan 197).
 *
 * These are transient, internal data-plane values. They are shared through
 * `@revt-eng/schema`, but never enter the Playbook payload contract.
 */

/** One measured bucket in a canonical growth-signal series (§8.1). */
declare const GrowthSignalPointSchema: z.ZodObject<{
    start: z.ZodString;
    end: z.ZodString;
    value: z.ZodNumber;
    numerator: z.ZodOptional<z.ZodNumber>;
    denominator: z.ZodOptional<z.ZodNumber>;
    sample_size: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
/** A semantic metric measured over time at one analytical grain (§8.1). */
declare const GrowthSignalSeriesSchema: z.ZodObject<{
    metric: z.ZodString;
    analytical_unit: z.ZodEnum<{
        user: "user";
        account: "account";
        billing_unit: "billing_unit";
        organization: "organization";
    }>;
    source_scope: z.ZodEnum<{
        total: "total";
        account_matched: "account_matched";
        revturbine_tracked: "revturbine_tracked";
        revturbine_influenced: "revturbine_influenced";
    }>;
    dimensions: z.ZodRecord<z.ZodString, z.ZodString>;
    points: z.ZodArray<z.ZodObject<{
        start: z.ZodString;
        end: z.ZodString;
        value: z.ZodNumber;
        numerator: z.ZodOptional<z.ZodNumber>;
        denominator: z.ZodOptional<z.ZodNumber>;
        sample_size: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
    provenance: z.ZodObject<{
        provider_handle: z.ZodString;
        provider_type: z.ZodString;
        provider_version: z.ZodString;
        contract_version: z.ZodNumber;
        generated_at: z.ZodString;
        data_watermark: z.ZodOptional<z.ZodString>;
        source_revision: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>;
}, z.core.$strip>;
/** Normalized output of a GrowthSignalProvider. */
declare const GrowthSignalBundleSchema: z.ZodObject<{
    availability: z.ZodEnum<{
        available: "available";
        stale: "stale";
        unavailable: "unavailable";
        unsupported: "unsupported";
        partial: "partial";
    }>;
    series: z.ZodArray<z.ZodObject<{
        metric: z.ZodString;
        analytical_unit: z.ZodEnum<{
            user: "user";
            account: "account";
            billing_unit: "billing_unit";
            organization: "organization";
        }>;
        source_scope: z.ZodEnum<{
            total: "total";
            account_matched: "account_matched";
            revturbine_tracked: "revturbine_tracked";
            revturbine_influenced: "revturbine_influenced";
        }>;
        dimensions: z.ZodRecord<z.ZodString, z.ZodString>;
        points: z.ZodArray<z.ZodObject<{
            start: z.ZodString;
            end: z.ZodString;
            value: z.ZodNumber;
            numerator: z.ZodOptional<z.ZodNumber>;
            denominator: z.ZodOptional<z.ZodNumber>;
            sample_size: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>;
        provenance: z.ZodObject<{
            provider_handle: z.ZodString;
            provider_type: z.ZodString;
            provider_version: z.ZodString;
            contract_version: z.ZodNumber;
            generated_at: z.ZodString;
            data_watermark: z.ZodOptional<z.ZodString>;
            source_revision: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>;
    }, z.core.$strip>>;
    provenance: z.ZodObject<{
        provider_handle: z.ZodString;
        provider_type: z.ZodString;
        provider_version: z.ZodString;
        contract_version: z.ZodNumber;
        generated_at: z.ZodString;
        data_watermark: z.ZodOptional<z.ZodString>;
        source_revision: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>;
}, z.core.$strip>;
/** Canonical result produced by the pure trend-feature layer (§8.2). */
declare const TrendFeaturesSchema: z.ZodObject<{
    current: z.ZodNumber;
    baseline: z.ZodNumber;
    absolute_delta: z.ZodNumber;
    relative_delta: z.ZodNumber;
    short_window: z.ZodNumber;
    long_window: z.ZodNumber;
    slope: z.ZodNumber;
    acceleration: z.ZodNumber;
    volatility: z.ZodNumber;
    persistence: z.ZodNumber;
    seasonal_expected: z.ZodOptional<z.ZodNumber>;
    seasonal_deviation: z.ZodOptional<z.ZodNumber>;
    peer_value: z.ZodOptional<z.ZodNumber>;
    peer_gap: z.ZodOptional<z.ZodNumber>;
    sample_size: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
/** Minimum sample boundary a detector declares before it may fire (§8.6). */
declare const EvidenceRequirementSchema: z.ZodObject<{
    min_units: z.ZodOptional<z.ZodNumber>;
    min_events: z.ZodOptional<z.ZodNumber>;
    min_periods: z.ZodOptional<z.ZodNumber>;
    min_denominator: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
/** The bounded vocabulary for interpreting one item of detector evidence (§10.4). */
declare const OpportunityInterpretationSchema: z.ZodEnum<{
    increase: "increase";
    decrease: "decrease";
    level_shift: "level_shift";
    threshold: "threshold";
    peer_gap: "peer_gap";
    correlation: "correlation";
}>;
/** One machine-readable fact supporting an opportunity candidate (§10.4). */
declare const OpportunityEvidenceSchema: z.ZodObject<{
    metric: z.ZodString;
    current: z.ZodNumber;
    baseline: z.ZodOptional<z.ZodNumber>;
    relative_delta: z.ZodOptional<z.ZodNumber>;
    window: z.ZodObject<{
        start: z.ZodString;
        end: z.ZodString;
    }, z.core.$strip>;
    sample_size: z.ZodOptional<z.ZodNumber>;
    source_scope: z.ZodEnum<{
        total: "total";
        account_matched: "account_matched";
        revturbine_tracked: "revturbine_tracked";
        revturbine_influenced: "revturbine_influenced";
    }>;
    interpretation: z.ZodEnum<{
        increase: "increase";
        decrease: "decrease";
        level_shift: "level_shift";
        threshold: "threshold";
        peer_gap: "peer_gap";
        correlation: "correlation";
    }>;
}, z.core.$strip>;
/** Inputs and evidence floors a detector declares before evaluation. */
declare const DetectorRequirementsSchema: z.ZodObject<{
    required_metrics: z.ZodArray<z.ZodString>;
    evidence: z.ZodObject<{
        min_units: z.ZodOptional<z.ZodNumber>;
        min_events: z.ZodOptional<z.ZodNumber>;
        min_periods: z.ZodOptional<z.ZodNumber>;
        min_denominator: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>;
}, z.core.$strip>;
/** Structured output of one pure GrowthDetector invocation (§10.3). */
declare const OpportunityCandidateSchema: z.ZodObject<{
    detector_id: z.ZodString;
    detector_version: z.ZodNumber;
    opportunity_type: z.ZodString;
    resource: z.ZodOptional<z.ZodObject<{
        type: z.ZodString;
        handle: z.ZodString;
    }, z.core.$strip>>;
    segment_handles: z.ZodOptional<z.ZodArray<z.ZodString>>;
    evidence: z.ZodArray<z.ZodObject<{
        metric: z.ZodString;
        current: z.ZodNumber;
        baseline: z.ZodOptional<z.ZodNumber>;
        relative_delta: z.ZodOptional<z.ZodNumber>;
        window: z.ZodObject<{
            start: z.ZodString;
            end: z.ZodString;
        }, z.core.$strip>;
        sample_size: z.ZodOptional<z.ZodNumber>;
        source_scope: z.ZodEnum<{
            total: "total";
            account_matched: "account_matched";
            revturbine_tracked: "revturbine_tracked";
            revturbine_influenced: "revturbine_influenced";
        }>;
        interpretation: z.ZodEnum<{
            increase: "increase";
            decrease: "decrease";
            level_shift: "level_shift";
            threshold: "threshold";
            peer_gap: "peer_gap";
            correlation: "correlation";
        }>;
    }, z.core.$strip>>;
    hypothesis: z.ZodString;
    confidence: z.ZodNumber;
    impact: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    suggested_action: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    suggested_experiment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;

declare const EventSourceSchema: z.ZodEnum<{
    system: "system";
    workflow: "workflow";
    clickstream: "clickstream";
    telemetry: "telemetry";
    sdk: "sdk";
}>;
declare const EventEnvelopeSchema: z.ZodObject<{
    id: z.ZodString;
    event_type: z.ZodString;
    source: z.ZodDefault<z.ZodEnum<{
        system: "system";
        workflow: "workflow";
        clickstream: "clickstream";
        telemetry: "telemetry";
        sdk: "sdk";
    }>>;
    tenant_id: z.ZodOptional<z.ZodString>;
    user_id: z.ZodOptional<z.ZodString>;
    session_id: z.ZodOptional<z.ZodString>;
    occurred_at: z.ZodString;
    request_id: z.ZodString;
    attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const IngestedEventSchema: z.ZodObject<{
    id: z.ZodString;
    event_type: z.ZodString;
    source: z.ZodDefault<z.ZodEnum<{
        system: "system";
        workflow: "workflow";
        clickstream: "clickstream";
        telemetry: "telemetry";
        sdk: "sdk";
    }>>;
    tenant_id: z.ZodOptional<z.ZodString>;
    user_id: z.ZodOptional<z.ZodString>;
    session_id: z.ZodOptional<z.ZodString>;
    occurred_at: z.ZodString;
    request_id: z.ZodString;
    attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    ingested_at: z.ZodString;
}, z.core.$strip>;
declare const EventIngestBatchSchema: z.ZodArray<z.ZodObject<{
    id: z.ZodOptional<z.ZodString>;
    event_type: z.ZodString;
    occurred_at: z.ZodOptional<z.ZodString>;
    tenant_id: z.ZodOptional<z.ZodString>;
    user_id: z.ZodOptional<z.ZodString>;
    session_id: z.ZodOptional<z.ZodString>;
    attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    message: z.ZodOptional<z.ZodString>;
    level: z.ZodOptional<z.ZodString>;
    path: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
declare const TreatmentInteractionTypeSchema: z.ZodEnum<{
    dismiss: "dismiss";
    impression: "impression";
    remind_me_later: "remind_me_later";
    cta_clicked: "cta_clicked";
    cta_completed: "cta_completed";
    suppress: "suppress";
}>;
declare const TreatmentInteractionInputSchema: z.ZodObject<{
    user_id: z.ZodString;
    account_id: z.ZodOptional<z.ZodString>;
    placement_id: z.ZodString;
    treatment_id: z.ZodOptional<z.ZodString>;
    surface_slot_id: z.ZodOptional<z.ZodString>;
    surface_template_id: z.ZodOptional<z.ZodString>;
    payload_id: z.ZodOptional<z.ZodString>;
    interaction_type: z.ZodEnum<{
        dismiss: "dismiss";
        impression: "impression";
        remind_me_later: "remind_me_later";
        cta_clicked: "cta_clicked";
        cta_completed: "cta_completed";
        suppress: "suppress";
    }>;
    interaction_at: z.ZodOptional<z.ZodString>;
    message_block_handle: z.ZodOptional<z.ZodString>;
    message_block_id: z.ZodOptional<z.ZodString>;
    experiment_id: z.ZodOptional<z.ZodString>;
    variant_key: z.ZodOptional<z.ZodString>;
    rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    decision_id: z.ZodOptional<z.ZodString>;
    segment_handles: z.ZodOptional<z.ZodArray<z.ZodString>>;
    segment_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
    test: z.ZodOptional<z.ZodBoolean>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
/**
 * Batch ceiling for `/api/events/interactions`, mirroring the clickstream
 * batch bound so both ingest surfaces refuse at the same size.
 */
declare const MAX_TREATMENT_INTERACTIONS_PER_BATCH = 500;
/**
 * The array wire shape for treatment interactions.
 *
 * The SDK's `flushInteractionQueue` sends a bare {@link TreatmentInteractionInputSchema}
 * when one interaction is queued and this array when two or more are. Only the
 * bare shape was ever declared, so the route parsed only that — every
 * multi-item flush 422'd and its interactions were lost (plan 232). Declaring
 * the array here makes the batch bound and the item shape one definition that
 * the route and the SDK both consume, so the two cannot drift apart silently
 * again; a wire-contract test asserts the exact bodies the SDK builds parse
 * against {@link TreatmentInteractionRequestSchema}.
 */
declare const TreatmentInteractionBatchSchema: z.ZodArray<z.ZodObject<{
    user_id: z.ZodString;
    account_id: z.ZodOptional<z.ZodString>;
    placement_id: z.ZodString;
    treatment_id: z.ZodOptional<z.ZodString>;
    surface_slot_id: z.ZodOptional<z.ZodString>;
    surface_template_id: z.ZodOptional<z.ZodString>;
    payload_id: z.ZodOptional<z.ZodString>;
    interaction_type: z.ZodEnum<{
        dismiss: "dismiss";
        impression: "impression";
        remind_me_later: "remind_me_later";
        cta_clicked: "cta_clicked";
        cta_completed: "cta_completed";
        suppress: "suppress";
    }>;
    interaction_at: z.ZodOptional<z.ZodString>;
    message_block_handle: z.ZodOptional<z.ZodString>;
    message_block_id: z.ZodOptional<z.ZodString>;
    experiment_id: z.ZodOptional<z.ZodString>;
    variant_key: z.ZodOptional<z.ZodString>;
    rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    decision_id: z.ZodOptional<z.ZodString>;
    segment_handles: z.ZodOptional<z.ZodArray<z.ZodString>>;
    segment_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
    test: z.ZodOptional<z.ZodBoolean>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>>;
/**
 * Either wire shape, as the route accepts them. This is what the OpenAPI
 * request body declares, so a generated client can send either without
 * reaching past the contract.
 */
declare const TreatmentInteractionRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
    user_id: z.ZodString;
    account_id: z.ZodOptional<z.ZodString>;
    placement_id: z.ZodString;
    treatment_id: z.ZodOptional<z.ZodString>;
    surface_slot_id: z.ZodOptional<z.ZodString>;
    surface_template_id: z.ZodOptional<z.ZodString>;
    payload_id: z.ZodOptional<z.ZodString>;
    interaction_type: z.ZodEnum<{
        dismiss: "dismiss";
        impression: "impression";
        remind_me_later: "remind_me_later";
        cta_clicked: "cta_clicked";
        cta_completed: "cta_completed";
        suppress: "suppress";
    }>;
    interaction_at: z.ZodOptional<z.ZodString>;
    message_block_handle: z.ZodOptional<z.ZodString>;
    message_block_id: z.ZodOptional<z.ZodString>;
    experiment_id: z.ZodOptional<z.ZodString>;
    variant_key: z.ZodOptional<z.ZodString>;
    rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    decision_id: z.ZodOptional<z.ZodString>;
    segment_handles: z.ZodOptional<z.ZodArray<z.ZodString>>;
    segment_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
    test: z.ZodOptional<z.ZodBoolean>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
    user_id: z.ZodString;
    account_id: z.ZodOptional<z.ZodString>;
    placement_id: z.ZodString;
    treatment_id: z.ZodOptional<z.ZodString>;
    surface_slot_id: z.ZodOptional<z.ZodString>;
    surface_template_id: z.ZodOptional<z.ZodString>;
    payload_id: z.ZodOptional<z.ZodString>;
    interaction_type: z.ZodEnum<{
        dismiss: "dismiss";
        impression: "impression";
        remind_me_later: "remind_me_later";
        cta_clicked: "cta_clicked";
        cta_completed: "cta_completed";
        suppress: "suppress";
    }>;
    interaction_at: z.ZodOptional<z.ZodString>;
    message_block_handle: z.ZodOptional<z.ZodString>;
    message_block_id: z.ZodOptional<z.ZodString>;
    experiment_id: z.ZodOptional<z.ZodString>;
    variant_key: z.ZodOptional<z.ZodString>;
    rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    decision_id: z.ZodOptional<z.ZodString>;
    segment_handles: z.ZodOptional<z.ZodArray<z.ZodString>>;
    segment_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
    test: z.ZodOptional<z.ZodBoolean>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>>]>;
declare const TriggerEventTypeSchema: z.ZodEnum<{
    payment_failed: "payment_failed";
    onboarding_complete: "onboarding_complete";
    trial_midpoint: "trial_midpoint";
    trial_expiring: "trial_expiring";
    trial_expired: "trial_expired";
    usage_limit_approaching: "usage_limit_approaching";
    usage_limit_reached: "usage_limit_reached";
    credit_balance_low: "credit_balance_low";
    seat_limit_reached: "seat_limit_reached";
    feature_gated: "feature_gated";
    cancel_intent: "cancel_intent";
    auto_renewal_reminder: "auto_renewal_reminder";
    invite_teammate_prompt: "invite_teammate_prompt";
    referral_offer: "referral_offer";
    plan_upgrade_nudge: "plan_upgrade_nudge";
}>;
declare const TrialTriggerPayloadSchema: z.ZodObject<{
    days_remaining: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
declare const UsageTriggerPayloadSchema: z.ZodObject<{
    entitlement_handle: z.ZodOptional<z.ZodString>;
    current_usage: z.ZodOptional<z.ZodNumber>;
    usage_limit: z.ZodOptional<z.ZodNumber>;
    usage_percent: z.ZodOptional<z.ZodNumber>;
    threshold: z.ZodOptional<z.ZodNumber>;
    balance: z.ZodOptional<z.ZodNumber>;
    allocation: z.ZodOptional<z.ZodNumber>;
    seats_used: z.ZodOptional<z.ZodNumber>;
    seats_allowed: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
declare const FeatureGateTriggerPayloadSchema: z.ZodObject<{
    feature: z.ZodString;
}, z.core.$strip>;
declare const PaymentTriggerPayloadSchema: z.ZodObject<{
    retry_count: z.ZodOptional<z.ZodNumber>;
    renewal_date: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const SemanticEventSchema: z.ZodObject<{
    event_type: z.ZodString;
    payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const ControlPlaneEventSourceSchema: z.ZodEnum<{
    system: "system";
    workflow: "workflow";
}>;
declare const ControlPlaneEventTypeSchema: z.ZodEnum<{
    web_signed_up: "web_signed_up";
    web_signed_in: "web_signed_in";
    cli_signed_up: "cli_signed_up";
    cli_signed_in: "cli_signed_in";
    cli_command_executed: "cli_command_executed";
    playbook_version_submitted: "playbook_version_submitted";
    playbook_version_approved: "playbook_version_approved";
    playbook_version_rejected: "playbook_version_rejected";
    playbook_version_deployed: "playbook_version_deployed";
    playbook_version_launched: "playbook_version_launched";
    playbook_version_parked: "playbook_version_parked";
    playbook_version_resumed: "playbook_version_resumed";
    playbook_version_discarded: "playbook_version_discarded";
    playbook_version_archived: "playbook_version_archived";
    playbook_imported: "playbook_imported";
    playbook_exported: "playbook_exported";
    entity_created: "entity_created";
    entity_updated: "entity_updated";
    entity_deleted: "entity_deleted";
    web_api_error: "web_api_error";
}>;
declare const ControlPlaneSemanticEventSchema: z.ZodObject<{
    event_type: z.ZodEnum<{
        web_signed_up: "web_signed_up";
        web_signed_in: "web_signed_in";
        cli_signed_up: "cli_signed_up";
        cli_signed_in: "cli_signed_in";
        cli_command_executed: "cli_command_executed";
        playbook_version_submitted: "playbook_version_submitted";
        playbook_version_approved: "playbook_version_approved";
        playbook_version_rejected: "playbook_version_rejected";
        playbook_version_deployed: "playbook_version_deployed";
        playbook_version_launched: "playbook_version_launched";
        playbook_version_parked: "playbook_version_parked";
        playbook_version_resumed: "playbook_version_resumed";
        playbook_version_discarded: "playbook_version_discarded";
        playbook_version_archived: "playbook_version_archived";
        playbook_imported: "playbook_imported";
        playbook_exported: "playbook_exported";
        entity_created: "entity_created";
        entity_updated: "entity_updated";
        entity_deleted: "entity_deleted";
        web_api_error: "web_api_error";
    }>;
    source: z.ZodEnum<{
        system: "system";
        workflow: "workflow";
    }>;
    payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const EventSearchParamsSchema: z.ZodObject<{
    q: z.ZodOptional<z.ZodString>;
    source: z.ZodOptional<z.ZodEnum<{
        system: "system";
        workflow: "workflow";
        clickstream: "clickstream";
        telemetry: "telemetry";
        sdk: "sdk";
    }>>;
    event_type: z.ZodOptional<z.ZodString>;
    from: z.ZodOptional<z.ZodString>;
    to: z.ZodOptional<z.ZodString>;
    page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    per_page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
}, z.core.$strip>;
declare const WebhookEventSourceSchema: z.ZodEnum<{
    stripe: "stripe";
    apple: "apple";
    google: "google";
}>;
declare const WebhookEventStatusSchema: z.ZodEnum<{
    error: "error";
    pending: "pending";
    failed: "failed";
    skipped: "skipped";
    processed: "processed";
}>;
declare const WebhookEventLogSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    event_id: z.ZodString;
    event_type: z.ZodString;
    source: z.ZodEnum<{
        stripe: "stripe";
        apple: "apple";
        google: "google";
    }>;
    payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    status: z.ZodDefault<z.ZodEnum<{
        error: "error";
        pending: "pending";
        failed: "failed";
        skipped: "skipped";
        processed: "processed";
    }>>;
    processed_at: z.ZodOptional<z.ZodString>;
    error_message: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const TrackEventSchema: z.ZodObject<{
    environment_id: z.ZodString;
    user_id: z.ZodString;
    account_id: z.ZodOptional<z.ZodString>;
    event_name: z.ZodString;
    event_ts: z.ZodString;
    properties: z.ZodOptional<z.ZodString>;
    surface_slot_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    placement_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    payload_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    request_id: z.ZodOptional<z.ZodString>;
    experiment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    variant_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    tenant_id: z.ZodOptional<z.ZodString>;
    event_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    origin: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
        explicit: "explicit";
        derived: "derived";
        raw: "raw";
        automatic: "automatic";
    }>>>;
    playbook_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    decision_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    test: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
declare const TrackIngestBatchSchema: z.ZodObject<{
    events: z.ZodArray<z.ZodObject<{
        environment_id: z.ZodString;
        user_id: z.ZodString;
        account_id: z.ZodOptional<z.ZodString>;
        event_name: z.ZodString;
        event_ts: z.ZodString;
        properties: z.ZodOptional<z.ZodString>;
        surface_slot_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        placement_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        payload_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        request_id: z.ZodOptional<z.ZodString>;
        experiment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        variant_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        tenant_id: z.ZodOptional<z.ZodString>;
        event_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        origin: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
            explicit: "explicit";
            derived: "derived";
            raw: "raw";
            automatic: "automatic";
        }>>>;
        playbook_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        decision_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        test: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strip>>;
}, z.core.$strip>;
declare const SdkMetaEventTypeSchema: z.ZodEnum<{
    sdk_init: "sdk_init";
    sdk_error: "sdk_error";
    sdk_validation_warning: "sdk_validation_warning";
    resolution_failure: "resolution_failure";
}>;
declare const SdkConfigShapeSchema: z.ZodObject<{
    plans: z.ZodNumber;
    entitlements: z.ZodNumber;
    entitlement_rules: z.ZodNumber;
    segments: z.ZodNumber;
    placements: z.ZodNumber;
    placement_payloads: z.ZodNumber;
    content_ui_paths: z.ZodNumber;
    surface_templates: z.ZodNumber;
}, z.core.$strip>;
declare const SdkMetaEventSchema: z.ZodObject<{
    event_type: z.ZodEnum<{
        sdk_init: "sdk_init";
        sdk_error: "sdk_error";
        sdk_validation_warning: "sdk_validation_warning";
        resolution_failure: "resolution_failure";
    }>;
    occurred_at: z.ZodString;
    request_id: z.ZodOptional<z.ZodString>;
    config_hash_id: z.ZodOptional<z.ZodString>;
    sdk_version: z.ZodOptional<z.ZodString>;
    runtime_mode: z.ZodOptional<z.ZodString>;
    schema_version: z.ZodOptional<z.ZodString>;
    bundle_version: z.ZodOptional<z.ZodString>;
    config_shape: z.ZodOptional<z.ZodObject<{
        plans: z.ZodNumber;
        entitlements: z.ZodNumber;
        entitlement_rules: z.ZodNumber;
        segments: z.ZodNumber;
        placements: z.ZodNumber;
        placement_payloads: z.ZodNumber;
        content_ui_paths: z.ZodNumber;
        surface_templates: z.ZodNumber;
    }, z.core.$strip>>;
    message: z.ZodOptional<z.ZodString>;
    reason: z.ZodOptional<z.ZodString>;
    placement_handle: z.ZodOptional<z.ZodString>;
    slot_handle: z.ZodOptional<z.ZodString>;
    surface: z.ZodOptional<z.ZodString>;
    plan_handle: z.ZodOptional<z.ZodString>;
    entitlement_handle: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const SdkMetaIngestBatchSchema: z.ZodObject<{
    events: z.ZodArray<z.ZodObject<{
        event_type: z.ZodEnum<{
            sdk_init: "sdk_init";
            sdk_error: "sdk_error";
            sdk_validation_warning: "sdk_validation_warning";
            resolution_failure: "resolution_failure";
        }>;
        occurred_at: z.ZodString;
        request_id: z.ZodOptional<z.ZodString>;
        config_hash_id: z.ZodOptional<z.ZodString>;
        sdk_version: z.ZodOptional<z.ZodString>;
        runtime_mode: z.ZodOptional<z.ZodString>;
        schema_version: z.ZodOptional<z.ZodString>;
        bundle_version: z.ZodOptional<z.ZodString>;
        config_shape: z.ZodOptional<z.ZodObject<{
            plans: z.ZodNumber;
            entitlements: z.ZodNumber;
            entitlement_rules: z.ZodNumber;
            segments: z.ZodNumber;
            placements: z.ZodNumber;
            placement_payloads: z.ZodNumber;
            content_ui_paths: z.ZodNumber;
            surface_templates: z.ZodNumber;
        }, z.core.$strip>>;
        message: z.ZodOptional<z.ZodString>;
        reason: z.ZodOptional<z.ZodString>;
        placement_handle: z.ZodOptional<z.ZodString>;
        slot_handle: z.ZodOptional<z.ZodString>;
        surface: z.ZodOptional<z.ZodString>;
        plan_handle: z.ZodOptional<z.ZodString>;
        entitlement_handle: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
}, z.core.$strip>;
declare const eventPaths: ZodOpenApiPathsObject;

/**
 * Segment-shaped canonical analytics envelope (plan 252 TASK-2, BL-0303).
 *
 * One envelope, three validation tiers over the same six Segment methods
 * (`track`, `identify`, `group`, `page`, `screen`, `alias`):
 *
 * | Tier | Union | Who it binds |
 * |---|---|---|
 * | Input | {@link SegmentEventInputSchema} | Anything arriving at ingress. Vanilla Segment calls validate WITHOUT `context.revturbine` (REQ-2). |
 * | Producer | {@link RevturbineProducerEventSchema} | RevTurbine-owned producers (SDK, web, CLI, simulation). Stricter: stable `messageId`, capture-time `timestamp`, typed `context.revturbine`, Alias needs `userId`. |
 * | Canonical | {@link CanonicalAnalyticsEventSchema} | The normalized record ingress persists/forwards: identifiers, receive time and server-stamped tenant are filled exactly once. |
 *
 * Segment's standard field spellings (`userId`, `anonymousId`, `messageId`,
 * `previousId`, `groupId`, `sentAt`, ...) are kept verbatim — a scoped
 * exception to the snake_case rule recorded in
 * `knowledge/naming-conventions.md`. RevTurbine's own extension fields under
 * `context.revturbine` stay snake_case.
 *
 * ## Versioning — the event envelope has its OWN version pair
 *
 * `EVENT_ENVELOPE_SCHEMA_VERSION` / `MIN_READABLE_EVENT_ENVELOPE_SCHEMA_VERSION`
 * version this wire, independently of the Playbook payload's
 * `SCHEMA_VERSION` / `MIN_READABLE_SCHEMA_VERSION` in `core/bundle/ir.ts`. The
 * two contracts share no bytes: bumping the Playbook pair for an event change
 * would make every deployed SDK refuse every new Playbook
 * (`schema_version_too_new`) while the Playbook itself had not changed. The
 * plan puts the event version in `context.revturbine.schema_version`,
 * "independently from the upstream reference snapshot" (plan 252, RT
 * extensions table).
 *
 * Version log (append-only, same discipline as `ir.ts`):
 *
 * - **v1** — the flat, proprietary `TrackEventSchema` wire:
 *   `POST /api/track {"events":[TrackEvent]}`, `event_name`/`user_id`/`event_ts`,
 *   `properties` as a JSON *string*. It predates any version field, so an
 *   `{"events": [...]}` body IS v1.
 * - **v2** (this change) — the six-method Segment envelope:
 *   `{"batch":[message]}`, method discriminator `type`, object-valued
 *   `properties`/`traits`, typed `context.revturbine` whose `schema_version`
 *   is `2`. INTENTIONALLY BREAKING against v1: no v1 field name survives at
 *   the top level, `properties` changes type (string → object), and person /
 *   account identity move to `userId`/`anonymousId` + `context.groupId`.
 *
 * `MIN_READABLE` stays **1** for the coordinated-cutover window: until plan
 * 252 TASK-6 (web ingress) and TASK-12 (SDK serializer) land together, every
 * live producer still emits v1, so a reader that refused v1 would drop live
 * traffic. {@link liftTrackEventToSegmentInput} is the one sanctioned v1
 * reader — a deterministic lift INTO this envelope, not a second contract.
 * TASK-26 (activation) advances the floor to 2 for ingress, after which a v1
 * body is an explicit `legacy_below_floor` rejection (plan-local D-2: no
 * old-format ingress after cutover); historical stored-row reconstruction
 * keeps the lift.
 */

/** Current event-envelope version — what owned producers stamp in `context.revturbine.schema_version`. */
declare const EVENT_ENVELOPE_SCHEMA_VERSION = 2;
/** Oldest envelope version a reader still accepts. See the version log above for when it advances. */
declare const MIN_READABLE_EVENT_ENVELOPE_SCHEMA_VERSION = 1;
/** The flat `TrackEventSchema` wire. Carries no version field; `{"events": [...]}` implies it. */
declare const LEGACY_TRACK_EVENT_ENVELOPE_SCHEMA_VERSION = 1;
/** First version with a Segment-shaped envelope, hence the lowest legal `context.revturbine.schema_version`. */
declare const FIRST_SEGMENT_EVENT_ENVELOPE_SCHEMA_VERSION = 2;
/** Segment HTTP API per-message limit, UTF-8 bytes of the serialized message. Enforced at ingress/SDK batching (TASK-6/12). */
declare const SEGMENT_MAX_MESSAGE_BYTES: number;
/** Segment HTTP API per-batch limit, UTF-8 bytes of the serialized request body. */
declare const SEGMENT_MAX_BATCH_BYTES: number;
/** RevTurbine's stricter-than-Segment count bound, unchanged from the v1 `TrackIngestBatch`. */
declare const MAX_SEGMENT_MESSAGES_PER_BATCH = 500;
/** Segment's documented `messageId` ceiling. */
declare const SEGMENT_MAX_MESSAGE_ID_LENGTH = 100;
/**
 * Nesting bound for any JSON value inside a message (properties, traits,
 * context, integrations). The message object itself is depth 1. Zod-only:
 * JSON Schema cannot express depth without recursion, so the generated
 * validators do not carry it (recorded for the TASK-4 cross-validation).
 */
declare const MAX_EVENT_JSON_DEPTH = 32;
/** Bounds on `context.revturbine.tags`. */
declare const MAX_EVENT_TAGS = 32;
declare const MAX_EVENT_TAG_LENGTH = 64;
/**
 * Attribution basis for a person identity RevTurbine supplied rather than
 * captured. `account_primary_contact` is stamped ONLY by trusted billing
 * enrichment (REQ-10, `applyPrimaryContactEnrichment` in
 * `customers/models/primary-contact.ts`); it records an
 * associated contact, never a claim that this person acted, and a
 * caller-supplied value grants no authority.
 */
declare const RevturbineIdentitySourceSchema: z.ZodEnum<{
    account_primary_contact: "account_primary_contact";
}>;
/**
 * `context.revturbine` as ingress READS it: every field optional (a vanilla
 * Segment message may omit the whole object), every supplied field typed, and
 * unknown additive fields retained within the supported version range.
 */
declare const RevturbineEventContextSchema: z.ZodObject<{
    tenant_id: z.ZodOptional<z.ZodString>;
    environment_id: z.ZodOptional<z.ZodString>;
    origin: z.ZodOptional<z.ZodEnum<{
        explicit: "explicit";
        derived: "derived";
        raw: "raw";
        automatic: "automatic";
    }>>;
    test: z.ZodOptional<z.ZodBoolean>;
    playbook_version: z.ZodOptional<z.ZodString>;
    decision_id: z.ZodOptional<z.ZodString>;
    request_id: z.ZodOptional<z.ZodString>;
    session_id: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    surface_slot_id: z.ZodOptional<z.ZodString>;
    placement_id: z.ZodOptional<z.ZodString>;
    payload_id: z.ZodOptional<z.ZodString>;
    experiment_id: z.ZodOptional<z.ZodString>;
    variant_key: z.ZodOptional<z.ZodString>;
    experiment_version_id: z.ZodOptional<z.ZodString>;
    simulation_id: z.ZodOptional<z.ZodString>;
    simulation_scenario_id: z.ZodOptional<z.ZodString>;
    identity_source: z.ZodOptional<z.ZodEnum<{
        account_primary_contact: "account_primary_contact";
    }>>;
    schema_version: z.ZodOptional<z.ZodNumber>;
}, z.core.$loose>;
/**
 * `context.revturbine` as RevTurbine-owned producers must SEND it: strict
 * (no unregistered first-party field), stamped with the current version, and
 * naming its environment and origin.
 */
declare const RevturbineProducerEventContextSchema: z.ZodObject<{
    schema_version: z.ZodLiteral<2>;
    environment_id: z.ZodString;
    origin: z.ZodEnum<{
        explicit: "explicit";
        derived: "derived";
        raw: "raw";
        automatic: "automatic";
    }>;
    tenant_id: z.ZodOptional<z.ZodString>;
    test: z.ZodOptional<z.ZodBoolean>;
    playbook_version: z.ZodOptional<z.ZodString>;
    decision_id: z.ZodOptional<z.ZodString>;
    request_id: z.ZodOptional<z.ZodString>;
    session_id: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    surface_slot_id: z.ZodOptional<z.ZodString>;
    placement_id: z.ZodOptional<z.ZodString>;
    payload_id: z.ZodOptional<z.ZodString>;
    experiment_id: z.ZodOptional<z.ZodString>;
    variant_key: z.ZodOptional<z.ZodString>;
    experiment_version_id: z.ZodOptional<z.ZodString>;
    simulation_id: z.ZodOptional<z.ZodString>;
    simulation_scenario_id: z.ZodOptional<z.ZodString>;
    identity_source: z.ZodOptional<z.ZodEnum<{
        account_primary_contact: "account_primary_contact";
    }>>;
}, z.core.$strict>;
/**
 * `context.revturbine` on the normalized canonical record: version, the
 * server-stamped tenant and the resolved environment are always present.
 */
declare const RevturbineCanonicalEventContextSchema: z.ZodObject<{
    schema_version: z.ZodNumber;
    tenant_id: z.ZodString;
    environment_id: z.ZodString;
    origin: z.ZodOptional<z.ZodEnum<{
        explicit: "explicit";
        derived: "derived";
        raw: "raw";
        automatic: "automatic";
    }>>;
    test: z.ZodOptional<z.ZodBoolean>;
    playbook_version: z.ZodOptional<z.ZodString>;
    decision_id: z.ZodOptional<z.ZodString>;
    request_id: z.ZodOptional<z.ZodString>;
    session_id: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    surface_slot_id: z.ZodOptional<z.ZodString>;
    placement_id: z.ZodOptional<z.ZodString>;
    payload_id: z.ZodOptional<z.ZodString>;
    experiment_id: z.ZodOptional<z.ZodString>;
    variant_key: z.ZodOptional<z.ZodString>;
    experiment_version_id: z.ZodOptional<z.ZodString>;
    simulation_id: z.ZodOptional<z.ZodString>;
    simulation_scenario_id: z.ZodOptional<z.ZodString>;
    identity_source: z.ZodOptional<z.ZodEnum<{
        account_primary_contact: "account_primary_contact";
    }>>;
}, z.core.$loose>;
/** Segment's standard `context.page`. */
declare const SegmentPageContextSchema: z.ZodObject<{
    path: z.ZodOptional<z.ZodString>;
    referrer: z.ZodOptional<z.ZodString>;
    search: z.ZodOptional<z.ZodString>;
    title: z.ZodOptional<z.ZodString>;
    url: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
/** Segment's standard `context.library`. */
declare const SegmentLibraryContextSchema: z.ZodObject<{
    name: z.ZodOptional<z.ZodString>;
    version: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
declare const SegmentEventContextSchema: z.ZodObject<{
    revturbine: z.ZodOptional<z.ZodObject<{
        tenant_id: z.ZodOptional<z.ZodString>;
        environment_id: z.ZodOptional<z.ZodString>;
        origin: z.ZodOptional<z.ZodEnum<{
            explicit: "explicit";
            derived: "derived";
            raw: "raw";
            automatic: "automatic";
        }>>;
        test: z.ZodOptional<z.ZodBoolean>;
        playbook_version: z.ZodOptional<z.ZodString>;
        decision_id: z.ZodOptional<z.ZodString>;
        request_id: z.ZodOptional<z.ZodString>;
        session_id: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        surface_slot_id: z.ZodOptional<z.ZodString>;
        placement_id: z.ZodOptional<z.ZodString>;
        payload_id: z.ZodOptional<z.ZodString>;
        experiment_id: z.ZodOptional<z.ZodString>;
        variant_key: z.ZodOptional<z.ZodString>;
        experiment_version_id: z.ZodOptional<z.ZodString>;
        simulation_id: z.ZodOptional<z.ZodString>;
        simulation_scenario_id: z.ZodOptional<z.ZodString>;
        identity_source: z.ZodOptional<z.ZodEnum<{
            account_primary_contact: "account_primary_contact";
        }>>;
        schema_version: z.ZodOptional<z.ZodNumber>;
    }, z.core.$loose>>;
    groupId: z.ZodOptional<z.ZodString>;
    traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    page: z.ZodOptional<z.ZodObject<{
        path: z.ZodOptional<z.ZodString>;
        referrer: z.ZodOptional<z.ZodString>;
        search: z.ZodOptional<z.ZodString>;
        title: z.ZodOptional<z.ZodString>;
        url: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    library: z.ZodOptional<z.ZodObject<{
        name: z.ZodOptional<z.ZodString>;
        version: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    ip: z.ZodOptional<z.ZodString>;
    userAgent: z.ZodOptional<z.ZodString>;
    locale: z.ZodOptional<z.ZodString>;
    timezone: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
declare const RevturbineProducerSegmentContextSchema: z.ZodObject<{
    revturbine: z.ZodObject<{
        schema_version: z.ZodLiteral<2>;
        environment_id: z.ZodString;
        origin: z.ZodEnum<{
            explicit: "explicit";
            derived: "derived";
            raw: "raw";
            automatic: "automatic";
        }>;
        tenant_id: z.ZodOptional<z.ZodString>;
        test: z.ZodOptional<z.ZodBoolean>;
        playbook_version: z.ZodOptional<z.ZodString>;
        decision_id: z.ZodOptional<z.ZodString>;
        request_id: z.ZodOptional<z.ZodString>;
        session_id: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        surface_slot_id: z.ZodOptional<z.ZodString>;
        placement_id: z.ZodOptional<z.ZodString>;
        payload_id: z.ZodOptional<z.ZodString>;
        experiment_id: z.ZodOptional<z.ZodString>;
        variant_key: z.ZodOptional<z.ZodString>;
        experiment_version_id: z.ZodOptional<z.ZodString>;
        simulation_id: z.ZodOptional<z.ZodString>;
        simulation_scenario_id: z.ZodOptional<z.ZodString>;
        identity_source: z.ZodOptional<z.ZodEnum<{
            account_primary_contact: "account_primary_contact";
        }>>;
    }, z.core.$strict>;
    groupId: z.ZodOptional<z.ZodString>;
    traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    page: z.ZodOptional<z.ZodObject<{
        path: z.ZodOptional<z.ZodString>;
        referrer: z.ZodOptional<z.ZodString>;
        search: z.ZodOptional<z.ZodString>;
        title: z.ZodOptional<z.ZodString>;
        url: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    library: z.ZodOptional<z.ZodObject<{
        name: z.ZodOptional<z.ZodString>;
        version: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    ip: z.ZodOptional<z.ZodString>;
    userAgent: z.ZodOptional<z.ZodString>;
    locale: z.ZodOptional<z.ZodString>;
    timezone: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
declare const CanonicalSegmentContextSchema: z.ZodObject<{
    revturbine: z.ZodObject<{
        schema_version: z.ZodNumber;
        tenant_id: z.ZodString;
        environment_id: z.ZodString;
        origin: z.ZodOptional<z.ZodEnum<{
            explicit: "explicit";
            derived: "derived";
            raw: "raw";
            automatic: "automatic";
        }>>;
        test: z.ZodOptional<z.ZodBoolean>;
        playbook_version: z.ZodOptional<z.ZodString>;
        decision_id: z.ZodOptional<z.ZodString>;
        request_id: z.ZodOptional<z.ZodString>;
        session_id: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
        surface_slot_id: z.ZodOptional<z.ZodString>;
        placement_id: z.ZodOptional<z.ZodString>;
        payload_id: z.ZodOptional<z.ZodString>;
        experiment_id: z.ZodOptional<z.ZodString>;
        variant_key: z.ZodOptional<z.ZodString>;
        experiment_version_id: z.ZodOptional<z.ZodString>;
        simulation_id: z.ZodOptional<z.ZodString>;
        simulation_scenario_id: z.ZodOptional<z.ZodString>;
        identity_source: z.ZodOptional<z.ZodEnum<{
            account_primary_contact: "account_primary_contact";
        }>>;
    }, z.core.$loose>;
    groupId: z.ZodOptional<z.ZodString>;
    traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    page: z.ZodOptional<z.ZodObject<{
        path: z.ZodOptional<z.ZodString>;
        referrer: z.ZodOptional<z.ZodString>;
        search: z.ZodOptional<z.ZodString>;
        title: z.ZodOptional<z.ZodString>;
        url: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    library: z.ZodOptional<z.ZodObject<{
        name: z.ZodOptional<z.ZodString>;
        version: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    ip: z.ZodOptional<z.ZodString>;
    userAgent: z.ZodOptional<z.ZodString>;
    locale: z.ZodOptional<z.ZodString>;
    timezone: z.ZodOptional<z.ZodString>;
}, z.core.$loose>;
/**
 * Why a value is not JSON-plain, or `undefined` if it is. Plain means what
 * `JSON.parse` can produce: null, boolean, finite number, string, arrays and
 * plain objects, nested at most {@link MAX_EVENT_JSON_DEPTH} levels.
 */
declare function jsonPlainViolation(value: unknown, depth?: number): string | undefined;
declare const SegmentTrackInputSchema: z.ZodObject<{
    type: z.ZodLiteral<"track">;
    event: z.ZodString;
    properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    context: z.ZodOptional<z.ZodObject<{
        revturbine: z.ZodOptional<z.ZodObject<{
            tenant_id: z.ZodOptional<z.ZodString>;
            environment_id: z.ZodOptional<z.ZodString>;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
            schema_version: z.ZodOptional<z.ZodNumber>;
        }, z.core.$loose>>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    messageId: z.ZodOptional<z.ZodString>;
    timestamp: z.ZodOptional<z.ZodISODateTime>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
declare const SegmentIdentifyInputSchema: z.ZodObject<{
    type: z.ZodLiteral<"identify">;
    traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    context: z.ZodOptional<z.ZodObject<{
        revturbine: z.ZodOptional<z.ZodObject<{
            tenant_id: z.ZodOptional<z.ZodString>;
            environment_id: z.ZodOptional<z.ZodString>;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
            schema_version: z.ZodOptional<z.ZodNumber>;
        }, z.core.$loose>>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    messageId: z.ZodOptional<z.ZodString>;
    timestamp: z.ZodOptional<z.ZodISODateTime>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
declare const SegmentGroupInputSchema: z.ZodObject<{
    type: z.ZodLiteral<"group">;
    groupId: z.ZodString;
    traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    context: z.ZodOptional<z.ZodObject<{
        revturbine: z.ZodOptional<z.ZodObject<{
            tenant_id: z.ZodOptional<z.ZodString>;
            environment_id: z.ZodOptional<z.ZodString>;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
            schema_version: z.ZodOptional<z.ZodNumber>;
        }, z.core.$loose>>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    messageId: z.ZodOptional<z.ZodString>;
    timestamp: z.ZodOptional<z.ZodISODateTime>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
declare const SegmentPageInputSchema: z.ZodObject<{
    type: z.ZodLiteral<"page">;
    name: z.ZodOptional<z.ZodString>;
    properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    context: z.ZodOptional<z.ZodObject<{
        revturbine: z.ZodOptional<z.ZodObject<{
            tenant_id: z.ZodOptional<z.ZodString>;
            environment_id: z.ZodOptional<z.ZodString>;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
            schema_version: z.ZodOptional<z.ZodNumber>;
        }, z.core.$loose>>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    messageId: z.ZodOptional<z.ZodString>;
    timestamp: z.ZodOptional<z.ZodISODateTime>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
declare const SegmentScreenInputSchema: z.ZodObject<{
    type: z.ZodLiteral<"screen">;
    name: z.ZodOptional<z.ZodString>;
    properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    context: z.ZodOptional<z.ZodObject<{
        revturbine: z.ZodOptional<z.ZodObject<{
            tenant_id: z.ZodOptional<z.ZodString>;
            environment_id: z.ZodOptional<z.ZodString>;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
            schema_version: z.ZodOptional<z.ZodNumber>;
        }, z.core.$loose>>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    messageId: z.ZodOptional<z.ZodString>;
    timestamp: z.ZodOptional<z.ZodISODateTime>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
/**
 * Raw serialized Alias: `previousId` plus `userId` or `anonymousId` (the HTTP
 * API's identity rule). Library-level inference of a missing field is an SDK
 * concern, not a relaxation of this raw contract.
 */
declare const SegmentAliasInputSchema: z.ZodObject<{
    type: z.ZodLiteral<"alias">;
    previousId: z.ZodString;
    context: z.ZodOptional<z.ZodObject<{
        revturbine: z.ZodOptional<z.ZodObject<{
            tenant_id: z.ZodOptional<z.ZodString>;
            environment_id: z.ZodOptional<z.ZodString>;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
            schema_version: z.ZodOptional<z.ZodNumber>;
        }, z.core.$loose>>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    messageId: z.ZodOptional<z.ZodString>;
    timestamp: z.ZodOptional<z.ZodISODateTime>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
/**
 * Any of the six Segment methods as ingress receives it. Accepts documented
 * vanilla Segment calls with no RevTurbine fields; validates every reserved
 * field that IS supplied.
 */
declare const SegmentEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    type: z.ZodLiteral<"track">;
    event: z.ZodString;
    properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    context: z.ZodOptional<z.ZodObject<{
        revturbine: z.ZodOptional<z.ZodObject<{
            tenant_id: z.ZodOptional<z.ZodString>;
            environment_id: z.ZodOptional<z.ZodString>;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
            schema_version: z.ZodOptional<z.ZodNumber>;
        }, z.core.$loose>>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    messageId: z.ZodOptional<z.ZodString>;
    timestamp: z.ZodOptional<z.ZodISODateTime>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"identify">;
    traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    context: z.ZodOptional<z.ZodObject<{
        revturbine: z.ZodOptional<z.ZodObject<{
            tenant_id: z.ZodOptional<z.ZodString>;
            environment_id: z.ZodOptional<z.ZodString>;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
            schema_version: z.ZodOptional<z.ZodNumber>;
        }, z.core.$loose>>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    messageId: z.ZodOptional<z.ZodString>;
    timestamp: z.ZodOptional<z.ZodISODateTime>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"group">;
    groupId: z.ZodString;
    traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    context: z.ZodOptional<z.ZodObject<{
        revturbine: z.ZodOptional<z.ZodObject<{
            tenant_id: z.ZodOptional<z.ZodString>;
            environment_id: z.ZodOptional<z.ZodString>;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
            schema_version: z.ZodOptional<z.ZodNumber>;
        }, z.core.$loose>>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    messageId: z.ZodOptional<z.ZodString>;
    timestamp: z.ZodOptional<z.ZodISODateTime>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"page">;
    name: z.ZodOptional<z.ZodString>;
    properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    context: z.ZodOptional<z.ZodObject<{
        revturbine: z.ZodOptional<z.ZodObject<{
            tenant_id: z.ZodOptional<z.ZodString>;
            environment_id: z.ZodOptional<z.ZodString>;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
            schema_version: z.ZodOptional<z.ZodNumber>;
        }, z.core.$loose>>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    messageId: z.ZodOptional<z.ZodString>;
    timestamp: z.ZodOptional<z.ZodISODateTime>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"screen">;
    name: z.ZodOptional<z.ZodString>;
    properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    context: z.ZodOptional<z.ZodObject<{
        revturbine: z.ZodOptional<z.ZodObject<{
            tenant_id: z.ZodOptional<z.ZodString>;
            environment_id: z.ZodOptional<z.ZodString>;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
            schema_version: z.ZodOptional<z.ZodNumber>;
        }, z.core.$loose>>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    messageId: z.ZodOptional<z.ZodString>;
    timestamp: z.ZodOptional<z.ZodISODateTime>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"alias">;
    previousId: z.ZodString;
    context: z.ZodOptional<z.ZodObject<{
        revturbine: z.ZodOptional<z.ZodObject<{
            tenant_id: z.ZodOptional<z.ZodString>;
            environment_id: z.ZodOptional<z.ZodString>;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
            schema_version: z.ZodOptional<z.ZodNumber>;
        }, z.core.$loose>>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    messageId: z.ZodOptional<z.ZodString>;
    timestamp: z.ZodOptional<z.ZodISODateTime>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>], "type">;
declare const RevturbineProducerTrackEventSchema: z.ZodObject<{
    type: z.ZodLiteral<"track">;
    event: z.ZodString;
    properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodLiteral<2>;
            environment_id: z.ZodString;
            origin: z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>;
            tenant_id: z.ZodOptional<z.ZodString>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$strict>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
declare const RevturbineProducerIdentifyEventSchema: z.ZodObject<{
    type: z.ZodLiteral<"identify">;
    traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodLiteral<2>;
            environment_id: z.ZodString;
            origin: z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>;
            tenant_id: z.ZodOptional<z.ZodString>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$strict>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
declare const RevturbineProducerGroupEventSchema: z.ZodObject<{
    type: z.ZodLiteral<"group">;
    groupId: z.ZodString;
    traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodLiteral<2>;
            environment_id: z.ZodString;
            origin: z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>;
            tenant_id: z.ZodOptional<z.ZodString>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$strict>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
declare const RevturbineProducerPageEventSchema: z.ZodObject<{
    type: z.ZodLiteral<"page">;
    name: z.ZodOptional<z.ZodString>;
    properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodLiteral<2>;
            environment_id: z.ZodString;
            origin: z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>;
            tenant_id: z.ZodOptional<z.ZodString>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$strict>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
declare const RevturbineProducerScreenEventSchema: z.ZodObject<{
    type: z.ZodLiteral<"screen">;
    name: z.ZodOptional<z.ZodString>;
    properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodLiteral<2>;
            environment_id: z.ZodString;
            origin: z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>;
            tenant_id: z.ZodOptional<z.ZodString>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$strict>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
/**
 * RevTurbine-owned Alias producers are stricter than raw Segment: the alias
 * TARGETS a known user, so `userId` is required alongside `previousId`.
 */
declare const RevturbineProducerAliasEventSchema: z.ZodObject<{
    userId: z.ZodString;
    type: z.ZodLiteral<"alias">;
    previousId: z.ZodString;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodLiteral<2>;
            environment_id: z.ZodString;
            origin: z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>;
            tenant_id: z.ZodOptional<z.ZodString>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$strict>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
/** The stricter profile every RevTurbine-owned producer validates against at capture (REQ-2, REQ-7). */
declare const RevturbineProducerEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    type: z.ZodLiteral<"track">;
    event: z.ZodString;
    properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodLiteral<2>;
            environment_id: z.ZodString;
            origin: z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>;
            tenant_id: z.ZodOptional<z.ZodString>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$strict>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"identify">;
    traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodLiteral<2>;
            environment_id: z.ZodString;
            origin: z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>;
            tenant_id: z.ZodOptional<z.ZodString>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$strict>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"group">;
    groupId: z.ZodString;
    traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodLiteral<2>;
            environment_id: z.ZodString;
            origin: z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>;
            tenant_id: z.ZodOptional<z.ZodString>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$strict>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"page">;
    name: z.ZodOptional<z.ZodString>;
    properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodLiteral<2>;
            environment_id: z.ZodString;
            origin: z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>;
            tenant_id: z.ZodOptional<z.ZodString>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$strict>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"screen">;
    name: z.ZodOptional<z.ZodString>;
    properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodLiteral<2>;
            environment_id: z.ZodString;
            origin: z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>;
            tenant_id: z.ZodOptional<z.ZodString>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$strict>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>, z.ZodObject<{
    userId: z.ZodString;
    type: z.ZodLiteral<"alias">;
    previousId: z.ZodString;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodLiteral<2>;
            environment_id: z.ZodString;
            origin: z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>;
            tenant_id: z.ZodOptional<z.ZodString>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$strict>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    receivedAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>], "type">;
declare const CanonicalTrackEventSchema: z.ZodObject<{
    type: z.ZodLiteral<"track">;
    event: z.ZodString;
    properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    receivedAt: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodNumber;
            tenant_id: z.ZodString;
            environment_id: z.ZodString;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$loose>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
declare const CanonicalIdentifyEventSchema: z.ZodObject<{
    type: z.ZodLiteral<"identify">;
    traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    receivedAt: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodNumber;
            tenant_id: z.ZodString;
            environment_id: z.ZodString;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$loose>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
declare const CanonicalGroupEventSchema: z.ZodObject<{
    type: z.ZodLiteral<"group">;
    groupId: z.ZodString;
    traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    receivedAt: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodNumber;
            tenant_id: z.ZodString;
            environment_id: z.ZodString;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$loose>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
declare const CanonicalPageEventSchema: z.ZodObject<{
    type: z.ZodLiteral<"page">;
    name: z.ZodOptional<z.ZodString>;
    properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    receivedAt: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodNumber;
            tenant_id: z.ZodString;
            environment_id: z.ZodString;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$loose>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
declare const CanonicalScreenEventSchema: z.ZodObject<{
    type: z.ZodLiteral<"screen">;
    name: z.ZodOptional<z.ZodString>;
    properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    receivedAt: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodNumber;
            tenant_id: z.ZodString;
            environment_id: z.ZodString;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$loose>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
declare const CanonicalAliasEventSchema: z.ZodObject<{
    type: z.ZodLiteral<"alias">;
    previousId: z.ZodString;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    receivedAt: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodNumber;
            tenant_id: z.ZodString;
            environment_id: z.ZodString;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$loose>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>;
/**
 * The normalized record ingress persists and forwards (after the REQ-8
 * privacy transformation, which is web's boundary, not this schema's). Each
 * method stays distinct through storage and forwarding.
 */
declare const CanonicalAnalyticsEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    type: z.ZodLiteral<"track">;
    event: z.ZodString;
    properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    receivedAt: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodNumber;
            tenant_id: z.ZodString;
            environment_id: z.ZodString;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$loose>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"identify">;
    traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    receivedAt: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodNumber;
            tenant_id: z.ZodString;
            environment_id: z.ZodString;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$loose>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"group">;
    groupId: z.ZodString;
    traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    receivedAt: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodNumber;
            tenant_id: z.ZodString;
            environment_id: z.ZodString;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$loose>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"page">;
    name: z.ZodOptional<z.ZodString>;
    properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    receivedAt: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodNumber;
            tenant_id: z.ZodString;
            environment_id: z.ZodString;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$loose>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"screen">;
    name: z.ZodOptional<z.ZodString>;
    properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    receivedAt: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodNumber;
            tenant_id: z.ZodString;
            environment_id: z.ZodString;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$loose>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>, z.ZodObject<{
    type: z.ZodLiteral<"alias">;
    previousId: z.ZodString;
    messageId: z.ZodString;
    timestamp: z.ZodISODateTime;
    receivedAt: z.ZodISODateTime;
    context: z.ZodObject<{
        revturbine: z.ZodObject<{
            schema_version: z.ZodNumber;
            tenant_id: z.ZodString;
            environment_id: z.ZodString;
            origin: z.ZodOptional<z.ZodEnum<{
                explicit: "explicit";
                derived: "derived";
                raw: "raw";
                automatic: "automatic";
            }>>;
            test: z.ZodOptional<z.ZodBoolean>;
            playbook_version: z.ZodOptional<z.ZodString>;
            decision_id: z.ZodOptional<z.ZodString>;
            request_id: z.ZodOptional<z.ZodString>;
            session_id: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
            surface_slot_id: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodOptional<z.ZodString>;
            payload_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
            simulation_id: z.ZodOptional<z.ZodString>;
            simulation_scenario_id: z.ZodOptional<z.ZodString>;
            identity_source: z.ZodOptional<z.ZodEnum<{
                account_primary_contact: "account_primary_contact";
            }>>;
        }, z.core.$loose>;
        groupId: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        page: z.ZodOptional<z.ZodObject<{
            path: z.ZodOptional<z.ZodString>;
            referrer: z.ZodOptional<z.ZodString>;
            search: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodString>;
            url: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        library: z.ZodOptional<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        ip: z.ZodOptional<z.ZodString>;
        userAgent: z.ZodOptional<z.ZodString>;
        locale: z.ZodOptional<z.ZodString>;
        timezone: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
    originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
    channel: z.ZodOptional<z.ZodString>;
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$loose>], "type">;
/**
 * `{"batch": [message, ...]}` — the only v2 request body. Strict: a body that
 * also carries the v1 `events` key is ambiguous and rejected. The array may
 * mix all six methods. Adopted by the `/api/track` operation in TASK-6
 * together with the SDK serializer (TASK-12); until then that operation keeps
 * declaring the v1 `TrackIngestBatch`.
 */
declare const SegmentIngestBatchSchema: z.ZodObject<{
    batch: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
        type: z.ZodLiteral<"track">;
        event: z.ZodString;
        properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        context: z.ZodOptional<z.ZodObject<{
            revturbine: z.ZodOptional<z.ZodObject<{
                tenant_id: z.ZodOptional<z.ZodString>;
                environment_id: z.ZodOptional<z.ZodString>;
                origin: z.ZodOptional<z.ZodEnum<{
                    explicit: "explicit";
                    derived: "derived";
                    raw: "raw";
                    automatic: "automatic";
                }>>;
                test: z.ZodOptional<z.ZodBoolean>;
                playbook_version: z.ZodOptional<z.ZodString>;
                decision_id: z.ZodOptional<z.ZodString>;
                request_id: z.ZodOptional<z.ZodString>;
                session_id: z.ZodOptional<z.ZodString>;
                tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
                surface_slot_id: z.ZodOptional<z.ZodString>;
                placement_id: z.ZodOptional<z.ZodString>;
                payload_id: z.ZodOptional<z.ZodString>;
                experiment_id: z.ZodOptional<z.ZodString>;
                variant_key: z.ZodOptional<z.ZodString>;
                experiment_version_id: z.ZodOptional<z.ZodString>;
                simulation_id: z.ZodOptional<z.ZodString>;
                simulation_scenario_id: z.ZodOptional<z.ZodString>;
                identity_source: z.ZodOptional<z.ZodEnum<{
                    account_primary_contact: "account_primary_contact";
                }>>;
                schema_version: z.ZodOptional<z.ZodNumber>;
            }, z.core.$loose>>;
            groupId: z.ZodOptional<z.ZodString>;
            traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            page: z.ZodOptional<z.ZodObject<{
                path: z.ZodOptional<z.ZodString>;
                referrer: z.ZodOptional<z.ZodString>;
                search: z.ZodOptional<z.ZodString>;
                title: z.ZodOptional<z.ZodString>;
                url: z.ZodOptional<z.ZodString>;
            }, z.core.$loose>>;
            library: z.ZodOptional<z.ZodObject<{
                name: z.ZodOptional<z.ZodString>;
                version: z.ZodOptional<z.ZodString>;
            }, z.core.$loose>>;
            ip: z.ZodOptional<z.ZodString>;
            userAgent: z.ZodOptional<z.ZodString>;
            locale: z.ZodOptional<z.ZodString>;
            timezone: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        userId: z.ZodOptional<z.ZodString>;
        anonymousId: z.ZodOptional<z.ZodString>;
        messageId: z.ZodOptional<z.ZodString>;
        timestamp: z.ZodOptional<z.ZodISODateTime>;
        sentAt: z.ZodOptional<z.ZodISODateTime>;
        receivedAt: z.ZodOptional<z.ZodISODateTime>;
        originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
        channel: z.ZodOptional<z.ZodString>;
        integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$loose>, z.ZodObject<{
        type: z.ZodLiteral<"identify">;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        context: z.ZodOptional<z.ZodObject<{
            revturbine: z.ZodOptional<z.ZodObject<{
                tenant_id: z.ZodOptional<z.ZodString>;
                environment_id: z.ZodOptional<z.ZodString>;
                origin: z.ZodOptional<z.ZodEnum<{
                    explicit: "explicit";
                    derived: "derived";
                    raw: "raw";
                    automatic: "automatic";
                }>>;
                test: z.ZodOptional<z.ZodBoolean>;
                playbook_version: z.ZodOptional<z.ZodString>;
                decision_id: z.ZodOptional<z.ZodString>;
                request_id: z.ZodOptional<z.ZodString>;
                session_id: z.ZodOptional<z.ZodString>;
                tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
                surface_slot_id: z.ZodOptional<z.ZodString>;
                placement_id: z.ZodOptional<z.ZodString>;
                payload_id: z.ZodOptional<z.ZodString>;
                experiment_id: z.ZodOptional<z.ZodString>;
                variant_key: z.ZodOptional<z.ZodString>;
                experiment_version_id: z.ZodOptional<z.ZodString>;
                simulation_id: z.ZodOptional<z.ZodString>;
                simulation_scenario_id: z.ZodOptional<z.ZodString>;
                identity_source: z.ZodOptional<z.ZodEnum<{
                    account_primary_contact: "account_primary_contact";
                }>>;
                schema_version: z.ZodOptional<z.ZodNumber>;
            }, z.core.$loose>>;
            groupId: z.ZodOptional<z.ZodString>;
            traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            page: z.ZodOptional<z.ZodObject<{
                path: z.ZodOptional<z.ZodString>;
                referrer: z.ZodOptional<z.ZodString>;
                search: z.ZodOptional<z.ZodString>;
                title: z.ZodOptional<z.ZodString>;
                url: z.ZodOptional<z.ZodString>;
            }, z.core.$loose>>;
            library: z.ZodOptional<z.ZodObject<{
                name: z.ZodOptional<z.ZodString>;
                version: z.ZodOptional<z.ZodString>;
            }, z.core.$loose>>;
            ip: z.ZodOptional<z.ZodString>;
            userAgent: z.ZodOptional<z.ZodString>;
            locale: z.ZodOptional<z.ZodString>;
            timezone: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        userId: z.ZodOptional<z.ZodString>;
        anonymousId: z.ZodOptional<z.ZodString>;
        messageId: z.ZodOptional<z.ZodString>;
        timestamp: z.ZodOptional<z.ZodISODateTime>;
        sentAt: z.ZodOptional<z.ZodISODateTime>;
        receivedAt: z.ZodOptional<z.ZodISODateTime>;
        originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
        channel: z.ZodOptional<z.ZodString>;
        integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$loose>, z.ZodObject<{
        type: z.ZodLiteral<"group">;
        groupId: z.ZodString;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        context: z.ZodOptional<z.ZodObject<{
            revturbine: z.ZodOptional<z.ZodObject<{
                tenant_id: z.ZodOptional<z.ZodString>;
                environment_id: z.ZodOptional<z.ZodString>;
                origin: z.ZodOptional<z.ZodEnum<{
                    explicit: "explicit";
                    derived: "derived";
                    raw: "raw";
                    automatic: "automatic";
                }>>;
                test: z.ZodOptional<z.ZodBoolean>;
                playbook_version: z.ZodOptional<z.ZodString>;
                decision_id: z.ZodOptional<z.ZodString>;
                request_id: z.ZodOptional<z.ZodString>;
                session_id: z.ZodOptional<z.ZodString>;
                tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
                surface_slot_id: z.ZodOptional<z.ZodString>;
                placement_id: z.ZodOptional<z.ZodString>;
                payload_id: z.ZodOptional<z.ZodString>;
                experiment_id: z.ZodOptional<z.ZodString>;
                variant_key: z.ZodOptional<z.ZodString>;
                experiment_version_id: z.ZodOptional<z.ZodString>;
                simulation_id: z.ZodOptional<z.ZodString>;
                simulation_scenario_id: z.ZodOptional<z.ZodString>;
                identity_source: z.ZodOptional<z.ZodEnum<{
                    account_primary_contact: "account_primary_contact";
                }>>;
                schema_version: z.ZodOptional<z.ZodNumber>;
            }, z.core.$loose>>;
            groupId: z.ZodOptional<z.ZodString>;
            traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            page: z.ZodOptional<z.ZodObject<{
                path: z.ZodOptional<z.ZodString>;
                referrer: z.ZodOptional<z.ZodString>;
                search: z.ZodOptional<z.ZodString>;
                title: z.ZodOptional<z.ZodString>;
                url: z.ZodOptional<z.ZodString>;
            }, z.core.$loose>>;
            library: z.ZodOptional<z.ZodObject<{
                name: z.ZodOptional<z.ZodString>;
                version: z.ZodOptional<z.ZodString>;
            }, z.core.$loose>>;
            ip: z.ZodOptional<z.ZodString>;
            userAgent: z.ZodOptional<z.ZodString>;
            locale: z.ZodOptional<z.ZodString>;
            timezone: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        userId: z.ZodOptional<z.ZodString>;
        anonymousId: z.ZodOptional<z.ZodString>;
        messageId: z.ZodOptional<z.ZodString>;
        timestamp: z.ZodOptional<z.ZodISODateTime>;
        sentAt: z.ZodOptional<z.ZodISODateTime>;
        receivedAt: z.ZodOptional<z.ZodISODateTime>;
        originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
        channel: z.ZodOptional<z.ZodString>;
        integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$loose>, z.ZodObject<{
        type: z.ZodLiteral<"page">;
        name: z.ZodOptional<z.ZodString>;
        properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        context: z.ZodOptional<z.ZodObject<{
            revturbine: z.ZodOptional<z.ZodObject<{
                tenant_id: z.ZodOptional<z.ZodString>;
                environment_id: z.ZodOptional<z.ZodString>;
                origin: z.ZodOptional<z.ZodEnum<{
                    explicit: "explicit";
                    derived: "derived";
                    raw: "raw";
                    automatic: "automatic";
                }>>;
                test: z.ZodOptional<z.ZodBoolean>;
                playbook_version: z.ZodOptional<z.ZodString>;
                decision_id: z.ZodOptional<z.ZodString>;
                request_id: z.ZodOptional<z.ZodString>;
                session_id: z.ZodOptional<z.ZodString>;
                tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
                surface_slot_id: z.ZodOptional<z.ZodString>;
                placement_id: z.ZodOptional<z.ZodString>;
                payload_id: z.ZodOptional<z.ZodString>;
                experiment_id: z.ZodOptional<z.ZodString>;
                variant_key: z.ZodOptional<z.ZodString>;
                experiment_version_id: z.ZodOptional<z.ZodString>;
                simulation_id: z.ZodOptional<z.ZodString>;
                simulation_scenario_id: z.ZodOptional<z.ZodString>;
                identity_source: z.ZodOptional<z.ZodEnum<{
                    account_primary_contact: "account_primary_contact";
                }>>;
                schema_version: z.ZodOptional<z.ZodNumber>;
            }, z.core.$loose>>;
            groupId: z.ZodOptional<z.ZodString>;
            traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            page: z.ZodOptional<z.ZodObject<{
                path: z.ZodOptional<z.ZodString>;
                referrer: z.ZodOptional<z.ZodString>;
                search: z.ZodOptional<z.ZodString>;
                title: z.ZodOptional<z.ZodString>;
                url: z.ZodOptional<z.ZodString>;
            }, z.core.$loose>>;
            library: z.ZodOptional<z.ZodObject<{
                name: z.ZodOptional<z.ZodString>;
                version: z.ZodOptional<z.ZodString>;
            }, z.core.$loose>>;
            ip: z.ZodOptional<z.ZodString>;
            userAgent: z.ZodOptional<z.ZodString>;
            locale: z.ZodOptional<z.ZodString>;
            timezone: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        userId: z.ZodOptional<z.ZodString>;
        anonymousId: z.ZodOptional<z.ZodString>;
        messageId: z.ZodOptional<z.ZodString>;
        timestamp: z.ZodOptional<z.ZodISODateTime>;
        sentAt: z.ZodOptional<z.ZodISODateTime>;
        receivedAt: z.ZodOptional<z.ZodISODateTime>;
        originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
        channel: z.ZodOptional<z.ZodString>;
        integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$loose>, z.ZodObject<{
        type: z.ZodLiteral<"screen">;
        name: z.ZodOptional<z.ZodString>;
        properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        context: z.ZodOptional<z.ZodObject<{
            revturbine: z.ZodOptional<z.ZodObject<{
                tenant_id: z.ZodOptional<z.ZodString>;
                environment_id: z.ZodOptional<z.ZodString>;
                origin: z.ZodOptional<z.ZodEnum<{
                    explicit: "explicit";
                    derived: "derived";
                    raw: "raw";
                    automatic: "automatic";
                }>>;
                test: z.ZodOptional<z.ZodBoolean>;
                playbook_version: z.ZodOptional<z.ZodString>;
                decision_id: z.ZodOptional<z.ZodString>;
                request_id: z.ZodOptional<z.ZodString>;
                session_id: z.ZodOptional<z.ZodString>;
                tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
                surface_slot_id: z.ZodOptional<z.ZodString>;
                placement_id: z.ZodOptional<z.ZodString>;
                payload_id: z.ZodOptional<z.ZodString>;
                experiment_id: z.ZodOptional<z.ZodString>;
                variant_key: z.ZodOptional<z.ZodString>;
                experiment_version_id: z.ZodOptional<z.ZodString>;
                simulation_id: z.ZodOptional<z.ZodString>;
                simulation_scenario_id: z.ZodOptional<z.ZodString>;
                identity_source: z.ZodOptional<z.ZodEnum<{
                    account_primary_contact: "account_primary_contact";
                }>>;
                schema_version: z.ZodOptional<z.ZodNumber>;
            }, z.core.$loose>>;
            groupId: z.ZodOptional<z.ZodString>;
            traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            page: z.ZodOptional<z.ZodObject<{
                path: z.ZodOptional<z.ZodString>;
                referrer: z.ZodOptional<z.ZodString>;
                search: z.ZodOptional<z.ZodString>;
                title: z.ZodOptional<z.ZodString>;
                url: z.ZodOptional<z.ZodString>;
            }, z.core.$loose>>;
            library: z.ZodOptional<z.ZodObject<{
                name: z.ZodOptional<z.ZodString>;
                version: z.ZodOptional<z.ZodString>;
            }, z.core.$loose>>;
            ip: z.ZodOptional<z.ZodString>;
            userAgent: z.ZodOptional<z.ZodString>;
            locale: z.ZodOptional<z.ZodString>;
            timezone: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        userId: z.ZodOptional<z.ZodString>;
        anonymousId: z.ZodOptional<z.ZodString>;
        messageId: z.ZodOptional<z.ZodString>;
        timestamp: z.ZodOptional<z.ZodISODateTime>;
        sentAt: z.ZodOptional<z.ZodISODateTime>;
        receivedAt: z.ZodOptional<z.ZodISODateTime>;
        originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
        channel: z.ZodOptional<z.ZodString>;
        integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$loose>, z.ZodObject<{
        type: z.ZodLiteral<"alias">;
        previousId: z.ZodString;
        context: z.ZodOptional<z.ZodObject<{
            revturbine: z.ZodOptional<z.ZodObject<{
                tenant_id: z.ZodOptional<z.ZodString>;
                environment_id: z.ZodOptional<z.ZodString>;
                origin: z.ZodOptional<z.ZodEnum<{
                    explicit: "explicit";
                    derived: "derived";
                    raw: "raw";
                    automatic: "automatic";
                }>>;
                test: z.ZodOptional<z.ZodBoolean>;
                playbook_version: z.ZodOptional<z.ZodString>;
                decision_id: z.ZodOptional<z.ZodString>;
                request_id: z.ZodOptional<z.ZodString>;
                session_id: z.ZodOptional<z.ZodString>;
                tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
                surface_slot_id: z.ZodOptional<z.ZodString>;
                placement_id: z.ZodOptional<z.ZodString>;
                payload_id: z.ZodOptional<z.ZodString>;
                experiment_id: z.ZodOptional<z.ZodString>;
                variant_key: z.ZodOptional<z.ZodString>;
                experiment_version_id: z.ZodOptional<z.ZodString>;
                simulation_id: z.ZodOptional<z.ZodString>;
                simulation_scenario_id: z.ZodOptional<z.ZodString>;
                identity_source: z.ZodOptional<z.ZodEnum<{
                    account_primary_contact: "account_primary_contact";
                }>>;
                schema_version: z.ZodOptional<z.ZodNumber>;
            }, z.core.$loose>>;
            groupId: z.ZodOptional<z.ZodString>;
            traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            page: z.ZodOptional<z.ZodObject<{
                path: z.ZodOptional<z.ZodString>;
                referrer: z.ZodOptional<z.ZodString>;
                search: z.ZodOptional<z.ZodString>;
                title: z.ZodOptional<z.ZodString>;
                url: z.ZodOptional<z.ZodString>;
            }, z.core.$loose>>;
            library: z.ZodOptional<z.ZodObject<{
                name: z.ZodOptional<z.ZodString>;
                version: z.ZodOptional<z.ZodString>;
            }, z.core.$loose>>;
            ip: z.ZodOptional<z.ZodString>;
            userAgent: z.ZodOptional<z.ZodString>;
            locale: z.ZodOptional<z.ZodString>;
            timezone: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>>;
        userId: z.ZodOptional<z.ZodString>;
        anonymousId: z.ZodOptional<z.ZodString>;
        messageId: z.ZodOptional<z.ZodString>;
        timestamp: z.ZodOptional<z.ZodISODateTime>;
        sentAt: z.ZodOptional<z.ZodISODateTime>;
        receivedAt: z.ZodOptional<z.ZodISODateTime>;
        originalTimestamp: z.ZodOptional<z.ZodISODateTime>;
        channel: z.ZodOptional<z.ZodString>;
        integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$loose>], "type">>;
    sentAt: z.ZodOptional<z.ZodISODateTime>;
}, z.core.$strict>;
type SegmentEventInput$1 = z.infer<typeof SegmentEventInputSchema>;
type SegmentTrackInput$1 = z.infer<typeof SegmentTrackInputSchema>;
type SegmentEventMethod = SegmentEventInput$1['type'];
/** The six methods, in the plan's order. */
declare const SEGMENT_EVENT_METHODS: readonly ["track", "identify", "group", "page", "screen", "alias"];
type TrackIngestBodyClassification = {
    format: 'segment_batch';
    schemaVersion: number;
} | {
    format: 'legacy_track_batch';
    schemaVersion: typeof LEGACY_TRACK_EVENT_ENVELOPE_SCHEMA_VERSION;
} | {
    format: 'rejected';
    reason: 'ambiguous_batch_keys' | 'unrecognized_body' | 'legacy_below_floor';
};
interface EventEnvelopeReader {
    /** Oldest envelope version this reader accepts. Defaults to {@link MIN_READABLE_EVENT_ENVELOPE_SCHEMA_VERSION}. */
    minReadableSchemaVersion?: number;
}
/**
 * Which envelope version a `/api/track` body is, decided by its batch KEY —
 * never by sniffing message fields (the plan retires those heuristics).
 * `{"batch"}` is v2, `{"events"}` is v1, both keys is ambiguous. A v1 body
 * below the reader's floor is an explicit `legacy_below_floor` rejection: the
 * lever TASK-26 pulls by raising the floor to 2. Shape validation happens
 * after, against the schema for the classified version.
 */
declare function classifyTrackIngestBody(body: unknown, reader?: EventEnvelopeReader): TrackIngestBodyClassification;
type TrackEventLiftResult = {
    ok: true;
    message: SegmentTrackInput$1;
} | {
    ok: false;
    reason: 'properties_not_json_object';
    detail: string;
} | {
    ok: false;
    reason: 'lifted_message_invalid';
    detail: string;
};
/**
 * Read a v1 `TrackEvent` as a v2 Track message — the single sanctioned v1
 * reader (cutover window + historical stored-row reconstruction). Field
 * ownership follows the plan's location manifest:
 *
 * - `event_name` → `event` (exact text), `user_id` → `userId`,
 *   `account_id` → `context.groupId`, `event_ts` → `timestamp`
 * - `event_id` → `messageId` when present. It is never minted here: a lift
 *   that invented identities would split one stored row into many on replay.
 * - `properties` (a JSON string) → the `properties` object, verbatim — no
 *   carrier unwrapping of a nested `payload`.
 * - `environment_id`, `origin`, `test`, `playbook_version`, `decision_id`,
 *   `request_id`, placement and experiment ids → `context.revturbine`.
 *   v1's nullable ids normalize null → omitted.
 * - `tenant_id` is dropped: tenancy is server-stamped, never caller-chosen.
 */
declare function liftTrackEventToSegmentInput(event: z.input<typeof TrackEventSchema>): TrackEventLiftResult;

/**
 * Account primary-contact binding (plan 252 TASK-2, BL-0303; REQ-10, local D-1).
 *
 * An account-level billing fact (a renewal, an invoice) often has no person on
 * it. Canonical analytics still needs a `userId`, so it takes the account's
 * DESIGNATED primary contact — through this binding, never by guessing a
 * member from array order or an email match.
 *
 * Three identifier namespaces meet here and must never be interchanged:
 *
 * | Field | Namespace | Canonical envelope location |
 * |---|---|---|
 * | `tenant_id` | RevTurbine tenant — the authenticated owning boundary | `context.revturbine.tenant_id` (server-stamped) |
 * | `account_id` | The tenant's CUSTOMER account (B2B account) | `context.groupId` |
 * | `contact_user_id` | The tenant's customer USER designated as contact | `userId` |
 *
 * A Stripe customer id, a Better Auth provider account or the RevTurbine
 * tenant id is NOT a customer account id. The binding is resolved only for
 * the exact `(tenant_id, account_id)` pair the authenticated fact carries.
 *
 * Workspace ruling 2026-09-19 (Kent): the contact DEFAULTS to the first user
 * created on the account and is changeable thereafter — `designation` records
 * which. Population and lookup are web's (TASK-8, storage TASK-30); this file
 * is the typed contract plus the pure rules both sides share.
 */

/** How the current contact was chosen: the first-user default, or an explicit later change. */
declare const PrimaryContactDesignationSchema: z.ZodEnum<{
    first_user_default: "first_user_default";
    explicit: "explicit";
}>;
/**
 * One designation of an account's primary contact. `revision` increases on
 * every change, so a derivation receipt can snapshot exactly which
 * designation it used and a later change never restates history.
 */
declare const AccountPrimaryContactBindingSchema: z.ZodObject<{
    tenant_id: z.ZodString;
    account_id: z.ZodString;
    contact_user_id: z.ZodString;
    designation: z.ZodEnum<{
        first_user_default: "first_user_default";
        explicit: "explicit";
    }>;
    revision: z.ZodNumber;
    designated_at: z.ZodISODateTime;
}, z.core.$strict>;
/**
 * Why no contact could be selected. Every reason is an actionable enrichment
 * failure with durable repair/replay — never a permanent exemption:
 * `no_binding` (nothing designated for this pair), `ambiguous_binding` (two
 * designations share the newest revision), `contact_deleted` (the designated
 * user no longer exists — web knows this, the pure resolver cannot),
 * `out_of_scope` (the binding names a different tenant or account than the
 * fact being enriched).
 */
declare const PrimaryContactUnresolvedReasonSchema: z.ZodEnum<{
    no_binding: "no_binding";
    ambiguous_binding: "ambiguous_binding";
    contact_deleted: "contact_deleted";
    out_of_scope: "out_of_scope";
}>;
/** The stable outcome code web reports for any unresolved reason. */
declare const PRIMARY_CONTACT_UNRESOLVED_CODE = "primary_contact_unresolved";
/**
 * A resolution, snapshotted once on the derivation receipt before the
 * canonical derivative is built. Retries and replay reuse this snapshot even
 * if the designation later changes.
 */
declare const PrimaryContactResolutionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    status: z.ZodLiteral<"resolved">;
    binding: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        contact_user_id: z.ZodString;
        designation: z.ZodEnum<{
            first_user_default: "first_user_default";
            explicit: "explicit";
        }>;
        revision: z.ZodNumber;
        designated_at: z.ZodISODateTime;
    }, z.core.$strict>;
    resolved_at: z.ZodISODateTime;
}, z.core.$strict>, z.ZodObject<{
    status: z.ZodLiteral<"unresolved">;
    code: z.ZodLiteral<"primary_contact_unresolved">;
    reason: z.ZodEnum<{
        no_binding: "no_binding";
        ambiguous_binding: "ambiguous_binding";
        contact_deleted: "contact_deleted";
        out_of_scope: "out_of_scope";
    }>;
    tenant_id: z.ZodString;
    account_id: z.ZodString;
    resolved_at: z.ZodISODateTime;
}, z.core.$strict>], "status">;
type AccountPrimaryContactBinding$1 = z.infer<typeof AccountPrimaryContactBindingSchema>;
type PrimaryContactResolution$1 = z.infer<typeof PrimaryContactResolutionSchema>;
type PrimaryContactUnresolvedReason$1 = z.infer<typeof PrimaryContactUnresolvedReasonSchema>;
interface PrimaryContactScope {
    /** The AUTHENTICATED tenant of the fact being enriched — never a caller claim. */
    tenant_id: string;
    /** The customer account on the fact (`context.groupId`). */
    account_id: string;
}
/**
 * Select the designated contact for exactly `scope` from candidate bindings.
 * Bindings for any other tenant or account are ignored outright (not
 * "out of scope" — they were never visible to this tenant). The newest
 * revision wins; two bindings tied at the newest revision naming different
 * users are ambiguous rather than resolved by order.
 */
declare function resolvePrimaryContact(bindings: readonly AccountPrimaryContactBinding$1[], scope: PrimaryContactScope, resolvedAt: string): PrimaryContactResolution$1;
type PrimaryContactEnrichmentResult = {
    outcome: 'preserved';
    message: SegmentEventInput$1;
} | {
    outcome: 'enriched';
    message: SegmentEventInput$1;
} | {
    outcome: 'unresolved';
    code: typeof PRIMARY_CONTACT_UNRESOLVED_CODE;
    reason: PrimaryContactUnresolvedReason$1;
};
/**
 * Apply a snapshotted resolution to an account-level billing message.
 *
 * - An existing `userId` is preserved untouched — enrichment never overwrites
 *   a captured person.
 * - Otherwise the resolution must be `resolved` AND its binding must match the
 *   authenticated tenant and the message's own `context.groupId`; a binding
 *   for another tenant/account is `out_of_scope`, never applied.
 * - On success `userId` becomes the contact and
 *   `context.revturbine.identity_source` records `account_primary_contact`.
 *
 * Pure: returns a new message; the input is not mutated.
 */
declare function applyPrimaryContactEnrichment(message: SegmentEventInput$1, resolution: PrimaryContactResolution$1, authenticatedTenantId: string): PrimaryContactEnrichmentResult;

/**
 * Subscription-aware delete protection contracts (plan 248 TASK-1).
 *
 * A destructive change to a commercial mapping (deleting a plan/add-on
 * variation, cascading a parent delete, applying an import removal, unlinking
 * or rebinding a Stripe Price) may only proceed when the platform can PROVE
 * that no subscription still references the Price being removed. "No rows
 * found" is not a proof. These contracts make the difference representable:
 *
 *   - `StripeSubscriptionItemSchema` — what was OBSERVED (per provider item).
 *   - `StripeSubscriptionEvidenceSchema` — which population was SEARCHED, how
 *     completely, and when (per tenant/account/mode/price scope).
 *   - `SubscriptionEvidenceResultSchema` — the typed result every consumer
 *     reads: `known` (with a count) or `unavailable` (with a reason). The
 *     unavailable member is `.strict()` and carries NO count field, so an
 *     unverified scope is structurally incapable of reporting zero (REQ-2).
 *
 * Evidence is private operational runtime state: internal exposure, no CRUD
 * operation, absent from the Playbook export and from browser-safe client
 * context.
 */

/** Every subscription status Stripe documents. Anything else is UNKNOWN. */
declare const STRIPE_SUBSCRIPTION_STATUS_VALUES: readonly ["incomplete", "incomplete_expired", "trialing", "active", "past_due", "canceled", "unpaid", "paused"];
declare const StripeSubscriptionStatusSchema: z.ZodEnum<{
    active: "active";
    past_due: "past_due";
    canceled: "canceled";
    trialing: "trialing";
    unpaid: "unpaid";
    incomplete: "incomplete";
    incomplete_expired: "incomplete_expired";
    paused: "paused";
}>;
type StripeSubscriptionStatus$1 = z.infer<typeof StripeSubscriptionStatusSchema>;
/**
 * `protected` — the subscription still references the mapping; deletion is
 * refused. `released` — confirmed terminal, the mapping may be removed.
 * `unknown` — a status this build does not recognise; it yields UNAVAILABLE
 * evidence, never a release.
 */
declare const SubscriptionProtectionSchema: z.ZodEnum<{
    unknown: "unknown";
    protected: "protected";
    released: "released";
}>;
type SubscriptionProtection$1 = z.infer<typeof SubscriptionProtectionSchema>;
/**
 * The only two statuses that stop blocking. Everything else — including
 * `past_due`, `unpaid`, `paused` and `incomplete` — keeps the commercial
 * mapping, because collection and trial transitions routinely pass through
 * them and a deleted mapping cannot be recovered from the subscriber's side.
 */
declare const TERMINAL_SUBSCRIPTION_STATUSES: readonly ["canceled", "incomplete_expired"];
/**
 * The checked-in policy matrix (AC-3). `cancel_at_period_end` is deliberately
 * ABSENT from this table: a subscription scheduled to cancel is still live, so
 * it keeps protecting the mapping until its status becomes terminal.
 */
declare const SUBSCRIPTION_STATUS_PROTECTION: Readonly<Record<StripeSubscriptionStatus$1, SubscriptionProtection$1>>;
/** Resolve any provider-reported status against the policy. Fails closed. */
declare function classifySubscriptionStatus(status: unknown): SubscriptionProtection$1;
/**
 * Evidence is never global. Isolation is by tenant AND connected account AND
 * live/test mode; a scan of one scope says nothing about another.
 */
declare const StripeBillingScopeSchema: z.ZodObject<{
    tenant_id: z.ZodString;
    account_id: z.ZodString;
    livemode: z.ZodBoolean;
}, z.core.$strict>;
/** A billing scope narrowed to the one Price whose removal is being judged. */
declare const StripePriceScopeSchema: z.ZodObject<{
    tenant_id: z.ZodString;
    account_id: z.ZodString;
    livemode: z.ZodBoolean;
    price_id: z.ZodString;
}, z.core.$strict>;
type StripePriceScope$1 = z.infer<typeof StripePriceScopeSchema>;
/**
 * One Stripe subscription item as last observed. `present` / `removed` is
 * explicit so a partial scan can never erase an item it simply did not reach
 * (REQ-4): absence of a row is absence of an observation, not absence of a
 * subscriber.
 *
 * Table names are short because PostgreSQL truncates identifiers at 63 bytes
 * and the generated unique-index name concatenates the whole scope key.
 */
declare const StripeSubscriptionItemSchema: z.ZodObject<{
    id: z.ZodString;
    tenant_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    item_version: z.ZodLiteral<1>;
    account_id: z.ZodString;
    livemode: z.ZodBoolean;
    subscription_id: z.ZodString;
    item_id: z.ZodString;
    customer_id: z.ZodString;
    price_id: z.ZodString;
    subscription_status: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    protection: z.ZodEnum<{
        unknown: "unknown";
        protected: "protected";
        released: "released";
    }>;
    cancel_at_period_end: z.ZodDefault<z.ZodBoolean>;
    quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    item_state: z.ZodDefault<z.ZodEnum<{
        present: "present";
        removed: "removed";
    }>>;
    removed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    source_version: z.ZodNumber;
    source_event_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    provider_updated_at: z.ZodString;
    observed_at: z.ZodString;
    scan_generation: z.ZodDefault<z.ZodNumber>;
}, z.core.$strict>;
type StripeSubscriptionItem$1 = z.infer<typeof StripeSubscriptionItemSchema>;
/**
 * Why a scope cannot answer. Each value is a refusal, never a zero. `stale`,
 * `provider_timeout` and `scan_in_progress` are retryable by waiting;
 * `not_connected`, `account_rebound` and `mode_mismatch` need operator action.
 */
declare const SUBSCRIPTION_EVIDENCE_UNAVAILABLE_REASONS: readonly ["uninitialized", "scan_in_progress", "partial_scan", "stale", "invalidated", "conflicting_webhook", "provider_error", "provider_timeout", "verification_deadline_exceeded", "not_connected", "account_rebound", "mode_mismatch", "unknown_subscription_status", "population_incompatible"];
declare const SubscriptionEvidenceUnavailableReasonSchema: z.ZodEnum<{
    stale: "stale";
    provider_error: "provider_error";
    uninitialized: "uninitialized";
    not_connected: "not_connected";
    scan_in_progress: "scan_in_progress";
    partial_scan: "partial_scan";
    invalidated: "invalidated";
    conflicting_webhook: "conflicting_webhook";
    provider_timeout: "provider_timeout";
    verification_deadline_exceeded: "verification_deadline_exceeded";
    account_rebound: "account_rebound";
    mode_mismatch: "mode_mismatch";
    unknown_subscription_status: "unknown_subscription_status";
    population_incompatible: "population_incompatible";
}>;
type SubscriptionEvidenceUnavailableReason$1 = z.infer<typeof SubscriptionEvidenceUnavailableReasonSchema>;
/**
 * The stored column form. `none` exists so the persisted reason is a plain
 * text enum rather than a nullable one (a nullable enum degrades to a JSON
 * column in the generated Drizzle table); only complete coverage may hold it.
 */
declare const EvidenceReasonColumnSchema: z.ZodEnum<{
    stale: "stale";
    none: "none";
    provider_error: "provider_error";
    uninitialized: "uninitialized";
    not_connected: "not_connected";
    scan_in_progress: "scan_in_progress";
    partial_scan: "partial_scan";
    invalidated: "invalidated";
    conflicting_webhook: "conflicting_webhook";
    provider_timeout: "provider_timeout";
    verification_deadline_exceeded: "verification_deadline_exceeded";
    account_rebound: "account_rebound";
    mode_mismatch: "mode_mismatch";
    unknown_subscription_status: "unknown_subscription_status";
    population_incompatible: "population_incompatible";
}>;
/** Reasons an operator cannot clear by retrying the same scan. */
declare const NON_RETRYABLE_EVIDENCE_REASONS: readonly ["not_connected", "account_rebound", "mode_mismatch", "population_incompatible"];
declare const EvidenceCoverageStateSchema: z.ZodEnum<{
    complete: "complete";
    failed: "failed";
    uninitialized: "uninitialized";
    invalidated: "invalidated";
    scanning: "scanning";
}>;
/**
 * The searched population for one price scope. Only `complete` carries a
 * count; every other state carries a reason and no count, so a stalled,
 * failed or never-run scan cannot be mistaken for a verified empty result.
 */
declare const StripeSubscriptionEvidenceSchema: z.ZodObject<{
    id: z.ZodString;
    tenant_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    evidence_version: z.ZodLiteral<1>;
    account_id: z.ZodString;
    livemode: z.ZodBoolean;
    price_id: z.ZodString;
    coverage_state: z.ZodDefault<z.ZodEnum<{
        complete: "complete";
        failed: "failed";
        uninitialized: "uninitialized";
        invalidated: "invalidated";
        scanning: "scanning";
    }>>;
    unavailable_reason: z.ZodDefault<z.ZodEnum<{
        stale: "stale";
        none: "none";
        provider_error: "provider_error";
        uninitialized: "uninitialized";
        not_connected: "not_connected";
        scan_in_progress: "scan_in_progress";
        partial_scan: "partial_scan";
        invalidated: "invalidated";
        conflicting_webhook: "conflicting_webhook";
        provider_timeout: "provider_timeout";
        verification_deadline_exceeded: "verification_deadline_exceeded";
        account_rebound: "account_rebound";
        mode_mismatch: "mode_mismatch";
        unknown_subscription_status: "unknown_subscription_status";
        population_incompatible: "population_incompatible";
    }>>;
    protected_subscription_count: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    scan_generation: z.ZodDefault<z.ZodNumber>;
    account_binding_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    scan_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    verified_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    invalidated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    last_error_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    last_error_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strict>;
type StripeSubscriptionEvidence$1 = z.infer<typeof StripeSubscriptionEvidenceSchema>;
/** Upper bound on the identifiers echoed to an operator in a 409 body. */
declare const PROTECTED_SUBSCRIPTION_SAMPLE_LIMIT = 50;
declare const SubscriptionEvidenceKnownSchema: z.ZodObject<{
    state: z.ZodLiteral<"known">;
    result_version: z.ZodLiteral<1>;
    scope: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        price_id: z.ZodString;
    }, z.core.$strict>;
    protected_subscription_count: z.ZodNumber;
    protected_subscription_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
    verified_at: z.ZodString;
    scan_generation: z.ZodNumber;
    account_binding_id: z.ZodString;
}, z.core.$strict>;
/**
 * No count field exists on this member, by design: a consumer cannot read a
 * zero off an unverified scope even by mistake (REQ-2, REQ-6).
 */
declare const SubscriptionEvidenceUnavailableSchema: z.ZodObject<{
    state: z.ZodLiteral<"unavailable">;
    result_version: z.ZodLiteral<1>;
    scope: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        price_id: z.ZodString;
    }, z.core.$strict>;
    reason: z.ZodEnum<{
        stale: "stale";
        provider_error: "provider_error";
        uninitialized: "uninitialized";
        not_connected: "not_connected";
        scan_in_progress: "scan_in_progress";
        partial_scan: "partial_scan";
        invalidated: "invalidated";
        conflicting_webhook: "conflicting_webhook";
        provider_timeout: "provider_timeout";
        verification_deadline_exceeded: "verification_deadline_exceeded";
        account_rebound: "account_rebound";
        mode_mismatch: "mode_mismatch";
        unknown_subscription_status: "unknown_subscription_status";
        population_incompatible: "population_incompatible";
    }>;
    retryable: z.ZodBoolean;
    last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    detail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strict>;
declare const SubscriptionEvidenceResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    state: z.ZodLiteral<"known">;
    result_version: z.ZodLiteral<1>;
    scope: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        price_id: z.ZodString;
    }, z.core.$strict>;
    protected_subscription_count: z.ZodNumber;
    protected_subscription_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
    verified_at: z.ZodString;
    scan_generation: z.ZodNumber;
    account_binding_id: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    state: z.ZodLiteral<"unavailable">;
    result_version: z.ZodLiteral<1>;
    scope: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        price_id: z.ZodString;
    }, z.core.$strict>;
    reason: z.ZodEnum<{
        stale: "stale";
        provider_error: "provider_error";
        uninitialized: "uninitialized";
        not_connected: "not_connected";
        scan_in_progress: "scan_in_progress";
        partial_scan: "partial_scan";
        invalidated: "invalidated";
        conflicting_webhook: "conflicting_webhook";
        provider_timeout: "provider_timeout";
        verification_deadline_exceeded: "verification_deadline_exceeded";
        account_rebound: "account_rebound";
        mode_mismatch: "mode_mismatch";
        unknown_subscription_status: "unknown_subscription_status";
        population_incompatible: "population_incompatible";
    }>;
    retryable: z.ZodBoolean;
    last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    detail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strict>], "state">;
type SubscriptionEvidenceUnavailable$1 = z.infer<typeof SubscriptionEvidenceUnavailableSchema>;
type SubscriptionEvidenceResult$1 = z.infer<typeof SubscriptionEvidenceResultSchema>;
/** True when a reason clears by retrying the same scan later. */
declare function isRetryableEvidenceReason(reason: SubscriptionEvidenceUnavailableReason$1): boolean;
declare function unavailableEvidence(scope: StripePriceScope$1, reason: SubscriptionEvidenceUnavailableReason$1, extra?: {
    last_observed_at?: string | null;
    detail?: string | null;
}): SubscriptionEvidenceUnavailable$1;
declare const SUBSCRIPTION_EVIDENCE_UNAVAILABLE_CODE = "subscription_evidence_unavailable";
declare const SUBSCRIPTION_REFERENCE_EXISTS_CODE = "subscription_reference_exists";
/** Preserves the blocker entity name the existing cascade preflight emits. */
declare const SUBSCRIPTION_BLOCKER_ENTITY = "subscriptions";
declare const DeleteProtectionDecisionSchema: z.ZodObject<{
    outcome: z.ZodEnum<{
        unverified: "unverified";
        permitted: "permitted";
        blocked: "blocked";
    }>;
    http_status: z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<409>, z.ZodLiteral<503>]>;
    code: z.ZodNullable<z.ZodEnum<{
        subscription_reference_exists: "subscription_reference_exists";
        subscription_evidence_unavailable: "subscription_evidence_unavailable";
    }>>;
    scope: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        price_id: z.ZodString;
    }, z.core.$strict>;
    protected_subscription_count: z.ZodNullable<z.ZodNumber>;
    protected_subscription_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
    reason: z.ZodNullable<z.ZodEnum<{
        stale: "stale";
        provider_error: "provider_error";
        uninitialized: "uninitialized";
        not_connected: "not_connected";
        scan_in_progress: "scan_in_progress";
        partial_scan: "partial_scan";
        invalidated: "invalidated";
        conflicting_webhook: "conflicting_webhook";
        provider_timeout: "provider_timeout";
        verification_deadline_exceeded: "verification_deadline_exceeded";
        account_rebound: "account_rebound";
        mode_mismatch: "mode_mismatch";
        unknown_subscription_status: "unknown_subscription_status";
        population_incompatible: "population_incompatible";
    }>>;
    retryable: z.ZodBoolean;
}, z.core.$strict>;
type DeleteProtectionDecision$1 = z.infer<typeof DeleteProtectionDecisionSchema>;
/**
 * The single mapping from evidence to destructive-boundary behaviour. Known
 * references → 409. Unprovable → 503 with a stable retryable code; the mapping
 * is preserved either way. Only a verified-empty scope permits deletion.
 */
declare function decideDeleteProtection(result: SubscriptionEvidenceResult$1): DeleteProtectionDecision$1;
interface ProtectedSubscriptionSummary {
    /** Distinct protected subscription ids inside the scope. */
    subscription_ids: string[];
    /** Items whose status this build cannot classify; any hit forces unavailable. */
    unknown_status_item_ids: string[];
}
/**
 * Count DISTINCT protected subscriptions for one price scope. Quantity is
 * ignored, removed items are ignored, and items from another tenant, account
 * or mode can never leak in (AC-1).
 */
declare function summarizeProtectedSubscriptions(scope: StripePriceScope$1, items: readonly StripeSubscriptionItem$1[]): ProtectedSubscriptionSummary;
interface EvidenceResolution {
    scope: StripePriceScope$1;
    /** The stored coverage row for the scope, if one exists at all. */
    coverage: StripeSubscriptionEvidence$1 | null;
    items: readonly StripeSubscriptionItem$1[];
    /** Evaluation clock — supplied by the caller so freshness is testable. */
    now: string;
    /** Maximum age of a completed scan that may still authorize a deletion. */
    max_age_ms: number;
    /** The tenant/account binding in force right now, or null when disconnected. */
    current_account_binding_id: string | null;
}
/**
 * Turn stored observations plus coverage into the typed result. The ONLY path
 * to `known` is a completed authoritative scan of this exact scope, still
 * fresh, still bound to the same account, with every observed status
 * classifiable. Every other input — including an empty item set with no
 * coverage row — resolves to `unavailable` (REQ-2, REQ-7).
 *
 * `max_age_ms` bounds freshness only: shortening or lengthening it can turn a
 * known result into `stale`, but can never turn `unavailable` into a zero.
 */
declare function resolveSubscriptionEvidence(input: EvidenceResolution): SubscriptionEvidenceResult$1;

/** Shared financial primitives with no profile or recurring union dependency. */

declare const MAX_BILLING_PROFILE_LIST = 250;
declare const BillingSourceScopeSchema: z.ZodObject<{
    tenant_id: z.ZodString;
    account_id: z.ZodString;
    livemode: z.ZodBoolean;
    provider: z.ZodEnum<{
        stripe: "stripe";
    }>;
    simulation_id: z.ZodOptional<z.ZodString>;
}, z.core.$strict>;
type BillingSourceScope$1 = z.infer<typeof BillingSourceScopeSchema>;
declare const BillingSettlementAmountSchema: z.ZodObject<{
    amount_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
}, z.core.$strict>;

/**
 * Guards for values that may reach a browser or a stored audit record:
 * RevTurbine-minted references, tenant-supplied RT ids, and free text. Moved
 * here from `stripe-discovery.ts` (ST-710) so the billing-accounting contracts
 * can use them without importing the discovery module (which imports them).
 */

/**
 * Every Stripe object id prefix this contract refuses to see in a browser
 * payload (https://docs.stripe.com/api, id prefixes as of 2026-10). Ids are the
 * prefix, an underscore and an alphanumeric body.
 */
declare const STRIPE_OBJECT_ID_PREFIXES: readonly ["acct", "ba", "card", "ch", "clock", "cn", "cs", "cus", "dp", "evt", "fee", "file", "ic", "ii", "in", "ipi", "link", "mandate", "ob", "pi", "plan", "pm", "po", "price", "prod", "promo", "py", "qt", "re", "rp", "seti", "setatt", "si", "sli", "src", "sub", "sub_sched", "tax", "tok", "topup", "tr", "trr", "txn", "txr", "usage", "whsec", "sk", "rk", "pk"];
/**
 * Canonical form used before any guard: NFKC (fullwidth characters fold to
 * ASCII), zero-width and soft-hyphen characters removed, percent-escapes
 * decoded (twice, so a double-encoded `%2540` is seen), then trimmed.
 */
declare function normalizeBrowserText(value: string): string;
/**
 * An id the TENANT chooses (`rt_user_id` is the SDK user id, `rt_account_id` an
 * account handle). A real user id may be an email or start with `plan_`, so the
 * only thing refused is a value shaped exactly like a Stripe object id: the
 * guard against a provider reference being passed off as an RT id.
 */
declare const tenantSuppliedIdSchema: (max: number) => z.ZodString;
/** Free text bound for the browser: no id-shaped token and no email address, however it is spelled. */
declare const browserSafeTextSchema: (max: number) => z.ZodString;

/**
 * Stripe customer / subscription discovery contracts (ST-710 TASK-1).
 *
 * An established business has customers and subscriptions that exist before it
 * connects Stripe. Discovery inventories them in bounded, resumable attempts.
 * These contracts carry:
 *
 *   - the enumeration POPULATION (what was searched), which is part of every
 *     scope key, so a restricted or simulated run can never alias real data;
 *   - the scoped customer inventory row (private, ServerOnly);
 *   - one run/checkpoint row per scope (lease, CAS version, cursors, pending
 *     continuation, committed counts, last complete run);
 *   - scoped subscription/item observations, which are RUN EVIDENCE and never
 *     the shared `stripe_sub_item` current-item store;
 *   - the sanitized, browser-safe status / unmatched-list / mapping DTOs.
 *
 * Discovery is POSITIVE-ONLY: a completed run never sweeps shared items and
 * never publishes complete price coverage, even when it observed zero. Only an
 * ordinary live full-population proof (`stripeProofPopulationVerdict`) may
 * authorize a destructive zero; every other population resolves to the
 * existing `unavailable` evidence result with `population_incompatible`.
 *
 * Stripe customer ids, email, names, addresses, payment data and unfiltered
 * metadata are never retained here beyond the one private `customer_ref`.
 */

/** Default attempt budget (ST-710 Q-1 implementation assumption; lower without losing resumability). */
declare const STRIPE_DISCOVERY_PAGE_SIZE = 100;
declare const STRIPE_DISCOVERY_MAX_PROVIDER_CALLS_PER_ATTEMPT = 12;
declare const STRIPE_DISCOVERY_MAX_ATTEMPT_MS = 15000;
/** Pending subscription observations a checkpoint may carry (one provider page). */
declare const STRIPE_DISCOVERY_PENDING_LIMIT = 100;
/** Bindings a single scheduler tick may start (fairness cap, ST-710 Q-1). */
declare const STRIPE_DISCOVERY_MAX_BINDINGS_PER_TICK = 5;
/**
 * The enumeration population. `ordinary` is the default: no creation, customer
 * or price filter, real provider data, test clocks excluded, every status. It
 * is the only population that may share `stripe_sub_item`/`stripe_sub_evidence`
 * keys. `restricted` records the exact predicate, clock and dataset/simulation
 * identity of a qualification run; its observations stay in scoped run
 * evidence.
 */
declare const StripeDiscoveryPopulationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    kind: z.ZodLiteral<"ordinary">;
}, z.core.$strict>, z.ZodObject<{
    kind: z.ZodLiteral<"restricted">;
    created_gte: z.ZodOptional<z.ZodString>;
    created_lte: z.ZodOptional<z.ZodString>;
    customer_ref: z.ZodOptional<z.ZodString>;
    price_ref: z.ZodOptional<z.ZodString>;
    test_clock_ref: z.ZodOptional<z.ZodString>;
    dataset_id: z.ZodOptional<z.ZodString>;
}, z.core.$strict>], "kind">;
type StripeDiscoveryPopulation$1 = z.infer<typeof StripeDiscoveryPopulationSchema>;
/** Stable, bounded identity of a population; part of every unique key. */
declare function stripeDiscoveryPopulationKey(input: StripeDiscoveryPopulation$1): string;
/** Longest population key kept readable; longer predicates hash. The hashed form is 75 characters. */
declare const STRIPE_DISCOVERY_POPULATION_KEY_READABLE_MAX = 256;
/**
 * Run identity derived from the unique scope and generation, so it is unique by
 * construction (`scope_key` is unique per run row) and bounded.
 */
declare function stripeDiscoveryRunId(scopeKey: string, generation: number): string;
/** A simulation id is a restriction by definition; an ordinary population cannot carry it. */
declare function stripeDiscoveryPopulationFor(source: BillingSourceScope$1, population: StripeDiscoveryPopulation$1): {
    ok: true;
    population_key: string;
    scope_key: string;
} | {
    ok: false;
    reason: string;
};
/** Longest scope key kept readable; encodeURIComponent can triple 255-character ids, so a longer key hashes. */
declare const STRIPE_DISCOVERY_SCOPE_KEY_READABLE_MAX = 1024;
/**
 * The scope key of a source and population key: the readable
 * `<source scope>|<population>` form, or `sha256:<digest>` once that exceeds
 * 1024 characters, so it always fits the 1536-character column and its unique
 * index (the same rule as the population key).
 */
declare function stripeDiscoveryScopeKeyFrom(source: BillingSourceScope$1, populationKey: string): string;
/** The scope key every inventory, run and observation row carries. Throws on an inconsistent pair. */
declare function stripeDiscoveryScopeKey(source: BillingSourceScope$1, population: StripeDiscoveryPopulation$1): string;
type StripeProofPopulationVerdict = {
    compatible: true;
} | {
    compatible: false;
    reason: 'population_incompatible';
    detail: string;
};
/**
 * Whether an enumeration may serve as a destructive-boundary full-population
 * proof. Only ordinary LIVE provider scope with no clock/customer/price/
 * creation/dataset/simulation restriction qualifies. Test-mode, synthetic,
 * restricted and unknown-origin requests are refused before any mutation.
 */
declare function stripeProofPopulationVerdict(source: {
    provider?: string;
    livemode?: boolean | null;
    simulation_id?: string | null;
}, population: StripeDiscoveryPopulation$1): StripeProofPopulationVerdict;
declare const STRIPE_DISCOVERY_PHASES: readonly ["customers", "subscriptions", "health", "done"];
declare const StripeDiscoveryPhaseSchema: z.ZodEnum<{
    done: "done";
    customers: "customers";
    health: "health";
    subscriptions: "subscriptions";
}>;
declare const STRIPE_DISCOVERY_TRIGGERS: readonly ["oauth_connect", "oauth_reconnect", "embedded_onboarding", "manual_resync", "periodic", "webhook_repair"];
declare const StripeDiscoveryTriggerSchema: z.ZodEnum<{
    oauth_connect: "oauth_connect";
    oauth_reconnect: "oauth_reconnect";
    embedded_onboarding: "embedded_onboarding";
    manual_resync: "manual_resync";
    periodic: "periodic";
    webhook_repair: "webhook_repair";
}>;
declare const STRIPE_DISCOVERY_RUN_STATUSES: readonly ["idle", "running", "retry_wait", "failed", "invalid_binding", "complete"];
declare const StripeDiscoveryRunStatusSchema: z.ZodEnum<{
    idle: "idle";
    complete: "complete";
    failed: "failed";
    running: "running";
    invalid_binding: "invalid_binding";
    retry_wait: "retry_wait";
}>;
declare const STRIPE_DISCOVERY_FAILURE_CODES: readonly ["rate_limited", "provider_timeout", "provider_error", "storage_error", "cursor_nonadvancing", "cursor_expired", "invalid_binding", "mode_unknown", "population_changed", "lease_lost", "enqueue_failed", "health_repair_cas_exhausted"];
declare const StripeDiscoveryFailureCodeSchema: z.ZodEnum<{
    provider_error: "provider_error";
    provider_timeout: "provider_timeout";
    rate_limited: "rate_limited";
    storage_error: "storage_error";
    cursor_nonadvancing: "cursor_nonadvancing";
    cursor_expired: "cursor_expired";
    invalid_binding: "invalid_binding";
    mode_unknown: "mode_unknown";
    population_changed: "population_changed";
    lease_lost: "lease_lost";
    enqueue_failed: "enqueue_failed";
    health_repair_cas_exhausted: "health_repair_cas_exhausted";
}>;
/** `none` keeps the stored column a plain text enum. */
declare const StripeDiscoveryFailureColumnSchema: z.ZodEnum<{
    none: "none";
    provider_error: "provider_error";
    provider_timeout: "provider_timeout";
    rate_limited: "rate_limited";
    storage_error: "storage_error";
    cursor_nonadvancing: "cursor_nonadvancing";
    cursor_expired: "cursor_expired";
    invalid_binding: "invalid_binding";
    mode_unknown: "mode_unknown";
    population_changed: "population_changed";
    lease_lost: "lease_lost";
    enqueue_failed: "enqueue_failed";
    health_repair_cas_exhausted: "health_repair_cas_exhausted";
}>;
declare const StripeDiscoveryUserLinkStatusSchema: z.ZodEnum<{
    unmatched: "unmatched";
    linked: "linked";
    conflict: "conflict";
}>;
declare const StripeDiscoveryAccountLinkStatusSchema: z.ZodEnum<{
    conflict: "conflict";
    unmapped: "unmapped";
    mapped: "mapped";
}>;
declare const StripeDiscoveryUnresolvedReasonSchema: z.ZodEnum<{
    none: "none";
    no_identity_metadata: "no_identity_metadata";
    identity_conflict: "identity_conflict";
    unverified_scope: "unverified_scope";
    awaiting_operator: "awaiting_operator";
}>;
declare const StripeDiscoveryLinkEvidenceSchema: z.ZodEnum<{
    none: "none";
    explicit_metadata: "explicit_metadata";
    operator_mapping: "operator_mapping";
}>;
/**
 * One provider customer in one scope. `id` is the opaque inventory key the
 * browser may carry; `customer_ref` is private. No email, name, address,
 * payment data or arbitrary metadata is retained. `source_created_at` is the
 * provider's creation time, NOT an RT signup event.
 */
declare const StripeCustomerInventorySchema: z.ZodObject<{
    id: z.ZodString;
    tenant_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    customer_ref: z.ZodString;
    first_observed_at: z.ZodString;
    last_observed_at: z.ZodString;
    source_created_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    provider_state: z.ZodDefault<z.ZodEnum<{
        present: "present";
        deleted: "deleted";
    }>>;
    deleted_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    user_link_status: z.ZodDefault<z.ZodEnum<{
        unmatched: "unmatched";
        linked: "linked";
        conflict: "conflict";
    }>>;
    rt_user_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    account_link_status: z.ZodDefault<z.ZodEnum<{
        conflict: "conflict";
        unmapped: "unmapped";
        mapped: "mapped";
    }>>;
    rt_account_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    account_mapping_revision: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    link_evidence: z.ZodDefault<z.ZodEnum<{
        none: "none";
        explicit_metadata: "explicit_metadata";
        operator_mapping: "operator_mapping";
    }>>;
    unresolved_reason: z.ZodDefault<z.ZodEnum<{
        none: "none";
        no_identity_metadata: "no_identity_metadata";
        identity_conflict: "identity_conflict";
        unverified_scope: "unverified_scope";
        awaiting_operator: "awaiting_operator";
    }>>;
    observation_revision: z.ZodDefault<z.ZodNumber>;
    dirty: z.ZodDefault<z.ZodBoolean>;
    last_run_generation: z.ZodDefault<z.ZodNumber>;
    account_id: z.ZodString;
    livemode: z.ZodBoolean;
    simulation_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    population_key: z.ZodString;
    scope_key: z.ZodString;
    inventory_version: z.ZodLiteral<1>;
}, z.core.$strict>;
/** Item-less subscriptions are retained under this key so a payer with no items is still visible. */
declare const STRIPE_DISCOVERY_NO_ITEM_KEY = "-";
/** One validated page observation carried in a run checkpoint (never a full customer or webhook envelope). */
declare const StripeDiscoveryPendingSubscriptionSchema: z.ZodObject<{
    subscription_id: z.ZodString;
    customer_ref: z.ZodString;
    subscription_status: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    cancel_at_period_end: z.ZodDefault<z.ZodBoolean>;
    source_created_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    items_cursor: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    items_complete: z.ZodBoolean;
    items_seen: z.ZodNumber;
}, z.core.$strict>;
/**
 * Per-scope current observation of one subscription item (or item-less
 * subscription). This is run evidence keyed by `scope_key`: ordinary live
 * discovery ALSO writes shared `stripe_sub_item` positively under existing
 * event fences; restricted scopes write only here.
 */
declare const StripeDiscoveryObservationSchema: z.ZodObject<{
    id: z.ZodString;
    tenant_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    run_generation: z.ZodNumber;
    observed_at: z.ZodString;
    customer_ref: z.ZodString;
    subscription_id: z.ZodString;
    item_key: z.ZodString;
    price_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    subscription_status: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    protection: z.ZodEnum<{
        unknown: "unknown";
        protected: "protected";
        released: "released";
    }>;
    quantity: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    cancel_at_period_end: z.ZodDefault<z.ZodBoolean>;
    source_created_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    account_id: z.ZodString;
    livemode: z.ZodBoolean;
    simulation_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    population_key: z.ZodString;
    scope_key: z.ZodString;
    observation_version: z.ZodLiteral<1>;
}, z.core.$strict>;
declare const StripeDiscoveryHealthStateSchema: z.ZodEnum<{
    complete: "complete";
    pending: "pending";
    not_required: "not_required";
    retry_wait: "retry_wait";
}>;
/**
 * One row per scope: the current run plus the last complete run. A newer
 * partial or failed run never overwrites the last complete summary. The
 * unique `scope_key` is the "one active run per binding/source scope" rule;
 * `version` is the CAS/lease fence.
 */
declare const StripeDiscoveryRunSchema: z.ZodObject<{
    id: z.ZodString;
    tenant_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    population: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"ordinary">;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"restricted">;
        created_gte: z.ZodOptional<z.ZodString>;
        created_lte: z.ZodOptional<z.ZodString>;
        customer_ref: z.ZodOptional<z.ZodString>;
        price_ref: z.ZodOptional<z.ZodString>;
        test_clock_ref: z.ZodOptional<z.ZodString>;
        dataset_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>], "kind">;
    binding_id: z.ZodString;
    binding_fingerprint: z.ZodString;
    generation: z.ZodNumber;
    run_id: z.ZodString;
    trigger: z.ZodEnum<{
        oauth_connect: "oauth_connect";
        oauth_reconnect: "oauth_reconnect";
        embedded_onboarding: "embedded_onboarding";
        manual_resync: "manual_resync";
        periodic: "periodic";
        webhook_repair: "webhook_repair";
    }>;
    phase: z.ZodDefault<z.ZodEnum<{
        done: "done";
        customers: "customers";
        health: "health";
        subscriptions: "subscriptions";
    }>>;
    status: z.ZodDefault<z.ZodEnum<{
        idle: "idle";
        complete: "complete";
        failed: "failed";
        running: "running";
        invalid_binding: "invalid_binding";
        retry_wait: "retry_wait";
    }>>;
    outcome: z.ZodDefault<z.ZodLiteral<"positive_only">>;
    scan_started_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    observation_cutoff: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    customer_cursor: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    customers_done: z.ZodDefault<z.ZodBoolean>;
    subscription_cursor: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    subscriptions_done: z.ZodDefault<z.ZodBoolean>;
    pending: z.ZodDefault<z.ZodArray<z.ZodObject<{
        subscription_id: z.ZodString;
        customer_ref: z.ZodString;
        subscription_status: z.ZodEnum<{
            active: "active";
            past_due: "past_due";
            canceled: "canceled";
            trialing: "trialing";
            unpaid: "unpaid";
            incomplete: "incomplete";
            incomplete_expired: "incomplete_expired";
            paused: "paused";
        }>;
        cancel_at_period_end: z.ZodDefault<z.ZodBoolean>;
        source_created_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        items_cursor: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        items_complete: z.ZodBoolean;
        items_seen: z.ZodNumber;
    }, z.core.$strict>>>;
    lease_owner: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    lease_expires_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    version: z.ZodDefault<z.ZodNumber>;
    attempts: z.ZodDefault<z.ZodNumber>;
    customers_attempted: z.ZodDefault<z.ZodNumber>;
    customers_committed: z.ZodDefault<z.ZodNumber>;
    subscriptions_attempted: z.ZodDefault<z.ZodNumber>;
    subscriptions_committed: z.ZodDefault<z.ZodNumber>;
    items_committed: z.ZodDefault<z.ZodNumber>;
    retry_after: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    failure_code: z.ZodDefault<z.ZodEnum<{
        none: "none";
        provider_error: "provider_error";
        provider_timeout: "provider_timeout";
        rate_limited: "rate_limited";
        storage_error: "storage_error";
        cursor_nonadvancing: "cursor_nonadvancing";
        cursor_expired: "cursor_expired";
        invalid_binding: "invalid_binding";
        mode_unknown: "mode_unknown";
        population_changed: "population_changed";
        lease_lost: "lease_lost";
        enqueue_failed: "enqueue_failed";
        health_repair_cas_exhausted: "health_repair_cas_exhausted";
    }>>;
    failure_message: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    last_attempt_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    dirty_since: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    health_state: z.ZodDefault<z.ZodEnum<{
        complete: "complete";
        pending: "pending";
        not_required: "not_required";
        retry_wait: "retry_wait";
    }>>;
    health_attempted_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    last_complete_generation: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    last_complete_started_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    last_complete_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    last_complete_cutoff: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    last_complete_customers: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    last_complete_subscriptions: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    last_complete_items: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    last_complete_binding_fingerprint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    account_id: z.ZodString;
    livemode: z.ZodBoolean;
    simulation_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    population_key: z.ZodString;
    scope_key: z.ZodString;
    run_version: z.ZodLiteral<1>;
}, z.core.$strict>;
type StripeDiscoveryRun$1 = z.infer<typeof StripeDiscoveryRunSchema>;
/** Is the run's lease live at `now`? A stale lease may be recovered by the next runner. */
declare function stripeDiscoveryLeaseLive(run: Pick<StripeDiscoveryRun$1, 'status' | 'lease_expires_at'>, now: string): boolean;
declare const STRIPE_DISCOVERY_STATES: readonly ["not_connected", "initial", "running", "retryable", "invalid_binding", "partial", "complete"];
declare const StripeDiscoveryStateSchema: z.ZodEnum<{
    partial: "partial";
    complete: "complete";
    not_connected: "not_connected";
    retryable: "retryable";
    running: "running";
    invalid_binding: "invalid_binding";
    initial: "initial";
}>;
/** Opening-stock readiness is the existing seed's state, never derived from discovery completion. */
declare const STRIPE_DISCOVERY_OPENING_STATES: readonly ["not_requested", "pending", "ready", "failed", "scope_mismatch"];
declare const StripeDiscoveryStatusSchema: z.ZodObject<{
    status_version: z.ZodLiteral<1>;
    state: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
        not_connected: "not_connected";
        retryable: "retryable";
        running: "running";
        invalid_binding: "invalid_binding";
        initial: "initial";
    }>;
    mode: z.ZodEnum<{
        unknown: "unknown";
        live: "live";
        test: "test";
    }>;
    run_id: z.ZodNullable<z.ZodString>;
    phase: z.ZodNullable<z.ZodEnum<{
        done: "done";
        customers: "customers";
        health: "health";
        subscriptions: "subscriptions";
    }>>;
    progress: z.ZodObject<{
        customers_discovered: z.ZodNullable<z.ZodNumber>;
        subscriptions_discovered: z.ZodNullable<z.ZodNumber>;
        items_discovered: z.ZodNullable<z.ZodNumber>;
        linked: z.ZodNullable<z.ZodNumber>;
        unmatched: z.ZodNullable<z.ZodNumber>;
        conflicted: z.ZodNullable<z.ZodNumber>;
    }, z.core.$strict>;
    last_attempt_at: z.ZodNullable<z.ZodString>;
    last_complete: z.ZodNullable<z.ZodObject<{
        started_at: z.ZodNullable<z.ZodString>;
        finished_at: z.ZodString;
        observation_cutoff: z.ZodNullable<z.ZodString>;
        mode: z.ZodEnum<{
            live: "live";
            test: "test";
        }>;
        customers: z.ZodNullable<z.ZodNumber>;
        subscriptions: z.ZodNullable<z.ZodNumber>;
    }, z.core.$strict>>;
    error: z.ZodNullable<z.ZodObject<{
        code: z.ZodEnum<{
            provider_error: "provider_error";
            provider_timeout: "provider_timeout";
            rate_limited: "rate_limited";
            storage_error: "storage_error";
            cursor_nonadvancing: "cursor_nonadvancing";
            cursor_expired: "cursor_expired";
            invalid_binding: "invalid_binding";
            mode_unknown: "mode_unknown";
            population_changed: "population_changed";
            lease_lost: "lease_lost";
            enqueue_failed: "enqueue_failed";
            health_repair_cas_exhausted: "health_repair_cas_exhausted";
        }>;
        message: z.ZodString;
        retry_after: z.ZodNullable<z.ZodString>;
        retryable: z.ZodBoolean;
    }, z.core.$strict>>;
    coverage: z.ZodObject<{
        status_filter: z.ZodLiteral<"all">;
        test_clocks: z.ZodLiteral<"excluded">;
        population: z.ZodEnum<{
            ordinary: "ordinary";
            restricted: "restricted";
        }>;
        history_cutoff: z.ZodNullable<z.ZodString>;
        positive_only: z.ZodLiteral<true>;
    }, z.core.$strict>;
    subscriptions: z.ZodObject<{
        state: z.ZodEnum<{
            unknown: "unknown";
            observed: "observed";
            none_observed: "none_observed";
        }>;
        observed_count: z.ZodNullable<z.ZodNumber>;
    }, z.core.$strict>;
    external_contract: z.ZodObject<{
        state: z.ZodLiteral<"not_provided">;
        import_supported: z.ZodLiteral<false>;
        owners: z.ZodArray<z.ZodString>;
        required_evidence: z.ZodArray<z.ZodString>;
    }, z.core.$strict>;
    readiness: z.ZodObject<{
        opening_stock: z.ZodEnum<{
            pending: "pending";
            failed: "failed";
            not_requested: "not_requested";
            ready: "ready";
            scope_mismatch: "scope_mismatch";
        }>;
        history_complete: z.ZodLiteral<false>;
    }, z.core.$strict>;
    can_start: z.ZodBoolean;
}, z.core.$strict>;
/** The evidence a business must supply before external contract economics can be imported. */
declare const STRIPE_DISCOVERY_EXTERNAL_CONTRACT_EVIDENCE: readonly ["Source owner/provider and authenticated account/mode", "Stable payer-to-contract/item references", "Explicit RT account mapping evidence", "Status and effective interval", "Every item, quantity, price, currency and billing interval", "Price, discount and tax policy basis", "Cancellation, pause and trial dates if claimed", "Source revision and observation time", "Coverage boundary and unknown prehistory"];
/**
 * One unresolved customer in the operator list. Carries only the opaque
 * inventory key and a safe display reference: no email, no raw Stripe id, no
 * metadata.
 */
declare const StripeDiscoveryUnmatchedItemSchema: z.ZodObject<{
    inventory_key: z.ZodString;
    display_ref: z.ZodString;
    user_link_status: z.ZodEnum<{
        unmatched: "unmatched";
        linked: "linked";
        conflict: "conflict";
    }>;
    account_link_status: z.ZodEnum<{
        conflict: "conflict";
        unmapped: "unmapped";
        mapped: "mapped";
    }>;
    reason: z.ZodEnum<{
        none: "none";
        no_identity_metadata: "no_identity_metadata";
        identity_conflict: "identity_conflict";
        unverified_scope: "unverified_scope";
        awaiting_operator: "awaiting_operator";
    }>;
    first_observed_at: z.ZodString;
    source_created_at: z.ZodNullable<z.ZodString>;
    observation_revision: z.ZodNumber;
}, z.core.$strict>;
declare const StripeDiscoveryUnmatchedPageSchema: z.ZodObject<{
    items: z.ZodArray<z.ZodObject<{
        inventory_key: z.ZodString;
        display_ref: z.ZodString;
        user_link_status: z.ZodEnum<{
            unmatched: "unmatched";
            linked: "linked";
            conflict: "conflict";
        }>;
        account_link_status: z.ZodEnum<{
            conflict: "conflict";
            unmapped: "unmapped";
            mapped: "mapped";
        }>;
        reason: z.ZodEnum<{
            none: "none";
            no_identity_metadata: "no_identity_metadata";
            identity_conflict: "identity_conflict";
            unverified_scope: "unverified_scope";
            awaiting_operator: "awaiting_operator";
        }>;
        first_observed_at: z.ZodString;
        source_created_at: z.ZodNullable<z.ZodString>;
        observation_revision: z.ZodNumber;
    }, z.core.$strict>>;
    next_cursor: z.ZodNullable<z.ZodString>;
}, z.core.$strict>;
/**
 * An explicit operator mapping. Caller-supplied tenant/account/mode are not
 * accepted (strict): the opaque inventory key resolves server-side to the
 * verified tenant scope. A provider id, email or user id is never an RT
 * account.
 */
declare const StripeDiscoveryMapRequestSchema: z.ZodObject<{
    inventory_key: z.ZodString;
    rt_user_id: z.ZodOptional<z.ZodString>;
    rt_account_id: z.ZodOptional<z.ZodString>;
    expected_observation_revision: z.ZodNumber;
}, z.core.$strict>;
declare const StripeDiscoveryMapResultSchema: z.ZodObject<{
    outcome: z.ZodEnum<{
        stale: "stale";
        linked: "linked";
        not_found: "not_found";
        conflict: "conflict";
        already_linked: "already_linked";
    }>;
    user_link_status: z.ZodNullable<z.ZodEnum<{
        unmatched: "unmatched";
        linked: "linked";
        conflict: "conflict";
    }>>;
    account_link_status: z.ZodNullable<z.ZodEnum<{
        conflict: "conflict";
        unmapped: "unmapped";
        mapped: "mapped";
    }>>;
    observation_revision: z.ZodNullable<z.ZodNumber>;
}, z.core.$strict>;
declare const StripeDiscoveryStartResultSchema: z.ZodObject<{
    accepted: z.ZodBoolean;
    run_id: z.ZodNullable<z.ZodString>;
    coalesced: z.ZodBoolean;
}, z.core.$strict>;
/** A safe display reference for a private customer id: stable, short, not reversible to a Stripe id. */
declare function stripeDiscoveryDisplayRef(inventoryKey: string): string;

/**
 * Payer → account linking on Billing Integration (ST-710, RM-846 EP-851).
 *
 * The billing mirror knows each provider payer (a Stripe customer); revenue is
 * reported per RT account. A payer is linked to an account by a revision of
 * the one provider-customer → RT-account binding model,
 * `BillingAccountMappingRevisionSchema` (persisted in `bill_mapping`), whose
 * `binding_evidence` says what evidence, how strong, who and why. These are the
 * browser contracts over it: the payer list with MRR at stake, one payer's
 * revision history, an operator's change, and an automatic matching run.
 *
 * Nothing here carries a raw provider id or an email. A payer is named by its
 * rollup key (`payer:pay_<sha256-16>` of the provider customer id, the key the
 * revenue tables already store for an unresolved payer); the server finds the
 * payer by recomputing the key over the tenant's own mirror.
 */

/** The rollup key of a payer: `payer:pay_` and 16 lowercase hex digits. */
declare const PAYER_KEY_PATTERN: RegExp;
declare const PayerKeySchema: z.ZodString;
declare const PAYER_ACCOUNT_LINK_STATES: readonly ["unmatched", "linked", "no_account"];
declare const PayerAccountLinkStateSchema: z.ZodEnum<{
    unmatched: "unmatched";
    linked: "linked";
    no_account: "no_account";
}>;
/** An amount in one currency, exact minor units as a decimal string. */
declare const PayerAccountMoneySchema: z.ZodObject<{
    currency: z.ZodString;
    amount_minor: z.ZodString;
}, z.core.$strict>;
/** Who made the latest change, as the browser may see it: never a user id or email. */
declare const PAYER_ACCOUNT_CHANGED_BY: readonly ["automatic_matching", "workspace_member", "unknown"];
declare const PayerAccountLinkItemSchema: z.ZodObject<{
    payer_key: z.ZodString;
    state: z.ZodEnum<{
        unmatched: "unmatched";
        linked: "linked";
        no_account: "no_account";
    }>;
    rt_account_id: z.ZodNullable<z.ZodString>;
    evidence_kind: z.ZodNullable<z.ZodEnum<{
        provider_metadata_account: "provider_metadata_account";
        provider_metadata_user: "provider_metadata_user";
        customer_link: "customer_link";
        checkout_link: "checkout_link";
        verified_email: "verified_email";
        operator_link: "operator_link";
        operator_no_account: "operator_no_account";
        operator_unlink: "operator_unlink";
    }>>;
    confidence: z.ZodNullable<z.ZodEnum<{
        explicit: "explicit";
        exact_match: "exact_match";
        operator_asserted: "operator_asserted";
    }>>;
    mapping_revision: z.ZodNumber;
    changed_at: z.ZodNullable<z.ZodString>;
    changed_by: z.ZodNullable<z.ZodEnum<{
        unknown: "unknown";
        automatic_matching: "automatic_matching";
        workspace_member: "workspace_member";
    }>>;
    mrr: z.ZodArray<z.ZodObject<{
        currency: z.ZodString;
        amount_minor: z.ZodString;
    }, z.core.$strict>>;
    last_payment_at: z.ZodNullable<z.ZodString>;
    active_subscriptions: z.ZodNumber;
    plans: z.ZodArray<z.ZodString>;
}, z.core.$strict>;
declare const PayerAccountLinkSummarySchema: z.ZodObject<{
    payers: z.ZodNumber;
    unmatched: z.ZodNumber;
    linked: z.ZodNumber;
    no_account: z.ZodNumber;
    unmatched_paying: z.ZodNumber;
    unmatched_mrr: z.ZodArray<z.ZodObject<{
        currency: z.ZodString;
        amount_minor: z.ZodString;
    }, z.core.$strict>>;
    linked_by_evidence: z.ZodArray<z.ZodObject<{
        evidence_kind: z.ZodEnum<{
            provider_metadata_account: "provider_metadata_account";
            provider_metadata_user: "provider_metadata_user";
            customer_link: "customer_link";
            checkout_link: "checkout_link";
            verified_email: "verified_email";
            operator_link: "operator_link";
            operator_no_account: "operator_no_account";
            operator_unlink: "operator_unlink";
        }>;
        payers: z.ZodNumber;
    }, z.core.$strict>>;
}, z.core.$strict>;
declare const PAYER_ACCOUNT_LINK_MAX_PAGE = 100;
declare const PayerAccountLinkListQuerySchema: z.ZodObject<{
    state: z.ZodDefault<z.ZodEnum<{
        all: "all";
        unmatched: "unmatched";
        linked: "linked";
        no_account: "no_account";
    }>>;
    q: z.ZodOptional<z.ZodString>;
    page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    per_page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
}, z.core.$strict>;
declare const PayerAccountLinkListSchema: z.ZodObject<{
    items: z.ZodArray<z.ZodObject<{
        payer_key: z.ZodString;
        state: z.ZodEnum<{
            unmatched: "unmatched";
            linked: "linked";
            no_account: "no_account";
        }>;
        rt_account_id: z.ZodNullable<z.ZodString>;
        evidence_kind: z.ZodNullable<z.ZodEnum<{
            provider_metadata_account: "provider_metadata_account";
            provider_metadata_user: "provider_metadata_user";
            customer_link: "customer_link";
            checkout_link: "checkout_link";
            verified_email: "verified_email";
            operator_link: "operator_link";
            operator_no_account: "operator_no_account";
            operator_unlink: "operator_unlink";
        }>>;
        confidence: z.ZodNullable<z.ZodEnum<{
            explicit: "explicit";
            exact_match: "exact_match";
            operator_asserted: "operator_asserted";
        }>>;
        mapping_revision: z.ZodNumber;
        changed_at: z.ZodNullable<z.ZodString>;
        changed_by: z.ZodNullable<z.ZodEnum<{
            unknown: "unknown";
            automatic_matching: "automatic_matching";
            workspace_member: "workspace_member";
        }>>;
        mrr: z.ZodArray<z.ZodObject<{
            currency: z.ZodString;
            amount_minor: z.ZodString;
        }, z.core.$strict>>;
        last_payment_at: z.ZodNullable<z.ZodString>;
        active_subscriptions: z.ZodNumber;
        plans: z.ZodArray<z.ZodString>;
    }, z.core.$strict>>;
    page: z.ZodNumber;
    per_page: z.ZodNumber;
    total: z.ZodNumber;
    summary: z.ZodObject<{
        payers: z.ZodNumber;
        unmatched: z.ZodNumber;
        linked: z.ZodNumber;
        no_account: z.ZodNumber;
        unmatched_paying: z.ZodNumber;
        unmatched_mrr: z.ZodArray<z.ZodObject<{
            currency: z.ZodString;
            amount_minor: z.ZodString;
        }, z.core.$strict>>;
        linked_by_evidence: z.ZodArray<z.ZodObject<{
            evidence_kind: z.ZodEnum<{
                provider_metadata_account: "provider_metadata_account";
                provider_metadata_user: "provider_metadata_user";
                customer_link: "customer_link";
                checkout_link: "checkout_link";
                verified_email: "verified_email";
                operator_link: "operator_link";
                operator_no_account: "operator_no_account";
                operator_unlink: "operator_unlink";
            }>;
            payers: z.ZodNumber;
        }, z.core.$strict>>;
    }, z.core.$strict>;
    as_of: z.ZodNullable<z.ZodString>;
    connected: z.ZodBoolean;
    provenance: z.ZodEnum<{
        live: "live";
        simulated: "simulated";
    }>;
}, z.core.$strict>;
declare const PayerAccountLinkHistoryEntrySchema: z.ZodObject<{
    mapping_revision: z.ZodNumber;
    state: z.ZodEnum<{
        unmatched: "unmatched";
        linked: "linked";
        no_account: "no_account";
    }>;
    rt_account_id: z.ZodNullable<z.ZodString>;
    evidence_kind: z.ZodNullable<z.ZodEnum<{
        provider_metadata_account: "provider_metadata_account";
        provider_metadata_user: "provider_metadata_user";
        customer_link: "customer_link";
        checkout_link: "checkout_link";
        verified_email: "verified_email";
        operator_link: "operator_link";
        operator_no_account: "operator_no_account";
        operator_unlink: "operator_unlink";
    }>>;
    confidence: z.ZodNullable<z.ZodEnum<{
        explicit: "explicit";
        exact_match: "exact_match";
        operator_asserted: "operator_asserted";
    }>>;
    changed_by: z.ZodEnum<{
        unknown: "unknown";
        automatic_matching: "automatic_matching";
        workspace_member: "workspace_member";
    }>;
    changed_by_you: z.ZodBoolean;
    reason: z.ZodNullable<z.ZodString>;
    changed_at: z.ZodString;
}, z.core.$strict>;
declare const PayerAccountLinkHistorySchema: z.ZodObject<{
    payer_key: z.ZodString;
    revisions: z.ZodArray<z.ZodObject<{
        mapping_revision: z.ZodNumber;
        state: z.ZodEnum<{
            unmatched: "unmatched";
            linked: "linked";
            no_account: "no_account";
        }>;
        rt_account_id: z.ZodNullable<z.ZodString>;
        evidence_kind: z.ZodNullable<z.ZodEnum<{
            provider_metadata_account: "provider_metadata_account";
            provider_metadata_user: "provider_metadata_user";
            customer_link: "customer_link";
            checkout_link: "checkout_link";
            verified_email: "verified_email";
            operator_link: "operator_link";
            operator_no_account: "operator_no_account";
            operator_unlink: "operator_unlink";
        }>>;
        confidence: z.ZodNullable<z.ZodEnum<{
            explicit: "explicit";
            exact_match: "exact_match";
            operator_asserted: "operator_asserted";
        }>>;
        changed_by: z.ZodEnum<{
            unknown: "unknown";
            automatic_matching: "automatic_matching";
            workspace_member: "workspace_member";
        }>;
        changed_by_you: z.ZodBoolean;
        reason: z.ZodNullable<z.ZodString>;
        changed_at: z.ZodString;
    }, z.core.$strict>>;
}, z.core.$strict>;
/**
 * An operator's change to one payer. The tenant, provider and connection come
 * from the signed-in member's own tenant and its current connection, never
 * from the request; an account id shaped like a Stripe id is refused, except a
 * Stripe customer id, which may key a provisional account (ST-935).
 */
declare const PayerAccountLinkRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    action: z.ZodLiteral<"link">;
    rt_account_id: z.ZodString;
    payer_key: z.ZodString;
    expected_revision: z.ZodNumber;
    reason: z.ZodOptional<z.ZodString>;
}, z.core.$strict>, z.ZodObject<{
    action: z.ZodLiteral<"no_account">;
    payer_key: z.ZodString;
    expected_revision: z.ZodNumber;
    reason: z.ZodOptional<z.ZodString>;
}, z.core.$strict>, z.ZodObject<{
    action: z.ZodLiteral<"unlink">;
    payer_key: z.ZodString;
    expected_revision: z.ZodNumber;
    reason: z.ZodOptional<z.ZodString>;
}, z.core.$strict>], "action">;
declare const PAYER_ACCOUNT_LINK_OUTCOMES: readonly ["linked", "marked_no_account", "unlinked", "unchanged", "stale", "not_found", "unknown_account", "not_linked"];
declare const PayerAccountLinkResultSchema: z.ZodObject<{
    outcome: z.ZodEnum<{
        stale: "stale";
        unchanged: "unchanged";
        linked: "linked";
        marked_no_account: "marked_no_account";
        unlinked: "unlinked";
        not_found: "not_found";
        unknown_account: "unknown_account";
        not_linked: "not_linked";
    }>;
    mapping_revision: z.ZodNumber;
    rederive: z.ZodEnum<{
        requested: "requested";
        not_requested: "not_requested";
    }>;
}, z.core.$strict>;
/** Why an automatic match was not made for a payer. */
declare const PAYER_ACCOUNT_MATCH_MISSES: readonly ["no_evidence", "ambiguous", "operator_decision", "provider_unread"];
/** The outcome of one automatic matching run over a tenant's payers. */
declare const PayerAccountMatchResultSchema: z.ZodObject<{
    payers: z.ZodNumber;
    linked: z.ZodNumber;
    relinked: z.ZodNumber;
    unchanged: z.ZodNumber;
    missed: z.ZodArray<z.ZodObject<{
        reason: z.ZodEnum<{
            no_evidence: "no_evidence";
            ambiguous: "ambiguous";
            operator_decision: "operator_decision";
            provider_unread: "provider_unread";
        }>;
        payers: z.ZodNumber;
    }, z.core.$strict>>;
    by_evidence: z.ZodArray<z.ZodObject<{
        evidence_kind: z.ZodEnum<{
            provider_metadata_account: "provider_metadata_account";
            provider_metadata_user: "provider_metadata_user";
            customer_link: "customer_link";
            checkout_link: "checkout_link";
            verified_email: "verified_email";
        }>;
        payers: z.ZodNumber;
    }, z.core.$strict>>;
    provider_reads: z.ZodEnum<{
        unavailable: "unavailable";
        partial: "partial";
        complete: "complete";
    }>;
    rederive: z.ZodEnum<{
        requested: "requested";
        not_requested: "not_requested";
    }>;
}, z.core.$strict>;

/** Shared recurring price terms; independent of profile and source-observation unions. */

/** Upper bound on price tiers (Stripe allows far fewer; this is a safety bound). */
declare const MAX_BILLING_PRICE_TIERS = 100;
/** One price tier. `up_to: null` is the open-ended last tier (Stripe `inf`). */
declare const BillingPriceTierSchema: z.ZodObject<{
    up_to: z.ZodNullable<z.ZodNumber>;
    unit_amount_decimal: z.ZodNullable<z.ZodString>;
    flat_amount_minor: z.ZodNullable<z.ZodString>;
}, z.core.$strict>;
/**
 * The exact price terms behind a recurring price (plan 252 A-2: tier,
 * volume and package transforms need the actual terms — `unit_price *
 * quantity` is not a universal implementation).
 *
 * - `per_unit` — `unit_amount_decimal` per unit, optionally after a
 *   `transform_quantity` (package pricing: divide by N, round up/down).
 * - `tiered` — `graduated` (each tier prices its own units) or `volume` (the
 *   tier the total falls in prices every unit), tiers ascending, the last one
 *   open-ended.
 *
 * Shape only: the charge arithmetic (graduated 116 vs volume 96 vs pack 60)
 * is TASK-29's normalization.
 */
declare const BillingPriceTermsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    billing_scheme: z.ZodLiteral<"per_unit">;
    unit_amount_decimal: z.ZodString;
    transform_quantity: z.ZodNullable<z.ZodObject<{
        divide_by: z.ZodNumber;
        round: z.ZodEnum<{
            up: "up";
            down: "down";
        }>;
    }, z.core.$strict>>;
}, z.core.$strict>, z.ZodObject<{
    billing_scheme: z.ZodLiteral<"tiered">;
    tiers_mode: z.ZodEnum<{
        graduated: "graduated";
        volume: "volume";
    }>;
    tiers: z.ZodArray<z.ZodObject<{
        up_to: z.ZodNullable<z.ZodNumber>;
        unit_amount_decimal: z.ZodNullable<z.ZodString>;
        flat_amount_minor: z.ZodNullable<z.ZodString>;
    }, z.core.$strict>>;
}, z.core.$strict>], "billing_scheme">;
/**
 * Recurring price of one item: interval and interval count are exact per
 * item (items on one subscription may bill on different intervals).
 * `unit_amount_minor` is null for tiered/package prices, whose exact
 * `terms` ride alongside; a null amount WITHOUT terms is a coverage gap.
 */
declare const BillingRecurringPriceSchema: z.ZodObject<{
    price_id: z.ZodString;
    product_id: z.ZodOptional<z.ZodString>;
    interval: z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        year: "year";
    }>;
    interval_count: z.ZodNumber;
    usage_type: z.ZodEnum<{
        metered: "metered";
        licensed: "licensed";
    }>;
    unit_amount_minor: z.ZodNullable<z.ZodString>;
    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
        billing_scheme: z.ZodLiteral<"per_unit">;
        unit_amount_decimal: z.ZodString;
        transform_quantity: z.ZodNullable<z.ZodObject<{
            divide_by: z.ZodNumber;
            round: z.ZodEnum<{
                up: "up";
                down: "down";
            }>;
        }, z.core.$strict>>;
    }, z.core.$strict>, z.ZodObject<{
        billing_scheme: z.ZodLiteral<"tiered">;
        tiers_mode: z.ZodEnum<{
            graduated: "graduated";
            volume: "volume";
        }>;
        tiers: z.ZodArray<z.ZodObject<{
            up_to: z.ZodNullable<z.ZodNumber>;
            unit_amount_decimal: z.ZodNullable<z.ZodString>;
            flat_amount_minor: z.ZodNullable<z.ZodString>;
        }, z.core.$strict>>;
    }, z.core.$strict>], "billing_scheme">>;
}, z.core.$strict>;

/**
 * Discriminated billing profiles (plan 252 TASK-3, BL-0304).
 *
 * The typed properties an OWNED billing Track fact carries under the v2
 * Segment envelope (`segment-envelope.ts`). One union, two discriminators:
 * `profile` names the economic family, `kind` the fact within it, and each
 * `(profile, kind)` pair is its own object â€” so a field required by one kind
 * (a price on a subscription change) is simply absent from another (a
 * cancellation), rather than every billing property becoming optional on
 * every event (plan 252 "Billing profiles").
 *
 * | `profile` | Economic meaning | Kinds |
 * |---|---|---|
 * | `subscription` | Contract transitions over `[effective_at, next_effective_at)` | create, change, renew, cancel, pause, resume, trial_start, trial_convert, trial_expire, retract, correct |
 * | `schedule` | Committed future phases / scheduled cancellation (CMRR input) | phase_declared, cancellation_scheduled, cancellation_withdrawn, retract |
 * | `invoice` | Finalized invoice header and discriminated lines | finalized, recurring_line, trial_line, one_time_line |
 * | `transaction` | One economic payment, whatever object reported it | payment_captured, payment_failed, payment_pending, payment_canceled |
 * | `refund` | Refund lifecycle + cumulative reconciliation observations | refund, refund_total_observed |
 * | `credit` | Credit notes, pre-/post-payment | issued_pre_payment, issued_post_payment, voided |
 * | `balance` | Customer balance and credit-grant funding/application/expiry | balance_adjusted, credit_grant_funded, credit_grant_applied, credit_grant_expired |
 * | `loss` | Verified dispute/return/recovery fund movements and status-only updates | dispute_funds_withdrawn, dispute_funds_reinstated, dispute_status_changed, payment_returned, funds_recovered |
 *
 * ## Money â€” exact amount + basis, never a final status alone
 *
 * Amounts are lossless base-10 integer STRINGS of minor units (`*_minor`),
 * with the profile's explicit `currency` (ISO 4217, upper case) and
 * `currency_exponent` (plan 252 A-1: `cents` is not a universal unit, and a
 * JavaScript number is not an exact carrier). The field name IS the basis â€”
 * `amount_captured_minor` vs `amount_requested_minor`, `subtotal_minor` vs
 * `total_minor` â€” and every profile carries its effective time
 * (`effective_at`), source-recorded time (`source_recorded_at`) and
 * server-observed time (`observed_at`) separately. Signed amounts appear only
 * where the economics are signed: proration and one-time invoice lines, and
 * customer-balance adjustments. A negative active contracted quantity is never
 * valid.
 *
 * ## Occurrence identity â€” version 2 (the versioned change)
 *
 * The v1 billing identity is the producer-minted `billing_ref`
 * (`EVENT_PAYLOAD_CONTRACTS[<billing name>].identity`, unchanged and still
 * compat-gated). Its per-class keying made `subscription_expanded`'s identity
 * the TARGET QUANTITY, so a repeated `5â†’10â†’5â†’10` collapsed the second `â†’10`
 * into the first (plan 252 AC-15; spec `event-contracts.md` identity rule).
 *
 * v2 ({@link BILLING_OCCURRENCE_IDENTITY_VERSION}) separates four identities
 * that v1 conflated, and derives the logical one from SOURCE facts only:
 *
 * | Identity | Carried as | Derived from |
 * |---|---|---|
 * | Logical occurrence | `occurrence.occurrence_key` | tenant + provider + source account + live/test + simulation scope + profile + subject object + discriminator ({@link deriveBillingOccurrenceKey}) |
 * | Source revision | `occurrence.source_revision` | the provider revision that reported this state (e.g. the Stripe event id) |
 * | Delivery | `occurrence.delivery_id` | transport only â€” never identity |
 * | v1 link | `occurrence.legacy_billing_ref` | the v1 key, so historical projections and conversion links survive |
 *
 * The discriminator is the kind's occurrence FAMILY when the subject object
 * is itself the occurrence (a refund, a credit note, an invoice line, one
 * economic payment), and the REQUIRED `source_occurrence_ref` when the same
 * subject has repeatable occurrences (subscription transitions, schedule
 * phases, dispute fund movements, credit-grant applications). Target
 * quantity, delivery id and batch request id can never stand in for it.
 * Validation re-derives the key, so a producer cannot mint a v2 key any other
 * way (Zod-only rule; recorded for the JSON Schema cross-validation).
 *
 * ## Relationship to plan 248's item model
 *
 * No second current-state mirror: a subscription item here is a REVISION of
 * the item plan 248 already observes in `stripe_sub_item`, keyed by the same
 * `(tenant_id, account_id, livemode, item_id)` scope ({@link
 * BILLING_ITEM_JOIN_KEYS}), with the same status vocabulary
 * (`StripeSubscriptionStatusSchema`) and the same scope object
 * (`StripeBillingScopeSchema`, extended with provider + simulation).
 *
 * ## TASK-28 extensions (BL-0292) â€” additive on the same families
 *
 * Plan 252 TASK-28 extends these profiles in place; every addition is a new
 * `kind` or an OPTIONAL field, so every 0.1.364 fact still validates:
 *
 * - **Exact recurrence.** Interval and interval count stay on each item's
 *   price (mixed item intervals are real); the subscription-level
 *   {@link BillingRecurrenceSchema} carries the billing-cycle anchor,
 *   proration behavior, billing mode and collection method. Exact
 *   per-unit / package (`transform_quantity`) / graduated / volume terms ride
 *   on {@link BillingPriceTermsSchema}; a null `unit_amount_minor` without
 *   terms is a `missing_price_terms` coverage gap, never a `unit * quantity`
 *   guess. The normalization arithmetic is TASK-29.
 * - **Economic owner.** {@link BillingEconomicOwnerSchema} names the provider
 *   account whose books own a money movement (platform vs connected account,
 *   Connect charge type). The payer is `customer_ref`; the RevTurbine account
 *   is the envelope's `context.groupId`. Three different things.
 * - **InvoicePayment allocations.** `invoice.payment_allocation` is one edge
 *   of the paginated many-to-many invoiceâ†”payment relation, with requested vs
 *   allocated (`amount_paid_minor`) amounts. Its occurrence is the
 *   InvoicePayment object itself.
 * - **Receivable transitions.** `invoice.status_transition` is a repeatable
 *   `from_status â†’ to_status` revision (finalize, settle, void, write off,
 *   recover) with due / paid / remaining amounts and the settlement basis
 *   (payments, zero total, customer balance, credit note, rollover, out of
 *   band). {@link INVOICE_RECEIVABLE_TRANSITIONS} is the allowed table.
 * - **Balance / loss references.** Balance adjustments name their source and
 *   credit note; grant applications link their funding occurrence; dispute
 *   reinstatements link the withdrawal they reverse; loss movements carry the
 *   processor-settlement amount separately from the payment currency.
 *
 * The derived accounting contracts â€” immutable accounting revisions,
 * providerâ†’RT mapping revisions, output generations and coverage /
 * generation checkpoints â€” are in `billing-accounting.ts`.
 *
 * ## What this file does NOT own (later plan 252 tasks)
 *
 * Ordered discounts and the recurring normalization are TASK-29; the numeric
 * oracles are TASK-45/46/48/57. Nothing here computes MRR.
 *
 * Classification (plan 157 exposure, BL-0131 D-19 identities): every amount
 * and provider object id is `financial` + server-only; times, kinds and
 * scope are `operational` + server-only. No profile carries a person field â€”
 * the person is the envelope's `userId` and the account its `context.groupId`
 * â€” so no billing profile field is `pii`.
 */

/** Current billing-profile contract version, stamped on every profile. */
declare const BILLING_PROFILE_VERSION = 1;
/** v1 = `billing_ref`; v2 = the source-qualified occurrence key below. */
declare const BILLING_OCCURRENCE_IDENTITY_VERSION = 2;
declare const LEGACY_BILLING_OCCURRENCE_IDENTITY_VERSION = 1;
/** Prefix every v2 occurrence key carries, so a v1 `billing_ref` can never be mistaken for one. */
declare const BILLING_OCCURRENCE_KEY_PREFIX = "bo2";

/** Occurrence of a SINGULAR kind: the subject object is itself the occurrence. */
declare const BillingOccurrenceSchema: z.ZodObject<{
    identity_version: z.ZodLiteral<2>;
    occurrence_key: z.ZodString;
    source_revision: z.ZodString;
    source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    delivery_id: z.ZodOptional<z.ZodString>;
    legacy_billing_ref: z.ZodOptional<z.ZodString>;
}, z.core.$strict>;
/** Occurrence of a REPEATABLE kind: the source's own occurrence reference is required. */
declare const BillingRepeatableOccurrenceSchema: z.ZodObject<{
    source_occurrence_ref: z.ZodString;
    identity_version: z.ZodLiteral<2>;
    occurrence_key: z.ZodString;
    source_revision: z.ZodString;
    source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    delivery_id: z.ZodOptional<z.ZodString>;
    legacy_billing_ref: z.ZodOptional<z.ZodString>;
}, z.core.$strict>;

/**
 * Exact subscription-level recurrence (TASK-28). The billing interval itself
 * is per item price; this carries what the whole subscription shares.
 */
declare const BillingRecurrenceSchema: z.ZodObject<{
    billing_cycle_anchor_at: z.ZodISODateTime;
    proration_behavior: z.ZodEnum<{
        none: "none";
        create_prorations: "create_prorations";
        always_invoice: "always_invoice";
    }>;
    billing_mode: z.ZodOptional<z.ZodEnum<{
        classic: "classic";
        flexible: "flexible";
    }>>;
    collection_method: z.ZodEnum<{
        charge_automatically: "charge_automatically";
        send_invoice: "send_invoice";
    }>;
    days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
}, z.core.$strict>;
/**
 * Who owns a money movement economically (plan 252 A-12; Stripe Connect
 * charge ownership). A provider account that can SEE a movement is not
 * necessarily its owner: a destination charge appears on the platform and,
 * as a transfer/payment, on the connected account â€” one sale, counted only in
 * the owner's scope ({@link billingEconomicOwnership}).
 */
declare const BillingEconomicOwnerSchema: z.ZodObject<{
    owner_account_id: z.ZodString;
    charge_type: z.ZodEnum<{
        platform: "platform";
        direct: "direct";
        destination: "destination";
        separate_charges_and_transfers: "separate_charges_and_transfers";
    }>;
    on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strict>;
/**
 * One subscription item AS OF this revision â€” a revision of plan 248's
 * `stripe_sub_item` row, never a second mirror of it.
 */
declare const BillingSubscriptionItemSnapshotSchema: z.ZodObject<{
    item_id: z.ZodString;
    price: z.ZodObject<{
        price_id: z.ZodString;
        product_id: z.ZodOptional<z.ZodString>;
        interval: z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            year: "year";
        }>;
        interval_count: z.ZodNumber;
        usage_type: z.ZodEnum<{
            metered: "metered";
            licensed: "licensed";
        }>;
        unit_amount_minor: z.ZodNullable<z.ZodString>;
        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            billing_scheme: z.ZodLiteral<"per_unit">;
            unit_amount_decimal: z.ZodString;
            transform_quantity: z.ZodNullable<z.ZodObject<{
                divide_by: z.ZodNumber;
                round: z.ZodEnum<{
                    up: "up";
                    down: "down";
                }>;
            }, z.core.$strict>>;
        }, z.core.$strict>, z.ZodObject<{
            billing_scheme: z.ZodLiteral<"tiered">;
            tiers_mode: z.ZodEnum<{
                graduated: "graduated";
                volume: "volume";
            }>;
            tiers: z.ZodArray<z.ZodObject<{
                up_to: z.ZodNullable<z.ZodNumber>;
                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                flat_amount_minor: z.ZodNullable<z.ZodString>;
            }, z.core.$strict>>;
        }, z.core.$strict>], "billing_scheme">>;
    }, z.core.$strict>;
    quantity: z.ZodNumber;
    trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
}, z.core.$strict>;
declare const BillingSubscriptionProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    subscription_id: z.ZodString;
    status_observed: z.ZodOptional<z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>>;
    source_evidence: z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>;
    }, z.core.$strict>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"source_observed">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    items: z.ZodArray<z.ZodObject<{
        item_id: z.ZodString;
        price: z.ZodObject<{
            price_id: z.ZodString;
            product_id: z.ZodOptional<z.ZodString>;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
            usage_type: z.ZodEnum<{
                metered: "metered";
                licensed: "licensed";
            }>;
            unit_amount_minor: z.ZodNullable<z.ZodString>;
            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                billing_scheme: z.ZodLiteral<"per_unit">;
                unit_amount_decimal: z.ZodString;
                transform_quantity: z.ZodNullable<z.ZodObject<{
                    divide_by: z.ZodNumber;
                    round: z.ZodEnum<{
                        up: "up";
                        down: "down";
                    }>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                billing_scheme: z.ZodLiteral<"tiered">;
                tiers_mode: z.ZodEnum<{
                    graduated: "graduated";
                    volume: "volume";
                }>;
                tiers: z.ZodArray<z.ZodObject<{
                    up_to: z.ZodNullable<z.ZodNumber>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>], "billing_scheme">>;
        }, z.core.$strict>;
        quantity: z.ZodNumber;
        trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
    }, z.core.$strict>>;
    items_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    recurrence: z.ZodOptional<z.ZodObject<{
        billing_cycle_anchor_at: z.ZodISODateTime;
        proration_behavior: z.ZodEnum<{
            none: "none";
            create_prorations: "create_prorations";
            always_invoice: "always_invoice";
        }>;
        billing_mode: z.ZodOptional<z.ZodEnum<{
            classic: "classic";
            flexible: "flexible";
        }>>;
        collection_method: z.ZodEnum<{
            charge_automatically: "charge_automatically";
            send_invoice: "send_invoice";
        }>;
        days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    subscription_id: z.ZodString;
    status_after: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    next_effective_at: z.ZodNullable<z.ZodISODateTime>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"create">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    items: z.ZodArray<z.ZodObject<{
        item_id: z.ZodString;
        price: z.ZodObject<{
            price_id: z.ZodString;
            product_id: z.ZodOptional<z.ZodString>;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
            usage_type: z.ZodEnum<{
                metered: "metered";
                licensed: "licensed";
            }>;
            unit_amount_minor: z.ZodNullable<z.ZodString>;
            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                billing_scheme: z.ZodLiteral<"per_unit">;
                unit_amount_decimal: z.ZodString;
                transform_quantity: z.ZodNullable<z.ZodObject<{
                    divide_by: z.ZodNumber;
                    round: z.ZodEnum<{
                        up: "up";
                        down: "down";
                    }>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                billing_scheme: z.ZodLiteral<"tiered">;
                tiers_mode: z.ZodEnum<{
                    graduated: "graduated";
                    volume: "volume";
                }>;
                tiers: z.ZodArray<z.ZodObject<{
                    up_to: z.ZodNullable<z.ZodNumber>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>], "billing_scheme">>;
        }, z.core.$strict>;
        quantity: z.ZodNumber;
        trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
    }, z.core.$strict>>;
    items_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    recurrence: z.ZodOptional<z.ZodObject<{
        billing_cycle_anchor_at: z.ZodISODateTime;
        proration_behavior: z.ZodEnum<{
            none: "none";
            create_prorations: "create_prorations";
            always_invoice: "always_invoice";
        }>;
        billing_mode: z.ZodOptional<z.ZodEnum<{
            classic: "classic";
            flexible: "flexible";
        }>>;
        collection_method: z.ZodEnum<{
            charge_automatically: "charge_automatically";
            send_invoice: "send_invoice";
        }>;
        days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    subscription_id: z.ZodString;
    status_after: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    next_effective_at: z.ZodNullable<z.ZodISODateTime>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"change">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    current_period_start_at: z.ZodISODateTime;
    current_period_end_at: z.ZodISODateTime;
    items: z.ZodArray<z.ZodObject<{
        item_id: z.ZodString;
        price: z.ZodObject<{
            price_id: z.ZodString;
            product_id: z.ZodOptional<z.ZodString>;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
            usage_type: z.ZodEnum<{
                metered: "metered";
                licensed: "licensed";
            }>;
            unit_amount_minor: z.ZodNullable<z.ZodString>;
            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                billing_scheme: z.ZodLiteral<"per_unit">;
                unit_amount_decimal: z.ZodString;
                transform_quantity: z.ZodNullable<z.ZodObject<{
                    divide_by: z.ZodNumber;
                    round: z.ZodEnum<{
                        up: "up";
                        down: "down";
                    }>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                billing_scheme: z.ZodLiteral<"tiered">;
                tiers_mode: z.ZodEnum<{
                    graduated: "graduated";
                    volume: "volume";
                }>;
                tiers: z.ZodArray<z.ZodObject<{
                    up_to: z.ZodNullable<z.ZodNumber>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>], "billing_scheme">>;
        }, z.core.$strict>;
        quantity: z.ZodNumber;
        trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
    }, z.core.$strict>>;
    items_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    recurrence: z.ZodOptional<z.ZodObject<{
        billing_cycle_anchor_at: z.ZodISODateTime;
        proration_behavior: z.ZodEnum<{
            none: "none";
            create_prorations: "create_prorations";
            always_invoice: "always_invoice";
        }>;
        billing_mode: z.ZodOptional<z.ZodEnum<{
            classic: "classic";
            flexible: "flexible";
        }>>;
        collection_method: z.ZodEnum<{
            charge_automatically: "charge_automatically";
            send_invoice: "send_invoice";
        }>;
        days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    subscription_id: z.ZodString;
    status_after: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    next_effective_at: z.ZodNullable<z.ZodISODateTime>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"renew">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    subscription_id: z.ZodString;
    status_after: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    cancel_mode: z.ZodEnum<{
        immediate: "immediate";
        period_end: "period_end";
    }>;
    reason: z.ZodOptional<z.ZodString>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"cancel">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    subscription_id: z.ZodString;
    pause_mode: z.ZodEnum<{
        collection: "collection";
        service: "service";
    }>;
    resumes_at: z.ZodNullable<z.ZodISODateTime>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"pause">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    subscription_id: z.ZodString;
    pause_mode: z.ZodEnum<{
        collection: "collection";
        service: "service";
    }>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"resume">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    trial_start_at: z.ZodISODateTime;
    trial_end_at: z.ZodISODateTime;
    items: z.ZodArray<z.ZodObject<{
        item_id: z.ZodString;
        price: z.ZodObject<{
            price_id: z.ZodString;
            product_id: z.ZodOptional<z.ZodString>;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
            usage_type: z.ZodEnum<{
                metered: "metered";
                licensed: "licensed";
            }>;
            unit_amount_minor: z.ZodNullable<z.ZodString>;
            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                billing_scheme: z.ZodLiteral<"per_unit">;
                unit_amount_decimal: z.ZodString;
                transform_quantity: z.ZodNullable<z.ZodObject<{
                    divide_by: z.ZodNumber;
                    round: z.ZodEnum<{
                        up: "up";
                        down: "down";
                    }>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                billing_scheme: z.ZodLiteral<"tiered">;
                tiers_mode: z.ZodEnum<{
                    graduated: "graduated";
                    volume: "volume";
                }>;
                tiers: z.ZodArray<z.ZodObject<{
                    up_to: z.ZodNullable<z.ZodNumber>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>], "billing_scheme">>;
        }, z.core.$strict>;
        quantity: z.ZodNumber;
        trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
    }, z.core.$strict>>;
    items_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    recurrence: z.ZodOptional<z.ZodObject<{
        billing_cycle_anchor_at: z.ZodISODateTime;
        proration_behavior: z.ZodEnum<{
            none: "none";
            create_prorations: "create_prorations";
            always_invoice: "always_invoice";
        }>;
        billing_mode: z.ZodOptional<z.ZodEnum<{
            classic: "classic";
            flexible: "flexible";
        }>>;
        collection_method: z.ZodEnum<{
            charge_automatically: "charge_automatically";
            send_invoice: "send_invoice";
        }>;
        days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    subscription_id: z.ZodString;
    status_after: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    next_effective_at: z.ZodNullable<z.ZodISODateTime>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"trial_start">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    trial_start_at: z.ZodISODateTime;
    trial_end_at: z.ZodISODateTime;
    items: z.ZodArray<z.ZodObject<{
        item_id: z.ZodString;
        price: z.ZodObject<{
            price_id: z.ZodString;
            product_id: z.ZodOptional<z.ZodString>;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
            usage_type: z.ZodEnum<{
                metered: "metered";
                licensed: "licensed";
            }>;
            unit_amount_minor: z.ZodNullable<z.ZodString>;
            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                billing_scheme: z.ZodLiteral<"per_unit">;
                unit_amount_decimal: z.ZodString;
                transform_quantity: z.ZodNullable<z.ZodObject<{
                    divide_by: z.ZodNumber;
                    round: z.ZodEnum<{
                        up: "up";
                        down: "down";
                    }>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                billing_scheme: z.ZodLiteral<"tiered">;
                tiers_mode: z.ZodEnum<{
                    graduated: "graduated";
                    volume: "volume";
                }>;
                tiers: z.ZodArray<z.ZodObject<{
                    up_to: z.ZodNullable<z.ZodNumber>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>], "billing_scheme">>;
        }, z.core.$strict>;
        quantity: z.ZodNumber;
        trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
    }, z.core.$strict>>;
    items_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    recurrence: z.ZodOptional<z.ZodObject<{
        billing_cycle_anchor_at: z.ZodISODateTime;
        proration_behavior: z.ZodEnum<{
            none: "none";
            create_prorations: "create_prorations";
            always_invoice: "always_invoice";
        }>;
        billing_mode: z.ZodOptional<z.ZodEnum<{
            classic: "classic";
            flexible: "flexible";
        }>>;
        collection_method: z.ZodEnum<{
            charge_automatically: "charge_automatically";
            send_invoice: "send_invoice";
        }>;
        days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    subscription_id: z.ZodString;
    status_after: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    next_effective_at: z.ZodNullable<z.ZodISODateTime>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"trial_convert">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    trial_start_at: z.ZodISODateTime;
    trial_end_at: z.ZodISODateTime;
    subscription_id: z.ZodString;
    status_after: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"trial_expire">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    target_occurrence_key: z.ZodString;
    subscription_id: z.ZodString;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"retract">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    target_occurrence_key: z.ZodString;
    items: z.ZodArray<z.ZodObject<{
        item_id: z.ZodString;
        price: z.ZodObject<{
            price_id: z.ZodString;
            product_id: z.ZodOptional<z.ZodString>;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
            usage_type: z.ZodEnum<{
                metered: "metered";
                licensed: "licensed";
            }>;
            unit_amount_minor: z.ZodNullable<z.ZodString>;
            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                billing_scheme: z.ZodLiteral<"per_unit">;
                unit_amount_decimal: z.ZodString;
                transform_quantity: z.ZodNullable<z.ZodObject<{
                    divide_by: z.ZodNumber;
                    round: z.ZodEnum<{
                        up: "up";
                        down: "down";
                    }>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                billing_scheme: z.ZodLiteral<"tiered">;
                tiers_mode: z.ZodEnum<{
                    graduated: "graduated";
                    volume: "volume";
                }>;
                tiers: z.ZodArray<z.ZodObject<{
                    up_to: z.ZodNullable<z.ZodNumber>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>], "billing_scheme">>;
        }, z.core.$strict>;
        quantity: z.ZodNumber;
        trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
    }, z.core.$strict>>;
    items_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    recurrence: z.ZodOptional<z.ZodObject<{
        billing_cycle_anchor_at: z.ZodISODateTime;
        proration_behavior: z.ZodEnum<{
            none: "none";
            create_prorations: "create_prorations";
            always_invoice: "always_invoice";
        }>;
        billing_mode: z.ZodOptional<z.ZodEnum<{
            classic: "classic";
            flexible: "flexible";
        }>>;
        collection_method: z.ZodEnum<{
            charge_automatically: "charge_automatically";
            send_invoice: "send_invoice";
        }>;
        days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    subscription_id: z.ZodString;
    status_after: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    next_effective_at: z.ZodNullable<z.ZodISODateTime>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"correct">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>], "kind">;
declare const BillingScheduleProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    schedule_id: z.ZodString;
    subscription_id: z.ZodNullable<z.ZodString>;
    phase_context: z.ZodDiscriminatedUnion<[z.ZodObject<{
        coverage: z.ZodLiteral<"unknown">;
        reason: z.ZodEnum<{
            not_hydrated: "not_hydrated";
            unavailable_history: "unavailable_history";
            provider_failure: "provider_failure";
        }>;
    }, z.core.$strict>, z.ZodObject<{
        coverage: z.ZodLiteral<"known">;
        phase_index: z.ZodNumber;
        phase_start_at: z.ZodISODateTime;
        phase_end_at: z.ZodNullable<z.ZodISODateTime>;
    }, z.core.$strict>], "coverage">;
    source_evidence: z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>;
    }, z.core.$strict>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"schedule">;
    kind: z.ZodLiteral<"source_observed">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    items: z.ZodArray<z.ZodObject<{
        item_id: z.ZodString;
        price: z.ZodObject<{
            price_id: z.ZodString;
            product_id: z.ZodOptional<z.ZodString>;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
            usage_type: z.ZodEnum<{
                metered: "metered";
                licensed: "licensed";
            }>;
            unit_amount_minor: z.ZodNullable<z.ZodString>;
            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                billing_scheme: z.ZodLiteral<"per_unit">;
                unit_amount_decimal: z.ZodString;
                transform_quantity: z.ZodNullable<z.ZodObject<{
                    divide_by: z.ZodNumber;
                    round: z.ZodEnum<{
                        up: "up";
                        down: "down";
                    }>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                billing_scheme: z.ZodLiteral<"tiered">;
                tiers_mode: z.ZodEnum<{
                    graduated: "graduated";
                    volume: "volume";
                }>;
                tiers: z.ZodArray<z.ZodObject<{
                    up_to: z.ZodNullable<z.ZodNumber>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>], "billing_scheme">>;
        }, z.core.$strict>;
        quantity: z.ZodNumber;
        trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
    }, z.core.$strict>>;
    observed_through: z.ZodISODateTime;
    phases_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    recurrence: z.ZodOptional<z.ZodObject<{
        billing_cycle_anchor_at: z.ZodISODateTime;
        proration_behavior: z.ZodEnum<{
            none: "none";
            create_prorations: "create_prorations";
            always_invoice: "always_invoice";
        }>;
        billing_mode: z.ZodOptional<z.ZodEnum<{
            classic: "classic";
            flexible: "flexible";
        }>>;
        collection_method: z.ZodEnum<{
            charge_automatically: "charge_automatically";
            send_invoice: "send_invoice";
        }>;
        days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    schedule_id: z.ZodString;
    subscription_id: z.ZodNullable<z.ZodString>;
    phase_index: z.ZodNumber;
    phase_start_at: z.ZodISODateTime;
    phase_end_at: z.ZodNullable<z.ZodISODateTime>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"schedule">;
    kind: z.ZodLiteral<"phase_declared">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    subscription_id: z.ZodString;
    cancel_effective_at: z.ZodISODateTime;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"schedule">;
    kind: z.ZodLiteral<"cancellation_scheduled">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    target_occurrence_key: z.ZodString;
    subscription_id: z.ZodString;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"schedule">;
    kind: z.ZodLiteral<"cancellation_withdrawn">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    target_occurrence_key: z.ZodString;
    schedule_id: z.ZodString;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"schedule">;
    kind: z.ZodLiteral<"retract">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>], "kind">;
/** Provider invoice status (Stripe). */
declare const InvoiceStatusSchema: z.ZodEnum<{
    void: "void";
    paid: "paid";
    draft: "draft";
    open: "open";
    uncollectible: "uncollectible";
}>;
type InvoiceStatus$1 = z.infer<typeof InvoiceStatusSchema>;
/**
 * How an invoice reached `paid` (plan 252 A-11). Only `payments` (and the
 * payment part of `mixed`) can involve fresh cash, and even then the cash is
 * the InvoicePayment allocations, never this status.
 */
declare const InvoiceSettlementBasisSchema: z.ZodEnum<{
    mixed: "mixed";
    customer_balance: "customer_balance";
    credit_note: "credit_note";
    rollover: "rollover";
    payments: "payments";
    out_of_band: "out_of_band";
    zero_total: "zero_total";
}>;
/** Status of one InvoicePayment edge (Stripe). Named, so generated port enums do not renumber. */
declare const InvoicePaymentStatusSchema: z.ZodEnum<{
    canceled: "canceled";
    paid: "paid";
    open: "open";
}>;
/**
 * What funded one InvoicePayment. An `out_of_band` edge names no provider
 * payment: it is external settlement with unknown cash coverage.
 */
declare const BillingInvoicePaymentSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    type: z.ZodLiteral<"payment_intent">;
    payment_id: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    type: z.ZodLiteral<"charge">;
    payment_id: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    type: z.ZodLiteral<"out_of_band">;
}, z.core.$strict>], "type">;
declare const BillingInvoiceProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    invoice_id: z.ZodString;
    source_evidence: z.ZodObject<{
        header: z.ZodObject<{
            created_at: z.ZodNullable<z.ZodISODateTime>;
            due_at: z.ZodNullable<z.ZodISODateTime>;
            finalized_at: z.ZodNullable<z.ZodISODateTime>;
            paid_at: z.ZodNullable<z.ZodISODateTime>;
            voided_at: z.ZodNullable<z.ZodISODateTime>;
            marked_uncollectible_at: z.ZodNullable<z.ZodISODateTime>;
            subtotal_minor: z.ZodNullable<z.ZodString>;
            subtotal_excluding_tax_minor: z.ZodNullable<z.ZodString>;
            total_minor: z.ZodNullable<z.ZodString>;
            total_excluding_tax_minor: z.ZodNullable<z.ZodString>;
            amount_due_minor: z.ZodNullable<z.ZodString>;
            amount_paid_minor: z.ZodNullable<z.ZodString>;
            amount_remaining_minor: z.ZodNullable<z.ZodString>;
            amount_overpaid_minor: z.ZodNullable<z.ZodString>;
            starting_balance_minor: z.ZodNullable<z.ZodString>;
            ending_balance_minor: z.ZodNullable<z.ZodString>;
            pre_payment_credit_notes_amount_minor: z.ZodNullable<z.ZodString>;
            post_payment_credit_notes_amount_minor: z.ZodNullable<z.ZodString>;
            taxes: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                data: z.ZodArray<z.ZodObject<{
                    amount_minor: z.ZodNullable<z.ZodString>;
                    tax_behavior: z.ZodNullable<z.ZodEnum<{
                        inclusive: "inclusive";
                        exclusive: "exclusive";
                    }>>;
                    tax_rate_id: z.ZodNullable<z.ZodString>;
                    taxable_amount_minor: z.ZodNullable<z.ZodString>;
                    taxability_reason: z.ZodNullable<z.ZodEnum<{
                        customer_exempt: "customer_exempt";
                        not_available: "not_available";
                        not_collecting: "not_collecting";
                        not_subject_to_tax: "not_subject_to_tax";
                        not_supported: "not_supported";
                        portion_product_exempt: "portion_product_exempt";
                        portion_reduced_rated: "portion_reduced_rated";
                        portion_standard_rated: "portion_standard_rated";
                        product_exempt: "product_exempt";
                        product_exempt_holiday: "product_exempt_holiday";
                        proportionally_rated: "proportionally_rated";
                        reduced_rated: "reduced_rated";
                        reverse_charge: "reverse_charge";
                        standard_rated: "standard_rated";
                        taxable_basis_reduced: "taxable_basis_reduced";
                        zero_rated: "zero_rated";
                    }>>;
                }, z.core.$strict>>;
            }, z.core.$strict>;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                data: z.ZodArray<z.ZodObject<{
                    discount_id: z.ZodString;
                    amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>;
            pretax_credits: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                data: z.ZodArray<z.ZodObject<{
                    type: z.ZodEnum<{
                        discount: "discount";
                        credit_balance_transaction: "credit_balance_transaction";
                    }>;
                    reference_id: z.ZodString;
                    amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            api_version: z.ZodNullable<z.ZodString>;
            subscription_id: z.ZodNullable<z.ZodString>;
            status: z.ZodNullable<z.ZodEnum<{
                void: "void";
                paid: "paid";
                draft: "draft";
                open: "open";
                uncollectible: "uncollectible";
            }>>;
            previous_status: z.ZodNullable<z.ZodEnum<{
                void: "void";
                paid: "paid";
                draft: "draft";
                open: "open";
                uncollectible: "uncollectible";
            }>>;
            collection_method: z.ZodNullable<z.ZodEnum<{
                charge_automatically: "charge_automatically";
                send_invoice: "send_invoice";
            }>>;
        }, z.core.$strict>;
        lines: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            data: z.ZodArray<z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                subtotal_minor: z.ZodNullable<z.ZodString>;
                quantity: z.ZodNullable<z.ZodNumber>;
                quantity_decimal: z.ZodNullable<z.ZodString>;
                period_start_at: z.ZodNullable<z.ZodISODateTime>;
                period_end_at: z.ZodNullable<z.ZodISODateTime>;
                parent: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    proration: z.ZodNullable<z.ZodBoolean>;
                    credited_items: z.ZodNullable<z.ZodObject<{
                        invoice_id: z.ZodString;
                        invoice_line_ids: z.ZodArray<z.ZodString>;
                    }, z.core.$strict>>;
                    type: z.ZodLiteral<"invoice_item_details">;
                    invoice_item_id: z.ZodNullable<z.ZodString>;
                    subscription_id: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>, z.ZodObject<{
                    proration: z.ZodNullable<z.ZodBoolean>;
                    credited_items: z.ZodNullable<z.ZodObject<{
                        invoice_id: z.ZodString;
                        invoice_line_ids: z.ZodArray<z.ZodString>;
                    }, z.core.$strict>>;
                    type: z.ZodLiteral<"subscription_item_details">;
                    subscription_item_id: z.ZodNullable<z.ZodString>;
                    invoice_item_id: z.ZodNullable<z.ZodString>;
                    subscription_id: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>], "type">>;
                pricing: z.ZodNullable<z.ZodObject<{
                    type: z.ZodLiteral<"price_details">;
                    price_id: z.ZodNullable<z.ZodString>;
                    product_id: z.ZodNullable<z.ZodString>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discountable: z.ZodNullable<z.ZodBoolean>;
                discounts: z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    data: z.ZodArray<z.ZodObject<{
                        discount_id: z.ZodString;
                        amount_minor: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>;
                taxes: z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    data: z.ZodArray<z.ZodObject<{
                        amount_minor: z.ZodNullable<z.ZodString>;
                        tax_behavior: z.ZodNullable<z.ZodEnum<{
                            inclusive: "inclusive";
                            exclusive: "exclusive";
                        }>>;
                        tax_rate_id: z.ZodNullable<z.ZodString>;
                        taxable_amount_minor: z.ZodNullable<z.ZodString>;
                        taxability_reason: z.ZodNullable<z.ZodEnum<{
                            customer_exempt: "customer_exempt";
                            not_available: "not_available";
                            not_collecting: "not_collecting";
                            not_subject_to_tax: "not_subject_to_tax";
                            not_supported: "not_supported";
                            portion_product_exempt: "portion_product_exempt";
                            portion_reduced_rated: "portion_reduced_rated";
                            portion_standard_rated: "portion_standard_rated";
                            product_exempt: "product_exempt";
                            product_exempt_holiday: "product_exempt_holiday";
                            proportionally_rated: "proportionally_rated";
                            reduced_rated: "reduced_rated";
                            reverse_charge: "reverse_charge";
                            standard_rated: "standard_rated";
                            taxable_basis_reduced: "taxable_basis_reduced";
                            zero_rated: "zero_rated";
                        }>>;
                    }, z.core.$strict>>;
                }, z.core.$strict>;
                pretax_credits: z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    data: z.ZodArray<z.ZodObject<{
                        type: z.ZodEnum<{
                            discount: "discount";
                            credit_balance_transaction: "credit_balance_transaction";
                        }>;
                        reference_id: z.ZodString;
                        amount_minor: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
                line_id: z.ZodString;
                invoice_id: z.ZodString;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>>;
            pages_fetched: z.ZodNumber;
            has_more: z.ZodNullable<z.ZodBoolean>;
            next_cursor: z.ZodNullable<z.ZodString>;
            total_count: z.ZodNullable<z.ZodNumber>;
        }, z.core.$strict>;
        payments: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            data: z.ZodArray<z.ZodObject<{
                amount_requested_minor: z.ZodNullable<z.ZodString>;
                amount_paid_minor: z.ZodNullable<z.ZodString>;
                created_at: z.ZodNullable<z.ZodISODateTime>;
                paid_at: z.ZodNullable<z.ZodISODateTime>;
                canceled_at: z.ZodNullable<z.ZodISODateTime>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
                invoice_payment_id: z.ZodString;
                invoice_id: z.ZodString;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    type: z.ZodLiteral<"payment_intent">;
                    payment_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    type: z.ZodLiteral<"charge">;
                    payment_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    type: z.ZodLiteral<"payment_record">;
                    payment_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    type: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>], "type">;
                status: z.ZodNullable<z.ZodEnum<{
                    canceled: "canceled";
                    paid: "paid";
                    open: "open";
                }>>;
                is_default: z.ZodNullable<z.ZodBoolean>;
            }, z.core.$strict>>;
            pages_fetched: z.ZodNumber;
            has_more: z.ZodNullable<z.ZodBoolean>;
            next_cursor: z.ZodNullable<z.ZodString>;
            total_count: z.ZodNullable<z.ZodNumber>;
        }, z.core.$strict>;
        event_payment: z.ZodOptional<z.ZodObject<{
            amount_requested_minor: z.ZodNullable<z.ZodString>;
            amount_paid_minor: z.ZodNullable<z.ZodString>;
            created_at: z.ZodNullable<z.ZodISODateTime>;
            paid_at: z.ZodNullable<z.ZodISODateTime>;
            canceled_at: z.ZodNullable<z.ZodISODateTime>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
            invoice_payment_id: z.ZodString;
            invoice_id: z.ZodString;
            payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
                type: z.ZodLiteral<"payment_intent">;
                payment_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"charge">;
                payment_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"payment_record">;
                payment_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>], "type">;
            status: z.ZodNullable<z.ZodEnum<{
                canceled: "canceled";
                paid: "paid";
                open: "open";
            }>>;
            is_default: z.ZodNullable<z.ZodBoolean>;
            provenance: z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>;
        }, z.core.$strict>>;
    }, z.core.$strict>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"invoice">;
    kind: z.ZodLiteral<"source_observed">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    total_minor: z.ZodString;
    amount_due_minor: z.ZodString;
    due_at: z.ZodNullable<z.ZodISODateTime>;
    line_count: z.ZodNumber;
    lines_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    payment_count: z.ZodOptional<z.ZodNumber>;
    payments_coverage: z.ZodOptional<z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    invoice_id: z.ZodString;
    subscription_id: z.ZodNullable<z.ZodString>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"invoice">;
    kind: z.ZodLiteral<"finalized">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    subtotal_minor: z.ZodString;
    discount_minor: z.ZodString;
    tax_minor: z.ZodString;
    total_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    subscription_id: z.ZodString;
    subscription_item_id: z.ZodString;
    price: z.ZodObject<{
        price_id: z.ZodString;
        product_id: z.ZodOptional<z.ZodString>;
        interval: z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            year: "year";
        }>;
        interval_count: z.ZodNumber;
        usage_type: z.ZodEnum<{
            metered: "metered";
            licensed: "licensed";
        }>;
        unit_amount_minor: z.ZodNullable<z.ZodString>;
        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            billing_scheme: z.ZodLiteral<"per_unit">;
            unit_amount_decimal: z.ZodString;
            transform_quantity: z.ZodNullable<z.ZodObject<{
                divide_by: z.ZodNumber;
                round: z.ZodEnum<{
                    up: "up";
                    down: "down";
                }>;
            }, z.core.$strict>>;
        }, z.core.$strict>, z.ZodObject<{
            billing_scheme: z.ZodLiteral<"tiered">;
            tiers_mode: z.ZodEnum<{
                graduated: "graduated";
                volume: "volume";
            }>;
            tiers: z.ZodArray<z.ZodObject<{
                up_to: z.ZodNullable<z.ZodNumber>;
                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                flat_amount_minor: z.ZodNullable<z.ZodString>;
            }, z.core.$strict>>;
        }, z.core.$strict>], "billing_scheme">>;
    }, z.core.$strict>;
    quantity: z.ZodNumber;
    service_period_start_at: z.ZodISODateTime;
    service_period_end_at: z.ZodISODateTime;
    proration: z.ZodBoolean;
    invoice_id: z.ZodString;
    line_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"invoice">;
    kind: z.ZodLiteral<"recurring_line">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    subtotal_minor: z.ZodString;
    discount_minor: z.ZodString;
    tax_minor: z.ZodString;
    total_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    trial_start_at: z.ZodISODateTime;
    trial_end_at: z.ZodISODateTime;
    subscription_id: z.ZodString;
    subscription_item_id: z.ZodString;
    invoice_id: z.ZodString;
    line_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"invoice">;
    kind: z.ZodLiteral<"trial_line">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    subtotal_minor: z.ZodString;
    discount_minor: z.ZodString;
    tax_minor: z.ZodString;
    total_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    price_id: z.ZodNullable<z.ZodString>;
    quantity: z.ZodNumber;
    invoice_id: z.ZodString;
    line_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"invoice">;
    kind: z.ZodLiteral<"one_time_line">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    economic_owner: z.ZodOptional<z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>>;
    amount_requested_minor: z.ZodString;
    amount_paid_minor: z.ZodNullable<z.ZodString>;
    paid_at: z.ZodNullable<z.ZodISODateTime>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    invoice_payment_id: z.ZodString;
    invoice_id: z.ZodString;
    payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
        type: z.ZodLiteral<"payment_intent">;
        payment_id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"charge">;
        payment_id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"out_of_band">;
    }, z.core.$strict>], "type">;
    status: z.ZodEnum<{
        canceled: "canceled";
        paid: "paid";
        open: "open";
    }>;
    is_default: z.ZodOptional<z.ZodBoolean>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"invoice">;
    kind: z.ZodLiteral<"payment_allocation">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    amount_due_minor: z.ZodString;
    amount_paid_minor: z.ZodString;
    amount_remaining_minor: z.ZodString;
    due_at: z.ZodNullable<z.ZodISODateTime>;
    paid_out_of_band: z.ZodBoolean;
    settlement_basis: z.ZodNullable<z.ZodEnum<{
        mixed: "mixed";
        customer_balance: "customer_balance";
        credit_note: "credit_note";
        rollover: "rollover";
        payments: "payments";
        out_of_band: "out_of_band";
        zero_total: "zero_total";
    }>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    invoice_id: z.ZodString;
    subscription_id: z.ZodNullable<z.ZodString>;
    from_status: z.ZodEnum<{
        void: "void";
        paid: "paid";
        draft: "draft";
        open: "open";
        uncollectible: "uncollectible";
    }>;
    to_status: z.ZodEnum<{
        void: "void";
        paid: "paid";
        draft: "draft";
        open: "open";
        uncollectible: "uncollectible";
    }>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"invoice">;
    kind: z.ZodLiteral<"status_transition">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>], "kind">;
/** Receivable-relevant classification of each allowed invoice transition. */
type InvoiceReceivableTransition = 'finalized' | 'settled' | 'voided' | 'written_off' | 'recovered' | 'write_off_voided';
/**
 * The allowed `from â†’ to` invoice transitions and what each means for the
 * receivable (revenue-accounting Â§7). `paid` and `void` are terminal: a
 * refund does not reopen an invoice.
 */
declare const INVOICE_RECEIVABLE_TRANSITIONS: Readonly<Record<string, InvoiceReceivableTransition>>;
/** Classify a transition, or null when the table does not allow it. */
declare function classifyInvoiceTransition(from: InvoiceStatus$1, to: InvoiceStatus$1): InvoiceReceivableTransition | null;
declare const BillingTransactionProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    occurrence: z.ZodObject<{
        source_occurrence_ref: z.ZodString;
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodNullable<z.ZodString>;
    observed_object_type: z.ZodEnum<{
        charge: "charge";
        payment_intent: "payment_intent";
        payment_record: "payment_record";
    }>;
    observed_object_id: z.ZodString;
    source_evidence: z.ZodObject<{
        header: z.ZodDiscriminatedUnion<[z.ZodObject<{
            amount_requested_minor: z.ZodNullable<z.ZodString>;
            amount_received_minor: z.ZodNullable<z.ZodString>;
            amount_capturable_minor: z.ZodNullable<z.ZodString>;
            status: z.ZodNullable<z.ZodEnum<{
                canceled: "canceled";
                succeeded: "succeeded";
                requires_payment_method: "requires_payment_method";
                requires_confirmation: "requires_confirmation";
                requires_action: "requires_action";
                processing: "processing";
                requires_capture: "requires_capture";
            }>>;
            capture_method: z.ZodNullable<z.ZodEnum<{
                automatic: "automatic";
                automatic_async: "automatic_async";
                manual: "manual";
            }>>;
            canceled_at: z.ZodNullable<z.ZodISODateTime>;
            cancellation_reason: z.ZodNullable<z.ZodEnum<{
                duplicate: "duplicate";
                expired: "expired";
                fraudulent: "fraudulent";
                automatic: "automatic";
                abandoned: "abandoned";
                failed_invoice: "failed_invoice";
                requested_by_customer: "requested_by_customer";
                void_invoice: "void_invoice";
            }>>;
            latest_charge_id: z.ZodNullable<z.ZodString>;
            on_behalf_of: z.ZodNullable<z.ZodString>;
            transfer_destination: z.ZodNullable<z.ZodString>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
            object_type: z.ZodLiteral<"payment_intent">;
            object_id: z.ZodString;
            customer_ref: z.ZodNullable<z.ZodString>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            api_version: z.ZodNullable<z.ZodString>;
            created_at: z.ZodNullable<z.ZodISODateTime>;
            gaps: z.ZodArray<z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>>;
        }, z.core.$strict>, z.ZodObject<{
            amount_minor: z.ZodNullable<z.ZodString>;
            amount_captured_minor: z.ZodNullable<z.ZodString>;
            amount_refunded_minor: z.ZodNullable<z.ZodString>;
            paid: z.ZodNullable<z.ZodBoolean>;
            captured: z.ZodNullable<z.ZodBoolean>;
            refunded: z.ZodNullable<z.ZodBoolean>;
            disputed: z.ZodNullable<z.ZodBoolean>;
            status: z.ZodNullable<z.ZodEnum<{
                pending: "pending";
                succeeded: "succeeded";
                failed: "failed";
            }>>;
            payment_intent_id: z.ZodNullable<z.ZodString>;
            balance_transaction_id: z.ZodNullable<z.ZodString>;
            failure_balance_transaction_id: z.ZodNullable<z.ZodString>;
            source_transfer_id: z.ZodNullable<z.ZodString>;
            on_behalf_of: z.ZodNullable<z.ZodString>;
            transfer_destination: z.ZodNullable<z.ZodString>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
            object_type: z.ZodLiteral<"charge">;
            object_id: z.ZodString;
            customer_ref: z.ZodNullable<z.ZodString>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            api_version: z.ZodNullable<z.ZodString>;
            created_at: z.ZodNullable<z.ZodISODateTime>;
            gaps: z.ZodArray<z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>>;
        }, z.core.$strict>, z.ZodObject<{
            object_type: z.ZodLiteral<"payment_record">;
            amount: z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
            }, z.core.$strict>;
            amount_requested: z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
            }, z.core.$strict>;
            amount_authorized: z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
            }, z.core.$strict>;
            amount_canceled: z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
            }, z.core.$strict>;
            amount_failed: z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
            }, z.core.$strict>;
            amount_guaranteed: z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
            }, z.core.$strict>;
            amount_refunded: z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
            }, z.core.$strict>;
            application_id: z.ZodNullable<z.ZodString>;
            latest_payment_attempt_record_id: z.ZodNullable<z.ZodString>;
            reported_by: z.ZodNullable<z.ZodEnum<{
                stripe: "stripe";
                self: "self";
            }>>;
            processor_type: z.ZodNullable<z.ZodLiteral<"custom">>;
            object_id: z.ZodString;
            customer_ref: z.ZodNullable<z.ZodString>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            api_version: z.ZodNullable<z.ZodString>;
            created_at: z.ZodNullable<z.ZodISODateTime>;
            gaps: z.ZodArray<z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>>;
        }, z.core.$strict>], "object_type">;
        linked_charge: z.ZodOptional<z.ZodObject<{
            amount_minor: z.ZodNullable<z.ZodString>;
            amount_captured_minor: z.ZodNullable<z.ZodString>;
            amount_refunded_minor: z.ZodNullable<z.ZodString>;
            paid: z.ZodNullable<z.ZodBoolean>;
            captured: z.ZodNullable<z.ZodBoolean>;
            refunded: z.ZodNullable<z.ZodBoolean>;
            disputed: z.ZodNullable<z.ZodBoolean>;
            status: z.ZodNullable<z.ZodEnum<{
                pending: "pending";
                succeeded: "succeeded";
                failed: "failed";
            }>>;
            payment_intent_id: z.ZodNullable<z.ZodString>;
            balance_transaction_id: z.ZodNullable<z.ZodString>;
            failure_balance_transaction_id: z.ZodNullable<z.ZodString>;
            source_transfer_id: z.ZodNullable<z.ZodString>;
            on_behalf_of: z.ZodNullable<z.ZodString>;
            transfer_destination: z.ZodNullable<z.ZodString>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
            object_type: z.ZodLiteral<"charge">;
            object_id: z.ZodString;
            customer_ref: z.ZodNullable<z.ZodString>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            api_version: z.ZodNullable<z.ZodString>;
            created_at: z.ZodNullable<z.ZodISODateTime>;
            gaps: z.ZodArray<z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>>;
        }, z.core.$strict>>;
        allocations: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            data: z.ZodArray<z.ZodObject<{
                amount_requested_minor: z.ZodNullable<z.ZodString>;
                amount_paid_minor: z.ZodNullable<z.ZodString>;
                created_at: z.ZodNullable<z.ZodISODateTime>;
                paid_at: z.ZodNullable<z.ZodISODateTime>;
                canceled_at: z.ZodNullable<z.ZodISODateTime>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
                invoice_payment_id: z.ZodString;
                invoice_id: z.ZodString;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    type: z.ZodLiteral<"payment_intent">;
                    payment_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    type: z.ZodLiteral<"charge">;
                    payment_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    type: z.ZodLiteral<"payment_record">;
                    payment_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    type: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>], "type">;
                status: z.ZodNullable<z.ZodEnum<{
                    canceled: "canceled";
                    paid: "paid";
                    open: "open";
                }>>;
                is_default: z.ZodNullable<z.ZodBoolean>;
            }, z.core.$strict>>;
            pages_fetched: z.ZodNumber;
            has_more: z.ZodNullable<z.ZodBoolean>;
            next_cursor: z.ZodNullable<z.ZodString>;
            total_count: z.ZodNullable<z.ZodNumber>;
            subject: z.ZodObject<{
                type: z.ZodEnum<{
                    charge: "charge";
                    payment_intent: "payment_intent";
                    payment_record: "payment_record";
                }>;
                id: z.ZodString;
            }, z.core.$strict>;
        }, z.core.$strict>;
    }, z.core.$strict>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"transaction">;
    kind: z.ZodLiteral<"source_observed">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
}, z.core.$strict>, z.ZodObject<{
    amount_captured_minor: z.ZodString;
    amount_requested_minor: z.ZodOptional<z.ZodString>;
    allocations_coverage: z.ZodOptional<z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>>;
    economic_owner: z.ZodOptional<z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    payment_id: z.ZodString;
    observed_object_type: z.ZodEnum<{
        invoice: "invoice";
        charge: "charge";
        payment_intent: "payment_intent";
        invoice_payment: "invoice_payment";
        checkout_session: "checkout_session";
    }>;
    observed_object_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"transaction">;
    kind: z.ZodLiteral<"payment_captured">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    amount_requested_minor: z.ZodString;
    failure_code: z.ZodString;
    economic_owner: z.ZodOptional<z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    payment_id: z.ZodString;
    observed_object_type: z.ZodEnum<{
        invoice: "invoice";
        charge: "charge";
        payment_intent: "payment_intent";
        invoice_payment: "invoice_payment";
        checkout_session: "checkout_session";
    }>;
    observed_object_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"transaction">;
    kind: z.ZodLiteral<"payment_failed">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    amount_requested_minor: z.ZodString;
    economic_owner: z.ZodOptional<z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    payment_id: z.ZodString;
    observed_object_type: z.ZodEnum<{
        invoice: "invoice";
        charge: "charge";
        payment_intent: "payment_intent";
        invoice_payment: "invoice_payment";
        checkout_session: "checkout_session";
    }>;
    observed_object_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"transaction">;
    kind: z.ZodLiteral<"payment_pending">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    amount_requested_minor: z.ZodString;
    economic_owner: z.ZodOptional<z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    payment_id: z.ZodString;
    observed_object_type: z.ZodEnum<{
        invoice: "invoice";
        charge: "charge";
        payment_intent: "payment_intent";
        invoice_payment: "invoice_payment";
        checkout_session: "checkout_session";
    }>;
    observed_object_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"transaction">;
    kind: z.ZodLiteral<"payment_canceled">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>], "kind">;
/** One allocation of a refund/credit amount to an invoice (line). Its key is the occurrence plus `allocation_id`. */
declare const BillingAllocationSchema: z.ZodObject<{
    principal_minor: z.ZodOptional<z.ZodString>;
    tax_minor: z.ZodOptional<z.ZodString>;
    allocation_id: z.ZodString;
    invoice_id: z.ZodString;
    invoice_line_id: z.ZodNullable<z.ZodString>;
    amount_minor: z.ZodString;
}, z.core.$strict>;
declare const BillingRefundProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    economic_owner: z.ZodOptional<z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>>;
    amount_minor: z.ZodString;
    reason: z.ZodNullable<z.ZodEnum<{
        duplicate: "duplicate";
        other: "other";
        fraudulent: "fraudulent";
        requested_by_customer: "requested_by_customer";
        expired_uncaptured_charge: "expired_uncaptured_charge";
    }>>;
    credit_note_id: z.ZodNullable<z.ZodString>;
    allocations: z.ZodArray<z.ZodObject<{
        principal_minor: z.ZodOptional<z.ZodString>;
        tax_minor: z.ZodOptional<z.ZodString>;
        allocation_id: z.ZodString;
        invoice_id: z.ZodString;
        invoice_line_id: z.ZodNullable<z.ZodString>;
        amount_minor: z.ZodString;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    refund_id: z.ZodString;
    payment_id: z.ZodString;
    balance_transaction_id: z.ZodOptional<z.ZodString>;
    status: z.ZodEnum<{
        canceled: "canceled";
        pending: "pending";
        succeeded: "succeeded";
        failed: "failed";
        requires_action: "requires_action";
    }>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"refund">;
    kind: z.ZodLiteral<"refund">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    amount_refunded_cumulative_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    payment_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"refund">;
    kind: z.ZodLiteral<"refund_total_observed">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>], "kind">;
declare const BillingCreditNoteLineSchema: z.ZodObject<{
    principal_minor: z.ZodOptional<z.ZodString>;
    tax_minor: z.ZodOptional<z.ZodString>;
    credit_line_id: z.ZodString;
    invoice_line_id: z.ZodNullable<z.ZodString>;
    amount_minor: z.ZodString;
}, z.core.$strict>;
/** How a post-payment credit was settled. Unlinked settlement is NOT a valid post-payment credit. */
declare const BillingCreditSettlementSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    method: z.ZodLiteral<"refund">;
    refund_id: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    method: z.ZodLiteral<"customer_balance">;
    balance_transaction_id: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    method: z.ZodLiteral<"out_of_band">;
    out_of_band_amount_minor: z.ZodString;
}, z.core.$strict>], "method">;
declare const BillingCreditProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    total_minor: z.ZodString;
    reason: z.ZodNullable<z.ZodEnum<{
        duplicate: "duplicate";
        other: "other";
        fraudulent: "fraudulent";
        order_change: "order_change";
        product_unsatisfactory: "product_unsatisfactory";
    }>>;
    lines: z.ZodArray<z.ZodObject<{
        principal_minor: z.ZodOptional<z.ZodString>;
        tax_minor: z.ZodOptional<z.ZodString>;
        credit_line_id: z.ZodString;
        invoice_line_id: z.ZodNullable<z.ZodString>;
        amount_minor: z.ZodString;
    }, z.core.$strict>>;
    lines_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    credit_note_id: z.ZodString;
    invoice_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"credit">;
    kind: z.ZodLiteral<"issued_pre_payment">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    settlements: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
        method: z.ZodLiteral<"refund">;
        refund_id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        method: z.ZodLiteral<"customer_balance">;
        balance_transaction_id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        method: z.ZodLiteral<"out_of_band">;
        out_of_band_amount_minor: z.ZodString;
    }, z.core.$strict>], "method">>;
    total_minor: z.ZodString;
    reason: z.ZodNullable<z.ZodEnum<{
        duplicate: "duplicate";
        other: "other";
        fraudulent: "fraudulent";
        order_change: "order_change";
        product_unsatisfactory: "product_unsatisfactory";
    }>>;
    lines: z.ZodArray<z.ZodObject<{
        principal_minor: z.ZodOptional<z.ZodString>;
        tax_minor: z.ZodOptional<z.ZodString>;
        credit_line_id: z.ZodString;
        invoice_line_id: z.ZodNullable<z.ZodString>;
        amount_minor: z.ZodString;
    }, z.core.$strict>>;
    lines_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    credit_note_id: z.ZodString;
    invoice_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"credit">;
    kind: z.ZodLiteral<"issued_post_payment">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    credit_note_id: z.ZodString;
    invoice_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"credit">;
    kind: z.ZodLiteral<"voided">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>], "kind">;
declare const BillingBalanceProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    amount_minor: z.ZodString;
    balance_type: z.ZodEnum<{
        customer_balance: "customer_balance";
        invoice_credit_balance: "invoice_credit_balance";
    }>;
    invoice_id: z.ZodNullable<z.ZodString>;
    adjustment_source: z.ZodOptional<z.ZodEnum<{
        other: "other";
        invoice_applied: "invoice_applied";
        invoice_unapplied: "invoice_unapplied";
        credit_note: "credit_note";
        overpayment: "overpayment";
        rollover: "rollover";
        manual_adjustment: "manual_adjustment";
        migration: "migration";
    }>>;
    credit_note_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    balance_transaction_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"balance">;
    kind: z.ZodLiteral<"balance_adjusted">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    amount_minor: z.ZodString;
    expires_at: z.ZodNullable<z.ZodISODateTime>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    grant_id: z.ZodString;
    category: z.ZodEnum<{
        paid: "paid";
        promotional: "promotional";
    }>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"balance">;
    kind: z.ZodLiteral<"credit_grant_funded">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    invoice_id: z.ZodString;
    amount_minor: z.ZodString;
    funding_occurrence_key: z.ZodOptional<z.ZodString>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    grant_id: z.ZodString;
    category: z.ZodEnum<{
        paid: "paid";
        promotional: "promotional";
    }>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"balance">;
    kind: z.ZodLiteral<"credit_grant_applied">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    amount_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    grant_id: z.ZodString;
    category: z.ZodEnum<{
        paid: "paid";
        promotional: "promotional";
    }>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"balance">;
    kind: z.ZodLiteral<"credit_grant_expired">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>], "kind">;
declare const BillingLossProfileSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    settlement_amount: z.ZodOptional<z.ZodObject<{
        amount_minor: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
    }, z.core.$strict>>;
    economic_owner: z.ZodOptional<z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>>;
    amount_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    dispute_id: z.ZodString;
    payment_id: z.ZodString;
    balance_transaction_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"loss">;
    kind: z.ZodLiteral<"dispute_funds_withdrawn">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    reverses_occurrence_key: z.ZodOptional<z.ZodString>;
    settlement_amount: z.ZodOptional<z.ZodObject<{
        amount_minor: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
    }, z.core.$strict>>;
    economic_owner: z.ZodOptional<z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>>;
    amount_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    dispute_id: z.ZodString;
    payment_id: z.ZodString;
    balance_transaction_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"loss">;
    kind: z.ZodLiteral<"dispute_funds_reinstated">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    dispute_id: z.ZodString;
    payment_id: z.ZodString;
    status: z.ZodEnum<{
        warning_needs_response: "warning_needs_response";
        warning_under_review: "warning_under_review";
        warning_closed: "warning_closed";
        needs_response: "needs_response";
        under_review: "under_review";
        won: "won";
        lost: "lost";
    }>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"loss">;
    kind: z.ZodLiteral<"dispute_status_changed">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    settlement_amount: z.ZodOptional<z.ZodObject<{
        amount_minor: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
    }, z.core.$strict>>;
    economic_owner: z.ZodOptional<z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>>;
    amount_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    return_id: z.ZodString;
    payment_id: z.ZodString;
    balance_transaction_id: z.ZodOptional<z.ZodString>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"loss">;
    kind: z.ZodLiteral<"payment_returned">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    economic_owner: z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>;
    settlement_amount: z.ZodOptional<z.ZodObject<{
        amount_minor: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
    }, z.core.$strict>>;
    amount_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    payment_id: z.ZodString;
    balance_transaction_id: z.ZodString;
    reverses_occurrence_key: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"loss">;
    kind: z.ZodLiteral<"funds_recovered">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>], "kind">;
declare const BILLING_PROFILE_NAMES: readonly ["subscription", "schedule", "invoice", "transaction", "refund", "credit", "balance", "loss"];
type BillingProfileName = (typeof BILLING_PROFILE_NAMES)[number];
/** Every `(profile, kind)` pair, derived from the unions â€” never restated. */
declare const BILLING_PROFILE_KINDS: Readonly<Record<BillingProfileName, readonly string[]>>;
interface OccurrenceRule {
    /** The provider object the occurrence is about. */
    subject: (profile: Record<string, unknown>) => string;
    /** True: the subject has repeatable occurrences, told apart by `source_occurrence_ref`. */
    repeatable: boolean;
    /** Discriminator for a singular kind (unused when repeatable). */
    family?: string;
}
/**
 * Per `(profile, kind)`: which object is the subject, and whether the
 * discriminator is the kind's family (singular) or the source's own
 * occurrence reference (repeatable). Total over {@link BILLING_PROFILE_KINDS}
 * (asserted in the conformance test).
 */
declare const BILLING_OCCURRENCE_RULES: Readonly<Record<BillingProfileName, Readonly<Record<string, OccurrenceRule>>>>;
/**
 * The v2 logical-occurrence key of a billing fact. Source-qualified by
 * tenant, provider, connected account, live/test mode and simulation scope,
 * so the same raw provider id in two scopes is two occurrences (AC-15), and
 * discriminated by the source's own occurrence reference for repeatable
 * transitions, so `5â†’10â†’5â†’10` is four occurrences, not three.
 *
 * Inputs are the profile's own fields; nothing here reads a quantity, a
 * delivery id or a batch request id.
 */
declare function deriveBillingOccurrenceKey(profile: {
    profile: string;
    kind: string;
    source: {
        tenant_id: string;
        provider: string;
        account_id: string;
        livemode: boolean;
        simulation_id?: string;
    };
    occurrence: {
        source_occurrence_ref?: string;
    };
    [key: string]: unknown;
}): string;
/** The source-revision key: one logical occurrence, one provider revision. Replays collapse onto it. */
declare function deriveBillingRevisionKey(profile: {
    occurrence: {
        occurrence_key: string;
        source_revision: string;
    };
}): string;
/** The refund/credit allocation key: the occurrence plus the allocation id. */
declare function deriveBillingAllocationKey(occurrenceKey: string, allocationId: string): string;
/**
 * The unique keys plan 252's Schema impact requires, as field paths.
 * Storage (TASK-30) declares these as scoped unique indexes.
 *
 * The first four are TASK-3's. TASK-28 adds the credit-note line allocation,
 * the InvoicePayment edge, and the keys of the derived accounting contracts in
 * `billing-accounting.ts`. SOURCE keys (occurrence, revision, allocation,
 * mapping revision) identify what a provider said; OUTPUT keys (output
 * generation, generation) identify what RevTurbine derived from it under one
 * policy â€” a rebuild mints a new generation, never a new source revision.
 */
declare const BILLING_UNIQUE_KEYS: {
    readonly logical_occurrence: readonly ["source.tenant_id", "occurrence.occurrence_key"];
    readonly source_revision: readonly ["source.tenant_id", "occurrence.occurrence_key", "occurrence.source_revision"];
    readonly allocation: readonly ["source.tenant_id", "occurrence.occurrence_key", "allocations[].allocation_id"];
    readonly output_generation: readonly ["tenant_id", "policy_version", "generation_id", "output_key"];
    /** TASK-28: one credit-note line allocation (the credit side of refund/credit allocation). */
    readonly credit_allocation: readonly ["source.tenant_id", "occurrence.occurrence_key", "lines[].credit_line_id"];
    /** TASK-28: one InvoicePayment edge â€” its occurrence is the InvoicePayment object. */
    readonly invoice_payment_allocation: readonly ["source.tenant_id", "occurrence.occurrence_key"];
    /** TASK-28: one immutable accounting revision row. */
    readonly accounting_revision: readonly ["source.tenant_id", "revision_key"];
    /** TASK-28: one provider-customer â†’ RT-account mapping revision. */
    readonly mapping_revision: readonly ["source.tenant_id", "source.provider", "source.account_id", "source.livemode", "source.simulation_id", "customer_ref", "mapping_revision"];
    /** TASK-28: one derived output generation (its checkpoint rides on it). */
    readonly generation: readonly ["tenant_id", "generation_id"];
    /** TASK-28: one coverage checkpoint per scope, RT account and fact family. */
    readonly coverage_checkpoint: readonly ["source.tenant_id", "source.provider", "source.account_id", "source.livemode", "source.simulation_id", "rt_account_id", "family"];
};
/** Plan 248 `stripe_sub_item` unique scope â€” the join from an item snapshot to observed item state. */
declare const BILLING_ITEM_JOIN_KEYS: readonly ["tenant_id", "account_id", "livemode", "item_id"];
/**
 * Any owned billing fact. Discriminated by `profile`, then `kind`; the
 * cross-field rules above run on every member.
 */
declare const BillingProfileSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
    subscription_id: z.ZodString;
    status_observed: z.ZodOptional<z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>>;
    source_evidence: z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>;
    }, z.core.$strict>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"source_observed">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    items: z.ZodArray<z.ZodObject<{
        item_id: z.ZodString;
        price: z.ZodObject<{
            price_id: z.ZodString;
            product_id: z.ZodOptional<z.ZodString>;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
            usage_type: z.ZodEnum<{
                metered: "metered";
                licensed: "licensed";
            }>;
            unit_amount_minor: z.ZodNullable<z.ZodString>;
            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                billing_scheme: z.ZodLiteral<"per_unit">;
                unit_amount_decimal: z.ZodString;
                transform_quantity: z.ZodNullable<z.ZodObject<{
                    divide_by: z.ZodNumber;
                    round: z.ZodEnum<{
                        up: "up";
                        down: "down";
                    }>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                billing_scheme: z.ZodLiteral<"tiered">;
                tiers_mode: z.ZodEnum<{
                    graduated: "graduated";
                    volume: "volume";
                }>;
                tiers: z.ZodArray<z.ZodObject<{
                    up_to: z.ZodNullable<z.ZodNumber>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>], "billing_scheme">>;
        }, z.core.$strict>;
        quantity: z.ZodNumber;
        trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
    }, z.core.$strict>>;
    items_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    recurrence: z.ZodOptional<z.ZodObject<{
        billing_cycle_anchor_at: z.ZodISODateTime;
        proration_behavior: z.ZodEnum<{
            none: "none";
            create_prorations: "create_prorations";
            always_invoice: "always_invoice";
        }>;
        billing_mode: z.ZodOptional<z.ZodEnum<{
            classic: "classic";
            flexible: "flexible";
        }>>;
        collection_method: z.ZodEnum<{
            charge_automatically: "charge_automatically";
            send_invoice: "send_invoice";
        }>;
        days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    subscription_id: z.ZodString;
    status_after: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    next_effective_at: z.ZodNullable<z.ZodISODateTime>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"create">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    items: z.ZodArray<z.ZodObject<{
        item_id: z.ZodString;
        price: z.ZodObject<{
            price_id: z.ZodString;
            product_id: z.ZodOptional<z.ZodString>;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
            usage_type: z.ZodEnum<{
                metered: "metered";
                licensed: "licensed";
            }>;
            unit_amount_minor: z.ZodNullable<z.ZodString>;
            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                billing_scheme: z.ZodLiteral<"per_unit">;
                unit_amount_decimal: z.ZodString;
                transform_quantity: z.ZodNullable<z.ZodObject<{
                    divide_by: z.ZodNumber;
                    round: z.ZodEnum<{
                        up: "up";
                        down: "down";
                    }>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                billing_scheme: z.ZodLiteral<"tiered">;
                tiers_mode: z.ZodEnum<{
                    graduated: "graduated";
                    volume: "volume";
                }>;
                tiers: z.ZodArray<z.ZodObject<{
                    up_to: z.ZodNullable<z.ZodNumber>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>], "billing_scheme">>;
        }, z.core.$strict>;
        quantity: z.ZodNumber;
        trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
    }, z.core.$strict>>;
    items_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    recurrence: z.ZodOptional<z.ZodObject<{
        billing_cycle_anchor_at: z.ZodISODateTime;
        proration_behavior: z.ZodEnum<{
            none: "none";
            create_prorations: "create_prorations";
            always_invoice: "always_invoice";
        }>;
        billing_mode: z.ZodOptional<z.ZodEnum<{
            classic: "classic";
            flexible: "flexible";
        }>>;
        collection_method: z.ZodEnum<{
            charge_automatically: "charge_automatically";
            send_invoice: "send_invoice";
        }>;
        days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    subscription_id: z.ZodString;
    status_after: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    next_effective_at: z.ZodNullable<z.ZodISODateTime>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"change">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    current_period_start_at: z.ZodISODateTime;
    current_period_end_at: z.ZodISODateTime;
    items: z.ZodArray<z.ZodObject<{
        item_id: z.ZodString;
        price: z.ZodObject<{
            price_id: z.ZodString;
            product_id: z.ZodOptional<z.ZodString>;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
            usage_type: z.ZodEnum<{
                metered: "metered";
                licensed: "licensed";
            }>;
            unit_amount_minor: z.ZodNullable<z.ZodString>;
            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                billing_scheme: z.ZodLiteral<"per_unit">;
                unit_amount_decimal: z.ZodString;
                transform_quantity: z.ZodNullable<z.ZodObject<{
                    divide_by: z.ZodNumber;
                    round: z.ZodEnum<{
                        up: "up";
                        down: "down";
                    }>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                billing_scheme: z.ZodLiteral<"tiered">;
                tiers_mode: z.ZodEnum<{
                    graduated: "graduated";
                    volume: "volume";
                }>;
                tiers: z.ZodArray<z.ZodObject<{
                    up_to: z.ZodNullable<z.ZodNumber>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>], "billing_scheme">>;
        }, z.core.$strict>;
        quantity: z.ZodNumber;
        trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
    }, z.core.$strict>>;
    items_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    recurrence: z.ZodOptional<z.ZodObject<{
        billing_cycle_anchor_at: z.ZodISODateTime;
        proration_behavior: z.ZodEnum<{
            none: "none";
            create_prorations: "create_prorations";
            always_invoice: "always_invoice";
        }>;
        billing_mode: z.ZodOptional<z.ZodEnum<{
            classic: "classic";
            flexible: "flexible";
        }>>;
        collection_method: z.ZodEnum<{
            charge_automatically: "charge_automatically";
            send_invoice: "send_invoice";
        }>;
        days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    subscription_id: z.ZodString;
    status_after: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    next_effective_at: z.ZodNullable<z.ZodISODateTime>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"renew">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    subscription_id: z.ZodString;
    status_after: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    cancel_mode: z.ZodEnum<{
        immediate: "immediate";
        period_end: "period_end";
    }>;
    reason: z.ZodOptional<z.ZodString>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"cancel">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    subscription_id: z.ZodString;
    pause_mode: z.ZodEnum<{
        collection: "collection";
        service: "service";
    }>;
    resumes_at: z.ZodNullable<z.ZodISODateTime>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"pause">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    subscription_id: z.ZodString;
    pause_mode: z.ZodEnum<{
        collection: "collection";
        service: "service";
    }>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"resume">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    trial_start_at: z.ZodISODateTime;
    trial_end_at: z.ZodISODateTime;
    items: z.ZodArray<z.ZodObject<{
        item_id: z.ZodString;
        price: z.ZodObject<{
            price_id: z.ZodString;
            product_id: z.ZodOptional<z.ZodString>;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
            usage_type: z.ZodEnum<{
                metered: "metered";
                licensed: "licensed";
            }>;
            unit_amount_minor: z.ZodNullable<z.ZodString>;
            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                billing_scheme: z.ZodLiteral<"per_unit">;
                unit_amount_decimal: z.ZodString;
                transform_quantity: z.ZodNullable<z.ZodObject<{
                    divide_by: z.ZodNumber;
                    round: z.ZodEnum<{
                        up: "up";
                        down: "down";
                    }>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                billing_scheme: z.ZodLiteral<"tiered">;
                tiers_mode: z.ZodEnum<{
                    graduated: "graduated";
                    volume: "volume";
                }>;
                tiers: z.ZodArray<z.ZodObject<{
                    up_to: z.ZodNullable<z.ZodNumber>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>], "billing_scheme">>;
        }, z.core.$strict>;
        quantity: z.ZodNumber;
        trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
    }, z.core.$strict>>;
    items_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    recurrence: z.ZodOptional<z.ZodObject<{
        billing_cycle_anchor_at: z.ZodISODateTime;
        proration_behavior: z.ZodEnum<{
            none: "none";
            create_prorations: "create_prorations";
            always_invoice: "always_invoice";
        }>;
        billing_mode: z.ZodOptional<z.ZodEnum<{
            classic: "classic";
            flexible: "flexible";
        }>>;
        collection_method: z.ZodEnum<{
            charge_automatically: "charge_automatically";
            send_invoice: "send_invoice";
        }>;
        days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    subscription_id: z.ZodString;
    status_after: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    next_effective_at: z.ZodNullable<z.ZodISODateTime>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"trial_start">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    trial_start_at: z.ZodISODateTime;
    trial_end_at: z.ZodISODateTime;
    items: z.ZodArray<z.ZodObject<{
        item_id: z.ZodString;
        price: z.ZodObject<{
            price_id: z.ZodString;
            product_id: z.ZodOptional<z.ZodString>;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
            usage_type: z.ZodEnum<{
                metered: "metered";
                licensed: "licensed";
            }>;
            unit_amount_minor: z.ZodNullable<z.ZodString>;
            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                billing_scheme: z.ZodLiteral<"per_unit">;
                unit_amount_decimal: z.ZodString;
                transform_quantity: z.ZodNullable<z.ZodObject<{
                    divide_by: z.ZodNumber;
                    round: z.ZodEnum<{
                        up: "up";
                        down: "down";
                    }>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                billing_scheme: z.ZodLiteral<"tiered">;
                tiers_mode: z.ZodEnum<{
                    graduated: "graduated";
                    volume: "volume";
                }>;
                tiers: z.ZodArray<z.ZodObject<{
                    up_to: z.ZodNullable<z.ZodNumber>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>], "billing_scheme">>;
        }, z.core.$strict>;
        quantity: z.ZodNumber;
        trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
    }, z.core.$strict>>;
    items_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    recurrence: z.ZodOptional<z.ZodObject<{
        billing_cycle_anchor_at: z.ZodISODateTime;
        proration_behavior: z.ZodEnum<{
            none: "none";
            create_prorations: "create_prorations";
            always_invoice: "always_invoice";
        }>;
        billing_mode: z.ZodOptional<z.ZodEnum<{
            classic: "classic";
            flexible: "flexible";
        }>>;
        collection_method: z.ZodEnum<{
            charge_automatically: "charge_automatically";
            send_invoice: "send_invoice";
        }>;
        days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    subscription_id: z.ZodString;
    status_after: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    next_effective_at: z.ZodNullable<z.ZodISODateTime>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"trial_convert">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    trial_start_at: z.ZodISODateTime;
    trial_end_at: z.ZodISODateTime;
    subscription_id: z.ZodString;
    status_after: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"trial_expire">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    target_occurrence_key: z.ZodString;
    subscription_id: z.ZodString;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"retract">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    target_occurrence_key: z.ZodString;
    items: z.ZodArray<z.ZodObject<{
        item_id: z.ZodString;
        price: z.ZodObject<{
            price_id: z.ZodString;
            product_id: z.ZodOptional<z.ZodString>;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
            usage_type: z.ZodEnum<{
                metered: "metered";
                licensed: "licensed";
            }>;
            unit_amount_minor: z.ZodNullable<z.ZodString>;
            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                billing_scheme: z.ZodLiteral<"per_unit">;
                unit_amount_decimal: z.ZodString;
                transform_quantity: z.ZodNullable<z.ZodObject<{
                    divide_by: z.ZodNumber;
                    round: z.ZodEnum<{
                        up: "up";
                        down: "down";
                    }>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                billing_scheme: z.ZodLiteral<"tiered">;
                tiers_mode: z.ZodEnum<{
                    graduated: "graduated";
                    volume: "volume";
                }>;
                tiers: z.ZodArray<z.ZodObject<{
                    up_to: z.ZodNullable<z.ZodNumber>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>], "billing_scheme">>;
        }, z.core.$strict>;
        quantity: z.ZodNumber;
        trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
    }, z.core.$strict>>;
    items_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    recurrence: z.ZodOptional<z.ZodObject<{
        billing_cycle_anchor_at: z.ZodISODateTime;
        proration_behavior: z.ZodEnum<{
            none: "none";
            create_prorations: "create_prorations";
            always_invoice: "always_invoice";
        }>;
        billing_mode: z.ZodOptional<z.ZodEnum<{
            classic: "classic";
            flexible: "flexible";
        }>>;
        collection_method: z.ZodEnum<{
            charge_automatically: "charge_automatically";
            send_invoice: "send_invoice";
        }>;
        days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    subscription_id: z.ZodString;
    status_after: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    next_effective_at: z.ZodNullable<z.ZodISODateTime>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"subscription">;
    kind: z.ZodLiteral<"correct">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>], "kind">, z.ZodDiscriminatedUnion<[z.ZodObject<{
    schedule_id: z.ZodString;
    subscription_id: z.ZodNullable<z.ZodString>;
    phase_context: z.ZodDiscriminatedUnion<[z.ZodObject<{
        coverage: z.ZodLiteral<"unknown">;
        reason: z.ZodEnum<{
            not_hydrated: "not_hydrated";
            unavailable_history: "unavailable_history";
            provider_failure: "provider_failure";
        }>;
    }, z.core.$strict>, z.ZodObject<{
        coverage: z.ZodLiteral<"known">;
        phase_index: z.ZodNumber;
        phase_start_at: z.ZodISODateTime;
        phase_end_at: z.ZodNullable<z.ZodISODateTime>;
    }, z.core.$strict>], "coverage">;
    source_evidence: z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>;
    }, z.core.$strict>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"schedule">;
    kind: z.ZodLiteral<"source_observed">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    items: z.ZodArray<z.ZodObject<{
        item_id: z.ZodString;
        price: z.ZodObject<{
            price_id: z.ZodString;
            product_id: z.ZodOptional<z.ZodString>;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
            usage_type: z.ZodEnum<{
                metered: "metered";
                licensed: "licensed";
            }>;
            unit_amount_minor: z.ZodNullable<z.ZodString>;
            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                billing_scheme: z.ZodLiteral<"per_unit">;
                unit_amount_decimal: z.ZodString;
                transform_quantity: z.ZodNullable<z.ZodObject<{
                    divide_by: z.ZodNumber;
                    round: z.ZodEnum<{
                        up: "up";
                        down: "down";
                    }>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                billing_scheme: z.ZodLiteral<"tiered">;
                tiers_mode: z.ZodEnum<{
                    graduated: "graduated";
                    volume: "volume";
                }>;
                tiers: z.ZodArray<z.ZodObject<{
                    up_to: z.ZodNullable<z.ZodNumber>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>], "billing_scheme">>;
        }, z.core.$strict>;
        quantity: z.ZodNumber;
        trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
    }, z.core.$strict>>;
    observed_through: z.ZodISODateTime;
    phases_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    recurrence: z.ZodOptional<z.ZodObject<{
        billing_cycle_anchor_at: z.ZodISODateTime;
        proration_behavior: z.ZodEnum<{
            none: "none";
            create_prorations: "create_prorations";
            always_invoice: "always_invoice";
        }>;
        billing_mode: z.ZodOptional<z.ZodEnum<{
            classic: "classic";
            flexible: "flexible";
        }>>;
        collection_method: z.ZodEnum<{
            charge_automatically: "charge_automatically";
            send_invoice: "send_invoice";
        }>;
        days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    schedule_id: z.ZodString;
    subscription_id: z.ZodNullable<z.ZodString>;
    phase_index: z.ZodNumber;
    phase_start_at: z.ZodISODateTime;
    phase_end_at: z.ZodNullable<z.ZodISODateTime>;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"schedule">;
    kind: z.ZodLiteral<"phase_declared">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    subscription_id: z.ZodString;
    cancel_effective_at: z.ZodISODateTime;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"schedule">;
    kind: z.ZodLiteral<"cancellation_scheduled">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    target_occurrence_key: z.ZodString;
    subscription_id: z.ZodString;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"schedule">;
    kind: z.ZodLiteral<"cancellation_withdrawn">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    target_occurrence_key: z.ZodString;
    schedule_id: z.ZodString;
    source_evidence: z.ZodOptional<z.ZodObject<{
        items: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>;
        phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">>;
        components: z.ZodOptional<z.ZodArray<z.ZodObject<{
            identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"subscription_item">;
                item_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"schedule_component">;
                phase_occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                position: z.ZodNumber;
                component_key: z.ZodString;
            }, z.core.$strict>], "kind">;
            quantity: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodOptional<z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>>;
        }, z.core.$strict>>>;
    }, z.core.$strict>>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"schedule">;
    kind: z.ZodLiteral<"retract">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>], "kind">, z.ZodDiscriminatedUnion<[z.ZodObject<{
    invoice_id: z.ZodString;
    source_evidence: z.ZodObject<{
        header: z.ZodObject<{
            created_at: z.ZodNullable<z.ZodISODateTime>;
            due_at: z.ZodNullable<z.ZodISODateTime>;
            finalized_at: z.ZodNullable<z.ZodISODateTime>;
            paid_at: z.ZodNullable<z.ZodISODateTime>;
            voided_at: z.ZodNullable<z.ZodISODateTime>;
            marked_uncollectible_at: z.ZodNullable<z.ZodISODateTime>;
            subtotal_minor: z.ZodNullable<z.ZodString>;
            subtotal_excluding_tax_minor: z.ZodNullable<z.ZodString>;
            total_minor: z.ZodNullable<z.ZodString>;
            total_excluding_tax_minor: z.ZodNullable<z.ZodString>;
            amount_due_minor: z.ZodNullable<z.ZodString>;
            amount_paid_minor: z.ZodNullable<z.ZodString>;
            amount_remaining_minor: z.ZodNullable<z.ZodString>;
            amount_overpaid_minor: z.ZodNullable<z.ZodString>;
            starting_balance_minor: z.ZodNullable<z.ZodString>;
            ending_balance_minor: z.ZodNullable<z.ZodString>;
            pre_payment_credit_notes_amount_minor: z.ZodNullable<z.ZodString>;
            post_payment_credit_notes_amount_minor: z.ZodNullable<z.ZodString>;
            taxes: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                data: z.ZodArray<z.ZodObject<{
                    amount_minor: z.ZodNullable<z.ZodString>;
                    tax_behavior: z.ZodNullable<z.ZodEnum<{
                        inclusive: "inclusive";
                        exclusive: "exclusive";
                    }>>;
                    tax_rate_id: z.ZodNullable<z.ZodString>;
                    taxable_amount_minor: z.ZodNullable<z.ZodString>;
                    taxability_reason: z.ZodNullable<z.ZodEnum<{
                        customer_exempt: "customer_exempt";
                        not_available: "not_available";
                        not_collecting: "not_collecting";
                        not_subject_to_tax: "not_subject_to_tax";
                        not_supported: "not_supported";
                        portion_product_exempt: "portion_product_exempt";
                        portion_reduced_rated: "portion_reduced_rated";
                        portion_standard_rated: "portion_standard_rated";
                        product_exempt: "product_exempt";
                        product_exempt_holiday: "product_exempt_holiday";
                        proportionally_rated: "proportionally_rated";
                        reduced_rated: "reduced_rated";
                        reverse_charge: "reverse_charge";
                        standard_rated: "standard_rated";
                        taxable_basis_reduced: "taxable_basis_reduced";
                        zero_rated: "zero_rated";
                    }>>;
                }, z.core.$strict>>;
            }, z.core.$strict>;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                data: z.ZodArray<z.ZodObject<{
                    discount_id: z.ZodString;
                    amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>;
            pretax_credits: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                data: z.ZodArray<z.ZodObject<{
                    type: z.ZodEnum<{
                        discount: "discount";
                        credit_balance_transaction: "credit_balance_transaction";
                    }>;
                    reference_id: z.ZodString;
                    amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            api_version: z.ZodNullable<z.ZodString>;
            subscription_id: z.ZodNullable<z.ZodString>;
            status: z.ZodNullable<z.ZodEnum<{
                void: "void";
                paid: "paid";
                draft: "draft";
                open: "open";
                uncollectible: "uncollectible";
            }>>;
            previous_status: z.ZodNullable<z.ZodEnum<{
                void: "void";
                paid: "paid";
                draft: "draft";
                open: "open";
                uncollectible: "uncollectible";
            }>>;
            collection_method: z.ZodNullable<z.ZodEnum<{
                charge_automatically: "charge_automatically";
                send_invoice: "send_invoice";
            }>>;
        }, z.core.$strict>;
        lines: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            data: z.ZodArray<z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                subtotal_minor: z.ZodNullable<z.ZodString>;
                quantity: z.ZodNullable<z.ZodNumber>;
                quantity_decimal: z.ZodNullable<z.ZodString>;
                period_start_at: z.ZodNullable<z.ZodISODateTime>;
                period_end_at: z.ZodNullable<z.ZodISODateTime>;
                parent: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    proration: z.ZodNullable<z.ZodBoolean>;
                    credited_items: z.ZodNullable<z.ZodObject<{
                        invoice_id: z.ZodString;
                        invoice_line_ids: z.ZodArray<z.ZodString>;
                    }, z.core.$strict>>;
                    type: z.ZodLiteral<"invoice_item_details">;
                    invoice_item_id: z.ZodNullable<z.ZodString>;
                    subscription_id: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>, z.ZodObject<{
                    proration: z.ZodNullable<z.ZodBoolean>;
                    credited_items: z.ZodNullable<z.ZodObject<{
                        invoice_id: z.ZodString;
                        invoice_line_ids: z.ZodArray<z.ZodString>;
                    }, z.core.$strict>>;
                    type: z.ZodLiteral<"subscription_item_details">;
                    subscription_item_id: z.ZodNullable<z.ZodString>;
                    invoice_item_id: z.ZodNullable<z.ZodString>;
                    subscription_id: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>], "type">>;
                pricing: z.ZodNullable<z.ZodObject<{
                    type: z.ZodLiteral<"price_details">;
                    price_id: z.ZodNullable<z.ZodString>;
                    product_id: z.ZodNullable<z.ZodString>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discountable: z.ZodNullable<z.ZodBoolean>;
                discounts: z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    data: z.ZodArray<z.ZodObject<{
                        discount_id: z.ZodString;
                        amount_minor: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>;
                taxes: z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    data: z.ZodArray<z.ZodObject<{
                        amount_minor: z.ZodNullable<z.ZodString>;
                        tax_behavior: z.ZodNullable<z.ZodEnum<{
                            inclusive: "inclusive";
                            exclusive: "exclusive";
                        }>>;
                        tax_rate_id: z.ZodNullable<z.ZodString>;
                        taxable_amount_minor: z.ZodNullable<z.ZodString>;
                        taxability_reason: z.ZodNullable<z.ZodEnum<{
                            customer_exempt: "customer_exempt";
                            not_available: "not_available";
                            not_collecting: "not_collecting";
                            not_subject_to_tax: "not_subject_to_tax";
                            not_supported: "not_supported";
                            portion_product_exempt: "portion_product_exempt";
                            portion_reduced_rated: "portion_reduced_rated";
                            portion_standard_rated: "portion_standard_rated";
                            product_exempt: "product_exempt";
                            product_exempt_holiday: "product_exempt_holiday";
                            proportionally_rated: "proportionally_rated";
                            reduced_rated: "reduced_rated";
                            reverse_charge: "reverse_charge";
                            standard_rated: "standard_rated";
                            taxable_basis_reduced: "taxable_basis_reduced";
                            zero_rated: "zero_rated";
                        }>>;
                    }, z.core.$strict>>;
                }, z.core.$strict>;
                pretax_credits: z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    data: z.ZodArray<z.ZodObject<{
                        type: z.ZodEnum<{
                            discount: "discount";
                            credit_balance_transaction: "credit_balance_transaction";
                        }>;
                        reference_id: z.ZodString;
                        amount_minor: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
                line_id: z.ZodString;
                invoice_id: z.ZodString;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>>;
            pages_fetched: z.ZodNumber;
            has_more: z.ZodNullable<z.ZodBoolean>;
            next_cursor: z.ZodNullable<z.ZodString>;
            total_count: z.ZodNullable<z.ZodNumber>;
        }, z.core.$strict>;
        payments: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            data: z.ZodArray<z.ZodObject<{
                amount_requested_minor: z.ZodNullable<z.ZodString>;
                amount_paid_minor: z.ZodNullable<z.ZodString>;
                created_at: z.ZodNullable<z.ZodISODateTime>;
                paid_at: z.ZodNullable<z.ZodISODateTime>;
                canceled_at: z.ZodNullable<z.ZodISODateTime>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
                invoice_payment_id: z.ZodString;
                invoice_id: z.ZodString;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    type: z.ZodLiteral<"payment_intent">;
                    payment_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    type: z.ZodLiteral<"charge">;
                    payment_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    type: z.ZodLiteral<"payment_record">;
                    payment_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    type: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>], "type">;
                status: z.ZodNullable<z.ZodEnum<{
                    canceled: "canceled";
                    paid: "paid";
                    open: "open";
                }>>;
                is_default: z.ZodNullable<z.ZodBoolean>;
            }, z.core.$strict>>;
            pages_fetched: z.ZodNumber;
            has_more: z.ZodNullable<z.ZodBoolean>;
            next_cursor: z.ZodNullable<z.ZodString>;
            total_count: z.ZodNullable<z.ZodNumber>;
        }, z.core.$strict>;
        event_payment: z.ZodOptional<z.ZodObject<{
            amount_requested_minor: z.ZodNullable<z.ZodString>;
            amount_paid_minor: z.ZodNullable<z.ZodString>;
            created_at: z.ZodNullable<z.ZodISODateTime>;
            paid_at: z.ZodNullable<z.ZodISODateTime>;
            canceled_at: z.ZodNullable<z.ZodISODateTime>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
            invoice_payment_id: z.ZodString;
            invoice_id: z.ZodString;
            payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
                type: z.ZodLiteral<"payment_intent">;
                payment_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"charge">;
                payment_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"payment_record">;
                payment_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>], "type">;
            status: z.ZodNullable<z.ZodEnum<{
                canceled: "canceled";
                paid: "paid";
                open: "open";
            }>>;
            is_default: z.ZodNullable<z.ZodBoolean>;
            provenance: z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>;
        }, z.core.$strict>>;
    }, z.core.$strict>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"invoice">;
    kind: z.ZodLiteral<"source_observed">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    total_minor: z.ZodString;
    amount_due_minor: z.ZodString;
    due_at: z.ZodNullable<z.ZodISODateTime>;
    line_count: z.ZodNumber;
    lines_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    payment_count: z.ZodOptional<z.ZodNumber>;
    payments_coverage: z.ZodOptional<z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    invoice_id: z.ZodString;
    subscription_id: z.ZodNullable<z.ZodString>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"invoice">;
    kind: z.ZodLiteral<"finalized">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    subtotal_minor: z.ZodString;
    discount_minor: z.ZodString;
    tax_minor: z.ZodString;
    total_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    subscription_id: z.ZodString;
    subscription_item_id: z.ZodString;
    price: z.ZodObject<{
        price_id: z.ZodString;
        product_id: z.ZodOptional<z.ZodString>;
        interval: z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            year: "year";
        }>;
        interval_count: z.ZodNumber;
        usage_type: z.ZodEnum<{
            metered: "metered";
            licensed: "licensed";
        }>;
        unit_amount_minor: z.ZodNullable<z.ZodString>;
        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            billing_scheme: z.ZodLiteral<"per_unit">;
            unit_amount_decimal: z.ZodString;
            transform_quantity: z.ZodNullable<z.ZodObject<{
                divide_by: z.ZodNumber;
                round: z.ZodEnum<{
                    up: "up";
                    down: "down";
                }>;
            }, z.core.$strict>>;
        }, z.core.$strict>, z.ZodObject<{
            billing_scheme: z.ZodLiteral<"tiered">;
            tiers_mode: z.ZodEnum<{
                graduated: "graduated";
                volume: "volume";
            }>;
            tiers: z.ZodArray<z.ZodObject<{
                up_to: z.ZodNullable<z.ZodNumber>;
                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                flat_amount_minor: z.ZodNullable<z.ZodString>;
            }, z.core.$strict>>;
        }, z.core.$strict>], "billing_scheme">>;
    }, z.core.$strict>;
    quantity: z.ZodNumber;
    service_period_start_at: z.ZodISODateTime;
    service_period_end_at: z.ZodISODateTime;
    proration: z.ZodBoolean;
    invoice_id: z.ZodString;
    line_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"invoice">;
    kind: z.ZodLiteral<"recurring_line">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    subtotal_minor: z.ZodString;
    discount_minor: z.ZodString;
    tax_minor: z.ZodString;
    total_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    trial_start_at: z.ZodISODateTime;
    trial_end_at: z.ZodISODateTime;
    subscription_id: z.ZodString;
    subscription_item_id: z.ZodString;
    invoice_id: z.ZodString;
    line_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"invoice">;
    kind: z.ZodLiteral<"trial_line">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    subtotal_minor: z.ZodString;
    discount_minor: z.ZodString;
    tax_minor: z.ZodString;
    total_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    price_id: z.ZodNullable<z.ZodString>;
    quantity: z.ZodNumber;
    invoice_id: z.ZodString;
    line_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"invoice">;
    kind: z.ZodLiteral<"one_time_line">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    economic_owner: z.ZodOptional<z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>>;
    amount_requested_minor: z.ZodString;
    amount_paid_minor: z.ZodNullable<z.ZodString>;
    paid_at: z.ZodNullable<z.ZodISODateTime>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    invoice_payment_id: z.ZodString;
    invoice_id: z.ZodString;
    payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
        type: z.ZodLiteral<"payment_intent">;
        payment_id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"charge">;
        payment_id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"out_of_band">;
    }, z.core.$strict>], "type">;
    status: z.ZodEnum<{
        canceled: "canceled";
        paid: "paid";
        open: "open";
    }>;
    is_default: z.ZodOptional<z.ZodBoolean>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"invoice">;
    kind: z.ZodLiteral<"payment_allocation">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    amount_due_minor: z.ZodString;
    amount_paid_minor: z.ZodString;
    amount_remaining_minor: z.ZodString;
    due_at: z.ZodNullable<z.ZodISODateTime>;
    paid_out_of_band: z.ZodBoolean;
    settlement_basis: z.ZodNullable<z.ZodEnum<{
        mixed: "mixed";
        customer_balance: "customer_balance";
        credit_note: "credit_note";
        rollover: "rollover";
        payments: "payments";
        out_of_band: "out_of_band";
        zero_total: "zero_total";
    }>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    invoice_id: z.ZodString;
    subscription_id: z.ZodNullable<z.ZodString>;
    from_status: z.ZodEnum<{
        void: "void";
        paid: "paid";
        draft: "draft";
        open: "open";
        uncollectible: "uncollectible";
    }>;
    to_status: z.ZodEnum<{
        void: "void";
        paid: "paid";
        draft: "draft";
        open: "open";
        uncollectible: "uncollectible";
    }>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"invoice">;
    kind: z.ZodLiteral<"status_transition">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>], "kind">, z.ZodDiscriminatedUnion<[z.ZodObject<{
    occurrence: z.ZodObject<{
        source_occurrence_ref: z.ZodString;
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodNullable<z.ZodString>;
    observed_object_type: z.ZodEnum<{
        charge: "charge";
        payment_intent: "payment_intent";
        payment_record: "payment_record";
    }>;
    observed_object_id: z.ZodString;
    source_evidence: z.ZodObject<{
        header: z.ZodDiscriminatedUnion<[z.ZodObject<{
            amount_requested_minor: z.ZodNullable<z.ZodString>;
            amount_received_minor: z.ZodNullable<z.ZodString>;
            amount_capturable_minor: z.ZodNullable<z.ZodString>;
            status: z.ZodNullable<z.ZodEnum<{
                canceled: "canceled";
                succeeded: "succeeded";
                requires_payment_method: "requires_payment_method";
                requires_confirmation: "requires_confirmation";
                requires_action: "requires_action";
                processing: "processing";
                requires_capture: "requires_capture";
            }>>;
            capture_method: z.ZodNullable<z.ZodEnum<{
                automatic: "automatic";
                automatic_async: "automatic_async";
                manual: "manual";
            }>>;
            canceled_at: z.ZodNullable<z.ZodISODateTime>;
            cancellation_reason: z.ZodNullable<z.ZodEnum<{
                duplicate: "duplicate";
                expired: "expired";
                fraudulent: "fraudulent";
                automatic: "automatic";
                abandoned: "abandoned";
                failed_invoice: "failed_invoice";
                requested_by_customer: "requested_by_customer";
                void_invoice: "void_invoice";
            }>>;
            latest_charge_id: z.ZodNullable<z.ZodString>;
            on_behalf_of: z.ZodNullable<z.ZodString>;
            transfer_destination: z.ZodNullable<z.ZodString>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
            object_type: z.ZodLiteral<"payment_intent">;
            object_id: z.ZodString;
            customer_ref: z.ZodNullable<z.ZodString>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            api_version: z.ZodNullable<z.ZodString>;
            created_at: z.ZodNullable<z.ZodISODateTime>;
            gaps: z.ZodArray<z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>>;
        }, z.core.$strict>, z.ZodObject<{
            amount_minor: z.ZodNullable<z.ZodString>;
            amount_captured_minor: z.ZodNullable<z.ZodString>;
            amount_refunded_minor: z.ZodNullable<z.ZodString>;
            paid: z.ZodNullable<z.ZodBoolean>;
            captured: z.ZodNullable<z.ZodBoolean>;
            refunded: z.ZodNullable<z.ZodBoolean>;
            disputed: z.ZodNullable<z.ZodBoolean>;
            status: z.ZodNullable<z.ZodEnum<{
                pending: "pending";
                succeeded: "succeeded";
                failed: "failed";
            }>>;
            payment_intent_id: z.ZodNullable<z.ZodString>;
            balance_transaction_id: z.ZodNullable<z.ZodString>;
            failure_balance_transaction_id: z.ZodNullable<z.ZodString>;
            source_transfer_id: z.ZodNullable<z.ZodString>;
            on_behalf_of: z.ZodNullable<z.ZodString>;
            transfer_destination: z.ZodNullable<z.ZodString>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
            object_type: z.ZodLiteral<"charge">;
            object_id: z.ZodString;
            customer_ref: z.ZodNullable<z.ZodString>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            api_version: z.ZodNullable<z.ZodString>;
            created_at: z.ZodNullable<z.ZodISODateTime>;
            gaps: z.ZodArray<z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>>;
        }, z.core.$strict>, z.ZodObject<{
            object_type: z.ZodLiteral<"payment_record">;
            amount: z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
            }, z.core.$strict>;
            amount_requested: z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
            }, z.core.$strict>;
            amount_authorized: z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
            }, z.core.$strict>;
            amount_canceled: z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
            }, z.core.$strict>;
            amount_failed: z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
            }, z.core.$strict>;
            amount_guaranteed: z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
            }, z.core.$strict>;
            amount_refunded: z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
            }, z.core.$strict>;
            application_id: z.ZodNullable<z.ZodString>;
            latest_payment_attempt_record_id: z.ZodNullable<z.ZodString>;
            reported_by: z.ZodNullable<z.ZodEnum<{
                stripe: "stripe";
                self: "self";
            }>>;
            processor_type: z.ZodNullable<z.ZodLiteral<"custom">>;
            object_id: z.ZodString;
            customer_ref: z.ZodNullable<z.ZodString>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            api_version: z.ZodNullable<z.ZodString>;
            created_at: z.ZodNullable<z.ZodISODateTime>;
            gaps: z.ZodArray<z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>>;
        }, z.core.$strict>], "object_type">;
        linked_charge: z.ZodOptional<z.ZodObject<{
            amount_minor: z.ZodNullable<z.ZodString>;
            amount_captured_minor: z.ZodNullable<z.ZodString>;
            amount_refunded_minor: z.ZodNullable<z.ZodString>;
            paid: z.ZodNullable<z.ZodBoolean>;
            captured: z.ZodNullable<z.ZodBoolean>;
            refunded: z.ZodNullable<z.ZodBoolean>;
            disputed: z.ZodNullable<z.ZodBoolean>;
            status: z.ZodNullable<z.ZodEnum<{
                pending: "pending";
                succeeded: "succeeded";
                failed: "failed";
            }>>;
            payment_intent_id: z.ZodNullable<z.ZodString>;
            balance_transaction_id: z.ZodNullable<z.ZodString>;
            failure_balance_transaction_id: z.ZodNullable<z.ZodString>;
            source_transfer_id: z.ZodNullable<z.ZodString>;
            on_behalf_of: z.ZodNullable<z.ZodString>;
            transfer_destination: z.ZodNullable<z.ZodString>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
            object_type: z.ZodLiteral<"charge">;
            object_id: z.ZodString;
            customer_ref: z.ZodNullable<z.ZodString>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            api_version: z.ZodNullable<z.ZodString>;
            created_at: z.ZodNullable<z.ZodISODateTime>;
            gaps: z.ZodArray<z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>>;
        }, z.core.$strict>>;
        allocations: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            data: z.ZodArray<z.ZodObject<{
                amount_requested_minor: z.ZodNullable<z.ZodString>;
                amount_paid_minor: z.ZodNullable<z.ZodString>;
                created_at: z.ZodNullable<z.ZodISODateTime>;
                paid_at: z.ZodNullable<z.ZodISODateTime>;
                canceled_at: z.ZodNullable<z.ZodISODateTime>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
                invoice_payment_id: z.ZodString;
                invoice_id: z.ZodString;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    type: z.ZodLiteral<"payment_intent">;
                    payment_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    type: z.ZodLiteral<"charge">;
                    payment_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    type: z.ZodLiteral<"payment_record">;
                    payment_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    type: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>], "type">;
                status: z.ZodNullable<z.ZodEnum<{
                    canceled: "canceled";
                    paid: "paid";
                    open: "open";
                }>>;
                is_default: z.ZodNullable<z.ZodBoolean>;
            }, z.core.$strict>>;
            pages_fetched: z.ZodNumber;
            has_more: z.ZodNullable<z.ZodBoolean>;
            next_cursor: z.ZodNullable<z.ZodString>;
            total_count: z.ZodNullable<z.ZodNumber>;
            subject: z.ZodObject<{
                type: z.ZodEnum<{
                    charge: "charge";
                    payment_intent: "payment_intent";
                    payment_record: "payment_record";
                }>;
                id: z.ZodString;
            }, z.core.$strict>;
        }, z.core.$strict>;
    }, z.core.$strict>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"transaction">;
    kind: z.ZodLiteral<"source_observed">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
}, z.core.$strict>, z.ZodObject<{
    amount_captured_minor: z.ZodString;
    amount_requested_minor: z.ZodOptional<z.ZodString>;
    allocations_coverage: z.ZodOptional<z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>>;
    economic_owner: z.ZodOptional<z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    payment_id: z.ZodString;
    observed_object_type: z.ZodEnum<{
        invoice: "invoice";
        charge: "charge";
        payment_intent: "payment_intent";
        invoice_payment: "invoice_payment";
        checkout_session: "checkout_session";
    }>;
    observed_object_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"transaction">;
    kind: z.ZodLiteral<"payment_captured">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    amount_requested_minor: z.ZodString;
    failure_code: z.ZodString;
    economic_owner: z.ZodOptional<z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    payment_id: z.ZodString;
    observed_object_type: z.ZodEnum<{
        invoice: "invoice";
        charge: "charge";
        payment_intent: "payment_intent";
        invoice_payment: "invoice_payment";
        checkout_session: "checkout_session";
    }>;
    observed_object_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"transaction">;
    kind: z.ZodLiteral<"payment_failed">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    amount_requested_minor: z.ZodString;
    economic_owner: z.ZodOptional<z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    payment_id: z.ZodString;
    observed_object_type: z.ZodEnum<{
        invoice: "invoice";
        charge: "charge";
        payment_intent: "payment_intent";
        invoice_payment: "invoice_payment";
        checkout_session: "checkout_session";
    }>;
    observed_object_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"transaction">;
    kind: z.ZodLiteral<"payment_pending">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    amount_requested_minor: z.ZodString;
    economic_owner: z.ZodOptional<z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    payment_id: z.ZodString;
    observed_object_type: z.ZodEnum<{
        invoice: "invoice";
        charge: "charge";
        payment_intent: "payment_intent";
        invoice_payment: "invoice_payment";
        checkout_session: "checkout_session";
    }>;
    observed_object_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"transaction">;
    kind: z.ZodLiteral<"payment_canceled">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>], "kind">, z.ZodDiscriminatedUnion<[z.ZodObject<{
    economic_owner: z.ZodOptional<z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>>;
    amount_minor: z.ZodString;
    reason: z.ZodNullable<z.ZodEnum<{
        duplicate: "duplicate";
        other: "other";
        fraudulent: "fraudulent";
        requested_by_customer: "requested_by_customer";
        expired_uncaptured_charge: "expired_uncaptured_charge";
    }>>;
    credit_note_id: z.ZodNullable<z.ZodString>;
    allocations: z.ZodArray<z.ZodObject<{
        principal_minor: z.ZodOptional<z.ZodString>;
        tax_minor: z.ZodOptional<z.ZodString>;
        allocation_id: z.ZodString;
        invoice_id: z.ZodString;
        invoice_line_id: z.ZodNullable<z.ZodString>;
        amount_minor: z.ZodString;
    }, z.core.$strict>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    refund_id: z.ZodString;
    payment_id: z.ZodString;
    balance_transaction_id: z.ZodOptional<z.ZodString>;
    status: z.ZodEnum<{
        canceled: "canceled";
        pending: "pending";
        succeeded: "succeeded";
        failed: "failed";
        requires_action: "requires_action";
    }>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"refund">;
    kind: z.ZodLiteral<"refund">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    amount_refunded_cumulative_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    payment_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"refund">;
    kind: z.ZodLiteral<"refund_total_observed">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>], "kind">, z.ZodDiscriminatedUnion<[z.ZodObject<{
    total_minor: z.ZodString;
    reason: z.ZodNullable<z.ZodEnum<{
        duplicate: "duplicate";
        other: "other";
        fraudulent: "fraudulent";
        order_change: "order_change";
        product_unsatisfactory: "product_unsatisfactory";
    }>>;
    lines: z.ZodArray<z.ZodObject<{
        principal_minor: z.ZodOptional<z.ZodString>;
        tax_minor: z.ZodOptional<z.ZodString>;
        credit_line_id: z.ZodString;
        invoice_line_id: z.ZodNullable<z.ZodString>;
        amount_minor: z.ZodString;
    }, z.core.$strict>>;
    lines_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    credit_note_id: z.ZodString;
    invoice_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"credit">;
    kind: z.ZodLiteral<"issued_pre_payment">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    settlements: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
        method: z.ZodLiteral<"refund">;
        refund_id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        method: z.ZodLiteral<"customer_balance">;
        balance_transaction_id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        method: z.ZodLiteral<"out_of_band">;
        out_of_band_amount_minor: z.ZodString;
    }, z.core.$strict>], "method">>;
    total_minor: z.ZodString;
    reason: z.ZodNullable<z.ZodEnum<{
        duplicate: "duplicate";
        other: "other";
        fraudulent: "fraudulent";
        order_change: "order_change";
        product_unsatisfactory: "product_unsatisfactory";
    }>>;
    lines: z.ZodArray<z.ZodObject<{
        principal_minor: z.ZodOptional<z.ZodString>;
        tax_minor: z.ZodOptional<z.ZodString>;
        credit_line_id: z.ZodString;
        invoice_line_id: z.ZodNullable<z.ZodString>;
        amount_minor: z.ZodString;
    }, z.core.$strict>>;
    lines_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    credit_note_id: z.ZodString;
    invoice_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"credit">;
    kind: z.ZodLiteral<"issued_post_payment">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    credit_note_id: z.ZodString;
    invoice_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"credit">;
    kind: z.ZodLiteral<"voided">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>], "kind">, z.ZodDiscriminatedUnion<[z.ZodObject<{
    amount_minor: z.ZodString;
    balance_type: z.ZodEnum<{
        customer_balance: "customer_balance";
        invoice_credit_balance: "invoice_credit_balance";
    }>;
    invoice_id: z.ZodNullable<z.ZodString>;
    adjustment_source: z.ZodOptional<z.ZodEnum<{
        other: "other";
        invoice_applied: "invoice_applied";
        invoice_unapplied: "invoice_unapplied";
        credit_note: "credit_note";
        overpayment: "overpayment";
        rollover: "rollover";
        manual_adjustment: "manual_adjustment";
        migration: "migration";
    }>>;
    credit_note_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    balance_transaction_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"balance">;
    kind: z.ZodLiteral<"balance_adjusted">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    amount_minor: z.ZodString;
    expires_at: z.ZodNullable<z.ZodISODateTime>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    grant_id: z.ZodString;
    category: z.ZodEnum<{
        paid: "paid";
        promotional: "promotional";
    }>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"balance">;
    kind: z.ZodLiteral<"credit_grant_funded">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    invoice_id: z.ZodString;
    amount_minor: z.ZodString;
    funding_occurrence_key: z.ZodOptional<z.ZodString>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    grant_id: z.ZodString;
    category: z.ZodEnum<{
        paid: "paid";
        promotional: "promotional";
    }>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"balance">;
    kind: z.ZodLiteral<"credit_grant_applied">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    amount_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    grant_id: z.ZodString;
    category: z.ZodEnum<{
        paid: "paid";
        promotional: "promotional";
    }>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"balance">;
    kind: z.ZodLiteral<"credit_grant_expired">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>], "kind">, z.ZodDiscriminatedUnion<[z.ZodObject<{
    settlement_amount: z.ZodOptional<z.ZodObject<{
        amount_minor: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
    }, z.core.$strict>>;
    economic_owner: z.ZodOptional<z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>>;
    amount_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    dispute_id: z.ZodString;
    payment_id: z.ZodString;
    balance_transaction_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"loss">;
    kind: z.ZodLiteral<"dispute_funds_withdrawn">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    reverses_occurrence_key: z.ZodOptional<z.ZodString>;
    settlement_amount: z.ZodOptional<z.ZodObject<{
        amount_minor: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
    }, z.core.$strict>>;
    economic_owner: z.ZodOptional<z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>>;
    amount_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    dispute_id: z.ZodString;
    payment_id: z.ZodString;
    balance_transaction_id: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"loss">;
    kind: z.ZodLiteral<"dispute_funds_reinstated">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    dispute_id: z.ZodString;
    payment_id: z.ZodString;
    status: z.ZodEnum<{
        warning_needs_response: "warning_needs_response";
        warning_under_review: "warning_under_review";
        warning_closed: "warning_closed";
        needs_response: "needs_response";
        under_review: "under_review";
        won: "won";
        lost: "lost";
    }>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"loss">;
    kind: z.ZodLiteral<"dispute_status_changed">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    settlement_amount: z.ZodOptional<z.ZodObject<{
        amount_minor: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
    }, z.core.$strict>>;
    economic_owner: z.ZodOptional<z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>>;
    amount_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    return_id: z.ZodString;
    payment_id: z.ZodString;
    balance_transaction_id: z.ZodOptional<z.ZodString>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"loss">;
    kind: z.ZodLiteral<"payment_returned">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    economic_owner: z.ZodObject<{
        owner_account_id: z.ZodString;
        charge_type: z.ZodEnum<{
            platform: "platform";
            direct: "direct";
            destination: "destination";
            separate_charges_and_transfers: "separate_charges_and_transfers";
        }>;
        on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    }, z.core.$strict>;
    settlement_amount: z.ZodOptional<z.ZodObject<{
        amount_minor: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
    }, z.core.$strict>>;
    amount_minor: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    payment_id: z.ZodString;
    balance_transaction_id: z.ZodString;
    reverses_occurrence_key: z.ZodString;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    profile: z.ZodLiteral<"loss">;
    kind: z.ZodLiteral<"funds_recovered">;
    profile_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    occurrence: z.ZodObject<{
        identity_version: z.ZodLiteral<2>;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        delivery_id: z.ZodOptional<z.ZodString>;
        legacy_billing_ref: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
}, z.core.$strict>], "kind">], "profile">;
type BillingProfile$1 = z.infer<typeof BillingProfileSchema>;
interface BillingCoverageGap {
    occurrence_key: string;
    /** TASK-28 adds `payments` (InvoicePayment pages), `allocations` (a payment's edges) and `price_terms`. */
    field: 'items' | 'lines' | 'phases' | 'payments' | 'allocations' | 'price_terms' | 'discounts' | 'provenance';
    reason: 'partial_hydration' | 'missing_price_terms' | 'unknown_evidence' | 'unresolved_allocation' | 'current_snapshot_not_historical' | 'source_observation' | 'missing_quantity';
}
/**
 * Lists a profile declares partially hydrated, and prices whose exact terms
 * are missing. A gap is reported, never read as a smaller complete set or
 * as a `unit * quantity` guess.
 */
declare function billingProfileCoverageGaps(profile: BillingProfile$1): BillingCoverageGap[];
/**
 * Whether a money movement counts as a sale IN THE SCOPE THAT OBSERVED IT.
 * `owner` â€” the observing provider account owns it; `non_owner` â€” another
 * account does (a Connect transfer/destination view: never a second sale);
 * `unknown` â€” no ownership evidence, an explicit coverage gap.
 */
declare function billingEconomicOwnership(profile: BillingProfile$1): 'owner' | 'non_owner' | 'unknown';
/**
 * Reduce a stream of profile revisions to one entry per logical occurrence,
 * keeping the latest SOURCE revision â€” by `source_order` when both carry it,
 * else by `source_recorded_at`, never by arrival. A tie without order
 * evidence is reported, not resolved by a lexical id (plan 252: equal times
 * need hydration or repair).
 */
declare function collapseBillingRevisions(profiles: readonly BillingProfile$1[]): {
    occurrences: Map<string, BillingProfile$1>;
    ambiguous: string[];
};

/** Shared ordered discount contract used by normalization and retained evidence. */

/** Array order is application order, never sorted by kind or scope. A fixed
 * subscription discount requires authoritative allocations; no item receives
 * the entire subscription amount by inference. Allocations use cycle amounts,
 * so providers with mixed intervals must resolve those amounts first. */
declare const BillingRecurringDiscountSchema: z.ZodObject<{
    discount_id: z.ZodString;
    recurrence: z.ZodEnum<{
        recurring: "recurring";
        invoice_only: "invoice_only";
    }>;
    item_id: z.ZodNullable<z.ZodString>;
    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
    starts_at: z.ZodISODateTime;
    ends_at: z.ZodNullable<z.ZodISODateTime>;
    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"percentage">;
        percent: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"fixed">;
        amount_minor: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
            item_id: z.ZodString;
            amount_minor: z.ZodString;
        }, z.core.$strict>>>;
        allocations_coverage: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
    }, z.core.$strict>], "kind">;
}, z.core.$strict>;
/** Coupon face terms are not authoritative applied recurring allocations. */
declare const BillingRecurringDiscountTermsSchema: z.ZodObject<{
    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"percentage">;
        percent: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"fixed">;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        amount_minor: z.ZodString;
    }, z.core.$strict>], "kind">;
    discount_id: z.ZodString;
    recurrence: z.ZodEnum<{
        recurring: "recurring";
        invoice_only: "invoice_only";
    }>;
    item_id: z.ZodNullable<z.ZodString>;
    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
    starts_at: z.ZodISODateTime;
    ends_at: z.ZodNullable<z.ZodISODateTime>;
}, z.core.$strict>;

/** Exact recurring normalization inputs (RM-0264 TASK-29). Transient evidence,
 * not a current-state table and not invoice/proration settlement economics. */

declare const BillingRecurringNormalizationItemSchema: z.ZodObject<{
    item_id: z.ZodString;
    price: z.ZodObject<{
        price_id: z.ZodString;
        product_id: z.ZodOptional<z.ZodString>;
        interval: z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            year: "year";
        }>;
        interval_count: z.ZodNumber;
        usage_type: z.ZodEnum<{
            metered: "metered";
            licensed: "licensed";
        }>;
        unit_amount_minor: z.ZodNullable<z.ZodString>;
        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            billing_scheme: z.ZodLiteral<"per_unit">;
            unit_amount_decimal: z.ZodString;
            transform_quantity: z.ZodNullable<z.ZodObject<{
                divide_by: z.ZodNumber;
                round: z.ZodEnum<{
                    up: "up";
                    down: "down";
                }>;
            }, z.core.$strict>>;
        }, z.core.$strict>, z.ZodObject<{
            billing_scheme: z.ZodLiteral<"tiered">;
            tiers_mode: z.ZodEnum<{
                graduated: "graduated";
                volume: "volume";
            }>;
            tiers: z.ZodArray<z.ZodObject<{
                up_to: z.ZodNullable<z.ZodNumber>;
                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                flat_amount_minor: z.ZodNullable<z.ZodString>;
            }, z.core.$strict>>;
        }, z.core.$strict>], "billing_scheme">>;
    }, z.core.$strict>;
    quantity: z.ZodNumber;
    trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
    item_state: z.ZodEnum<{
        present: "present";
        removed: "removed";
    }>;
    contract_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
        amount_minor: z.ZodString;
        embedded_discount_ids: z.ZodArray<z.ZodString>;
    }, z.core.$strict>>>;
    billed_usage: z.ZodOptional<z.ZodObject<{
        amount_minor: z.ZodString;
        includes_minimum: z.ZodBoolean;
    }, z.core.$strict>>;
}, z.core.$strict>;
/** A complete subscription at an explicit instant. The caller resolves
 * revisions/ownership before this pure price calculation. No invoice lines
 * enter this contract; one-time/prepaid charges are separate billed economics. */
declare const BillingRecurringNormalizationInputSchema: z.ZodObject<{
    at: z.ZodISODateTime;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    status: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    service_active_from: z.ZodISODateTime;
    service_ends_at: z.ZodNullable<z.ZodISODateTime>;
    collection_paused: z.ZodBoolean;
    items: z.ZodArray<z.ZodObject<{
        item_id: z.ZodString;
        price: z.ZodObject<{
            price_id: z.ZodString;
            product_id: z.ZodOptional<z.ZodString>;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
            usage_type: z.ZodEnum<{
                metered: "metered";
                licensed: "licensed";
            }>;
            unit_amount_minor: z.ZodNullable<z.ZodString>;
            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                billing_scheme: z.ZodLiteral<"per_unit">;
                unit_amount_decimal: z.ZodString;
                transform_quantity: z.ZodNullable<z.ZodObject<{
                    divide_by: z.ZodNumber;
                    round: z.ZodEnum<{
                        up: "up";
                        down: "down";
                    }>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                billing_scheme: z.ZodLiteral<"tiered">;
                tiers_mode: z.ZodEnum<{
                    graduated: "graduated";
                    volume: "volume";
                }>;
                tiers: z.ZodArray<z.ZodObject<{
                    up_to: z.ZodNullable<z.ZodNumber>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>], "billing_scheme">>;
        }, z.core.$strict>;
        quantity: z.ZodNumber;
        trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
        item_state: z.ZodEnum<{
            present: "present";
            removed: "removed";
        }>;
        contract_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
            amount_minor: z.ZodString;
            embedded_discount_ids: z.ZodArray<z.ZodString>;
        }, z.core.$strict>>>;
        billed_usage: z.ZodOptional<z.ZodObject<{
            amount_minor: z.ZodString;
            includes_minimum: z.ZodBoolean;
        }, z.core.$strict>>;
    }, z.core.$strict>>;
    items_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    discounts: z.ZodArray<z.ZodObject<{
        discount_id: z.ZodString;
        recurrence: z.ZodEnum<{
            recurring: "recurring";
            invoice_only: "invoice_only";
        }>;
        item_id: z.ZodNullable<z.ZodString>;
        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
        starts_at: z.ZodISODateTime;
        ends_at: z.ZodNullable<z.ZodISODateTime>;
        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"percentage">;
            percent: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"fixed">;
            amount_minor: z.ZodString;
            currency: z.ZodString;
            currency_exponent: z.ZodNumber;
            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                item_id: z.ZodString;
                amount_minor: z.ZodString;
            }, z.core.$strict>>>;
            allocations_coverage: z.ZodEnum<{
                partial: "partial";
                complete: "complete";
            }>;
        }, z.core.$strict>], "kind">;
    }, z.core.$strict>>;
    discounts_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
}, z.core.$strict>;

/** BL-0501 TASK-1. Private calculation evidence, not provider payloads or a
 * live producer attestation. Baseline completeness never means billing-ready. */

/** Absence is evidenced, not inferred from no fetched row. */
declare const ManagedActivationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    state: z.ZodLiteral<"known">;
    at: z.ZodISODateTime;
    tenant_id: z.ZodString;
    environment_id: z.ZodString;
    product_id: z.ZodString;
    deployment_reference: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    state: z.ZodLiteral<"absent">;
    evidence_reference: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    state: z.ZodLiteral<"unknown">;
    reason: z.ZodString;
}, z.core.$strict>], "state">;
declare const ManagedEvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    state: z.ZodLiteral<"known">;
    evidence_reference: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    state: z.ZodLiteral<"absent">;
    evidence_reference: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    state: z.ZodLiteral<"unknown">;
    reason: z.ZodString;
}, z.core.$strict>], "state">;
/** Complete effective-state subscription replacements from the existing
 * qualified history seam. No fabricated Stripe quote/replacement fields. */
declare const ManagedItemHistorySchema: z.ZodObject<{
    subscription_id: z.ZodString;
    revision: z.ZodObject<{
        revision_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        profile: z.ZodEnum<{
            subscription: "subscription";
            schedule: "schedule";
            invoice: "invoice";
            transaction: "transaction";
            refund: "refund";
            credit: "credit";
            balance: "balance";
            loss: "loss";
        }>;
        kind: z.ZodString;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        revision_key: z.ZodString;
        source_order: z.ZodNullable<z.ZodNumber>;
        supersedes_revision: z.ZodNullable<z.ZodString>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        economic_ownership: z.ZodEnum<{
            unknown: "unknown";
            owner: "owner";
            non_owner: "non_owner";
        }>;
        legacy_billing_ref: z.ZodNullable<z.ZodString>;
        fact_digest: z.ZodString;
    }, z.core.$strict>;
    normalization: z.ZodObject<{
        at: z.ZodISODateTime;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        status: z.ZodEnum<{
            active: "active";
            past_due: "past_due";
            canceled: "canceled";
            trialing: "trialing";
            unpaid: "unpaid";
            incomplete: "incomplete";
            incomplete_expired: "incomplete_expired";
            paused: "paused";
        }>;
        service_active_from: z.ZodISODateTime;
        service_ends_at: z.ZodNullable<z.ZodISODateTime>;
        collection_paused: z.ZodBoolean;
        items: z.ZodArray<z.ZodObject<{
            item_id: z.ZodString;
            price: z.ZodObject<{
                price_id: z.ZodString;
                product_id: z.ZodOptional<z.ZodString>;
                interval: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    year: "year";
                }>;
                interval_count: z.ZodNumber;
                usage_type: z.ZodEnum<{
                    metered: "metered";
                    licensed: "licensed";
                }>;
                unit_amount_minor: z.ZodNullable<z.ZodString>;
                terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"per_unit">;
                    unit_amount_decimal: z.ZodString;
                    transform_quantity: z.ZodNullable<z.ZodObject<{
                        divide_by: z.ZodNumber;
                        round: z.ZodEnum<{
                            up: "up";
                            down: "down";
                        }>;
                    }, z.core.$strict>>;
                }, z.core.$strict>, z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"tiered">;
                    tiers_mode: z.ZodEnum<{
                        graduated: "graduated";
                        volume: "volume";
                    }>;
                    tiers: z.ZodArray<z.ZodObject<{
                        up_to: z.ZodNullable<z.ZodNumber>;
                        unit_amount_decimal: z.ZodNullable<z.ZodString>;
                        flat_amount_minor: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>], "billing_scheme">>;
            }, z.core.$strict>;
            quantity: z.ZodNumber;
            trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
            item_state: z.ZodEnum<{
                present: "present";
                removed: "removed";
            }>;
            contract_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
                amount_minor: z.ZodString;
                embedded_discount_ids: z.ZodArray<z.ZodString>;
            }, z.core.$strict>>>;
            billed_usage: z.ZodOptional<z.ZodObject<{
                amount_minor: z.ZodString;
                includes_minimum: z.ZodBoolean;
            }, z.core.$strict>>;
        }, z.core.$strict>>;
        items_coverage: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
        discounts: z.ZodArray<z.ZodObject<{
            discount_id: z.ZodString;
            recurrence: z.ZodEnum<{
                recurring: "recurring";
                invoice_only: "invoice_only";
            }>;
            item_id: z.ZodNullable<z.ZodString>;
            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
            starts_at: z.ZodISODateTime;
            ends_at: z.ZodNullable<z.ZodISODateTime>;
            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"percentage">;
                percent: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"fixed">;
                amount_minor: z.ZodString;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                    item_id: z.ZodString;
                    amount_minor: z.ZodString;
                }, z.core.$strict>>>;
                allocations_coverage: z.ZodEnum<{
                    partial: "partial";
                    complete: "complete";
                }>;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>>;
        discounts_coverage: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
    }, z.core.$strict>;
}, z.core.$strict>;
declare const ManagedItemSubjectSchema: z.ZodObject<{
    subscription_id: z.ZodString;
    item_id: z.ZodString;
    creation: z.ZodDiscriminatedUnion<[z.ZodObject<{
        state: z.ZodLiteral<"known">;
        subscription_id: z.ZodString;
        item_id: z.ZodString;
        revision: z.ZodObject<{
            revision_version: z.ZodLiteral<1>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            profile: z.ZodEnum<{
                subscription: "subscription";
                schedule: "schedule";
                invoice: "invoice";
                transaction: "transaction";
                refund: "refund";
                credit: "credit";
                balance: "balance";
                loss: "loss";
            }>;
            kind: z.ZodString;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            revision_key: z.ZodString;
            source_order: z.ZodNullable<z.ZodNumber>;
            supersedes_revision: z.ZodNullable<z.ZodString>;
            effective_at: z.ZodISODateTime;
            source_recorded_at: z.ZodISODateTime;
            observed_at: z.ZodISODateTime;
            economic_ownership: z.ZodEnum<{
                unknown: "unknown";
                owner: "owner";
                non_owner: "non_owner";
            }>;
            legacy_billing_ref: z.ZodNullable<z.ZodString>;
            fact_digest: z.ZodString;
        }, z.core.$strict>;
        lineage: z.ZodLiteral<"verified_no_predecessor">;
        evidence_reference: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"unknown">;
        reason: z.ZodString;
    }, z.core.$strict>], "state">;
    identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
        state: z.ZodLiteral<"known">;
        evidence_reference: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"absent">;
        evidence_reference: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"unknown">;
        reason: z.ZodString;
    }, z.core.$strict>], "state">;
    binding: z.ZodDiscriminatedUnion<[z.ZodObject<{
        state: z.ZodLiteral<"known">;
        evidence_reference: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"absent">;
        evidence_reference: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"unknown">;
        reason: z.ZodString;
    }, z.core.$strict>], "state">;
    historical_managed_account: z.ZodDiscriminatedUnion<[z.ZodObject<{
        state: z.ZodLiteral<"known">;
        managed_at_activation: z.ZodBoolean;
        evidence_reference: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"unknown">;
        reason: z.ZodString;
    }, z.core.$strict>], "state">;
}, z.core.$strict>;
declare const ManagedBaselineInputSchema: z.ZodObject<{
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    mode: z.ZodDiscriminatedUnion<[z.ZodObject<{
        state: z.ZodLiteral<"known">;
        evidence_reference: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"absent">;
        evidence_reference: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"unknown">;
        reason: z.ZodString;
    }, z.core.$strict>], "state">;
    activation: z.ZodDiscriminatedUnion<[z.ZodObject<{
        state: z.ZodLiteral<"known">;
        at: z.ZodISODateTime;
        tenant_id: z.ZodString;
        environment_id: z.ZodString;
        product_id: z.ZodString;
        deployment_reference: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"absent">;
        evidence_reference: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"unknown">;
        reason: z.ZodString;
    }, z.core.$strict>], "state">;
    as_of: z.ZodISODateTime;
    observed_cutoff: z.ZodISODateTime;
    history: z.ZodObject<{
        coverage: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
        retained_from: z.ZodISODateTime;
        complete_through: z.ZodISODateTime;
        evidence_reference: z.ZodString;
    }, z.core.$strict>;
    snapshots: z.ZodArray<z.ZodObject<{
        subscription_id: z.ZodString;
        revision: z.ZodObject<{
            revision_version: z.ZodLiteral<1>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            profile: z.ZodEnum<{
                subscription: "subscription";
                schedule: "schedule";
                invoice: "invoice";
                transaction: "transaction";
                refund: "refund";
                credit: "credit";
                balance: "balance";
                loss: "loss";
            }>;
            kind: z.ZodString;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            revision_key: z.ZodString;
            source_order: z.ZodNullable<z.ZodNumber>;
            supersedes_revision: z.ZodNullable<z.ZodString>;
            effective_at: z.ZodISODateTime;
            source_recorded_at: z.ZodISODateTime;
            observed_at: z.ZodISODateTime;
            economic_ownership: z.ZodEnum<{
                unknown: "unknown";
                owner: "owner";
                non_owner: "non_owner";
            }>;
            legacy_billing_ref: z.ZodNullable<z.ZodString>;
            fact_digest: z.ZodString;
        }, z.core.$strict>;
        normalization: z.ZodObject<{
            at: z.ZodISODateTime;
            currency: z.ZodString;
            currency_exponent: z.ZodNumber;
            status: z.ZodEnum<{
                active: "active";
                past_due: "past_due";
                canceled: "canceled";
                trialing: "trialing";
                unpaid: "unpaid";
                incomplete: "incomplete";
                incomplete_expired: "incomplete_expired";
                paused: "paused";
            }>;
            service_active_from: z.ZodISODateTime;
            service_ends_at: z.ZodNullable<z.ZodISODateTime>;
            collection_paused: z.ZodBoolean;
            items: z.ZodArray<z.ZodObject<{
                item_id: z.ZodString;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                quantity: z.ZodNumber;
                trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
                item_state: z.ZodEnum<{
                    present: "present";
                    removed: "removed";
                }>;
                contract_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
                    amount_minor: z.ZodString;
                    embedded_discount_ids: z.ZodArray<z.ZodString>;
                }, z.core.$strict>>>;
                billed_usage: z.ZodOptional<z.ZodObject<{
                    amount_minor: z.ZodString;
                    includes_minimum: z.ZodBoolean;
                }, z.core.$strict>>;
            }, z.core.$strict>>;
            items_coverage: z.ZodEnum<{
                partial: "partial";
                complete: "complete";
            }>;
            discounts: z.ZodArray<z.ZodObject<{
                discount_id: z.ZodString;
                recurrence: z.ZodEnum<{
                    recurring: "recurring";
                    invoice_only: "invoice_only";
                }>;
                item_id: z.ZodNullable<z.ZodString>;
                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                starts_at: z.ZodISODateTime;
                ends_at: z.ZodNullable<z.ZodISODateTime>;
                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"percentage">;
                    percent: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"fixed">;
                    amount_minor: z.ZodString;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                        item_id: z.ZodString;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>>>;
                    allocations_coverage: z.ZodEnum<{
                        partial: "partial";
                        complete: "complete";
                    }>;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>>;
            discounts_coverage: z.ZodEnum<{
                partial: "partial";
                complete: "complete";
            }>;
        }, z.core.$strict>;
    }, z.core.$strict>>;
    subjects: z.ZodArray<z.ZodObject<{
        subscription_id: z.ZodString;
        item_id: z.ZodString;
        creation: z.ZodDiscriminatedUnion<[z.ZodObject<{
            state: z.ZodLiteral<"known">;
            subscription_id: z.ZodString;
            item_id: z.ZodString;
            revision: z.ZodObject<{
                revision_version: z.ZodLiteral<1>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                profile: z.ZodEnum<{
                    subscription: "subscription";
                    schedule: "schedule";
                    invoice: "invoice";
                    transaction: "transaction";
                    refund: "refund";
                    credit: "credit";
                    balance: "balance";
                    loss: "loss";
                }>;
                kind: z.ZodString;
                occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                revision_key: z.ZodString;
                source_order: z.ZodNullable<z.ZodNumber>;
                supersedes_revision: z.ZodNullable<z.ZodString>;
                effective_at: z.ZodISODateTime;
                source_recorded_at: z.ZodISODateTime;
                observed_at: z.ZodISODateTime;
                economic_ownership: z.ZodEnum<{
                    unknown: "unknown";
                    owner: "owner";
                    non_owner: "non_owner";
                }>;
                legacy_billing_ref: z.ZodNullable<z.ZodString>;
                fact_digest: z.ZodString;
            }, z.core.$strict>;
            lineage: z.ZodLiteral<"verified_no_predecessor">;
            evidence_reference: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            state: z.ZodLiteral<"unknown">;
            reason: z.ZodString;
        }, z.core.$strict>], "state">;
        identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
            state: z.ZodLiteral<"known">;
            evidence_reference: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            state: z.ZodLiteral<"absent">;
            evidence_reference: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            state: z.ZodLiteral<"unknown">;
            reason: z.ZodString;
        }, z.core.$strict>], "state">;
        binding: z.ZodDiscriminatedUnion<[z.ZodObject<{
            state: z.ZodLiteral<"known">;
            evidence_reference: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            state: z.ZodLiteral<"absent">;
            evidence_reference: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            state: z.ZodLiteral<"unknown">;
            reason: z.ZodString;
        }, z.core.$strict>], "state">;
        historical_managed_account: z.ZodDiscriminatedUnion<[z.ZodObject<{
            state: z.ZodLiteral<"known">;
            managed_at_activation: z.ZodBoolean;
            evidence_reference: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            state: z.ZodLiteral<"unknown">;
            reason: z.ZodString;
        }, z.core.$strict>], "state">;
    }, z.core.$strict>>;
}, z.core.$strict>;
declare const ManagedItemBaselineSchema: z.ZodObject<{
    subscription_id: z.ZodString;
    item_id: z.ZodString;
    status: z.ZodEnum<{
        unavailable: "unavailable";
        partial: "partial";
        complete: "complete";
        not_applicable: "not_applicable";
    }>;
    baseline_basis: z.ZodEnum<{
        unknown: "unknown";
        not_applicable: "not_applicable";
        activation_stock: "activation_stock";
        proven_post_activation_zero: "proven_post_activation_zero";
    }>;
    currency: z.ZodNullable<z.ZodString>;
    currency_exponent: z.ZodNullable<z.ZodNumber>;
    baseline_mrr_minor: z.ZodNullable<z.ZodString>;
    current_mrr_minor: z.ZodNullable<z.ZodString>;
    positive_growth_minor: z.ZodNullable<z.ZodString>;
    baseline_revision_key: z.ZodNullable<z.ZodString>;
    current_revision_key: z.ZodNullable<z.ZodString>;
    limitations: z.ZodArray<z.ZodString>;
    identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
        state: z.ZodLiteral<"known">;
        evidence_reference: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"absent">;
        evidence_reference: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"unknown">;
        reason: z.ZodString;
    }, z.core.$strict>], "state">;
    binding: z.ZodDiscriminatedUnion<[z.ZodObject<{
        state: z.ZodLiteral<"known">;
        evidence_reference: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"absent">;
        evidence_reference: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"unknown">;
        reason: z.ZodString;
    }, z.core.$strict>], "state">;
    historical_managed_account: z.ZodDiscriminatedUnion<[z.ZodObject<{
        state: z.ZodLiteral<"known">;
        managed_at_activation: z.ZodBoolean;
        evidence_reference: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"unknown">;
        reason: z.ZodString;
    }, z.core.$strict>], "state">;
}, z.core.$strict>;
declare const ManagedBaselineResultSchema: z.ZodObject<{
    policy_version: z.ZodLiteral<"managed-item-activation-baseline-v1">;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    activation: z.ZodDiscriminatedUnion<[z.ZodObject<{
        state: z.ZodLiteral<"known">;
        at: z.ZodISODateTime;
        tenant_id: z.ZodString;
        environment_id: z.ZodString;
        product_id: z.ZodString;
        deployment_reference: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"absent">;
        evidence_reference: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"unknown">;
        reason: z.ZodString;
    }, z.core.$strict>], "state">;
    as_of: z.ZodISODateTime;
    observed_cutoff: z.ZodISODateTime;
    status: z.ZodEnum<{
        unavailable: "unavailable";
        partial: "partial";
        complete: "complete";
        not_applicable: "not_applicable";
    }>;
    items: z.ZodArray<z.ZodObject<{
        subscription_id: z.ZodString;
        item_id: z.ZodString;
        status: z.ZodEnum<{
            unavailable: "unavailable";
            partial: "partial";
            complete: "complete";
            not_applicable: "not_applicable";
        }>;
        baseline_basis: z.ZodEnum<{
            unknown: "unknown";
            not_applicable: "not_applicable";
            activation_stock: "activation_stock";
            proven_post_activation_zero: "proven_post_activation_zero";
        }>;
        currency: z.ZodNullable<z.ZodString>;
        currency_exponent: z.ZodNullable<z.ZodNumber>;
        baseline_mrr_minor: z.ZodNullable<z.ZodString>;
        current_mrr_minor: z.ZodNullable<z.ZodString>;
        positive_growth_minor: z.ZodNullable<z.ZodString>;
        baseline_revision_key: z.ZodNullable<z.ZodString>;
        current_revision_key: z.ZodNullable<z.ZodString>;
        limitations: z.ZodArray<z.ZodString>;
        identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
            state: z.ZodLiteral<"known">;
            evidence_reference: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            state: z.ZodLiteral<"absent">;
            evidence_reference: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            state: z.ZodLiteral<"unknown">;
            reason: z.ZodString;
        }, z.core.$strict>], "state">;
        binding: z.ZodDiscriminatedUnion<[z.ZodObject<{
            state: z.ZodLiteral<"known">;
            evidence_reference: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            state: z.ZodLiteral<"absent">;
            evidence_reference: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            state: z.ZodLiteral<"unknown">;
            reason: z.ZodString;
        }, z.core.$strict>], "state">;
        historical_managed_account: z.ZodDiscriminatedUnion<[z.ZodObject<{
            state: z.ZodLiteral<"known">;
            managed_at_activation: z.ZodBoolean;
            evidence_reference: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            state: z.ZodLiteral<"unknown">;
            reason: z.ZodString;
        }, z.core.$strict>], "state">;
    }, z.core.$strict>>;
    limitations: z.ZodArray<z.ZodString>;
}, z.core.$strict>;

/** RM-0264 TASK-52: bounded transient projection evidence, never current state. */

declare const BillingCommittedInputSchema: z.ZodObject<{
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    subscription_id: z.ZodString;
    rt_account_id: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    policy_version: z.ZodLiteral<"committed-recurring-exact-v1">;
    generation_id: z.ZodString;
    mapping_generation_id: z.ZodString;
    effective_base: z.ZodISODateTime;
    horizon: z.ZodISODateTime;
    observed_cutoff: z.ZodISODateTime;
    actual: z.ZodArray<z.ZodObject<{
        revision: z.ZodObject<{
            revision_version: z.ZodLiteral<1>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            profile: z.ZodEnum<{
                subscription: "subscription";
                schedule: "schedule";
                invoice: "invoice";
                transaction: "transaction";
                refund: "refund";
                credit: "credit";
                balance: "balance";
                loss: "loss";
            }>;
            kind: z.ZodString;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            revision_key: z.ZodString;
            source_order: z.ZodNullable<z.ZodNumber>;
            supersedes_revision: z.ZodNullable<z.ZodString>;
            effective_at: z.ZodISODateTime;
            source_recorded_at: z.ZodISODateTime;
            observed_at: z.ZodISODateTime;
            economic_ownership: z.ZodEnum<{
                unknown: "unknown";
                owner: "owner";
                non_owner: "non_owner";
            }>;
            legacy_billing_ref: z.ZodNullable<z.ZodString>;
            fact_digest: z.ZodString;
        }, z.core.$strict>;
        subscription_id: z.ZodString;
        rt_account_id: z.ZodString;
        action: z.ZodEnum<{
            apply: "apply";
            retract: "retract";
        }>;
        contract: z.ZodNullable<z.ZodObject<{
            normalization: z.ZodObject<{
                at: z.ZodISODateTime;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                status: z.ZodEnum<{
                    active: "active";
                    past_due: "past_due";
                    canceled: "canceled";
                    trialing: "trialing";
                    unpaid: "unpaid";
                    incomplete: "incomplete";
                    incomplete_expired: "incomplete_expired";
                    paused: "paused";
                }>;
                service_active_from: z.ZodISODateTime;
                service_ends_at: z.ZodNullable<z.ZodISODateTime>;
                collection_paused: z.ZodBoolean;
                items: z.ZodArray<z.ZodObject<{
                    item_id: z.ZodString;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    quantity: z.ZodNumber;
                    trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
                    item_state: z.ZodEnum<{
                        present: "present";
                        removed: "removed";
                    }>;
                    contract_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
                        amount_minor: z.ZodString;
                        embedded_discount_ids: z.ZodArray<z.ZodString>;
                    }, z.core.$strict>>>;
                    billed_usage: z.ZodOptional<z.ZodObject<{
                        amount_minor: z.ZodString;
                        includes_minimum: z.ZodBoolean;
                    }, z.core.$strict>>;
                }, z.core.$strict>>;
                items_coverage: z.ZodEnum<{
                    partial: "partial";
                    complete: "complete";
                }>;
                discounts: z.ZodArray<z.ZodObject<{
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        amount_minor: z.ZodString;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                            item_id: z.ZodString;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>>>;
                        allocations_coverage: z.ZodEnum<{
                            partial: "partial";
                            complete: "complete";
                        }>;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>>;
                discounts_coverage: z.ZodEnum<{
                    partial: "partial";
                    complete: "complete";
                }>;
            }, z.core.$strict>;
            component_bindings: z.ZodArray<z.ZodObject<{
                normalization_key: z.ZodString;
                source_identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"subscription_item">;
                    item_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"schedule_component">;
                    phase_occurrence_key: z.ZodString;
                    source_revision: z.ZodString;
                    position: z.ZodNumber;
                    component_key: z.ZodString;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>>;
        }, z.core.$strict>>;
    }, z.core.$strict>>;
    schedules: z.ZodArray<z.ZodObject<{
        revision: z.ZodObject<{
            revision_version: z.ZodLiteral<1>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            profile: z.ZodEnum<{
                subscription: "subscription";
                schedule: "schedule";
                invoice: "invoice";
                transaction: "transaction";
                refund: "refund";
                credit: "credit";
                balance: "balance";
                loss: "loss";
            }>;
            kind: z.ZodString;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            revision_key: z.ZodString;
            source_order: z.ZodNullable<z.ZodNumber>;
            supersedes_revision: z.ZodNullable<z.ZodString>;
            effective_at: z.ZodISODateTime;
            source_recorded_at: z.ZodISODateTime;
            observed_at: z.ZodISODateTime;
            economic_ownership: z.ZodEnum<{
                unknown: "unknown";
                owner: "owner";
                non_owner: "non_owner";
            }>;
            legacy_billing_ref: z.ZodNullable<z.ZodString>;
            fact_digest: z.ZodString;
        }, z.core.$strict>;
        subscription_id: z.ZodString;
        rt_account_id: z.ZodString;
        schedule_id: z.ZodString;
        action: z.ZodEnum<{
            apply: "apply";
            retract: "retract";
        }>;
        phases: z.ZodArray<z.ZodObject<{
            phase_occurrence_key: z.ZodString;
            starts_at: z.ZodISODateTime;
            ends_at: z.ZodNullable<z.ZodISODateTime>;
            contract: z.ZodObject<{
                normalization: z.ZodObject<{
                    at: z.ZodISODateTime;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    status: z.ZodEnum<{
                        active: "active";
                        past_due: "past_due";
                        canceled: "canceled";
                        trialing: "trialing";
                        unpaid: "unpaid";
                        incomplete: "incomplete";
                        incomplete_expired: "incomplete_expired";
                        paused: "paused";
                    }>;
                    service_active_from: z.ZodISODateTime;
                    service_ends_at: z.ZodNullable<z.ZodISODateTime>;
                    collection_paused: z.ZodBoolean;
                    items: z.ZodArray<z.ZodObject<{
                        item_id: z.ZodString;
                        price: z.ZodObject<{
                            price_id: z.ZodString;
                            product_id: z.ZodOptional<z.ZodString>;
                            interval: z.ZodEnum<{
                                day: "day";
                                week: "week";
                                month: "month";
                                year: "year";
                            }>;
                            interval_count: z.ZodNumber;
                            usage_type: z.ZodEnum<{
                                metered: "metered";
                                licensed: "licensed";
                            }>;
                            unit_amount_minor: z.ZodNullable<z.ZodString>;
                            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                                billing_scheme: z.ZodLiteral<"per_unit">;
                                unit_amount_decimal: z.ZodString;
                                transform_quantity: z.ZodNullable<z.ZodObject<{
                                    divide_by: z.ZodNumber;
                                    round: z.ZodEnum<{
                                        up: "up";
                                        down: "down";
                                    }>;
                                }, z.core.$strict>>;
                            }, z.core.$strict>, z.ZodObject<{
                                billing_scheme: z.ZodLiteral<"tiered">;
                                tiers_mode: z.ZodEnum<{
                                    graduated: "graduated";
                                    volume: "volume";
                                }>;
                                tiers: z.ZodArray<z.ZodObject<{
                                    up_to: z.ZodNullable<z.ZodNumber>;
                                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                                }, z.core.$strict>>;
                            }, z.core.$strict>], "billing_scheme">>;
                        }, z.core.$strict>;
                        quantity: z.ZodNumber;
                        trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
                        item_state: z.ZodEnum<{
                            present: "present";
                            removed: "removed";
                        }>;
                        contract_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
                            amount_minor: z.ZodString;
                            embedded_discount_ids: z.ZodArray<z.ZodString>;
                        }, z.core.$strict>>>;
                        billed_usage: z.ZodOptional<z.ZodObject<{
                            amount_minor: z.ZodString;
                            includes_minimum: z.ZodBoolean;
                        }, z.core.$strict>>;
                    }, z.core.$strict>>;
                    items_coverage: z.ZodEnum<{
                        partial: "partial";
                        complete: "complete";
                    }>;
                    discounts: z.ZodArray<z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>>;
                    discounts_coverage: z.ZodEnum<{
                        partial: "partial";
                        complete: "complete";
                    }>;
                }, z.core.$strict>;
                component_bindings: z.ZodArray<z.ZodObject<{
                    normalization_key: z.ZodString;
                    source_identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"subscription_item">;
                        item_id: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"schedule_component">;
                        phase_occurrence_key: z.ZodString;
                        source_revision: z.ZodString;
                        position: z.ZodNumber;
                        component_key: z.ZodString;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>>;
            }, z.core.$strict>;
        }, z.core.$strict>>;
        phases_coverage: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
    }, z.core.$strict>>;
    coverage: z.ZodObject<{
        observed_at: z.ZodISODateTime;
        history: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
        schedules: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
        known_through: z.ZodNullable<z.ZodISODateTime>;
        carry_forward: z.ZodLiteral<"known_contract_terms_only">;
    }, z.core.$strict>;
}, z.core.$strict>;
declare const BillingCommittedResultSchema: z.ZodObject<{
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    subscription_id: z.ZodString;
    rt_account_id: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    policy_version: z.ZodLiteral<"committed-recurring-exact-v1">;
    normalization_policy: z.ZodLiteral<"recurring-contract-exact-v1">;
    generation_id: z.ZodString;
    mapping_generation_id: z.ZodString;
    effective_base: z.ZodISODateTime;
    horizon: z.ZodISODateTime;
    observed_cutoff: z.ZodISODateTime;
    status: z.ZodEnum<{
        unavailable: "unavailable";
        partial: "partial";
        complete: "complete";
    }>;
    actual_mrr_minor: z.ZodNullable<z.ZodString>;
    actual_arr_minor: z.ZodNullable<z.ZodString>;
    committed_mrr_minor: z.ZodNullable<z.ZodString>;
    committed_arr_minor: z.ZodNullable<z.ZodString>;
    known_committed_mrr_minor: z.ZodNullable<z.ZodString>;
    known_committed_arr_minor: z.ZodNullable<z.ZodString>;
    carry_forward: z.ZodLiteral<"known_contract_terms_only">;
    known_through: z.ZodNullable<z.ZodISODateTime>;
    base_revision_key: z.ZodNullable<z.ZodString>;
    schedule_revision_keys: z.ZodArray<z.ZodString>;
    applied_phase_keys: z.ZodArray<z.ZodString>;
    projected_component_bindings: z.ZodArray<z.ZodObject<{
        normalization_key: z.ZodString;
        source_identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"subscription_item">;
            item_id: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"schedule_component">;
            phase_occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            position: z.ZodNumber;
            component_key: z.ZodString;
        }, z.core.$strict>], "kind">;
    }, z.core.$strict>>;
    gaps: z.ZodArray<z.ZodObject<{
        reason: z.ZodString;
        key: z.ZodString;
    }, z.core.$strict>>;
}, z.core.$strict>;

/**
 * Derived billing-accounting contracts (plan 252 TASK-28, BL-0292).
 *
 * `billing-profiles.ts` says what a PROVIDER reported. This file types what
 * RevTurbine keeps and derives from it, per plan 252's Schema impact:
 * "tenant/source/account/mode-scoped immutable accounting revisions and
 * policy/generation checkpoints", versioned provider→RT mappings, and the
 * projection/coverage/checkpoint contracts rebuilds publish.
 *
 * | Contract | What it is | Unique key (`BILLING_UNIQUE_KEYS`) |
 * |---|---|---|
 * | {@link BillingAccountingRevisionSchema} | One immutable source revision of one fact | `accounting_revision` |
 * | {@link BillingAccountMappingRevisionSchema} | Provider customer → RT account, effective-dated and versioned | `mapping_revision` |
 * | {@link BillingOutputRowKeySchema} | The identity of one derived output row | `output_generation` |
 * | {@link BillingGenerationSchema} | One policy-pinned derived generation, its checkpoint and reconciliation | `generation` |
 * | {@link BillingCoverageCheckpointSchema} | How completely one fact family is known for one scope | `coverage_checkpoint` |
 *
 * SOURCE keys vs OUTPUT keys: a source revision is what a provider said and
 * never changes; an output key names a derived row by WHAT it measures
 * (kind, scope, RT account, currency, instant, subject) and deliberately NOT
 * by generation — so rebuilding the same inputs twice yields identical output
 * keys (AC-20), and the generation id alone separates a shadow rebuild from
 * the active one.
 *
 * Composition with plan 248: these are HISTORY contracts. Current provider
 * item state stays in plan 248's `stripe_sub_item` / `stripe_sub_evidence`;
 * nothing here mirrors it.
 *
 * These reusable value contracts stay transient (internal, server-only).
 * TASK-30's `billing-history.ts` composes them into private persisted rows;
 * no field is `pii`.
 */

/** Version stamped on every derived accounting contract in this file. */
declare const BILLING_ACCOUNTING_CONTRACT_VERSION = 1;
/** Prefix of every derived output key, so it can never be mistaken for a source occurrence key (`bo2`). */
declare const BILLING_OUTPUT_KEY_PREFIX = "bout1";
/** Bound on gap / failure lists in one checkpoint. */
declare const MAX_BILLING_CHECKPOINT_LIST = 250;
/** The scope key of a source scope: tenant, provider, account, mode, simulation. */
declare function billingSourceScopeKey(source: BillingSourceScope$1): string;
/**
 * One immutable source revision of one billing fact, as accounting storage
 * keeps it. Rows are never updated: a later provider state is a NEW revision
 * (`supersedes_revision`), a retraction is its own `retract` occurrence. The
 * full profile rides beside this row (TASK-30); `fact_digest` pins its bytes,
 * so a replay of the same `revision_key` with different content is a
 * conflict, not a silent overwrite ({@link compareAccountingRevision}).
 */
declare const BillingAccountingRevisionSchema: z.ZodObject<{
    revision_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    profile: z.ZodEnum<{
        subscription: "subscription";
        schedule: "schedule";
        invoice: "invoice";
        transaction: "transaction";
        refund: "refund";
        credit: "credit";
        balance: "balance";
        loss: "loss";
    }>;
    kind: z.ZodString;
    occurrence_key: z.ZodString;
    source_revision: z.ZodString;
    revision_key: z.ZodString;
    source_order: z.ZodNullable<z.ZodNumber>;
    supersedes_revision: z.ZodNullable<z.ZodString>;
    effective_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    economic_ownership: z.ZodEnum<{
        unknown: "unknown";
        owner: "owner";
        non_owner: "non_owner";
    }>;
    legacy_billing_ref: z.ZodNullable<z.ZodString>;
    fact_digest: z.ZodString;
}, z.core.$strict>;
type BillingAccountingRevision$1 = z.infer<typeof BillingAccountingRevisionSchema>;
/** Build the immutable revision row of a validated profile. The caller supplies the fact digest. */
declare function billingAccountingRevisionOf(profile: BillingProfile$1, factDigest: string): BillingAccountingRevision$1;
/**
 * An incoming revision against a stored one with the same `revision_key`:
 * `replay` (same bytes — a no-op) or `conflict` (same revision, different
 * content — never overwritten; it needs repair). `observed_at` is excluded:
 * observing the same revision again is not a different revision.
 */
declare function compareAccountingRevision(stored: BillingAccountingRevision$1, incoming: BillingAccountingRevision$1): 'replay' | 'conflict' | 'different_revision';
/**
 * Why a payer is bound to an account (ST-710, RM-846 EP-851). The automatic
 * kinds are EXPLICIT evidence only, tried in this order, never fuzzy:
 *
 *  - `provider_metadata_account`: the provider customer's own metadata names
 *    the RT account (`revturbine_account_id`);
 *  - `provider_metadata_user`: its metadata names an RT user
 *    (`revturbine_user_id`) whose account is known;
 *  - `customer_link`: RT's `customers.stripe_customer_id` link to an RT user;
 *  - `checkout_link`: the same link, minted from a checkout session;
 *  - `verified_email`: the customer's email equals, exactly, the email the
 *    tenant recorded for its own users, and those users resolve to one account.
 *
 * The operator kinds record a person's decision: link, "no account", or unlink
 * (the link is removed and the payer is unmatched again; automatic matching
 * never overrides an operator's decision).
 *
 * Not a binding kind: the DEC-778 proxy. A bare `metadata.user_id` (a Clerk
 * id) is never an RT user id and is never matched to one. It is a proxy account
 * identity (`BillingMirrorPayer.account_external_id`, ST-925), applied at read
 * time only, after a payer's binding and the identity map have resolved
 * nothing; two payers with the same proxy are one account. It is not stored as
 * a binding, so a later explicit link simply takes precedence.
 */
declare const BILLING_ACCOUNT_BINDING_AUTO_KINDS: readonly ["provider_metadata_account", "provider_metadata_user", "customer_link", "checkout_link", "verified_email"];
declare const BILLING_ACCOUNT_BINDING_OPERATOR_KINDS: readonly ["operator_link", "operator_no_account", "operator_unlink"];
declare const BILLING_ACCOUNT_BINDING_EVIDENCE_KINDS: readonly ["provider_metadata_account", "provider_metadata_user", "customer_link", "checkout_link", "verified_email", "operator_link", "operator_no_account", "operator_unlink"];
type BillingAccountBindingEvidenceKind = (typeof BILLING_ACCOUNT_BINDING_EVIDENCE_KINDS)[number];
/** How strong the evidence is: an id the tenant set, an exact email match, or a person's decision. */
declare const BILLING_ACCOUNT_BINDING_CONFIDENCE: readonly ["explicit", "exact_match", "operator_asserted"];
type BillingAccountBindingConfidence = (typeof BILLING_ACCOUNT_BINDING_CONFIDENCE)[number];
/** The one confidence each evidence kind carries. */
declare function billingAccountBindingConfidenceOf(kind: BillingAccountBindingEvidenceKind): BillingAccountBindingConfidence;
declare function isAutomaticBillingAccountBindingKind(kind: BillingAccountBindingEvidenceKind): boolean;
/** Who recorded a binding revision: the automatic matcher, or a signed-in workspace member. */
declare const BillingAccountBindingActorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    kind: z.ZodLiteral<"system">;
    process: z.ZodLiteral<"payer_auto_match">;
}, z.core.$strict>, z.ZodObject<{
    kind: z.ZodLiteral<"user">;
    user_id: z.ZodString;
    role: z.ZodString;
    via: z.ZodEnum<{
        session: "session";
        api_token: "api_token";
    }>;
}, z.core.$strict>], "kind">;
/** The audit record of one binding revision: what evidence, how strong, who, and why. */
declare const BillingAccountBindingEvidenceSchema: z.ZodObject<{
    kind: z.ZodEnum<{
        provider_metadata_account: "provider_metadata_account";
        provider_metadata_user: "provider_metadata_user";
        customer_link: "customer_link";
        checkout_link: "checkout_link";
        verified_email: "verified_email";
        operator_link: "operator_link";
        operator_no_account: "operator_no_account";
        operator_unlink: "operator_unlink";
    }>;
    confidence: z.ZodEnum<{
        explicit: "explicit";
        exact_match: "exact_match";
        operator_asserted: "operator_asserted";
    }>;
    actor: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"system">;
        process: z.ZodLiteral<"payer_auto_match">;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"user">;
        user_id: z.ZodString;
        role: z.ZodString;
        via: z.ZodEnum<{
            session: "session";
            api_token: "api_token";
        }>;
    }, z.core.$strict>], "kind">;
    reason: z.ZodNullable<z.ZodString>;
    via_user_id: z.ZodNullable<z.ZodString>;
}, z.core.$strict>;
/**
 * One effective-dated revision of the provider-customer → RT-account mapping
 * (plan 252 A-9). History is never reinterpreted through today's mapping: an
 * ordinary revision that changes a mapping takes effect no earlier than it
 * was observed, and only an `approved_correction` — carrying the correction
 * generation that restates history — may reach back in time.
 */
declare const BillingAccountMappingRevisionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    basis: z.ZodLiteral<"explicit_binding">;
    mapping_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
    rt_account_id: z.ZodNullable<z.ZodString>;
    mapping_revision: z.ZodNumber;
    effective_from: z.ZodISODateTime;
    effective_to: z.ZodNullable<z.ZodISODateTime>;
    observed_at: z.ZodISODateTime;
    supersedes_mapping_revision: z.ZodNullable<z.ZodNumber>;
    binding_evidence: z.ZodOptional<z.ZodObject<{
        kind: z.ZodEnum<{
            provider_metadata_account: "provider_metadata_account";
            provider_metadata_user: "provider_metadata_user";
            customer_link: "customer_link";
            checkout_link: "checkout_link";
            verified_email: "verified_email";
            operator_link: "operator_link";
            operator_no_account: "operator_no_account";
            operator_unlink: "operator_unlink";
        }>;
        confidence: z.ZodEnum<{
            explicit: "explicit";
            exact_match: "exact_match";
            operator_asserted: "operator_asserted";
        }>;
        actor: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"system">;
            process: z.ZodLiteral<"payer_auto_match">;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"user">;
            user_id: z.ZodString;
            role: z.ZodString;
            via: z.ZodEnum<{
                session: "session";
                api_token: "api_token";
            }>;
        }, z.core.$strict>], "kind">;
        reason: z.ZodNullable<z.ZodString>;
        via_user_id: z.ZodNullable<z.ZodString>;
    }, z.core.$strict>>;
}, z.core.$strict>, z.ZodObject<{
    basis: z.ZodLiteral<"integration_sync">;
    mapping_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
    rt_account_id: z.ZodNullable<z.ZodString>;
    mapping_revision: z.ZodNumber;
    effective_from: z.ZodISODateTime;
    effective_to: z.ZodNullable<z.ZodISODateTime>;
    observed_at: z.ZodISODateTime;
    supersedes_mapping_revision: z.ZodNullable<z.ZodNumber>;
    binding_evidence: z.ZodOptional<z.ZodObject<{
        kind: z.ZodEnum<{
            provider_metadata_account: "provider_metadata_account";
            provider_metadata_user: "provider_metadata_user";
            customer_link: "customer_link";
            checkout_link: "checkout_link";
            verified_email: "verified_email";
            operator_link: "operator_link";
            operator_no_account: "operator_no_account";
            operator_unlink: "operator_unlink";
        }>;
        confidence: z.ZodEnum<{
            explicit: "explicit";
            exact_match: "exact_match";
            operator_asserted: "operator_asserted";
        }>;
        actor: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"system">;
            process: z.ZodLiteral<"payer_auto_match">;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"user">;
            user_id: z.ZodString;
            role: z.ZodString;
            via: z.ZodEnum<{
                session: "session";
                api_token: "api_token";
            }>;
        }, z.core.$strict>], "kind">;
        reason: z.ZodNullable<z.ZodString>;
        via_user_id: z.ZodNullable<z.ZodString>;
    }, z.core.$strict>>;
}, z.core.$strict>, z.ZodObject<{
    basis: z.ZodLiteral<"approved_correction">;
    correction_generation_id: z.ZodString;
    restatement_reason: z.ZodEnum<{
        split: "split";
        merge: "merge";
        provider_migration: "provider_migration";
        reassignment: "reassignment";
        error_correction: "error_correction";
    }>;
    mapping_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    customer_ref: z.ZodString;
    rt_account_id: z.ZodNullable<z.ZodString>;
    mapping_revision: z.ZodNumber;
    effective_from: z.ZodISODateTime;
    effective_to: z.ZodNullable<z.ZodISODateTime>;
    observed_at: z.ZodISODateTime;
    supersedes_mapping_revision: z.ZodNullable<z.ZodNumber>;
    binding_evidence: z.ZodOptional<z.ZodObject<{
        kind: z.ZodEnum<{
            provider_metadata_account: "provider_metadata_account";
            provider_metadata_user: "provider_metadata_user";
            customer_link: "customer_link";
            checkout_link: "checkout_link";
            verified_email: "verified_email";
            operator_link: "operator_link";
            operator_no_account: "operator_no_account";
            operator_unlink: "operator_unlink";
        }>;
        confidence: z.ZodEnum<{
            explicit: "explicit";
            exact_match: "exact_match";
            operator_asserted: "operator_asserted";
        }>;
        actor: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"system">;
            process: z.ZodLiteral<"payer_auto_match">;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"user">;
            user_id: z.ZodString;
            role: z.ZodString;
            via: z.ZodEnum<{
                session: "session";
                api_token: "api_token";
            }>;
        }, z.core.$strict>], "kind">;
        reason: z.ZodNullable<z.ZodString>;
        via_user_id: z.ZodNullable<z.ZodString>;
    }, z.core.$strict>>;
}, z.core.$strict>], "basis">;
type BillingAccountMappingRevision$1 = z.infer<typeof BillingAccountMappingRevisionSchema>;
/**
 * Where one payer stands, from its LATEST mapping revision (DEC-930 option A:
 * the latest-account map; history is re-derived under it when it changes).
 *
 *  - `linked`: the latest revision names an account;
 *  - `no_account`: a person decided the payer has no RT account (or a revision
 *    written before ST-710 explicitly unmapped it);
 *  - `none`: no revision, or the latest is an unlink.
 *
 * `mapping_revision` is the latest revision number (0 with none): the version
 * an operator's change must name, so two concurrent edits cannot both win.
 */
type BillingAccountBindingState = {
    state: 'linked';
    rt_account_id: string;
    mapping_revision: number;
    latest: BillingAccountMappingRevision$1;
} | {
    state: 'no_account';
    mapping_revision: number;
    latest: BillingAccountMappingRevision$1;
} | {
    state: 'none';
    mapping_revision: number;
    latest: BillingAccountMappingRevision$1 | null;
};
declare function latestBillingAccountBinding(revisions: readonly BillingAccountMappingRevision$1[]): BillingAccountBindingState;
/**
 * Whether the automatic matcher may write a new revision over the latest one:
 * only when there is none, or the latest is itself automatic evidence. A
 * person's decision (link, no account, unlink) and any revision without
 * evidence (written before ST-710, or a correction) are never overridden.
 */
declare function automaticBindingMaySupersede(latest: BillingAccountMappingRevision$1 | null): boolean;
type BillingAccountMappingResolution = {
    state: 'mapped';
    rt_account_id: string;
    mapping_revision: number;
} | {
    state: 'unmapped';
    reason: 'no_mapping' | 'explicitly_unmapped';
} | {
    state: 'ambiguous';
    mapping_revisions: number[];
};
/**
 * The RT account a provider customer mapped to AT `effective_at`, AS KNOWN BY
 * `observed_cutoff` — never the latest mapping reinterpreting history. The
 * highest revision known by the cutoff whose interval contains the instant
 * wins; two such rows with the same revision number are ambiguous.
 */
declare function resolveBillingAccountMapping(revisions: readonly BillingAccountMappingRevision$1[], query: {
    source: BillingSourceScope$1;
    customer_ref: string;
    effective_at: string;
    observed_cutoff: string;
}): BillingAccountMappingResolution;
/**
 * Derived output kinds. Snapshot kinds keep ACTUAL, RECEIVABLE and
 * horizon-specific COMMITTED stock distinct (plan 252 Schema impact); the
 * flow kinds name the occurrence/allocation they derive from.
 */
declare const BILLING_OUTPUT_KINDS: readonly ["stock_snapshot", "committed_snapshot", "receivable_snapshot", "movement", "collection", "allocation", "recurring_period", "committed_subscription_snapshot", "invoice_receivable_snapshot"];
type BillingOutputKind = (typeof BILLING_OUTPUT_KINDS)[number];
interface BillingExistingOutputKeyInput {
    output_kind: Exclude<BillingOutputKind, 'invoice_receivable_snapshot'>;
    source: BillingSourceScope$1;
    /** Existing kinds: null is an unmapped customer. recurring_period alone requires null for an aggregate population. */
    rt_account_id: string | null;
    currency: string;
    /** The instant the row measures (snapshot instant / movement effective time / projection base `b`). */
    effective_at: string;
    /** Committed snapshots only: the horizon `h >= b`. */
    horizon_at?: string;
    /** Flow kinds only: the source occurrence / allocation / atomic change group it derives from. */
    subject?: string;
    /** recurring_period only: the exact start; effective_at is its exclusive end. */
    period_start?: string;
    population_key?: string;
    basis?: string;
    /** committed_subscription_snapshot only, never an account-level snapshot alias. */
    subscription_id?: string;
    /** New scoped projection kinds preserve as-known identity independently of generation. */
    observed_cutoff?: string;
    invoice_id?: never;
}
interface BillingInvoiceReceivableKeyInput extends Omit<BillingExistingOutputKeyInput, 'output_kind' | 'currency' | 'invoice_id'> {
    output_kind: 'invoice_receivable_snapshot';
    currency: string | null;
    invoice_id: string;
    observed_cutoff: string;
    population_key: string;
}
type BillingOutputKeyInput = BillingExistingOutputKeyInput | BillingInvoiceReceivableKeyInput;
/**
 * The identity of one derived output row. Depends only on WHAT the row
 * measures — never on generation, policy or delivery — so two rebuilds of the
 * same retained facts produce the same keys (AC-20). UTC normalization preserves
 * all fractional digits while retaining three-digit millisecond key spellings.
 */
declare function deriveBillingOutputKey(input: BillingOutputKeyInput): string;
/**
 * The unique identity of one derived output row inside a generation —
 * `BILLING_UNIQUE_KEYS.output_generation`. The same `output_key` recurs in
 * every generation that measures the same thing.
 */
declare const BillingOutputRowKeySchema: z.ZodObject<{
    tenant_id: z.ZodString;
    policy_version: z.ZodString;
    generation_id: z.ZodString;
    output_kind: z.ZodEnum<{
        allocation: "allocation";
        stock_snapshot: "stock_snapshot";
        committed_snapshot: "committed_snapshot";
        receivable_snapshot: "receivable_snapshot";
        movement: "movement";
        collection: "collection";
        recurring_period: "recurring_period";
        committed_subscription_snapshot: "committed_subscription_snapshot";
        invoice_receivable_snapshot: "invoice_receivable_snapshot";
    }>;
    output_key: z.ZodString;
}, z.core.$strict>;
/**
 * Resumable progress of one generation build (AC-20: a crash resumes from
 * the checkpoint). Revisions are consumed in `(observed_at, revision_key)`
 * order up to the generation's input watermark.
 */
declare const BillingGenerationCheckpointSchema: z.ZodObject<{
    cursor_revision_key: z.ZodNullable<z.ZodString>;
    processed_through: z.ZodNullable<z.ZodISODateTime>;
    processed_revisions: z.ZodNumber;
    completed: z.ZodBoolean;
}, z.core.$strict>;
/**
 * The comparison that gates activation (AC-20): stock equations,
 * invoice/payment/refund conservation and shadow-vs-active totals. `failed`
 * blocks activation; unresolved residuals are reported, not forced to zero.
 */
declare const BillingReconciliationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    state: z.ZodLiteral<"pending">;
}, z.core.$strict>, z.ZodObject<{
    state: z.ZodLiteral<"passed">;
    checked_at: z.ZodISODateTime;
    compared_with_generation_id: z.ZodNullable<z.ZodString>;
    unresolved_residuals: z.ZodNumber;
}, z.core.$strict>, z.ZodObject<{
    state: z.ZodLiteral<"failed">;
    checked_at: z.ZodISODateTime;
    compared_with_generation_id: z.ZodNullable<z.ZodString>;
    failure_codes: z.ZodArray<z.ZodEnum<{
        stock_equation: "stock_equation";
        collection_conservation: "collection_conservation";
        allocation_conservation: "allocation_conservation";
        receivable_conservation: "receivable_conservation";
        source_totals: "source_totals";
        shadow_divergence: "shadow_divergence";
    }>>;
}, z.core.$strict>], "state">;
/** A checkpoint whose build finished — the only one an active or superseded generation may carry. */
declare const BillingCompletedGenerationCheckpointSchema: z.ZodObject<{
    cursor_revision_key: z.ZodNullable<z.ZodString>;
    processed_through: z.ZodNullable<z.ZodISODateTime>;
    processed_revisions: z.ZodNumber;
    completed: z.ZodLiteral<true>;
}, z.core.$strict>;
/**
 * One policy-pinned derived generation (plan 252 A-7). Built as `building`,
 * compared as `shadow`, published atomically as `active`, retired as
 * `superseded`. Activation requires a COMPLETED checkpoint and a PASSED
 * reconciliation — structurally, not by convention: the `active` and
 * `superseded` members admit no other.
 */
declare const BillingGenerationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    status: z.ZodLiteral<"building">;
    reconciliation: z.ZodDiscriminatedUnion<[z.ZodObject<{
        state: z.ZodLiteral<"pending">;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"passed">;
        checked_at: z.ZodISODateTime;
        compared_with_generation_id: z.ZodNullable<z.ZodString>;
        unresolved_residuals: z.ZodNumber;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"failed">;
        checked_at: z.ZodISODateTime;
        compared_with_generation_id: z.ZodNullable<z.ZodString>;
        failure_codes: z.ZodArray<z.ZodEnum<{
            stock_equation: "stock_equation";
            collection_conservation: "collection_conservation";
            allocation_conservation: "allocation_conservation";
            receivable_conservation: "receivable_conservation";
            source_totals: "source_totals";
            shadow_divergence: "shadow_divergence";
        }>>;
    }, z.core.$strict>], "state">;
    lifecycle: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"partition">;
        partition_key: z.ZodString;
        artifact_generation_id: z.ZodString;
        artifact_digest: z.ZodString;
        source_revisions: z.ZodArray<z.ZodObject<{
            revision_key: z.ZodString;
            fact_digest: z.ZodString;
        }, z.core.$strict>>;
        mapping_references: z.ZodArray<z.ZodObject<{
            mapping_evidence_id: z.ZodString;
            customer_ref: z.ZodString;
            mapping_revision: z.ZodNumber;
            account_id: z.ZodString;
        }, z.core.$strict>>;
        config_snapshot_ids: z.ZodArray<z.ZodString>;
        transition_links: z.ZodArray<z.ZodObject<{
            transition_id: z.ZodString;
            source_revision_keys: z.ZodArray<z.ZodString>;
            mapping_evidence_id: z.ZodString;
            config_snapshot_ids: z.ZodArray<z.ZodString>;
        }, z.core.$strict>>;
        version: z.ZodLiteral<1>;
        product_id: z.ZodString;
        environment_id: z.ZodString;
        lifecycle_policy_version: z.ZodString;
        accounting_policy_version: z.ZodString;
        mapping_generation_id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"manifest">;
        selections: z.ZodArray<z.ZodObject<{
            partition_key: z.ZodString;
            generation_id: z.ZodString;
            artifact_generation_id: z.ZodString;
            payload_digest: z.ZodString;
            payload_bytes: z.ZodNumber;
            transition_link_count: z.ZodNumber;
            source_revision_count: z.ZodNumber;
            mapping_reference_count: z.ZodNumber;
        }, z.core.$strict>>;
        version: z.ZodLiteral<1>;
        product_id: z.ZodString;
        environment_id: z.ZodString;
        lifecycle_policy_version: z.ZodString;
        accounting_policy_version: z.ZodString;
        mapping_generation_id: z.ZodString;
    }, z.core.$strict>], "kind">>;
    generation_version: z.ZodLiteral<1>;
    tenant_id: z.ZodString;
    generation_id: z.ZodString;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    policy_version: z.ZodString;
    policy_pins: z.ZodRecord<z.ZodString, z.ZodNumber>;
    input_watermark: z.ZodISODateTime;
    created_at: z.ZodISODateTime;
    checkpoint: z.ZodObject<{
        cursor_revision_key: z.ZodNullable<z.ZodString>;
        processed_through: z.ZodNullable<z.ZodISODateTime>;
        processed_revisions: z.ZodNumber;
        completed: z.ZodBoolean;
    }, z.core.$strict>;
}, z.core.$strict>, z.ZodObject<{
    status: z.ZodLiteral<"shadow">;
    reconciliation: z.ZodDiscriminatedUnion<[z.ZodObject<{
        state: z.ZodLiteral<"pending">;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"passed">;
        checked_at: z.ZodISODateTime;
        compared_with_generation_id: z.ZodNullable<z.ZodString>;
        unresolved_residuals: z.ZodNumber;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"failed">;
        checked_at: z.ZodISODateTime;
        compared_with_generation_id: z.ZodNullable<z.ZodString>;
        failure_codes: z.ZodArray<z.ZodEnum<{
            stock_equation: "stock_equation";
            collection_conservation: "collection_conservation";
            allocation_conservation: "allocation_conservation";
            receivable_conservation: "receivable_conservation";
            source_totals: "source_totals";
            shadow_divergence: "shadow_divergence";
        }>>;
    }, z.core.$strict>], "state">;
    lifecycle: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"partition">;
        partition_key: z.ZodString;
        artifact_generation_id: z.ZodString;
        artifact_digest: z.ZodString;
        source_revisions: z.ZodArray<z.ZodObject<{
            revision_key: z.ZodString;
            fact_digest: z.ZodString;
        }, z.core.$strict>>;
        mapping_references: z.ZodArray<z.ZodObject<{
            mapping_evidence_id: z.ZodString;
            customer_ref: z.ZodString;
            mapping_revision: z.ZodNumber;
            account_id: z.ZodString;
        }, z.core.$strict>>;
        config_snapshot_ids: z.ZodArray<z.ZodString>;
        transition_links: z.ZodArray<z.ZodObject<{
            transition_id: z.ZodString;
            source_revision_keys: z.ZodArray<z.ZodString>;
            mapping_evidence_id: z.ZodString;
            config_snapshot_ids: z.ZodArray<z.ZodString>;
        }, z.core.$strict>>;
        version: z.ZodLiteral<1>;
        product_id: z.ZodString;
        environment_id: z.ZodString;
        lifecycle_policy_version: z.ZodString;
        accounting_policy_version: z.ZodString;
        mapping_generation_id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"manifest">;
        selections: z.ZodArray<z.ZodObject<{
            partition_key: z.ZodString;
            generation_id: z.ZodString;
            artifact_generation_id: z.ZodString;
            payload_digest: z.ZodString;
            payload_bytes: z.ZodNumber;
            transition_link_count: z.ZodNumber;
            source_revision_count: z.ZodNumber;
            mapping_reference_count: z.ZodNumber;
        }, z.core.$strict>>;
        version: z.ZodLiteral<1>;
        product_id: z.ZodString;
        environment_id: z.ZodString;
        lifecycle_policy_version: z.ZodString;
        accounting_policy_version: z.ZodString;
        mapping_generation_id: z.ZodString;
    }, z.core.$strict>], "kind">>;
    generation_version: z.ZodLiteral<1>;
    tenant_id: z.ZodString;
    generation_id: z.ZodString;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    policy_version: z.ZodString;
    policy_pins: z.ZodRecord<z.ZodString, z.ZodNumber>;
    input_watermark: z.ZodISODateTime;
    created_at: z.ZodISODateTime;
    checkpoint: z.ZodObject<{
        cursor_revision_key: z.ZodNullable<z.ZodString>;
        processed_through: z.ZodNullable<z.ZodISODateTime>;
        processed_revisions: z.ZodNumber;
        completed: z.ZodBoolean;
    }, z.core.$strict>;
}, z.core.$strict>, z.ZodObject<{
    status: z.ZodLiteral<"active">;
    checkpoint: z.ZodObject<{
        cursor_revision_key: z.ZodNullable<z.ZodString>;
        processed_through: z.ZodNullable<z.ZodISODateTime>;
        processed_revisions: z.ZodNumber;
        completed: z.ZodLiteral<true>;
    }, z.core.$strict>;
    reconciliation: z.ZodObject<{
        state: z.ZodLiteral<"passed">;
        checked_at: z.ZodISODateTime;
        compared_with_generation_id: z.ZodNullable<z.ZodString>;
        unresolved_residuals: z.ZodNumber;
    }, z.core.$strict>;
    activated_at: z.ZodISODateTime;
    lifecycle: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"partition">;
        partition_key: z.ZodString;
        artifact_generation_id: z.ZodString;
        artifact_digest: z.ZodString;
        source_revisions: z.ZodArray<z.ZodObject<{
            revision_key: z.ZodString;
            fact_digest: z.ZodString;
        }, z.core.$strict>>;
        mapping_references: z.ZodArray<z.ZodObject<{
            mapping_evidence_id: z.ZodString;
            customer_ref: z.ZodString;
            mapping_revision: z.ZodNumber;
            account_id: z.ZodString;
        }, z.core.$strict>>;
        config_snapshot_ids: z.ZodArray<z.ZodString>;
        transition_links: z.ZodArray<z.ZodObject<{
            transition_id: z.ZodString;
            source_revision_keys: z.ZodArray<z.ZodString>;
            mapping_evidence_id: z.ZodString;
            config_snapshot_ids: z.ZodArray<z.ZodString>;
        }, z.core.$strict>>;
        version: z.ZodLiteral<1>;
        product_id: z.ZodString;
        environment_id: z.ZodString;
        lifecycle_policy_version: z.ZodString;
        accounting_policy_version: z.ZodString;
        mapping_generation_id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"manifest">;
        selections: z.ZodArray<z.ZodObject<{
            partition_key: z.ZodString;
            generation_id: z.ZodString;
            artifact_generation_id: z.ZodString;
            payload_digest: z.ZodString;
            payload_bytes: z.ZodNumber;
            transition_link_count: z.ZodNumber;
            source_revision_count: z.ZodNumber;
            mapping_reference_count: z.ZodNumber;
        }, z.core.$strict>>;
        version: z.ZodLiteral<1>;
        product_id: z.ZodString;
        environment_id: z.ZodString;
        lifecycle_policy_version: z.ZodString;
        accounting_policy_version: z.ZodString;
        mapping_generation_id: z.ZodString;
    }, z.core.$strict>], "kind">>;
    generation_version: z.ZodLiteral<1>;
    tenant_id: z.ZodString;
    generation_id: z.ZodString;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    policy_version: z.ZodString;
    policy_pins: z.ZodRecord<z.ZodString, z.ZodNumber>;
    input_watermark: z.ZodISODateTime;
    created_at: z.ZodISODateTime;
}, z.core.$strict>, z.ZodObject<{
    status: z.ZodLiteral<"superseded">;
    checkpoint: z.ZodObject<{
        cursor_revision_key: z.ZodNullable<z.ZodString>;
        processed_through: z.ZodNullable<z.ZodISODateTime>;
        processed_revisions: z.ZodNumber;
        completed: z.ZodLiteral<true>;
    }, z.core.$strict>;
    reconciliation: z.ZodObject<{
        state: z.ZodLiteral<"passed">;
        checked_at: z.ZodISODateTime;
        compared_with_generation_id: z.ZodNullable<z.ZodString>;
        unresolved_residuals: z.ZodNumber;
    }, z.core.$strict>;
    activated_at: z.ZodISODateTime;
    superseded_at: z.ZodISODateTime;
    superseded_by_generation_id: z.ZodString;
    lifecycle: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"partition">;
        partition_key: z.ZodString;
        artifact_generation_id: z.ZodString;
        artifact_digest: z.ZodString;
        source_revisions: z.ZodArray<z.ZodObject<{
            revision_key: z.ZodString;
            fact_digest: z.ZodString;
        }, z.core.$strict>>;
        mapping_references: z.ZodArray<z.ZodObject<{
            mapping_evidence_id: z.ZodString;
            customer_ref: z.ZodString;
            mapping_revision: z.ZodNumber;
            account_id: z.ZodString;
        }, z.core.$strict>>;
        config_snapshot_ids: z.ZodArray<z.ZodString>;
        transition_links: z.ZodArray<z.ZodObject<{
            transition_id: z.ZodString;
            source_revision_keys: z.ZodArray<z.ZodString>;
            mapping_evidence_id: z.ZodString;
            config_snapshot_ids: z.ZodArray<z.ZodString>;
        }, z.core.$strict>>;
        version: z.ZodLiteral<1>;
        product_id: z.ZodString;
        environment_id: z.ZodString;
        lifecycle_policy_version: z.ZodString;
        accounting_policy_version: z.ZodString;
        mapping_generation_id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"manifest">;
        selections: z.ZodArray<z.ZodObject<{
            partition_key: z.ZodString;
            generation_id: z.ZodString;
            artifact_generation_id: z.ZodString;
            payload_digest: z.ZodString;
            payload_bytes: z.ZodNumber;
            transition_link_count: z.ZodNumber;
            source_revision_count: z.ZodNumber;
            mapping_reference_count: z.ZodNumber;
        }, z.core.$strict>>;
        version: z.ZodLiteral<1>;
        product_id: z.ZodString;
        environment_id: z.ZodString;
        lifecycle_policy_version: z.ZodString;
        accounting_policy_version: z.ZodString;
        mapping_generation_id: z.ZodString;
    }, z.core.$strict>], "kind">>;
    generation_version: z.ZodLiteral<1>;
    tenant_id: z.ZodString;
    generation_id: z.ZodString;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    policy_version: z.ZodString;
    policy_pins: z.ZodRecord<z.ZodString, z.ZodNumber>;
    input_watermark: z.ZodISODateTime;
    created_at: z.ZodISODateTime;
}, z.core.$strict>, z.ZodObject<{
    status: z.ZodLiteral<"failed">;
    reconciliation: z.ZodDiscriminatedUnion<[z.ZodObject<{
        state: z.ZodLiteral<"pending">;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"passed">;
        checked_at: z.ZodISODateTime;
        compared_with_generation_id: z.ZodNullable<z.ZodString>;
        unresolved_residuals: z.ZodNumber;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"failed">;
        checked_at: z.ZodISODateTime;
        compared_with_generation_id: z.ZodNullable<z.ZodString>;
        failure_codes: z.ZodArray<z.ZodEnum<{
            stock_equation: "stock_equation";
            collection_conservation: "collection_conservation";
            allocation_conservation: "allocation_conservation";
            receivable_conservation: "receivable_conservation";
            source_totals: "source_totals";
            shadow_divergence: "shadow_divergence";
        }>>;
    }, z.core.$strict>], "state">;
    failure_code: z.ZodString;
    lifecycle: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"partition">;
        partition_key: z.ZodString;
        artifact_generation_id: z.ZodString;
        artifact_digest: z.ZodString;
        source_revisions: z.ZodArray<z.ZodObject<{
            revision_key: z.ZodString;
            fact_digest: z.ZodString;
        }, z.core.$strict>>;
        mapping_references: z.ZodArray<z.ZodObject<{
            mapping_evidence_id: z.ZodString;
            customer_ref: z.ZodString;
            mapping_revision: z.ZodNumber;
            account_id: z.ZodString;
        }, z.core.$strict>>;
        config_snapshot_ids: z.ZodArray<z.ZodString>;
        transition_links: z.ZodArray<z.ZodObject<{
            transition_id: z.ZodString;
            source_revision_keys: z.ZodArray<z.ZodString>;
            mapping_evidence_id: z.ZodString;
            config_snapshot_ids: z.ZodArray<z.ZodString>;
        }, z.core.$strict>>;
        version: z.ZodLiteral<1>;
        product_id: z.ZodString;
        environment_id: z.ZodString;
        lifecycle_policy_version: z.ZodString;
        accounting_policy_version: z.ZodString;
        mapping_generation_id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"manifest">;
        selections: z.ZodArray<z.ZodObject<{
            partition_key: z.ZodString;
            generation_id: z.ZodString;
            artifact_generation_id: z.ZodString;
            payload_digest: z.ZodString;
            payload_bytes: z.ZodNumber;
            transition_link_count: z.ZodNumber;
            source_revision_count: z.ZodNumber;
            mapping_reference_count: z.ZodNumber;
        }, z.core.$strict>>;
        version: z.ZodLiteral<1>;
        product_id: z.ZodString;
        environment_id: z.ZodString;
        lifecycle_policy_version: z.ZodString;
        accounting_policy_version: z.ZodString;
        mapping_generation_id: z.ZodString;
    }, z.core.$strict>], "kind">>;
    generation_version: z.ZodLiteral<1>;
    tenant_id: z.ZodString;
    generation_id: z.ZodString;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    policy_version: z.ZodString;
    policy_pins: z.ZodRecord<z.ZodString, z.ZodNumber>;
    input_watermark: z.ZodISODateTime;
    created_at: z.ZodISODateTime;
    checkpoint: z.ZodObject<{
        cursor_revision_key: z.ZodNullable<z.ZodString>;
        processed_through: z.ZodNullable<z.ZodISODateTime>;
        processed_revisions: z.ZodNumber;
        completed: z.ZodBoolean;
    }, z.core.$strict>;
}, z.core.$strict>], "status">;
type BillingGeneration$1 = z.infer<typeof BillingGenerationSchema>;
/**
 * Whether a generation may be published as active: only a completed build
 * whose reconciliation passed. Every refusal names why (AC-20: a failed
 * reconciliation blocks activation).
 */
declare function canActivateBillingGeneration(generation: BillingGeneration$1): {
    ok: true;
} | {
    ok: false;
    reason: 'lifecycle_qualification_unavailable' | 'not_shadow' | 'checkpoint_incomplete' | 'reconciliation_pending' | 'reconciliation_failed';
};
/** Fact families whose completeness is tracked independently (revenue-accounting §9). */
declare const BILLING_COVERAGE_FAMILIES: readonly ["subscription_stock", "movement_history", "schedule_phases", "invoices", "invoice_payments", "payments", "adjustments", "balances", "losses", "receivables", "account_mappings", "cohort_membership"];
/**
 * A declared opening balance where retained history begins after the first
 * commitment. It seeds a roll-forward; it is NEVER a movement, so it can
 * never be classified as new business or reactivation (revenue-accounting §4).
 */
declare const BillingOpeningSeedSchema: z.ZodObject<{
    as_of: z.ZodISODateTime;
    basis: z.ZodEnum<{
        imported_opening_balance: "imported_opening_balance";
        verified_snapshot: "verified_snapshot";
    }>;
}, z.core.$strict>;
/** Why a span of coverage is missing. Named, so generated port enums do not renumber. */
declare const BillingCoverageGapReasonSchema: z.ZodEnum<{
    partial_hydration: "partial_hydration";
    missing_history: "missing_history";
    ambiguous_revision: "ambiguous_revision";
    missing_price_terms: "missing_price_terms";
    unmapped_customer: "unmapped_customer";
    missing_linkage: "missing_linkage";
    missing_ownership: "missing_ownership";
    provider_error: "provider_error";
    retention_window: "retention_window";
}>;
/** Why a family's coverage is unavailable altogether. Named, so generated port enums do not renumber. */
declare const BillingCoverageUnavailableReasonSchema: z.ZodEnum<{
    provider_error: "provider_error";
    uninitialized: "uninitialized";
    not_connected: "not_connected";
    hydration_in_progress: "hydration_in_progress";
    history_unavailable: "history_unavailable";
}>;
/** One known hole in coverage. `to: null` = still open. */
declare const BillingCoverageGapRangeSchema: z.ZodObject<{
    from: z.ZodISODateTime;
    to: z.ZodNullable<z.ZodISODateTime>;
    reason: z.ZodEnum<{
        partial_hydration: "partial_hydration";
        missing_history: "missing_history";
        ambiguous_revision: "ambiguous_revision";
        missing_price_terms: "missing_price_terms";
        unmapped_customer: "unmapped_customer";
        missing_linkage: "missing_linkage";
        missing_ownership: "missing_ownership";
        provider_error: "provider_error";
        retention_window: "retention_window";
    }>;
}, z.core.$strict>;
/**
 * How completely one fact family is known for one scope. Mirrors plan 248's
 * evidence discipline: `unavailable` carries no coverage window at all, so an
 * unknown family can never be read as a verified empty one; `partial` must
 * name at least one gap; only `complete` is gap-free.
 */
declare const BillingCoverageCheckpointSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    state: z.ZodLiteral<"complete">;
    earliest_complete_at: z.ZodISODateTime;
    covered_through: z.ZodISODateTime;
    opening_seed: z.ZodNullable<z.ZodObject<{
        as_of: z.ZodISODateTime;
        basis: z.ZodEnum<{
            imported_opening_balance: "imported_opening_balance";
            verified_snapshot: "verified_snapshot";
        }>;
    }, z.core.$strict>>;
    checkpoint_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    rt_account_id: z.ZodNullable<z.ZodString>;
    family: z.ZodEnum<{
        subscription_stock: "subscription_stock";
        movement_history: "movement_history";
        schedule_phases: "schedule_phases";
        invoices: "invoices";
        invoice_payments: "invoice_payments";
        payments: "payments";
        adjustments: "adjustments";
        balances: "balances";
        losses: "losses";
        receivables: "receivables";
        account_mappings: "account_mappings";
        cohort_membership: "cohort_membership";
    }>;
    recorded_at: z.ZodISODateTime;
}, z.core.$strict>, z.ZodObject<{
    state: z.ZodLiteral<"partial">;
    earliest_complete_at: z.ZodNullable<z.ZodISODateTime>;
    covered_through: z.ZodISODateTime;
    opening_seed: z.ZodNullable<z.ZodObject<{
        as_of: z.ZodISODateTime;
        basis: z.ZodEnum<{
            imported_opening_balance: "imported_opening_balance";
            verified_snapshot: "verified_snapshot";
        }>;
    }, z.core.$strict>>;
    gaps: z.ZodArray<z.ZodObject<{
        from: z.ZodISODateTime;
        to: z.ZodNullable<z.ZodISODateTime>;
        reason: z.ZodEnum<{
            partial_hydration: "partial_hydration";
            missing_history: "missing_history";
            ambiguous_revision: "ambiguous_revision";
            missing_price_terms: "missing_price_terms";
            unmapped_customer: "unmapped_customer";
            missing_linkage: "missing_linkage";
            missing_ownership: "missing_ownership";
            provider_error: "provider_error";
            retention_window: "retention_window";
        }>;
    }, z.core.$strict>>;
    checkpoint_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    rt_account_id: z.ZodNullable<z.ZodString>;
    family: z.ZodEnum<{
        subscription_stock: "subscription_stock";
        movement_history: "movement_history";
        schedule_phases: "schedule_phases";
        invoices: "invoices";
        invoice_payments: "invoice_payments";
        payments: "payments";
        adjustments: "adjustments";
        balances: "balances";
        losses: "losses";
        receivables: "receivables";
        account_mappings: "account_mappings";
        cohort_membership: "cohort_membership";
    }>;
    recorded_at: z.ZodISODateTime;
}, z.core.$strict>, z.ZodObject<{
    state: z.ZodLiteral<"unavailable">;
    reason: z.ZodEnum<{
        provider_error: "provider_error";
        uninitialized: "uninitialized";
        not_connected: "not_connected";
        hydration_in_progress: "hydration_in_progress";
        history_unavailable: "history_unavailable";
    }>;
    last_observed_at: z.ZodNullable<z.ZodISODateTime>;
    checkpoint_version: z.ZodLiteral<1>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    rt_account_id: z.ZodNullable<z.ZodString>;
    family: z.ZodEnum<{
        subscription_stock: "subscription_stock";
        movement_history: "movement_history";
        schedule_phases: "schedule_phases";
        invoices: "invoices";
        invoice_payments: "invoice_payments";
        payments: "payments";
        adjustments: "adjustments";
        balances: "balances";
        losses: "losses";
        receivables: "receivables";
        account_mappings: "account_mappings";
        cohort_membership: "cohort_membership";
    }>;
    recorded_at: z.ZodISODateTime;
}, z.core.$strict>], "state">;
type BillingCoverageCheckpoint$1 = z.infer<typeof BillingCoverageCheckpointSchema>;
interface InvoicePaymentAllocationSummary {
    payments: {
        scope: string;
        payment_id: string;
        currency: string;
        /** Captured cash; null when no capture of this payment was observed. */
        captured_minor: string | null;
        allocated_minor: string;
        /** Captured minus allocated; null unless capture AND complete allocation coverage are known. */
        unapplied_minor: string | null;
        allocations_coverage: 'complete' | 'partial' | 'unknown';
    }[];
    invoices: {
        scope: string;
        invoice_id: string;
        currency: string;
        /** Allocated from provider payments (cash-bearing edges). */
        allocated_from_payments_minor: string;
        /** Marked settled out of band: no evidenced cash. */
        out_of_band_minor: string;
        payments_coverage: 'complete' | 'partial' | 'unknown';
    }[];
    /** Captured cash per currency, counted once per payment, in the owner's scope (or unknown ownership). */
    collections_minor: Record<string, string>;
    /** Payments whose allocations exceed their captured amount. */
    over_allocated: {
        scope: string;
        payment_id: string;
    }[];
    /** Occurrences with tied revisions and no order evidence (need repair). */
    ambiguous: string[];
    /** Captures excluded because another account owns them (Connect views). */
    non_owner_payment_ids: string[];
}
/**
 * The conservation shape of InvoicePayment allocations (plan 252 A-11 /
 * AC-25): each payment is ONE collection however many invoices it funds; an
 * invoice's allocated amount is the sum of its paid edges, never a payment's
 * full amount; out-of-band edges carry no cash; applying funded balance or
 * credit is not an edge and so never a collection; partial page coverage
 * leaves unapplied cash unknown rather than inferred.
 *
 * A structural check over validated facts — the allocation / netting ORACLE
 * (refunds, credits, conversions) is TASK-46.
 */
declare function summarizeInvoicePaymentAllocations(profiles: readonly BillingProfile$1[]): InvoicePaymentAllocationSummary;

/** RM-0264 TASK-45. Transient replay evidence; no producer or serving activation. */

/** An authoritative seed is the only input allowed to provide an MRR amount. */
declare const BillingRecurringOpeningItemSchema: z.ZodObject<{
    plan_id: z.ZodNullable<z.ZodString>;
    variation_id: z.ZodNullable<z.ZodString>;
    billing_period: z.ZodNullable<z.ZodString>;
    segment_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
    subscription_id: z.ZodString;
    item_id: z.ZodString;
    rt_account_id: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    mrr_minor: z.ZodString;
    subscribed: z.ZodBoolean;
}, z.core.$strict>;
declare const BillingRecurringMovementContractSchema: z.ZodObject<{
    subscription_id: z.ZodString;
    rt_account_id: z.ZodString;
    mapping_revision: z.ZodNumber;
    mapping_basis: z.ZodEnum<{
        verified_link: "verified_link";
        approved_correction: "approved_correction";
    }>;
    segment_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
    normalization: z.ZodObject<{
        at: z.ZodISODateTime;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        status: z.ZodEnum<{
            active: "active";
            past_due: "past_due";
            canceled: "canceled";
            trialing: "trialing";
            unpaid: "unpaid";
            incomplete: "incomplete";
            incomplete_expired: "incomplete_expired";
            paused: "paused";
        }>;
        service_active_from: z.ZodISODateTime;
        service_ends_at: z.ZodNullable<z.ZodISODateTime>;
        collection_paused: z.ZodBoolean;
        items: z.ZodArray<z.ZodObject<{
            item_id: z.ZodString;
            price: z.ZodObject<{
                price_id: z.ZodString;
                product_id: z.ZodOptional<z.ZodString>;
                interval: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    year: "year";
                }>;
                interval_count: z.ZodNumber;
                usage_type: z.ZodEnum<{
                    metered: "metered";
                    licensed: "licensed";
                }>;
                unit_amount_minor: z.ZodNullable<z.ZodString>;
                terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"per_unit">;
                    unit_amount_decimal: z.ZodString;
                    transform_quantity: z.ZodNullable<z.ZodObject<{
                        divide_by: z.ZodNumber;
                        round: z.ZodEnum<{
                            up: "up";
                            down: "down";
                        }>;
                    }, z.core.$strict>>;
                }, z.core.$strict>, z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"tiered">;
                    tiers_mode: z.ZodEnum<{
                        graduated: "graduated";
                        volume: "volume";
                    }>;
                    tiers: z.ZodArray<z.ZodObject<{
                        up_to: z.ZodNullable<z.ZodNumber>;
                        unit_amount_decimal: z.ZodNullable<z.ZodString>;
                        flat_amount_minor: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>], "billing_scheme">>;
            }, z.core.$strict>;
            quantity: z.ZodNumber;
            trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
            item_state: z.ZodEnum<{
                present: "present";
                removed: "removed";
            }>;
            contract_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
                amount_minor: z.ZodString;
                embedded_discount_ids: z.ZodArray<z.ZodString>;
            }, z.core.$strict>>>;
            billed_usage: z.ZodOptional<z.ZodObject<{
                amount_minor: z.ZodString;
                includes_minimum: z.ZodBoolean;
            }, z.core.$strict>>;
        }, z.core.$strict>>;
        items_coverage: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
        discounts: z.ZodArray<z.ZodObject<{
            discount_id: z.ZodString;
            recurrence: z.ZodEnum<{
                recurring: "recurring";
                invoice_only: "invoice_only";
            }>;
            item_id: z.ZodNullable<z.ZodString>;
            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
            starts_at: z.ZodISODateTime;
            ends_at: z.ZodNullable<z.ZodISODateTime>;
            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"percentage">;
                percent: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"fixed">;
                amount_minor: z.ZodString;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                    item_id: z.ZodString;
                    amount_minor: z.ZodString;
                }, z.core.$strict>>>;
                allocations_coverage: z.ZodEnum<{
                    partial: "partial";
                    complete: "complete";
                }>;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>>;
        discounts_coverage: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
    }, z.core.$strict>;
    item_bindings: z.ZodArray<z.ZodObject<{
        item_id: z.ZodString;
        plan_id: z.ZodNullable<z.ZodString>;
        variation_id: z.ZodNullable<z.ZodString>;
    }, z.core.$strict>>;
}, z.core.$strict>;
declare const BillingRecurringMovementOccurrenceSchema: z.ZodObject<{
    revision: z.ZodObject<{
        revision_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        profile: z.ZodEnum<{
            subscription: "subscription";
            schedule: "schedule";
            invoice: "invoice";
            transaction: "transaction";
            refund: "refund";
            credit: "credit";
            balance: "balance";
            loss: "loss";
        }>;
        kind: z.ZodString;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        revision_key: z.ZodString;
        source_order: z.ZodNullable<z.ZodNumber>;
        supersedes_revision: z.ZodNullable<z.ZodString>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        economic_ownership: z.ZodEnum<{
            unknown: "unknown";
            owner: "owner";
            non_owner: "non_owner";
        }>;
        legacy_billing_ref: z.ZodNullable<z.ZodString>;
        fact_digest: z.ZodString;
    }, z.core.$strict>;
    action: z.ZodEnum<{
        apply: "apply";
        retract: "retract";
    }>;
    atomicity: z.ZodEnum<{
        single_contract: "single_contract";
        source_confirmed: "source_confirmed";
    }>;
    cause: z.ZodEnum<{
        quantity: "quantity";
        price: "price";
        activation: "activation";
        discount: "discount";
        discount_expiry: "discount_expiry";
        cancellation: "cancellation";
        service_pause: "service_pause";
        trial_end: "trial_end";
        plan_switch: "plan_switch";
        billing_period_switch: "billing_period_switch";
        segment_change: "segment_change";
        currency_transfer: "currency_transfer";
        identity_transfer: "identity_transfer";
        other: "other";
    }>;
    contracts: z.ZodArray<z.ZodObject<{
        subscription_id: z.ZodString;
        rt_account_id: z.ZodString;
        mapping_revision: z.ZodNumber;
        mapping_basis: z.ZodEnum<{
            verified_link: "verified_link";
            approved_correction: "approved_correction";
        }>;
        segment_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
        normalization: z.ZodObject<{
            at: z.ZodISODateTime;
            currency: z.ZodString;
            currency_exponent: z.ZodNumber;
            status: z.ZodEnum<{
                active: "active";
                past_due: "past_due";
                canceled: "canceled";
                trialing: "trialing";
                unpaid: "unpaid";
                incomplete: "incomplete";
                incomplete_expired: "incomplete_expired";
                paused: "paused";
            }>;
            service_active_from: z.ZodISODateTime;
            service_ends_at: z.ZodNullable<z.ZodISODateTime>;
            collection_paused: z.ZodBoolean;
            items: z.ZodArray<z.ZodObject<{
                item_id: z.ZodString;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                quantity: z.ZodNumber;
                trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
                item_state: z.ZodEnum<{
                    present: "present";
                    removed: "removed";
                }>;
                contract_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
                    amount_minor: z.ZodString;
                    embedded_discount_ids: z.ZodArray<z.ZodString>;
                }, z.core.$strict>>>;
                billed_usage: z.ZodOptional<z.ZodObject<{
                    amount_minor: z.ZodString;
                    includes_minimum: z.ZodBoolean;
                }, z.core.$strict>>;
            }, z.core.$strict>>;
            items_coverage: z.ZodEnum<{
                partial: "partial";
                complete: "complete";
            }>;
            discounts: z.ZodArray<z.ZodObject<{
                discount_id: z.ZodString;
                recurrence: z.ZodEnum<{
                    recurring: "recurring";
                    invoice_only: "invoice_only";
                }>;
                item_id: z.ZodNullable<z.ZodString>;
                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                starts_at: z.ZodISODateTime;
                ends_at: z.ZodNullable<z.ZodISODateTime>;
                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"percentage">;
                    percent: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"fixed">;
                    amount_minor: z.ZodString;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                        item_id: z.ZodString;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>>>;
                    allocations_coverage: z.ZodEnum<{
                        partial: "partial";
                        complete: "complete";
                    }>;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>>;
            discounts_coverage: z.ZodEnum<{
                partial: "partial";
                complete: "complete";
            }>;
        }, z.core.$strict>;
        item_bindings: z.ZodArray<z.ZodObject<{
            item_id: z.ZodString;
            plan_id: z.ZodNullable<z.ZodString>;
            variation_id: z.ZodNullable<z.ZodString>;
        }, z.core.$strict>>;
    }, z.core.$strict>>;
}, z.core.$strict>;
/** Opening is immediately before start; changes apply in [start,end). Daily
 * closes are resolved by the caller's versioned calendar (TASK-47), not here. */
declare const BillingRecurringMovementInputSchema: z.ZodObject<{
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    generation_id: z.ZodString;
    mapping_generation_id: z.ZodString;
    start: z.ZodISODateTime;
    end: z.ZodISODateTime;
    observed_cutoff: z.ZodISODateTime;
    opening: z.ZodObject<{
        as_of: z.ZodISODateTime;
        basis: z.ZodEnum<{
            imported_opening_balance: "imported_opening_balance";
            verified_snapshot: "verified_snapshot";
        }>;
    }, z.core.$strict>;
    opening_items: z.ZodArray<z.ZodObject<{
        plan_id: z.ZodNullable<z.ZodString>;
        variation_id: z.ZodNullable<z.ZodString>;
        billing_period: z.ZodNullable<z.ZodString>;
        segment_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
        subscription_id: z.ZodString;
        item_id: z.ZodString;
        rt_account_id: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        mrr_minor: z.ZodString;
        subscribed: z.ZodBoolean;
    }, z.core.$strict>>;
    opening_history: z.ZodArray<z.ZodObject<{
        rt_account_id: z.ZodString;
        currency: z.ZodString;
        ever_paid: z.ZodEnum<{
            unknown: "unknown";
            yes: "yes";
            no: "no";
        }>;
        first_paid_basis: z.ZodEnum<{
            never: "never";
            unknown: "unknown";
            known: "known";
            before_series_start: "before_series_start";
        }>;
        first_paid_at: z.ZodNullable<z.ZodISODateTime>;
    }, z.core.$strict>>;
    history_coverage: z.ZodEnum<{
        partial: "partial";
        complete: "complete";
    }>;
    occurrences: z.ZodArray<z.ZodObject<{
        revision: z.ZodObject<{
            revision_version: z.ZodLiteral<1>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            profile: z.ZodEnum<{
                subscription: "subscription";
                schedule: "schedule";
                invoice: "invoice";
                transaction: "transaction";
                refund: "refund";
                credit: "credit";
                balance: "balance";
                loss: "loss";
            }>;
            kind: z.ZodString;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            revision_key: z.ZodString;
            source_order: z.ZodNullable<z.ZodNumber>;
            supersedes_revision: z.ZodNullable<z.ZodString>;
            effective_at: z.ZodISODateTime;
            source_recorded_at: z.ZodISODateTime;
            observed_at: z.ZodISODateTime;
            economic_ownership: z.ZodEnum<{
                unknown: "unknown";
                owner: "owner";
                non_owner: "non_owner";
            }>;
            legacy_billing_ref: z.ZodNullable<z.ZodString>;
            fact_digest: z.ZodString;
        }, z.core.$strict>;
        action: z.ZodEnum<{
            apply: "apply";
            retract: "retract";
        }>;
        atomicity: z.ZodEnum<{
            single_contract: "single_contract";
            source_confirmed: "source_confirmed";
        }>;
        cause: z.ZodEnum<{
            quantity: "quantity";
            price: "price";
            activation: "activation";
            discount: "discount";
            discount_expiry: "discount_expiry";
            cancellation: "cancellation";
            service_pause: "service_pause";
            trial_end: "trial_end";
            plan_switch: "plan_switch";
            billing_period_switch: "billing_period_switch";
            segment_change: "segment_change";
            currency_transfer: "currency_transfer";
            identity_transfer: "identity_transfer";
            other: "other";
        }>;
        contracts: z.ZodArray<z.ZodObject<{
            subscription_id: z.ZodString;
            rt_account_id: z.ZodString;
            mapping_revision: z.ZodNumber;
            mapping_basis: z.ZodEnum<{
                verified_link: "verified_link";
                approved_correction: "approved_correction";
            }>;
            segment_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
            normalization: z.ZodObject<{
                at: z.ZodISODateTime;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                status: z.ZodEnum<{
                    active: "active";
                    past_due: "past_due";
                    canceled: "canceled";
                    trialing: "trialing";
                    unpaid: "unpaid";
                    incomplete: "incomplete";
                    incomplete_expired: "incomplete_expired";
                    paused: "paused";
                }>;
                service_active_from: z.ZodISODateTime;
                service_ends_at: z.ZodNullable<z.ZodISODateTime>;
                collection_paused: z.ZodBoolean;
                items: z.ZodArray<z.ZodObject<{
                    item_id: z.ZodString;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    quantity: z.ZodNumber;
                    trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
                    item_state: z.ZodEnum<{
                        present: "present";
                        removed: "removed";
                    }>;
                    contract_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
                        amount_minor: z.ZodString;
                        embedded_discount_ids: z.ZodArray<z.ZodString>;
                    }, z.core.$strict>>>;
                    billed_usage: z.ZodOptional<z.ZodObject<{
                        amount_minor: z.ZodString;
                        includes_minimum: z.ZodBoolean;
                    }, z.core.$strict>>;
                }, z.core.$strict>>;
                items_coverage: z.ZodEnum<{
                    partial: "partial";
                    complete: "complete";
                }>;
                discounts: z.ZodArray<z.ZodObject<{
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        amount_minor: z.ZodString;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                            item_id: z.ZodString;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>>>;
                        allocations_coverage: z.ZodEnum<{
                            partial: "partial";
                            complete: "complete";
                        }>;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>>;
                discounts_coverage: z.ZodEnum<{
                    partial: "partial";
                    complete: "complete";
                }>;
            }, z.core.$strict>;
            item_bindings: z.ZodArray<z.ZodObject<{
                item_id: z.ZodString;
                plan_id: z.ZodNullable<z.ZodString>;
                variation_id: z.ZodNullable<z.ZodString>;
            }, z.core.$strict>>;
        }, z.core.$strict>>;
    }, z.core.$strict>>;
    calendar_version: z.ZodString;
    daily_closes: z.ZodArray<z.ZodISODateTime>;
    opening_segment_id: z.ZodNullable<z.ZodString>;
}, z.core.$strict>;

/** Private durable history for RM-0264 TASK-30. Current item state remains in stripeSubItem. */

/** Observation time changes on delivery retries; it is not a different source revision. */
declare function billingFactDigest(input: BillingProfile$1): string;
/** Compare authoritative ISO instants without dropping any fractional digits. */
declare function compareBillingInstants(left: string, right: string): -1 | 0 | 1;
/**
 * Floor to a millisecond for SQL/Date indexes only, including before the epoch.
 * Retained JSON is authoritative and preserves all source digits and formatting.
 * Index ranges select conservative candidates: exact filtering, ordering and CAS
 * must use retained instants before pagination. Never cursor on this value alone.
 */
declare function billingHistoryIndexTime(value: string): string;
/** Exact strings, allocation/credit-line identities, due transitions and all schedule phases stay in the validated fact. */
declare const BillingFactHistorySchema: z.ZodObject<{
    revision_key: z.ZodString;
    effective_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    customer_ref: z.ZodNullable<z.ZodString>;
    currency: z.ZodNullable<z.ZodString>;
    invoice_id: z.ZodNullable<z.ZodString>;
    payment_id: z.ZodNullable<z.ZodString>;
    refund_id: z.ZodNullable<z.ZodString>;
    credit_note_id: z.ZodNullable<z.ZodString>;
    fund_movement_id: z.ZodNullable<z.ZodString>;
    owner_account_id: z.ZodNullable<z.ZodString>;
    revision: z.ZodObject<{
        revision_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        profile: z.ZodEnum<{
            subscription: "subscription";
            schedule: "schedule";
            invoice: "invoice";
            transaction: "transaction";
            refund: "refund";
            credit: "credit";
            balance: "balance";
            loss: "loss";
        }>;
        kind: z.ZodString;
        occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        revision_key: z.ZodString;
        source_order: z.ZodNullable<z.ZodNumber>;
        supersedes_revision: z.ZodNullable<z.ZodString>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        economic_ownership: z.ZodEnum<{
            unknown: "unknown";
            owner: "owner";
            non_owner: "non_owner";
        }>;
        legacy_billing_ref: z.ZodNullable<z.ZodString>;
        fact_digest: z.ZodString;
    }, z.core.$strict>;
    fact: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
        subscription_id: z.ZodString;
        status_observed: z.ZodOptional<z.ZodEnum<{
            active: "active";
            past_due: "past_due";
            canceled: "canceled";
            trialing: "trialing";
            unpaid: "unpaid";
            incomplete: "incomplete";
            incomplete_expired: "incomplete_expired";
            paused: "paused";
        }>>;
        source_evidence: z.ZodObject<{
            items: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>;
            phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">>;
            components: z.ZodArray<z.ZodObject<{
                identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"subscription_item">;
                    item_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"schedule_component">;
                    phase_occurrence_key: z.ZodString;
                    source_revision: z.ZodString;
                    position: z.ZodNumber;
                    component_key: z.ZodString;
                }, z.core.$strict>], "kind">;
                quantity: z.ZodNullable<z.ZodNumber>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discounts: z.ZodOptional<z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        discount_id: z.ZodOptional<z.ZodString>;
                        reference: z.ZodOptional<z.ZodObject<{
                            kind: z.ZodEnum<{
                                discount: "discount";
                                coupon: "coupon";
                                promotion_code: "promotion_code";
                            }>;
                            id: z.ZodString;
                        }, z.core.$strict>>;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        terms: z.ZodObject<{
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>], "kind">;
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                        applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"known">;
                            discount: z.ZodObject<{
                                discount_id: z.ZodString;
                                recurrence: z.ZodEnum<{
                                    recurring: "recurring";
                                    invoice_only: "invoice_only";
                                }>;
                                item_id: z.ZodNullable<z.ZodString>;
                                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                                starts_at: z.ZodISODateTime;
                                ends_at: z.ZodNullable<z.ZodISODateTime>;
                                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                    kind: z.ZodLiteral<"percentage">;
                                    percent: z.ZodString;
                                }, z.core.$strict>, z.ZodObject<{
                                    kind: z.ZodLiteral<"fixed">;
                                    amount_minor: z.ZodString;
                                    currency: z.ZodString;
                                    currency_exponent: z.ZodNumber;
                                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                        item_id: z.ZodString;
                                        amount_minor: z.ZodString;
                                    }, z.core.$strict>>>;
                                    allocations_coverage: z.ZodEnum<{
                                        partial: "partial";
                                        complete: "complete";
                                    }>;
                                }, z.core.$strict>], "kind">;
                            }, z.core.$strict>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                    }, z.core.$strict>], "coverage">>;
                }, z.core.$strict>>;
            }, z.core.$strict>>;
        }, z.core.$strict>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"subscription">;
        kind: z.ZodLiteral<"source_observed">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        items: z.ZodArray<z.ZodObject<{
            item_id: z.ZodString;
            price: z.ZodObject<{
                price_id: z.ZodString;
                product_id: z.ZodOptional<z.ZodString>;
                interval: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    year: "year";
                }>;
                interval_count: z.ZodNumber;
                usage_type: z.ZodEnum<{
                    metered: "metered";
                    licensed: "licensed";
                }>;
                unit_amount_minor: z.ZodNullable<z.ZodString>;
                terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"per_unit">;
                    unit_amount_decimal: z.ZodString;
                    transform_quantity: z.ZodNullable<z.ZodObject<{
                        divide_by: z.ZodNumber;
                        round: z.ZodEnum<{
                            up: "up";
                            down: "down";
                        }>;
                    }, z.core.$strict>>;
                }, z.core.$strict>, z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"tiered">;
                    tiers_mode: z.ZodEnum<{
                        graduated: "graduated";
                        volume: "volume";
                    }>;
                    tiers: z.ZodArray<z.ZodObject<{
                        up_to: z.ZodNullable<z.ZodNumber>;
                        unit_amount_decimal: z.ZodNullable<z.ZodString>;
                        flat_amount_minor: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>], "billing_scheme">>;
            }, z.core.$strict>;
            quantity: z.ZodNumber;
            trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
        }, z.core.$strict>>;
        items_coverage: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
        recurrence: z.ZodOptional<z.ZodObject<{
            billing_cycle_anchor_at: z.ZodISODateTime;
            proration_behavior: z.ZodEnum<{
                none: "none";
                create_prorations: "create_prorations";
                always_invoice: "always_invoice";
            }>;
            billing_mode: z.ZodOptional<z.ZodEnum<{
                classic: "classic";
                flexible: "flexible";
            }>>;
            collection_method: z.ZodEnum<{
                charge_automatically: "charge_automatically";
                send_invoice: "send_invoice";
            }>;
            days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        }, z.core.$strict>>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        subscription_id: z.ZodString;
        status_after: z.ZodEnum<{
            active: "active";
            past_due: "past_due";
            canceled: "canceled";
            trialing: "trialing";
            unpaid: "unpaid";
            incomplete: "incomplete";
            incomplete_expired: "incomplete_expired";
            paused: "paused";
        }>;
        next_effective_at: z.ZodNullable<z.ZodISODateTime>;
        source_evidence: z.ZodOptional<z.ZodObject<{
            items: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>;
            phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">>;
            components: z.ZodOptional<z.ZodArray<z.ZodObject<{
                identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"subscription_item">;
                    item_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"schedule_component">;
                    phase_occurrence_key: z.ZodString;
                    source_revision: z.ZodString;
                    position: z.ZodNumber;
                    component_key: z.ZodString;
                }, z.core.$strict>], "kind">;
                quantity: z.ZodNullable<z.ZodNumber>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discounts: z.ZodOptional<z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        discount_id: z.ZodOptional<z.ZodString>;
                        reference: z.ZodOptional<z.ZodObject<{
                            kind: z.ZodEnum<{
                                discount: "discount";
                                coupon: "coupon";
                                promotion_code: "promotion_code";
                            }>;
                            id: z.ZodString;
                        }, z.core.$strict>>;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        terms: z.ZodObject<{
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>], "kind">;
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                        applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"known">;
                            discount: z.ZodObject<{
                                discount_id: z.ZodString;
                                recurrence: z.ZodEnum<{
                                    recurring: "recurring";
                                    invoice_only: "invoice_only";
                                }>;
                                item_id: z.ZodNullable<z.ZodString>;
                                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                                starts_at: z.ZodISODateTime;
                                ends_at: z.ZodNullable<z.ZodISODateTime>;
                                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                    kind: z.ZodLiteral<"percentage">;
                                    percent: z.ZodString;
                                }, z.core.$strict>, z.ZodObject<{
                                    kind: z.ZodLiteral<"fixed">;
                                    amount_minor: z.ZodString;
                                    currency: z.ZodString;
                                    currency_exponent: z.ZodNumber;
                                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                        item_id: z.ZodString;
                                        amount_minor: z.ZodString;
                                    }, z.core.$strict>>>;
                                    allocations_coverage: z.ZodEnum<{
                                        partial: "partial";
                                        complete: "complete";
                                    }>;
                                }, z.core.$strict>], "kind">;
                            }, z.core.$strict>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                    }, z.core.$strict>], "coverage">>;
                }, z.core.$strict>>;
            }, z.core.$strict>>>;
        }, z.core.$strict>>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"subscription">;
        kind: z.ZodLiteral<"create">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        items: z.ZodArray<z.ZodObject<{
            item_id: z.ZodString;
            price: z.ZodObject<{
                price_id: z.ZodString;
                product_id: z.ZodOptional<z.ZodString>;
                interval: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    year: "year";
                }>;
                interval_count: z.ZodNumber;
                usage_type: z.ZodEnum<{
                    metered: "metered";
                    licensed: "licensed";
                }>;
                unit_amount_minor: z.ZodNullable<z.ZodString>;
                terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"per_unit">;
                    unit_amount_decimal: z.ZodString;
                    transform_quantity: z.ZodNullable<z.ZodObject<{
                        divide_by: z.ZodNumber;
                        round: z.ZodEnum<{
                            up: "up";
                            down: "down";
                        }>;
                    }, z.core.$strict>>;
                }, z.core.$strict>, z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"tiered">;
                    tiers_mode: z.ZodEnum<{
                        graduated: "graduated";
                        volume: "volume";
                    }>;
                    tiers: z.ZodArray<z.ZodObject<{
                        up_to: z.ZodNullable<z.ZodNumber>;
                        unit_amount_decimal: z.ZodNullable<z.ZodString>;
                        flat_amount_minor: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>], "billing_scheme">>;
            }, z.core.$strict>;
            quantity: z.ZodNumber;
            trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
        }, z.core.$strict>>;
        items_coverage: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
        recurrence: z.ZodOptional<z.ZodObject<{
            billing_cycle_anchor_at: z.ZodISODateTime;
            proration_behavior: z.ZodEnum<{
                none: "none";
                create_prorations: "create_prorations";
                always_invoice: "always_invoice";
            }>;
            billing_mode: z.ZodOptional<z.ZodEnum<{
                classic: "classic";
                flexible: "flexible";
            }>>;
            collection_method: z.ZodEnum<{
                charge_automatically: "charge_automatically";
                send_invoice: "send_invoice";
            }>;
            days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        }, z.core.$strict>>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        subscription_id: z.ZodString;
        status_after: z.ZodEnum<{
            active: "active";
            past_due: "past_due";
            canceled: "canceled";
            trialing: "trialing";
            unpaid: "unpaid";
            incomplete: "incomplete";
            incomplete_expired: "incomplete_expired";
            paused: "paused";
        }>;
        next_effective_at: z.ZodNullable<z.ZodISODateTime>;
        source_evidence: z.ZodOptional<z.ZodObject<{
            items: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>;
            phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">>;
            components: z.ZodOptional<z.ZodArray<z.ZodObject<{
                identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"subscription_item">;
                    item_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"schedule_component">;
                    phase_occurrence_key: z.ZodString;
                    source_revision: z.ZodString;
                    position: z.ZodNumber;
                    component_key: z.ZodString;
                }, z.core.$strict>], "kind">;
                quantity: z.ZodNullable<z.ZodNumber>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discounts: z.ZodOptional<z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        discount_id: z.ZodOptional<z.ZodString>;
                        reference: z.ZodOptional<z.ZodObject<{
                            kind: z.ZodEnum<{
                                discount: "discount";
                                coupon: "coupon";
                                promotion_code: "promotion_code";
                            }>;
                            id: z.ZodString;
                        }, z.core.$strict>>;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        terms: z.ZodObject<{
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>], "kind">;
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                        applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"known">;
                            discount: z.ZodObject<{
                                discount_id: z.ZodString;
                                recurrence: z.ZodEnum<{
                                    recurring: "recurring";
                                    invoice_only: "invoice_only";
                                }>;
                                item_id: z.ZodNullable<z.ZodString>;
                                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                                starts_at: z.ZodISODateTime;
                                ends_at: z.ZodNullable<z.ZodISODateTime>;
                                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                    kind: z.ZodLiteral<"percentage">;
                                    percent: z.ZodString;
                                }, z.core.$strict>, z.ZodObject<{
                                    kind: z.ZodLiteral<"fixed">;
                                    amount_minor: z.ZodString;
                                    currency: z.ZodString;
                                    currency_exponent: z.ZodNumber;
                                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                        item_id: z.ZodString;
                                        amount_minor: z.ZodString;
                                    }, z.core.$strict>>>;
                                    allocations_coverage: z.ZodEnum<{
                                        partial: "partial";
                                        complete: "complete";
                                    }>;
                                }, z.core.$strict>], "kind">;
                            }, z.core.$strict>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                    }, z.core.$strict>], "coverage">>;
                }, z.core.$strict>>;
            }, z.core.$strict>>>;
        }, z.core.$strict>>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"subscription">;
        kind: z.ZodLiteral<"change">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        current_period_start_at: z.ZodISODateTime;
        current_period_end_at: z.ZodISODateTime;
        items: z.ZodArray<z.ZodObject<{
            item_id: z.ZodString;
            price: z.ZodObject<{
                price_id: z.ZodString;
                product_id: z.ZodOptional<z.ZodString>;
                interval: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    year: "year";
                }>;
                interval_count: z.ZodNumber;
                usage_type: z.ZodEnum<{
                    metered: "metered";
                    licensed: "licensed";
                }>;
                unit_amount_minor: z.ZodNullable<z.ZodString>;
                terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"per_unit">;
                    unit_amount_decimal: z.ZodString;
                    transform_quantity: z.ZodNullable<z.ZodObject<{
                        divide_by: z.ZodNumber;
                        round: z.ZodEnum<{
                            up: "up";
                            down: "down";
                        }>;
                    }, z.core.$strict>>;
                }, z.core.$strict>, z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"tiered">;
                    tiers_mode: z.ZodEnum<{
                        graduated: "graduated";
                        volume: "volume";
                    }>;
                    tiers: z.ZodArray<z.ZodObject<{
                        up_to: z.ZodNullable<z.ZodNumber>;
                        unit_amount_decimal: z.ZodNullable<z.ZodString>;
                        flat_amount_minor: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>], "billing_scheme">>;
            }, z.core.$strict>;
            quantity: z.ZodNumber;
            trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
        }, z.core.$strict>>;
        items_coverage: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
        recurrence: z.ZodOptional<z.ZodObject<{
            billing_cycle_anchor_at: z.ZodISODateTime;
            proration_behavior: z.ZodEnum<{
                none: "none";
                create_prorations: "create_prorations";
                always_invoice: "always_invoice";
            }>;
            billing_mode: z.ZodOptional<z.ZodEnum<{
                classic: "classic";
                flexible: "flexible";
            }>>;
            collection_method: z.ZodEnum<{
                charge_automatically: "charge_automatically";
                send_invoice: "send_invoice";
            }>;
            days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        }, z.core.$strict>>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        subscription_id: z.ZodString;
        status_after: z.ZodEnum<{
            active: "active";
            past_due: "past_due";
            canceled: "canceled";
            trialing: "trialing";
            unpaid: "unpaid";
            incomplete: "incomplete";
            incomplete_expired: "incomplete_expired";
            paused: "paused";
        }>;
        next_effective_at: z.ZodNullable<z.ZodISODateTime>;
        source_evidence: z.ZodOptional<z.ZodObject<{
            items: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>;
            phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">>;
            components: z.ZodOptional<z.ZodArray<z.ZodObject<{
                identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"subscription_item">;
                    item_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"schedule_component">;
                    phase_occurrence_key: z.ZodString;
                    source_revision: z.ZodString;
                    position: z.ZodNumber;
                    component_key: z.ZodString;
                }, z.core.$strict>], "kind">;
                quantity: z.ZodNullable<z.ZodNumber>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discounts: z.ZodOptional<z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        discount_id: z.ZodOptional<z.ZodString>;
                        reference: z.ZodOptional<z.ZodObject<{
                            kind: z.ZodEnum<{
                                discount: "discount";
                                coupon: "coupon";
                                promotion_code: "promotion_code";
                            }>;
                            id: z.ZodString;
                        }, z.core.$strict>>;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        terms: z.ZodObject<{
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>], "kind">;
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                        applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"known">;
                            discount: z.ZodObject<{
                                discount_id: z.ZodString;
                                recurrence: z.ZodEnum<{
                                    recurring: "recurring";
                                    invoice_only: "invoice_only";
                                }>;
                                item_id: z.ZodNullable<z.ZodString>;
                                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                                starts_at: z.ZodISODateTime;
                                ends_at: z.ZodNullable<z.ZodISODateTime>;
                                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                    kind: z.ZodLiteral<"percentage">;
                                    percent: z.ZodString;
                                }, z.core.$strict>, z.ZodObject<{
                                    kind: z.ZodLiteral<"fixed">;
                                    amount_minor: z.ZodString;
                                    currency: z.ZodString;
                                    currency_exponent: z.ZodNumber;
                                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                        item_id: z.ZodString;
                                        amount_minor: z.ZodString;
                                    }, z.core.$strict>>>;
                                    allocations_coverage: z.ZodEnum<{
                                        partial: "partial";
                                        complete: "complete";
                                    }>;
                                }, z.core.$strict>], "kind">;
                            }, z.core.$strict>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                    }, z.core.$strict>], "coverage">>;
                }, z.core.$strict>>;
            }, z.core.$strict>>>;
        }, z.core.$strict>>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"subscription">;
        kind: z.ZodLiteral<"renew">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        subscription_id: z.ZodString;
        status_after: z.ZodEnum<{
            active: "active";
            past_due: "past_due";
            canceled: "canceled";
            trialing: "trialing";
            unpaid: "unpaid";
            incomplete: "incomplete";
            incomplete_expired: "incomplete_expired";
            paused: "paused";
        }>;
        cancel_mode: z.ZodEnum<{
            immediate: "immediate";
            period_end: "period_end";
        }>;
        reason: z.ZodOptional<z.ZodString>;
        source_evidence: z.ZodOptional<z.ZodObject<{
            items: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>;
            phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">>;
            components: z.ZodOptional<z.ZodArray<z.ZodObject<{
                identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"subscription_item">;
                    item_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"schedule_component">;
                    phase_occurrence_key: z.ZodString;
                    source_revision: z.ZodString;
                    position: z.ZodNumber;
                    component_key: z.ZodString;
                }, z.core.$strict>], "kind">;
                quantity: z.ZodNullable<z.ZodNumber>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discounts: z.ZodOptional<z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        discount_id: z.ZodOptional<z.ZodString>;
                        reference: z.ZodOptional<z.ZodObject<{
                            kind: z.ZodEnum<{
                                discount: "discount";
                                coupon: "coupon";
                                promotion_code: "promotion_code";
                            }>;
                            id: z.ZodString;
                        }, z.core.$strict>>;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        terms: z.ZodObject<{
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>], "kind">;
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                        applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"known">;
                            discount: z.ZodObject<{
                                discount_id: z.ZodString;
                                recurrence: z.ZodEnum<{
                                    recurring: "recurring";
                                    invoice_only: "invoice_only";
                                }>;
                                item_id: z.ZodNullable<z.ZodString>;
                                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                                starts_at: z.ZodISODateTime;
                                ends_at: z.ZodNullable<z.ZodISODateTime>;
                                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                    kind: z.ZodLiteral<"percentage">;
                                    percent: z.ZodString;
                                }, z.core.$strict>, z.ZodObject<{
                                    kind: z.ZodLiteral<"fixed">;
                                    amount_minor: z.ZodString;
                                    currency: z.ZodString;
                                    currency_exponent: z.ZodNumber;
                                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                        item_id: z.ZodString;
                                        amount_minor: z.ZodString;
                                    }, z.core.$strict>>>;
                                    allocations_coverage: z.ZodEnum<{
                                        partial: "partial";
                                        complete: "complete";
                                    }>;
                                }, z.core.$strict>], "kind">;
                            }, z.core.$strict>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                    }, z.core.$strict>], "coverage">>;
                }, z.core.$strict>>;
            }, z.core.$strict>>>;
        }, z.core.$strict>>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"subscription">;
        kind: z.ZodLiteral<"cancel">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        subscription_id: z.ZodString;
        pause_mode: z.ZodEnum<{
            collection: "collection";
            service: "service";
        }>;
        resumes_at: z.ZodNullable<z.ZodISODateTime>;
        source_evidence: z.ZodOptional<z.ZodObject<{
            items: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>;
            phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">>;
            components: z.ZodOptional<z.ZodArray<z.ZodObject<{
                identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"subscription_item">;
                    item_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"schedule_component">;
                    phase_occurrence_key: z.ZodString;
                    source_revision: z.ZodString;
                    position: z.ZodNumber;
                    component_key: z.ZodString;
                }, z.core.$strict>], "kind">;
                quantity: z.ZodNullable<z.ZodNumber>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discounts: z.ZodOptional<z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        discount_id: z.ZodOptional<z.ZodString>;
                        reference: z.ZodOptional<z.ZodObject<{
                            kind: z.ZodEnum<{
                                discount: "discount";
                                coupon: "coupon";
                                promotion_code: "promotion_code";
                            }>;
                            id: z.ZodString;
                        }, z.core.$strict>>;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        terms: z.ZodObject<{
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>], "kind">;
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                        applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"known">;
                            discount: z.ZodObject<{
                                discount_id: z.ZodString;
                                recurrence: z.ZodEnum<{
                                    recurring: "recurring";
                                    invoice_only: "invoice_only";
                                }>;
                                item_id: z.ZodNullable<z.ZodString>;
                                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                                starts_at: z.ZodISODateTime;
                                ends_at: z.ZodNullable<z.ZodISODateTime>;
                                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                    kind: z.ZodLiteral<"percentage">;
                                    percent: z.ZodString;
                                }, z.core.$strict>, z.ZodObject<{
                                    kind: z.ZodLiteral<"fixed">;
                                    amount_minor: z.ZodString;
                                    currency: z.ZodString;
                                    currency_exponent: z.ZodNumber;
                                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                        item_id: z.ZodString;
                                        amount_minor: z.ZodString;
                                    }, z.core.$strict>>>;
                                    allocations_coverage: z.ZodEnum<{
                                        partial: "partial";
                                        complete: "complete";
                                    }>;
                                }, z.core.$strict>], "kind">;
                            }, z.core.$strict>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                    }, z.core.$strict>], "coverage">>;
                }, z.core.$strict>>;
            }, z.core.$strict>>>;
        }, z.core.$strict>>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"subscription">;
        kind: z.ZodLiteral<"pause">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        subscription_id: z.ZodString;
        pause_mode: z.ZodEnum<{
            collection: "collection";
            service: "service";
        }>;
        source_evidence: z.ZodOptional<z.ZodObject<{
            items: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>;
            phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">>;
            components: z.ZodOptional<z.ZodArray<z.ZodObject<{
                identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"subscription_item">;
                    item_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"schedule_component">;
                    phase_occurrence_key: z.ZodString;
                    source_revision: z.ZodString;
                    position: z.ZodNumber;
                    component_key: z.ZodString;
                }, z.core.$strict>], "kind">;
                quantity: z.ZodNullable<z.ZodNumber>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discounts: z.ZodOptional<z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        discount_id: z.ZodOptional<z.ZodString>;
                        reference: z.ZodOptional<z.ZodObject<{
                            kind: z.ZodEnum<{
                                discount: "discount";
                                coupon: "coupon";
                                promotion_code: "promotion_code";
                            }>;
                            id: z.ZodString;
                        }, z.core.$strict>>;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        terms: z.ZodObject<{
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>], "kind">;
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                        applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"known">;
                            discount: z.ZodObject<{
                                discount_id: z.ZodString;
                                recurrence: z.ZodEnum<{
                                    recurring: "recurring";
                                    invoice_only: "invoice_only";
                                }>;
                                item_id: z.ZodNullable<z.ZodString>;
                                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                                starts_at: z.ZodISODateTime;
                                ends_at: z.ZodNullable<z.ZodISODateTime>;
                                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                    kind: z.ZodLiteral<"percentage">;
                                    percent: z.ZodString;
                                }, z.core.$strict>, z.ZodObject<{
                                    kind: z.ZodLiteral<"fixed">;
                                    amount_minor: z.ZodString;
                                    currency: z.ZodString;
                                    currency_exponent: z.ZodNumber;
                                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                        item_id: z.ZodString;
                                        amount_minor: z.ZodString;
                                    }, z.core.$strict>>>;
                                    allocations_coverage: z.ZodEnum<{
                                        partial: "partial";
                                        complete: "complete";
                                    }>;
                                }, z.core.$strict>], "kind">;
                            }, z.core.$strict>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                    }, z.core.$strict>], "coverage">>;
                }, z.core.$strict>>;
            }, z.core.$strict>>>;
        }, z.core.$strict>>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"subscription">;
        kind: z.ZodLiteral<"resume">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        trial_start_at: z.ZodISODateTime;
        trial_end_at: z.ZodISODateTime;
        items: z.ZodArray<z.ZodObject<{
            item_id: z.ZodString;
            price: z.ZodObject<{
                price_id: z.ZodString;
                product_id: z.ZodOptional<z.ZodString>;
                interval: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    year: "year";
                }>;
                interval_count: z.ZodNumber;
                usage_type: z.ZodEnum<{
                    metered: "metered";
                    licensed: "licensed";
                }>;
                unit_amount_minor: z.ZodNullable<z.ZodString>;
                terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"per_unit">;
                    unit_amount_decimal: z.ZodString;
                    transform_quantity: z.ZodNullable<z.ZodObject<{
                        divide_by: z.ZodNumber;
                        round: z.ZodEnum<{
                            up: "up";
                            down: "down";
                        }>;
                    }, z.core.$strict>>;
                }, z.core.$strict>, z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"tiered">;
                    tiers_mode: z.ZodEnum<{
                        graduated: "graduated";
                        volume: "volume";
                    }>;
                    tiers: z.ZodArray<z.ZodObject<{
                        up_to: z.ZodNullable<z.ZodNumber>;
                        unit_amount_decimal: z.ZodNullable<z.ZodString>;
                        flat_amount_minor: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>], "billing_scheme">>;
            }, z.core.$strict>;
            quantity: z.ZodNumber;
            trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
        }, z.core.$strict>>;
        items_coverage: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
        recurrence: z.ZodOptional<z.ZodObject<{
            billing_cycle_anchor_at: z.ZodISODateTime;
            proration_behavior: z.ZodEnum<{
                none: "none";
                create_prorations: "create_prorations";
                always_invoice: "always_invoice";
            }>;
            billing_mode: z.ZodOptional<z.ZodEnum<{
                classic: "classic";
                flexible: "flexible";
            }>>;
            collection_method: z.ZodEnum<{
                charge_automatically: "charge_automatically";
                send_invoice: "send_invoice";
            }>;
            days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        }, z.core.$strict>>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        subscription_id: z.ZodString;
        status_after: z.ZodEnum<{
            active: "active";
            past_due: "past_due";
            canceled: "canceled";
            trialing: "trialing";
            unpaid: "unpaid";
            incomplete: "incomplete";
            incomplete_expired: "incomplete_expired";
            paused: "paused";
        }>;
        next_effective_at: z.ZodNullable<z.ZodISODateTime>;
        source_evidence: z.ZodOptional<z.ZodObject<{
            items: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>;
            phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">>;
            components: z.ZodOptional<z.ZodArray<z.ZodObject<{
                identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"subscription_item">;
                    item_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"schedule_component">;
                    phase_occurrence_key: z.ZodString;
                    source_revision: z.ZodString;
                    position: z.ZodNumber;
                    component_key: z.ZodString;
                }, z.core.$strict>], "kind">;
                quantity: z.ZodNullable<z.ZodNumber>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discounts: z.ZodOptional<z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        discount_id: z.ZodOptional<z.ZodString>;
                        reference: z.ZodOptional<z.ZodObject<{
                            kind: z.ZodEnum<{
                                discount: "discount";
                                coupon: "coupon";
                                promotion_code: "promotion_code";
                            }>;
                            id: z.ZodString;
                        }, z.core.$strict>>;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        terms: z.ZodObject<{
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>], "kind">;
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                        applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"known">;
                            discount: z.ZodObject<{
                                discount_id: z.ZodString;
                                recurrence: z.ZodEnum<{
                                    recurring: "recurring";
                                    invoice_only: "invoice_only";
                                }>;
                                item_id: z.ZodNullable<z.ZodString>;
                                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                                starts_at: z.ZodISODateTime;
                                ends_at: z.ZodNullable<z.ZodISODateTime>;
                                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                    kind: z.ZodLiteral<"percentage">;
                                    percent: z.ZodString;
                                }, z.core.$strict>, z.ZodObject<{
                                    kind: z.ZodLiteral<"fixed">;
                                    amount_minor: z.ZodString;
                                    currency: z.ZodString;
                                    currency_exponent: z.ZodNumber;
                                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                        item_id: z.ZodString;
                                        amount_minor: z.ZodString;
                                    }, z.core.$strict>>>;
                                    allocations_coverage: z.ZodEnum<{
                                        partial: "partial";
                                        complete: "complete";
                                    }>;
                                }, z.core.$strict>], "kind">;
                            }, z.core.$strict>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                    }, z.core.$strict>], "coverage">>;
                }, z.core.$strict>>;
            }, z.core.$strict>>>;
        }, z.core.$strict>>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"subscription">;
        kind: z.ZodLiteral<"trial_start">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        trial_start_at: z.ZodISODateTime;
        trial_end_at: z.ZodISODateTime;
        items: z.ZodArray<z.ZodObject<{
            item_id: z.ZodString;
            price: z.ZodObject<{
                price_id: z.ZodString;
                product_id: z.ZodOptional<z.ZodString>;
                interval: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    year: "year";
                }>;
                interval_count: z.ZodNumber;
                usage_type: z.ZodEnum<{
                    metered: "metered";
                    licensed: "licensed";
                }>;
                unit_amount_minor: z.ZodNullable<z.ZodString>;
                terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"per_unit">;
                    unit_amount_decimal: z.ZodString;
                    transform_quantity: z.ZodNullable<z.ZodObject<{
                        divide_by: z.ZodNumber;
                        round: z.ZodEnum<{
                            up: "up";
                            down: "down";
                        }>;
                    }, z.core.$strict>>;
                }, z.core.$strict>, z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"tiered">;
                    tiers_mode: z.ZodEnum<{
                        graduated: "graduated";
                        volume: "volume";
                    }>;
                    tiers: z.ZodArray<z.ZodObject<{
                        up_to: z.ZodNullable<z.ZodNumber>;
                        unit_amount_decimal: z.ZodNullable<z.ZodString>;
                        flat_amount_minor: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>], "billing_scheme">>;
            }, z.core.$strict>;
            quantity: z.ZodNumber;
            trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
        }, z.core.$strict>>;
        items_coverage: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
        recurrence: z.ZodOptional<z.ZodObject<{
            billing_cycle_anchor_at: z.ZodISODateTime;
            proration_behavior: z.ZodEnum<{
                none: "none";
                create_prorations: "create_prorations";
                always_invoice: "always_invoice";
            }>;
            billing_mode: z.ZodOptional<z.ZodEnum<{
                classic: "classic";
                flexible: "flexible";
            }>>;
            collection_method: z.ZodEnum<{
                charge_automatically: "charge_automatically";
                send_invoice: "send_invoice";
            }>;
            days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        }, z.core.$strict>>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        subscription_id: z.ZodString;
        status_after: z.ZodEnum<{
            active: "active";
            past_due: "past_due";
            canceled: "canceled";
            trialing: "trialing";
            unpaid: "unpaid";
            incomplete: "incomplete";
            incomplete_expired: "incomplete_expired";
            paused: "paused";
        }>;
        next_effective_at: z.ZodNullable<z.ZodISODateTime>;
        source_evidence: z.ZodOptional<z.ZodObject<{
            items: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>;
            phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">>;
            components: z.ZodOptional<z.ZodArray<z.ZodObject<{
                identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"subscription_item">;
                    item_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"schedule_component">;
                    phase_occurrence_key: z.ZodString;
                    source_revision: z.ZodString;
                    position: z.ZodNumber;
                    component_key: z.ZodString;
                }, z.core.$strict>], "kind">;
                quantity: z.ZodNullable<z.ZodNumber>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discounts: z.ZodOptional<z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        discount_id: z.ZodOptional<z.ZodString>;
                        reference: z.ZodOptional<z.ZodObject<{
                            kind: z.ZodEnum<{
                                discount: "discount";
                                coupon: "coupon";
                                promotion_code: "promotion_code";
                            }>;
                            id: z.ZodString;
                        }, z.core.$strict>>;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        terms: z.ZodObject<{
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>], "kind">;
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                        applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"known">;
                            discount: z.ZodObject<{
                                discount_id: z.ZodString;
                                recurrence: z.ZodEnum<{
                                    recurring: "recurring";
                                    invoice_only: "invoice_only";
                                }>;
                                item_id: z.ZodNullable<z.ZodString>;
                                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                                starts_at: z.ZodISODateTime;
                                ends_at: z.ZodNullable<z.ZodISODateTime>;
                                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                    kind: z.ZodLiteral<"percentage">;
                                    percent: z.ZodString;
                                }, z.core.$strict>, z.ZodObject<{
                                    kind: z.ZodLiteral<"fixed">;
                                    amount_minor: z.ZodString;
                                    currency: z.ZodString;
                                    currency_exponent: z.ZodNumber;
                                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                        item_id: z.ZodString;
                                        amount_minor: z.ZodString;
                                    }, z.core.$strict>>>;
                                    allocations_coverage: z.ZodEnum<{
                                        partial: "partial";
                                        complete: "complete";
                                    }>;
                                }, z.core.$strict>], "kind">;
                            }, z.core.$strict>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                    }, z.core.$strict>], "coverage">>;
                }, z.core.$strict>>;
            }, z.core.$strict>>>;
        }, z.core.$strict>>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"subscription">;
        kind: z.ZodLiteral<"trial_convert">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        trial_start_at: z.ZodISODateTime;
        trial_end_at: z.ZodISODateTime;
        subscription_id: z.ZodString;
        status_after: z.ZodEnum<{
            active: "active";
            past_due: "past_due";
            canceled: "canceled";
            trialing: "trialing";
            unpaid: "unpaid";
            incomplete: "incomplete";
            incomplete_expired: "incomplete_expired";
            paused: "paused";
        }>;
        source_evidence: z.ZodOptional<z.ZodObject<{
            items: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>;
            phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">>;
            components: z.ZodOptional<z.ZodArray<z.ZodObject<{
                identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"subscription_item">;
                    item_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"schedule_component">;
                    phase_occurrence_key: z.ZodString;
                    source_revision: z.ZodString;
                    position: z.ZodNumber;
                    component_key: z.ZodString;
                }, z.core.$strict>], "kind">;
                quantity: z.ZodNullable<z.ZodNumber>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discounts: z.ZodOptional<z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        discount_id: z.ZodOptional<z.ZodString>;
                        reference: z.ZodOptional<z.ZodObject<{
                            kind: z.ZodEnum<{
                                discount: "discount";
                                coupon: "coupon";
                                promotion_code: "promotion_code";
                            }>;
                            id: z.ZodString;
                        }, z.core.$strict>>;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        terms: z.ZodObject<{
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>], "kind">;
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                        applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"known">;
                            discount: z.ZodObject<{
                                discount_id: z.ZodString;
                                recurrence: z.ZodEnum<{
                                    recurring: "recurring";
                                    invoice_only: "invoice_only";
                                }>;
                                item_id: z.ZodNullable<z.ZodString>;
                                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                                starts_at: z.ZodISODateTime;
                                ends_at: z.ZodNullable<z.ZodISODateTime>;
                                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                    kind: z.ZodLiteral<"percentage">;
                                    percent: z.ZodString;
                                }, z.core.$strict>, z.ZodObject<{
                                    kind: z.ZodLiteral<"fixed">;
                                    amount_minor: z.ZodString;
                                    currency: z.ZodString;
                                    currency_exponent: z.ZodNumber;
                                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                        item_id: z.ZodString;
                                        amount_minor: z.ZodString;
                                    }, z.core.$strict>>>;
                                    allocations_coverage: z.ZodEnum<{
                                        partial: "partial";
                                        complete: "complete";
                                    }>;
                                }, z.core.$strict>], "kind">;
                            }, z.core.$strict>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                    }, z.core.$strict>], "coverage">>;
                }, z.core.$strict>>;
            }, z.core.$strict>>>;
        }, z.core.$strict>>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"subscription">;
        kind: z.ZodLiteral<"trial_expire">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        target_occurrence_key: z.ZodString;
        subscription_id: z.ZodString;
        source_evidence: z.ZodOptional<z.ZodObject<{
            items: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>;
            phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">>;
            components: z.ZodOptional<z.ZodArray<z.ZodObject<{
                identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"subscription_item">;
                    item_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"schedule_component">;
                    phase_occurrence_key: z.ZodString;
                    source_revision: z.ZodString;
                    position: z.ZodNumber;
                    component_key: z.ZodString;
                }, z.core.$strict>], "kind">;
                quantity: z.ZodNullable<z.ZodNumber>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discounts: z.ZodOptional<z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        discount_id: z.ZodOptional<z.ZodString>;
                        reference: z.ZodOptional<z.ZodObject<{
                            kind: z.ZodEnum<{
                                discount: "discount";
                                coupon: "coupon";
                                promotion_code: "promotion_code";
                            }>;
                            id: z.ZodString;
                        }, z.core.$strict>>;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        terms: z.ZodObject<{
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>], "kind">;
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                        applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"known">;
                            discount: z.ZodObject<{
                                discount_id: z.ZodString;
                                recurrence: z.ZodEnum<{
                                    recurring: "recurring";
                                    invoice_only: "invoice_only";
                                }>;
                                item_id: z.ZodNullable<z.ZodString>;
                                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                                starts_at: z.ZodISODateTime;
                                ends_at: z.ZodNullable<z.ZodISODateTime>;
                                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                    kind: z.ZodLiteral<"percentage">;
                                    percent: z.ZodString;
                                }, z.core.$strict>, z.ZodObject<{
                                    kind: z.ZodLiteral<"fixed">;
                                    amount_minor: z.ZodString;
                                    currency: z.ZodString;
                                    currency_exponent: z.ZodNumber;
                                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                        item_id: z.ZodString;
                                        amount_minor: z.ZodString;
                                    }, z.core.$strict>>>;
                                    allocations_coverage: z.ZodEnum<{
                                        partial: "partial";
                                        complete: "complete";
                                    }>;
                                }, z.core.$strict>], "kind">;
                            }, z.core.$strict>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                    }, z.core.$strict>], "coverage">>;
                }, z.core.$strict>>;
            }, z.core.$strict>>>;
        }, z.core.$strict>>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"subscription">;
        kind: z.ZodLiteral<"retract">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        target_occurrence_key: z.ZodString;
        items: z.ZodArray<z.ZodObject<{
            item_id: z.ZodString;
            price: z.ZodObject<{
                price_id: z.ZodString;
                product_id: z.ZodOptional<z.ZodString>;
                interval: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    year: "year";
                }>;
                interval_count: z.ZodNumber;
                usage_type: z.ZodEnum<{
                    metered: "metered";
                    licensed: "licensed";
                }>;
                unit_amount_minor: z.ZodNullable<z.ZodString>;
                terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"per_unit">;
                    unit_amount_decimal: z.ZodString;
                    transform_quantity: z.ZodNullable<z.ZodObject<{
                        divide_by: z.ZodNumber;
                        round: z.ZodEnum<{
                            up: "up";
                            down: "down";
                        }>;
                    }, z.core.$strict>>;
                }, z.core.$strict>, z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"tiered">;
                    tiers_mode: z.ZodEnum<{
                        graduated: "graduated";
                        volume: "volume";
                    }>;
                    tiers: z.ZodArray<z.ZodObject<{
                        up_to: z.ZodNullable<z.ZodNumber>;
                        unit_amount_decimal: z.ZodNullable<z.ZodString>;
                        flat_amount_minor: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>], "billing_scheme">>;
            }, z.core.$strict>;
            quantity: z.ZodNumber;
            trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
        }, z.core.$strict>>;
        items_coverage: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
        recurrence: z.ZodOptional<z.ZodObject<{
            billing_cycle_anchor_at: z.ZodISODateTime;
            proration_behavior: z.ZodEnum<{
                none: "none";
                create_prorations: "create_prorations";
                always_invoice: "always_invoice";
            }>;
            billing_mode: z.ZodOptional<z.ZodEnum<{
                classic: "classic";
                flexible: "flexible";
            }>>;
            collection_method: z.ZodEnum<{
                charge_automatically: "charge_automatically";
                send_invoice: "send_invoice";
            }>;
            days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        }, z.core.$strict>>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        subscription_id: z.ZodString;
        status_after: z.ZodEnum<{
            active: "active";
            past_due: "past_due";
            canceled: "canceled";
            trialing: "trialing";
            unpaid: "unpaid";
            incomplete: "incomplete";
            incomplete_expired: "incomplete_expired";
            paused: "paused";
        }>;
        next_effective_at: z.ZodNullable<z.ZodISODateTime>;
        source_evidence: z.ZodOptional<z.ZodObject<{
            items: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>;
            phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">>;
            components: z.ZodOptional<z.ZodArray<z.ZodObject<{
                identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"subscription_item">;
                    item_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"schedule_component">;
                    phase_occurrence_key: z.ZodString;
                    source_revision: z.ZodString;
                    position: z.ZodNumber;
                    component_key: z.ZodString;
                }, z.core.$strict>], "kind">;
                quantity: z.ZodNullable<z.ZodNumber>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discounts: z.ZodOptional<z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        discount_id: z.ZodOptional<z.ZodString>;
                        reference: z.ZodOptional<z.ZodObject<{
                            kind: z.ZodEnum<{
                                discount: "discount";
                                coupon: "coupon";
                                promotion_code: "promotion_code";
                            }>;
                            id: z.ZodString;
                        }, z.core.$strict>>;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        terms: z.ZodObject<{
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>], "kind">;
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                        applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"known">;
                            discount: z.ZodObject<{
                                discount_id: z.ZodString;
                                recurrence: z.ZodEnum<{
                                    recurring: "recurring";
                                    invoice_only: "invoice_only";
                                }>;
                                item_id: z.ZodNullable<z.ZodString>;
                                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                                starts_at: z.ZodISODateTime;
                                ends_at: z.ZodNullable<z.ZodISODateTime>;
                                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                    kind: z.ZodLiteral<"percentage">;
                                    percent: z.ZodString;
                                }, z.core.$strict>, z.ZodObject<{
                                    kind: z.ZodLiteral<"fixed">;
                                    amount_minor: z.ZodString;
                                    currency: z.ZodString;
                                    currency_exponent: z.ZodNumber;
                                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                        item_id: z.ZodString;
                                        amount_minor: z.ZodString;
                                    }, z.core.$strict>>>;
                                    allocations_coverage: z.ZodEnum<{
                                        partial: "partial";
                                        complete: "complete";
                                    }>;
                                }, z.core.$strict>], "kind">;
                            }, z.core.$strict>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                    }, z.core.$strict>], "coverage">>;
                }, z.core.$strict>>;
            }, z.core.$strict>>>;
        }, z.core.$strict>>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"subscription">;
        kind: z.ZodLiteral<"correct">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>], "kind">, z.ZodDiscriminatedUnion<[z.ZodObject<{
        schedule_id: z.ZodString;
        subscription_id: z.ZodNullable<z.ZodString>;
        phase_context: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                unavailable_history: "unavailable_history";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"known">;
            phase_index: z.ZodNumber;
            phase_start_at: z.ZodISODateTime;
            phase_end_at: z.ZodNullable<z.ZodISODateTime>;
        }, z.core.$strict>], "coverage">;
        source_evidence: z.ZodObject<{
            items: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>;
            phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">>;
            components: z.ZodArray<z.ZodObject<{
                identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"subscription_item">;
                    item_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"schedule_component">;
                    phase_occurrence_key: z.ZodString;
                    source_revision: z.ZodString;
                    position: z.ZodNumber;
                    component_key: z.ZodString;
                }, z.core.$strict>], "kind">;
                quantity: z.ZodNullable<z.ZodNumber>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discounts: z.ZodOptional<z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        discount_id: z.ZodOptional<z.ZodString>;
                        reference: z.ZodOptional<z.ZodObject<{
                            kind: z.ZodEnum<{
                                discount: "discount";
                                coupon: "coupon";
                                promotion_code: "promotion_code";
                            }>;
                            id: z.ZodString;
                        }, z.core.$strict>>;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        terms: z.ZodObject<{
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>], "kind">;
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                        applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"known">;
                            discount: z.ZodObject<{
                                discount_id: z.ZodString;
                                recurrence: z.ZodEnum<{
                                    recurring: "recurring";
                                    invoice_only: "invoice_only";
                                }>;
                                item_id: z.ZodNullable<z.ZodString>;
                                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                                starts_at: z.ZodISODateTime;
                                ends_at: z.ZodNullable<z.ZodISODateTime>;
                                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                    kind: z.ZodLiteral<"percentage">;
                                    percent: z.ZodString;
                                }, z.core.$strict>, z.ZodObject<{
                                    kind: z.ZodLiteral<"fixed">;
                                    amount_minor: z.ZodString;
                                    currency: z.ZodString;
                                    currency_exponent: z.ZodNumber;
                                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                        item_id: z.ZodString;
                                        amount_minor: z.ZodString;
                                    }, z.core.$strict>>>;
                                    allocations_coverage: z.ZodEnum<{
                                        partial: "partial";
                                        complete: "complete";
                                    }>;
                                }, z.core.$strict>], "kind">;
                            }, z.core.$strict>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                    }, z.core.$strict>], "coverage">>;
                }, z.core.$strict>>;
            }, z.core.$strict>>;
        }, z.core.$strict>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"schedule">;
        kind: z.ZodLiteral<"source_observed">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        items: z.ZodArray<z.ZodObject<{
            item_id: z.ZodString;
            price: z.ZodObject<{
                price_id: z.ZodString;
                product_id: z.ZodOptional<z.ZodString>;
                interval: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    year: "year";
                }>;
                interval_count: z.ZodNumber;
                usage_type: z.ZodEnum<{
                    metered: "metered";
                    licensed: "licensed";
                }>;
                unit_amount_minor: z.ZodNullable<z.ZodString>;
                terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"per_unit">;
                    unit_amount_decimal: z.ZodString;
                    transform_quantity: z.ZodNullable<z.ZodObject<{
                        divide_by: z.ZodNumber;
                        round: z.ZodEnum<{
                            up: "up";
                            down: "down";
                        }>;
                    }, z.core.$strict>>;
                }, z.core.$strict>, z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"tiered">;
                    tiers_mode: z.ZodEnum<{
                        graduated: "graduated";
                        volume: "volume";
                    }>;
                    tiers: z.ZodArray<z.ZodObject<{
                        up_to: z.ZodNullable<z.ZodNumber>;
                        unit_amount_decimal: z.ZodNullable<z.ZodString>;
                        flat_amount_minor: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>], "billing_scheme">>;
            }, z.core.$strict>;
            quantity: z.ZodNumber;
            trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
        }, z.core.$strict>>;
        observed_through: z.ZodISODateTime;
        phases_coverage: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
        recurrence: z.ZodOptional<z.ZodObject<{
            billing_cycle_anchor_at: z.ZodISODateTime;
            proration_behavior: z.ZodEnum<{
                none: "none";
                create_prorations: "create_prorations";
                always_invoice: "always_invoice";
            }>;
            billing_mode: z.ZodOptional<z.ZodEnum<{
                classic: "classic";
                flexible: "flexible";
            }>>;
            collection_method: z.ZodEnum<{
                charge_automatically: "charge_automatically";
                send_invoice: "send_invoice";
            }>;
            days_until_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        }, z.core.$strict>>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        schedule_id: z.ZodString;
        subscription_id: z.ZodNullable<z.ZodString>;
        phase_index: z.ZodNumber;
        phase_start_at: z.ZodISODateTime;
        phase_end_at: z.ZodNullable<z.ZodISODateTime>;
        source_evidence: z.ZodOptional<z.ZodObject<{
            items: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>;
            phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">>;
            components: z.ZodOptional<z.ZodArray<z.ZodObject<{
                identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"subscription_item">;
                    item_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"schedule_component">;
                    phase_occurrence_key: z.ZodString;
                    source_revision: z.ZodString;
                    position: z.ZodNumber;
                    component_key: z.ZodString;
                }, z.core.$strict>], "kind">;
                quantity: z.ZodNullable<z.ZodNumber>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discounts: z.ZodOptional<z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        discount_id: z.ZodOptional<z.ZodString>;
                        reference: z.ZodOptional<z.ZodObject<{
                            kind: z.ZodEnum<{
                                discount: "discount";
                                coupon: "coupon";
                                promotion_code: "promotion_code";
                            }>;
                            id: z.ZodString;
                        }, z.core.$strict>>;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        terms: z.ZodObject<{
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>], "kind">;
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                        applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"known">;
                            discount: z.ZodObject<{
                                discount_id: z.ZodString;
                                recurrence: z.ZodEnum<{
                                    recurring: "recurring";
                                    invoice_only: "invoice_only";
                                }>;
                                item_id: z.ZodNullable<z.ZodString>;
                                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                                starts_at: z.ZodISODateTime;
                                ends_at: z.ZodNullable<z.ZodISODateTime>;
                                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                    kind: z.ZodLiteral<"percentage">;
                                    percent: z.ZodString;
                                }, z.core.$strict>, z.ZodObject<{
                                    kind: z.ZodLiteral<"fixed">;
                                    amount_minor: z.ZodString;
                                    currency: z.ZodString;
                                    currency_exponent: z.ZodNumber;
                                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                        item_id: z.ZodString;
                                        amount_minor: z.ZodString;
                                    }, z.core.$strict>>>;
                                    allocations_coverage: z.ZodEnum<{
                                        partial: "partial";
                                        complete: "complete";
                                    }>;
                                }, z.core.$strict>], "kind">;
                            }, z.core.$strict>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                    }, z.core.$strict>], "coverage">>;
                }, z.core.$strict>>;
            }, z.core.$strict>>>;
        }, z.core.$strict>>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"schedule">;
        kind: z.ZodLiteral<"phase_declared">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        subscription_id: z.ZodString;
        cancel_effective_at: z.ZodISODateTime;
        source_evidence: z.ZodOptional<z.ZodObject<{
            items: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>;
            phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">>;
            components: z.ZodOptional<z.ZodArray<z.ZodObject<{
                identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"subscription_item">;
                    item_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"schedule_component">;
                    phase_occurrence_key: z.ZodString;
                    source_revision: z.ZodString;
                    position: z.ZodNumber;
                    component_key: z.ZodString;
                }, z.core.$strict>], "kind">;
                quantity: z.ZodNullable<z.ZodNumber>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discounts: z.ZodOptional<z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        discount_id: z.ZodOptional<z.ZodString>;
                        reference: z.ZodOptional<z.ZodObject<{
                            kind: z.ZodEnum<{
                                discount: "discount";
                                coupon: "coupon";
                                promotion_code: "promotion_code";
                            }>;
                            id: z.ZodString;
                        }, z.core.$strict>>;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        terms: z.ZodObject<{
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>], "kind">;
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                        applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"known">;
                            discount: z.ZodObject<{
                                discount_id: z.ZodString;
                                recurrence: z.ZodEnum<{
                                    recurring: "recurring";
                                    invoice_only: "invoice_only";
                                }>;
                                item_id: z.ZodNullable<z.ZodString>;
                                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                                starts_at: z.ZodISODateTime;
                                ends_at: z.ZodNullable<z.ZodISODateTime>;
                                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                    kind: z.ZodLiteral<"percentage">;
                                    percent: z.ZodString;
                                }, z.core.$strict>, z.ZodObject<{
                                    kind: z.ZodLiteral<"fixed">;
                                    amount_minor: z.ZodString;
                                    currency: z.ZodString;
                                    currency_exponent: z.ZodNumber;
                                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                        item_id: z.ZodString;
                                        amount_minor: z.ZodString;
                                    }, z.core.$strict>>>;
                                    allocations_coverage: z.ZodEnum<{
                                        partial: "partial";
                                        complete: "complete";
                                    }>;
                                }, z.core.$strict>], "kind">;
                            }, z.core.$strict>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                    }, z.core.$strict>], "coverage">>;
                }, z.core.$strict>>;
            }, z.core.$strict>>>;
        }, z.core.$strict>>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"schedule">;
        kind: z.ZodLiteral<"cancellation_scheduled">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        target_occurrence_key: z.ZodString;
        subscription_id: z.ZodString;
        source_evidence: z.ZodOptional<z.ZodObject<{
            items: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>;
            phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">>;
            components: z.ZodOptional<z.ZodArray<z.ZodObject<{
                identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"subscription_item">;
                    item_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"schedule_component">;
                    phase_occurrence_key: z.ZodString;
                    source_revision: z.ZodString;
                    position: z.ZodNumber;
                    component_key: z.ZodString;
                }, z.core.$strict>], "kind">;
                quantity: z.ZodNullable<z.ZodNumber>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discounts: z.ZodOptional<z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        discount_id: z.ZodOptional<z.ZodString>;
                        reference: z.ZodOptional<z.ZodObject<{
                            kind: z.ZodEnum<{
                                discount: "discount";
                                coupon: "coupon";
                                promotion_code: "promotion_code";
                            }>;
                            id: z.ZodString;
                        }, z.core.$strict>>;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        terms: z.ZodObject<{
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>], "kind">;
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                        applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"known">;
                            discount: z.ZodObject<{
                                discount_id: z.ZodString;
                                recurrence: z.ZodEnum<{
                                    recurring: "recurring";
                                    invoice_only: "invoice_only";
                                }>;
                                item_id: z.ZodNullable<z.ZodString>;
                                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                                starts_at: z.ZodISODateTime;
                                ends_at: z.ZodNullable<z.ZodISODateTime>;
                                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                    kind: z.ZodLiteral<"percentage">;
                                    percent: z.ZodString;
                                }, z.core.$strict>, z.ZodObject<{
                                    kind: z.ZodLiteral<"fixed">;
                                    amount_minor: z.ZodString;
                                    currency: z.ZodString;
                                    currency_exponent: z.ZodNumber;
                                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                        item_id: z.ZodString;
                                        amount_minor: z.ZodString;
                                    }, z.core.$strict>>>;
                                    allocations_coverage: z.ZodEnum<{
                                        partial: "partial";
                                        complete: "complete";
                                    }>;
                                }, z.core.$strict>], "kind">;
                            }, z.core.$strict>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                    }, z.core.$strict>], "coverage">>;
                }, z.core.$strict>>;
            }, z.core.$strict>>>;
        }, z.core.$strict>>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"schedule">;
        kind: z.ZodLiteral<"cancellation_withdrawn">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        target_occurrence_key: z.ZodString;
        schedule_id: z.ZodString;
        source_evidence: z.ZodOptional<z.ZodObject<{
            items: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    discount_id: z.ZodOptional<z.ZodString>;
                    reference: z.ZodOptional<z.ZodObject<{
                        kind: z.ZodEnum<{
                            discount: "discount";
                            coupon: "coupon";
                            promotion_code: "promotion_code";
                        }>;
                        id: z.ZodString;
                    }, z.core.$strict>>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    terms: z.ZodObject<{
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>], "kind">;
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        discount: z.ZodObject<{
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                amount_minor: z.ZodString;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                    item_id: z.ZodString;
                                    amount_minor: z.ZodString;
                                }, z.core.$strict>>>;
                                allocations_coverage: z.ZodEnum<{
                                    partial: "partial";
                                    complete: "complete";
                                }>;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                }, z.core.$strict>], "coverage">>;
            }, z.core.$strict>;
            phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">>;
            components: z.ZodOptional<z.ZodArray<z.ZodObject<{
                identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"subscription_item">;
                    item_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"schedule_component">;
                    phase_occurrence_key: z.ZodString;
                    source_revision: z.ZodString;
                    position: z.ZodNumber;
                    component_key: z.ZodString;
                }, z.core.$strict>], "kind">;
                quantity: z.ZodNullable<z.ZodNumber>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    price_id: z.ZodNullable<z.ZodString>;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    price: z.ZodObject<{
                        price_id: z.ZodString;
                        product_id: z.ZodOptional<z.ZodString>;
                        interval: z.ZodEnum<{
                            day: "day";
                            week: "week";
                            month: "month";
                            year: "year";
                        }>;
                        interval_count: z.ZodNumber;
                        usage_type: z.ZodEnum<{
                            metered: "metered";
                            licensed: "licensed";
                        }>;
                        unit_amount_minor: z.ZodNullable<z.ZodString>;
                        terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"per_unit">;
                            unit_amount_decimal: z.ZodString;
                            transform_quantity: z.ZodNullable<z.ZodObject<{
                                divide_by: z.ZodNumber;
                                round: z.ZodEnum<{
                                    up: "up";
                                    down: "down";
                                }>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>, z.ZodObject<{
                            billing_scheme: z.ZodLiteral<"tiered">;
                            tiers_mode: z.ZodEnum<{
                                graduated: "graduated";
                                volume: "volume";
                            }>;
                            tiers: z.ZodArray<z.ZodObject<{
                                up_to: z.ZodNullable<z.ZodNumber>;
                                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                flat_amount_minor: z.ZodNullable<z.ZodString>;
                            }, z.core.$strict>>;
                        }, z.core.$strict>], "billing_scheme">>;
                    }, z.core.$strict>;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                discounts: z.ZodOptional<z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        discount_id: z.ZodOptional<z.ZodString>;
                        reference: z.ZodOptional<z.ZodObject<{
                            kind: z.ZodEnum<{
                                discount: "discount";
                                coupon: "coupon";
                                promotion_code: "promotion_code";
                            }>;
                            id: z.ZodString;
                        }, z.core.$strict>>;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        terms: z.ZodObject<{
                            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"percentage">;
                                percent: z.ZodString;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"fixed">;
                                currency: z.ZodString;
                                currency_exponent: z.ZodNumber;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>], "kind">;
                            discount_id: z.ZodString;
                            recurrence: z.ZodEnum<{
                                recurring: "recurring";
                                invoice_only: "invoice_only";
                            }>;
                            item_id: z.ZodNullable<z.ZodString>;
                            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                            starts_at: z.ZodISODateTime;
                            ends_at: z.ZodNullable<z.ZodISODateTime>;
                        }, z.core.$strict>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                        applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"known">;
                            discount: z.ZodObject<{
                                discount_id: z.ZodString;
                                recurrence: z.ZodEnum<{
                                    recurring: "recurring";
                                    invoice_only: "invoice_only";
                                }>;
                                item_id: z.ZodNullable<z.ZodString>;
                                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                                starts_at: z.ZodISODateTime;
                                ends_at: z.ZodNullable<z.ZodISODateTime>;
                                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                    kind: z.ZodLiteral<"percentage">;
                                    percent: z.ZodString;
                                }, z.core.$strict>, z.ZodObject<{
                                    kind: z.ZodLiteral<"fixed">;
                                    amount_minor: z.ZodString;
                                    currency: z.ZodString;
                                    currency_exponent: z.ZodNumber;
                                    allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                        item_id: z.ZodString;
                                        amount_minor: z.ZodString;
                                    }, z.core.$strict>>>;
                                    allocations_coverage: z.ZodEnum<{
                                        partial: "partial";
                                        complete: "complete";
                                    }>;
                                }, z.core.$strict>], "kind">;
                            }, z.core.$strict>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                    }, z.core.$strict>], "coverage">>;
                }, z.core.$strict>>;
            }, z.core.$strict>>>;
        }, z.core.$strict>>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"schedule">;
        kind: z.ZodLiteral<"retract">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>], "kind">, z.ZodDiscriminatedUnion<[z.ZodObject<{
        invoice_id: z.ZodString;
        source_evidence: z.ZodObject<{
            header: z.ZodObject<{
                created_at: z.ZodNullable<z.ZodISODateTime>;
                due_at: z.ZodNullable<z.ZodISODateTime>;
                finalized_at: z.ZodNullable<z.ZodISODateTime>;
                paid_at: z.ZodNullable<z.ZodISODateTime>;
                voided_at: z.ZodNullable<z.ZodISODateTime>;
                marked_uncollectible_at: z.ZodNullable<z.ZodISODateTime>;
                subtotal_minor: z.ZodNullable<z.ZodString>;
                subtotal_excluding_tax_minor: z.ZodNullable<z.ZodString>;
                total_minor: z.ZodNullable<z.ZodString>;
                total_excluding_tax_minor: z.ZodNullable<z.ZodString>;
                amount_due_minor: z.ZodNullable<z.ZodString>;
                amount_paid_minor: z.ZodNullable<z.ZodString>;
                amount_remaining_minor: z.ZodNullable<z.ZodString>;
                amount_overpaid_minor: z.ZodNullable<z.ZodString>;
                starting_balance_minor: z.ZodNullable<z.ZodString>;
                ending_balance_minor: z.ZodNullable<z.ZodString>;
                pre_payment_credit_notes_amount_minor: z.ZodNullable<z.ZodString>;
                post_payment_credit_notes_amount_minor: z.ZodNullable<z.ZodString>;
                taxes: z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    data: z.ZodArray<z.ZodObject<{
                        amount_minor: z.ZodNullable<z.ZodString>;
                        tax_behavior: z.ZodNullable<z.ZodEnum<{
                            inclusive: "inclusive";
                            exclusive: "exclusive";
                        }>>;
                        tax_rate_id: z.ZodNullable<z.ZodString>;
                        taxable_amount_minor: z.ZodNullable<z.ZodString>;
                        taxability_reason: z.ZodNullable<z.ZodEnum<{
                            customer_exempt: "customer_exempt";
                            not_available: "not_available";
                            not_collecting: "not_collecting";
                            not_subject_to_tax: "not_subject_to_tax";
                            not_supported: "not_supported";
                            portion_product_exempt: "portion_product_exempt";
                            portion_reduced_rated: "portion_reduced_rated";
                            portion_standard_rated: "portion_standard_rated";
                            product_exempt: "product_exempt";
                            product_exempt_holiday: "product_exempt_holiday";
                            proportionally_rated: "proportionally_rated";
                            reduced_rated: "reduced_rated";
                            reverse_charge: "reverse_charge";
                            standard_rated: "standard_rated";
                            taxable_basis_reduced: "taxable_basis_reduced";
                            zero_rated: "zero_rated";
                        }>>;
                    }, z.core.$strict>>;
                }, z.core.$strict>;
                discounts: z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    data: z.ZodArray<z.ZodObject<{
                        discount_id: z.ZodString;
                        amount_minor: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>;
                pretax_credits: z.ZodObject<{
                    evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"partial">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"complete">;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    data: z.ZodArray<z.ZodObject<{
                        type: z.ZodEnum<{
                            discount: "discount";
                            credit_balance_transaction: "credit_balance_transaction";
                        }>;
                        reference_id: z.ZodString;
                        amount_minor: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                api_version: z.ZodNullable<z.ZodString>;
                subscription_id: z.ZodNullable<z.ZodString>;
                status: z.ZodNullable<z.ZodEnum<{
                    void: "void";
                    paid: "paid";
                    draft: "draft";
                    open: "open";
                    uncollectible: "uncollectible";
                }>>;
                previous_status: z.ZodNullable<z.ZodEnum<{
                    void: "void";
                    paid: "paid";
                    draft: "draft";
                    open: "open";
                    uncollectible: "uncollectible";
                }>>;
                collection_method: z.ZodNullable<z.ZodEnum<{
                    charge_automatically: "charge_automatically";
                    send_invoice: "send_invoice";
                }>>;
            }, z.core.$strict>;
            lines: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                data: z.ZodArray<z.ZodObject<{
                    amount_minor: z.ZodNullable<z.ZodString>;
                    subtotal_minor: z.ZodNullable<z.ZodString>;
                    quantity: z.ZodNullable<z.ZodNumber>;
                    quantity_decimal: z.ZodNullable<z.ZodString>;
                    period_start_at: z.ZodNullable<z.ZodISODateTime>;
                    period_end_at: z.ZodNullable<z.ZodISODateTime>;
                    parent: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        proration: z.ZodNullable<z.ZodBoolean>;
                        credited_items: z.ZodNullable<z.ZodObject<{
                            invoice_id: z.ZodString;
                            invoice_line_ids: z.ZodArray<z.ZodString>;
                        }, z.core.$strict>>;
                        type: z.ZodLiteral<"invoice_item_details">;
                        invoice_item_id: z.ZodNullable<z.ZodString>;
                        subscription_id: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>, z.ZodObject<{
                        proration: z.ZodNullable<z.ZodBoolean>;
                        credited_items: z.ZodNullable<z.ZodObject<{
                            invoice_id: z.ZodString;
                            invoice_line_ids: z.ZodArray<z.ZodString>;
                        }, z.core.$strict>>;
                        type: z.ZodLiteral<"subscription_item_details">;
                        subscription_item_id: z.ZodNullable<z.ZodString>;
                        invoice_item_id: z.ZodNullable<z.ZodString>;
                        subscription_id: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>], "type">>;
                    pricing: z.ZodNullable<z.ZodObject<{
                        type: z.ZodLiteral<"price_details">;
                        price_id: z.ZodNullable<z.ZodString>;
                        product_id: z.ZodNullable<z.ZodString>;
                        unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>>;
                    price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        coverage: z.ZodLiteral<"unknown">;
                        price_id: z.ZodNullable<z.ZodString>;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>, z.ZodObject<{
                        coverage: z.ZodLiteral<"known">;
                        price: z.ZodObject<{
                            price_id: z.ZodString;
                            product_id: z.ZodOptional<z.ZodString>;
                            interval: z.ZodEnum<{
                                day: "day";
                                week: "week";
                                month: "month";
                                year: "year";
                            }>;
                            interval_count: z.ZodNumber;
                            usage_type: z.ZodEnum<{
                                metered: "metered";
                                licensed: "licensed";
                            }>;
                            unit_amount_minor: z.ZodNullable<z.ZodString>;
                            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                                billing_scheme: z.ZodLiteral<"per_unit">;
                                unit_amount_decimal: z.ZodString;
                                transform_quantity: z.ZodNullable<z.ZodObject<{
                                    divide_by: z.ZodNumber;
                                    round: z.ZodEnum<{
                                        up: "up";
                                        down: "down";
                                    }>;
                                }, z.core.$strict>>;
                            }, z.core.$strict>, z.ZodObject<{
                                billing_scheme: z.ZodLiteral<"tiered">;
                                tiers_mode: z.ZodEnum<{
                                    graduated: "graduated";
                                    volume: "volume";
                                }>;
                                tiers: z.ZodArray<z.ZodObject<{
                                    up_to: z.ZodNullable<z.ZodNumber>;
                                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                                }, z.core.$strict>>;
                            }, z.core.$strict>], "billing_scheme">>;
                        }, z.core.$strict>;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"event_snapshot">;
                            event_id: z.ZodString;
                            source_recorded_at: z.ZodISODateTime;
                            event_type: z.ZodOptional<z.ZodString>;
                            payload_style: z.ZodOptional<z.ZodEnum<{
                                snapshot: "snapshot";
                                thin: "thin";
                            }>>;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"retrieved_snapshot">;
                            retrieved_at: z.ZodISODateTime;
                            source: z.ZodObject<{
                                tenant_id: z.ZodString;
                                account_id: z.ZodString;
                                livemode: z.ZodBoolean;
                                provider: z.ZodEnum<{
                                    stripe: "stripe";
                                }>;
                                simulation_id: z.ZodOptional<z.ZodString>;
                            }, z.core.$strict>;
                            observed_at: z.ZodISODateTime;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>], "coverage">;
                    discountable: z.ZodNullable<z.ZodBoolean>;
                    discounts: z.ZodObject<{
                        evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"partial">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"complete">;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                        data: z.ZodArray<z.ZodObject<{
                            discount_id: z.ZodString;
                            amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>;
                    taxes: z.ZodObject<{
                        evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"partial">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"complete">;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                        data: z.ZodArray<z.ZodObject<{
                            amount_minor: z.ZodNullable<z.ZodString>;
                            tax_behavior: z.ZodNullable<z.ZodEnum<{
                                inclusive: "inclusive";
                                exclusive: "exclusive";
                            }>>;
                            tax_rate_id: z.ZodNullable<z.ZodString>;
                            taxable_amount_minor: z.ZodNullable<z.ZodString>;
                            taxability_reason: z.ZodNullable<z.ZodEnum<{
                                customer_exempt: "customer_exempt";
                                not_available: "not_available";
                                not_collecting: "not_collecting";
                                not_subject_to_tax: "not_subject_to_tax";
                                not_supported: "not_supported";
                                portion_product_exempt: "portion_product_exempt";
                                portion_reduced_rated: "portion_reduced_rated";
                                portion_standard_rated: "portion_standard_rated";
                                product_exempt: "product_exempt";
                                product_exempt_holiday: "product_exempt_holiday";
                                proportionally_rated: "proportionally_rated";
                                reduced_rated: "reduced_rated";
                                reverse_charge: "reverse_charge";
                                standard_rated: "standard_rated";
                                taxable_basis_reduced: "taxable_basis_reduced";
                                zero_rated: "zero_rated";
                            }>>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>;
                    pretax_credits: z.ZodObject<{
                        evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            coverage: z.ZodLiteral<"unknown">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"partial">;
                            reason: z.ZodEnum<{
                                not_hydrated: "not_hydrated";
                                page_limit: "page_limit";
                                unavailable_history: "unavailable_history";
                                unresolved_reference: "unresolved_reference";
                                unresolved_allocation: "unresolved_allocation";
                                provider_failure: "provider_failure";
                            }>;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>, z.ZodObject<{
                            coverage: z.ZodLiteral<"complete">;
                            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                                kind: z.ZodLiteral<"event_snapshot">;
                                event_id: z.ZodString;
                                source_recorded_at: z.ZodISODateTime;
                                event_type: z.ZodOptional<z.ZodString>;
                                payload_style: z.ZodOptional<z.ZodEnum<{
                                    snapshot: "snapshot";
                                    thin: "thin";
                                }>>;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>, z.ZodObject<{
                                kind: z.ZodLiteral<"retrieved_snapshot">;
                                retrieved_at: z.ZodISODateTime;
                                source: z.ZodObject<{
                                    tenant_id: z.ZodString;
                                    account_id: z.ZodString;
                                    livemode: z.ZodBoolean;
                                    provider: z.ZodEnum<{
                                        stripe: "stripe";
                                    }>;
                                    simulation_id: z.ZodOptional<z.ZodString>;
                                }, z.core.$strict>;
                                observed_at: z.ZodISODateTime;
                            }, z.core.$strict>], "kind">;
                        }, z.core.$strict>], "coverage">;
                        data: z.ZodArray<z.ZodObject<{
                            type: z.ZodEnum<{
                                discount: "discount";
                                credit_balance_transaction: "credit_balance_transaction";
                            }>;
                            reference_id: z.ZodString;
                            amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>;
                    currency: z.ZodNullable<z.ZodString>;
                    currency_exponent: z.ZodNullable<z.ZodNumber>;
                    line_id: z.ZodString;
                    invoice_id: z.ZodString;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>>;
                pages_fetched: z.ZodNumber;
                has_more: z.ZodNullable<z.ZodBoolean>;
                next_cursor: z.ZodNullable<z.ZodString>;
                total_count: z.ZodNullable<z.ZodNumber>;
            }, z.core.$strict>;
            payments: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                data: z.ZodArray<z.ZodObject<{
                    amount_requested_minor: z.ZodNullable<z.ZodString>;
                    amount_paid_minor: z.ZodNullable<z.ZodString>;
                    created_at: z.ZodNullable<z.ZodISODateTime>;
                    paid_at: z.ZodNullable<z.ZodISODateTime>;
                    canceled_at: z.ZodNullable<z.ZodISODateTime>;
                    currency: z.ZodNullable<z.ZodString>;
                    currency_exponent: z.ZodNullable<z.ZodNumber>;
                    invoice_payment_id: z.ZodString;
                    invoice_id: z.ZodString;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        type: z.ZodLiteral<"payment_intent">;
                        payment_id: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        type: z.ZodLiteral<"charge">;
                        payment_id: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        type: z.ZodLiteral<"payment_record">;
                        payment_id: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        type: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>], "type">;
                    status: z.ZodNullable<z.ZodEnum<{
                        canceled: "canceled";
                        paid: "paid";
                        open: "open";
                    }>>;
                    is_default: z.ZodNullable<z.ZodBoolean>;
                }, z.core.$strict>>;
                pages_fetched: z.ZodNumber;
                has_more: z.ZodNullable<z.ZodBoolean>;
                next_cursor: z.ZodNullable<z.ZodString>;
                total_count: z.ZodNullable<z.ZodNumber>;
            }, z.core.$strict>;
            event_payment: z.ZodOptional<z.ZodObject<{
                amount_requested_minor: z.ZodNullable<z.ZodString>;
                amount_paid_minor: z.ZodNullable<z.ZodString>;
                created_at: z.ZodNullable<z.ZodISODateTime>;
                paid_at: z.ZodNullable<z.ZodISODateTime>;
                canceled_at: z.ZodNullable<z.ZodISODateTime>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
                invoice_payment_id: z.ZodString;
                invoice_id: z.ZodString;
                payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    type: z.ZodLiteral<"payment_intent">;
                    payment_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    type: z.ZodLiteral<"charge">;
                    payment_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    type: z.ZodLiteral<"payment_record">;
                    payment_id: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    type: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>], "type">;
                status: z.ZodNullable<z.ZodEnum<{
                    canceled: "canceled";
                    paid: "paid";
                    open: "open";
                }>>;
                is_default: z.ZodNullable<z.ZodBoolean>;
                provenance: z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>;
            }, z.core.$strict>>;
        }, z.core.$strict>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"invoice">;
        kind: z.ZodLiteral<"source_observed">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        total_minor: z.ZodString;
        amount_due_minor: z.ZodString;
        due_at: z.ZodNullable<z.ZodISODateTime>;
        line_count: z.ZodNumber;
        lines_coverage: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
        payment_count: z.ZodOptional<z.ZodNumber>;
        payments_coverage: z.ZodOptional<z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        invoice_id: z.ZodString;
        subscription_id: z.ZodNullable<z.ZodString>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"invoice">;
        kind: z.ZodLiteral<"finalized">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        subtotal_minor: z.ZodString;
        discount_minor: z.ZodString;
        tax_minor: z.ZodString;
        total_minor: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        subscription_id: z.ZodString;
        subscription_item_id: z.ZodString;
        price: z.ZodObject<{
            price_id: z.ZodString;
            product_id: z.ZodOptional<z.ZodString>;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
            usage_type: z.ZodEnum<{
                metered: "metered";
                licensed: "licensed";
            }>;
            unit_amount_minor: z.ZodNullable<z.ZodString>;
            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                billing_scheme: z.ZodLiteral<"per_unit">;
                unit_amount_decimal: z.ZodString;
                transform_quantity: z.ZodNullable<z.ZodObject<{
                    divide_by: z.ZodNumber;
                    round: z.ZodEnum<{
                        up: "up";
                        down: "down";
                    }>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                billing_scheme: z.ZodLiteral<"tiered">;
                tiers_mode: z.ZodEnum<{
                    graduated: "graduated";
                    volume: "volume";
                }>;
                tiers: z.ZodArray<z.ZodObject<{
                    up_to: z.ZodNullable<z.ZodNumber>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>], "billing_scheme">>;
        }, z.core.$strict>;
        quantity: z.ZodNumber;
        service_period_start_at: z.ZodISODateTime;
        service_period_end_at: z.ZodISODateTime;
        proration: z.ZodBoolean;
        invoice_id: z.ZodString;
        line_id: z.ZodString;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"invoice">;
        kind: z.ZodLiteral<"recurring_line">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        subtotal_minor: z.ZodString;
        discount_minor: z.ZodString;
        tax_minor: z.ZodString;
        total_minor: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        trial_start_at: z.ZodISODateTime;
        trial_end_at: z.ZodISODateTime;
        subscription_id: z.ZodString;
        subscription_item_id: z.ZodString;
        invoice_id: z.ZodString;
        line_id: z.ZodString;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"invoice">;
        kind: z.ZodLiteral<"trial_line">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        subtotal_minor: z.ZodString;
        discount_minor: z.ZodString;
        tax_minor: z.ZodString;
        total_minor: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        price_id: z.ZodNullable<z.ZodString>;
        quantity: z.ZodNumber;
        invoice_id: z.ZodString;
        line_id: z.ZodString;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"invoice">;
        kind: z.ZodLiteral<"one_time_line">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        economic_owner: z.ZodOptional<z.ZodObject<{
            owner_account_id: z.ZodString;
            charge_type: z.ZodEnum<{
                platform: "platform";
                direct: "direct";
                destination: "destination";
                separate_charges_and_transfers: "separate_charges_and_transfers";
            }>;
            on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$strict>>;
        amount_requested_minor: z.ZodString;
        amount_paid_minor: z.ZodNullable<z.ZodString>;
        paid_at: z.ZodNullable<z.ZodISODateTime>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        invoice_payment_id: z.ZodString;
        invoice_id: z.ZodString;
        payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
            type: z.ZodLiteral<"payment_intent">;
            payment_id: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"charge">;
            payment_id: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"out_of_band">;
        }, z.core.$strict>], "type">;
        status: z.ZodEnum<{
            canceled: "canceled";
            paid: "paid";
            open: "open";
        }>;
        is_default: z.ZodOptional<z.ZodBoolean>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"invoice">;
        kind: z.ZodLiteral<"payment_allocation">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        amount_due_minor: z.ZodString;
        amount_paid_minor: z.ZodString;
        amount_remaining_minor: z.ZodString;
        due_at: z.ZodNullable<z.ZodISODateTime>;
        paid_out_of_band: z.ZodBoolean;
        settlement_basis: z.ZodNullable<z.ZodEnum<{
            mixed: "mixed";
            customer_balance: "customer_balance";
            credit_note: "credit_note";
            rollover: "rollover";
            payments: "payments";
            out_of_band: "out_of_band";
            zero_total: "zero_total";
        }>>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        invoice_id: z.ZodString;
        subscription_id: z.ZodNullable<z.ZodString>;
        from_status: z.ZodEnum<{
            void: "void";
            paid: "paid";
            draft: "draft";
            open: "open";
            uncollectible: "uncollectible";
        }>;
        to_status: z.ZodEnum<{
            void: "void";
            paid: "paid";
            draft: "draft";
            open: "open";
            uncollectible: "uncollectible";
        }>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"invoice">;
        kind: z.ZodLiteral<"status_transition">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>], "kind">, z.ZodDiscriminatedUnion<[z.ZodObject<{
        occurrence: z.ZodObject<{
            source_occurrence_ref: z.ZodString;
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodNullable<z.ZodString>;
        observed_object_type: z.ZodEnum<{
            charge: "charge";
            payment_intent: "payment_intent";
            payment_record: "payment_record";
        }>;
        observed_object_id: z.ZodString;
        source_evidence: z.ZodObject<{
            header: z.ZodDiscriminatedUnion<[z.ZodObject<{
                amount_requested_minor: z.ZodNullable<z.ZodString>;
                amount_received_minor: z.ZodNullable<z.ZodString>;
                amount_capturable_minor: z.ZodNullable<z.ZodString>;
                status: z.ZodNullable<z.ZodEnum<{
                    canceled: "canceled";
                    succeeded: "succeeded";
                    requires_payment_method: "requires_payment_method";
                    requires_confirmation: "requires_confirmation";
                    requires_action: "requires_action";
                    processing: "processing";
                    requires_capture: "requires_capture";
                }>>;
                capture_method: z.ZodNullable<z.ZodEnum<{
                    automatic: "automatic";
                    automatic_async: "automatic_async";
                    manual: "manual";
                }>>;
                canceled_at: z.ZodNullable<z.ZodISODateTime>;
                cancellation_reason: z.ZodNullable<z.ZodEnum<{
                    duplicate: "duplicate";
                    expired: "expired";
                    fraudulent: "fraudulent";
                    automatic: "automatic";
                    abandoned: "abandoned";
                    failed_invoice: "failed_invoice";
                    requested_by_customer: "requested_by_customer";
                    void_invoice: "void_invoice";
                }>>;
                latest_charge_id: z.ZodNullable<z.ZodString>;
                on_behalf_of: z.ZodNullable<z.ZodString>;
                transfer_destination: z.ZodNullable<z.ZodString>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
                object_type: z.ZodLiteral<"payment_intent">;
                object_id: z.ZodString;
                customer_ref: z.ZodNullable<z.ZodString>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                api_version: z.ZodNullable<z.ZodString>;
                created_at: z.ZodNullable<z.ZodISODateTime>;
                gaps: z.ZodArray<z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>>;
            }, z.core.$strict>, z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                amount_captured_minor: z.ZodNullable<z.ZodString>;
                amount_refunded_minor: z.ZodNullable<z.ZodString>;
                paid: z.ZodNullable<z.ZodBoolean>;
                captured: z.ZodNullable<z.ZodBoolean>;
                refunded: z.ZodNullable<z.ZodBoolean>;
                disputed: z.ZodNullable<z.ZodBoolean>;
                status: z.ZodNullable<z.ZodEnum<{
                    pending: "pending";
                    succeeded: "succeeded";
                    failed: "failed";
                }>>;
                payment_intent_id: z.ZodNullable<z.ZodString>;
                balance_transaction_id: z.ZodNullable<z.ZodString>;
                failure_balance_transaction_id: z.ZodNullable<z.ZodString>;
                source_transfer_id: z.ZodNullable<z.ZodString>;
                on_behalf_of: z.ZodNullable<z.ZodString>;
                transfer_destination: z.ZodNullable<z.ZodString>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
                object_type: z.ZodLiteral<"charge">;
                object_id: z.ZodString;
                customer_ref: z.ZodNullable<z.ZodString>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                api_version: z.ZodNullable<z.ZodString>;
                created_at: z.ZodNullable<z.ZodISODateTime>;
                gaps: z.ZodArray<z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>>;
            }, z.core.$strict>, z.ZodObject<{
                object_type: z.ZodLiteral<"payment_record">;
                amount: z.ZodObject<{
                    amount_minor: z.ZodNullable<z.ZodString>;
                    currency: z.ZodNullable<z.ZodString>;
                    currency_exponent: z.ZodNullable<z.ZodNumber>;
                }, z.core.$strict>;
                amount_requested: z.ZodObject<{
                    amount_minor: z.ZodNullable<z.ZodString>;
                    currency: z.ZodNullable<z.ZodString>;
                    currency_exponent: z.ZodNullable<z.ZodNumber>;
                }, z.core.$strict>;
                amount_authorized: z.ZodObject<{
                    amount_minor: z.ZodNullable<z.ZodString>;
                    currency: z.ZodNullable<z.ZodString>;
                    currency_exponent: z.ZodNullable<z.ZodNumber>;
                }, z.core.$strict>;
                amount_canceled: z.ZodObject<{
                    amount_minor: z.ZodNullable<z.ZodString>;
                    currency: z.ZodNullable<z.ZodString>;
                    currency_exponent: z.ZodNullable<z.ZodNumber>;
                }, z.core.$strict>;
                amount_failed: z.ZodObject<{
                    amount_minor: z.ZodNullable<z.ZodString>;
                    currency: z.ZodNullable<z.ZodString>;
                    currency_exponent: z.ZodNullable<z.ZodNumber>;
                }, z.core.$strict>;
                amount_guaranteed: z.ZodObject<{
                    amount_minor: z.ZodNullable<z.ZodString>;
                    currency: z.ZodNullable<z.ZodString>;
                    currency_exponent: z.ZodNullable<z.ZodNumber>;
                }, z.core.$strict>;
                amount_refunded: z.ZodObject<{
                    amount_minor: z.ZodNullable<z.ZodString>;
                    currency: z.ZodNullable<z.ZodString>;
                    currency_exponent: z.ZodNullable<z.ZodNumber>;
                }, z.core.$strict>;
                application_id: z.ZodNullable<z.ZodString>;
                latest_payment_attempt_record_id: z.ZodNullable<z.ZodString>;
                reported_by: z.ZodNullable<z.ZodEnum<{
                    stripe: "stripe";
                    self: "self";
                }>>;
                processor_type: z.ZodNullable<z.ZodLiteral<"custom">>;
                object_id: z.ZodString;
                customer_ref: z.ZodNullable<z.ZodString>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                api_version: z.ZodNullable<z.ZodString>;
                created_at: z.ZodNullable<z.ZodISODateTime>;
                gaps: z.ZodArray<z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>>;
            }, z.core.$strict>], "object_type">;
            linked_charge: z.ZodOptional<z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                amount_captured_minor: z.ZodNullable<z.ZodString>;
                amount_refunded_minor: z.ZodNullable<z.ZodString>;
                paid: z.ZodNullable<z.ZodBoolean>;
                captured: z.ZodNullable<z.ZodBoolean>;
                refunded: z.ZodNullable<z.ZodBoolean>;
                disputed: z.ZodNullable<z.ZodBoolean>;
                status: z.ZodNullable<z.ZodEnum<{
                    pending: "pending";
                    succeeded: "succeeded";
                    failed: "failed";
                }>>;
                payment_intent_id: z.ZodNullable<z.ZodString>;
                balance_transaction_id: z.ZodNullable<z.ZodString>;
                failure_balance_transaction_id: z.ZodNullable<z.ZodString>;
                source_transfer_id: z.ZodNullable<z.ZodString>;
                on_behalf_of: z.ZodNullable<z.ZodString>;
                transfer_destination: z.ZodNullable<z.ZodString>;
                currency: z.ZodNullable<z.ZodString>;
                currency_exponent: z.ZodNullable<z.ZodNumber>;
                object_type: z.ZodLiteral<"charge">;
                object_id: z.ZodString;
                customer_ref: z.ZodNullable<z.ZodString>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                api_version: z.ZodNullable<z.ZodString>;
                created_at: z.ZodNullable<z.ZodISODateTime>;
                gaps: z.ZodArray<z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>>;
            }, z.core.$strict>>;
            allocations: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                data: z.ZodArray<z.ZodObject<{
                    amount_requested_minor: z.ZodNullable<z.ZodString>;
                    amount_paid_minor: z.ZodNullable<z.ZodString>;
                    created_at: z.ZodNullable<z.ZodISODateTime>;
                    paid_at: z.ZodNullable<z.ZodISODateTime>;
                    canceled_at: z.ZodNullable<z.ZodISODateTime>;
                    currency: z.ZodNullable<z.ZodString>;
                    currency_exponent: z.ZodNullable<z.ZodNumber>;
                    invoice_payment_id: z.ZodString;
                    invoice_id: z.ZodString;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                    payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        type: z.ZodLiteral<"payment_intent">;
                        payment_id: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        type: z.ZodLiteral<"charge">;
                        payment_id: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        type: z.ZodLiteral<"payment_record">;
                        payment_id: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        type: z.ZodLiteral<"unknown">;
                        reason: z.ZodEnum<{
                            not_hydrated: "not_hydrated";
                            page_limit: "page_limit";
                            unavailable_history: "unavailable_history";
                            unresolved_reference: "unresolved_reference";
                            unresolved_allocation: "unresolved_allocation";
                            provider_failure: "provider_failure";
                        }>;
                    }, z.core.$strict>], "type">;
                    status: z.ZodNullable<z.ZodEnum<{
                        canceled: "canceled";
                        paid: "paid";
                        open: "open";
                    }>>;
                    is_default: z.ZodNullable<z.ZodBoolean>;
                }, z.core.$strict>>;
                pages_fetched: z.ZodNumber;
                has_more: z.ZodNullable<z.ZodBoolean>;
                next_cursor: z.ZodNullable<z.ZodString>;
                total_count: z.ZodNullable<z.ZodNumber>;
                subject: z.ZodObject<{
                    type: z.ZodEnum<{
                        charge: "charge";
                        payment_intent: "payment_intent";
                        payment_record: "payment_record";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>;
            }, z.core.$strict>;
        }, z.core.$strict>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"transaction">;
        kind: z.ZodLiteral<"source_observed">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
    }, z.core.$strict>, z.ZodObject<{
        amount_captured_minor: z.ZodString;
        amount_requested_minor: z.ZodOptional<z.ZodString>;
        allocations_coverage: z.ZodOptional<z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>>;
        economic_owner: z.ZodOptional<z.ZodObject<{
            owner_account_id: z.ZodString;
            charge_type: z.ZodEnum<{
                platform: "platform";
                direct: "direct";
                destination: "destination";
                separate_charges_and_transfers: "separate_charges_and_transfers";
            }>;
            on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$strict>>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        payment_id: z.ZodString;
        observed_object_type: z.ZodEnum<{
            invoice: "invoice";
            charge: "charge";
            payment_intent: "payment_intent";
            invoice_payment: "invoice_payment";
            checkout_session: "checkout_session";
        }>;
        observed_object_id: z.ZodString;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"transaction">;
        kind: z.ZodLiteral<"payment_captured">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        amount_requested_minor: z.ZodString;
        failure_code: z.ZodString;
        economic_owner: z.ZodOptional<z.ZodObject<{
            owner_account_id: z.ZodString;
            charge_type: z.ZodEnum<{
                platform: "platform";
                direct: "direct";
                destination: "destination";
                separate_charges_and_transfers: "separate_charges_and_transfers";
            }>;
            on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$strict>>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        payment_id: z.ZodString;
        observed_object_type: z.ZodEnum<{
            invoice: "invoice";
            charge: "charge";
            payment_intent: "payment_intent";
            invoice_payment: "invoice_payment";
            checkout_session: "checkout_session";
        }>;
        observed_object_id: z.ZodString;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"transaction">;
        kind: z.ZodLiteral<"payment_failed">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        amount_requested_minor: z.ZodString;
        economic_owner: z.ZodOptional<z.ZodObject<{
            owner_account_id: z.ZodString;
            charge_type: z.ZodEnum<{
                platform: "platform";
                direct: "direct";
                destination: "destination";
                separate_charges_and_transfers: "separate_charges_and_transfers";
            }>;
            on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$strict>>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        payment_id: z.ZodString;
        observed_object_type: z.ZodEnum<{
            invoice: "invoice";
            charge: "charge";
            payment_intent: "payment_intent";
            invoice_payment: "invoice_payment";
            checkout_session: "checkout_session";
        }>;
        observed_object_id: z.ZodString;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"transaction">;
        kind: z.ZodLiteral<"payment_pending">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        amount_requested_minor: z.ZodString;
        economic_owner: z.ZodOptional<z.ZodObject<{
            owner_account_id: z.ZodString;
            charge_type: z.ZodEnum<{
                platform: "platform";
                direct: "direct";
                destination: "destination";
                separate_charges_and_transfers: "separate_charges_and_transfers";
            }>;
            on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$strict>>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        payment_id: z.ZodString;
        observed_object_type: z.ZodEnum<{
            invoice: "invoice";
            charge: "charge";
            payment_intent: "payment_intent";
            invoice_payment: "invoice_payment";
            checkout_session: "checkout_session";
        }>;
        observed_object_id: z.ZodString;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"transaction">;
        kind: z.ZodLiteral<"payment_canceled">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>], "kind">, z.ZodDiscriminatedUnion<[z.ZodObject<{
        economic_owner: z.ZodOptional<z.ZodObject<{
            owner_account_id: z.ZodString;
            charge_type: z.ZodEnum<{
                platform: "platform";
                direct: "direct";
                destination: "destination";
                separate_charges_and_transfers: "separate_charges_and_transfers";
            }>;
            on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$strict>>;
        amount_minor: z.ZodString;
        reason: z.ZodNullable<z.ZodEnum<{
            duplicate: "duplicate";
            other: "other";
            fraudulent: "fraudulent";
            requested_by_customer: "requested_by_customer";
            expired_uncaptured_charge: "expired_uncaptured_charge";
        }>>;
        credit_note_id: z.ZodNullable<z.ZodString>;
        allocations: z.ZodArray<z.ZodObject<{
            principal_minor: z.ZodOptional<z.ZodString>;
            tax_minor: z.ZodOptional<z.ZodString>;
            allocation_id: z.ZodString;
            invoice_id: z.ZodString;
            invoice_line_id: z.ZodNullable<z.ZodString>;
            amount_minor: z.ZodString;
        }, z.core.$strict>>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        refund_id: z.ZodString;
        payment_id: z.ZodString;
        balance_transaction_id: z.ZodOptional<z.ZodString>;
        status: z.ZodEnum<{
            canceled: "canceled";
            pending: "pending";
            succeeded: "succeeded";
            failed: "failed";
            requires_action: "requires_action";
        }>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"refund">;
        kind: z.ZodLiteral<"refund">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        amount_refunded_cumulative_minor: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        payment_id: z.ZodString;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"refund">;
        kind: z.ZodLiteral<"refund_total_observed">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>], "kind">, z.ZodDiscriminatedUnion<[z.ZodObject<{
        total_minor: z.ZodString;
        reason: z.ZodNullable<z.ZodEnum<{
            duplicate: "duplicate";
            other: "other";
            fraudulent: "fraudulent";
            order_change: "order_change";
            product_unsatisfactory: "product_unsatisfactory";
        }>>;
        lines: z.ZodArray<z.ZodObject<{
            principal_minor: z.ZodOptional<z.ZodString>;
            tax_minor: z.ZodOptional<z.ZodString>;
            credit_line_id: z.ZodString;
            invoice_line_id: z.ZodNullable<z.ZodString>;
            amount_minor: z.ZodString;
        }, z.core.$strict>>;
        lines_coverage: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        credit_note_id: z.ZodString;
        invoice_id: z.ZodString;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"credit">;
        kind: z.ZodLiteral<"issued_pre_payment">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        settlements: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
            method: z.ZodLiteral<"refund">;
            refund_id: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            method: z.ZodLiteral<"customer_balance">;
            balance_transaction_id: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            method: z.ZodLiteral<"out_of_band">;
            out_of_band_amount_minor: z.ZodString;
        }, z.core.$strict>], "method">>;
        total_minor: z.ZodString;
        reason: z.ZodNullable<z.ZodEnum<{
            duplicate: "duplicate";
            other: "other";
            fraudulent: "fraudulent";
            order_change: "order_change";
            product_unsatisfactory: "product_unsatisfactory";
        }>>;
        lines: z.ZodArray<z.ZodObject<{
            principal_minor: z.ZodOptional<z.ZodString>;
            tax_minor: z.ZodOptional<z.ZodString>;
            credit_line_id: z.ZodString;
            invoice_line_id: z.ZodNullable<z.ZodString>;
            amount_minor: z.ZodString;
        }, z.core.$strict>>;
        lines_coverage: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        credit_note_id: z.ZodString;
        invoice_id: z.ZodString;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"credit">;
        kind: z.ZodLiteral<"issued_post_payment">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        credit_note_id: z.ZodString;
        invoice_id: z.ZodString;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"credit">;
        kind: z.ZodLiteral<"voided">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>], "kind">, z.ZodDiscriminatedUnion<[z.ZodObject<{
        amount_minor: z.ZodString;
        balance_type: z.ZodEnum<{
            customer_balance: "customer_balance";
            invoice_credit_balance: "invoice_credit_balance";
        }>;
        invoice_id: z.ZodNullable<z.ZodString>;
        adjustment_source: z.ZodOptional<z.ZodEnum<{
            other: "other";
            invoice_applied: "invoice_applied";
            invoice_unapplied: "invoice_unapplied";
            credit_note: "credit_note";
            overpayment: "overpayment";
            rollover: "rollover";
            manual_adjustment: "manual_adjustment";
            migration: "migration";
        }>>;
        credit_note_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        balance_transaction_id: z.ZodString;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"balance">;
        kind: z.ZodLiteral<"balance_adjusted">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        amount_minor: z.ZodString;
        expires_at: z.ZodNullable<z.ZodISODateTime>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        grant_id: z.ZodString;
        category: z.ZodEnum<{
            paid: "paid";
            promotional: "promotional";
        }>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"balance">;
        kind: z.ZodLiteral<"credit_grant_funded">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        invoice_id: z.ZodString;
        amount_minor: z.ZodString;
        funding_occurrence_key: z.ZodOptional<z.ZodString>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        grant_id: z.ZodString;
        category: z.ZodEnum<{
            paid: "paid";
            promotional: "promotional";
        }>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"balance">;
        kind: z.ZodLiteral<"credit_grant_applied">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        amount_minor: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        grant_id: z.ZodString;
        category: z.ZodEnum<{
            paid: "paid";
            promotional: "promotional";
        }>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"balance">;
        kind: z.ZodLiteral<"credit_grant_expired">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>], "kind">, z.ZodDiscriminatedUnion<[z.ZodObject<{
        settlement_amount: z.ZodOptional<z.ZodObject<{
            amount_minor: z.ZodString;
            currency: z.ZodString;
            currency_exponent: z.ZodNumber;
        }, z.core.$strict>>;
        economic_owner: z.ZodOptional<z.ZodObject<{
            owner_account_id: z.ZodString;
            charge_type: z.ZodEnum<{
                platform: "platform";
                direct: "direct";
                destination: "destination";
                separate_charges_and_transfers: "separate_charges_and_transfers";
            }>;
            on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$strict>>;
        amount_minor: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        dispute_id: z.ZodString;
        payment_id: z.ZodString;
        balance_transaction_id: z.ZodString;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"loss">;
        kind: z.ZodLiteral<"dispute_funds_withdrawn">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        reverses_occurrence_key: z.ZodOptional<z.ZodString>;
        settlement_amount: z.ZodOptional<z.ZodObject<{
            amount_minor: z.ZodString;
            currency: z.ZodString;
            currency_exponent: z.ZodNumber;
        }, z.core.$strict>>;
        economic_owner: z.ZodOptional<z.ZodObject<{
            owner_account_id: z.ZodString;
            charge_type: z.ZodEnum<{
                platform: "platform";
                direct: "direct";
                destination: "destination";
                separate_charges_and_transfers: "separate_charges_and_transfers";
            }>;
            on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$strict>>;
        amount_minor: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        dispute_id: z.ZodString;
        payment_id: z.ZodString;
        balance_transaction_id: z.ZodString;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"loss">;
        kind: z.ZodLiteral<"dispute_funds_reinstated">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        dispute_id: z.ZodString;
        payment_id: z.ZodString;
        status: z.ZodEnum<{
            warning_needs_response: "warning_needs_response";
            warning_under_review: "warning_under_review";
            warning_closed: "warning_closed";
            needs_response: "needs_response";
            under_review: "under_review";
            won: "won";
            lost: "lost";
        }>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"loss">;
        kind: z.ZodLiteral<"dispute_status_changed">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        settlement_amount: z.ZodOptional<z.ZodObject<{
            amount_minor: z.ZodString;
            currency: z.ZodString;
            currency_exponent: z.ZodNumber;
        }, z.core.$strict>>;
        economic_owner: z.ZodOptional<z.ZodObject<{
            owner_account_id: z.ZodString;
            charge_type: z.ZodEnum<{
                platform: "platform";
                direct: "direct";
                destination: "destination";
                separate_charges_and_transfers: "separate_charges_and_transfers";
            }>;
            on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$strict>>;
        amount_minor: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        return_id: z.ZodString;
        payment_id: z.ZodString;
        balance_transaction_id: z.ZodOptional<z.ZodString>;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"loss">;
        kind: z.ZodLiteral<"payment_returned">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        economic_owner: z.ZodObject<{
            owner_account_id: z.ZodString;
            charge_type: z.ZodEnum<{
                platform: "platform";
                direct: "direct";
                destination: "destination";
                separate_charges_and_transfers: "separate_charges_and_transfers";
            }>;
            on_behalf_of_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            transfer_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$strict>;
        settlement_amount: z.ZodOptional<z.ZodObject<{
            amount_minor: z.ZodString;
            currency: z.ZodString;
            currency_exponent: z.ZodNumber;
        }, z.core.$strict>>;
        amount_minor: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        payment_id: z.ZodString;
        balance_transaction_id: z.ZodString;
        reverses_occurrence_key: z.ZodString;
        effective_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        profile: z.ZodLiteral<"loss">;
        kind: z.ZodLiteral<"funds_recovered">;
        profile_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        occurrence: z.ZodObject<{
            identity_version: z.ZodLiteral<2>;
            occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            source_order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            supersedes_revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            delivery_id: z.ZodOptional<z.ZodString>;
            legacy_billing_ref: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
    }, z.core.$strict>], "kind">], "profile">;
    id: z.ZodString;
    tenant_id: z.ZodString;
    scope_key: z.ZodString;
}, z.core.$strict>;
type BillingFactHistory$1 = z.infer<typeof BillingFactHistorySchema>;
declare function billingFactHistoryOf(id: string, input: BillingProfile$1): BillingFactHistory$1;
/** An index over nested source linkage, not a second ledger or a copied financial amount. */
declare const BillingFactReferenceSchema: z.ZodObject<{
    revision_key: z.ZodString;
    ref_kind: z.ZodEnum<{
        allocation: "allocation";
        invoice: "invoice";
        refund: "refund";
        invoice_line: "invoice_line";
        credit_line: "credit_line";
        fund_movement: "fund_movement";
        grant: "grant";
        funding_occurrence: "funding_occurrence";
        reversed_occurrence: "reversed_occurrence";
    }>;
    ref_key: z.ZodString;
    id: z.ZodString;
    tenant_id: z.ZodString;
    scope_key: z.ZodString;
}, z.core.$strict>;
type BillingFactReference$1 = z.infer<typeof BillingFactReferenceSchema>;
declare function billingFactReferencesOf(input: BillingFactHistory$1): BillingFactReference$1[];
declare const BillingMappingHistorySchema: z.ZodObject<{
    customer_ref: z.ZodString;
    mapping_revision: z.ZodNumber;
    effective_from: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    mapping: z.ZodDiscriminatedUnion<[z.ZodObject<{
        basis: z.ZodLiteral<"explicit_binding">;
        mapping_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
        rt_account_id: z.ZodNullable<z.ZodString>;
        mapping_revision: z.ZodNumber;
        effective_from: z.ZodISODateTime;
        effective_to: z.ZodNullable<z.ZodISODateTime>;
        observed_at: z.ZodISODateTime;
        supersedes_mapping_revision: z.ZodNullable<z.ZodNumber>;
        binding_evidence: z.ZodOptional<z.ZodObject<{
            kind: z.ZodEnum<{
                provider_metadata_account: "provider_metadata_account";
                provider_metadata_user: "provider_metadata_user";
                customer_link: "customer_link";
                checkout_link: "checkout_link";
                verified_email: "verified_email";
                operator_link: "operator_link";
                operator_no_account: "operator_no_account";
                operator_unlink: "operator_unlink";
            }>;
            confidence: z.ZodEnum<{
                explicit: "explicit";
                exact_match: "exact_match";
                operator_asserted: "operator_asserted";
            }>;
            actor: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"system">;
                process: z.ZodLiteral<"payer_auto_match">;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"user">;
                user_id: z.ZodString;
                role: z.ZodString;
                via: z.ZodEnum<{
                    session: "session";
                    api_token: "api_token";
                }>;
            }, z.core.$strict>], "kind">;
            reason: z.ZodNullable<z.ZodString>;
            via_user_id: z.ZodNullable<z.ZodString>;
        }, z.core.$strict>>;
    }, z.core.$strict>, z.ZodObject<{
        basis: z.ZodLiteral<"integration_sync">;
        mapping_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
        rt_account_id: z.ZodNullable<z.ZodString>;
        mapping_revision: z.ZodNumber;
        effective_from: z.ZodISODateTime;
        effective_to: z.ZodNullable<z.ZodISODateTime>;
        observed_at: z.ZodISODateTime;
        supersedes_mapping_revision: z.ZodNullable<z.ZodNumber>;
        binding_evidence: z.ZodOptional<z.ZodObject<{
            kind: z.ZodEnum<{
                provider_metadata_account: "provider_metadata_account";
                provider_metadata_user: "provider_metadata_user";
                customer_link: "customer_link";
                checkout_link: "checkout_link";
                verified_email: "verified_email";
                operator_link: "operator_link";
                operator_no_account: "operator_no_account";
                operator_unlink: "operator_unlink";
            }>;
            confidence: z.ZodEnum<{
                explicit: "explicit";
                exact_match: "exact_match";
                operator_asserted: "operator_asserted";
            }>;
            actor: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"system">;
                process: z.ZodLiteral<"payer_auto_match">;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"user">;
                user_id: z.ZodString;
                role: z.ZodString;
                via: z.ZodEnum<{
                    session: "session";
                    api_token: "api_token";
                }>;
            }, z.core.$strict>], "kind">;
            reason: z.ZodNullable<z.ZodString>;
            via_user_id: z.ZodNullable<z.ZodString>;
        }, z.core.$strict>>;
    }, z.core.$strict>, z.ZodObject<{
        basis: z.ZodLiteral<"approved_correction">;
        correction_generation_id: z.ZodString;
        restatement_reason: z.ZodEnum<{
            split: "split";
            merge: "merge";
            provider_migration: "provider_migration";
            reassignment: "reassignment";
            error_correction: "error_correction";
        }>;
        mapping_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        customer_ref: z.ZodString;
        rt_account_id: z.ZodNullable<z.ZodString>;
        mapping_revision: z.ZodNumber;
        effective_from: z.ZodISODateTime;
        effective_to: z.ZodNullable<z.ZodISODateTime>;
        observed_at: z.ZodISODateTime;
        supersedes_mapping_revision: z.ZodNullable<z.ZodNumber>;
        binding_evidence: z.ZodOptional<z.ZodObject<{
            kind: z.ZodEnum<{
                provider_metadata_account: "provider_metadata_account";
                provider_metadata_user: "provider_metadata_user";
                customer_link: "customer_link";
                checkout_link: "checkout_link";
                verified_email: "verified_email";
                operator_link: "operator_link";
                operator_no_account: "operator_no_account";
                operator_unlink: "operator_unlink";
            }>;
            confidence: z.ZodEnum<{
                explicit: "explicit";
                exact_match: "exact_match";
                operator_asserted: "operator_asserted";
            }>;
            actor: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"system">;
                process: z.ZodLiteral<"payer_auto_match">;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"user">;
                user_id: z.ZodString;
                role: z.ZodString;
                via: z.ZodEnum<{
                    session: "session";
                    api_token: "api_token";
                }>;
            }, z.core.$strict>], "kind">;
            reason: z.ZodNullable<z.ZodString>;
            via_user_id: z.ZodNullable<z.ZodString>;
        }, z.core.$strict>>;
    }, z.core.$strict>], "basis">;
    id: z.ZodString;
    tenant_id: z.ZodString;
    scope_key: z.ZodString;
}, z.core.$strict>;
type BillingMappingHistory$1 = z.infer<typeof BillingMappingHistorySchema>;
declare function billingMappingHistoryOf(id: string, mapping: BillingAccountMappingRevision$1): BillingMappingHistory$1;
/** Checkpoint and reconciliation share one row so a persisted update cannot tear them apart. */
declare const BillingGenerationRecordSchema: z.ZodObject<{
    generation_id: z.ZodString;
    status: z.ZodEnum<{
        active: "active";
        failed: "failed";
        building: "building";
        shadow: "shadow";
        superseded: "superseded";
    }>;
    policy_version: z.ZodString;
    input_watermark: z.ZodISODateTime;
    generation: z.ZodDiscriminatedUnion<[z.ZodObject<{
        status: z.ZodLiteral<"building">;
        reconciliation: z.ZodDiscriminatedUnion<[z.ZodObject<{
            state: z.ZodLiteral<"pending">;
        }, z.core.$strict>, z.ZodObject<{
            state: z.ZodLiteral<"passed">;
            checked_at: z.ZodISODateTime;
            compared_with_generation_id: z.ZodNullable<z.ZodString>;
            unresolved_residuals: z.ZodNumber;
        }, z.core.$strict>, z.ZodObject<{
            state: z.ZodLiteral<"failed">;
            checked_at: z.ZodISODateTime;
            compared_with_generation_id: z.ZodNullable<z.ZodString>;
            failure_codes: z.ZodArray<z.ZodEnum<{
                stock_equation: "stock_equation";
                collection_conservation: "collection_conservation";
                allocation_conservation: "allocation_conservation";
                receivable_conservation: "receivable_conservation";
                source_totals: "source_totals";
                shadow_divergence: "shadow_divergence";
            }>>;
        }, z.core.$strict>], "state">;
        lifecycle: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"partition">;
            partition_key: z.ZodString;
            artifact_generation_id: z.ZodString;
            artifact_digest: z.ZodString;
            source_revisions: z.ZodArray<z.ZodObject<{
                revision_key: z.ZodString;
                fact_digest: z.ZodString;
            }, z.core.$strict>>;
            mapping_references: z.ZodArray<z.ZodObject<{
                mapping_evidence_id: z.ZodString;
                customer_ref: z.ZodString;
                mapping_revision: z.ZodNumber;
                account_id: z.ZodString;
            }, z.core.$strict>>;
            config_snapshot_ids: z.ZodArray<z.ZodString>;
            transition_links: z.ZodArray<z.ZodObject<{
                transition_id: z.ZodString;
                source_revision_keys: z.ZodArray<z.ZodString>;
                mapping_evidence_id: z.ZodString;
                config_snapshot_ids: z.ZodArray<z.ZodString>;
            }, z.core.$strict>>;
            version: z.ZodLiteral<1>;
            product_id: z.ZodString;
            environment_id: z.ZodString;
            lifecycle_policy_version: z.ZodString;
            accounting_policy_version: z.ZodString;
            mapping_generation_id: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"manifest">;
            selections: z.ZodArray<z.ZodObject<{
                partition_key: z.ZodString;
                generation_id: z.ZodString;
                artifact_generation_id: z.ZodString;
                payload_digest: z.ZodString;
                payload_bytes: z.ZodNumber;
                transition_link_count: z.ZodNumber;
                source_revision_count: z.ZodNumber;
                mapping_reference_count: z.ZodNumber;
            }, z.core.$strict>>;
            version: z.ZodLiteral<1>;
            product_id: z.ZodString;
            environment_id: z.ZodString;
            lifecycle_policy_version: z.ZodString;
            accounting_policy_version: z.ZodString;
            mapping_generation_id: z.ZodString;
        }, z.core.$strict>], "kind">>;
        generation_version: z.ZodLiteral<1>;
        tenant_id: z.ZodString;
        generation_id: z.ZodString;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        policy_version: z.ZodString;
        policy_pins: z.ZodRecord<z.ZodString, z.ZodNumber>;
        input_watermark: z.ZodISODateTime;
        created_at: z.ZodISODateTime;
        checkpoint: z.ZodObject<{
            cursor_revision_key: z.ZodNullable<z.ZodString>;
            processed_through: z.ZodNullable<z.ZodISODateTime>;
            processed_revisions: z.ZodNumber;
            completed: z.ZodBoolean;
        }, z.core.$strict>;
    }, z.core.$strict>, z.ZodObject<{
        status: z.ZodLiteral<"shadow">;
        reconciliation: z.ZodDiscriminatedUnion<[z.ZodObject<{
            state: z.ZodLiteral<"pending">;
        }, z.core.$strict>, z.ZodObject<{
            state: z.ZodLiteral<"passed">;
            checked_at: z.ZodISODateTime;
            compared_with_generation_id: z.ZodNullable<z.ZodString>;
            unresolved_residuals: z.ZodNumber;
        }, z.core.$strict>, z.ZodObject<{
            state: z.ZodLiteral<"failed">;
            checked_at: z.ZodISODateTime;
            compared_with_generation_id: z.ZodNullable<z.ZodString>;
            failure_codes: z.ZodArray<z.ZodEnum<{
                stock_equation: "stock_equation";
                collection_conservation: "collection_conservation";
                allocation_conservation: "allocation_conservation";
                receivable_conservation: "receivable_conservation";
                source_totals: "source_totals";
                shadow_divergence: "shadow_divergence";
            }>>;
        }, z.core.$strict>], "state">;
        lifecycle: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"partition">;
            partition_key: z.ZodString;
            artifact_generation_id: z.ZodString;
            artifact_digest: z.ZodString;
            source_revisions: z.ZodArray<z.ZodObject<{
                revision_key: z.ZodString;
                fact_digest: z.ZodString;
            }, z.core.$strict>>;
            mapping_references: z.ZodArray<z.ZodObject<{
                mapping_evidence_id: z.ZodString;
                customer_ref: z.ZodString;
                mapping_revision: z.ZodNumber;
                account_id: z.ZodString;
            }, z.core.$strict>>;
            config_snapshot_ids: z.ZodArray<z.ZodString>;
            transition_links: z.ZodArray<z.ZodObject<{
                transition_id: z.ZodString;
                source_revision_keys: z.ZodArray<z.ZodString>;
                mapping_evidence_id: z.ZodString;
                config_snapshot_ids: z.ZodArray<z.ZodString>;
            }, z.core.$strict>>;
            version: z.ZodLiteral<1>;
            product_id: z.ZodString;
            environment_id: z.ZodString;
            lifecycle_policy_version: z.ZodString;
            accounting_policy_version: z.ZodString;
            mapping_generation_id: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"manifest">;
            selections: z.ZodArray<z.ZodObject<{
                partition_key: z.ZodString;
                generation_id: z.ZodString;
                artifact_generation_id: z.ZodString;
                payload_digest: z.ZodString;
                payload_bytes: z.ZodNumber;
                transition_link_count: z.ZodNumber;
                source_revision_count: z.ZodNumber;
                mapping_reference_count: z.ZodNumber;
            }, z.core.$strict>>;
            version: z.ZodLiteral<1>;
            product_id: z.ZodString;
            environment_id: z.ZodString;
            lifecycle_policy_version: z.ZodString;
            accounting_policy_version: z.ZodString;
            mapping_generation_id: z.ZodString;
        }, z.core.$strict>], "kind">>;
        generation_version: z.ZodLiteral<1>;
        tenant_id: z.ZodString;
        generation_id: z.ZodString;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        policy_version: z.ZodString;
        policy_pins: z.ZodRecord<z.ZodString, z.ZodNumber>;
        input_watermark: z.ZodISODateTime;
        created_at: z.ZodISODateTime;
        checkpoint: z.ZodObject<{
            cursor_revision_key: z.ZodNullable<z.ZodString>;
            processed_through: z.ZodNullable<z.ZodISODateTime>;
            processed_revisions: z.ZodNumber;
            completed: z.ZodBoolean;
        }, z.core.$strict>;
    }, z.core.$strict>, z.ZodObject<{
        status: z.ZodLiteral<"active">;
        checkpoint: z.ZodObject<{
            cursor_revision_key: z.ZodNullable<z.ZodString>;
            processed_through: z.ZodNullable<z.ZodISODateTime>;
            processed_revisions: z.ZodNumber;
            completed: z.ZodLiteral<true>;
        }, z.core.$strict>;
        reconciliation: z.ZodObject<{
            state: z.ZodLiteral<"passed">;
            checked_at: z.ZodISODateTime;
            compared_with_generation_id: z.ZodNullable<z.ZodString>;
            unresolved_residuals: z.ZodNumber;
        }, z.core.$strict>;
        activated_at: z.ZodISODateTime;
        lifecycle: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"partition">;
            partition_key: z.ZodString;
            artifact_generation_id: z.ZodString;
            artifact_digest: z.ZodString;
            source_revisions: z.ZodArray<z.ZodObject<{
                revision_key: z.ZodString;
                fact_digest: z.ZodString;
            }, z.core.$strict>>;
            mapping_references: z.ZodArray<z.ZodObject<{
                mapping_evidence_id: z.ZodString;
                customer_ref: z.ZodString;
                mapping_revision: z.ZodNumber;
                account_id: z.ZodString;
            }, z.core.$strict>>;
            config_snapshot_ids: z.ZodArray<z.ZodString>;
            transition_links: z.ZodArray<z.ZodObject<{
                transition_id: z.ZodString;
                source_revision_keys: z.ZodArray<z.ZodString>;
                mapping_evidence_id: z.ZodString;
                config_snapshot_ids: z.ZodArray<z.ZodString>;
            }, z.core.$strict>>;
            version: z.ZodLiteral<1>;
            product_id: z.ZodString;
            environment_id: z.ZodString;
            lifecycle_policy_version: z.ZodString;
            accounting_policy_version: z.ZodString;
            mapping_generation_id: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"manifest">;
            selections: z.ZodArray<z.ZodObject<{
                partition_key: z.ZodString;
                generation_id: z.ZodString;
                artifact_generation_id: z.ZodString;
                payload_digest: z.ZodString;
                payload_bytes: z.ZodNumber;
                transition_link_count: z.ZodNumber;
                source_revision_count: z.ZodNumber;
                mapping_reference_count: z.ZodNumber;
            }, z.core.$strict>>;
            version: z.ZodLiteral<1>;
            product_id: z.ZodString;
            environment_id: z.ZodString;
            lifecycle_policy_version: z.ZodString;
            accounting_policy_version: z.ZodString;
            mapping_generation_id: z.ZodString;
        }, z.core.$strict>], "kind">>;
        generation_version: z.ZodLiteral<1>;
        tenant_id: z.ZodString;
        generation_id: z.ZodString;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        policy_version: z.ZodString;
        policy_pins: z.ZodRecord<z.ZodString, z.ZodNumber>;
        input_watermark: z.ZodISODateTime;
        created_at: z.ZodISODateTime;
    }, z.core.$strict>, z.ZodObject<{
        status: z.ZodLiteral<"superseded">;
        checkpoint: z.ZodObject<{
            cursor_revision_key: z.ZodNullable<z.ZodString>;
            processed_through: z.ZodNullable<z.ZodISODateTime>;
            processed_revisions: z.ZodNumber;
            completed: z.ZodLiteral<true>;
        }, z.core.$strict>;
        reconciliation: z.ZodObject<{
            state: z.ZodLiteral<"passed">;
            checked_at: z.ZodISODateTime;
            compared_with_generation_id: z.ZodNullable<z.ZodString>;
            unresolved_residuals: z.ZodNumber;
        }, z.core.$strict>;
        activated_at: z.ZodISODateTime;
        superseded_at: z.ZodISODateTime;
        superseded_by_generation_id: z.ZodString;
        lifecycle: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"partition">;
            partition_key: z.ZodString;
            artifact_generation_id: z.ZodString;
            artifact_digest: z.ZodString;
            source_revisions: z.ZodArray<z.ZodObject<{
                revision_key: z.ZodString;
                fact_digest: z.ZodString;
            }, z.core.$strict>>;
            mapping_references: z.ZodArray<z.ZodObject<{
                mapping_evidence_id: z.ZodString;
                customer_ref: z.ZodString;
                mapping_revision: z.ZodNumber;
                account_id: z.ZodString;
            }, z.core.$strict>>;
            config_snapshot_ids: z.ZodArray<z.ZodString>;
            transition_links: z.ZodArray<z.ZodObject<{
                transition_id: z.ZodString;
                source_revision_keys: z.ZodArray<z.ZodString>;
                mapping_evidence_id: z.ZodString;
                config_snapshot_ids: z.ZodArray<z.ZodString>;
            }, z.core.$strict>>;
            version: z.ZodLiteral<1>;
            product_id: z.ZodString;
            environment_id: z.ZodString;
            lifecycle_policy_version: z.ZodString;
            accounting_policy_version: z.ZodString;
            mapping_generation_id: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"manifest">;
            selections: z.ZodArray<z.ZodObject<{
                partition_key: z.ZodString;
                generation_id: z.ZodString;
                artifact_generation_id: z.ZodString;
                payload_digest: z.ZodString;
                payload_bytes: z.ZodNumber;
                transition_link_count: z.ZodNumber;
                source_revision_count: z.ZodNumber;
                mapping_reference_count: z.ZodNumber;
            }, z.core.$strict>>;
            version: z.ZodLiteral<1>;
            product_id: z.ZodString;
            environment_id: z.ZodString;
            lifecycle_policy_version: z.ZodString;
            accounting_policy_version: z.ZodString;
            mapping_generation_id: z.ZodString;
        }, z.core.$strict>], "kind">>;
        generation_version: z.ZodLiteral<1>;
        tenant_id: z.ZodString;
        generation_id: z.ZodString;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        policy_version: z.ZodString;
        policy_pins: z.ZodRecord<z.ZodString, z.ZodNumber>;
        input_watermark: z.ZodISODateTime;
        created_at: z.ZodISODateTime;
    }, z.core.$strict>, z.ZodObject<{
        status: z.ZodLiteral<"failed">;
        reconciliation: z.ZodDiscriminatedUnion<[z.ZodObject<{
            state: z.ZodLiteral<"pending">;
        }, z.core.$strict>, z.ZodObject<{
            state: z.ZodLiteral<"passed">;
            checked_at: z.ZodISODateTime;
            compared_with_generation_id: z.ZodNullable<z.ZodString>;
            unresolved_residuals: z.ZodNumber;
        }, z.core.$strict>, z.ZodObject<{
            state: z.ZodLiteral<"failed">;
            checked_at: z.ZodISODateTime;
            compared_with_generation_id: z.ZodNullable<z.ZodString>;
            failure_codes: z.ZodArray<z.ZodEnum<{
                stock_equation: "stock_equation";
                collection_conservation: "collection_conservation";
                allocation_conservation: "allocation_conservation";
                receivable_conservation: "receivable_conservation";
                source_totals: "source_totals";
                shadow_divergence: "shadow_divergence";
            }>>;
        }, z.core.$strict>], "state">;
        failure_code: z.ZodString;
        lifecycle: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"partition">;
            partition_key: z.ZodString;
            artifact_generation_id: z.ZodString;
            artifact_digest: z.ZodString;
            source_revisions: z.ZodArray<z.ZodObject<{
                revision_key: z.ZodString;
                fact_digest: z.ZodString;
            }, z.core.$strict>>;
            mapping_references: z.ZodArray<z.ZodObject<{
                mapping_evidence_id: z.ZodString;
                customer_ref: z.ZodString;
                mapping_revision: z.ZodNumber;
                account_id: z.ZodString;
            }, z.core.$strict>>;
            config_snapshot_ids: z.ZodArray<z.ZodString>;
            transition_links: z.ZodArray<z.ZodObject<{
                transition_id: z.ZodString;
                source_revision_keys: z.ZodArray<z.ZodString>;
                mapping_evidence_id: z.ZodString;
                config_snapshot_ids: z.ZodArray<z.ZodString>;
            }, z.core.$strict>>;
            version: z.ZodLiteral<1>;
            product_id: z.ZodString;
            environment_id: z.ZodString;
            lifecycle_policy_version: z.ZodString;
            accounting_policy_version: z.ZodString;
            mapping_generation_id: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"manifest">;
            selections: z.ZodArray<z.ZodObject<{
                partition_key: z.ZodString;
                generation_id: z.ZodString;
                artifact_generation_id: z.ZodString;
                payload_digest: z.ZodString;
                payload_bytes: z.ZodNumber;
                transition_link_count: z.ZodNumber;
                source_revision_count: z.ZodNumber;
                mapping_reference_count: z.ZodNumber;
            }, z.core.$strict>>;
            version: z.ZodLiteral<1>;
            product_id: z.ZodString;
            environment_id: z.ZodString;
            lifecycle_policy_version: z.ZodString;
            accounting_policy_version: z.ZodString;
            mapping_generation_id: z.ZodString;
        }, z.core.$strict>], "kind">>;
        generation_version: z.ZodLiteral<1>;
        tenant_id: z.ZodString;
        generation_id: z.ZodString;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        policy_version: z.ZodString;
        policy_pins: z.ZodRecord<z.ZodString, z.ZodNumber>;
        input_watermark: z.ZodISODateTime;
        created_at: z.ZodISODateTime;
        checkpoint: z.ZodObject<{
            cursor_revision_key: z.ZodNullable<z.ZodString>;
            processed_through: z.ZodNullable<z.ZodISODateTime>;
            processed_revisions: z.ZodNumber;
            completed: z.ZodBoolean;
        }, z.core.$strict>;
    }, z.core.$strict>], "status">;
    id: z.ZodString;
    tenant_id: z.ZodString;
    scope_key: z.ZodString;
}, z.core.$strict>;
type BillingGenerationRecord$1 = z.infer<typeof BillingGenerationRecordSchema>;
declare function billingGenerationRecordOf(id: string, generation: BillingGeneration$1): BillingGenerationRecord$1;
/** Null account scope is an explicit non-null key; PostgreSQL NULL uniqueness cannot create duplicate checkpoints. */
declare function billingCoverageAccountKey(account: string | null): string;
declare const BillingCoverageRecordSchema: z.ZodObject<{
    account_key: z.ZodString;
    family: z.ZodString;
    recorded_at: z.ZodISODateTime;
    checkpoint: z.ZodDiscriminatedUnion<[z.ZodObject<{
        state: z.ZodLiteral<"complete">;
        earliest_complete_at: z.ZodISODateTime;
        covered_through: z.ZodISODateTime;
        opening_seed: z.ZodNullable<z.ZodObject<{
            as_of: z.ZodISODateTime;
            basis: z.ZodEnum<{
                imported_opening_balance: "imported_opening_balance";
                verified_snapshot: "verified_snapshot";
            }>;
        }, z.core.$strict>>;
        checkpoint_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        rt_account_id: z.ZodNullable<z.ZodString>;
        family: z.ZodEnum<{
            subscription_stock: "subscription_stock";
            movement_history: "movement_history";
            schedule_phases: "schedule_phases";
            invoices: "invoices";
            invoice_payments: "invoice_payments";
            payments: "payments";
            adjustments: "adjustments";
            balances: "balances";
            losses: "losses";
            receivables: "receivables";
            account_mappings: "account_mappings";
            cohort_membership: "cohort_membership";
        }>;
        recorded_at: z.ZodISODateTime;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"partial">;
        earliest_complete_at: z.ZodNullable<z.ZodISODateTime>;
        covered_through: z.ZodISODateTime;
        opening_seed: z.ZodNullable<z.ZodObject<{
            as_of: z.ZodISODateTime;
            basis: z.ZodEnum<{
                imported_opening_balance: "imported_opening_balance";
                verified_snapshot: "verified_snapshot";
            }>;
        }, z.core.$strict>>;
        gaps: z.ZodArray<z.ZodObject<{
            from: z.ZodISODateTime;
            to: z.ZodNullable<z.ZodISODateTime>;
            reason: z.ZodEnum<{
                partial_hydration: "partial_hydration";
                missing_history: "missing_history";
                ambiguous_revision: "ambiguous_revision";
                missing_price_terms: "missing_price_terms";
                unmapped_customer: "unmapped_customer";
                missing_linkage: "missing_linkage";
                missing_ownership: "missing_ownership";
                provider_error: "provider_error";
                retention_window: "retention_window";
            }>;
        }, z.core.$strict>>;
        checkpoint_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        rt_account_id: z.ZodNullable<z.ZodString>;
        family: z.ZodEnum<{
            subscription_stock: "subscription_stock";
            movement_history: "movement_history";
            schedule_phases: "schedule_phases";
            invoices: "invoices";
            invoice_payments: "invoice_payments";
            payments: "payments";
            adjustments: "adjustments";
            balances: "balances";
            losses: "losses";
            receivables: "receivables";
            account_mappings: "account_mappings";
            cohort_membership: "cohort_membership";
        }>;
        recorded_at: z.ZodISODateTime;
    }, z.core.$strict>, z.ZodObject<{
        state: z.ZodLiteral<"unavailable">;
        reason: z.ZodEnum<{
            provider_error: "provider_error";
            uninitialized: "uninitialized";
            not_connected: "not_connected";
            hydration_in_progress: "hydration_in_progress";
            history_unavailable: "history_unavailable";
        }>;
        last_observed_at: z.ZodNullable<z.ZodISODateTime>;
        checkpoint_version: z.ZodLiteral<1>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        rt_account_id: z.ZodNullable<z.ZodString>;
        family: z.ZodEnum<{
            subscription_stock: "subscription_stock";
            movement_history: "movement_history";
            schedule_phases: "schedule_phases";
            invoices: "invoices";
            invoice_payments: "invoice_payments";
            payments: "payments";
            adjustments: "adjustments";
            balances: "balances";
            losses: "losses";
            receivables: "receivables";
            account_mappings: "account_mappings";
            cohort_membership: "cohort_membership";
        }>;
        recorded_at: z.ZodISODateTime;
    }, z.core.$strict>], "state">;
    id: z.ZodString;
    tenant_id: z.ZodString;
    scope_key: z.ZodString;
}, z.core.$strict>;
type BillingCoverageRecord$1 = z.infer<typeof BillingCoverageRecordSchema>;
declare function billingCoverageRecordOf(id: string, checkpoint: BillingCoverageCheckpoint$1): BillingCoverageRecord$1;
/** Designation revisions let receipts retain the original contact after an account's contact changes. */
declare const AccountPrimaryContactHistorySchema: z.ZodObject<{
    tenant_id: z.ZodString;
    account_id: z.ZodString;
    contact_user_id: z.ZodString;
    designation: z.ZodEnum<{
        first_user_default: "first_user_default";
        explicit: "explicit";
    }>;
    revision: z.ZodNumber;
    designated_at: z.ZodISODateTime;
    id: z.ZodString;
    binding: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        contact_user_id: z.ZodString;
        designation: z.ZodEnum<{
            first_user_default: "first_user_default";
            explicit: "explicit";
        }>;
        revision: z.ZodNumber;
        designated_at: z.ZodISODateTime;
    }, z.core.$strict>;
}, z.core.$strict>;
type AccountPrimaryContactHistory$1 = z.infer<typeof AccountPrimaryContactHistorySchema>;
declare function accountPrimaryContactHistoryOf(id: string, input: AccountPrimaryContactBinding$1): AccountPrimaryContactHistory$1;

declare const MRR_RECURRING_INTERVALS: readonly ["day", "week", "month", "year"];

/**
 * Provider-agnostic billing mirror row contracts and the observation log (RM-846
 * §4.1, D6/D7, P1, P4, P9, P10; ST-852).
 *
 * The mirror is RevTurbine's current copy of each billing provider's state:
 * offerings, prices and their terms, payers, subscriptions, subscription items,
 * invoices and invoice lines. It is a product data source (client and account
 * context read it). Each row is the latest known state of ONE provider object;
 * `stripe_sub_item` / `stripe_sub_evidence` stay delete-protection evidence,
 * and `bill_fact` stays the finance custody log: neither is the mirror.
 *
 * Every row carries the same identity and freshness columns
 * ({@link billingMirrorCommonFields}):
 *
 * | Column | Meaning |
 * |---|---|
 * | `tenant_id` | the RevTurbine tenant |
 * | `provider` | `stripe`, `clerk` ({@link BILLING_MIRROR_PROVIDERS}) |
 * | `provider_id` | the provider's own object id (`sub_…`, `si_…`, a Clerk id) |
 * | `provider_account_id` | the provider account or instance the object lives in; null when the provider has none |
 * | `livemode` | live (true) or test (false) data |
 * | `source_updated_at` | the provider's own time for the state the row holds (an event's `created`, an invoice line's period start, a fetch instant); the ordering guard compares it |
 * | `observed_at` | when RevTurbine observed the state the row holds |
 * | `last_synced_at` | when RevTurbine last heard from the provider about the object (any observation or reconcile, applied or not); never earlier than `observed_at` |
 * | `mirror_version` | a local monotonic write counter, for replica replacement only; never an ordering authority |
 * | `deleted_at` | when the object stopped existing at the provider; null while it exists |
 * | `coverage_state`, `coverage_reasons` | how complete this row is, in the billing-accounting coverage vocabulary |
 * | `provider_extension` | provider-only fields, JSON; null when there are none |
 *
 * The natural key is `(tenant_id, provider, provider_id)` (price terms add
 * `term_key`). References between entities use the referenced object's
 * `provider_id` under the same `provider`.
 *
 * Extend, do not duplicate (P4): the subscription item, price, price term and
 * invoice line take their shared fields from `BillingSubscriptionItemSnapshotSchema`,
 * `BillingRecurringPriceSchema`, `BillingPriceTermsSchema` and
 * `BillingInvoiceRecurringLineSchema` (the field schemas themselves, never a
 * re-declared copy); the tests assert the shared shape.
 *
 * The observation log ({@link BillingObservationSchema}, `billing_observations`)
 * is the spec's `BillingObservation`: one immutable row per observed state of
 * one entity, plus one denormalized `subscription_item_state` row per affected
 * subscription item ({@link BillingItemStateObservationSchema}), which is what
 * the MRR oracle folds over.
 *
 * One contract family (RM-716 ST-745): Clerk is the second adapter of these
 * same shapes; a field only one provider has rides in `provider_extension`,
 * keyed by its provider's name.
 */

/** The billing providers the mirror holds. A new provider is an additive change here. */
declare const BILLING_MIRROR_PROVIDERS: readonly ["stripe", "clerk"];
type BillingMirrorProvider = (typeof BILLING_MIRROR_PROVIDERS)[number];
/** Row coverage states: the billing-accounting checkpoint states, applied to one mirror row. */
declare const BILLING_MIRROR_COVERAGE_STATES: readonly ["complete", "partial", "unavailable"];
type BillingMirrorCoverageState = (typeof BILLING_MIRROR_COVERAGE_STATES)[number];
/**
 * Provider-neutral subscription statuses. A provider status the adapter cannot
 * map is `unknown`, with the provider's own word kept in `provider_status`;
 * it is never guessed into a paying or a churned state.
 */
declare const BILLING_MIRROR_SUBSCRIPTION_STATUSES: readonly ["trialing", "active", "past_due", "unpaid", "paused", "canceled", "incomplete", "incomplete_expired", "unknown"];
type BillingMirrorSubscriptionStatus = (typeof BILLING_MIRROR_SUBSCRIPTION_STATUSES)[number];
/** Provider-neutral invoice statuses; `unknown` keeps the provider's word in `provider_status`. */
declare const BILLING_MIRROR_INVOICE_STATUSES: readonly ["draft", "open", "paid", "uncollectible", "void", "unknown"];
/** Who pays: a provider customer (Stripe), or a Clerk user or organization. */
declare const BILLING_MIRROR_PAYER_KINDS: readonly ["customer", "user", "organization"];
/**
 * The columns every mirror row carries. Exported so the web writer and its
 * tests name them from one place.
 */
declare const billingMirrorCommonFields: {
    tenant_id: z.ZodString;
    provider: z.ZodEnum<{
        stripe: "stripe";
        clerk: "clerk";
    }>;
    provider_id: z.ZodString;
    provider_account_id: z.ZodNullable<z.ZodString>;
    livemode: z.ZodBoolean;
    source_updated_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    last_synced_at: z.ZodISODateTime;
    mirror_version: z.ZodNumber;
    deleted_at: z.ZodNullable<z.ZodISODateTime>;
    coverage_state: z.ZodEnum<{
        unavailable: "unavailable";
        partial: "partial";
        complete: "complete";
    }>;
    /** Gap reasons when `partial` (one or more), one unavailable reason when `unavailable`, none when `complete`. */
    coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
        partial_hydration: "partial_hydration";
        missing_history: "missing_history";
        ambiguous_revision: "ambiguous_revision";
        missing_price_terms: "missing_price_terms";
        unmapped_customer: "unmapped_customer";
        missing_linkage: "missing_linkage";
        missing_ownership: "missing_ownership";
        provider_error: "provider_error";
        retention_window: "retention_window";
    }>, z.ZodEnum<{
        provider_error: "provider_error";
        uninitialized: "uninitialized";
        not_connected: "not_connected";
        hydration_in_progress: "hydration_in_progress";
        history_unavailable: "history_unavailable";
    }>]>>;
    /** Provider-only fields, keyed by provider name (`{ clerk: { plan_slug: … } }`); JSON-plain. */
    provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
};
/** The columns RevTurbine keeps for its own bookkeeping; they never decide what the provider said. */
declare const BILLING_MIRROR_LOCAL_FIELDS: readonly ["observed_at", "last_synced_at", "mirror_version"];
/** A product or plan the provider sells (a Stripe Product, a Clerk Plan). */
declare const BillingMirrorOfferingSchema: z.ZodObject<{
    name: z.ZodNullable<z.ZodString>;
    active: z.ZodNullable<z.ZodBoolean>;
    tenant_id: z.ZodString;
    provider: z.ZodEnum<{
        stripe: "stripe";
        clerk: "clerk";
    }>;
    provider_id: z.ZodString;
    provider_account_id: z.ZodNullable<z.ZodString>;
    livemode: z.ZodBoolean;
    source_updated_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    last_synced_at: z.ZodISODateTime;
    mirror_version: z.ZodNumber;
    deleted_at: z.ZodNullable<z.ZodISODateTime>;
    coverage_state: z.ZodEnum<{
        unavailable: "unavailable";
        partial: "partial";
        complete: "complete";
    }>;
    coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
        partial_hydration: "partial_hydration";
        missing_history: "missing_history";
        ambiguous_revision: "ambiguous_revision";
        missing_price_terms: "missing_price_terms";
        unmapped_customer: "unmapped_customer";
        missing_linkage: "missing_linkage";
        missing_ownership: "missing_ownership";
        provider_error: "provider_error";
        retention_window: "retention_window";
    }>, z.ZodEnum<{
        provider_error: "provider_error";
        uninitialized: "uninitialized";
        not_connected: "not_connected";
        hydration_in_progress: "hydration_in_progress";
        history_unavailable: "history_unavailable";
    }>]>>;
    provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strict>;
/**
 * A price of an offering. Its amounts and cadences are its terms
 * ({@link BillingMirrorPriceTermSchema}): one term for a Stripe Price, one per
 * cadence for a Clerk plan that bills monthly and annually.
 */
declare const BillingMirrorPriceSchema: z.ZodObject<{
    offering_provider_id: z.ZodNullable<z.ZodString>;
    price_type: z.ZodEnum<{
        one_time: "one_time";
        recurring: "recurring";
    }>;
    active: z.ZodNullable<z.ZodBoolean>;
    lookup_key: z.ZodNullable<z.ZodString>;
    tenant_id: z.ZodString;
    provider: z.ZodEnum<{
        stripe: "stripe";
        clerk: "clerk";
    }>;
    provider_id: z.ZodString;
    provider_account_id: z.ZodNullable<z.ZodString>;
    livemode: z.ZodBoolean;
    source_updated_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    last_synced_at: z.ZodISODateTime;
    mirror_version: z.ZodNumber;
    deleted_at: z.ZodNullable<z.ZodISODateTime>;
    coverage_state: z.ZodEnum<{
        unavailable: "unavailable";
        partial: "partial";
        complete: "complete";
    }>;
    coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
        partial_hydration: "partial_hydration";
        missing_history: "missing_history";
        ambiguous_revision: "ambiguous_revision";
        missing_price_terms: "missing_price_terms";
        unmapped_customer: "unmapped_customer";
        missing_linkage: "missing_linkage";
        missing_ownership: "missing_ownership";
        provider_error: "provider_error";
        retention_window: "retention_window";
    }>, z.ZodEnum<{
        provider_error: "provider_error";
        uninitialized: "uninitialized";
        not_connected: "not_connected";
        hydration_in_progress: "hydration_in_progress";
        history_unavailable: "history_unavailable";
    }>]>>;
    provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strict>;
/**
 * The key of one price term: interval, interval count and currency
 * (`month:1:USD`), or `one_time:USD`. Two terms of one price never share it.
 */
declare function billingMirrorTermKey(term: {
    interval: string | null;
    interval_count: number | null;
    currency: string;
}): string;
/**
 * One billing term of a price: cadence, currency and amount. `provider_id` is
 * the PRICE's provider id; `term_key` ({@link billingMirrorTermKey}) tells a
 * price's terms apart. `unit_amount_minor` is null for tiered and package
 * prices, whose exact `terms` ride beside it; a null amount with null terms is
 * a coverage gap (`missing_price_terms`).
 */
declare const BillingMirrorPriceTermSchema: z.ZodObject<{
    term_key: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    interval: z.ZodNullable<z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        year: "year";
    }>>;
    interval_count: z.ZodNullable<z.ZodNumber>;
    usage_type: z.ZodNullable<z.ZodEnum<{
        metered: "metered";
        licensed: "licensed";
    }>>;
    unit_amount_minor: z.ZodNullable<z.ZodString>;
    terms: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
        billing_scheme: z.ZodLiteral<"per_unit">;
        unit_amount_decimal: z.ZodString;
        transform_quantity: z.ZodNullable<z.ZodObject<{
            divide_by: z.ZodNumber;
            round: z.ZodEnum<{
                up: "up";
                down: "down";
            }>;
        }, z.core.$strict>>;
    }, z.core.$strict>, z.ZodObject<{
        billing_scheme: z.ZodLiteral<"tiered">;
        tiers_mode: z.ZodEnum<{
            graduated: "graduated";
            volume: "volume";
        }>;
        tiers: z.ZodArray<z.ZodObject<{
            up_to: z.ZodNullable<z.ZodNumber>;
            unit_amount_decimal: z.ZodNullable<z.ZodString>;
            flat_amount_minor: z.ZodNullable<z.ZodString>;
        }, z.core.$strict>>;
    }, z.core.$strict>], "billing_scheme">>;
    tenant_id: z.ZodString;
    provider: z.ZodEnum<{
        stripe: "stripe";
        clerk: "clerk";
    }>;
    provider_id: z.ZodString;
    provider_account_id: z.ZodNullable<z.ZodString>;
    livemode: z.ZodBoolean;
    source_updated_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    last_synced_at: z.ZodISODateTime;
    mirror_version: z.ZodNumber;
    deleted_at: z.ZodNullable<z.ZodISODateTime>;
    coverage_state: z.ZodEnum<{
        unavailable: "unavailable";
        partial: "partial";
        complete: "complete";
    }>;
    coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
        partial_hydration: "partial_hydration";
        missing_history: "missing_history";
        ambiguous_revision: "ambiguous_revision";
        missing_price_terms: "missing_price_terms";
        unmapped_customer: "unmapped_customer";
        missing_linkage: "missing_linkage";
        missing_ownership: "missing_ownership";
        provider_error: "provider_error";
        retention_window: "retention_window";
    }>, z.ZodEnum<{
        provider_error: "provider_error";
        uninitialized: "uninitialized";
        not_connected: "not_connected";
        hydration_in_progress: "hydration_in_progress";
        history_unavailable: "history_unavailable";
    }>]>>;
    provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strict>;
/** Where a payer's account proxy (DEC-778) can come from. */
declare const BILLING_MIRROR_ACCOUNT_EXTERNAL_ID_SOURCES: readonly ["customer_metadata.user_id"];
/**
 * Who pays: a Stripe customer, or a Clerk user or organization. The payer's
 * `provider_id` resolves to a RevTurbine account through the identity map at
 * read time; the mirror never stores that resolution. No personal data
 * (email, name, address) is mirrored. `account_external_id` is the DEC-778
 * proxy the provider holds, kept beside the payer and never resolved here.
 */
declare const BillingMirrorPayerSchema: z.ZodObject<{
    payer_kind: z.ZodEnum<{
        customer: "customer";
        user: "user";
        organization: "organization";
    }>;
    has_default_payment_method: z.ZodNullable<z.ZodBoolean>;
    delinquent: z.ZodNullable<z.ZodBoolean>;
    currency: z.ZodNullable<z.ZodString>;
    account_external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    account_external_id_source: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
        "customer_metadata.user_id": "customer_metadata.user_id";
    }>>>;
    tenant_id: z.ZodString;
    provider: z.ZodEnum<{
        stripe: "stripe";
        clerk: "clerk";
    }>;
    provider_id: z.ZodString;
    provider_account_id: z.ZodNullable<z.ZodString>;
    livemode: z.ZodBoolean;
    source_updated_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    last_synced_at: z.ZodISODateTime;
    mirror_version: z.ZodNumber;
    deleted_at: z.ZodNullable<z.ZodISODateTime>;
    coverage_state: z.ZodEnum<{
        unavailable: "unavailable";
        partial: "partial";
        complete: "complete";
    }>;
    coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
        partial_hydration: "partial_hydration";
        missing_history: "missing_history";
        ambiguous_revision: "ambiguous_revision";
        missing_price_terms: "missing_price_terms";
        unmapped_customer: "unmapped_customer";
        missing_linkage: "missing_linkage";
        missing_ownership: "missing_ownership";
        provider_error: "provider_error";
        retention_window: "retention_window";
    }>, z.ZodEnum<{
        provider_error: "provider_error";
        uninitialized: "uninitialized";
        not_connected: "not_connected";
        hydration_in_progress: "hydration_in_progress";
        history_unavailable: "history_unavailable";
    }>]>>;
    provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strict>;
/**
 * One subscription of one payer. `status` is provider-neutral; the provider's
 * own word is kept in `provider_status` (for Stripe, `StripeSubscriptionStatusSchema`,
 * which a known status equals). `cancellation_reason` is the provider's stated
 * reason (Stripe `cancellation_details.reason`), read by the churn-cause classifier.
 */
declare const BillingMirrorSubscriptionSchema: z.ZodObject<{
    payer_provider_id: z.ZodString;
    status: z.ZodEnum<{
        unknown: "unknown";
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    provider_status: z.ZodString;
    currency: z.ZodNullable<z.ZodString>;
    started_at: z.ZodNullable<z.ZodISODateTime>;
    current_period_start: z.ZodNullable<z.ZodISODateTime>;
    current_period_end: z.ZodNullable<z.ZodISODateTime>;
    trial_start: z.ZodNullable<z.ZodISODateTime>;
    trial_end: z.ZodNullable<z.ZodISODateTime>;
    cancel_at_period_end: z.ZodBoolean;
    cancel_at: z.ZodNullable<z.ZodISODateTime>;
    canceled_at: z.ZodNullable<z.ZodISODateTime>;
    ended_at: z.ZodNullable<z.ZodISODateTime>;
    cancellation_reason: z.ZodNullable<z.ZodString>;
    has_default_payment_method: z.ZodNullable<z.ZodBoolean>;
    discount_terms: z.ZodArray<z.ZodObject<{
        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"percentage">;
            percent: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"fixed">;
            currency: z.ZodString;
            currency_exponent: z.ZodNumber;
            amount_minor: z.ZodString;
        }, z.core.$strict>], "kind">;
        discount_id: z.ZodString;
        recurrence: z.ZodEnum<{
            recurring: "recurring";
            invoice_only: "invoice_only";
        }>;
        item_id: z.ZodNullable<z.ZodString>;
        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
        starts_at: z.ZodISODateTime;
        ends_at: z.ZodNullable<z.ZodISODateTime>;
    }, z.core.$strict>>;
    tenant_id: z.ZodString;
    provider: z.ZodEnum<{
        stripe: "stripe";
        clerk: "clerk";
    }>;
    provider_id: z.ZodString;
    provider_account_id: z.ZodNullable<z.ZodString>;
    livemode: z.ZodBoolean;
    source_updated_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    last_synced_at: z.ZodISODateTime;
    mirror_version: z.ZodNumber;
    deleted_at: z.ZodNullable<z.ZodISODateTime>;
    coverage_state: z.ZodEnum<{
        unavailable: "unavailable";
        partial: "partial";
        complete: "complete";
    }>;
    coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
        partial_hydration: "partial_hydration";
        missing_history: "missing_history";
        ambiguous_revision: "ambiguous_revision";
        missing_price_terms: "missing_price_terms";
        unmapped_customer: "unmapped_customer";
        missing_linkage: "missing_linkage";
        missing_ownership: "missing_ownership";
        provider_error: "provider_error";
        retention_window: "retention_window";
    }>, z.ZodEnum<{
        provider_error: "provider_error";
        uninitialized: "uninitialized";
        not_connected: "not_connected";
        hydration_in_progress: "hydration_in_progress";
        history_unavailable: "history_unavailable";
    }>]>>;
    provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strict>;
/**
 * A full-period amount normalized to one month: × f(interval) ÷ interval count
 * (`MRR_INTERVAL_MONTH_FACTORS`, the MRR oracle's own factors), as an exact
 * reduced fraction of minor units. `billingMirrorEffectiveMonthlyMinor('10000', 'year', 1)` is `"2500/3"`.
 */
declare function billingMirrorEffectiveMonthlyMinor(fullPeriodMinor: string, interval: (typeof MRR_RECURRING_INTERVALS)[number], intervalCount: number): string;
/**
 * One item of a subscription: the `BillingSubscriptionItemSnapshotSchema` and
 * `BillingRecurringPriceSchema` fields, flattened into columns, plus the mirror
 * columns. Amount, currency, interval and interval count, usage type, quantity,
 * discount terms and period bounds are copied from the price term in force, so
 * a reader never joins to reach them.
 */
declare const BillingMirrorSubscriptionItemSchema: z.ZodObject<{
    subscription_provider_id: z.ZodString;
    price_provider_id: z.ZodString;
    offering_provider_id: z.ZodNullable<z.ZodString>;
    quantity: z.ZodNullable<z.ZodNumber>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    interval: z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        year: "year";
    }>;
    interval_count: z.ZodNumber;
    usage_type: z.ZodEnum<{
        metered: "metered";
        licensed: "licensed";
    }>;
    unit_amount_minor: z.ZodNullable<z.ZodString>;
    price_terms: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
        billing_scheme: z.ZodLiteral<"per_unit">;
        unit_amount_decimal: z.ZodString;
        transform_quantity: z.ZodNullable<z.ZodObject<{
            divide_by: z.ZodNumber;
            round: z.ZodEnum<{
                up: "up";
                down: "down";
            }>;
        }, z.core.$strict>>;
    }, z.core.$strict>, z.ZodObject<{
        billing_scheme: z.ZodLiteral<"tiered">;
        tiers_mode: z.ZodEnum<{
            graduated: "graduated";
            volume: "volume";
        }>;
        tiers: z.ZodArray<z.ZodObject<{
            up_to: z.ZodNullable<z.ZodNumber>;
            unit_amount_decimal: z.ZodNullable<z.ZodString>;
            flat_amount_minor: z.ZodNullable<z.ZodString>;
        }, z.core.$strict>>;
    }, z.core.$strict>], "billing_scheme">>;
    full_period_minor: z.ZodNullable<z.ZodString>;
    effective_monthly_minor: z.ZodNullable<z.ZodString>;
    discount_terms: z.ZodArray<z.ZodObject<{
        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"percentage">;
            percent: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"fixed">;
            currency: z.ZodString;
            currency_exponent: z.ZodNumber;
            amount_minor: z.ZodString;
        }, z.core.$strict>], "kind">;
        discount_id: z.ZodString;
        recurrence: z.ZodEnum<{
            recurring: "recurring";
            invoice_only: "invoice_only";
        }>;
        item_id: z.ZodNullable<z.ZodString>;
        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
        starts_at: z.ZodISODateTime;
        ends_at: z.ZodNullable<z.ZodISODateTime>;
    }, z.core.$strict>>;
    trial_end_at: z.ZodNullable<z.ZodISODateTime>;
    current_period_start: z.ZodNullable<z.ZodISODateTime>;
    current_period_end: z.ZodNullable<z.ZodISODateTime>;
    tenant_id: z.ZodString;
    provider: z.ZodEnum<{
        stripe: "stripe";
        clerk: "clerk";
    }>;
    provider_id: z.ZodString;
    provider_account_id: z.ZodNullable<z.ZodString>;
    livemode: z.ZodBoolean;
    source_updated_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    last_synced_at: z.ZodISODateTime;
    mirror_version: z.ZodNumber;
    deleted_at: z.ZodNullable<z.ZodISODateTime>;
    coverage_state: z.ZodEnum<{
        unavailable: "unavailable";
        partial: "partial";
        complete: "complete";
    }>;
    coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
        partial_hydration: "partial_hydration";
        missing_history: "missing_history";
        ambiguous_revision: "ambiguous_revision";
        missing_price_terms: "missing_price_terms";
        unmapped_customer: "unmapped_customer";
        missing_linkage: "missing_linkage";
        missing_ownership: "missing_ownership";
        provider_error: "provider_error";
        retention_window: "retention_window";
    }>, z.ZodEnum<{
        provider_error: "provider_error";
        uninitialized: "uninitialized";
        not_connected: "not_connected";
        hydration_in_progress: "hydration_in_progress";
        history_unavailable: "history_unavailable";
    }>]>>;
    provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strict>;
/**
 * One invoice. Invoices are authoritative history (D10): their lines carry the
 * price, quantity and period of what was billed. Amounts are signed minor
 * units (a credit can make a total negative).
 */
declare const BillingMirrorInvoiceSchema: z.ZodObject<{
    payer_provider_id: z.ZodString;
    subscription_provider_id: z.ZodNullable<z.ZodString>;
    status: z.ZodEnum<{
        void: "void";
        unknown: "unknown";
        paid: "paid";
        draft: "draft";
        open: "open";
        uncollectible: "uncollectible";
    }>;
    provider_status: z.ZodString;
    billing_reason: z.ZodNullable<z.ZodString>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    subtotal_minor: z.ZodString;
    total_minor: z.ZodString;
    amount_due_minor: z.ZodString;
    amount_paid_minor: z.ZodString;
    period_start: z.ZodNullable<z.ZodISODateTime>;
    period_end: z.ZodNullable<z.ZodISODateTime>;
    created_at_provider: z.ZodISODateTime;
    finalized_at: z.ZodNullable<z.ZodISODateTime>;
    paid_at: z.ZodNullable<z.ZodISODateTime>;
    tenant_id: z.ZodString;
    provider: z.ZodEnum<{
        stripe: "stripe";
        clerk: "clerk";
    }>;
    provider_id: z.ZodString;
    provider_account_id: z.ZodNullable<z.ZodString>;
    livemode: z.ZodBoolean;
    source_updated_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    last_synced_at: z.ZodISODateTime;
    mirror_version: z.ZodNumber;
    deleted_at: z.ZodNullable<z.ZodISODateTime>;
    coverage_state: z.ZodEnum<{
        unavailable: "unavailable";
        partial: "partial";
        complete: "complete";
    }>;
    coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
        partial_hydration: "partial_hydration";
        missing_history: "missing_history";
        ambiguous_revision: "ambiguous_revision";
        missing_price_terms: "missing_price_terms";
        unmapped_customer: "unmapped_customer";
        missing_linkage: "missing_linkage";
        missing_ownership: "missing_ownership";
        provider_error: "provider_error";
        retention_window: "retention_window";
    }>, z.ZodEnum<{
        provider_error: "provider_error";
        uninitialized: "uninitialized";
        not_connected: "not_connected";
        hydration_in_progress: "hydration_in_progress";
        history_unavailable: "history_unavailable";
    }>]>>;
    provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strict>;
/**
 * One line of an invoice: a subscription item's period charge (the
 * `BillingInvoiceRecurringLineSchema` fields: line identity, price snapshot,
 * quantity, service period, amounts), or a one-off invoice item.
 */
declare const BillingMirrorInvoiceLineSchema: z.ZodObject<{
    invoice_provider_id: z.ZodString;
    line_kind: z.ZodEnum<{
        unknown: "unknown";
        subscription: "subscription";
        invoice_item: "invoice_item";
    }>;
    subscription_provider_id: z.ZodNullable<z.ZodString>;
    subscription_item_provider_id: z.ZodNullable<z.ZodString>;
    price_provider_id: z.ZodNullable<z.ZodString>;
    quantity: z.ZodNullable<z.ZodNumber>;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    subtotal_minor: z.ZodString;
    discount_minor: z.ZodString;
    tax_minor: z.ZodString;
    total_minor: z.ZodString;
    proration: z.ZodBoolean;
    service_period_start_at: z.ZodNullable<z.ZodISODateTime>;
    service_period_end_at: z.ZodNullable<z.ZodISODateTime>;
    tenant_id: z.ZodString;
    provider: z.ZodEnum<{
        stripe: "stripe";
        clerk: "clerk";
    }>;
    provider_id: z.ZodString;
    provider_account_id: z.ZodNullable<z.ZodString>;
    livemode: z.ZodBoolean;
    source_updated_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    last_synced_at: z.ZodISODateTime;
    mirror_version: z.ZodNumber;
    deleted_at: z.ZodNullable<z.ZodISODateTime>;
    coverage_state: z.ZodEnum<{
        unavailable: "unavailable";
        partial: "partial";
        complete: "complete";
    }>;
    coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
        partial_hydration: "partial_hydration";
        missing_history: "missing_history";
        ambiguous_revision: "ambiguous_revision";
        missing_price_terms: "missing_price_terms";
        unmapped_customer: "unmapped_customer";
        missing_linkage: "missing_linkage";
        missing_ownership: "missing_ownership";
        provider_error: "provider_error";
        retention_window: "retention_window";
    }>, z.ZodEnum<{
        provider_error: "provider_error";
        uninitialized: "uninitialized";
        not_connected: "not_connected";
        hydration_in_progress: "hydration_in_progress";
        history_unavailable: "history_unavailable";
    }>]>>;
    provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strict>;
/**
 * Provider-neutral payment statuses: a capture that succeeded, one still
 * pending, one that failed (or was canceled before capture); `unknown` keeps
 * the provider's word in `provider_status`.
 */
declare const BILLING_MIRROR_PAYMENT_STATUSES: readonly ["succeeded", "pending", "failed", "unknown"];
declare const BillingMirrorPaymentStatusSchema: z.ZodEnum<{
    unknown: "unknown";
    pending: "pending";
    succeeded: "succeeded";
    failed: "failed";
}>;
/**
 * One payment (a capture) of one payer (RM-892 R3; ST-925 defines this minimal
 * row ahead of ST-898, which extends it with refunds, disputes and checkout
 * sessions as their own entities). For Stripe the `provider_id` is the
 * Charge id: a PaymentIntent and its Charge are one payment, keyed by the
 * charge, with the intent in `payment_intent_provider_id`. A payment with an
 * invoice reference belongs to a real subscription; one without is the
 * evidence the payments-derived subscription fallback reads (ST-925). The
 * provider's connect application, when there is one, rides in
 * `provider_extension` (`{ stripe: { application } }`).
 */
declare const BillingMirrorPaymentSchema: z.ZodObject<{
    payer_provider_id: z.ZodNullable<z.ZodString>;
    payment_intent_provider_id: z.ZodNullable<z.ZodString>;
    invoice_provider_id: z.ZodNullable<z.ZodString>;
    subscription_provider_id: z.ZodNullable<z.ZodString>;
    status: z.ZodEnum<{
        unknown: "unknown";
        pending: "pending";
        succeeded: "succeeded";
        failed: "failed";
    }>;
    provider_status: z.ZodString;
    currency: z.ZodString;
    currency_exponent: z.ZodNumber;
    captured_minor: z.ZodString;
    refunded_minor: z.ZodString;
    captured_at: z.ZodISODateTime;
    payment_method_present: z.ZodNullable<z.ZodBoolean>;
    description: z.ZodNullable<z.ZodString>;
    metadata: z.ZodRecord<z.ZodString, z.ZodString>;
    tenant_id: z.ZodString;
    provider: z.ZodEnum<{
        stripe: "stripe";
        clerk: "clerk";
    }>;
    provider_id: z.ZodString;
    provider_account_id: z.ZodNullable<z.ZodString>;
    livemode: z.ZodBoolean;
    source_updated_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    last_synced_at: z.ZodISODateTime;
    mirror_version: z.ZodNumber;
    deleted_at: z.ZodNullable<z.ZodISODateTime>;
    coverage_state: z.ZodEnum<{
        unavailable: "unavailable";
        partial: "partial";
        complete: "complete";
    }>;
    coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
        partial_hydration: "partial_hydration";
        missing_history: "missing_history";
        ambiguous_revision: "ambiguous_revision";
        missing_price_terms: "missing_price_terms";
        unmapped_customer: "unmapped_customer";
        missing_linkage: "missing_linkage";
        missing_ownership: "missing_ownership";
        provider_error: "provider_error";
        retention_window: "retention_window";
    }>, z.ZodEnum<{
        provider_error: "provider_error";
        uninitialized: "uninitialized";
        not_connected: "not_connected";
        hydration_in_progress: "hydration_in_progress";
        history_unavailable: "history_unavailable";
    }>]>>;
    provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strict>;
/** Every mirror entity's row schema, by entity name (the observation log's entity kinds use the same names). */
declare const BILLING_MIRROR_ROW_SCHEMAS: {
    readonly offering: z.ZodObject<{
        name: z.ZodNullable<z.ZodString>;
        active: z.ZodNullable<z.ZodBoolean>;
        tenant_id: z.ZodString;
        provider: z.ZodEnum<{
            stripe: "stripe";
            clerk: "clerk";
        }>;
        provider_id: z.ZodString;
        provider_account_id: z.ZodNullable<z.ZodString>;
        livemode: z.ZodBoolean;
        source_updated_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        last_synced_at: z.ZodISODateTime;
        mirror_version: z.ZodNumber;
        deleted_at: z.ZodNullable<z.ZodISODateTime>;
        coverage_state: z.ZodEnum<{
            unavailable: "unavailable";
            partial: "partial";
            complete: "complete";
        }>;
        coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
            partial_hydration: "partial_hydration";
            missing_history: "missing_history";
            ambiguous_revision: "ambiguous_revision";
            missing_price_terms: "missing_price_terms";
            unmapped_customer: "unmapped_customer";
            missing_linkage: "missing_linkage";
            missing_ownership: "missing_ownership";
            provider_error: "provider_error";
            retention_window: "retention_window";
        }>, z.ZodEnum<{
            provider_error: "provider_error";
            uninitialized: "uninitialized";
            not_connected: "not_connected";
            hydration_in_progress: "hydration_in_progress";
            history_unavailable: "history_unavailable";
        }>]>>;
        provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strict>;
    readonly price: z.ZodObject<{
        offering_provider_id: z.ZodNullable<z.ZodString>;
        price_type: z.ZodEnum<{
            one_time: "one_time";
            recurring: "recurring";
        }>;
        active: z.ZodNullable<z.ZodBoolean>;
        lookup_key: z.ZodNullable<z.ZodString>;
        tenant_id: z.ZodString;
        provider: z.ZodEnum<{
            stripe: "stripe";
            clerk: "clerk";
        }>;
        provider_id: z.ZodString;
        provider_account_id: z.ZodNullable<z.ZodString>;
        livemode: z.ZodBoolean;
        source_updated_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        last_synced_at: z.ZodISODateTime;
        mirror_version: z.ZodNumber;
        deleted_at: z.ZodNullable<z.ZodISODateTime>;
        coverage_state: z.ZodEnum<{
            unavailable: "unavailable";
            partial: "partial";
            complete: "complete";
        }>;
        coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
            partial_hydration: "partial_hydration";
            missing_history: "missing_history";
            ambiguous_revision: "ambiguous_revision";
            missing_price_terms: "missing_price_terms";
            unmapped_customer: "unmapped_customer";
            missing_linkage: "missing_linkage";
            missing_ownership: "missing_ownership";
            provider_error: "provider_error";
            retention_window: "retention_window";
        }>, z.ZodEnum<{
            provider_error: "provider_error";
            uninitialized: "uninitialized";
            not_connected: "not_connected";
            hydration_in_progress: "hydration_in_progress";
            history_unavailable: "history_unavailable";
        }>]>>;
        provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strict>;
    readonly price_term: z.ZodObject<{
        term_key: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        interval: z.ZodNullable<z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            year: "year";
        }>>;
        interval_count: z.ZodNullable<z.ZodNumber>;
        usage_type: z.ZodNullable<z.ZodEnum<{
            metered: "metered";
            licensed: "licensed";
        }>>;
        unit_amount_minor: z.ZodNullable<z.ZodString>;
        terms: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
            billing_scheme: z.ZodLiteral<"per_unit">;
            unit_amount_decimal: z.ZodString;
            transform_quantity: z.ZodNullable<z.ZodObject<{
                divide_by: z.ZodNumber;
                round: z.ZodEnum<{
                    up: "up";
                    down: "down";
                }>;
            }, z.core.$strict>>;
        }, z.core.$strict>, z.ZodObject<{
            billing_scheme: z.ZodLiteral<"tiered">;
            tiers_mode: z.ZodEnum<{
                graduated: "graduated";
                volume: "volume";
            }>;
            tiers: z.ZodArray<z.ZodObject<{
                up_to: z.ZodNullable<z.ZodNumber>;
                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                flat_amount_minor: z.ZodNullable<z.ZodString>;
            }, z.core.$strict>>;
        }, z.core.$strict>], "billing_scheme">>;
        tenant_id: z.ZodString;
        provider: z.ZodEnum<{
            stripe: "stripe";
            clerk: "clerk";
        }>;
        provider_id: z.ZodString;
        provider_account_id: z.ZodNullable<z.ZodString>;
        livemode: z.ZodBoolean;
        source_updated_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        last_synced_at: z.ZodISODateTime;
        mirror_version: z.ZodNumber;
        deleted_at: z.ZodNullable<z.ZodISODateTime>;
        coverage_state: z.ZodEnum<{
            unavailable: "unavailable";
            partial: "partial";
            complete: "complete";
        }>;
        coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
            partial_hydration: "partial_hydration";
            missing_history: "missing_history";
            ambiguous_revision: "ambiguous_revision";
            missing_price_terms: "missing_price_terms";
            unmapped_customer: "unmapped_customer";
            missing_linkage: "missing_linkage";
            missing_ownership: "missing_ownership";
            provider_error: "provider_error";
            retention_window: "retention_window";
        }>, z.ZodEnum<{
            provider_error: "provider_error";
            uninitialized: "uninitialized";
            not_connected: "not_connected";
            hydration_in_progress: "hydration_in_progress";
            history_unavailable: "history_unavailable";
        }>]>>;
        provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strict>;
    readonly payer: z.ZodObject<{
        payer_kind: z.ZodEnum<{
            customer: "customer";
            user: "user";
            organization: "organization";
        }>;
        has_default_payment_method: z.ZodNullable<z.ZodBoolean>;
        delinquent: z.ZodNullable<z.ZodBoolean>;
        currency: z.ZodNullable<z.ZodString>;
        account_external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        account_external_id_source: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
            "customer_metadata.user_id": "customer_metadata.user_id";
        }>>>;
        tenant_id: z.ZodString;
        provider: z.ZodEnum<{
            stripe: "stripe";
            clerk: "clerk";
        }>;
        provider_id: z.ZodString;
        provider_account_id: z.ZodNullable<z.ZodString>;
        livemode: z.ZodBoolean;
        source_updated_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        last_synced_at: z.ZodISODateTime;
        mirror_version: z.ZodNumber;
        deleted_at: z.ZodNullable<z.ZodISODateTime>;
        coverage_state: z.ZodEnum<{
            unavailable: "unavailable";
            partial: "partial";
            complete: "complete";
        }>;
        coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
            partial_hydration: "partial_hydration";
            missing_history: "missing_history";
            ambiguous_revision: "ambiguous_revision";
            missing_price_terms: "missing_price_terms";
            unmapped_customer: "unmapped_customer";
            missing_linkage: "missing_linkage";
            missing_ownership: "missing_ownership";
            provider_error: "provider_error";
            retention_window: "retention_window";
        }>, z.ZodEnum<{
            provider_error: "provider_error";
            uninitialized: "uninitialized";
            not_connected: "not_connected";
            hydration_in_progress: "hydration_in_progress";
            history_unavailable: "history_unavailable";
        }>]>>;
        provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strict>;
    readonly subscription: z.ZodObject<{
        payer_provider_id: z.ZodString;
        status: z.ZodEnum<{
            unknown: "unknown";
            active: "active";
            past_due: "past_due";
            canceled: "canceled";
            trialing: "trialing";
            unpaid: "unpaid";
            incomplete: "incomplete";
            incomplete_expired: "incomplete_expired";
            paused: "paused";
        }>;
        provider_status: z.ZodString;
        currency: z.ZodNullable<z.ZodString>;
        started_at: z.ZodNullable<z.ZodISODateTime>;
        current_period_start: z.ZodNullable<z.ZodISODateTime>;
        current_period_end: z.ZodNullable<z.ZodISODateTime>;
        trial_start: z.ZodNullable<z.ZodISODateTime>;
        trial_end: z.ZodNullable<z.ZodISODateTime>;
        cancel_at_period_end: z.ZodBoolean;
        cancel_at: z.ZodNullable<z.ZodISODateTime>;
        canceled_at: z.ZodNullable<z.ZodISODateTime>;
        ended_at: z.ZodNullable<z.ZodISODateTime>;
        cancellation_reason: z.ZodNullable<z.ZodString>;
        has_default_payment_method: z.ZodNullable<z.ZodBoolean>;
        discount_terms: z.ZodArray<z.ZodObject<{
            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"percentage">;
                percent: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"fixed">;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                amount_minor: z.ZodString;
            }, z.core.$strict>], "kind">;
            discount_id: z.ZodString;
            recurrence: z.ZodEnum<{
                recurring: "recurring";
                invoice_only: "invoice_only";
            }>;
            item_id: z.ZodNullable<z.ZodString>;
            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
            starts_at: z.ZodISODateTime;
            ends_at: z.ZodNullable<z.ZodISODateTime>;
        }, z.core.$strict>>;
        tenant_id: z.ZodString;
        provider: z.ZodEnum<{
            stripe: "stripe";
            clerk: "clerk";
        }>;
        provider_id: z.ZodString;
        provider_account_id: z.ZodNullable<z.ZodString>;
        livemode: z.ZodBoolean;
        source_updated_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        last_synced_at: z.ZodISODateTime;
        mirror_version: z.ZodNumber;
        deleted_at: z.ZodNullable<z.ZodISODateTime>;
        coverage_state: z.ZodEnum<{
            unavailable: "unavailable";
            partial: "partial";
            complete: "complete";
        }>;
        coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
            partial_hydration: "partial_hydration";
            missing_history: "missing_history";
            ambiguous_revision: "ambiguous_revision";
            missing_price_terms: "missing_price_terms";
            unmapped_customer: "unmapped_customer";
            missing_linkage: "missing_linkage";
            missing_ownership: "missing_ownership";
            provider_error: "provider_error";
            retention_window: "retention_window";
        }>, z.ZodEnum<{
            provider_error: "provider_error";
            uninitialized: "uninitialized";
            not_connected: "not_connected";
            hydration_in_progress: "hydration_in_progress";
            history_unavailable: "history_unavailable";
        }>]>>;
        provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strict>;
    readonly subscription_item: z.ZodObject<{
        subscription_provider_id: z.ZodString;
        price_provider_id: z.ZodString;
        offering_provider_id: z.ZodNullable<z.ZodString>;
        quantity: z.ZodNullable<z.ZodNumber>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        interval: z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            year: "year";
        }>;
        interval_count: z.ZodNumber;
        usage_type: z.ZodEnum<{
            metered: "metered";
            licensed: "licensed";
        }>;
        unit_amount_minor: z.ZodNullable<z.ZodString>;
        price_terms: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
            billing_scheme: z.ZodLiteral<"per_unit">;
            unit_amount_decimal: z.ZodString;
            transform_quantity: z.ZodNullable<z.ZodObject<{
                divide_by: z.ZodNumber;
                round: z.ZodEnum<{
                    up: "up";
                    down: "down";
                }>;
            }, z.core.$strict>>;
        }, z.core.$strict>, z.ZodObject<{
            billing_scheme: z.ZodLiteral<"tiered">;
            tiers_mode: z.ZodEnum<{
                graduated: "graduated";
                volume: "volume";
            }>;
            tiers: z.ZodArray<z.ZodObject<{
                up_to: z.ZodNullable<z.ZodNumber>;
                unit_amount_decimal: z.ZodNullable<z.ZodString>;
                flat_amount_minor: z.ZodNullable<z.ZodString>;
            }, z.core.$strict>>;
        }, z.core.$strict>], "billing_scheme">>;
        full_period_minor: z.ZodNullable<z.ZodString>;
        effective_monthly_minor: z.ZodNullable<z.ZodString>;
        discount_terms: z.ZodArray<z.ZodObject<{
            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"percentage">;
                percent: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"fixed">;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                amount_minor: z.ZodString;
            }, z.core.$strict>], "kind">;
            discount_id: z.ZodString;
            recurrence: z.ZodEnum<{
                recurring: "recurring";
                invoice_only: "invoice_only";
            }>;
            item_id: z.ZodNullable<z.ZodString>;
            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
            starts_at: z.ZodISODateTime;
            ends_at: z.ZodNullable<z.ZodISODateTime>;
        }, z.core.$strict>>;
        trial_end_at: z.ZodNullable<z.ZodISODateTime>;
        current_period_start: z.ZodNullable<z.ZodISODateTime>;
        current_period_end: z.ZodNullable<z.ZodISODateTime>;
        tenant_id: z.ZodString;
        provider: z.ZodEnum<{
            stripe: "stripe";
            clerk: "clerk";
        }>;
        provider_id: z.ZodString;
        provider_account_id: z.ZodNullable<z.ZodString>;
        livemode: z.ZodBoolean;
        source_updated_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        last_synced_at: z.ZodISODateTime;
        mirror_version: z.ZodNumber;
        deleted_at: z.ZodNullable<z.ZodISODateTime>;
        coverage_state: z.ZodEnum<{
            unavailable: "unavailable";
            partial: "partial";
            complete: "complete";
        }>;
        coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
            partial_hydration: "partial_hydration";
            missing_history: "missing_history";
            ambiguous_revision: "ambiguous_revision";
            missing_price_terms: "missing_price_terms";
            unmapped_customer: "unmapped_customer";
            missing_linkage: "missing_linkage";
            missing_ownership: "missing_ownership";
            provider_error: "provider_error";
            retention_window: "retention_window";
        }>, z.ZodEnum<{
            provider_error: "provider_error";
            uninitialized: "uninitialized";
            not_connected: "not_connected";
            hydration_in_progress: "hydration_in_progress";
            history_unavailable: "history_unavailable";
        }>]>>;
        provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strict>;
    readonly invoice: z.ZodObject<{
        payer_provider_id: z.ZodString;
        subscription_provider_id: z.ZodNullable<z.ZodString>;
        status: z.ZodEnum<{
            void: "void";
            unknown: "unknown";
            paid: "paid";
            draft: "draft";
            open: "open";
            uncollectible: "uncollectible";
        }>;
        provider_status: z.ZodString;
        billing_reason: z.ZodNullable<z.ZodString>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        subtotal_minor: z.ZodString;
        total_minor: z.ZodString;
        amount_due_minor: z.ZodString;
        amount_paid_minor: z.ZodString;
        period_start: z.ZodNullable<z.ZodISODateTime>;
        period_end: z.ZodNullable<z.ZodISODateTime>;
        created_at_provider: z.ZodISODateTime;
        finalized_at: z.ZodNullable<z.ZodISODateTime>;
        paid_at: z.ZodNullable<z.ZodISODateTime>;
        tenant_id: z.ZodString;
        provider: z.ZodEnum<{
            stripe: "stripe";
            clerk: "clerk";
        }>;
        provider_id: z.ZodString;
        provider_account_id: z.ZodNullable<z.ZodString>;
        livemode: z.ZodBoolean;
        source_updated_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        last_synced_at: z.ZodISODateTime;
        mirror_version: z.ZodNumber;
        deleted_at: z.ZodNullable<z.ZodISODateTime>;
        coverage_state: z.ZodEnum<{
            unavailable: "unavailable";
            partial: "partial";
            complete: "complete";
        }>;
        coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
            partial_hydration: "partial_hydration";
            missing_history: "missing_history";
            ambiguous_revision: "ambiguous_revision";
            missing_price_terms: "missing_price_terms";
            unmapped_customer: "unmapped_customer";
            missing_linkage: "missing_linkage";
            missing_ownership: "missing_ownership";
            provider_error: "provider_error";
            retention_window: "retention_window";
        }>, z.ZodEnum<{
            provider_error: "provider_error";
            uninitialized: "uninitialized";
            not_connected: "not_connected";
            hydration_in_progress: "hydration_in_progress";
            history_unavailable: "history_unavailable";
        }>]>>;
        provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strict>;
    readonly invoice_line: z.ZodObject<{
        invoice_provider_id: z.ZodString;
        line_kind: z.ZodEnum<{
            unknown: "unknown";
            subscription: "subscription";
            invoice_item: "invoice_item";
        }>;
        subscription_provider_id: z.ZodNullable<z.ZodString>;
        subscription_item_provider_id: z.ZodNullable<z.ZodString>;
        price_provider_id: z.ZodNullable<z.ZodString>;
        quantity: z.ZodNullable<z.ZodNumber>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        subtotal_minor: z.ZodString;
        discount_minor: z.ZodString;
        tax_minor: z.ZodString;
        total_minor: z.ZodString;
        proration: z.ZodBoolean;
        service_period_start_at: z.ZodNullable<z.ZodISODateTime>;
        service_period_end_at: z.ZodNullable<z.ZodISODateTime>;
        tenant_id: z.ZodString;
        provider: z.ZodEnum<{
            stripe: "stripe";
            clerk: "clerk";
        }>;
        provider_id: z.ZodString;
        provider_account_id: z.ZodNullable<z.ZodString>;
        livemode: z.ZodBoolean;
        source_updated_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        last_synced_at: z.ZodISODateTime;
        mirror_version: z.ZodNumber;
        deleted_at: z.ZodNullable<z.ZodISODateTime>;
        coverage_state: z.ZodEnum<{
            unavailable: "unavailable";
            partial: "partial";
            complete: "complete";
        }>;
        coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
            partial_hydration: "partial_hydration";
            missing_history: "missing_history";
            ambiguous_revision: "ambiguous_revision";
            missing_price_terms: "missing_price_terms";
            unmapped_customer: "unmapped_customer";
            missing_linkage: "missing_linkage";
            missing_ownership: "missing_ownership";
            provider_error: "provider_error";
            retention_window: "retention_window";
        }>, z.ZodEnum<{
            provider_error: "provider_error";
            uninitialized: "uninitialized";
            not_connected: "not_connected";
            hydration_in_progress: "hydration_in_progress";
            history_unavailable: "history_unavailable";
        }>]>>;
        provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strict>;
    readonly payment: z.ZodObject<{
        payer_provider_id: z.ZodNullable<z.ZodString>;
        payment_intent_provider_id: z.ZodNullable<z.ZodString>;
        invoice_provider_id: z.ZodNullable<z.ZodString>;
        subscription_provider_id: z.ZodNullable<z.ZodString>;
        status: z.ZodEnum<{
            unknown: "unknown";
            pending: "pending";
            succeeded: "succeeded";
            failed: "failed";
        }>;
        provider_status: z.ZodString;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        captured_minor: z.ZodString;
        refunded_minor: z.ZodString;
        captured_at: z.ZodISODateTime;
        payment_method_present: z.ZodNullable<z.ZodBoolean>;
        description: z.ZodNullable<z.ZodString>;
        metadata: z.ZodRecord<z.ZodString, z.ZodString>;
        tenant_id: z.ZodString;
        provider: z.ZodEnum<{
            stripe: "stripe";
            clerk: "clerk";
        }>;
        provider_id: z.ZodString;
        provider_account_id: z.ZodNullable<z.ZodString>;
        livemode: z.ZodBoolean;
        source_updated_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        last_synced_at: z.ZodISODateTime;
        mirror_version: z.ZodNumber;
        deleted_at: z.ZodNullable<z.ZodISODateTime>;
        coverage_state: z.ZodEnum<{
            unavailable: "unavailable";
            partial: "partial";
            complete: "complete";
        }>;
        coverage_reasons: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
            partial_hydration: "partial_hydration";
            missing_history: "missing_history";
            ambiguous_revision: "ambiguous_revision";
            missing_price_terms: "missing_price_terms";
            unmapped_customer: "unmapped_customer";
            missing_linkage: "missing_linkage";
            missing_ownership: "missing_ownership";
            provider_error: "provider_error";
            retention_window: "retention_window";
        }>, z.ZodEnum<{
            provider_error: "provider_error";
            uninitialized: "uninitialized";
            not_connected: "not_connected";
            hydration_in_progress: "hydration_in_progress";
            history_unavailable: "history_unavailable";
        }>]>>;
        provider_extension: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strict>;
};
type BillingMirrorEntity = keyof typeof BILLING_MIRROR_ROW_SCHEMAS;
declare const BILLING_MIRROR_ENTITIES: BillingMirrorEntity[];
/**
 * How a payments-derived subscription's billing cadence is known (ST-925,
 * ST-771/ST-776 evidence order): `stated` by the payment itself (a
 * description suffix such as "(month)", or the tenant's plan mapping),
 * `inferred` from the payer's repeated payments of one price point, or
 * `unknown`. Stated and inferred cadences count toward MRR (DEC-777, reversed
 * 2026-10-21); an unknown cadence rebuilds no subscription.
 */
declare const PAYMENT_CADENCE_PROVENANCES: readonly ["stated", "inferred", "unknown"];
type PaymentCadenceProvenance = (typeof PAYMENT_CADENCE_PROVENANCES)[number];
/** What a payments-derived item state records: a start, a renewal, a plan or amount change, a lapse, or a retraction. */
declare const PAYMENT_DERIVATION_EVIDENCE: readonly ["start", "renewal", "change", "lapse", "retracted"];
type PaymentDerivationEvidence = (typeof PAYMENT_DERIVATION_EVIDENCE)[number];
/** Where a payments-derived MRR amount came from, in precedence order (Kent 2026-10-21). */
declare const PAYMENT_AMOUNT_BASES: readonly ["metadata_amount", "captured_less_tax", "captured_net_of_refunds"];
type PaymentAmountBasis = (typeof PAYMENT_AMOUNT_BASES)[number];
/**
 * The provenance a payments-derived `subscription_item_state` carries (ST-925):
 * the item was rebuilt from verified payments, not read from a provider
 * subscription. `price_key` is the observed price point (ST-771), never a
 * provider price; the plan fields come only from the tenant's plan mapping;
 * `source_payment_ids` are the payments that evidence this state; `revision`
 * counts the earlier observations of the same item at the same instant, so a
 * correction (a refund that retracts a period) is a new row the fold reads last.
 */
declare const BillingItemStateDerivationSchema: z.ZodObject<{
    source: z.ZodLiteral<"payments">;
    cadence_provenance: z.ZodEnum<{
        unknown: "unknown";
        stated: "stated";
        inferred: "inferred";
    }>;
    evidence: z.ZodEnum<{
        start: "start";
        change: "change";
        renewal: "renewal";
        lapse: "lapse";
        retracted: "retracted";
    }>;
    price_key: z.ZodString;
    amount_basis: z.ZodEnum<{
        metadata_amount: "metadata_amount";
        captured_less_tax: "captured_less_tax";
        captured_net_of_refunds: "captured_net_of_refunds";
    }>;
    list_amount_minor: z.ZodNullable<z.ZodNumber>;
    description: z.ZodNullable<z.ZodString>;
    variation_handle: z.ZodNullable<z.ZodString>;
    product_handle: z.ZodNullable<z.ZodString>;
    item_kind: z.ZodNullable<z.ZodEnum<{
        plan: "plan";
        addon: "addon";
    }>>;
    source_payment_ids: z.ZodArray<z.ZodString>;
    revision: z.ZodNumber;
}, z.core.$strict>;
/**
 * The `state` of a `subscription_item_state` observation (RM-846 P10): one
 * subscription item's full state at the observation's `source_updated_at`, as
 * the MRR oracle reads it. The fields are the oracle's `SubscriptionItemObservation`
 * (subscription id, item id, price id, quantity, status, interval,
 * interval_count, unit_amount, currency, item_state) plus the payer's provider
 * customer id; `account_id` is resolved from the payer at fold time and
 * `effective_at` is the row's `source_updated_at`, so neither is stored here.
 *
 * A writer builds it from the observation's own payload, never from the mirror
 * row: a subscription-only change (cancel, pause, past_due) yields one row per
 * item carrying the new `status` with unchanged economics; an invoice-line
 * derivation sets `status = active` at the line's period start. A provider
 * status outside the oracle's vocabulary cannot be an item state: the writer
 * records that observation with `rejected_reason`.
 */
declare const BillingItemStateObservationSchema: z.ZodObject<{
    subscription_id: z.ZodString;
    item_id: z.ZodString;
    price_id: z.ZodString;
    quantity: z.ZodNumber;
    status: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
        canceled: "canceled";
        trialing: "trialing";
        unpaid: "unpaid";
        incomplete: "incomplete";
        incomplete_expired: "incomplete_expired";
        paused: "paused";
    }>;
    interval: z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        year: "year";
    }>;
    interval_count: z.ZodNumber;
    unit_amount: z.ZodNumber;
    currency: z.ZodString;
    item_state: z.ZodEnum<{
        present: "present";
        removed: "removed";
    }>;
    payer_provider_id: z.ZodString;
    derivation: z.ZodOptional<z.ZodObject<{
        source: z.ZodLiteral<"payments">;
        cadence_provenance: z.ZodEnum<{
            unknown: "unknown";
            stated: "stated";
            inferred: "inferred";
        }>;
        evidence: z.ZodEnum<{
            start: "start";
            change: "change";
            renewal: "renewal";
            lapse: "lapse";
            retracted: "retracted";
        }>;
        price_key: z.ZodString;
        amount_basis: z.ZodEnum<{
            metadata_amount: "metadata_amount";
            captured_less_tax: "captured_less_tax";
            captured_net_of_refunds: "captured_net_of_refunds";
        }>;
        list_amount_minor: z.ZodNullable<z.ZodNumber>;
        description: z.ZodNullable<z.ZodString>;
        variation_handle: z.ZodNullable<z.ZodString>;
        product_handle: z.ZodNullable<z.ZodString>;
        item_kind: z.ZodNullable<z.ZodEnum<{
            plan: "plan";
            addon: "addon";
        }>>;
        source_payment_ids: z.ZodArray<z.ZodString>;
        revision: z.ZodNumber;
    }, z.core.$strict>>;
}, z.core.$strict>;
/** What one observation describes: a mirror entity, or the denormalized state of one subscription item. */
declare const BILLING_OBSERVATION_ENTITY_KINDS: readonly ["offering", "price", "price_term", "payer", "subscription", "subscription_item", "invoice", "invoice_line", "payment", "subscription_item_state"];
type BillingObservationEntityKind = (typeof BILLING_OBSERVATION_ENTITY_KINDS)[number];
/** Which time `source_updated_at` is: an event's `created`, an invoice line's period start, or a fetch instant. */
declare const BILLING_OBSERVATION_SOURCE_TIME_KINDS: readonly ["event", "period", "fetch"];
type BillingObservationSourceTimeKind = (typeof BILLING_OBSERVATION_SOURCE_TIME_KINDS)[number];
/**
 * Where an observation came from, and the source time kind each source carries.
 * `payment_derivation` (ST-925) is a subscription item state rebuilt from
 * verified payments: like an invoice line it evidences a billed period, at the
 * payment's own time, so it is `period` kind and a first-seen one classifies
 * normally (a start is `new`), never as a seed.
 */
declare const BILLING_OBSERVATION_SOURCE_TIME_KIND_OF: {
    readonly webhook: "event";
    readonly event_backfill: "event";
    readonly api_snapshot: "fetch";
    readonly reconcile: "fetch";
    readonly invoice_line_derivation: "period";
    readonly payment_derivation: "period";
};
declare const BILLING_OBSERVATION_SOURCE_KINDS: (keyof typeof BILLING_OBSERVATION_SOURCE_TIME_KIND_OF)[];
type BillingObservationSourceKind = keyof typeof BILLING_OBSERVATION_SOURCE_TIME_KIND_OF;
/** The observation row's own version: bump when the `state` contracts change meaning. */
declare const BILLING_OBSERVATION_SCHEMA_VERSION = 1;
/**
 * The normalized content hash of an observation's `state`: SHA-256 of its
 * canonical JSON without RevTurbine's own bookkeeping columns
 * ({@link BILLING_MIRROR_LOCAL_FIELDS}), so a duplicate delivery of the same
 * provider state hashes the same and is one observation.
 */
declare function billingObservationContentHash(state: Readonly<Record<string, unknown>>): string;
/**
 * One row of the append-only observation log, `billing_observations` (RM-846
 * P1, P9, P10; the spec's `BillingObservation`, billing-provider-neutral.md).
 * Every mirror change appends one entity observation per changed entity and one
 * `subscription_item_state` observation per affected subscription item, in the
 * same transaction. Kept forever; a duplicate delivery is one row (the unique
 * key ends in `content_hash`).
 *
 * - `state`: for an entity kind, the mirror row as it was at `source_updated_at`
 *   (validated by that entity's row schema), or only its identity and
 *   `fields_present` for a partial observation; for `subscription_item_state`,
 *   a {@link BillingItemStateObservationSchema}.
 * - `applied`: whether the observation changed the mirror row (the ordering
 *   guard applies only a newer `source_updated_at`); null for
 *   `subscription_item_state`, which has no mirror row. Never a fold filter.
 * - `rejected_reason`: null for a valid observation. A row that failed
 *   validation keeps its raw `state` unvalidated, carries the reason, is never
 *   applied, and is excluded from the mirror and from the MRR fold.
 */
declare const BillingObservationSchema: z.ZodObject<{
    tenant_id: z.ZodString;
    provider: z.ZodEnum<{
        stripe: "stripe";
        clerk: "clerk";
    }>;
    entity_kind: z.ZodEnum<{
        price: "price";
        subscription: "subscription";
        invoice: "invoice";
        subscription_item: "subscription_item";
        payment: "payment";
        invoice_line: "invoice_line";
        offering: "offering";
        price_term: "price_term";
        payer: "payer";
        subscription_item_state: "subscription_item_state";
    }>;
    provider_id: z.ZodString;
    source_updated_at: z.ZodISODateTime;
    source_time_kind: z.ZodEnum<{
        period: "period";
        event: "event";
        fetch: "fetch";
    }>;
    observed_at: z.ZodISODateTime;
    source_kind: z.ZodEnum<{
        webhook: "webhook";
        event_backfill: "event_backfill";
        api_snapshot: "api_snapshot";
        reconcile: "reconcile";
        invoice_line_derivation: "invoice_line_derivation";
        payment_derivation: "payment_derivation";
    }>;
    source_ref: z.ZodString;
    content_hash: z.ZodString;
    schema_version: z.ZodNumber;
    state: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    fields_present: z.ZodNullable<z.ZodArray<z.ZodString>>;
    applied: z.ZodNullable<z.ZodBoolean>;
    rejected_reason: z.ZodNullable<z.ZodString>;
}, z.core.$strict>;

/**
 * The tenant's payment evidence configuration (ST-925, Kent 2026-10-21; carries
 * the ST-771 v3 evidence rules and the ST-776 cadence rules).
 *
 * Some tenants bill through an orchestrator (Clerk) on top of Stripe, so their
 * Stripe account holds payments but no subscriptions, invoices or prices. The
 * payments-derived subscription fallback rebuilds each payer's subscriptions
 * from verified payments. What a payment says about its plan, cadence and price
 * point is read through this configuration, never through tenant-specific code:
 *
 * - `cadence_tokens`: the parenthesized description suffixes that state a
 *   cadence ("ThetaEdge One (month)" → monthly). Matched case-insensitively,
 *   whole token, at the end of the trimmed description.
 * - `payment_type_key` with `start_values` / `renewal_values`: the metadata key
 *   that says whether a payment opened a subscription (a checkout) or renewed
 *   one. Supporting evidence only (ST-771 REQ-5): it never sets a cadence.
 * - `start_marker_keys`: metadata keys whose presence marks an opening payment
 *   (Clerk's `checkout_id`).
 * - `amount_key`, `amount_encoding`, `amount_fields`, `tax_fields`: the MRR
 *   amount is what the period actually charged, after discounts and before tax
 *   (Kent 2026-10-21): Clerk's base64 JSON `totals_with_proration` `Subtotal`,
 *   else the captured amount less `TaxTotal`, else the captured amount net of
 *   partial refunds. `price_point_fields` (`BaseFee`) only groups payments into
 *   price points; it is never an MRR amount.
 * - `plans`: the tenant's description → Playbook plan mapping (ST-771 REQ-3,
 *   DEC-779): exact descriptions, explicit aliases as separate rows, an
 *   optional effective window, and optionally the plan's stated cadence. No
 *   similarity matching; an unmapped description keeps no plan.
 * - `grace_days`: how long past its due date a period may stay unpaid before
 *   the rebuilt subscription ends (churn dated at the due date).
 *
 * A tenant with no configuration uses {@link DEFAULT_PAYMENT_EVIDENCE_CONFIG}:
 * the description suffixes and the Clerk metadata conventions, with no plan
 * mapping. Those defaults are an orchestrator's conventions, not any one
 * tenant's; the next Clerk-billed tenant needs no code change, and a tenant
 * whose payments say something else configures it here.
 */

/** The recurring intervals a stated or inferred cadence can name (the MRR oracle's). */
declare const PAYMENT_EVIDENCE_INTERVALS: readonly ["day", "week", "month", "year"];
type PaymentEvidenceInterval = (typeof PAYMENT_EVIDENCE_INTERVALS)[number];
declare const PaymentEvidenceCadenceTokenSchema: z.ZodObject<{
    token: z.ZodString;
    interval: z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        year: "year";
    }>;
    interval_count: z.ZodNumber;
}, z.core.$strict>;
declare const PaymentEvidencePlanMappingSchema: z.ZodObject<{
    description: z.ZodString;
    variation_handle: z.ZodString;
    product_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    item_kind: z.ZodDefault<z.ZodEnum<{
        plan: "plan";
        addon: "addon";
    }>>;
    interval: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        year: "year";
    }>>>;
    interval_count: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    effective_start: z.ZodDefault<z.ZodNullable<z.ZodISODateTime>>;
    effective_end: z.ZodDefault<z.ZodNullable<z.ZodISODateTime>>;
}, z.core.$strict>;
/** The tenant's payment evidence configuration; see the module comment. */
declare const PaymentEvidenceConfigSchema: z.ZodObject<{
    enabled: z.ZodDefault<z.ZodBoolean>;
    cadence_tokens: z.ZodArray<z.ZodObject<{
        token: z.ZodString;
        interval: z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            year: "year";
        }>;
        interval_count: z.ZodNumber;
    }, z.core.$strict>>;
    payment_type_key: z.ZodNullable<z.ZodString>;
    start_values: z.ZodArray<z.ZodString>;
    renewal_values: z.ZodArray<z.ZodString>;
    start_marker_keys: z.ZodArray<z.ZodString>;
    amount_key: z.ZodNullable<z.ZodString>;
    amount_encoding: z.ZodEnum<{
        base64_json: "base64_json";
        json: "json";
        integer: "integer";
    }>;
    amount_fields: z.ZodArray<z.ZodString>;
    tax_fields: z.ZodArray<z.ZodString>;
    price_point_fields: z.ZodArray<z.ZodString>;
    plans: z.ZodArray<z.ZodObject<{
        description: z.ZodString;
        variation_handle: z.ZodString;
        product_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        item_kind: z.ZodDefault<z.ZodEnum<{
            plan: "plan";
            addon: "addon";
        }>>;
        interval: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            year: "year";
        }>>>;
        interval_count: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        effective_start: z.ZodDefault<z.ZodNullable<z.ZodISODateTime>>;
        effective_end: z.ZodDefault<z.ZodNullable<z.ZodISODateTime>>;
    }, z.core.$strict>>;
    grace_days: z.ZodNumber;
}, z.core.$strict>;
type PaymentEvidenceConfig$1 = z.infer<typeof PaymentEvidenceConfigSchema>;
/**
 * The configuration a tenant without one uses: the ST-771 description suffixes
 * ("(month)" → monthly; "(annual)" / "(year)" → annual) widened to their
 * common spellings, and the Clerk metadata conventions observed on live
 * payments (`payment_type` = `checkout` | `recurring`, `checkout_id`,
 * base64 JSON `totals_with_proration`: `Subtotal` charged, `TaxTotal` tax,
 * `BaseFee` the undiscounted price point). No
 * plan mapping: plan identity comes only from a tenant's own rows.
 */
declare const DEFAULT_PAYMENT_EVIDENCE_CONFIG: PaymentEvidenceConfig$1;
/** The configuration in force: the tenant's, else the default. */
declare function resolvePaymentEvidenceConfig(stored: unknown): PaymentEvidenceConfig$1;

/**
 * Row contracts of the authoritative revenue tables in Neon (RM-846 §4.3;
 * ST-861). The daily MRR job writes them, one tenant-day per transaction; web's
 * Neon read path and, last, the Tinybird replica read them. `metrics_outbox`
 * is not here: ST-863 creates it with the Tinybird streaming phase (D14).
 *
 * A SERIES VERSION is the pair `(policy_version, calendar_version)`: the
 * movement policy and the tenant's `reporting_calendar_version`
 * ({@link MRR_UNVERSIONED_CALENDAR} while that is null). Every key carries both,
 * so a timezone change restates without pretending to be a rule change.
 *
 * | Table | Natural key | What one row is |
 * |---|---|---|
 * | `mrr_daily` | tenant, series version, `as_of`, account, subscription, item | one contributing subscription item's MRR at the close of a local day |
 * | `mrr_movements_daily` | the same, plus `component` | one item's movement over one local day, classified |
 * | `mrr_account_facts` | tenant, series version, account, currency | an account's first and last paid day in a currency |
 * | `mrr_tenant_state` | tenant | which series version readers read, its coverage and how far it is complete |
 * | `mrr_policy_switches` | tenant, `switched_at` | one switch of the active series version, kept indefinitely (D9) |
 *
 * `as_of` is a LOCAL calendar date (`YYYY-MM-DD`) of the tenant's reporting
 * calendar (`tenant_configs.timezone`, D11, P3); day, week and month windows
 * are built from these dates. Readers read only the tenant's active series
 * version and only `as_of <= complete_through`.
 *
 * Restatement is an upsert in place keyed by series version (D5): a rerun under
 * the same version bumps `mirror_version` on a changed row and sets `deleted_at`
 * on a row it no longer produces; a new version is written beside the old one
 * and switched in one transaction (`mrr_tenant_state`, `mrr_policy_switches`).
 *
 * Amounts are integer minor units, rounded half-up once per item by the oracle
 * (`roundMrrMinorUnits`); a Postgres `integer` bounds one item's monthly
 * amount to 2,147,483,647 minor units, and sums are taken in SQL as bigint.
 *
 * The values these rows carry (movement kinds, reasons, churn causes) are
 * decided by the oracle (`@revt-eng/optimization-core/oracles`, `advanceMrrDay`)
 * and only stored here (D3, D4): no reader re-derives a category.
 */

/** A real calendar date `YYYY-MM-DD` (no time, no zone): the local date of a tenant-day. */
declare const MrrLocalDateSchema: z.ZodString;
/** A policy version identifier (`mrr-movement-classification-v2`, …). */
declare const MrrPolicyVersionSchema: z.ZodString;
/** The calendar version of a tenant whose `reporting_calendar_version` is still null. */
declare const MRR_UNVERSIONED_CALENDAR = "unversioned";
/** A reporting calendar version (`tenant_configs.reporting_calendar_version`), or {@link MRR_UNVERSIONED_CALENDAR}. */
declare const MrrCalendarVersionSchema: z.ZodString;
/** The calendar version a series is keyed by: the tenant's `reporting_calendar_version`, or `'unversioned'` while null. */
declare function mrrCalendarVersionOf(reportingCalendarVersion: string | null): string;
/** Movement kinds, at subscription and at account grain. `neutral`: the row does not move. */
declare const MRR_MOVEMENT_KINDS: readonly ["new", "expansion", "contraction", "churn", "reactivation", "neutral"];
type MrrMovementKindValue = (typeof MRR_MOVEMENT_KINDS)[number];
/**
 * The reason labels `mrr-movement-classification-v1` and `-v2` write (the movement
 * tree's sub-rows). `quantity:<entitlement>` names the entitlement a quantity
 * counts and is accepted beside these.
 */
declare const MRR_MOVEMENT_REASONS: readonly ["new", "reactivation", "churn", "subscription added", "subscription cancelled", "plan upgrade", "plan downgrade", "plan switch", "plan upgrade (new subscription)", "plan downgrade (new subscription)", "plan switch (new subscription)", "switched to annual", "switched to monthly", "add-on", "quantity", "unattributed", "unchanged"];
/** A v1 reason label, or `quantity:<entitlement>`. */
declare const MrrMovementReasonSchema: z.ZodString;
/** Why an account churned (`classifyChurnCause`); the oracle's `CHURN_CAUSES`. */
declare const MRR_CHURN_CAUSES: readonly ["customer_cancelled", "payment_failure", "unknown"];
/** How an item's price binds to the Playbook: a plan variation, an add-on, or nothing. */
declare const MRR_ITEM_KINDS: readonly ["plan", "addon", "unbound"];
/** `plan`, `addon:<handle>` or `unbound`: the component an item's movement is classified in. */
declare const MrrMovementComponentSchema: z.ZodString;
/**
 * One contributing subscription item at the close of one local day: the stock
 * grain. Only items with `mrr_minor_units > 0` are stored, so an absent item
 * is a zero. The row carries the full observed item state (price, quantity,
 * status, cadence, unit amount, `effective_at`) so the next day's job can
 * resume from the stored rows alone (`mrrDayStateFromRows`).
 */
declare const MrrDailyRowSchema: z.ZodObject<{
    mirror_version: z.ZodNumber;
    deleted_at: z.ZodNullable<z.ZodISODateTime>;
    currency: z.ZodString;
    price_id: z.ZodString;
    item_kind: z.ZodEnum<{
        plan: "plan";
        addon: "addon";
        unbound: "unbound";
    }>;
    product_handle: z.ZodNullable<z.ZodString>;
    variation_handle: z.ZodNullable<z.ZodString>;
    status: z.ZodEnum<{
        active: "active";
        past_due: "past_due";
    }>;
    billing_interval: z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        year: "year";
    }>;
    interval_count: z.ZodNumber;
    quantity: z.ZodNumber;
    unit_amount_minor: z.ZodNumber;
    effective_at: z.ZodISODateTime;
    mrr_minor_units: z.ZodNumber;
    account_resolved: z.ZodBoolean;
    opening_cohort_member: z.ZodBoolean;
    tenant_id: z.ZodString;
    policy_version: z.ZodString;
    calendar_version: z.ZodString;
    as_of: z.ZodString;
    account_key: z.ZodString;
    subscription_id: z.ZodString;
    item_id: z.ZodString;
}, z.core.$strict>;
/**
 * One subscription item's movement over one local day (the day closing at
 * `as_of`, opening at the previous day's close). The classification happens at
 * the item's component (`plan`, `addon:<handle>`, `unbound`); `component` is
 * part of the key because an item moved to another component in one day has a
 * row in each.
 *
 * - `kind` is the SUBSCRIPTION's category (its own zero crossings and
 *   direction), `account_kind` the ACCOUNT's: cancelling one of two
 *   subscriptions is `kind = churn`, `account_kind = contraction`.
 * - Both are `neutral` on a row whose component did not move (a labelled event
 *   such as a same-MRR cadence switch, or an unchanged component).
 * - `churn_cause` is set on rows with `account_kind = churn` only.
 * - `opening_cohort_member`: the account was in the opening cohort of this
 *   day's opening close (eligible key and `account_opening > 0`), so cohort
 *   flows over any period are sums of these rows for the period's members. An
 *   unresolved `payer:` key is eligible as a provisional account (ST-935).
 *
 * `component` joins the plan's key `(…, subscription_id, item_id)` because an
 * item moved to another component within one day (a price re-bound from a plan
 * to an add-on) is classified in each and has a row in each.
 */
declare const MrrMovementDailyRowSchema: z.ZodObject<{
    mirror_version: z.ZodNumber;
    deleted_at: z.ZodNullable<z.ZodISODateTime>;
    component: z.ZodString;
    currency: z.ZodString;
    opening: z.ZodNumber;
    closing: z.ZodNumber;
    delta: z.ZodNumber;
    kind: z.ZodEnum<{
        new: "new";
        neutral: "neutral";
        expansion: "expansion";
        contraction: "contraction";
        churn: "churn";
        reactivation: "reactivation";
    }>;
    account_kind: z.ZodEnum<{
        new: "new";
        neutral: "neutral";
        expansion: "expansion";
        contraction: "contraction";
        churn: "churn";
        reactivation: "reactivation";
    }>;
    reason: z.ZodString;
    entitlement_handle: z.ZodNullable<z.ZodString>;
    churn_cause: z.ZodNullable<z.ZodEnum<{
        unknown: "unknown";
        customer_cancelled: "customer_cancelled";
        payment_failure: "payment_failure";
    }>>;
    account_opening: z.ZodNumber;
    account_closing: z.ZodNumber;
    opening_cohort_member: z.ZodBoolean;
    unattributed: z.ZodBoolean;
    tenant_id: z.ZodString;
    policy_version: z.ZodString;
    calendar_version: z.ZodString;
    as_of: z.ZodString;
    account_key: z.ZodString;
    subscription_id: z.ZodString;
    item_id: z.ZodString;
}, z.core.$strict>;
/**
 * An account's paid history in one currency under one series version: the first
 * and last local day it closed paying. An account with a fact has paid before,
 * so its next zero crossing up is a reactivation, not new. `first_paid_on` is
 * null when the account was already paying where coverage starts (a
 * first-seen fetch snapshot seeded it, RM-846 P9): its first paid day is
 * unknown until a rebuild with earlier observations supplies one. Keyed by
 * currency as well as account, because movements partition by currency (an
 * account paying in usd that starts paying in eur is new in eur).
 */
declare const MrrAccountFactsRowSchema: z.ZodObject<{
    mirror_version: z.ZodNumber;
    deleted_at: z.ZodNullable<z.ZodISODateTime>;
    tenant_id: z.ZodString;
    policy_version: z.ZodString;
    calendar_version: z.ZodString;
    account_key: z.ZodString;
    currency: z.ZodString;
    first_paid_on: z.ZodNullable<z.ZodString>;
    last_paid_on: z.ZodString;
}, z.core.$strict>;
/**
 * Per tenant: the series version readers read, its coverage and how far it is
 * complete, plus the version being rebuilt beside it. `complete_through`
 * advances in the same transaction as the day it completes, so it never passes
 * an unwritten day. `coverage_from` is the earliest covered local day (null
 * until the first fold, P9): nothing before it is known, never zero.
 */
declare const MrrTenantStateRowSchema: z.ZodObject<{
    tenant_id: z.ZodString;
    active_policy_version: z.ZodNullable<z.ZodString>;
    active_calendar_version: z.ZodNullable<z.ZodString>;
    coverage_from: z.ZodNullable<z.ZodString>;
    complete_through: z.ZodNullable<z.ZodString>;
    pending_policy_version: z.ZodNullable<z.ZodString>;
    pending_calendar_version: z.ZodNullable<z.ZodString>;
    pending_complete_through: z.ZodNullable<z.ZodString>;
    run_started_at: z.ZodNullable<z.ZodISODateTime>;
    updated_at: z.ZodISODateTime;
    mirror_version: z.ZodNumber;
}, z.core.$strict>;
/** Why the active series version changed: a new movement policy, or a new reporting calendar (a timezone change). */
declare const MRR_POLICY_SWITCH_REASONS: readonly ["policy", "calendar"];
/** Days a superseded version's rows are kept after a switch (D9). */
declare const MRR_SUPERSEDED_RETENTION_DAYS = 30;
/**
 * One switch of a tenant's active series version, from one `(policy_version,
 * calendar_version)` to another; kept indefinitely (D9). A tenant's first
 * activation is not a switch: it is recorded on `mrr_tenant_state` alone.
 * `reason` is `policy` when the policy changes (with or without the calendar)
 * and `calendar` when only the calendar does.
 */
declare const MrrPolicySwitchRowSchema: z.ZodObject<{
    tenant_id: z.ZodString;
    from_policy_version: z.ZodString;
    from_calendar_version: z.ZodString;
    to_policy_version: z.ZodString;
    to_calendar_version: z.ZodString;
    reason: z.ZodEnum<{
        policy: "policy";
        calendar: "calendar";
    }>;
    switched_at: z.ZodISODateTime;
    superseded_delete_after: z.ZodISODateTime;
    annotation_provenance: z.ZodDefault<z.ZodNullable<z.ZodObject<{
        affected_series: z.ZodArray<z.ZodObject<{
            concept: z.ZodString;
            metric: z.ZodString;
            dimensions: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
        }, z.core.$strict>>;
        affected_period: z.ZodObject<{
            start: z.ZodISODateTime;
            end: z.ZodISODateTime;
        }, z.core.$strict>;
        before: z.ZodObject<{
            policy_version: z.ZodString;
            calendar_version: z.ZodString;
            series_grain: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                quarter: "quarter";
                hour: "hour";
            }>;
            generation_id: z.ZodString;
        }, z.core.$strict>;
        after: z.ZodObject<{
            policy_version: z.ZodString;
            calendar_version: z.ZodString;
            series_grain: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                quarter: "quarter";
                hour: "hour";
            }>;
            generation_id: z.ZodString;
        }, z.core.$strict>;
    }, z.core.$strict>>>;
}, z.core.$strict>;
/** Events an operator run may ask the deployed app to send for a tenant (ST-878). */
declare const OPERATOR_EVENT_NAMES: readonly ["billing.mirror.backfill.requested", "billing.mirror.changed"];
declare const OPERATOR_EVENT_STATUSES: readonly ["pending", "sent", "failed"];
/** Attempts the sweep makes before a request is left `failed` for an operator to read. */
declare const OPERATOR_EVENT_MAX_ATTEMPTS = 5;
/**
 * One event an operator-script run asks the deployed app to send (ST-878). The
 * operator workflow holds a database URL but no Inngest event key (the
 * environment's API key cannot list or read one), so an apply writes these rows
 * and the app's own Inngest client sends them on its next sweep. `event_id` is
 * the Inngest event id (`mrr-operator:<action>:<tenant>:<hour>`), unique, so a
 * rerun in the same hour is one request. `requested_by` is the dispatching
 * GitHub actor and `run_id` the workflow run; `status` moves `pending` to
 * `sent` (with `processed_at`) or to `failed` after
 * {@link OPERATOR_EVENT_MAX_ATTEMPTS} attempts, `last_error` holding a short,
 * secret-free reason.
 */
declare const OperatorEventRequestRowSchema: z.ZodObject<{
    event_id: z.ZodString;
    event_name: z.ZodEnum<{
        "billing.mirror.backfill.requested": "billing.mirror.backfill.requested";
        "billing.mirror.changed": "billing.mirror.changed";
    }>;
    tenant_id: z.ZodString;
    reason: z.ZodString;
    requested_by: z.ZodString;
    run_id: z.ZodString;
    status: z.ZodEnum<{
        pending: "pending";
        failed: "failed";
        sent: "sent";
    }>;
    attempts: z.ZodNumber;
    last_error: z.ZodNullable<z.ZodString>;
    requested_at: z.ZodISODateTime;
    processed_at: z.ZodNullable<z.ZodISODateTime>;
}, z.core.$strict>;

/** The outcome of {@link validateReportingTimezone}. */
type ReportingTimezoneValidation = {
    ok: true;
    timezone: string;
} | {
    ok: false;
    code: 'unsupported_timezone';
    message: string;
};
/**
 * The write-time check of a tenant's reporting timezone (`tenant_configs.timezone`;
 * RM-846 P3, ST-855, LOW-7): exactly the zones {@link reportingCalendarFormatter}
 * accepts, so a stored zone is never one the revenue job cannot format. Offset
 * strings (`+05:00`), unknown names and non-strings are refused. A web write path
 * answers a refusal with 422; this check only decides.
 */
declare function validateReportingTimezone(timezone: unknown): ReportingTimezoneValidation;

/**
 * Segment B2B SaaS semantic events (plan 252 TASK-3, BL-0304; "B2B semantic map").
 *
 * The ten canonical names of the Segment B2B SaaS convention, their
 * Segment-compatible and RevTurbine-profile property contracts, and the
 * mapping from the REGISTERED platform taxonomy onto them.
 *
 * ## Why these are not taxonomy entries (stable keys preserved)
 *
 * `PLATFORM_EVENT_TAXONOMY` declares what RevTurbine EMITS today, and its SDK
 * parity scan fails any `sdk_client` name nobody emits. Nothing emits these
 * ten names yet — TASK-16/17/18 instrument them — so declaring them there
 * would manufacture declared-but-never-emitted names. They are declared here
 * as the semantic TARGETS, and every existing taxonomy key keeps its exact
 * spelling: `user_signed_up` stays `user_signed_up`, it MAPS to `Signed Up`
 * (plan 252: "Existing RT custom snake_case events are valid Segment Track
 * names and need no cosmetic Title Case rename"). Exact Segment spellings are
 * the scoped naming exception in `knowledge/naming-conventions.md`.
 *
 * ## Two profiles
 *
 * - **Segment-compatible** ({@link SegmentB2BTrackEventSchema}): every
 *   semantic property is optional — a minimally populated vanilla call passes
 *   without any PII or trial field.
 * - **RevTurbine profile** ({@link RevturbineB2BTrackEventSchema}): owned
 *   producers must name the account (`context.groupId`), and trial events must
 *   carry authoritative `trial_start_date` / `trial_end_date` and a resolved
 *   `trial_plan_name`; `Trial Ended` must say its `trial_outcome`. A message
 *   that fails ONLY these is reported as an RT requirement, not a Segment
 *   violation ({@link validateB2BTrack}).
 *
 * ## Authority
 *
 * Mapping is keyed by registered source event and authority, never by string
 * resemblance. Local observations (`clickstream_trial_expired`,
 * `trial_midpoint`, `trial_expiring`) are declared NON-authoritative and can
 * never become `Trial Ended` — {@link buildB2BMappingReport} proves it.
 *
 * ## Classification
 *
 * Person-describing properties (`first_name`, `last_name`, `email`, `phone`,
 * `username`, `invitee_*` names/email) are `pii`: forwarded to configured
 * direct destinations, hashed at RevTurbine ingestion (plan-local D-3).
 * `account_name` is also `pii` — a company name is often a person's name for
 * a sole trader, and conservative classification is the REQ-8 default.
 */

/** Version of this semantic map. Bump on any name, property or mapping change. */
declare const B2B_SEMANTIC_MAP_VERSION = 1;
/** The ten canonical Segment B2B SaaS Track names, exact spelling. */
declare const B2B_SEGMENT_EVENT_NAMES: readonly ["Account Created", "Account Deleted", "Signed Up", "Signed In", "Signed Out", "Invite Sent", "Account Added User", "Account Removed User", "Trial Started", "Trial Ended"];
type B2BSegmentEventName$1 = (typeof B2B_SEGMENT_EVENT_NAMES)[number];
declare const B2BSegmentEventNameSchema: z.ZodEnum<{
    "Account Created": "Account Created";
    "Account Deleted": "Account Deleted";
    "Signed Up": "Signed Up";
    "Signed In": "Signed In";
    "Signed Out": "Signed Out";
    "Invite Sent": "Invite Sent";
    "Account Added User": "Account Added User";
    "Account Removed User": "Account Removed User";
    "Trial Started": "Trial Started";
    "Trial Ended": "Trial Ended";
}>;
/**
 * Recognized INPUT synonyms Segment documents. Owned producers use the one
 * canonical name; a synonym on input is recognized, never re-emitted.
 */
declare const B2B_INPUT_SYNONYMS: Readonly<Record<string, B2BSegmentEventName$1>>;
/** Resolve an input event name to its canonical B2B name, if it is one. Exact match only. */
declare function canonicalB2BEventName(event: string): B2BSegmentEventName$1 | undefined;
/** `Trial Ended`'s typed custom outcome (plan 252: expiry and conversion both end a trial). */
declare const B2B_TRIAL_OUTCOMES: readonly ["converted", "expired", "reverted", "revoked"];
/** Fields the RevTurbine profile additionally requires, per name. */
declare const B2B_RT_REQUIRED_PROPERTIES: Readonly<Record<B2BSegmentEventName$1, readonly string[]>>;
/** Property names that are PII, derived from the classification meta — never a second list. */
declare const B2B_PII_PROPERTIES: Readonly<Record<B2BSegmentEventName$1, readonly string[]>>;
/** The ten names as Segment-compatible Track calls: semantic properties all optional. */
declare const SegmentB2BTrackEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    event: z.ZodLiteral<"Account Created" | "Account Deleted" | "Signed Up" | "Signed In" | "Signed Out" | "Invite Sent" | "Account Added User" | "Account Removed User" | "Trial Started" | "Trial Ended">;
    context: z.ZodOptional<z.ZodObject<{
        groupId: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    properties: z.ZodOptional<z.ZodObject<{
        account_name: z.ZodOptional<z.ZodString>;
    } | {
        account_name: z.ZodOptional<z.ZodString>;
    } | {
        type: z.ZodOptional<z.ZodString>;
        first_name: z.ZodOptional<z.ZodString>;
        last_name: z.ZodOptional<z.ZodString>;
        email: z.ZodOptional<z.ZodString>;
        phone: z.ZodOptional<z.ZodString>;
        username: z.ZodOptional<z.ZodString>;
        title: z.ZodOptional<z.ZodString>;
    } | {
        username: z.ZodOptional<z.ZodString>;
    } | {
        username: z.ZodOptional<z.ZodString>;
    } | {
        invitee_email: z.ZodOptional<z.ZodString>;
        invitee_first_name: z.ZodOptional<z.ZodString>;
        invitee_last_name: z.ZodOptional<z.ZodString>;
        invitee_role: z.ZodOptional<z.ZodString>;
    } | {
        role: z.ZodOptional<z.ZodString>;
    } | {} | {
        trial_start_date: z.ZodOptional<z.ZodISODateTime>;
        trial_end_date: z.ZodOptional<z.ZodISODateTime>;
        trial_plan_name: z.ZodOptional<z.ZodString>;
    } | {
        trial_start_date: z.ZodOptional<z.ZodISODateTime>;
        trial_end_date: z.ZodOptional<z.ZodISODateTime>;
        trial_plan_name: z.ZodOptional<z.ZodString>;
        trial_outcome: z.ZodOptional<z.ZodEnum<{
            converted: "converted";
            expired: "expired";
            revoked: "revoked";
            reverted: "reverted";
        }>>;
    }, z.core.$loose>>;
    type: z.ZodLiteral<"track">;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    messageId: z.ZodOptional<z.ZodString>;
    timestamp: z.ZodOptional<z.ZodISODateTime>;
}, z.core.$loose>, ...z.ZodObject<{
    event: z.ZodLiteral<"Account Created" | "Account Deleted" | "Signed Up" | "Signed In" | "Signed Out" | "Invite Sent" | "Account Added User" | "Account Removed User" | "Trial Started" | "Trial Ended">;
    context: z.ZodOptional<z.ZodObject<{
        groupId: z.ZodOptional<z.ZodString>;
    }, z.core.$loose>>;
    properties: z.ZodOptional<z.ZodObject<{
        account_name: z.ZodOptional<z.ZodString>;
    } | {
        account_name: z.ZodOptional<z.ZodString>;
    } | {
        type: z.ZodOptional<z.ZodString>;
        first_name: z.ZodOptional<z.ZodString>;
        last_name: z.ZodOptional<z.ZodString>;
        email: z.ZodOptional<z.ZodString>;
        phone: z.ZodOptional<z.ZodString>;
        username: z.ZodOptional<z.ZodString>;
        title: z.ZodOptional<z.ZodString>;
    } | {
        username: z.ZodOptional<z.ZodString>;
    } | {
        username: z.ZodOptional<z.ZodString>;
    } | {
        invitee_email: z.ZodOptional<z.ZodString>;
        invitee_first_name: z.ZodOptional<z.ZodString>;
        invitee_last_name: z.ZodOptional<z.ZodString>;
        invitee_role: z.ZodOptional<z.ZodString>;
    } | {
        role: z.ZodOptional<z.ZodString>;
    } | {} | {
        trial_start_date: z.ZodOptional<z.ZodISODateTime>;
        trial_end_date: z.ZodOptional<z.ZodISODateTime>;
        trial_plan_name: z.ZodOptional<z.ZodString>;
    } | {
        trial_start_date: z.ZodOptional<z.ZodISODateTime>;
        trial_end_date: z.ZodOptional<z.ZodISODateTime>;
        trial_plan_name: z.ZodOptional<z.ZodString>;
        trial_outcome: z.ZodOptional<z.ZodEnum<{
            converted: "converted";
            expired: "expired";
            revoked: "revoked";
            reverted: "reverted";
        }>>;
    }, z.core.$loose>>;
    type: z.ZodLiteral<"track">;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    messageId: z.ZodOptional<z.ZodString>;
    timestamp: z.ZodOptional<z.ZodISODateTime>;
}, z.core.$loose>[]], "event">;
/** The ten names under RevTurbine's owned-producer profile: account required, trial facts complete. */
declare const RevturbineB2BTrackEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    event: z.ZodLiteral<"Account Created" | "Account Deleted" | "Signed Up" | "Signed In" | "Signed Out" | "Invite Sent" | "Account Added User" | "Account Removed User" | "Trial Started" | "Trial Ended">;
    context: z.ZodObject<{
        groupId: z.ZodString;
    }, z.core.$loose>;
    properties: z.ZodObject<{
        [x: string]: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
    }, z.core.$loose> | z.ZodOptional<z.ZodObject<{
        [x: string]: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
    }, z.core.$loose>>;
    type: z.ZodLiteral<"track">;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    messageId: z.ZodOptional<z.ZodString>;
    timestamp: z.ZodOptional<z.ZodISODateTime>;
}, z.core.$loose>, ...z.ZodObject<{
    event: z.ZodLiteral<"Account Created" | "Account Deleted" | "Signed Up" | "Signed In" | "Signed Out" | "Invite Sent" | "Account Added User" | "Account Removed User" | "Trial Started" | "Trial Ended">;
    context: z.ZodObject<{
        groupId: z.ZodString;
    }, z.core.$loose>;
    properties: z.ZodObject<{
        [x: string]: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
    }, z.core.$loose> | z.ZodOptional<z.ZodObject<{
        [x: string]: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
    }, z.core.$loose>>;
    type: z.ZodLiteral<"track">;
    userId: z.ZodOptional<z.ZodString>;
    anonymousId: z.ZodOptional<z.ZodString>;
    messageId: z.ZodOptional<z.ZodString>;
    timestamp: z.ZodOptional<z.ZodISODateTime>;
}, z.core.$loose>[]], "event">;
type B2BValidation = {
    ok: true;
    profile: 'revturbine' | 'segment';
    event: B2BSegmentEventName$1;
} | {
    ok: false;
    reason: 'not_b2b_event';
} | {
    ok: false;
    reason: 'segment_violation';
    issues: string[];
} | {
    ok: false;
    reason: 'rt_requirement';
    event: B2BSegmentEventName$1;
    issues: string[];
};
/**
 * Validate a B2B Track. A message valid for Segment but missing an RT-profile
 * field is `rt_requirement` — reported as OUR stricter requirement, never as a
 * Segment violation (AC-2).
 */
declare function validateB2BTrack(message: unknown, profile?: 'revturbine' | 'segment'): B2BValidation;
/**
 * How each taxonomy key maps into the canonical vocabulary. Every taxonomy
 * name is classified exactly once (totality is tested):
 *
 * - `standard` — an authoritative source of a B2B semantic event. It keeps
 *   its own key and fact; the B2B event is a DERIVED record with a stable
 *   derivation discriminator, so the source fact is never duplicated.
 * - `custom` — a canonical custom Track name, emitted under its exact key.
 * - `excluded` — a raw/diagnostic contract that is not a canonical Track (the
 *   keyless SDK meta lane).
 */
type B2BCanonicalClass = 'standard' | 'custom' | 'excluded';
interface B2BSourceMapping {
    /** Registered taxonomy key — the authority is the registration, never the spelling. */
    source_event: string;
    b2b_event: B2BSegmentEventName$1;
    /** For a source whose payload carries several facts, the payload value selecting this mapping. */
    when?: {
        field: string;
        equals: readonly string[];
    };
    /** `Trial Ended`'s outcome, when the source fixes it. */
    trial_outcome?: (typeof B2B_TRIAL_OUTCOMES)[number];
    /** Appended to the source identity to form the derived message identity. */
    derivation_discriminator: string;
    /** Which source the mapping stands for (plan 252 B2B table). */
    note: string;
}
declare const B2B_SOURCE_MAPPINGS: readonly B2BSourceMapping[];
/**
 * Local observations that resemble a B2B fact and are NOT one. None has a
 * mapping; the report asserts none can gain one. `clickstream_trial_expired`
 * is the namespaced SDK trigger (plan 231 REQ-4): a lapsed local trial is not
 * an authoritative `Trial Ended`.
 */
declare const B2B_NON_AUTHORITATIVE_OBSERVATIONS: readonly ["clickstream_trial_expired", "trial_midpoint", "trial_expiring"];
/**
 * B2B names with no registered source today. Each names the plan task that
 * instruments it; an unsupported producer is declared, never faked
 * (plan 252 AC-9: account deletion only if a supported transition exists).
 */
declare const B2B_PENDING_PRODUCERS: Readonly<Partial<Record<B2BSegmentEventName$1, string>>>;
/** Classify every taxonomy key (totality over `PLATFORM_EVENT_TAXONOMY`). */
declare function classifyTaxonomyEvent(name: string): B2BCanonicalClass | undefined;
interface B2BDerivation {
    b2b_event: B2BSegmentEventName$1;
    derivation_discriminator: string;
    trial_outcome?: (typeof B2B_TRIAL_OUTCOMES)[number];
}
/**
 * The B2B event a registered source fact derives, if any. Exact key match on
 * a registered source — a customer's `track('Trial Ended')` or a namespaced
 * trigger never reaches here as an authority.
 */
declare function deriveB2BEvent(sourceEvent: string, payload?: Record<string, unknown>): B2BDerivation | undefined;
interface B2BMappingReport {
    map_version: number;
    taxonomy_version: number;
    /** Per canonical name: its registered sources, or the task that will supply one. */
    events: Array<{
        b2b_event: B2BSegmentEventName$1;
        sources: string[];
        pending?: string;
    }>;
    /** Every taxonomy key with its class. */
    classification: Array<{
        event: string;
        class: B2BCanonicalClass;
    }>;
    /** Observations that can never produce a B2B fact; each checked to have no mapping. */
    non_authoritative: Array<{
        event: string;
        maps_to: B2BSegmentEventName$1 | null;
    }>;
}
/** The AC-2 mapping report: sources per B2B name, taxonomy classification, and the non-authority proof. */
declare function buildB2BMappingReport(): B2BMappingReport;

/** Captured after signature/tenant validation and thin-event normalization. */
declare const WebhookReplayEnvelopeSchema: z.ZodObject<{
    version: z.ZodLiteral<1>;
    payload_style: z.ZodEnum<{
        snapshot: "snapshot";
        thin_normalized: "thin_normalized";
    }>;
    event: z.ZodObject<{
        id: z.ZodString;
        type: z.ZodString;
        created: z.ZodNumber;
        account: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        context: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        api_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        livemode: z.ZodOptional<z.ZodBoolean>;
        data: z.ZodObject<{
            object: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            previous_attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        }, z.core.$strict>;
    }, z.core.$strict>;
}, z.core.$strict>;
declare const WebhookProcessingStatusSchema: z.ZodEnum<{
    unknown: "unknown";
    pending: "pending";
    failed: "failed";
    completed: "completed";
    processing: "processing";
    not_required: "not_required";
    terminal: "terminal";
}>;
/**
 * Outcome of handing a received event to the downstream queue.
 *
 * - `unknown` — imported evidence; the hand-off was never observed.
 * - `pending` — not attempted yet.
 * - `dispatching` — a send is in flight, owned by a live dispatch lease.
 * - `ambiguous` — the send left the process and its outcome was never observed
 *   (a timeout, a 5xx, or a crash after the request went out). Neither
 *   `accepted` nor `failed` may be recorded, because both assert a fact nobody
 *   saw: only `failed` means non-delivery was actually observed.
 * - `accepted` — the queue acknowledged the event.
 * - `failed` — the queue refused it outright; retryable.
 * - `terminal` — the attempt budget is spent; operator replay only.
 * - `not_required` — no hand-off is owed for this event.
 *
 * **Ambiguous-row invariant.** An `ambiguous` receipt keeps its full fenced
 * lease identity — `lease_stage: 'dispatch'`, `lease_token`, `lease_expires_at`
 * and `lease_generation >= 1` — and carries `dispatch_attempts >= 1`. The
 * identity is retained deliberately: it names the sender whose outcome went
 * unobserved, and it is the fence the next claimant increments past. What is
 * surrendered is *ownership*, by moving `lease_expires_at` to (or before) the
 * moment of surrender, so recovery's no-live-lease selection reclaims the row.
 * A crash after the send produces the same shape without anyone writing it —
 * the lease simply lapses — which is why the contract must not require the
 * lease to be cleared. This schema deliberately does **not** assert
 * `lease_expires_at <= now`: liveness is a clock comparison made by the
 * runtime, not a property of a stored row, and a row read back later would
 * otherwise validate differently than when it was written.
 */
declare const WebhookDispatchStatusSchema: z.ZodEnum<{
    unknown: "unknown";
    accepted: "accepted";
    pending: "pending";
    failed: "failed";
    ambiguous: "ambiguous";
    not_required: "not_required";
    terminal: "terminal";
    dispatching: "dispatching";
}>;
/** No CRUD operation exposes this record; webhookEventLog remains the display projection. */
declare const WebhookDeliverySchema: z.ZodObject<{
    id: z.ZodString;
    tenant_id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    receipt_version: z.ZodLiteral<1>;
    event_id: z.ZodString;
    event_type: z.ZodString;
    source: z.ZodEnum<{
        stripe: "stripe";
        apple: "apple";
        google: "google";
    }>;
    received_at: z.ZodString;
    envelope_status: z.ZodDefault<z.ZodEnum<{
        complete: "complete";
        legacy_incomplete: "legacy_incomplete";
    }>>;
    envelope: z.ZodOptional<z.ZodNullable<z.ZodObject<{
        version: z.ZodLiteral<1>;
        payload_style: z.ZodEnum<{
            snapshot: "snapshot";
            thin_normalized: "thin_normalized";
        }>;
        event: z.ZodObject<{
            id: z.ZodString;
            type: z.ZodString;
            created: z.ZodNumber;
            account: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            context: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            api_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            livemode: z.ZodOptional<z.ZodBoolean>;
            data: z.ZodObject<{
                object: z.ZodRecord<z.ZodString, z.ZodUnknown>;
                previous_attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            }, z.core.$strict>;
        }, z.core.$strict>;
    }, z.core.$strict>>>;
    processing_status: z.ZodDefault<z.ZodEnum<{
        unknown: "unknown";
        pending: "pending";
        failed: "failed";
        completed: "completed";
        processing: "processing";
        not_required: "not_required";
        terminal: "terminal";
    }>>;
    dispatch_status: z.ZodDefault<z.ZodEnum<{
        unknown: "unknown";
        accepted: "accepted";
        pending: "pending";
        failed: "failed";
        ambiguous: "ambiguous";
        not_required: "not_required";
        terminal: "terminal";
        dispatching: "dispatching";
    }>>;
    downstream_status: z.ZodDefault<z.ZodEnum<{
        unknown: "unknown";
        pending: "pending";
        failed: "failed";
        completed: "completed";
        processing: "processing";
        not_required: "not_required";
        terminal: "terminal";
    }>>;
    processing_attempts: z.ZodDefault<z.ZodNumber>;
    dispatch_attempts: z.ZodDefault<z.ZodNumber>;
    downstream_attempts: z.ZodDefault<z.ZodNumber>;
    next_attempt_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    lease_stage: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
        processing: "processing";
        dispatch: "dispatch";
        downstream: "downstream";
    }>>>;
    lease_token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    lease_generation: z.ZodDefault<z.ZodNumber>;
    lease_expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    processing_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    dispatch_accepted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    downstream_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    terminal_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    last_error_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    last_error_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    effect_checkpoints: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
    replay_count: z.ZodDefault<z.ZodNumber>;
    last_replayed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strict>;

/**
 * Platform event taxonomy (plan 181 TASK-1) — the single machine-readable
 * declaration of every event RevTurbine itself emits.
 *
 * Before this file the taxonomy lived as bare string literals scattered
 * across the SDK plus four separately hand-maintained lists, and nothing
 * prevented the SDK emitting a name no list declared or noticed when a
 * declared name stopped being emitted. This is the declaration those lists
 * derive from; the cross-repo parity test asserts both directions.
 *
 * **Scope boundary (REQ-3) — read before adding anything.** This declares the
 * PLATFORM-emitted surface only. The SDK has no closed event-name set:
 * customer `track('anything')` names are arbitrary by design, and four open
 * prefix families (`placement_`, `gate_`, `slot_`, `engagement_`) classify
 * origin without enumerating members. So the dictionary is *complete for what
 * RevTurbine emits* and *discovery-based for what customers emit* — never
 * claim otherwise on a surface built from it.
 *
 * One list per surface, declared `as const` so the enums below are DERIVED
 * from it rather than restated. Adding a name here and nowhere else is the
 * whole point: the generated artifact, the published enums, and the parity
 * tests all follow.
 */

/**
 * Where an event is emitted from. This is the emitting SURFACE, not the
 * transport: `sdk_client` and `sdk_server` both land on the clickstream lane,
 * while `control_plane` events originate in revturbine-web itself.
 */
declare const EventSurfaceSchema: z.ZodEnum<{
    control_plane: "control_plane";
    sdk_client: "sdk_client";
    sdk_server: "sdk_server";
    webhook_derived: "webhook_derived";
}>;
/**
 * Stability contract. `stable` names are safe for customers to build on;
 * `internal` are RevTurbine's own diagnostics and may change; `deprecated`
 * are still emitted but scheduled for removal (and are exempt from the
 * declared-but-never-emitted parity direction).
 */
declare const EventStabilitySchema: z.ZodEnum<{
    internal: "internal";
    deprecated: "deprecated";
    stable: "stable";
}>;
declare const EventTaxonomyEntrySchema: z.ZodObject<{
    name: z.ZodString;
    surface: z.ZodEnum<{
        control_plane: "control_plane";
        sdk_client: "sdk_client";
        sdk_server: "sdk_server";
        webhook_derived: "webhook_derived";
    }>;
    purpose: z.ZodString;
    stability: z.ZodEnum<{
        internal: "internal";
        deprecated: "deprecated";
        stable: "stable";
    }>;
}, z.core.$strip>;
/**
 * An open prefix family: the SDK classifies any name starting with the prefix
 * as platform-automatic, but the suffix is author-defined, so members cannot
 * be enumerated. Declared so a consumer knows the set is deliberately open
 * rather than incompletely listed.
 */
declare const EventPrefixFamilySchema: z.ZodObject<{
    prefix: z.ZodString;
    surface: z.ZodEnum<{
        control_plane: "control_plane";
        sdk_client: "sdk_client";
        sdk_server: "sdk_server";
        webhook_derived: "webhook_derived";
    }>;
    purpose: z.ZodString;
}, z.core.$strip>;
declare const EventTaxonomySchema: z.ZodObject<{
    version: z.ZodNumber;
    events: z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        surface: z.ZodEnum<{
            control_plane: "control_plane";
            sdk_client: "sdk_client";
            sdk_server: "sdk_server";
            webhook_derived: "webhook_derived";
        }>;
        purpose: z.ZodString;
        stability: z.ZodEnum<{
            internal: "internal";
            deprecated: "deprecated";
            stable: "stable";
        }>;
    }, z.core.$strip>>;
    prefix_families: z.ZodArray<z.ZodObject<{
        prefix: z.ZodString;
        surface: z.ZodEnum<{
            control_plane: "control_plane";
            sdk_client: "sdk_client";
            sdk_server: "sdk_server";
            webhook_derived: "webhook_derived";
        }>;
        purpose: z.ZodString;
    }, z.core.$strip>>;
}, z.core.$strip>;
/**
 * Control-plane events, emitted by revturbine-web itself (plan 112).
 * `source` (system vs workflow) is a separate axis carried on the event.
 */
declare const CONTROL_PLANE_EVENT_NAMES: readonly ["web_signed_up", "web_signed_in", "cli_signed_up", "cli_signed_in", "cli_command_executed", "playbook_version_submitted", "playbook_version_approved", "playbook_version_rejected", "playbook_version_deployed", "playbook_version_launched", "playbook_version_parked", "playbook_version_resumed", "playbook_version_discarded", "playbook_version_archived", "playbook_imported", "playbook_exported", "entity_created", "entity_updated", "entity_deleted", "web_api_error"];
/**
 * SDK-automatic client events with fixed names. Prefix-family members
 * (`engagement_*`) are NOT listed here — see {@link EVENT_PREFIX_FAMILIES}.
 */
declare const SDK_CLIENT_EVENT_NAMES: readonly ["placement_resolved", "placement_rendered", "placement_exposed", "placement_outcome", "placement_interaction", "checkout_started", "gate_evaluated", "gate_attempted", "gate_allowed", "gate_denied", "slot_evaluated", "slot_filled", "slot_empty", "slot_suppressed", "slot_error", "segment_enrolled", "segment_unenrolled", "experiment_assigned", "user_context_observed", "clickstream_page_view", "account_created", "user_signed_up", "onboarding_completed", "account_activated", "product_used", "value_realized", "usage_recorded", "plan_viewed", "promotion_applied", "promotion_converted", "trial_revision"];
/**
 * Server-produced derived observations (plan 228 TASK-2 audit): the band for
 * producers that aggregate facts into windowed metric observations, excluded
 * from the sdk_client emit-parity direction by surface.
 *
 * EMPTY since taxonomy v7 (plan 282, BL-0459). Its one member,
 * `growth_signal_observed`, had exactly one producer — the Growth Lab loader's
 * `generateGrowthSignalFacts`, retired by TASK-19 (scaffold #435) — and one
 * reader, the `growth_funnel_signals` observed branch in revturbine-web,
 * deleted by TASK-20 (web #955): the lifecycle families now derive at read
 * time from raw milestone facts. A name nothing emits and nothing reads is
 * removed, not marked `deprecated` (that means "still emitted"). The band
 * stays declared and exported so a consumer that enumerates every surface
 * keeps compiling with no shim; a future server-side producer adds its name
 * here with a payload contract and a version bump.
 */
declare const SDK_SERVER_EVENT_NAMES: readonly [];
/**
 * Anonymous SDK telemetry on the keyless meta lane (plan 95/144). These carry
 * no tenant and no user context, so they are `internal` by construction.
 */
declare const SDK_META_EVENT_NAMES: readonly ["sdk_init", "sdk_error", "sdk_validation_warning", "resolution_failure"];
/**
 * Product signals revturbine-web emits about ITSELF, through the customer
 * `track()` path, while dogfooding its own SDK (plan 154).
 *
 * Deliberately a separate list from {@link CONTROL_PLANE_EVENT_NAMES}, for two
 * reasons that pull in the same direction:
 *
 *  - That list generates `ControlPlaneEventTypeSchema`, the enum for the
 *    control-plane INGEST lane. These names ride the clickstream lane instead,
 *    so widening that enum would misdescribe the transport.
 *  - Plan 154 REQ-4/AC-3 requires the web client's emit list to stay DISJOINT
 *    from `ControlPlaneEventType`; a name on both lanes double-counts one
 *    operator action.
 *
 * SURFACE (plan 228 TASK-5 dogfood ruling): `sdk_client`, reclassified from
 * `control_plane`. These are generic product-usage telemetry any tenant's
 * app could legitimately report about itself through the SDK's typed emit
 * surface — "RevTurbine's own vocabulary" was never load-bearing for them,
 * unlike the CP proper (auth, playbook-version lifecycle, entity CRUD),
 * which stays structurally unforgeable. revturbine-web swaps its `track()`
 * call sites to `emitPlatformEvent` at its next SDK pin bump; until then
 * its emissions ride the generic lane of a pre-namespacing SDK and land
 * raw, exactly as before.
 */
declare const DOGFOOD_CLIENT_EVENT_NAMES: readonly ["area_viewed", "feature_gated"];
/**
 * Billing lifecycle events (plan 228 R-2). Dual-source BY CONTRACT: the Stripe
 * webhook processor translates `stripe_event_type` onto these names, AND the
 * SDK exposes a typed emit path for each under the same payload schema — so a
 * tenant on a different biller (or none) produces identical facts. The surface
 * is `webhook_derived` because that is the historically-primary producer; it
 * does NOT mean webhook-only, and the emit↔taxonomy parity scan includes these
 * on the SDK side.
 *
 * Every payload carries `billing_ref` — the producer-minted idempotency key
 * that makes a Stripe delivery and an SDK emission of the same commercial fact
 * collapse to one row (the identity key, consumed by datasource derivation).
 */
declare const WEBHOOK_DERIVED_EVENT_NAMES: readonly ["subscription_started", "subscription_renewed", "subscription_expanded", "subscription_canceled", "trial_started", "trial_converted", "trial_expired", "payment_succeeded", "payment_failed"];
type EventName = (typeof CONTROL_PLANE_EVENT_NAMES)[number] | (typeof DOGFOOD_CLIENT_EVENT_NAMES)[number] | (typeof SDK_CLIENT_EVENT_NAMES)[number] | (typeof SDK_SERVER_EVENT_NAMES)[number] | (typeof SDK_META_EVENT_NAMES)[number] | (typeof WEBHOOK_DERIVED_EVENT_NAMES)[number];
/**
 * Names the SDK classifies as platform-automatic for ORIGIN tagging without
 * emitting them itself. `impression` is the clearest case: it is an
 * interaction TYPE passed to `trackTreatmentInteraction()` (landing in
 * `placement_presentations.outcome`), not a clickstream event — the SDK emits
 * `placement_interaction` for that. It lives in the SDK's automatic-names set
 * so a customer `track('impression')` classifies correctly, and it is
 * deliberately NOT in the event taxonomy: declaring it would create a
 * declared-but-never-emitted name, the exact defect class this taxonomy
 * exists to catch.
 */
declare const SDK_AUTOMATIC_NON_EMITTED_NAMES: readonly ["impression"];
/**
 * Open prefix families. The SDK treats any name under these prefixes as
 * platform-automatic for origin classification, but the suffix is
 * author-defined — `engagement_*` scopes come from customer `useTrack`
 * declarations. Members are discovered from the ingest stream, never
 * declared.
 */
declare const EVENT_PREFIX_FAMILIES: readonly [{
    readonly prefix: "engagement_";
    readonly surface: "sdk_client";
    readonly purpose: "Organic product-signal events under customer-declared engagement scopes.";
}];
/** The platform event taxonomy. Bump `version` on any change. */
declare const PLATFORM_EVENT_TAXONOMY: {
    version: number;
    events: {
        name: EventName;
        surface: "control_plane" | "sdk_client" | "sdk_server" | "webhook_derived";
        purpose: string;
        stability: "internal" | "deprecated" | "stable";
    }[];
    prefix_families: {
        readonly prefix: "engagement_";
        readonly surface: "sdk_client";
        readonly purpose: "Organic product-signal events under customer-declared engagement scopes.";
    }[];
};
/** Every platform-emitted event name, for the cross-repo parity assertion. */
declare const PLATFORM_EMITTED_EVENT_NAMES: readonly string[];
/**
 * Namespace a customer-supplied event name that collides with platform
 * vocabulary (plan 228 TASK-4). The generic `track()` lane — SDK and
 * `/api/track` ingest alike — runs every ALREADY-NORMALIZED name through
 * this, so platform events are unforgeable from the untyped path: a
 * customer's `track('gate_attempted')` lands as `clickstream_gate_attempted`
 * while the typed emit surface sends `gate_attempted` raw.
 *
 * Derived from the taxonomy, not a hardcoded switch, so a name added to the
 * taxonomy is protected the moment it exists. Names already carrying the
 * `clickstream_` namespace pass through — `clickstream_page_view` IS the
 * platform name for the generic page-view alias (wire truth), and the guard
 * also makes the function idempotent.
 */
declare function namespacePlatformCollision(normalizedName: string): string;
/** Names exempt from the declared-but-never-emitted parity direction. */
declare const DEPRECATED_EVENT_NAMES: readonly string[];

/**
 * Per-event payload contracts (plan 228 REQ-1) — one Zod schema for EVERY
 * taxonomy event, plus the identity key that makes two emissions the same
 * fact.
 *
 * Before this file, event NAMES were declared (plan 181) but payloads were
 * untyped bags: `EventEnvelopeSchema.payload` is `z.record(z.string(),
 * z.unknown())`, and each contract lived only in the body of its emit site.
 * That is how R-10 shipped — `emitGateEvaluated`'s property set existed
 * nowhere a validator, a reader, or a simulator could check against, so a
 * double-wrapped payload validated fine and read as empty everywhere.
 *
 * Every schema below is transcribed from a VERIFIED producer, not designed at
 * a desk: the control-plane shapes from revturbine-web's `emitControlPlaneEvent`
 * call sites, the SDK client shapes from `web-sdk/customer-side.ts` +
 * `controllers.ts` emit sites, the meta-lane shapes from the
 * `events_sdk_meta` / `events_sdk_diagnostics` datasource columns they land
 * in. The billing band (plan 228 R-2) is the one designed-first set — it is
 * NEW vocabulary, dual-source by contract (Stripe webhook processor and typed
 * SDK emit share these schemas), and its fields exist to ground the catalog
 * dimensions REQ-11 names (`commercial.plan`, `commercial.billing_period`,
 * `trial.rule`).
 *
 * Three deliberate contract decisions:
 *
 *  - **Loose objects.** REQ-9's evolution policy is additive-only, and its
 *    reader half is that a validator built against schema rev N accepts a
 *    payload from rev N+1. `z.looseObject` preserves unknown keys instead of
 *    stripping or rejecting them — an old ingest never mangles a newer
 *    producer's additive field.
 *  - **Identity keys are part of the contract.** `identity` names the payload
 *    fields that make two emissions the same fact; `'event_id'` means the
 *    envelope-level id is the only identity (the common case for telemetry).
 *    Datasource sorting keys and dedup discriminators DERIVE from this
 *    (REQ-4) — the `experiment_assignments` partition-key near-miss is why
 *    keys are declared here rather than chosen per datasource.
 *  - **Classification rides every field** (house `DataClassification` meta),
 *    so PII handling derives from the contract; `pii-redact` remains
 *    defense-in-depth, not the source of truth.
 */

/**
 * Whether an `account_created` payload carries plan 276 REQ-3 evidence.
 *
 * A reader must be able to separate an evidenced account creation from a bare
 * milestone WITHOUT inferring anything, because under R-1 an unevidenced
 * emission is not an authority for the lifecycle product. Structural only: it
 * asks whether the fields are present and non-null, never whether the
 * evidence is true.
 */
declare function isEvidencedAccountCreation(payload: unknown): boolean;
type PlatformEventName = (typeof CONTROL_PLANE_EVENT_NAMES)[number] | (typeof DOGFOOD_CLIENT_EVENT_NAMES)[number] | (typeof SDK_CLIENT_EVENT_NAMES)[number] | (typeof SDK_SERVER_EVENT_NAMES)[number] | (typeof SDK_META_EVENT_NAMES)[number] | (typeof WEBHOOK_DERIVED_EVENT_NAMES)[number];
/**
 * Which discriminated billing profile(s) a billing event's facts take under
 * the v2 envelope (plan 252 TASK-3). The legacy flat payload above stays the
 * v1 contract with its v1 identity (`billing_ref`); a v2 fact under the same
 * name carries a `BillingProfileSchema` object of one of these
 * `(profile, kinds)` pairs, whose identity is the v2 occurrence key.
 */
interface BillingProfileBinding {
    profile: BillingProfileName;
    kinds: readonly string[];
}
interface EventPayloadContract {
    /** The payload's Zod schema — loose, additive-tolerant (REQ-9). */
    schema: z.ZodType;
    /**
     * Payload fields that make two emissions the same fact. `['event_id']`
     * means the envelope id is the only identity (plain telemetry). Datasource
     * sorting keys and dedup discriminators derive from this (REQ-4).
     *
     * For a billing event this is occurrence identity VERSION 1 and it is
     * immutable (the compat gate); version 2 rides on `billing_profiles`.
     */
    identity: readonly string[];
    /** Plan 252 TASK-3: the v2 billing profile(s) this name's facts take. Billing band only. */
    billing_profiles?: readonly BillingProfileBinding[];
}
/**
 * The versioned occurrence-identity rule for billing facts (plan 252
 * "Specification deltas": replace quantity-only occurrence identity with
 * source-qualified logical occurrence/revision relationships, retaining
 * historical projections and conversion links).
 *
 * v1 is `billing_ref` — kept verbatim, still the manifest `identity`, still
 * the conversion link. v2 is the profile's source-qualified occurrence key
 * plus its source revision; a v2 fact carries its v1 key as
 * `occurrence.legacy_billing_ref` so the two can be joined, never
 * reinterpreted.
 */
declare const BILLING_OCCURRENCE_IDENTITY: {
    readonly 1: {
        readonly keys: readonly ["billing_ref"];
        readonly defect: "Per-class producer keying: subscription_expanded is keyed on the TARGET quantity, so a repeated transition (5→10→5→10) collapses onto the first.";
    };
    readonly 2: {
        readonly keys: readonly ["source.tenant_id", "occurrence.occurrence_key"];
        readonly revision_keys: readonly ["source.tenant_id", "occurrence.occurrence_key", "occurrence.source_revision"];
        readonly legacy_link: "occurrence.legacy_billing_ref";
    };
};
/**
 * Total over every taxonomy name — adding an event in `taxonomy.ts` without a
 * payload contract here is a COMPILE error, and the parity test holds the
 * reverse direction.
 *
 * Declared with `satisfies` rather than an annotation so each entry keeps its
 * SPECIFIC schema type: `EventPayloadInput<'gate_evaluated'>` resolves to the
 * gate payload's input shape, which is what the SDK's typed emit surface
 * infers its per-event parameter types from (plan 228 TASK-4).
 */
declare const EVENT_PAYLOAD_CONTRACTS: {
    readonly web_signed_up: {
        readonly schema: z.ZodObject<{
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly web_signed_in: {
        readonly schema: z.ZodObject<{
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly cli_signed_up: {
        readonly schema: z.ZodObject<{
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly cli_signed_in: {
        readonly schema: z.ZodObject<{
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly cli_command_executed: {
        readonly schema: z.ZodObject<{
            command: z.ZodString;
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly playbook_version_submitted: {
        readonly schema: z.ZodObject<{
            playbook_version_id: z.ZodString;
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly playbook_version_approved: {
        readonly schema: z.ZodObject<{
            playbook_version_id: z.ZodString;
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly playbook_version_rejected: {
        readonly schema: z.ZodObject<{
            playbook_version_id: z.ZodString;
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly playbook_version_deployed: {
        readonly schema: z.ZodObject<{
            playbook_version_id: z.ZodString;
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly playbook_version_launched: {
        readonly schema: z.ZodObject<{
            playbook_version_id: z.ZodString;
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly playbook_version_parked: {
        readonly schema: z.ZodObject<{
            playbook_version_id: z.ZodString;
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly playbook_version_resumed: {
        readonly schema: z.ZodObject<{
            playbook_version_id: z.ZodString;
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly playbook_version_discarded: {
        readonly schema: z.ZodObject<{
            playbook_version_id: z.ZodString;
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly playbook_version_archived: {
        readonly schema: z.ZodObject<{
            playbook_version_id: z.ZodString;
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly playbook_imported: {
        readonly schema: z.ZodObject<{
            playbook_version_id: z.ZodString;
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly playbook_exported: {
        readonly schema: z.ZodObject<{
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly entity_created: {
        readonly schema: z.ZodObject<{
            resource: z.ZodString;
            resource_id: z.ZodOptional<z.ZodString>;
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly entity_updated: {
        readonly schema: z.ZodObject<{
            resource: z.ZodString;
            resource_id: z.ZodOptional<z.ZodString>;
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly entity_deleted: {
        readonly schema: z.ZodObject<{
            resource: z.ZodString;
            resource_id: z.ZodOptional<z.ZodString>;
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly web_api_error: {
        readonly schema: z.ZodObject<{
            request_id: z.ZodString;
            status: z.ZodNumber;
            route: z.ZodOptional<z.ZodString>;
            method: z.ZodOptional<z.ZodString>;
            error_code: z.ZodOptional<z.ZodString>;
            control_plane_source: z.ZodEnum<{
                system: "system";
                workflow: "workflow";
            }>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly area_viewed: {
        readonly schema: z.ZodObject<{
            area: z.ZodString;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly feature_gated: {
        readonly schema: z.ZodObject<{
            pathname: z.ZodNullable<z.ZodString>;
            reason: z.ZodString;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly placement_resolved: {
        readonly schema: z.ZodObject<{
            placement_id: z.ZodString;
            surface_slot_id: z.ZodNullable<z.ZodString>;
            payload_id: z.ZodNullable<z.ZodString>;
            decision_id: z.ZodNullable<z.ZodString>;
            decision_source: z.ZodNullable<z.ZodString>;
            rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly placement_rendered: {
        readonly schema: z.ZodObject<{
            placement_id: z.ZodString;
            surface_slot_id: z.ZodNullable<z.ZodString>;
            payload_id: z.ZodNullable<z.ZodString>;
            decision_id: z.ZodNullable<z.ZodString>;
            decision_source: z.ZodNullable<z.ZodString>;
            rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly placement_exposed: {
        readonly schema: z.ZodObject<{
            exposure_basis: z.ZodOptional<z.ZodString>;
            placement_id: z.ZodString;
            surface_slot_id: z.ZodNullable<z.ZodString>;
            payload_id: z.ZodNullable<z.ZodString>;
            decision_id: z.ZodNullable<z.ZodString>;
            decision_source: z.ZodNullable<z.ZodString>;
            rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly placement_outcome: {
        readonly schema: z.ZodObject<{
            outcome: z.ZodString;
            cta_target: z.ZodNullable<z.ZodString>;
            placement_id: z.ZodString;
            surface_slot_id: z.ZodNullable<z.ZodString>;
            payload_id: z.ZodNullable<z.ZodString>;
            decision_id: z.ZodNullable<z.ZodString>;
            decision_source: z.ZodNullable<z.ZodString>;
            rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly placement_interaction: {
        readonly schema: z.ZodObject<{
            interaction_type: z.ZodString;
            placement_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            payload_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            decision_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            action_type: z.ZodOptional<z.ZodString>;
            action_success: z.ZodOptional<z.ZodBoolean>;
            interaction_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            remind_after_seconds: z.ZodOptional<z.ZodNumber>;
            rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly checkout_started: {
        readonly schema: z.ZodObject<{
            placement_id: z.ZodString;
            payload_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            decision_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            plan_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly gate_evaluated: {
        readonly schema: z.ZodObject<{
            entitlement_handle: z.ZodString;
            outcome: z.ZodEnum<{
                allowed: "allowed";
                limited: "limited";
                denied: "denied";
            }>;
            gated: z.ZodBoolean;
            reason: z.ZodNullable<z.ZodString>;
            limit: z.ZodNullable<z.ZodNumber>;
            used: z.ZodNullable<z.ZodNumber>;
            remaining: z.ZodNullable<z.ZodNumber>;
            rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly gate_attempted: {
        readonly schema: z.ZodObject<{
            entitlement_handle: z.ZodString;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly gate_allowed: {
        readonly schema: z.ZodObject<{
            entitlement_handle: z.ZodString;
            rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly gate_denied: {
        readonly schema: z.ZodObject<{
            entitlement_handle: z.ZodString;
            reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly slot_evaluated: {
        readonly schema: z.ZodObject<{
            surface_slot_id: z.ZodNullable<z.ZodString>;
            slot_name: z.ZodNullable<z.ZodString>;
            template_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
            template_id: z.ZodNullable<z.ZodString>;
            surface_type: z.ZodNullable<z.ZodString>;
            category: z.ZodNullable<z.ZodString>;
            decision_source: z.ZodNullable<z.ZodString>;
            reason_codes: z.ZodArray<z.ZodString>;
            decision_id: z.ZodNullable<z.ZodString>;
            rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            route: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly slot_filled: {
        readonly schema: z.ZodObject<{
            surface_slot_id: z.ZodNullable<z.ZodString>;
            slot_name: z.ZodNullable<z.ZodString>;
            template_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
            template_id: z.ZodNullable<z.ZodString>;
            surface_type: z.ZodNullable<z.ZodString>;
            category: z.ZodNullable<z.ZodString>;
            decision_source: z.ZodNullable<z.ZodString>;
            reason_codes: z.ZodArray<z.ZodString>;
            decision_id: z.ZodNullable<z.ZodString>;
            rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            route: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly slot_empty: {
        readonly schema: z.ZodObject<{
            surface_slot_id: z.ZodNullable<z.ZodString>;
            slot_name: z.ZodNullable<z.ZodString>;
            template_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
            template_id: z.ZodNullable<z.ZodString>;
            surface_type: z.ZodNullable<z.ZodString>;
            category: z.ZodNullable<z.ZodString>;
            decision_source: z.ZodNullable<z.ZodString>;
            reason_codes: z.ZodArray<z.ZodString>;
            decision_id: z.ZodNullable<z.ZodString>;
            rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            route: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly slot_suppressed: {
        readonly schema: z.ZodObject<{
            surface_slot_id: z.ZodNullable<z.ZodString>;
            slot_name: z.ZodNullable<z.ZodString>;
            template_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
            template_id: z.ZodNullable<z.ZodString>;
            surface_type: z.ZodNullable<z.ZodString>;
            category: z.ZodNullable<z.ZodString>;
            decision_source: z.ZodNullable<z.ZodString>;
            reason_codes: z.ZodArray<z.ZodString>;
            decision_id: z.ZodNullable<z.ZodString>;
            rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            route: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly slot_error: {
        readonly schema: z.ZodObject<{
            message: z.ZodOptional<z.ZodString>;
            surface_slot_id: z.ZodNullable<z.ZodString>;
            slot_name: z.ZodNullable<z.ZodString>;
            template_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
            template_id: z.ZodNullable<z.ZodString>;
            surface_type: z.ZodNullable<z.ZodString>;
            category: z.ZodNullable<z.ZodString>;
            decision_source: z.ZodNullable<z.ZodString>;
            reason_codes: z.ZodArray<z.ZodString>;
            decision_id: z.ZodNullable<z.ZodString>;
            rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            route: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly segment_enrolled: {
        readonly schema: z.ZodObject<{
            segment_id: z.ZodString;
            user_id: z.ZodNullable<z.ZodString>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly segment_unenrolled: {
        readonly schema: z.ZodObject<{
            segment_id: z.ZodString;
            user_id: z.ZodNullable<z.ZodString>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly experiment_assigned: {
        readonly schema: z.ZodObject<{
            schema_version: z.ZodNumber;
            assignment_id: z.ZodString;
            experiment_id: z.ZodString;
            experiment_version: z.ZodNumber;
            variant_key: z.ZodString;
            assignment_unit: z.ZodEnum<{
                user: "user";
                account: "account";
                billing_unit: "billing_unit";
                organization: "organization";
            }>;
            subject_id: z.ZodString;
            assigned_at: z.ZodString;
            provider_handle: z.ZodOptional<z.ZodString>;
            provider_revision: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>;
        readonly identity: readonly ["assignment_id"];
    };
    readonly user_context_observed: {
        readonly schema: z.ZodObject<{
            context_fields: z.ZodArray<z.ZodString>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly clickstream_page_view: {
        readonly schema: z.ZodObject<{
            mode: z.ZodOptional<z.ZodString>;
            runtime_mode: z.ZodOptional<z.ZodString>;
            source: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly account_created: {
        readonly schema: z.ZodObject<{
            acquisition_source: z.ZodOptional<z.ZodString>;
            account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            evidence: z.ZodOptional<z.ZodNullable<z.ZodObject<{
                kind: z.ZodEnum<{
                    provider_fact: "provider_fact";
                    app_fact: "app_fact";
                    usage_exhaustion: "usage_exhaustion";
                }>;
                ref: z.ZodString;
            }, z.core.$loose>>>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly user_signed_up: {
        readonly schema: z.ZodObject<{
            acquisition_source: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly onboarding_completed: {
        readonly schema: z.ZodObject<{}, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly account_activated: {
        readonly schema: z.ZodObject<{}, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly product_used: {
        readonly schema: z.ZodObject<{}, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly value_realized: {
        readonly schema: z.ZodObject<{}, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly usage_recorded: {
        readonly schema: z.ZodObject<{
            metered_units: z.ZodNumber;
            included_allowance: z.ZodNumber;
            utilization: z.ZodNumber;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly plan_viewed: {
        readonly schema: z.ZodObject<{
            plan_handle: z.ZodString;
            entry_tier: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly promotion_applied: {
        readonly schema: z.ZodObject<{
            promotion_handle: z.ZodString;
            plan_handle: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly promotion_converted: {
        readonly schema: z.ZodObject<{
            promotion_handle: z.ZodString;
            full_price: z.ZodOptional<z.ZodBoolean>;
            plan_handle: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly trial_revision: {
        readonly schema: z.ZodObject<{
            trial_episode_id: z.ZodString;
            account_id: z.ZodString;
            subject_scope: z.ZodEnum<{
                user: "user";
                account: "account";
            }>;
            rule_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            plan_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            trial_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            revision: z.ZodEnum<{
                converted: "converted";
                expired: "expired";
                revoked: "revoked";
                started: "started";
                reverted: "reverted";
                extended: "extended";
            }>;
            effective_at: z.ZodString;
            scheduled_end_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            actual_end_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            evidence: z.ZodObject<{
                kind: z.ZodEnum<{
                    provider_fact: "provider_fact";
                    app_fact: "app_fact";
                    usage_exhaustion: "usage_exhaustion";
                }>;
                ref: z.ZodString;
            }, z.core.$loose>;
            provider_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, z.core.$loose>;
        readonly identity: readonly ["trial_episode_id", "revision"];
    };
    readonly sdk_init: {
        readonly schema: z.ZodObject<{
            config_hash_id: z.ZodOptional<z.ZodString>;
            sdk_version: z.ZodOptional<z.ZodString>;
            runtime_mode: z.ZodOptional<z.ZodString>;
            schema_version: z.ZodOptional<z.ZodString>;
            bundle_version: z.ZodOptional<z.ZodString>;
            config_shape: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly sdk_error: {
        readonly schema: z.ZodObject<{
            message: z.ZodString;
            config_hash_id: z.ZodOptional<z.ZodString>;
            sdk_version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly sdk_validation_warning: {
        readonly schema: z.ZodObject<{
            message: z.ZodString;
            config_hash_id: z.ZodOptional<z.ZodString>;
            sdk_version: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly resolution_failure: {
        readonly schema: z.ZodObject<{
            reason: z.ZodString;
            placement_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            slot_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            surface: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            plan_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            entitlement_handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
            message: z.ZodOptional<z.ZodString>;
            config_hash_id: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>;
        readonly identity: readonly ["event_id"];
    };
    readonly subscription_started: {
        readonly schema: z.ZodObject<{
            billing_period: z.ZodString;
            amount_cents: z.ZodNumber;
            currency: z.ZodString;
            billing_ref: z.ZodString;
            plan_handle: z.ZodString;
        }, z.core.$loose>;
        readonly identity: readonly ["billing_ref"];
        readonly billing_profiles: readonly [{
            readonly profile: "subscription";
            readonly kinds: readonly ["create"];
        }];
    };
    readonly subscription_renewed: {
        readonly schema: z.ZodObject<{
            billing_period: z.ZodString;
            amount_cents: z.ZodNumber;
            currency: z.ZodString;
            billing_ref: z.ZodString;
            plan_handle: z.ZodString;
        }, z.core.$loose>;
        readonly identity: readonly ["billing_ref"];
        readonly billing_profiles: readonly [{
            readonly profile: "subscription";
            readonly kinds: readonly ["renew"];
        }];
    };
    readonly subscription_expanded: {
        readonly schema: z.ZodObject<{
            previous_plan_handle: z.ZodOptional<z.ZodString>;
            delta_cents: z.ZodOptional<z.ZodNumber>;
            self_serve: z.ZodOptional<z.ZodBoolean>;
            billing_period: z.ZodString;
            amount_cents: z.ZodNumber;
            currency: z.ZodString;
            billing_ref: z.ZodString;
            plan_handle: z.ZodString;
        }, z.core.$loose>;
        readonly identity: readonly ["billing_ref"];
        readonly billing_profiles: readonly [{
            readonly profile: "subscription";
            readonly kinds: readonly ["change"];
        }];
    };
    readonly subscription_canceled: {
        readonly schema: z.ZodObject<{
            reason: z.ZodOptional<z.ZodString>;
            billing_ref: z.ZodString;
            plan_handle: z.ZodString;
        }, z.core.$loose>;
        readonly identity: readonly ["billing_ref"];
        readonly billing_profiles: readonly [{
            readonly profile: "subscription";
            readonly kinds: readonly ["cancel"];
        }, {
            readonly profile: "schedule";
            readonly kinds: readonly ["cancellation_scheduled"];
        }];
    };
    readonly trial_started: {
        readonly schema: z.ZodObject<{
            trial_rule_handle: z.ZodString;
            ends_at: z.ZodString;
            billing_ref: z.ZodString;
            plan_handle: z.ZodString;
        }, z.core.$loose>;
        readonly identity: readonly ["billing_ref"];
        readonly billing_profiles: readonly [{
            readonly profile: "subscription";
            readonly kinds: readonly ["trial_start"];
        }];
    };
    readonly trial_converted: {
        readonly schema: z.ZodObject<{
            trial_rule_handle: z.ZodString;
            billing_period: z.ZodString;
            amount_cents: z.ZodNumber;
            currency: z.ZodString;
            billing_ref: z.ZodString;
            plan_handle: z.ZodString;
        }, z.core.$loose>;
        readonly identity: readonly ["billing_ref"];
        readonly billing_profiles: readonly [{
            readonly profile: "subscription";
            readonly kinds: readonly ["trial_convert"];
        }];
    };
    readonly trial_expired: {
        readonly schema: z.ZodObject<{
            trial_rule_handle: z.ZodString;
            billing_ref: z.ZodString;
            plan_handle: z.ZodString;
        }, z.core.$loose>;
        readonly identity: readonly ["billing_ref"];
        readonly billing_profiles: readonly [{
            readonly profile: "subscription";
            readonly kinds: readonly ["trial_expire"];
        }];
    };
    readonly payment_succeeded: {
        readonly schema: z.ZodObject<{
            billing_ref: z.ZodString;
            amount_cents: z.ZodNumber;
            currency: z.ZodString;
            plan_handle: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>;
        readonly identity: readonly ["billing_ref"];
        readonly billing_profiles: readonly [{
            readonly profile: "transaction";
            readonly kinds: readonly ["payment_captured"];
        }];
    };
    readonly payment_failed: {
        readonly schema: z.ZodObject<{
            billing_ref: z.ZodString;
            reason: z.ZodString;
            amount_cents: z.ZodOptional<z.ZodNumber>;
            currency: z.ZodOptional<z.ZodString>;
            plan_handle: z.ZodOptional<z.ZodString>;
        }, z.core.$loose>;
        readonly identity: readonly ["billing_ref"];
        readonly billing_profiles: readonly [{
            readonly profile: "transaction";
            readonly kinds: readonly ["payment_failed"];
        }];
    };
};
/** The contracts map with per-event schema types preserved (plan 228 TASK-4). */
type EventPayloadContractMap = typeof EVENT_PAYLOAD_CONTRACTS;
/**
 * The input (pre-parse) payload shape for one platform event, inferred from
 * its contract schema. The SDK's typed emit surface takes exactly this per
 * event name, so the emit API cannot drift from the contract it validates
 * against.
 */
type EventPayloadInput<K extends PlatformEventName> = z.input<EventPayloadContractMap[K]['schema']>;
/**
 * Every contracted event name, sorted in UTF-16 code-unit order (the default
 * string sort — deliberately NOT localeCompare, per the single-canonicalizer
 * rule; names are lowercase snake_case ASCII, where the two orders coincide,
 * but the manifest must never depend on a locale).
 */
declare const EVENT_PAYLOAD_EVENT_NAMES: readonly string[];
/**
 * Validate a payload against its event's contract. Unknown events are a
 * structured failure, not an exception — `/api/track` routes those (and
 * schema violations) to the REQ-10 quarantine lane rather than dropping.
 */
declare function validateEventPayload(eventName: string, payload: unknown): {
    ok: true;
    payload: Record<string, unknown>;
} | {
    ok: false;
    reason: 'unknown_event' | 'schema_violation';
    detail?: string;
};
/**
 * Validate a v2 billing fact's properties for a billing event name: the
 * properties must be a valid `BillingProfileSchema` object AND of a
 * `(profile, kind)` the name is bound to. A subscription change can never be
 * filed under `payment_succeeded`.
 */
declare function validateBillingProfileForEvent(eventName: string, properties: unknown): {
    ok: true;
    profile: z.infer<typeof BillingProfileSchema>;
} | {
    ok: false;
    reason: 'no_billing_profile' | 'schema_violation' | 'profile_not_bound';
    detail?: string;
};
/** Every `(profile, kind)` some billing event name is bound to. The rest await their emitters (TASK-31/32/33/49/50). */
declare function boundBillingProfileKinds(): Record<BillingProfileName, string[]>;

/**
 * Trial schemas — free trial rules, reverse trial rules, and trial instances.
 */

declare const TrialStatusSchema: z.ZodEnum<{
    converted: "converted";
    active: "active";
    expired: "expired";
    cancelled: "cancelled";
    not_started: "not_started";
}>;
declare const FreeTrialRuleSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    name: z.ZodString;
    handle: z.ZodString;
    plan_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    segment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    trial_limit_type: z.ZodDefault<z.ZodEnum<{
        time: "time";
        usage: "usage";
    }>>;
    duration_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    grace_period_days: z.ZodDefault<z.ZodNumber>;
    usage_entitlement_handle: z.ZodOptional<z.ZodString>;
    usage_limit_value: z.ZodOptional<z.ZodNumber>;
    require_payment_method: z.ZodDefault<z.ZodBoolean>;
    auto_convert: z.ZodDefault<z.ZodBoolean>;
    convert_to_plan_id: z.ZodOptional<z.ZodString>;
    fallback_plan_id: z.ZodOptional<z.ZodString>;
    limit_per_customer: z.ZodDefault<z.ZodNumber>;
    is_active: z.ZodDefault<z.ZodBoolean>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const ReverseTrialStartPolicySchema: z.ZodEnum<{
    manual: "manual";
    signup: "signup";
    first_premium_access: "first_premium_access";
}>;
declare const ReverseTrialRuleSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    name: z.ZodString;
    handle: z.ZodString;
    premium_plan_id: z.ZodString;
    fallback_plan_id: z.ZodString;
    segment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    trial_limit_type: z.ZodDefault<z.ZodEnum<{
        time: "time";
        usage: "usage";
    }>>;
    duration_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    usage_entitlement_handle: z.ZodOptional<z.ZodString>;
    usage_limit_value: z.ZodOptional<z.ZodNumber>;
    start_policy: z.ZodDefault<z.ZodEnum<{
        manual: "manual";
        signup: "signup";
        first_premium_access: "first_premium_access";
    }>>;
    show_upgrade_prompt_at_day: z.ZodOptional<z.ZodNumber>;
    entitlements_during_trial: z.ZodDefault<z.ZodArray<z.ZodString>>;
    is_active: z.ZodDefault<z.ZodBoolean>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const TrialLimitPolicySchema: z.ZodEnum<{
    unlimited: "unlimited";
    "1_per_lifetime": "1_per_lifetime";
    "1_per_plan": "1_per_plan";
    "1_per_year": "1_per_year";
}>;
declare const TrialEligibilityScopeSchema: z.ZodEnum<{
    per_customer: "per_customer";
    per_email_domain: "per_email_domain";
}>;
declare const FreeTrialSettingsSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    trial_limit_policy: z.ZodDefault<z.ZodEnum<{
        unlimited: "unlimited";
        "1_per_lifetime": "1_per_lifetime";
        "1_per_plan": "1_per_plan";
        "1_per_year": "1_per_year";
    }>>;
    eligibility_scope: z.ZodDefault<z.ZodEnum<{
        per_customer: "per_customer";
        per_email_domain: "per_email_domain";
    }>>;
}, z.core.$strip>;
declare const ReverseTrialSettingsSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    trial_limit_policy: z.ZodDefault<z.ZodEnum<{
        unlimited: "unlimited";
        "1_per_lifetime": "1_per_lifetime";
        "1_per_plan": "1_per_plan";
        "1_per_year": "1_per_year";
    }>>;
    eligibility_scope: z.ZodDefault<z.ZodEnum<{
        per_customer: "per_customer";
        per_email_domain: "per_email_domain";
    }>>;
}, z.core.$strip>;
declare const TrialInstanceSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    customer_id: z.ZodString;
    rule_id: z.ZodString;
    rule_type: z.ZodEnum<{
        free_trial: "free_trial";
        reverse_trial: "reverse_trial";
    }>;
    plan_id: z.ZodString;
    status: z.ZodDefault<z.ZodEnum<{
        converted: "converted";
        active: "active";
        expired: "expired";
        cancelled: "cancelled";
        not_started: "not_started";
    }>>;
    started_at: z.ZodString;
    expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    trial_limit_type: z.ZodDefault<z.ZodEnum<{
        time: "time";
        usage: "usage";
    }>>;
    usage_entitlement_handle: z.ZodOptional<z.ZodString>;
    usage_limit_value: z.ZodOptional<z.ZodNumber>;
    converted_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    cancelled_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    trial_episode_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    stripe_subscription_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    actual_end_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const trialPaths: ZodOpenApiPathsObject;

/**
 * The pure trial-episode classifier (plan 276 TASK-12, rulings R-1 / R-2;
 * workspace ruling D-21).
 *
 * `classifyTrialRevision` answers one question over one episode's facts: what
 * revision, if any, does the evidence support? It is a pure function with **no
 * clock of its own**. The caller may pass `observed_through` so a test can show
 * that an elapsed scheduled end changes nothing, but the function never reads
 * the current time and never manufactures an occurrence from it.
 *
 * That is the whole point. Before this module the live behaviour was the R-1(c)
 * violation plan 276 TASK-2 found in shipped code: expiry was derived from the
 * clock at read time, so a trial "expired" because a deadline passed, with no
 * fact anywhere saying the app had actually ended anything. Here an elapsed
 * deadline resolves to `pending_unknown`, and `pending_unknown` is a first-class
 * answer rather than an error — the lifecycle product would rather show an
 * unknown than invent a churn.
 *
 * Four rules carry the rulings:
 *
 *  - **The clock is never an authority (R-1(c)).** No end evidence ⇒ no
 *    `expired`, no `reverted`, no edge. `elapsed_deadline_without_fact` is the
 *    reason, and it is returned whether the deadline passed a moment ago or a
 *    year ago.
 *  - **A conversion links only its own episode (AC-4).** The commitment must be
 *    bound to THIS episode and must begin at or after the evidenced actual end.
 *    A commitment that starts before the episode ended is not this episode's
 *    conversion — card collection and unrelated paid activity cannot convert a
 *    trial.
 *  - **Usage expiry needs exhaustion evidence (R-1 / AC-2).** A usage-metered
 *    episode whose end evidence is not exhaustion stays unknown.
 *  - **A user-subject episode is not an account-wide grant (R-2).** It is
 *    classified normally and reported with `grants_account_access: false`.
 *
 * The result carries no `emit` flag on purpose: `status: 'revision'` IS the
 * instruction to emit one `trial_revision`, and `pending_unknown` IS the
 * instruction to emit nothing.
 */
/** The authority tier of a proving fact. There is no `clock` tier (R-1(c)). */
type TrialEvidenceKind$1 = 'provider_fact' | 'app_fact' | 'usage_exhaustion';
/** A reference to the fact that proved something. Opaque to RevTurbine. */
interface TrialEvidence$1 {
    readonly kind: TrialEvidenceKind$1;
    readonly ref: string;
    /** When the proving fact says the thing happened. */
    readonly occurred_at: string;
}
/** Every revision an episode can undergo. Mirrors `TrialRevisionPayload.revision`. */
declare const TRIAL_REVISION_KINDS$1: readonly ["started", "extended", "converted", "reverted", "expired", "revoked"];
type TrialRevisionKind$1 = (typeof TRIAL_REVISION_KINDS$1)[number];
/**
 * Why an episode has no supported revision. Closed set — a caller rendering
 * "unknown" needs to say WHICH unknown, and a new one has to be declared here
 * rather than passed through as free text.
 */
declare const TRIAL_PENDING_UNKNOWN_REASONS$1: readonly ["no_authoritative_fact", "elapsed_deadline_without_fact", "episode_open", "usage_expiry_requires_exhaustion_evidence", "commitment_precedes_actual_end", "end_evidence_without_effective_time"];
type TrialPendingUnknownReason$1 = (typeof TRIAL_PENDING_UNKNOWN_REASONS$1)[number];
/** A paid commitment, as bound to one episode by the producer. */
interface TrialCommitment$1 {
    /** The commitment's own reference (a subscription id, an order id). */
    readonly ref: string;
    /** When the commitment began. */
    readonly started_at: string;
    /**
     * The episode this commitment is BOUND to, per the producer that holds the
     * binding. A commitment naming a different episode (or none) is not this
     * episode's conversion, however well the timing lines up.
     */
    readonly trial_episode_id: string | null;
}
/** One episode's facts, as the producer holds them. */
interface TrialEpisodeFacts$1 {
    readonly trial_episode_id: string;
    readonly account_id: string;
    readonly subject_scope: 'account' | 'user';
    /** Time-bounded or consumption-bounded. Drives the exhaustion rule. */
    readonly limit_type: 'time' | 'usage';
    /** The fact that proves the episode was enrolled. Absent ⇒ nothing is known. */
    readonly enrollment: TrialEvidence$1 | null;
    /** When the episode started, per the enrolling fact. */
    readonly started_at: string | null;
    /** The DECLARED end. Its passing proves only that the time passed. */
    readonly scheduled_end_at: string | null;
    /** The EVIDENCED end. Null until a fact closes the episode. */
    readonly actual_end_at: string | null;
    /** The fact that closed the episode. */
    readonly end_evidence: TrialEvidence$1 | null;
    /** A fact extending the scheduled end while the episode is still open. */
    readonly extension: TrialEvidence$1 | null;
    /** A fact withdrawing the trial before its end. Outranks everything. */
    readonly revocation: TrialEvidence$1 | null;
    /** The commitment the producer bound to this episode, if any. */
    readonly commitment: TrialCommitment$1 | null;
    /** Proof the app actually moved access back to the fallback target. */
    readonly fallback: TrialEvidence$1 | null;
    /** Proof the metered allowance was exhausted (required for usage expiry). */
    readonly exhaustion: TrialEvidence$1 | null;
    /**
     * How far the caller's observation reaches. Carried ONLY so the classifier
     * can distinguish "open" from "deadline elapsed, still unproven" — both of
     * which emit nothing. It can never produce a revision.
     */
    readonly observed_through?: string | null;
}
interface TrialRevisionResolved$1 {
    readonly status: 'revision';
    readonly revision: TrialRevisionKind$1;
    /** When the revision took effect, per the proving fact. */
    readonly effective_at: string;
    readonly evidence: TrialEvidence$1;
    /** False for a user-subject episode (R-2): retained, but not account-wide. */
    readonly grants_account_access: boolean;
    /** The commitment this revision links, for a conversion only. */
    readonly commitment_ref: string | null;
}
interface TrialRevisionPending$1 {
    readonly status: 'pending_unknown';
    readonly reason: TrialPendingUnknownReason$1;
    readonly grants_account_access: boolean;
}
type TrialRevisionClassification$1 = TrialRevisionResolved$1 | TrialRevisionPending$1;
/**
 * Classify one trial episode's facts into the revision they support, or
 * `pending_unknown`.
 *
 * Pure, clock-free and total: every input resolves to one of the two members.
 *
 * @public
 */
declare function classifyTrialRevision(facts: TrialEpisodeFacts$1): TrialRevisionClassification$1;

/**
 * Account-creation evidence, classified (plan 276 TASK-12, REQ-3; R-2).
 *
 * Plan 276 TASK-2 found no account-creation producer of any kind, and the one
 * near-miss was the trap this module exists to close: RevTurbine's own control
 * plane emits `web_signed_up`, which is USER-grain. Under R-2 a user signup
 * does not establish account creation, and "first observation" is not
 * acquisition either — so the lifecycle product must be able to refuse an
 * account-creation claim that rests on either.
 *
 * `classifyAccountCreation` is pure and clock-free. It returns `account_created`
 * only when the producer supplies an account id, a creation time, a creating
 * act and the evidence that proves it; every other input resolves to
 * `pending_unknown` with the reason named.
 */

/** Shared with the trial classifier: the same three authority tiers, no clock. */
type AccountCreationEvidenceKind = TrialEvidenceKind$1;
type AccountCreationEvidence = TrialEvidence$1;
/**
 * Creating acts that are ACCOUNT-grain. A user-grain act is not on this list,
 * and that is the R-2 boundary in one declaration rather than a comment.
 */
declare const ACCOUNT_CREATION_SOURCES: readonly ["self_serve_signup", "invite_accepted", "provisioned", "import"];
type AccountCreationSource = (typeof ACCOUNT_CREATION_SOURCES)[number];
/**
 * User-grain acts that are routinely MISTAKEN for account creation. Naming
 * them explicitly means the refusal carries a specific reason instead of a
 * generic "unrecognized source".
 */
declare const USER_GRAIN_NON_CREATION_SOURCES: readonly ["user_signup", "user_signed_up", "first_seen"];
declare const ACCOUNT_CREATION_PENDING_REASONS: readonly ["no_evidence", "no_account_grain", "no_creation_time", "user_grain_signup_is_not_account_creation", "unrecognized_source"];
type AccountCreationPendingReason = (typeof ACCOUNT_CREATION_PENDING_REASONS)[number];
interface AccountCreationFacts {
    readonly account_id: string | null;
    readonly created_at: string | null;
    readonly source: string | null;
    readonly evidence: AccountCreationEvidence | null;
}
type AccountCreationClassification = {
    readonly status: 'account_created';
    readonly account_id: string;
    readonly created_at: string;
    readonly source: AccountCreationSource;
    readonly evidence: AccountCreationEvidence;
} | {
    readonly status: 'pending_unknown';
    readonly reason: AccountCreationPendingReason;
};
/**
 * Classify account-creation facts. Pure; refuses rather than infers.
 *
 * @public
 */
declare function classifyAccountCreation(facts: AccountCreationFacts): AccountCreationClassification;

/**
 * Experiment schemas — A/B tests, optimization suggestions.
 */

declare const ExperimentStatusSchema: z.ZodEnum<{
    complete: "complete";
    paused: "paused";
    neutral: "neutral";
    draft: "draft";
    ramping: "ramping";
    winning: "winning";
    needs_attention: "needs_attention";
}>;
declare const ExperimentTypeSchema: z.ZodEnum<{
    custom: "custom";
    placement_ab: "placement_ab";
    entitlement_ab: "entitlement_ab";
    plan_ab: "plan_ab";
    pricing_ab: "pricing_ab";
}>;
/** Declares which runtime owns experiment variant assignment. */
declare const ExperimentAssignmentSourceSchema: z.ZodEnum<{
    native: "native";
    customer_sdk: "customer_sdk";
}>;
declare const ExperimentVariantTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    kind: z.ZodLiteral<"placement">;
    placement_handle: z.ZodString;
    placement_payload_handle: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"entitlement">;
    entitlement_handle: z.ZodString;
    rule_handle: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"plan">;
    plan_handle: z.ZodString;
    plan_variation_handle: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"pricing">;
    plan_variation_handle: z.ZodString;
    promotion_handle: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"custom">;
    provider_payload: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
}, z.core.$strip>], "kind">;
declare const ExperimentVariantSchema: z.ZodObject<{
    variant_id: z.ZodString;
    name: z.ZodString;
    weight: z.ZodDefault<z.ZodNumber>;
    is_control: z.ZodDefault<z.ZodBoolean>;
    targets: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"placement">;
        placement_handle: z.ZodString;
        placement_payload_handle: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"entitlement">;
        entitlement_handle: z.ZodString;
        rule_handle: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"plan">;
        plan_handle: z.ZodString;
        plan_variation_handle: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"pricing">;
        plan_variation_handle: z.ZodString;
        promotion_handle: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"custom">;
        provider_payload: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
    }, z.core.$strip>], "kind">>>;
    config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const ExperimentAnalysisConfigSchema: z.ZodObject<{
    methodology: z.ZodEnum<{
        frequentist: "frequentist";
        bayesian: "bayesian";
    }>;
    analysis_unit: z.ZodEnum<{
        user: "user";
        account: "account";
        billing_unit: "billing_unit";
        organization: "organization";
    }>;
    sequential: z.ZodOptional<z.ZodObject<{
        method: z.ZodLiteral<"always_valid">;
        look_count: z.ZodNumber;
        alpha: z.ZodDefault<z.ZodNumber>;
    }, z.core.$strict>>;
    multiple_comparisons: z.ZodOptional<z.ZodObject<{
        method: z.ZodLiteral<"holm">;
        family_scope: z.ZodLiteral<"primary_and_guardrails_separate">;
    }, z.core.$strip>>;
    variance_reduction: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
        method: z.ZodLiteral<"cuped">;
        covariate_metric: z.ZodString;
        lookback_days: z.ZodNumber;
    }, z.core.$strip>, z.ZodObject<{
        method: z.ZodLiteral<"regression_adjustment">;
        covariate_metric: z.ZodString;
        lookback_days: z.ZodNumber;
    }, z.core.$strip>], "method">>;
    practical_significance: z.ZodOptional<z.ZodObject<{
        minimum_revenue_effect: z.ZodNumber;
    }, z.core.$strict>>;
}, z.core.$strip>;
type ExperimentAnalysisConfig$1 = z.infer<typeof ExperimentAnalysisConfigSchema>;
declare class ExperimentAnalysisConfigVersionError extends Error {
    constructor();
}
/** Refuse analysis-setting edits once an Experiment version is running. */
declare function assertExperimentAnalysisConfigUpdateAllowed(current: {
    status: z.infer<typeof ExperimentStatusSchema>;
    analysis_config?: ExperimentAnalysisConfig$1;
}, nextAnalysisConfig: ExperimentAnalysisConfig$1 | undefined): void;
/**
 * Deterministic policy turning analysis output into a RevTurbine business
 * decision (war-games spec §8.1). Lives on the Experiment version beside
 * `analysis_config` and inherits the same running-version immutability: a
 * policy edit after outcomes are visible mints a new version. The platform
 * floor (fail-closed on unavailable validity signals, append-only records,
 * diagnostics never promote or block) lives in the evaluator and is not
 * configurable here.
 */
declare const ExperimentDecisionPolicySchema: z.ZodObject<{
    schema_version: z.ZodNumber;
    minimum_runtime: z.ZodOptional<z.ZodObject<{
        days: z.ZodOptional<z.ZodNumber>;
        analysis_units: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
    validity: z.ZodObject<{
        fail_on_srm: z.ZodBoolean;
        fail_on_assignment_collision: z.ZodBoolean;
        fail_on_exposure_integrity: z.ZodBoolean;
        fail_on_carryover: z.ZodBoolean;
    }, z.core.$strip>;
    primary_success: z.ZodDiscriminatedUnion<[z.ZodObject<{
        method: z.ZodLiteral<"frequentist">;
        require_statistical_significance: z.ZodBoolean;
        require_practical_significance: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strip>, z.ZodObject<{
        method: z.ZodLiteral<"bayesian">;
        minimum_probability_positive: z.ZodNumber;
        maximum_expected_loss: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>], "method">;
    guardrails: z.ZodObject<{
        require_no_material_harm: z.ZodBoolean;
        allowed_guardrail_failures: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
    }, z.core.$strip>;
    segments: z.ZodObject<{
        allow_segment_decisions: z.ZodBoolean;
        allowed_segments: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$strip>;
    inconclusive: z.ZodObject<{
        action: z.ZodEnum<{
            hold_inconclusive: "hold_inconclusive";
            iterate_followup: "iterate_followup";
        }>;
    }, z.core.$strip>;
}, z.core.$strip>;
type ExperimentDecisionPolicy$1 = z.infer<typeof ExperimentDecisionPolicySchema>;
declare class ExperimentDecisionPolicyVersionError extends Error {
    constructor();
}
/**
 * Refuse `decision_policy` edits once an Experiment version is running —
 * the sibling of {@link assertExperimentAnalysisConfigUpdateAllowed}, over
 * the same running statuses.
 */
declare function assertExperimentDecisionPolicyUpdateAllowed(current: {
    status: z.infer<typeof ExperimentStatusSchema>;
    decision_policy?: ExperimentDecisionPolicy$1;
}, nextDecisionPolicy: ExperimentDecisionPolicy$1 | undefined): void;
/** Compact per-variant evidence; raw subject rows never cross this boundary. */
declare const VariantStatisticalSummarySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    variant_id: z.ZodString;
    clustered: z.ZodOptional<z.ZodObject<{
        assignment_unit: z.ZodEnum<{
            user: "user";
            account: "account";
            billing_unit: "billing_unit";
            organization: "organization";
        }>;
        clusters: z.ZodArray<z.ZodObject<{
            n: z.ZodNumber;
            sum_numerator: z.ZodNumber;
            sum_denominator: z.ZodNumber;
            sum_covariate: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>;
    }, z.core.$strip>>;
    statistic_type: z.ZodLiteral<"mean">;
    n: z.ZodNumber;
    sum_y: z.ZodNumber;
    sum_y2: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
    variant_id: z.ZodString;
    clustered: z.ZodOptional<z.ZodObject<{
        assignment_unit: z.ZodEnum<{
            user: "user";
            account: "account";
            billing_unit: "billing_unit";
            organization: "organization";
        }>;
        clusters: z.ZodArray<z.ZodObject<{
            n: z.ZodNumber;
            sum_numerator: z.ZodNumber;
            sum_denominator: z.ZodNumber;
            sum_covariate: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>;
    }, z.core.$strip>>;
    statistic_type: z.ZodLiteral<"binary">;
    n: z.ZodNumber;
    successes: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
    variant_id: z.ZodString;
    clustered: z.ZodOptional<z.ZodObject<{
        assignment_unit: z.ZodEnum<{
            user: "user";
            account: "account";
            billing_unit: "billing_unit";
            organization: "organization";
        }>;
        clusters: z.ZodArray<z.ZodObject<{
            n: z.ZodNumber;
            sum_numerator: z.ZodNumber;
            sum_denominator: z.ZodNumber;
            sum_covariate: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>;
    }, z.core.$strip>>;
    statistic_type: z.ZodLiteral<"ratio">;
    n: z.ZodNumber;
    sum_numerator: z.ZodNumber;
    sum_denominator: z.ZodNumber;
    sum_numerator2: z.ZodNumber;
    sum_denominator2: z.ZodNumber;
    sum_cross: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
    variant_id: z.ZodString;
    clustered: z.ZodOptional<z.ZodObject<{
        assignment_unit: z.ZodEnum<{
            user: "user";
            account: "account";
            billing_unit: "billing_unit";
            organization: "organization";
        }>;
        clusters: z.ZodArray<z.ZodObject<{
            n: z.ZodNumber;
            sum_numerator: z.ZodNumber;
            sum_denominator: z.ZodNumber;
            sum_covariate: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>;
    }, z.core.$strip>>;
    statistic_type: z.ZodLiteral<"covariance">;
    n: z.ZodNumber;
    sum_x: z.ZodNumber;
    sum_y: z.ZodNumber;
    sum_x2: z.ZodNumber;
    sum_y2: z.ZodNumber;
    sum_xy: z.ZodNumber;
}, z.core.$strip>], "statistic_type">;
/** Normalized sufficient-statistics output from an evidence provider (§6.11). */
declare const ExperimentEvidenceSchema: z.ZodObject<{
    schema_version: z.ZodNumber;
    experiment_handle: z.ZodString;
    experiment_version: z.ZodNumber;
    metric: z.ZodString;
    analysis_unit: z.ZodEnum<{
        user: "user";
        account: "account";
        billing_unit: "billing_unit";
        organization: "organization";
    }>;
    variants: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
        variant_id: z.ZodString;
        clustered: z.ZodOptional<z.ZodObject<{
            assignment_unit: z.ZodEnum<{
                user: "user";
                account: "account";
                billing_unit: "billing_unit";
                organization: "organization";
            }>;
            clusters: z.ZodArray<z.ZodObject<{
                n: z.ZodNumber;
                sum_numerator: z.ZodNumber;
                sum_denominator: z.ZodNumber;
                sum_covariate: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>>;
        }, z.core.$strip>>;
        statistic_type: z.ZodLiteral<"mean">;
        n: z.ZodNumber;
        sum_y: z.ZodNumber;
        sum_y2: z.ZodNumber;
    }, z.core.$strip>, z.ZodObject<{
        variant_id: z.ZodString;
        clustered: z.ZodOptional<z.ZodObject<{
            assignment_unit: z.ZodEnum<{
                user: "user";
                account: "account";
                billing_unit: "billing_unit";
                organization: "organization";
            }>;
            clusters: z.ZodArray<z.ZodObject<{
                n: z.ZodNumber;
                sum_numerator: z.ZodNumber;
                sum_denominator: z.ZodNumber;
                sum_covariate: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>>;
        }, z.core.$strip>>;
        statistic_type: z.ZodLiteral<"binary">;
        n: z.ZodNumber;
        successes: z.ZodNumber;
    }, z.core.$strip>, z.ZodObject<{
        variant_id: z.ZodString;
        clustered: z.ZodOptional<z.ZodObject<{
            assignment_unit: z.ZodEnum<{
                user: "user";
                account: "account";
                billing_unit: "billing_unit";
                organization: "organization";
            }>;
            clusters: z.ZodArray<z.ZodObject<{
                n: z.ZodNumber;
                sum_numerator: z.ZodNumber;
                sum_denominator: z.ZodNumber;
                sum_covariate: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>>;
        }, z.core.$strip>>;
        statistic_type: z.ZodLiteral<"ratio">;
        n: z.ZodNumber;
        sum_numerator: z.ZodNumber;
        sum_denominator: z.ZodNumber;
        sum_numerator2: z.ZodNumber;
        sum_denominator2: z.ZodNumber;
        sum_cross: z.ZodNumber;
    }, z.core.$strip>, z.ZodObject<{
        variant_id: z.ZodString;
        clustered: z.ZodOptional<z.ZodObject<{
            assignment_unit: z.ZodEnum<{
                user: "user";
                account: "account";
                billing_unit: "billing_unit";
                organization: "organization";
            }>;
            clusters: z.ZodArray<z.ZodObject<{
                n: z.ZodNumber;
                sum_numerator: z.ZodNumber;
                sum_denominator: z.ZodNumber;
                sum_covariate: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>>;
        }, z.core.$strip>>;
        statistic_type: z.ZodLiteral<"covariance">;
        n: z.ZodNumber;
        sum_x: z.ZodNumber;
        sum_y: z.ZodNumber;
        sum_x2: z.ZodNumber;
        sum_y2: z.ZodNumber;
        sum_xy: z.ZodNumber;
    }, z.core.$strip>], "statistic_type">>;
    observation_window: z.ZodObject<{
        start: z.ZodString;
        end: z.ZodString;
    }, z.core.$strip>;
    covariate: z.ZodOptional<z.ZodObject<{
        metric: z.ZodString;
        observation_window: z.ZodObject<{
            start: z.ZodString;
            end: z.ZodString;
        }, z.core.$strip>;
    }, z.core.$strip>>;
    data_watermark: z.ZodString;
    source_scope: z.ZodEnum<{
        total: "total";
        account_matched: "account_matched";
        revturbine_tracked: "revturbine_tracked";
        revturbine_influenced: "revturbine_influenced";
    }>;
    provider: z.ZodObject<{
        provider_handle: z.ZodString;
        provider_type: z.ZodString;
        provider_version: z.ZodString;
        contract_version: z.ZodNumber;
        generated_at: z.ZodString;
        data_watermark: z.ZodOptional<z.ZodString>;
        source_revision: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>;
}, z.core.$strip>;
/** Experiment-wide diagnostics. SRM belongs here, never in `metrics`. */
declare const ExperimentHealthSchema: z.ZodObject<{
    status: z.ZodEnum<{
        warning: "warning";
        healthy: "healthy";
        unhealthy: "unhealthy";
        insufficient_data: "insufficient_data";
    }>;
    sample_ratio_mismatch: z.ZodOptional<z.ZodObject<{
        status: z.ZodEnum<{
            not_evaluated: "not_evaluated";
            pass: "pass";
            fail: "fail";
        }>;
        p_value: z.ZodOptional<z.ZodNumber>;
        chi_squared: z.ZodOptional<z.ZodNumber>;
        variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
            variant_id: z.ZodString;
            observed_count: z.ZodNumber;
            expected_count: z.ZodNumber;
        }, z.core.$strip>>>;
        reason: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    issues: z.ZodDefault<z.ZodArray<z.ZodObject<{
        code: z.ZodString;
        message: z.ZodString;
    }, z.core.$strip>>>;
}, z.core.$strip>;
/** One metric comparison in the shared result shape. */
declare const ExperimentMetricResultSchema: z.ZodObject<{
    metric: z.ZodString;
    control_variant_id: z.ZodString;
    variant_id: z.ZodString;
    estimator: z.ZodString;
    estimator_version: z.ZodString;
    estimate: z.ZodNumber;
    control_estimate: z.ZodNumber;
    absolute_effect: z.ZodNumber;
    relative_effect: z.ZodOptional<z.ZodNumber>;
    standard_error: z.ZodOptional<z.ZodNumber>;
    confidence_interval: z.ZodOptional<z.ZodObject<{
        lower: z.ZodNumber;
        upper: z.ZodNumber;
        level: z.ZodNumber;
    }, z.core.$strip>>;
    p_value: z.ZodOptional<z.ZodNumber>;
    multiple_comparison: z.ZodOptional<z.ZodObject<{
        method: z.ZodLiteral<"holm">;
        family: z.ZodEnum<{
            primary: "primary";
            guardrails: "guardrails";
        }>;
        family_size: z.ZodNumber;
        unadjusted_p_value: z.ZodNumber;
    }, z.core.$strip>>;
    probability_positive: z.ZodOptional<z.ZodNumber>;
    expected_loss: z.ZodOptional<z.ZodNumber>;
    sequential: z.ZodOptional<z.ZodObject<{
        method: z.ZodLiteral<"always_valid">;
        status: z.ZodEnum<{
            continue: "continue";
            significant_positive: "significant_positive";
            significant_negative: "significant_negative";
        }>;
        look_count: z.ZodNumber;
        spending_state: z.ZodObject<{
            alpha: z.ZodNumber;
            look_alpha: z.ZodNumber;
            cumulative_alpha_spent: z.ZodNumber;
            alpha_remaining: z.ZodNumber;
            unadjusted_p_value: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>;
    }, z.core.$strip>>;
    practical_significance: z.ZodOptional<z.ZodObject<{
        minimum_revenue_effect: z.ZodNumber;
        revenue_effect: z.ZodNumber;
        status: z.ZodEnum<{
            meaningful_positive: "meaningful_positive";
            meaningful_negative: "meaningful_negative";
            not_demonstrated: "not_demonstrated";
        }>;
    }, z.core.$strip>>;
    sample_size: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
declare const AnalysisProvenanceSchema: z.ZodObject<{
    provider: z.ZodObject<{
        provider_handle: z.ZodString;
        provider_type: z.ZodString;
        provider_version: z.ZodString;
        contract_version: z.ZodNumber;
        generated_at: z.ZodString;
        data_watermark: z.ZodOptional<z.ZodString>;
        source_revision: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>;
    evidence: z.ZodArray<z.ZodObject<{
        metric: z.ZodString;
        summary_schema_version: z.ZodNumber;
        data_watermark: z.ZodString;
        provider: z.ZodObject<{
            provider_handle: z.ZodString;
            provider_type: z.ZodString;
            provider_version: z.ZodString;
            contract_version: z.ZodNumber;
            generated_at: z.ZodString;
            data_watermark: z.ZodOptional<z.ZodString>;
            source_revision: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>;
    }, z.core.$strip>>;
}, z.core.$strip>;
/** Provider-neutral experiment analysis output (§6.12). */
declare const ExperimentAnalysisResultSchema: z.ZodObject<{
    schema_version: z.ZodNumber;
    engine: z.ZodString;
    engine_version: z.ZodString;
    methodology: z.ZodString;
    metrics: z.ZodArray<z.ZodObject<{
        metric: z.ZodString;
        control_variant_id: z.ZodString;
        variant_id: z.ZodString;
        estimator: z.ZodString;
        estimator_version: z.ZodString;
        estimate: z.ZodNumber;
        control_estimate: z.ZodNumber;
        absolute_effect: z.ZodNumber;
        relative_effect: z.ZodOptional<z.ZodNumber>;
        standard_error: z.ZodOptional<z.ZodNumber>;
        confidence_interval: z.ZodOptional<z.ZodObject<{
            lower: z.ZodNumber;
            upper: z.ZodNumber;
            level: z.ZodNumber;
        }, z.core.$strip>>;
        p_value: z.ZodOptional<z.ZodNumber>;
        multiple_comparison: z.ZodOptional<z.ZodObject<{
            method: z.ZodLiteral<"holm">;
            family: z.ZodEnum<{
                primary: "primary";
                guardrails: "guardrails";
            }>;
            family_size: z.ZodNumber;
            unadjusted_p_value: z.ZodNumber;
        }, z.core.$strip>>;
        probability_positive: z.ZodOptional<z.ZodNumber>;
        expected_loss: z.ZodOptional<z.ZodNumber>;
        sequential: z.ZodOptional<z.ZodObject<{
            method: z.ZodLiteral<"always_valid">;
            status: z.ZodEnum<{
                continue: "continue";
                significant_positive: "significant_positive";
                significant_negative: "significant_negative";
            }>;
            look_count: z.ZodNumber;
            spending_state: z.ZodObject<{
                alpha: z.ZodNumber;
                look_alpha: z.ZodNumber;
                cumulative_alpha_spent: z.ZodNumber;
                alpha_remaining: z.ZodNumber;
                unadjusted_p_value: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>;
        }, z.core.$strip>>;
        practical_significance: z.ZodOptional<z.ZodObject<{
            minimum_revenue_effect: z.ZodNumber;
            revenue_effect: z.ZodNumber;
            status: z.ZodEnum<{
                meaningful_positive: "meaningful_positive";
                meaningful_negative: "meaningful_negative";
                not_demonstrated: "not_demonstrated";
            }>;
        }, z.core.$strip>>;
        sample_size: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
    health: z.ZodObject<{
        status: z.ZodEnum<{
            warning: "warning";
            healthy: "healthy";
            unhealthy: "unhealthy";
            insufficient_data: "insufficient_data";
        }>;
        sample_ratio_mismatch: z.ZodOptional<z.ZodObject<{
            status: z.ZodEnum<{
                not_evaluated: "not_evaluated";
                pass: "pass";
                fail: "fail";
            }>;
            p_value: z.ZodOptional<z.ZodNumber>;
            chi_squared: z.ZodOptional<z.ZodNumber>;
            variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
                variant_id: z.ZodString;
                observed_count: z.ZodNumber;
                expected_count: z.ZodNumber;
            }, z.core.$strip>>>;
            reason: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        issues: z.ZodDefault<z.ZodArray<z.ZodObject<{
            code: z.ZodString;
            message: z.ZodString;
        }, z.core.$strip>>>;
    }, z.core.$strip>;
    provenance: z.ZodObject<{
        provider: z.ZodObject<{
            provider_handle: z.ZodString;
            provider_type: z.ZodString;
            provider_version: z.ZodString;
            contract_version: z.ZodNumber;
            generated_at: z.ZodString;
            data_watermark: z.ZodOptional<z.ZodString>;
            source_revision: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>;
        evidence: z.ZodArray<z.ZodObject<{
            metric: z.ZodString;
            summary_schema_version: z.ZodNumber;
            data_watermark: z.ZodString;
            provider: z.ZodObject<{
                provider_handle: z.ZodString;
                provider_type: z.ZodString;
                provider_version: z.ZodString;
                contract_version: z.ZodNumber;
                generated_at: z.ZodString;
                data_watermark: z.ZodOptional<z.ZodString>;
                source_revision: z.ZodOptional<z.ZodString>;
            }, z.core.$strip>;
        }, z.core.$strip>>;
    }, z.core.$strip>;
}, z.core.$strip>;
/** Append-only sufficient-statistics snapshot with query provenance (§7.6). */
declare const ExperimentEvidenceSnapshotSchema: z.ZodObject<{
    id: z.ZodString;
    tenant_id: z.ZodString;
    created_at: z.ZodString;
    experiment_handle: z.ZodString;
    experiment_version: z.ZodNumber;
    metric_semantic_id: z.ZodString;
    metric_catalog_version: z.ZodString;
    endpoint_version: z.ZodString;
    query_hash: z.ZodString;
    evidence_provider_handle: z.ZodString;
    evidence_provider_type: z.ZodString;
    evidence_provider_version: z.ZodString;
    evidence_provider_contract_version: z.ZodNumber;
    summary_schema_version: z.ZodNumber;
    observation_window_start: z.ZodString;
    observation_window_end: z.ZodString;
    data_watermark: z.ZodString;
    analysis_unit: z.ZodEnum<{
        user: "user";
        account: "account";
        billing_unit: "billing_unit";
        organization: "organization";
    }>;
    evidence: z.ZodObject<{
        schema_version: z.ZodNumber;
        experiment_handle: z.ZodString;
        experiment_version: z.ZodNumber;
        metric: z.ZodString;
        analysis_unit: z.ZodEnum<{
            user: "user";
            account: "account";
            billing_unit: "billing_unit";
            organization: "organization";
        }>;
        variants: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
            variant_id: z.ZodString;
            clustered: z.ZodOptional<z.ZodObject<{
                assignment_unit: z.ZodEnum<{
                    user: "user";
                    account: "account";
                    billing_unit: "billing_unit";
                    organization: "organization";
                }>;
                clusters: z.ZodArray<z.ZodObject<{
                    n: z.ZodNumber;
                    sum_numerator: z.ZodNumber;
                    sum_denominator: z.ZodNumber;
                    sum_covariate: z.ZodOptional<z.ZodNumber>;
                }, z.core.$strip>>;
            }, z.core.$strip>>;
            statistic_type: z.ZodLiteral<"mean">;
            n: z.ZodNumber;
            sum_y: z.ZodNumber;
            sum_y2: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            variant_id: z.ZodString;
            clustered: z.ZodOptional<z.ZodObject<{
                assignment_unit: z.ZodEnum<{
                    user: "user";
                    account: "account";
                    billing_unit: "billing_unit";
                    organization: "organization";
                }>;
                clusters: z.ZodArray<z.ZodObject<{
                    n: z.ZodNumber;
                    sum_numerator: z.ZodNumber;
                    sum_denominator: z.ZodNumber;
                    sum_covariate: z.ZodOptional<z.ZodNumber>;
                }, z.core.$strip>>;
            }, z.core.$strip>>;
            statistic_type: z.ZodLiteral<"binary">;
            n: z.ZodNumber;
            successes: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            variant_id: z.ZodString;
            clustered: z.ZodOptional<z.ZodObject<{
                assignment_unit: z.ZodEnum<{
                    user: "user";
                    account: "account";
                    billing_unit: "billing_unit";
                    organization: "organization";
                }>;
                clusters: z.ZodArray<z.ZodObject<{
                    n: z.ZodNumber;
                    sum_numerator: z.ZodNumber;
                    sum_denominator: z.ZodNumber;
                    sum_covariate: z.ZodOptional<z.ZodNumber>;
                }, z.core.$strip>>;
            }, z.core.$strip>>;
            statistic_type: z.ZodLiteral<"ratio">;
            n: z.ZodNumber;
            sum_numerator: z.ZodNumber;
            sum_denominator: z.ZodNumber;
            sum_numerator2: z.ZodNumber;
            sum_denominator2: z.ZodNumber;
            sum_cross: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            variant_id: z.ZodString;
            clustered: z.ZodOptional<z.ZodObject<{
                assignment_unit: z.ZodEnum<{
                    user: "user";
                    account: "account";
                    billing_unit: "billing_unit";
                    organization: "organization";
                }>;
                clusters: z.ZodArray<z.ZodObject<{
                    n: z.ZodNumber;
                    sum_numerator: z.ZodNumber;
                    sum_denominator: z.ZodNumber;
                    sum_covariate: z.ZodOptional<z.ZodNumber>;
                }, z.core.$strip>>;
            }, z.core.$strip>>;
            statistic_type: z.ZodLiteral<"covariance">;
            n: z.ZodNumber;
            sum_x: z.ZodNumber;
            sum_y: z.ZodNumber;
            sum_x2: z.ZodNumber;
            sum_y2: z.ZodNumber;
            sum_xy: z.ZodNumber;
        }, z.core.$strip>], "statistic_type">>;
        observation_window: z.ZodObject<{
            start: z.ZodString;
            end: z.ZodString;
        }, z.core.$strip>;
        covariate: z.ZodOptional<z.ZodObject<{
            metric: z.ZodString;
            observation_window: z.ZodObject<{
                start: z.ZodString;
                end: z.ZodString;
            }, z.core.$strip>;
        }, z.core.$strip>>;
        data_watermark: z.ZodString;
        source_scope: z.ZodEnum<{
            total: "total";
            account_matched: "account_matched";
            revturbine_tracked: "revturbine_tracked";
            revturbine_influenced: "revturbine_influenced";
        }>;
        provider: z.ZodObject<{
            provider_handle: z.ZodString;
            provider_type: z.ZodString;
            provider_version: z.ZodString;
            contract_version: z.ZodNumber;
            generated_at: z.ZodString;
            data_watermark: z.ZodOptional<z.ZodString>;
            source_revision: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>;
    }, z.core.$strip>;
}, z.core.$strip>;
/** Append-only analysis result with enough provenance to reproduce the run. */
declare const ExperimentAnalysisResultRecordSchema: z.ZodObject<{
    id: z.ZodString;
    tenant_id: z.ZodString;
    created_at: z.ZodString;
    experiment_handle: z.ZodString;
    experiment_version: z.ZodNumber;
    metric_semantic_id: z.ZodString;
    metric_catalog_version: z.ZodString;
    endpoint_version: z.ZodString;
    query_hash: z.ZodString;
    evidence_provider_handle: z.ZodString;
    evidence_provider_type: z.ZodString;
    evidence_provider_version: z.ZodString;
    evidence_provider_contract_version: z.ZodNumber;
    summary_schema_version: z.ZodNumber;
    observation_window_start: z.ZodString;
    observation_window_end: z.ZodString;
    data_watermark: z.ZodString;
    evidence_snapshot_id: z.ZodString;
    analysis_provider_handle: z.ZodString;
    analysis_provider_type: z.ZodString;
    analysis_provider_version: z.ZodString;
    analysis_provider_contract_version: z.ZodNumber;
    engine: z.ZodString;
    engine_version: z.ZodString;
    estimator: z.ZodString;
    estimator_version: z.ZodString;
    analysis_config: z.ZodObject<{
        methodology: z.ZodEnum<{
            frequentist: "frequentist";
            bayesian: "bayesian";
        }>;
        analysis_unit: z.ZodEnum<{
            user: "user";
            account: "account";
            billing_unit: "billing_unit";
            organization: "organization";
        }>;
        sequential: z.ZodOptional<z.ZodObject<{
            method: z.ZodLiteral<"always_valid">;
            look_count: z.ZodNumber;
            alpha: z.ZodDefault<z.ZodNumber>;
        }, z.core.$strict>>;
        multiple_comparisons: z.ZodOptional<z.ZodObject<{
            method: z.ZodLiteral<"holm">;
            family_scope: z.ZodLiteral<"primary_and_guardrails_separate">;
        }, z.core.$strip>>;
        variance_reduction: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            method: z.ZodLiteral<"cuped">;
            covariate_metric: z.ZodString;
            lookback_days: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            method: z.ZodLiteral<"regression_adjustment">;
            covariate_metric: z.ZodString;
            lookback_days: z.ZodNumber;
        }, z.core.$strip>], "method">>;
        practical_significance: z.ZodOptional<z.ZodObject<{
            minimum_revenue_effect: z.ZodNumber;
        }, z.core.$strict>>;
    }, z.core.$strip>;
    result: z.ZodObject<{
        schema_version: z.ZodNumber;
        engine: z.ZodString;
        engine_version: z.ZodString;
        methodology: z.ZodString;
        metrics: z.ZodArray<z.ZodObject<{
            metric: z.ZodString;
            control_variant_id: z.ZodString;
            variant_id: z.ZodString;
            estimator: z.ZodString;
            estimator_version: z.ZodString;
            estimate: z.ZodNumber;
            control_estimate: z.ZodNumber;
            absolute_effect: z.ZodNumber;
            relative_effect: z.ZodOptional<z.ZodNumber>;
            standard_error: z.ZodOptional<z.ZodNumber>;
            confidence_interval: z.ZodOptional<z.ZodObject<{
                lower: z.ZodNumber;
                upper: z.ZodNumber;
                level: z.ZodNumber;
            }, z.core.$strip>>;
            p_value: z.ZodOptional<z.ZodNumber>;
            multiple_comparison: z.ZodOptional<z.ZodObject<{
                method: z.ZodLiteral<"holm">;
                family: z.ZodEnum<{
                    primary: "primary";
                    guardrails: "guardrails";
                }>;
                family_size: z.ZodNumber;
                unadjusted_p_value: z.ZodNumber;
            }, z.core.$strip>>;
            probability_positive: z.ZodOptional<z.ZodNumber>;
            expected_loss: z.ZodOptional<z.ZodNumber>;
            sequential: z.ZodOptional<z.ZodObject<{
                method: z.ZodLiteral<"always_valid">;
                status: z.ZodEnum<{
                    continue: "continue";
                    significant_positive: "significant_positive";
                    significant_negative: "significant_negative";
                }>;
                look_count: z.ZodNumber;
                spending_state: z.ZodObject<{
                    alpha: z.ZodNumber;
                    look_alpha: z.ZodNumber;
                    cumulative_alpha_spent: z.ZodNumber;
                    alpha_remaining: z.ZodNumber;
                    unadjusted_p_value: z.ZodOptional<z.ZodNumber>;
                }, z.core.$strip>;
            }, z.core.$strip>>;
            practical_significance: z.ZodOptional<z.ZodObject<{
                minimum_revenue_effect: z.ZodNumber;
                revenue_effect: z.ZodNumber;
                status: z.ZodEnum<{
                    meaningful_positive: "meaningful_positive";
                    meaningful_negative: "meaningful_negative";
                    not_demonstrated: "not_demonstrated";
                }>;
            }, z.core.$strip>>;
            sample_size: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>;
        health: z.ZodObject<{
            status: z.ZodEnum<{
                warning: "warning";
                healthy: "healthy";
                unhealthy: "unhealthy";
                insufficient_data: "insufficient_data";
            }>;
            sample_ratio_mismatch: z.ZodOptional<z.ZodObject<{
                status: z.ZodEnum<{
                    not_evaluated: "not_evaluated";
                    pass: "pass";
                    fail: "fail";
                }>;
                p_value: z.ZodOptional<z.ZodNumber>;
                chi_squared: z.ZodOptional<z.ZodNumber>;
                variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
                    variant_id: z.ZodString;
                    observed_count: z.ZodNumber;
                    expected_count: z.ZodNumber;
                }, z.core.$strip>>>;
                reason: z.ZodOptional<z.ZodString>;
            }, z.core.$strip>>;
            issues: z.ZodDefault<z.ZodArray<z.ZodObject<{
                code: z.ZodString;
                message: z.ZodString;
            }, z.core.$strip>>>;
        }, z.core.$strip>;
        provenance: z.ZodObject<{
            provider: z.ZodObject<{
                provider_handle: z.ZodString;
                provider_type: z.ZodString;
                provider_version: z.ZodString;
                contract_version: z.ZodNumber;
                generated_at: z.ZodString;
                data_watermark: z.ZodOptional<z.ZodString>;
                source_revision: z.ZodOptional<z.ZodString>;
            }, z.core.$strip>;
            evidence: z.ZodArray<z.ZodObject<{
                metric: z.ZodString;
                summary_schema_version: z.ZodNumber;
                data_watermark: z.ZodString;
                provider: z.ZodObject<{
                    provider_handle: z.ZodString;
                    provider_type: z.ZodString;
                    provider_version: z.ZodString;
                    contract_version: z.ZodNumber;
                    generated_at: z.ZodString;
                    data_watermark: z.ZodOptional<z.ZodString>;
                    source_revision: z.ZodOptional<z.ZodString>;
                }, z.core.$strip>;
            }, z.core.$strip>>;
        }, z.core.$strip>;
    }, z.core.$strip>;
}, z.core.$strip>;
/**
 * Declares an experiment to the analysis boundary: variants (exactly one
 * control, at least two arms), observed assignment counts, and metric roles.
 *
 * The executable counterpart is revt_stats' Pydantic
 * `ExperimentAnalysisDefinition` (`revturbine-analysis`
 * `src/revt_stats/models.py`); field names and refinement semantics here
 * mirror that model exactly so the boundary is declared on both sides.
 * (revt_stats types metric ids as bare non-empty strings; this side keeps
 * the canonical `AnalyticsSemanticId` structure they must satisfy.)
 */
declare const ExperimentAnalysisDefinitionSchema: z.ZodObject<{
    experiment_handle: z.ZodString;
    experiment_version: z.ZodNumber;
    variants: z.ZodArray<z.ZodObject<{
        variant_id: z.ZodString;
        weight: z.ZodNumber;
        is_control: z.ZodDefault<z.ZodBoolean>;
    }, z.core.$strip>>;
    assignment_counts: z.ZodDefault<z.ZodArray<z.ZodObject<{
        variant_id: z.ZodString;
        assigned_count: z.ZodNumber;
    }, z.core.$strip>>>;
    analysis_provider: z.ZodObject<{
        provider_handle: z.ZodString;
        provider_type: z.ZodString;
        provider_version: z.ZodString;
        contract_version: z.ZodNumber;
        generated_at: z.ZodString;
        data_watermark: z.ZodOptional<z.ZodString>;
        source_revision: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>;
    assignment_unit: z.ZodOptional<z.ZodEnum<{
        user: "user";
        account: "account";
        billing_unit: "billing_unit";
        organization: "organization";
    }>>;
    primary_metric: z.ZodOptional<z.ZodString>;
    guardrail_metrics: z.ZodDefault<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
/** The business decision an experiment run can reach (war-games spec §6). */
declare const ExperimentDecisionTypeSchema: z.ZodEnum<{
    hold_inconclusive: "hold_inconclusive";
    iterate_followup: "iterate_followup";
    ship_all: "ship_all";
    ship_segment: "ship_segment";
    ramp_with_guardrails: "ramp_with_guardrails";
    reject_harm: "reject_harm";
    neutral_no_material_effect: "neutral_no_material_effect";
    invalid_experiment: "invalid_experiment";
    redesign_randomization: "redesign_randomization";
}>;
/**
 * Closed vocabulary of decision findings (war-games spec §8.3). Additions are
 * additive enum extensions; free-form codes are deliberately unrepresentable.
 * `validity_signal_unavailable` carries the §8.1 fail-closed rule (a validity
 * knob whose input is `not_evaluated` degrades to `hold_inconclusive` with an
 * explicit finding); `followup_required` is the §6 `iterate_followup` finding.
 */
declare const ExperimentDecisionFindingCodeSchema: z.ZodEnum<{
    srm_fail: "srm_fail";
    guardrail_harm: "guardrail_harm";
    exposure_integrity_failure: "exposure_integrity_failure";
    assignment_collision: "assignment_collision";
    immature_observation: "immature_observation";
    carryover_fail: "carryover_fail";
    validity_signal_unavailable: "validity_signal_unavailable";
    followup_required: "followup_required";
}>;
/**
 * Append-only record of one evaluated business decision (war-games spec
 * §8.3), persisted beside the append-only evidence snapshots and analysis
 * result records; re-analysis appends a new record and never mutates history.
 * `decided_at` is supplied by the caller (simulated or real analysis time) —
 * the pure evaluator never reads a wall clock.
 */
declare const ExperimentDecisionRecordSchema: z.ZodObject<{
    id: z.ZodString;
    tenant_id: z.ZodString;
    created_at: z.ZodString;
    experiment_handle: z.ZodString;
    experiment_version: z.ZodNumber;
    decision: z.ZodEnum<{
        hold_inconclusive: "hold_inconclusive";
        iterate_followup: "iterate_followup";
        ship_all: "ship_all";
        ship_segment: "ship_segment";
        ramp_with_guardrails: "ramp_with_guardrails";
        reject_harm: "reject_harm";
        neutral_no_material_effect: "neutral_no_material_effect";
        invalid_experiment: "invalid_experiment";
        redesign_randomization: "redesign_randomization";
    }>;
    selected_variant_keys: z.ZodOptional<z.ZodArray<z.ZodString>>;
    selected_segments: z.ZodOptional<z.ZodArray<z.ZodString>>;
    analysis_result_ids: z.ZodArray<z.ZodString>;
    policy_schema_version: z.ZodNumber;
    health_state: z.ZodString;
    findings: z.ZodArray<z.ZodObject<{
        code: z.ZodEnum<{
            srm_fail: "srm_fail";
            guardrail_harm: "guardrail_harm";
            exposure_integrity_failure: "exposure_integrity_failure";
            assignment_collision: "assignment_collision";
            immature_observation: "immature_observation";
            carryover_fail: "carryover_fail";
            validity_signal_unavailable: "validity_signal_unavailable";
            followup_required: "followup_required";
        }>;
        severity: z.ZodEnum<{
            info: "info";
            warning: "warning";
            blocking: "blocking";
        }>;
        metric: z.ZodOptional<z.ZodString>;
        message: z.ZodString;
    }, z.core.$strip>>;
    decided_at: z.ZodString;
    evaluator: z.ZodObject<{
        name: z.ZodString;
        version: z.ZodString;
    }, z.core.$strip>;
}, z.core.$strip>;
/**
 * Observation maturity (war-games spec §8.5) — computed purely from the
 * observation policy, the experiment version's windows, and the evidence
 * watermark. `eligible_for_decision: false` caps the decision at
 * `hold_inconclusive`, making premature shipping impossible.
 */
declare const ObservationMaturitySchema: z.ZodObject<{
    observed_through: z.ZodString;
    runtime_days: z.ZodNumber;
    complete_windows: z.ZodArray<z.ZodString>;
    incomplete_windows: z.ZodArray<z.ZodString>;
    eligible_for_decision: z.ZodBoolean;
    reasons: z.ZodArray<z.ZodString>;
}, z.core.$strip>;
/**
 * One allocation fact, separated from exposure and treatment delivery.
 * Append-only and idempotent: `assignment_id` is a stable hash of
 * (tenant, experiment_handle, experiment_version, assignment_unit,
 * subject_id), so re-resolution of the same subject collapses in storage.
 * Not-enrolled is absence — no fact exists for an unenrolled subject; there
 * is deliberately no `enrolled` field (assignment spec §4).
 */
declare const ExperimentAssignmentFactSchema: z.ZodObject<{
    schema_version: z.ZodLiteral<1>;
    tenant_id: z.ZodString;
    environment_id: z.ZodString;
    assignment_id: z.ZodString;
    experiment_handle: z.ZodString;
    experiment_version: z.ZodNumber;
    assignment_unit: z.ZodEnum<{
        user: "user";
        account: "account";
        billing_unit: "billing_unit";
        organization: "organization";
    }>;
    subject_id: z.ZodString;
    variant_key: z.ZodString;
    provider: z.ZodObject<{
        provider_handle: z.ZodString;
        provider_type: z.ZodString;
        provider_version: z.ZodString;
        contract_version: z.ZodNumber;
        generated_at: z.ZodString;
        data_watermark: z.ZodOptional<z.ZodString>;
        source_revision: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>;
    assigned_at: z.ZodString;
    playbook_version: z.ZodOptional<z.ZodString>;
    decision_id: z.ZodOptional<z.ZodString>;
    simulation_id: z.ZodOptional<z.ZodString>;
    test: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
/**
 * Compiled, catalog-driven plan for acquiring one metric's evidence — the
 * output of the evidence compiler, which resolves a catalog metric id to a
 * versioned summary endpoint. Statistical type comes from the catalog, never
 * from the caller; compilation fails with `unsupported_metric` rather than
 * producing synthetic evidence.
 */
declare const ExperimentMetricEvidencePlanSchema: z.ZodObject<{
    metric: z.ZodString;
    role: z.ZodEnum<{
        primary: "primary";
        guardrail: "guardrail";
        diagnostic: "diagnostic";
        exploratory: "exploratory";
    }>;
    statistical_type: z.ZodEnum<{
        count: "count";
        ratio: "ratio";
        revenue: "revenue";
        binary: "binary";
        continuous: "continuous";
    }>;
    analysis_unit: z.ZodEnum<{
        user: "user";
        account: "account";
        billing_unit: "billing_unit";
        organization: "organization";
    }>;
    source_scope: z.ZodEnum<{
        total: "total";
        account_matched: "account_matched";
        revturbine_tracked: "revturbine_tracked";
        revturbine_influenced: "revturbine_influenced";
    }>;
    numerator_metric: z.ZodOptional<z.ZodString>;
    denominator_metric: z.ZodOptional<z.ZodString>;
    observation_window: z.ZodObject<{
        start: z.ZodString;
        end: z.ZodString;
    }, z.core.$strip>;
    provider_query: z.ZodObject<{
        endpoint: z.ZodString;
        version: z.ZodNumber;
        parameters: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
    }, z.core.$strip>;
}, z.core.$strip>;
declare const WarGameQualificationLevelSchema: z.ZodEnum<{
    evidence_replay: "evidence_replay";
    event_replay: "event_replay";
    interactive: "interactive";
}>;
declare const WarGameCategorySchema: z.ZodEnum<{
    custom: "custom";
    content: "content";
    retention: "retention";
    trial: "trial";
    activation: "activation";
    pricing: "pricing";
    promotion: "promotion";
    placement: "placement";
    validity: "validity";
    entitlement: "entitlement";
    packaging: "packaging";
    collaboration: "collaboration";
}>;
/**
 * Layered capability declaration (war-games spec §5.4). Assignment units are
 * exactly the four canonical analytical units; a scenario requiring anything
 * else reports `unsupported_scenario_capability` at the runner. `treatments`
 * uses the canonical variant-target kinds; `evidence` uses catalog
 * statistical types; `analysis` / `decisions` / `advanced` name declared
 * capabilities (advanced methods come from §15 only).
 */
declare const WarGameCapabilityRequirementsSchema: z.ZodObject<{
    level: z.ZodEnum<{
        evidence_replay: "evidence_replay";
        event_replay: "event_replay";
        interactive: "interactive";
    }>;
    assignment_units: z.ZodArray<z.ZodEnum<{
        user: "user";
        account: "account";
        billing_unit: "billing_unit";
        organization: "organization";
    }>>;
    treatments: z.ZodArray<z.ZodEnum<{
        custom: "custom";
        plan: "plan";
        pricing: "pricing";
        placement: "placement";
        entitlement: "entitlement";
    }>>;
    evidence: z.ZodArray<z.ZodEnum<{
        count: "count";
        ratio: "ratio";
        revenue: "revenue";
        binary: "binary";
        continuous: "continuous";
    }>>;
    analysis: z.ZodArray<z.ZodString>;
    decisions: z.ZodArray<z.ZodString>;
    advanced: z.ZodArray<z.ZodString>;
}, z.core.$strip>;
/**
 * PUBLIC scenario manifest (war-games spec §5.2) — safe to hand to the system
 * under test. Strict by construction and boundary-separated from
 * {@link WarGameOracleSchema}: oracle truth planes must never be embedded
 * here. `population` / `observation` / `faults` are JSON-plain definitions
 * refined by the war-games runtime (spec §11.2, §12); the schema keeps them
 * opaque so contract and runtime can evolve independently.
 */
declare const WarGameScenarioSchema: z.ZodObject<{
    id: z.ZodString;
    version: z.ZodNumber;
    title: z.ZodString;
    description: z.ZodString;
    category: z.ZodEnum<{
        custom: "custom";
        content: "content";
        retention: "retention";
        trial: "trial";
        activation: "activation";
        pricing: "pricing";
        promotion: "promotion";
        placement: "placement";
        validity: "validity";
        entitlement: "entitlement";
        packaging: "packaging";
        collaboration: "collaboration";
    }>;
    qualification_level: z.ZodEnum<{
        evidence_replay: "evidence_replay";
        event_replay: "event_replay";
        interactive: "interactive";
    }>;
    hypothesis: z.ZodString;
    experiment_handles: z.ZodArray<z.ZodString>;
    population: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
    observation: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
    faults: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
    requires: z.ZodObject<{
        level: z.ZodEnum<{
            evidence_replay: "evidence_replay";
            event_replay: "event_replay";
            interactive: "interactive";
        }>;
        assignment_units: z.ZodArray<z.ZodEnum<{
            user: "user";
            account: "account";
            billing_unit: "billing_unit";
            organization: "organization";
        }>>;
        treatments: z.ZodArray<z.ZodEnum<{
            custom: "custom";
            plan: "plan";
            pricing: "pricing";
            placement: "placement";
            entitlement: "entitlement";
        }>>;
        evidence: z.ZodArray<z.ZodEnum<{
            count: "count";
            ratio: "ratio";
            revenue: "revenue";
            binary: "binary";
            continuous: "continuous";
        }>>;
        analysis: z.ZodArray<z.ZodString>;
        decisions: z.ZodArray<z.ZodString>;
        advanced: z.ZodArray<z.ZodString>;
    }, z.core.$strip>;
    seed: z.ZodString;
    simulation_id: z.ZodString;
}, z.core.$strict>;
/**
 * PRIVATE hidden oracle (war-games spec §5.3) — authored from the seeded
 * world, never generated or refreshed from system output, and never visible
 * to the system under test. Deliberately a separate export from
 * {@link WarGameScenarioSchema}; the two shapes must never be merged.
 * Statistical-truth entries stay JSON-plain until the war-games runtime
 * defines `TreatmentEffectDefinition` (§11.2). The three truth planes are
 * graded independently.
 */
declare const WarGameOracleSchema: z.ZodObject<{
    scenario_id: z.ZodString;
    scenario_version: z.ZodNumber;
    statistical_truth: z.ZodObject<{
        treatment_effects: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
        interactions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
        delayed_effects: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
        contamination: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
        validity_faults: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
    }, z.core.$strip>;
    business_truth: z.ZodObject<{
        expected_decision: z.ZodEnum<{
            hold_inconclusive: "hold_inconclusive";
            iterate_followup: "iterate_followup";
            ship_all: "ship_all";
            ship_segment: "ship_segment";
            ramp_with_guardrails: "ramp_with_guardrails";
            reject_harm: "reject_harm";
            neutral_no_material_effect: "neutral_no_material_effect";
            invalid_experiment: "invalid_experiment";
            redesign_randomization: "redesign_randomization";
        }>;
        acceptable_alternatives: z.ZodOptional<z.ZodArray<z.ZodEnum<{
            hold_inconclusive: "hold_inconclusive";
            iterate_followup: "iterate_followup";
            ship_all: "ship_all";
            ship_segment: "ship_segment";
            ramp_with_guardrails: "ramp_with_guardrails";
            reject_harm: "reject_harm";
            neutral_no_material_effect: "neutral_no_material_effect";
            invalid_experiment: "invalid_experiment";
            redesign_randomization: "redesign_randomization";
        }>>>;
        forbidden_decisions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
            hold_inconclusive: "hold_inconclusive";
            iterate_followup: "iterate_followup";
            ship_all: "ship_all";
            ship_segment: "ship_segment";
            ramp_with_guardrails: "ramp_with_guardrails";
            reject_harm: "reject_harm";
            neutral_no_material_effect: "neutral_no_material_effect";
            invalid_experiment: "invalid_experiment";
            redesign_randomization: "redesign_randomization";
        }>>>;
        required_findings: z.ZodOptional<z.ZodArray<z.ZodEnum<{
            srm_fail: "srm_fail";
            guardrail_harm: "guardrail_harm";
            exposure_integrity_failure: "exposure_integrity_failure";
            assignment_collision: "assignment_collision";
            immature_observation: "immature_observation";
            carryover_fail: "carryover_fail";
            validity_signal_unavailable: "validity_signal_unavailable";
            followup_required: "followup_required";
        }>>>;
        required_segments: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$strip>;
    observability_truth: z.ZodObject<{
        earliest_valid_decision_at: z.ZodOptional<z.ZodString>;
        required_windows: z.ZodOptional<z.ZodArray<z.ZodString>>;
        intentionally_missing_signals: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$strip>;
}, z.core.$strict>;
/**
 * Grade for one scenario run (war-games spec §13.2). Section maxima are the
 * spec's fixed weights; `hard_failure` overrides any score (§13.3).
 */
declare const WarGameGradeSchema: z.ZodObject<{
    scenario_id: z.ZodString;
    passed: z.ZodBoolean;
    hard_failure: z.ZodBoolean;
    score: z.ZodNumber;
    sections: z.ZodObject<{
        validity: z.ZodNumber;
        causal_conclusion: z.ZodNumber;
        business_decision: z.ZodNumber;
        guardrails: z.ZodNumber;
        heterogeneity: z.ZodNumber;
        delayed_outcomes: z.ZodNumber;
        explanation: z.ZodNumber;
    }, z.core.$strip>;
    failures: z.ZodArray<z.ZodString>;
    warnings: z.ZodArray<z.ZodString>;
}, z.core.$strict>;
declare const ExperimentSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    name: z.ZodString;
    handle: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    experiment_type: z.ZodEnum<{
        custom: "custom";
        placement_ab: "placement_ab";
        entitlement_ab: "entitlement_ab";
        plan_ab: "plan_ab";
        pricing_ab: "pricing_ab";
    }>;
    status: z.ZodDefault<z.ZodEnum<{
        complete: "complete";
        paused: "paused";
        neutral: "neutral";
        draft: "draft";
        ramping: "ramping";
        winning: "winning";
        needs_attention: "needs_attention";
    }>>;
    target_resource_id: z.ZodOptional<z.ZodString>;
    target_segments: z.ZodOptional<z.ZodArray<z.ZodString>>;
    variants: z.ZodArray<z.ZodObject<{
        variant_id: z.ZodString;
        name: z.ZodString;
        weight: z.ZodDefault<z.ZodNumber>;
        is_control: z.ZodDefault<z.ZodBoolean>;
        targets: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"placement">;
            placement_handle: z.ZodString;
            placement_payload_handle: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, z.ZodObject<{
            kind: z.ZodLiteral<"entitlement">;
            entitlement_handle: z.ZodString;
            rule_handle: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, z.ZodObject<{
            kind: z.ZodLiteral<"plan">;
            plan_handle: z.ZodString;
            plan_variation_handle: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, z.ZodObject<{
            kind: z.ZodLiteral<"pricing">;
            plan_variation_handle: z.ZodString;
            promotion_handle: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, z.ZodObject<{
            kind: z.ZodLiteral<"custom">;
            provider_payload: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
        }, z.core.$strip>], "kind">>>;
        config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strip>>;
    primary_metric: z.ZodString;
    guardrail_metrics: z.ZodOptional<z.ZodArray<z.ZodString>>;
    assignment_unit: z.ZodOptional<z.ZodEnum<{
        user: "user";
        account: "account";
        billing_unit: "billing_unit";
        organization: "organization";
    }>>;
    assignment_source: z.ZodOptional<z.ZodEnum<{
        native: "native";
        customer_sdk: "customer_sdk";
    }>>;
    assignment_provider_binding: z.ZodOptional<z.ZodObject<{
        provider_handle: z.ZodString;
        capability: z.ZodLiteral<"experiment_assignment">;
        allocation_mode: z.ZodEnum<{
            managed: "managed";
            observed: "observed";
        }>;
    }, z.core.$strip>>;
    evidence_provider_binding: z.ZodOptional<z.ZodObject<{
        provider_handle: z.ZodString;
        capability: z.ZodLiteral<"experiment_evidence">;
    }, z.core.$strip>>;
    analysis_provider_binding: z.ZodOptional<z.ZodObject<{
        provider_handle: z.ZodString;
        capability: z.ZodLiteral<"experiment_analysis">;
    }, z.core.$strip>>;
    analysis_config: z.ZodOptional<z.ZodObject<{
        methodology: z.ZodEnum<{
            frequentist: "frequentist";
            bayesian: "bayesian";
        }>;
        analysis_unit: z.ZodEnum<{
            user: "user";
            account: "account";
            billing_unit: "billing_unit";
            organization: "organization";
        }>;
        sequential: z.ZodOptional<z.ZodObject<{
            method: z.ZodLiteral<"always_valid">;
            look_count: z.ZodNumber;
            alpha: z.ZodDefault<z.ZodNumber>;
        }, z.core.$strict>>;
        multiple_comparisons: z.ZodOptional<z.ZodObject<{
            method: z.ZodLiteral<"holm">;
            family_scope: z.ZodLiteral<"primary_and_guardrails_separate">;
        }, z.core.$strip>>;
        variance_reduction: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
            method: z.ZodLiteral<"cuped">;
            covariate_metric: z.ZodString;
            lookback_days: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            method: z.ZodLiteral<"regression_adjustment">;
            covariate_metric: z.ZodString;
            lookback_days: z.ZodNumber;
        }, z.core.$strip>], "method">>;
        practical_significance: z.ZodOptional<z.ZodObject<{
            minimum_revenue_effect: z.ZodNumber;
        }, z.core.$strict>>;
    }, z.core.$strip>>;
    decision_policy: z.ZodOptional<z.ZodObject<{
        schema_version: z.ZodNumber;
        minimum_runtime: z.ZodOptional<z.ZodObject<{
            days: z.ZodOptional<z.ZodNumber>;
            analysis_units: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>;
        validity: z.ZodObject<{
            fail_on_srm: z.ZodBoolean;
            fail_on_assignment_collision: z.ZodBoolean;
            fail_on_exposure_integrity: z.ZodBoolean;
            fail_on_carryover: z.ZodBoolean;
        }, z.core.$strip>;
        primary_success: z.ZodDiscriminatedUnion<[z.ZodObject<{
            method: z.ZodLiteral<"frequentist">;
            require_statistical_significance: z.ZodBoolean;
            require_practical_significance: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strip>, z.ZodObject<{
            method: z.ZodLiteral<"bayesian">;
            minimum_probability_positive: z.ZodNumber;
            maximum_expected_loss: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>], "method">;
        guardrails: z.ZodObject<{
            require_no_material_harm: z.ZodBoolean;
            allowed_guardrail_failures: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
        }, z.core.$strip>;
        segments: z.ZodObject<{
            allow_segment_decisions: z.ZodBoolean;
            allowed_segments: z.ZodOptional<z.ZodArray<z.ZodString>>;
        }, z.core.$strip>;
        inconclusive: z.ZodObject<{
            action: z.ZodEnum<{
                hold_inconclusive: "hold_inconclusive";
                iterate_followup: "iterate_followup";
            }>;
        }, z.core.$strip>;
    }, z.core.$strip>>;
    metric_threshold: z.ZodDefault<z.ZodNumber>;
    secondary_metrics: z.ZodDefault<z.ZodArray<z.ZodString>>;
    diagnostic_metrics: z.ZodDefault<z.ZodArray<z.ZodString>>;
    traffic_allocation: z.ZodDefault<z.ZodNumber>;
    started_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    ended_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    confidence_threshold: z.ZodDefault<z.ZodNumber>;
    winning_variant_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const SuggestionSeveritySchema: z.ZodEnum<{
    info: "info";
    warning: "warning";
    critical: "critical";
}>;
declare const OptimizationSuggestionSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    experiment_id: z.ZodOptional<z.ZodString>;
    resource_type: z.ZodString;
    resource_id: z.ZodString;
    severity: z.ZodDefault<z.ZodEnum<{
        info: "info";
        warning: "warning";
        critical: "critical";
    }>>;
    title: z.ZodString;
    description: z.ZodString;
    suggested_action: z.ZodOptional<z.ZodString>;
    estimated_impact: z.ZodOptional<z.ZodNumber>;
    detector_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    detector_version: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    opportunity_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    evidence: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
        metric: z.ZodString;
        current: z.ZodNumber;
        baseline: z.ZodOptional<z.ZodNumber>;
        relative_delta: z.ZodOptional<z.ZodNumber>;
        window: z.ZodObject<{
            start: z.ZodString;
            end: z.ZodString;
        }, z.core.$strip>;
        sample_size: z.ZodOptional<z.ZodNumber>;
        source_scope: z.ZodEnum<{
            total: "total";
            account_matched: "account_matched";
            revturbine_tracked: "revturbine_tracked";
            revturbine_influenced: "revturbine_influenced";
        }>;
        interpretation: z.ZodEnum<{
            increase: "increase";
            decrease: "decrease";
            level_shift: "level_shift";
            threshold: "threshold";
            peer_gap: "peer_gap";
            correlation: "correlation";
        }>;
    }, z.core.$strip>>>>;
    hypothesis: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    confidence: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    is_dismissed: z.ZodDefault<z.ZodBoolean>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const experimentPaths: ZodOpenApiPathsObject;

/**
 * Promotion schemas — discount and promotional offer definitions.
 */

declare const PromotionStatusSchema: z.ZodEnum<{
    live: "live";
    expired: "expired";
    draft: "draft";
    archived: "archived";
    scheduled: "scheduled";
}>;
declare const DiscountTypeSchema: z.ZodEnum<{
    percentage: "percentage";
    fixed_amount: "fixed_amount";
    free_months: "free_months";
}>;
declare const PromotionSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    name: z.ZodString;
    handle: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    rt_status: z.ZodDefault<z.ZodEnum<{
        live: "live";
        expired: "expired";
        draft: "draft";
        archived: "archived";
        scheduled: "scheduled";
    }>>;
    discount_type: z.ZodEnum<{
        percentage: "percentage";
        fixed_amount: "fixed_amount";
        free_months: "free_months";
    }>;
    discount_value: z.ZodNumber;
    currency: z.ZodDefault<z.ZodString>;
    applicable_plan_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
    applicable_addon_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
    target_segment_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
    max_redemptions: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    current_redemptions: z.ZodDefault<z.ZodNumber>;
    coupon_code: z.ZodOptional<z.ZodString>;
    starts_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    ends_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    stripe_coupon_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    stripe_promotion_code_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    auto_sync_stripe: z.ZodDefault<z.ZodBoolean>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const promotionPaths: ZodOpenApiPathsObject;

/**
 * Config schemas — application surfaces, seat types, Stripe/metering/enforcement settings,
 * and the RevTurbineConfig snapshot used for SDK initialization.
 */

declare const PLAYBOOK_FORMAT_VERSION: "1.0.0";
declare const SeatTypeSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    name: z.ZodString;
    handle: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    is_default: z.ZodDefault<z.ZodBoolean>;
    is_buyer: z.ZodDefault<z.ZodBoolean>;
    entitlement_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const PersonalizationTokenSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    handle: z.ZodString;
    label: z.ZodString;
    description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    category: z.ZodEnum<{
        custom: "custom";
        billing: "billing";
        plan: "plan";
        user: "user";
        trial: "trial";
        usage: "usage";
        promotion: "promotion";
    }>;
    data_source: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    example_value: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    value_map: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
    format: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
        string: "string";
        number: "number";
        date: "date";
        currency: "currency";
        percentage: "percentage";
    }>>>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const ObjectiveSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    handle: z.ZodString;
    name: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
/**
 * Onboarding funnel state. Tracks where a tenant is in the Stripe Connect
 * onboarding pipeline. Used to gate features and drive re-engagement.
 *
 *   not_started → started → details_submitted → charges_enabled → activated
 *                 ↑ deauthorized (terminal unless re-started)
 */
declare const OnboardingStateSchema: z.ZodEnum<{
    not_started: "not_started";
    started: "started";
    details_submitted: "details_submitted";
    charges_enabled: "charges_enabled";
    activated: "activated";
    deauthorized: "deauthorized";
}>;
declare const StripeIntegrationConfigSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    handle: z.ZodString;
    stripe_account_id: z.ZodString;
    live_mode: z.ZodDefault<z.ZodBoolean>;
    onboarding_state: z.ZodDefault<z.ZodEnum<{
        not_started: "not_started";
        started: "started";
        details_submitted: "details_submitted";
        charges_enabled: "charges_enabled";
        activated: "activated";
        deauthorized: "deauthorized";
    }>>;
    onboarding_complete: z.ZodDefault<z.ZodBoolean>;
    charges_enabled: z.ZodDefault<z.ZodBoolean>;
    details_submitted: z.ZodDefault<z.ZodBoolean>;
    payouts_enabled: z.ZodDefault<z.ZodBoolean>;
    webhook_secret_set: z.ZodDefault<z.ZodBoolean>;
    sync_products: z.ZodDefault<z.ZodBoolean>;
    sync_prices: z.ZodDefault<z.ZodBoolean>;
    sync_subscriptions: z.ZodDefault<z.ZodBoolean>;
    sync_invoices: z.ZodDefault<z.ZodBoolean>;
    default_currency: z.ZodDefault<z.ZodString>;
    tax_behavior: z.ZodDefault<z.ZodEnum<{
        inclusive: "inclusive";
        exclusive: "exclusive";
        unspecified: "unspecified";
    }>>;
    last_sync_at: z.ZodOptional<z.ZodString>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const BrandingConfigSchema: z.ZodObject<{
    theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    workspace_name: z.ZodOptional<z.ZodString>;
    logo_url: z.ZodOptional<z.ZodString>;
    support_email: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const MeteringConfigSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    handle: z.ZodString;
    entitlement_id: z.ZodString;
    meter_key: z.ZodString;
    aggregation_type: z.ZodDefault<z.ZodEnum<{
        count: "count";
        max: "max";
        sum: "sum";
        last_value: "last_value";
    }>>;
    reset_period: z.ZodDefault<z.ZodEnum<{
        monthly: "monthly";
        yearly: "yearly";
        weekly: "weekly";
        none: "none";
        daily: "daily";
    }>>;
    stripe_meter_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_active: z.ZodDefault<z.ZodBoolean>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const EnforcementActionSchema: z.ZodEnum<{
    custom: "custom";
    block: "block";
    warn: "warn";
    downgrade: "downgrade";
    throttle: "throttle";
    notify_admin: "notify_admin";
}>;
declare const UsageEnforcementSettingsSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    handle: z.ZodString;
    entitlement_id: z.ZodString;
    soft_limit_percent: z.ZodDefault<z.ZodNumber>;
    hard_limit_percent: z.ZodDefault<z.ZodNumber>;
    soft_limit_action: z.ZodDefault<z.ZodEnum<{
        custom: "custom";
        block: "block";
        warn: "warn";
        downgrade: "downgrade";
        throttle: "throttle";
        notify_admin: "notify_admin";
    }>>;
    hard_limit_action: z.ZodDefault<z.ZodEnum<{
        custom: "custom";
        block: "block";
        warn: "warn";
        downgrade: "downgrade";
        throttle: "throttle";
        notify_admin: "notify_admin";
    }>>;
    grace_period_hours: z.ZodDefault<z.ZodNumber>;
    notification_channels: z.ZodDefault<z.ZodArray<z.ZodEnum<{
        email: "email";
        webhook: "webhook";
        in_app: "in_app";
    }>>>;
    is_active: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
declare const PlacementSettingsCapRuleGroupItemSchema: z.ZodObject<{
    kind: z.ZodEnum<{
        template: "template";
        slot: "slot";
    }>;
    id: z.ZodString;
    label: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const PlacementSettingsCapRuleSchema: z.ZodObject<{
    id: z.ZodString;
    group: z.ZodArray<z.ZodObject<{
        kind: z.ZodEnum<{
            template: "template";
            slot: "slot";
        }>;
        id: z.ZodString;
        label: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    cap: z.ZodObject<{
        count: z.ZodNumber;
        period: z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            session: "session";
        }>;
    }, z.core.$strip>;
}, z.core.$strip>;
declare const PlacementTestModeSchema: z.ZodEnum<{
    off: "off";
    test_users: "test_users";
    all_traffic: "all_traffic";
}>;
declare const PlacementSettingsCapStateSchema: z.ZodObject<{
    capRules: z.ZodDefault<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        group: z.ZodArray<z.ZodObject<{
            kind: z.ZodEnum<{
                template: "template";
                slot: "slot";
            }>;
            id: z.ZodString;
            label: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        cap: z.ZodObject<{
            count: z.ZodNumber;
            period: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                session: "session";
            }>;
        }, z.core.$strip>;
    }, z.core.$strip>>>;
    sessionCooldownMinutes: z.ZodDefault<z.ZodNumber>;
    remindLaterMinutes: z.ZodDefault<z.ZodNumber>;
    testMode: z.ZodDefault<z.ZodEnum<{
        off: "off";
        test_users: "test_users";
        all_traffic: "all_traffic";
    }>>;
}, z.core.$strip>;
declare const PlacementSettingsSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    anchor_id: z.ZodString;
    handle: z.ZodString;
    global_frequency_cap: z.ZodDefault<z.ZodNullable<z.ZodObject<{
        capRules: z.ZodDefault<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            group: z.ZodArray<z.ZodObject<{
                kind: z.ZodEnum<{
                    template: "template";
                    slot: "slot";
                }>;
                id: z.ZodString;
                label: z.ZodOptional<z.ZodString>;
            }, z.core.$strip>>;
            cap: z.ZodObject<{
                count: z.ZodNumber;
                period: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    session: "session";
                }>;
            }, z.core.$strip>;
        }, z.core.$strip>>>;
        sessionCooldownMinutes: z.ZodDefault<z.ZodNumber>;
        remindLaterMinutes: z.ZodDefault<z.ZodNumber>;
        testMode: z.ZodDefault<z.ZodEnum<{
            off: "off";
            test_users: "test_users";
            all_traffic: "all_traffic";
        }>>;
    }, z.core.$strip>>>;
    global_frequency_cap_period: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        hour: "hour";
        session: "session";
    }>>>;
    suppress_for_paid: z.ZodDefault<z.ZodBoolean>;
    suppress_for_trial: z.ZodDefault<z.ZodBoolean>;
    allow_stacking: z.ZodDefault<z.ZodBoolean>;
    priority_collision_strategy: z.ZodDefault<z.ZodEnum<{
        highest_priority: "highest_priority";
        most_recent: "most_recent";
        random: "random";
    }>>;
}, z.core.$strip>;
declare const RevTurbineConfigSegmentsItemPredicatesItemSchema: z.ZodObject<{
    field: z.ZodString;
    operator: z.ZodEnum<{
        in: "in";
        eq: "eq";
        neq: "neq";
        gte: "gte";
        lte: "lte";
        contains: "contains";
        gt: "gt";
        lt: "lt";
    }>;
    value: z.ZodString;
}, z.core.$strip>;
declare const RevTurbineConfigSegmentsItemSchema: z.ZodObject<{
    name: z.ZodString;
    handle: z.ZodString;
    predicates: z.ZodOptional<z.ZodArray<z.ZodObject<{
        field: z.ZodString;
        operator: z.ZodEnum<{
            in: "in";
            eq: "eq";
            neq: "neq";
            gte: "gte";
            lte: "lte";
            contains: "contains";
            gt: "gt";
            lt: "lt";
        }>;
        value: z.ZodString;
    }, z.core.$strip>>>;
    dimension_id: z.ZodOptional<z.ZodString>;
    experiment_handle: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const RevTurbineConfigPlansItemSchema: z.ZodObject<{
    unique_handle: z.ZodString;
    name: z.ZodString;
    tier_position: z.ZodDefault<z.ZodNumber>;
    sort_order: z.ZodDefault<z.ZodNumber>;
    visibility: z.ZodDefault<z.ZodEnum<{
        legacy: "legacy";
        public: "public";
        unlisted: "unlisted";
    }>>;
}, z.core.$strip>;
declare const RevTurbineConfigAddonsItemSchema: z.ZodObject<{
    unique_handle: z.ZodString;
    name: z.ZodString;
    sort_order: z.ZodDefault<z.ZodNumber>;
    visibility: z.ZodDefault<z.ZodEnum<{
        legacy: "legacy";
        public: "public";
        unlisted: "unlisted";
    }>>;
}, z.core.$strip>;
declare const RevTurbineConfigPlanVariationsItemSchema: z.ZodObject<{
    handle: z.ZodString;
    plan_handle: z.ZodString;
    billing_period: z.ZodEnum<{
        custom: "custom";
        monthly: "monthly";
        annual: "annual";
        one_time: "one_time";
    }>;
    segment_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    price_amount: z.ZodNumber;
    currency: z.ZodDefault<z.ZodString>;
    pricing_model: z.ZodEnum<{
        flat: "flat";
        per_unit: "per_unit";
        tiered: "tiered";
        metered: "metered";
    }>;
    visibility: z.ZodDefault<z.ZodEnum<{
        legacy: "legacy";
        public: "public";
        unlisted: "unlisted";
    }>>;
    stripe_price_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    price_source: z.ZodEnum<{
        stripe: "stripe";
        static: "static";
        clerk: "clerk";
    }>;
}, z.core.$strip>;
declare const RevTurbineConfigAddonVariationsItemSchema: z.ZodObject<{
    handle: z.ZodString;
    addon_handle: z.ZodString;
    billing_period: z.ZodEnum<{
        custom: "custom";
        monthly: "monthly";
        annual: "annual";
        one_time: "one_time";
    }>;
    segment_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    price_amount: z.ZodNumber;
    currency: z.ZodDefault<z.ZodString>;
    pricing_model: z.ZodEnum<{
        flat: "flat";
        per_unit: "per_unit";
        tiered: "tiered";
        metered: "metered";
    }>;
    visibility: z.ZodDefault<z.ZodEnum<{
        legacy: "legacy";
        public: "public";
        unlisted: "unlisted";
    }>>;
    stripe_price_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    price_source: z.ZodEnum<{
        stripe: "stripe";
        static: "static";
    }>;
}, z.core.$strip>;
/** Seat-type registry projection (authored + Bundle-projected). */
declare const RevTurbineConfigSeatTypesItemSchema: z.ZodObject<{
    handle: z.ZodString;
    name: z.ZodString;
    description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_default: z.ZodDefault<z.ZodBoolean>;
    is_buyer: z.ZodDefault<z.ZodBoolean>;
    entitlement_handles: z.ZodDefault<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
/** Global usage-enforcement defaults projection (strategy). */
declare const RevTurbineConfigEnforcementDefaultsItemSchema: z.ZodObject<{
    handle: z.ZodString;
    entitlement_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    soft_limit_percent: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    hard_limit_percent: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    soft_limit_action: z.ZodString;
    hard_limit_action: z.ZodString;
    grace_period_hours: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    notification_channels: z.ZodDefault<z.ZodArray<z.ZodString>>;
    is_active: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
/** Global placement settings projection (strategy).
 *
 * `global_frequency_cap` carries the same structured cap-state as the authored
 * `PlacementSettingsSchema` and the `placement_settings.global_frequency_cap`
 * JSONB column (plan 118 reconciliation) — a scalar could not represent the
 * `capRules[]` the SDK needs to evaluate frequency, so the projection and the
 * persistence table now agree on the shape. `global_frequency_cap_period` uses
 * the same enum as the authored schema. */
declare const RevTurbineConfigPlacementSettingsItemSchema: z.ZodObject<{
    handle: z.ZodString;
    global_frequency_cap: z.ZodDefault<z.ZodNullable<z.ZodObject<{
        capRules: z.ZodDefault<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            group: z.ZodArray<z.ZodObject<{
                kind: z.ZodEnum<{
                    template: "template";
                    slot: "slot";
                }>;
                id: z.ZodString;
                label: z.ZodOptional<z.ZodString>;
            }, z.core.$strip>>;
            cap: z.ZodObject<{
                count: z.ZodNumber;
                period: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    session: "session";
                }>;
            }, z.core.$strip>;
        }, z.core.$strip>>>;
        sessionCooldownMinutes: z.ZodDefault<z.ZodNumber>;
        remindLaterMinutes: z.ZodDefault<z.ZodNumber>;
        testMode: z.ZodDefault<z.ZodEnum<{
            off: "off";
            test_users: "test_users";
            all_traffic: "all_traffic";
        }>>;
    }, z.core.$strip>>>;
    global_frequency_cap_period: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        hour: "hour";
        session: "session";
    }>>>;
    suppress_for_paid: z.ZodDefault<z.ZodBoolean>;
    suppress_for_trial: z.ZodDefault<z.ZodBoolean>;
    allow_stacking: z.ZodDefault<z.ZodBoolean>;
    priority_collision_strategy: z.ZodDefault<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
/** Bespoke segment-dimension projection. */
declare const RevTurbineConfigSegmentDimensionsItemSchema: z.ZodObject<{
    handle: z.ZodString;
    name: z.ZodString;
    category: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    visibility_toggle: z.ZodDefault<z.ZodBoolean>;
    source_type: z.ZodDefault<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
declare const RevTurbineConfigMeterBindingsItemSchema: z.ZodObject<{
    handle: z.ZodString;
    entitlement_handle: z.ZodString;
    meter_handle: z.ZodString;
    limit: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    reset_period: z.ZodDefault<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
declare const RevTurbineConfigEntitlementsItemSchema: z.ZodObject<{
    unique_handle: z.ZodString;
    name: z.ZodString;
    type: z.ZodEnum<{
        feature: "feature";
        capability_tier: "capability_tier";
        usage_limit: "usage_limit";
        price_per_unit: "price_per_unit";
        rate_limit: "rate_limit";
        credits: "credits";
        seat: "seat";
    }>;
    unit: z.ZodOptional<z.ZodString>;
    tier_definitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        handle: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
}, z.core.$strip>;
declare const RevTurbineConfigEntitlementRulesItemSchema: z.ZodObject<{
    current_usage: z.ZodDefault<z.ZodNumber>;
    allocation: z.ZodOptional<z.ZodEnum<{
        per_instance: "per_instance";
        account_pool: "account_pool";
        per_user: "per_user";
        per_user_pooled: "per_user_pooled";
    }>>;
    objective: z.ZodOptional<z.ZodString>;
    enabled: z.ZodOptional<z.ZodBoolean>;
    currency: z.ZodOptional<z.ZodString>;
    enforcement: z.ZodOptional<z.ZodEnum<{
        hard_block: "hard_block";
        block_with_upsell: "block_with_upsell";
        degrade: "degrade";
        allow_overage: "allow_overage";
    }>>;
    seat_type_id: z.ZodOptional<z.ZodString>;
    period_scope: z.ZodOptional<z.ZodEnum<{
        per_month: "per_month";
        per_year: "per_year";
        per_billing_period: "per_billing_period";
        lifetime: "lifetime";
        concurrent: "concurrent";
        per_instance: "per_instance";
        per_second: "per_second";
        per_minute: "per_minute";
        per_hour: "per_hour";
        per_6_hours: "per_6_hours";
        per_day: "per_day";
        per_week: "per_week";
    }>>;
    reset_period: z.ZodOptional<z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        year: "year";
        quarter: "quarter";
        billing_period: "billing_period";
        hour: "hour";
        six_hours: "six_hours";
    }>>;
    limit_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
    tier_value: z.ZodOptional<z.ZodString>;
    rate_value: z.ZodOptional<z.ZodNumber>;
    initial_grant: z.ZodOptional<z.ZodNumber>;
    allowance_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
    rollover_enabled: z.ZodOptional<z.ZodBoolean>;
    max_balance: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>>;
    included_count: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
    max_seats: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>>;
    amount_cents: z.ZodOptional<z.ZodNumber>;
    id: z.ZodString;
    entitlement_id: z.ZodString;
    targets: z.ZodArray<z.ZodObject<{
        kind: z.ZodEnum<{
            plan: "plan";
            addon: "addon";
            plan_variation: "plan_variation";
            addon_variation: "addon_variation";
        }>;
        id: z.ZodString;
    }, z.core.$strip>>;
    segment_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
    kind: z.ZodOptional<z.ZodEnum<{
        feature: "feature";
        capability_tier: "capability_tier";
        usage_limit: "usage_limit";
        price_per_unit: "price_per_unit";
        rate_limit: "rate_limit";
        credits: "credits";
        seat: "seat";
    }>>;
    unit: z.ZodOptional<z.ZodString>;
    tier_name: z.ZodOptional<z.ZodString>;
    tier_description: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const RevTurbineConfigSlotConfigsItemSchema: z.ZodObject<{
    slot_id: z.ZodString;
    active: z.ZodBoolean;
    triggers: z.ZodArray<z.ZodString>;
}, z.core.$strip>;
declare const RevTurbineConfigPlacementSlotsItemSchema: z.ZodObject<{
    id: z.ZodString;
    label: z.ZodString;
    description: z.ZodString;
    surface_type: z.ZodString;
    placement_handle: z.ZodString;
    template: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const RevTurbineConfigSurfaceTemplatesItemFieldsItemSchema: z.ZodObject<{
    name: z.ZodString;
    type: z.ZodOptional<z.ZodString>;
    required: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
declare const RevTurbineConfigSurfaceTemplatesItemSchema: z.ZodObject<{
    id: z.ZodString;
    surface_type: z.ZodString;
    fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        type: z.ZodOptional<z.ZodString>;
        required: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strip>>>;
}, z.core.$strip>;
declare const RevTurbineConfigUiPathActionTypeSchema: z.ZodEnum<{
    book_demo: "book_demo";
    contact_sales: "contact_sales";
    complete_onboarding: "complete_onboarding";
    invite_teammate: "invite_teammate";
    refer_friend: "refer_friend";
    verify_work_email: "verify_work_email";
    update_payment_method: "update_payment_method";
    enable_auto_renewal: "enable_auto_renewal";
    manage_subscription: "manage_subscription";
    switch_billing_period: "switch_billing_period";
    extend_trial: "extend_trial";
    dismiss: "dismiss";
    snooze: "snooze";
    open_checkout_modal: "open_checkout_modal";
    navigate_to_plans: "navigate_to_plans";
    open_upgrade_modal: "open_upgrade_modal";
    open_placement: "open_placement";
    open_feature_tour: "open_feature_tour";
    custom_url: "custom_url";
}>;
declare const ContentUiPathSchema: z.ZodObject<{
    name: z.ZodString;
    action_type: z.ZodEnum<{
        book_demo: "book_demo";
        contact_sales: "contact_sales";
        complete_onboarding: "complete_onboarding";
        invite_teammate: "invite_teammate";
        refer_friend: "refer_friend";
        verify_work_email: "verify_work_email";
        update_payment_method: "update_payment_method";
        enable_auto_renewal: "enable_auto_renewal";
        manage_subscription: "manage_subscription";
        switch_billing_period: "switch_billing_period";
        extend_trial: "extend_trial";
        dismiss: "dismiss";
        snooze: "snooze";
        open_checkout_modal: "open_checkout_modal";
        navigate_to_plans: "navigate_to_plans";
        open_upgrade_modal: "open_upgrade_modal";
        open_placement: "open_placement";
        open_feature_tour: "open_feature_tour";
        custom_url: "custom_url";
    }>;
    plan_handle: z.ZodOptional<z.ZodString>;
    promotion_id: z.ZodOptional<z.ZodString>;
    placement_handle: z.ZodOptional<z.ZodString>;
    url: z.ZodOptional<z.ZodString>;
    tour_id: z.ZodOptional<z.ZodString>;
    target_billing_period: z.ZodOptional<z.ZodEnum<{
        monthly: "monthly";
        annual: "annual";
    }>>;
    description: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const ContentPromotionSchema: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    discount: z.ZodString;
    type: z.ZodString;
    status: z.ZodString;
}, z.core.$strip>;
declare const RevTurbineConfigPersonalizationTokensItemSchema: z.ZodObject<{
    token: z.ZodString;
    label: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    category: z.ZodEnum<{
        custom: "custom";
        billing: "billing";
        plan: "plan";
        user: "user";
        trial: "trial";
        usage: "usage";
        promotion: "promotion";
    }>;
    data_source: z.ZodOptional<z.ZodString>;
    example_value: z.ZodOptional<z.ZodString>;
    value_map: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    format: z.ZodOptional<z.ZodEnum<{
        string: "string";
        number: "number";
        date: "date";
        currency: "currency";
        percentage: "percentage";
    }>>;
}, z.core.$strip>;
declare const RevTurbineConfigObjectivesItemSchema: z.ZodObject<{
    handle: z.ZodString;
    name: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const MessageBlockContentSchema: z.ZodObject<{
    header: z.ZodOptional<z.ZodString>;
    body: z.ZodOptional<z.ZodString>;
    cta_label: z.ZodOptional<z.ZodString>;
    secondary_cta_label: z.ZodOptional<z.ZodString>;
}, z.core.$catchall<z.ZodUnknown>>;
declare const MessageBlockSchema: z.ZodObject<{
    block_id: z.ZodString;
    tenant_id: z.ZodString;
    name: z.ZodString;
    surface_template_id: z.ZodOptional<z.ZodString>;
    default_content: z.ZodObject<{
        header: z.ZodOptional<z.ZodString>;
        body: z.ZodOptional<z.ZodString>;
        cta_label: z.ZodOptional<z.ZodString>;
        secondary_cta_label: z.ZodOptional<z.ZodString>;
    }, z.core.$catchall<z.ZodUnknown>>;
    segment_overrides: z.ZodOptional<z.ZodArray<z.ZodObject<{
        segment_value_id: z.ZodString;
        content: z.ZodObject<{
            header: z.ZodOptional<z.ZodString>;
            body: z.ZodOptional<z.ZodString>;
            cta_label: z.ZodOptional<z.ZodString>;
            secondary_cta_label: z.ZodOptional<z.ZodString>;
        }, z.core.$catchall<z.ZodUnknown>>;
    }, z.core.$strip>>>;
    child_blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
        slot: z.ZodString;
        block_id: z.ZodString;
    }, z.core.$strip>>>;
    tokens_used: z.ZodOptional<z.ZodArray<z.ZodString>>;
    status: z.ZodEnum<{
        active: "active";
        draft: "draft";
        archived: "archived";
    }>;
    created_at: z.ZodString;
    updated_at: z.ZodString;
}, z.core.$strip>;
declare const RevTurbineConfigStudioCtaConfigSchema: z.ZodObject<{
    label: z.ZodString;
    path: z.ZodEnum<{
        custom: "custom";
        open_checkout: "open_checkout";
        view_plans: "view_plans";
        book_demo: "book_demo";
        contact_sales: "contact_sales";
        complete_onboarding: "complete_onboarding";
        invite_teammate: "invite_teammate";
        refer_friend: "refer_friend";
        verify_work_email: "verify_work_email";
        update_payment_method: "update_payment_method";
        enable_auto_renewal: "enable_auto_renewal";
        manage_subscription: "manage_subscription";
        switch_billing_period: "switch_billing_period";
        extend_trial: "extend_trial";
        open_rt_placement: "open_rt_placement";
        dismiss: "dismiss";
        snooze: "snooze";
    }>;
    config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>;
declare const RevTurbineConfigStudioPayloadSurfaceSchema: z.ZodObject<{
    template_id: z.ZodString;
    fields: z.ZodRecord<z.ZodString, z.ZodString>;
    ctas: z.ZodArray<z.ZodObject<{
        label: z.ZodString;
        path: z.ZodEnum<{
            custom: "custom";
            open_checkout: "open_checkout";
            view_plans: "view_plans";
            book_demo: "book_demo";
            contact_sales: "contact_sales";
            complete_onboarding: "complete_onboarding";
            invite_teammate: "invite_teammate";
            refer_friend: "refer_friend";
            verify_work_email: "verify_work_email";
            update_payment_method: "update_payment_method";
            enable_auto_renewal: "enable_auto_renewal";
            manage_subscription: "manage_subscription";
            switch_billing_period: "switch_billing_period";
            extend_trial: "extend_trial";
            open_rt_placement: "open_rt_placement";
            dismiss: "dismiss";
            snooze: "snooze";
        }>;
        config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    }, z.core.$strip>>;
}, z.core.$strip>;
declare const RevTurbineConfigStudioPayloadTargetSchema: z.ZodObject<{
    plan_ids: z.ZodArray<z.ZodString>;
    billing_cadences: z.ZodOptional<z.ZodArray<z.ZodString>>;
    segment_chips: z.ZodArray<z.ZodString>;
}, z.core.$strip>;
declare const RevTurbineConfigPeriodCapSchema: z.ZodObject<{
    count: z.ZodNumber;
    period: z.ZodEnum<{
        day: "day";
        week: "week";
        month: "month";
        lifetime: "lifetime";
        session: "session";
    }>;
}, z.core.$strip>;
declare const RevTurbineConfigStudioPayloadCapsSchema: z.ZodObject<{
    max_per_period: z.ZodOptional<z.ZodObject<{
        count: z.ZodNumber;
        period: z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            lifetime: "lifetime";
            session: "session";
        }>;
    }, z.core.$strip>>;
    cooldown_days: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
declare const RevTurbineConfigStudioPayloadSchema: z.ZodObject<{
    id: z.ZodString;
    target: z.ZodObject<{
        plan_ids: z.ZodArray<z.ZodString>;
        billing_cadences: z.ZodOptional<z.ZodArray<z.ZodString>>;
        segment_chips: z.ZodArray<z.ZodString>;
    }, z.core.$strip>;
    surfaces: z.ZodArray<z.ZodObject<{
        template_id: z.ZodString;
        fields: z.ZodRecord<z.ZodString, z.ZodString>;
        ctas: z.ZodArray<z.ZodObject<{
            label: z.ZodString;
            path: z.ZodEnum<{
                custom: "custom";
                open_checkout: "open_checkout";
                view_plans: "view_plans";
                book_demo: "book_demo";
                contact_sales: "contact_sales";
                complete_onboarding: "complete_onboarding";
                invite_teammate: "invite_teammate";
                refer_friend: "refer_friend";
                verify_work_email: "verify_work_email";
                update_payment_method: "update_payment_method";
                enable_auto_renewal: "enable_auto_renewal";
                manage_subscription: "manage_subscription";
                switch_billing_period: "switch_billing_period";
                extend_trial: "extend_trial";
                open_rt_placement: "open_rt_placement";
                dismiss: "dismiss";
                snooze: "snooze";
            }>;
            config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        }, z.core.$strip>>;
    }, z.core.$strip>>;
    caps: z.ZodOptional<z.ZodObject<{
        max_per_period: z.ZodOptional<z.ZodObject<{
            count: z.ZodNumber;
            period: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                lifetime: "lifetime";
                session: "session";
            }>;
        }, z.core.$strip>>;
        cooldown_days: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
    surface_slot_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
    remind_later_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    created_at: z.ZodOptional<z.ZodString>;
    recommendation_strategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
        custom: "custom";
        next_tier_up: "next_tier_up";
        best_value: "best_value";
    }>>>;
    recommendation_plan_override: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const RevTurbineConfigPlacementTriggerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    type: z.ZodLiteral<"surface_render">;
    slot_id: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    type: z.ZodLiteral<"entitlement_gate">;
    entitlement_handle: z.ZodString;
    tier_threshold: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
    type: z.ZodLiteral<"usage_threshold">;
    entitlement_handle: z.ZodString;
    threshold_percent: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
    type: z.ZodLiteral<"credit_threshold">;
    entitlement_handle: z.ZodString;
    threshold_percent: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
    type: z.ZodLiteral<"seat_threshold">;
    entitlement_handle: z.ZodString;
    threshold_percent: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
    type: z.ZodLiteral<"trial_started">;
    trial_type: z.ZodOptional<z.ZodEnum<{
        reverse: "reverse";
        free: "free";
    }>>;
}, z.core.$strip>, z.ZodObject<{
    type: z.ZodLiteral<"trial_progress">;
    progress_percent: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
    type: z.ZodLiteral<"trial_ending">;
    days_before_end: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
    type: z.ZodLiteral<"trial_ended">;
}, z.core.$strip>, z.ZodObject<{
    type: z.ZodLiteral<"trial_converted">;
}, z.core.$strip>, z.ZodObject<{
    type: z.ZodLiteral<"qualifier">;
    qualifier: z.ZodString;
}, z.core.$strip>], "type">;
declare const RevTurbineConfigPlacementCategorySchema: z.ZodEnum<{
    fixed: "fixed";
    other_conversion: "other_conversion";
    retention: "retention";
    gated: "gated";
    usage_credit_seat: "usage_credit_seat";
    trials: "trials";
}>;
declare const RevTurbineConfigPlacementItemSchema: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    category: z.ZodEnum<{
        fixed: "fixed";
        other_conversion: "other_conversion";
        retention: "retention";
        gated: "gated";
        usage_credit_seat: "usage_credit_seat";
        trials: "trials";
    }>;
    trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
        type: z.ZodLiteral<"surface_render">;
        slot_id: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        type: z.ZodLiteral<"entitlement_gate">;
        entitlement_handle: z.ZodString;
        tier_threshold: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        type: z.ZodLiteral<"usage_threshold">;
        entitlement_handle: z.ZodString;
        threshold_percent: z.ZodNumber;
    }, z.core.$strip>, z.ZodObject<{
        type: z.ZodLiteral<"credit_threshold">;
        entitlement_handle: z.ZodString;
        threshold_percent: z.ZodNumber;
    }, z.core.$strip>, z.ZodObject<{
        type: z.ZodLiteral<"seat_threshold">;
        entitlement_handle: z.ZodString;
        threshold_percent: z.ZodNumber;
    }, z.core.$strip>, z.ZodObject<{
        type: z.ZodLiteral<"trial_started">;
        trial_type: z.ZodOptional<z.ZodEnum<{
            reverse: "reverse";
            free: "free";
        }>>;
    }, z.core.$strip>, z.ZodObject<{
        type: z.ZodLiteral<"trial_progress">;
        progress_percent: z.ZodNumber;
    }, z.core.$strip>, z.ZodObject<{
        type: z.ZodLiteral<"trial_ending">;
        days_before_end: z.ZodNumber;
    }, z.core.$strip>, z.ZodObject<{
        type: z.ZodLiteral<"trial_ended">;
    }, z.core.$strip>, z.ZodObject<{
        type: z.ZodLiteral<"trial_converted">;
    }, z.core.$strip>, z.ZodObject<{
        type: z.ZodLiteral<"qualifier">;
        qualifier: z.ZodString;
    }, z.core.$strip>], "type">;
    payloads: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        target: z.ZodObject<{
            plan_ids: z.ZodArray<z.ZodString>;
            billing_cadences: z.ZodOptional<z.ZodArray<z.ZodString>>;
            segment_chips: z.ZodArray<z.ZodString>;
        }, z.core.$strip>;
        surfaces: z.ZodArray<z.ZodObject<{
            template_id: z.ZodString;
            fields: z.ZodRecord<z.ZodString, z.ZodString>;
            ctas: z.ZodArray<z.ZodObject<{
                label: z.ZodString;
                path: z.ZodEnum<{
                    custom: "custom";
                    open_checkout: "open_checkout";
                    view_plans: "view_plans";
                    book_demo: "book_demo";
                    contact_sales: "contact_sales";
                    complete_onboarding: "complete_onboarding";
                    invite_teammate: "invite_teammate";
                    refer_friend: "refer_friend";
                    verify_work_email: "verify_work_email";
                    update_payment_method: "update_payment_method";
                    enable_auto_renewal: "enable_auto_renewal";
                    manage_subscription: "manage_subscription";
                    switch_billing_period: "switch_billing_period";
                    extend_trial: "extend_trial";
                    open_rt_placement: "open_rt_placement";
                    dismiss: "dismiss";
                    snooze: "snooze";
                }>;
                config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            }, z.core.$strip>>;
        }, z.core.$strip>>;
        caps: z.ZodOptional<z.ZodObject<{
            max_per_period: z.ZodOptional<z.ZodObject<{
                count: z.ZodNumber;
                period: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    lifetime: "lifetime";
                    session: "session";
                }>;
            }, z.core.$strip>>;
            cooldown_days: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>;
        surface_slot_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
        remind_later_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        created_at: z.ZodOptional<z.ZodString>;
        recommendation_strategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
            custom: "custom";
            next_tier_up: "next_tier_up";
            best_value: "best_value";
        }>>>;
        recommendation_plan_override: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    order: z.ZodNumber;
    objective: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const RevTurbineConfigPlacementPayloadItemSchema: z.ZodObject<{
    payload_id: z.ZodString;
    placement_id: z.ZodString;
    target: z.ZodObject<{
        plan_ids: z.ZodArray<z.ZodString>;
        billing_cadences: z.ZodOptional<z.ZodArray<z.ZodString>>;
        segment_chips: z.ZodArray<z.ZodString>;
    }, z.core.$strip>;
    caps: z.ZodOptional<z.ZodObject<{
        max_per_period: z.ZodOptional<z.ZodObject<{
            count: z.ZodNumber;
            period: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                lifetime: "lifetime";
                session: "session";
            }>;
        }, z.core.$strip>>;
        cooldown_days: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
    remind_later_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    created_at: z.ZodString;
    updated_at: z.ZodOptional<z.ZodString>;
    source_mode: z.ZodEnum<{
        inline: "inline";
        content_linked: "content_linked";
    }>;
    surfaces: z.ZodOptional<z.ZodArray<z.ZodObject<{
        template_id: z.ZodString;
        fields: z.ZodRecord<z.ZodString, z.ZodString>;
        ctas: z.ZodArray<z.ZodObject<{
            label: z.ZodString;
            path: z.ZodEnum<{
                custom: "custom";
                open_checkout: "open_checkout";
                view_plans: "view_plans";
                book_demo: "book_demo";
                contact_sales: "contact_sales";
                complete_onboarding: "complete_onboarding";
                invite_teammate: "invite_teammate";
                refer_friend: "refer_friend";
                verify_work_email: "verify_work_email";
                update_payment_method: "update_payment_method";
                enable_auto_renewal: "enable_auto_renewal";
                manage_subscription: "manage_subscription";
                switch_billing_period: "switch_billing_period";
                extend_trial: "extend_trial";
                open_rt_placement: "open_rt_placement";
                dismiss: "dismiss";
                snooze: "snooze";
            }>;
            config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        }, z.core.$strip>>;
    }, z.core.$strip>>>;
    surface_slot_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
    content_link: z.ZodOptional<z.ZodObject<{
        message_block_id: z.ZodOptional<z.ZodString>;
        ui_path_id: z.ZodOptional<z.ZodString>;
        promotion_id: z.ZodOptional<z.ZodString>;
        content_payload_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
}, z.core.$strip>;
declare const PlaybookBodySchema: z.ZodObject<{
    plans: z.ZodArray<z.ZodObject<{
        unique_handle: z.ZodString;
        name: z.ZodString;
        tier_position: z.ZodDefault<z.ZodNumber>;
        sort_order: z.ZodDefault<z.ZodNumber>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
    }, z.core.$strip>>;
    addons: z.ZodOptional<z.ZodArray<z.ZodObject<{
        unique_handle: z.ZodString;
        name: z.ZodString;
        sort_order: z.ZodDefault<z.ZodNumber>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
    }, z.core.$strip>>>;
    entitlements: z.ZodArray<z.ZodObject<{
        unique_handle: z.ZodString;
        name: z.ZodString;
        type: z.ZodEnum<{
            feature: "feature";
            capability_tier: "capability_tier";
            usage_limit: "usage_limit";
            price_per_unit: "price_per_unit";
            rate_limit: "rate_limit";
            credits: "credits";
            seat: "seat";
        }>;
        unit: z.ZodOptional<z.ZodString>;
        tier_definitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            handle: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
    }, z.core.$strip>>;
    entitlement_rules: z.ZodArray<z.ZodObject<{
        current_usage: z.ZodDefault<z.ZodNumber>;
        allocation: z.ZodOptional<z.ZodEnum<{
            per_instance: "per_instance";
            account_pool: "account_pool";
            per_user: "per_user";
            per_user_pooled: "per_user_pooled";
        }>>;
        objective: z.ZodOptional<z.ZodString>;
        enabled: z.ZodOptional<z.ZodBoolean>;
        currency: z.ZodOptional<z.ZodString>;
        enforcement: z.ZodOptional<z.ZodEnum<{
            hard_block: "hard_block";
            block_with_upsell: "block_with_upsell";
            degrade: "degrade";
            allow_overage: "allow_overage";
        }>>;
        seat_type_id: z.ZodOptional<z.ZodString>;
        period_scope: z.ZodOptional<z.ZodEnum<{
            per_month: "per_month";
            per_year: "per_year";
            per_billing_period: "per_billing_period";
            lifetime: "lifetime";
            concurrent: "concurrent";
            per_instance: "per_instance";
            per_second: "per_second";
            per_minute: "per_minute";
            per_hour: "per_hour";
            per_6_hours: "per_6_hours";
            per_day: "per_day";
            per_week: "per_week";
        }>>;
        reset_period: z.ZodOptional<z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            year: "year";
            quarter: "quarter";
            billing_period: "billing_period";
            hour: "hour";
            six_hours: "six_hours";
        }>>;
        limit_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
        tier_value: z.ZodOptional<z.ZodString>;
        rate_value: z.ZodOptional<z.ZodNumber>;
        initial_grant: z.ZodOptional<z.ZodNumber>;
        allowance_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
        rollover_enabled: z.ZodOptional<z.ZodBoolean>;
        max_balance: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>>;
        included_count: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
        max_seats: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>>;
        amount_cents: z.ZodOptional<z.ZodNumber>;
        id: z.ZodString;
        entitlement_id: z.ZodString;
        targets: z.ZodArray<z.ZodObject<{
            kind: z.ZodEnum<{
                plan: "plan";
                addon: "addon";
                plan_variation: "plan_variation";
                addon_variation: "addon_variation";
            }>;
            id: z.ZodString;
        }, z.core.$strip>>;
        segment_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
        kind: z.ZodOptional<z.ZodEnum<{
            feature: "feature";
            capability_tier: "capability_tier";
            usage_limit: "usage_limit";
            price_per_unit: "price_per_unit";
            rate_limit: "rate_limit";
            credits: "credits";
            seat: "seat";
        }>>;
        unit: z.ZodOptional<z.ZodString>;
        tier_name: z.ZodOptional<z.ZodString>;
        tier_description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    segments: z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        handle: z.ZodString;
        predicates: z.ZodOptional<z.ZodArray<z.ZodObject<{
            field: z.ZodString;
            operator: z.ZodEnum<{
                in: "in";
                eq: "eq";
                neq: "neq";
                gte: "gte";
                lte: "lte";
                contains: "contains";
                gt: "gt";
                lt: "lt";
            }>;
            value: z.ZodString;
        }, z.core.$strip>>>;
        dimension_id: z.ZodOptional<z.ZodString>;
        experiment_handle: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    content_ui_paths: z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        action_type: z.ZodEnum<{
            book_demo: "book_demo";
            contact_sales: "contact_sales";
            complete_onboarding: "complete_onboarding";
            invite_teammate: "invite_teammate";
            refer_friend: "refer_friend";
            verify_work_email: "verify_work_email";
            update_payment_method: "update_payment_method";
            enable_auto_renewal: "enable_auto_renewal";
            manage_subscription: "manage_subscription";
            switch_billing_period: "switch_billing_period";
            extend_trial: "extend_trial";
            dismiss: "dismiss";
            snooze: "snooze";
            open_checkout_modal: "open_checkout_modal";
            navigate_to_plans: "navigate_to_plans";
            open_upgrade_modal: "open_upgrade_modal";
            open_placement: "open_placement";
            open_feature_tour: "open_feature_tour";
            custom_url: "custom_url";
        }>;
        plan_handle: z.ZodOptional<z.ZodString>;
        promotion_id: z.ZodOptional<z.ZodString>;
        placement_handle: z.ZodOptional<z.ZodString>;
        url: z.ZodOptional<z.ZodString>;
        tour_id: z.ZodOptional<z.ZodString>;
        target_billing_period: z.ZodOptional<z.ZodEnum<{
            monthly: "monthly";
            annual: "annual";
        }>>;
        description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    slot_configs: z.ZodOptional<z.ZodArray<z.ZodObject<{
        slot_id: z.ZodString;
        active: z.ZodBoolean;
        triggers: z.ZodArray<z.ZodString>;
    }, z.core.$strip>>>;
    content_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
    theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    placement_slots: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        label: z.ZodString;
        description: z.ZodString;
        surface_type: z.ZodString;
        placement_handle: z.ZodString;
        template: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    message_blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
        block_id: z.ZodString;
        tenant_id: z.ZodString;
        name: z.ZodString;
        surface_template_id: z.ZodOptional<z.ZodString>;
        default_content: z.ZodObject<{
            header: z.ZodOptional<z.ZodString>;
            body: z.ZodOptional<z.ZodString>;
            cta_label: z.ZodOptional<z.ZodString>;
            secondary_cta_label: z.ZodOptional<z.ZodString>;
        }, z.core.$catchall<z.ZodUnknown>>;
        segment_overrides: z.ZodOptional<z.ZodArray<z.ZodObject<{
            segment_value_id: z.ZodString;
            content: z.ZodObject<{
                header: z.ZodOptional<z.ZodString>;
                body: z.ZodOptional<z.ZodString>;
                cta_label: z.ZodOptional<z.ZodString>;
                secondary_cta_label: z.ZodOptional<z.ZodString>;
            }, z.core.$catchall<z.ZodUnknown>>;
        }, z.core.$strip>>>;
        child_blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
            slot: z.ZodString;
            block_id: z.ZodString;
        }, z.core.$strip>>>;
        tokens_used: z.ZodOptional<z.ZodArray<z.ZodString>>;
        status: z.ZodEnum<{
            active: "active";
            draft: "draft";
            archived: "archived";
        }>;
        created_at: z.ZodString;
        updated_at: z.ZodString;
    }, z.core.$strip>>>;
    placement_payloads: z.ZodOptional<z.ZodArray<z.ZodObject<{
        payload_id: z.ZodString;
        placement_id: z.ZodString;
        target: z.ZodObject<{
            plan_ids: z.ZodArray<z.ZodString>;
            billing_cadences: z.ZodOptional<z.ZodArray<z.ZodString>>;
            segment_chips: z.ZodArray<z.ZodString>;
        }, z.core.$strip>;
        caps: z.ZodOptional<z.ZodObject<{
            max_per_period: z.ZodOptional<z.ZodObject<{
                count: z.ZodNumber;
                period: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    lifetime: "lifetime";
                    session: "session";
                }>;
            }, z.core.$strip>>;
            cooldown_days: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>;
        remind_later_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        created_at: z.ZodString;
        updated_at: z.ZodOptional<z.ZodString>;
        source_mode: z.ZodEnum<{
            inline: "inline";
            content_linked: "content_linked";
        }>;
        surfaces: z.ZodOptional<z.ZodArray<z.ZodObject<{
            template_id: z.ZodString;
            fields: z.ZodRecord<z.ZodString, z.ZodString>;
            ctas: z.ZodArray<z.ZodObject<{
                label: z.ZodString;
                path: z.ZodEnum<{
                    custom: "custom";
                    open_checkout: "open_checkout";
                    view_plans: "view_plans";
                    book_demo: "book_demo";
                    contact_sales: "contact_sales";
                    complete_onboarding: "complete_onboarding";
                    invite_teammate: "invite_teammate";
                    refer_friend: "refer_friend";
                    verify_work_email: "verify_work_email";
                    update_payment_method: "update_payment_method";
                    enable_auto_renewal: "enable_auto_renewal";
                    manage_subscription: "manage_subscription";
                    switch_billing_period: "switch_billing_period";
                    extend_trial: "extend_trial";
                    open_rt_placement: "open_rt_placement";
                    dismiss: "dismiss";
                    snooze: "snooze";
                }>;
                config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            }, z.core.$strip>>;
        }, z.core.$strip>>>;
        surface_slot_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
        content_link: z.ZodOptional<z.ZodObject<{
            message_block_id: z.ZodOptional<z.ZodString>;
            ui_path_id: z.ZodOptional<z.ZodString>;
            promotion_id: z.ZodOptional<z.ZodString>;
            content_payload_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
    }, z.core.$strip>>>;
    placements: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        category: z.ZodEnum<{
            fixed: "fixed";
            other_conversion: "other_conversion";
            retention: "retention";
            gated: "gated";
            usage_credit_seat: "usage_credit_seat";
            trials: "trials";
        }>;
        trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
            type: z.ZodLiteral<"surface_render">;
            slot_id: z.ZodString;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"entitlement_gate">;
            entitlement_handle: z.ZodString;
            tier_threshold: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"usage_threshold">;
            entitlement_handle: z.ZodString;
            threshold_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"credit_threshold">;
            entitlement_handle: z.ZodString;
            threshold_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"seat_threshold">;
            entitlement_handle: z.ZodString;
            threshold_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_started">;
            trial_type: z.ZodOptional<z.ZodEnum<{
                reverse: "reverse";
                free: "free";
            }>>;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_progress">;
            progress_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_ending">;
            days_before_end: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_ended">;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_converted">;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"qualifier">;
            qualifier: z.ZodString;
        }, z.core.$strip>], "type">;
        payloads: z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            target: z.ZodObject<{
                plan_ids: z.ZodArray<z.ZodString>;
                billing_cadences: z.ZodOptional<z.ZodArray<z.ZodString>>;
                segment_chips: z.ZodArray<z.ZodString>;
            }, z.core.$strip>;
            surfaces: z.ZodArray<z.ZodObject<{
                template_id: z.ZodString;
                fields: z.ZodRecord<z.ZodString, z.ZodString>;
                ctas: z.ZodArray<z.ZodObject<{
                    label: z.ZodString;
                    path: z.ZodEnum<{
                        custom: "custom";
                        open_checkout: "open_checkout";
                        view_plans: "view_plans";
                        book_demo: "book_demo";
                        contact_sales: "contact_sales";
                        complete_onboarding: "complete_onboarding";
                        invite_teammate: "invite_teammate";
                        refer_friend: "refer_friend";
                        verify_work_email: "verify_work_email";
                        update_payment_method: "update_payment_method";
                        enable_auto_renewal: "enable_auto_renewal";
                        manage_subscription: "manage_subscription";
                        switch_billing_period: "switch_billing_period";
                        extend_trial: "extend_trial";
                        open_rt_placement: "open_rt_placement";
                        dismiss: "dismiss";
                        snooze: "snooze";
                    }>;
                    config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                }, z.core.$strip>>;
            }, z.core.$strip>>;
            caps: z.ZodOptional<z.ZodObject<{
                max_per_period: z.ZodOptional<z.ZodObject<{
                    count: z.ZodNumber;
                    period: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        lifetime: "lifetime";
                        session: "session";
                    }>;
                }, z.core.$strip>>;
                cooldown_days: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>>;
            surface_slot_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
            remind_later_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            created_at: z.ZodOptional<z.ZodString>;
            recommendation_strategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
                custom: "custom";
                next_tier_up: "next_tier_up";
                best_value: "best_value";
            }>>>;
            recommendation_plan_override: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        order: z.ZodNumber;
        objective: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    content_promotions: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        discount: z.ZodString;
        type: z.ZodString;
        status: z.ZodString;
    }, z.core.$strip>>>;
    personalization_tokens: z.ZodOptional<z.ZodArray<z.ZodObject<{
        token: z.ZodString;
        label: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        category: z.ZodEnum<{
            custom: "custom";
            billing: "billing";
            plan: "plan";
            user: "user";
            trial: "trial";
            usage: "usage";
            promotion: "promotion";
        }>;
        data_source: z.ZodOptional<z.ZodString>;
        example_value: z.ZodOptional<z.ZodString>;
        value_map: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        format: z.ZodOptional<z.ZodEnum<{
            string: "string";
            number: "number";
            date: "date";
            currency: "currency";
            percentage: "percentage";
        }>>;
    }, z.core.$strip>>>;
    surface_templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        surface_type: z.ZodString;
        fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            type: z.ZodOptional<z.ZodString>;
            required: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strip>>>;
    }, z.core.$strip>>>;
    free_trial_rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        handle: z.ZodString;
        plan_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        segment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        trial_limit_type: z.ZodDefault<z.ZodEnum<{
            time: "time";
            usage: "usage";
        }>>;
        duration_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        grace_period_days: z.ZodDefault<z.ZodNumber>;
        usage_entitlement_handle: z.ZodOptional<z.ZodString>;
        usage_limit_value: z.ZodOptional<z.ZodNumber>;
        require_payment_method: z.ZodDefault<z.ZodBoolean>;
        auto_convert: z.ZodDefault<z.ZodBoolean>;
        convert_to_plan_id: z.ZodOptional<z.ZodString>;
        fallback_plan_id: z.ZodOptional<z.ZodString>;
        limit_per_customer: z.ZodDefault<z.ZodNumber>;
        is_active: z.ZodDefault<z.ZodBoolean>;
        metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strip>>>;
    reverse_trial_rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        handle: z.ZodString;
        premium_plan_id: z.ZodString;
        fallback_plan_id: z.ZodString;
        segment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        trial_limit_type: z.ZodDefault<z.ZodEnum<{
            time: "time";
            usage: "usage";
        }>>;
        duration_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        usage_entitlement_handle: z.ZodOptional<z.ZodString>;
        usage_limit_value: z.ZodOptional<z.ZodNumber>;
        start_policy: z.ZodDefault<z.ZodEnum<{
            manual: "manual";
            signup: "signup";
            first_premium_access: "first_premium_access";
        }>>;
        show_upgrade_prompt_at_day: z.ZodOptional<z.ZodNumber>;
        entitlements_during_trial: z.ZodDefault<z.ZodArray<z.ZodString>>;
        is_active: z.ZodDefault<z.ZodBoolean>;
        metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strip>>>;
    objectives: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        name: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    plan_variations: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        plan_handle: z.ZodString;
        billing_period: z.ZodEnum<{
            custom: "custom";
            monthly: "monthly";
            annual: "annual";
            one_time: "one_time";
        }>;
        segment_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_amount: z.ZodNumber;
        currency: z.ZodDefault<z.ZodString>;
        pricing_model: z.ZodEnum<{
            flat: "flat";
            per_unit: "per_unit";
            tiered: "tiered";
            metered: "metered";
        }>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
        stripe_price_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_source: z.ZodEnum<{
            stripe: "stripe";
            static: "static";
            clerk: "clerk";
        }>;
    }, z.core.$strip>>>;
    addon_variations: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        addon_handle: z.ZodString;
        billing_period: z.ZodEnum<{
            custom: "custom";
            monthly: "monthly";
            annual: "annual";
            one_time: "one_time";
        }>;
        segment_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_amount: z.ZodNumber;
        currency: z.ZodDefault<z.ZodString>;
        pricing_model: z.ZodEnum<{
            flat: "flat";
            per_unit: "per_unit";
            tiered: "tiered";
            metered: "metered";
        }>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
        stripe_price_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_source: z.ZodEnum<{
            stripe: "stripe";
            static: "static";
        }>;
    }, z.core.$strip>>>;
    extension_rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
        kind: z.ZodString;
        must_understand: z.ZodOptional<z.ZodBoolean>;
        schema_version: z.ZodNumber;
        config: z.ZodUnknown;
    }, z.core.$strip>>>;
    seat_types: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        name: z.ZodString;
        description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        is_default: z.ZodDefault<z.ZodBoolean>;
        is_buyer: z.ZodDefault<z.ZodBoolean>;
        entitlement_handles: z.ZodDefault<z.ZodArray<z.ZodString>>;
    }, z.core.$strip>>>;
    enforcement_defaults: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        entitlement_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        soft_limit_percent: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        hard_limit_percent: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        soft_limit_action: z.ZodString;
        hard_limit_action: z.ZodString;
        grace_period_hours: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        notification_channels: z.ZodDefault<z.ZodArray<z.ZodString>>;
        is_active: z.ZodDefault<z.ZodBoolean>;
    }, z.core.$strip>>>;
    placement_settings: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        global_frequency_cap: z.ZodDefault<z.ZodNullable<z.ZodObject<{
            capRules: z.ZodDefault<z.ZodArray<z.ZodObject<{
                id: z.ZodString;
                group: z.ZodArray<z.ZodObject<{
                    kind: z.ZodEnum<{
                        template: "template";
                        slot: "slot";
                    }>;
                    id: z.ZodString;
                    label: z.ZodOptional<z.ZodString>;
                }, z.core.$strip>>;
                cap: z.ZodObject<{
                    count: z.ZodNumber;
                    period: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        session: "session";
                    }>;
                }, z.core.$strip>;
            }, z.core.$strip>>>;
            sessionCooldownMinutes: z.ZodDefault<z.ZodNumber>;
            remindLaterMinutes: z.ZodDefault<z.ZodNumber>;
            testMode: z.ZodDefault<z.ZodEnum<{
                off: "off";
                test_users: "test_users";
                all_traffic: "all_traffic";
            }>>;
        }, z.core.$strip>>>;
        global_frequency_cap_period: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            hour: "hour";
            session: "session";
        }>>>;
        suppress_for_paid: z.ZodDefault<z.ZodBoolean>;
        suppress_for_trial: z.ZodDefault<z.ZodBoolean>;
        allow_stacking: z.ZodDefault<z.ZodBoolean>;
        priority_collision_strategy: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    }, z.core.$strip>>>;
    segment_dimensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        name: z.ZodString;
        category: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        visibility_toggle: z.ZodDefault<z.ZodBoolean>;
        source_type: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    }, z.core.$strip>>>;
    meter_bindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        entitlement_handle: z.ZodString;
        meter_handle: z.ZodString;
        limit: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        reset_period: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    }, z.core.$strip>>>;
    experiments: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
    signal_catalog: z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
}, z.core.$strip>;
declare const PlaybookHeaderSchema: z.ZodObject<{
    artifact_type: z.ZodLiteral<"playbook">;
    format_version: z.ZodLiteral<"1.0.0">;
    playbook_handle: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    tenant_id: z.ZodOptional<z.ZodString>;
    environment_id: z.ZodOptional<z.ZodString>;
    project_id: z.ZodOptional<z.ZodString>;
    exported_at: z.ZodOptional<z.ZodString>;
    schema_version: z.ZodOptional<z.ZodString>;
    bundle_schema_version: z.ZodOptional<z.ZodNumber>;
    bundle_min_readable_schema_version: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
/**
 * The canonical config as a plain object schema — header + body composed. This
 * is the `.shape`-bearing, codegen-friendly form used by everything that
 * introspects the config's top-level fields (the bundle meta drift gate, the
 * Playbook contract manifest generator, the facet-coverage test). It is NOT the
 * schema most callers parse with — that is the lenient `PlaybookSchema` below,
 * which wraps this object so legacy files parse too. Kept id-less so the
 * `.meta({ id: 'Playbook' })` on the lenient wrapper is the single registered
 * component (a `z.preprocess` carrying the id would otherwise duplicate it).
 */
declare const PlaybookObjectSchema: z.ZodObject<{
    artifact_type: z.ZodLiteral<"playbook">;
    format_version: z.ZodLiteral<"1.0.0">;
    playbook_handle: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    tenant_id: z.ZodOptional<z.ZodString>;
    environment_id: z.ZodOptional<z.ZodString>;
    project_id: z.ZodOptional<z.ZodString>;
    exported_at: z.ZodOptional<z.ZodString>;
    schema_version: z.ZodOptional<z.ZodString>;
    bundle_schema_version: z.ZodOptional<z.ZodNumber>;
    bundle_min_readable_schema_version: z.ZodOptional<z.ZodNumber>;
    plans: z.ZodArray<z.ZodObject<{
        unique_handle: z.ZodString;
        name: z.ZodString;
        tier_position: z.ZodDefault<z.ZodNumber>;
        sort_order: z.ZodDefault<z.ZodNumber>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
    }, z.core.$strip>>;
    addons: z.ZodOptional<z.ZodArray<z.ZodObject<{
        unique_handle: z.ZodString;
        name: z.ZodString;
        sort_order: z.ZodDefault<z.ZodNumber>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
    }, z.core.$strip>>>;
    entitlements: z.ZodArray<z.ZodObject<{
        unique_handle: z.ZodString;
        name: z.ZodString;
        type: z.ZodEnum<{
            feature: "feature";
            capability_tier: "capability_tier";
            usage_limit: "usage_limit";
            price_per_unit: "price_per_unit";
            rate_limit: "rate_limit";
            credits: "credits";
            seat: "seat";
        }>;
        unit: z.ZodOptional<z.ZodString>;
        tier_definitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            handle: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
    }, z.core.$strip>>;
    entitlement_rules: z.ZodArray<z.ZodObject<{
        current_usage: z.ZodDefault<z.ZodNumber>;
        allocation: z.ZodOptional<z.ZodEnum<{
            per_instance: "per_instance";
            account_pool: "account_pool";
            per_user: "per_user";
            per_user_pooled: "per_user_pooled";
        }>>;
        objective: z.ZodOptional<z.ZodString>;
        enabled: z.ZodOptional<z.ZodBoolean>;
        currency: z.ZodOptional<z.ZodString>;
        enforcement: z.ZodOptional<z.ZodEnum<{
            hard_block: "hard_block";
            block_with_upsell: "block_with_upsell";
            degrade: "degrade";
            allow_overage: "allow_overage";
        }>>;
        seat_type_id: z.ZodOptional<z.ZodString>;
        period_scope: z.ZodOptional<z.ZodEnum<{
            per_month: "per_month";
            per_year: "per_year";
            per_billing_period: "per_billing_period";
            lifetime: "lifetime";
            concurrent: "concurrent";
            per_instance: "per_instance";
            per_second: "per_second";
            per_minute: "per_minute";
            per_hour: "per_hour";
            per_6_hours: "per_6_hours";
            per_day: "per_day";
            per_week: "per_week";
        }>>;
        reset_period: z.ZodOptional<z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            year: "year";
            quarter: "quarter";
            billing_period: "billing_period";
            hour: "hour";
            six_hours: "six_hours";
        }>>;
        limit_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
        tier_value: z.ZodOptional<z.ZodString>;
        rate_value: z.ZodOptional<z.ZodNumber>;
        initial_grant: z.ZodOptional<z.ZodNumber>;
        allowance_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
        rollover_enabled: z.ZodOptional<z.ZodBoolean>;
        max_balance: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>>;
        included_count: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
        max_seats: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>>;
        amount_cents: z.ZodOptional<z.ZodNumber>;
        id: z.ZodString;
        entitlement_id: z.ZodString;
        targets: z.ZodArray<z.ZodObject<{
            kind: z.ZodEnum<{
                plan: "plan";
                addon: "addon";
                plan_variation: "plan_variation";
                addon_variation: "addon_variation";
            }>;
            id: z.ZodString;
        }, z.core.$strip>>;
        segment_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
        kind: z.ZodOptional<z.ZodEnum<{
            feature: "feature";
            capability_tier: "capability_tier";
            usage_limit: "usage_limit";
            price_per_unit: "price_per_unit";
            rate_limit: "rate_limit";
            credits: "credits";
            seat: "seat";
        }>>;
        unit: z.ZodOptional<z.ZodString>;
        tier_name: z.ZodOptional<z.ZodString>;
        tier_description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    segments: z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        handle: z.ZodString;
        predicates: z.ZodOptional<z.ZodArray<z.ZodObject<{
            field: z.ZodString;
            operator: z.ZodEnum<{
                in: "in";
                eq: "eq";
                neq: "neq";
                gte: "gte";
                lte: "lte";
                contains: "contains";
                gt: "gt";
                lt: "lt";
            }>;
            value: z.ZodString;
        }, z.core.$strip>>>;
        dimension_id: z.ZodOptional<z.ZodString>;
        experiment_handle: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    content_ui_paths: z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        action_type: z.ZodEnum<{
            book_demo: "book_demo";
            contact_sales: "contact_sales";
            complete_onboarding: "complete_onboarding";
            invite_teammate: "invite_teammate";
            refer_friend: "refer_friend";
            verify_work_email: "verify_work_email";
            update_payment_method: "update_payment_method";
            enable_auto_renewal: "enable_auto_renewal";
            manage_subscription: "manage_subscription";
            switch_billing_period: "switch_billing_period";
            extend_trial: "extend_trial";
            dismiss: "dismiss";
            snooze: "snooze";
            open_checkout_modal: "open_checkout_modal";
            navigate_to_plans: "navigate_to_plans";
            open_upgrade_modal: "open_upgrade_modal";
            open_placement: "open_placement";
            open_feature_tour: "open_feature_tour";
            custom_url: "custom_url";
        }>;
        plan_handle: z.ZodOptional<z.ZodString>;
        promotion_id: z.ZodOptional<z.ZodString>;
        placement_handle: z.ZodOptional<z.ZodString>;
        url: z.ZodOptional<z.ZodString>;
        tour_id: z.ZodOptional<z.ZodString>;
        target_billing_period: z.ZodOptional<z.ZodEnum<{
            monthly: "monthly";
            annual: "annual";
        }>>;
        description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    slot_configs: z.ZodOptional<z.ZodArray<z.ZodObject<{
        slot_id: z.ZodString;
        active: z.ZodBoolean;
        triggers: z.ZodArray<z.ZodString>;
    }, z.core.$strip>>>;
    content_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
    theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    placement_slots: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        label: z.ZodString;
        description: z.ZodString;
        surface_type: z.ZodString;
        placement_handle: z.ZodString;
        template: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    message_blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
        block_id: z.ZodString;
        tenant_id: z.ZodString;
        name: z.ZodString;
        surface_template_id: z.ZodOptional<z.ZodString>;
        default_content: z.ZodObject<{
            header: z.ZodOptional<z.ZodString>;
            body: z.ZodOptional<z.ZodString>;
            cta_label: z.ZodOptional<z.ZodString>;
            secondary_cta_label: z.ZodOptional<z.ZodString>;
        }, z.core.$catchall<z.ZodUnknown>>;
        segment_overrides: z.ZodOptional<z.ZodArray<z.ZodObject<{
            segment_value_id: z.ZodString;
            content: z.ZodObject<{
                header: z.ZodOptional<z.ZodString>;
                body: z.ZodOptional<z.ZodString>;
                cta_label: z.ZodOptional<z.ZodString>;
                secondary_cta_label: z.ZodOptional<z.ZodString>;
            }, z.core.$catchall<z.ZodUnknown>>;
        }, z.core.$strip>>>;
        child_blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
            slot: z.ZodString;
            block_id: z.ZodString;
        }, z.core.$strip>>>;
        tokens_used: z.ZodOptional<z.ZodArray<z.ZodString>>;
        status: z.ZodEnum<{
            active: "active";
            draft: "draft";
            archived: "archived";
        }>;
        created_at: z.ZodString;
        updated_at: z.ZodString;
    }, z.core.$strip>>>;
    placement_payloads: z.ZodOptional<z.ZodArray<z.ZodObject<{
        payload_id: z.ZodString;
        placement_id: z.ZodString;
        target: z.ZodObject<{
            plan_ids: z.ZodArray<z.ZodString>;
            billing_cadences: z.ZodOptional<z.ZodArray<z.ZodString>>;
            segment_chips: z.ZodArray<z.ZodString>;
        }, z.core.$strip>;
        caps: z.ZodOptional<z.ZodObject<{
            max_per_period: z.ZodOptional<z.ZodObject<{
                count: z.ZodNumber;
                period: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    lifetime: "lifetime";
                    session: "session";
                }>;
            }, z.core.$strip>>;
            cooldown_days: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>;
        remind_later_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        created_at: z.ZodString;
        updated_at: z.ZodOptional<z.ZodString>;
        source_mode: z.ZodEnum<{
            inline: "inline";
            content_linked: "content_linked";
        }>;
        surfaces: z.ZodOptional<z.ZodArray<z.ZodObject<{
            template_id: z.ZodString;
            fields: z.ZodRecord<z.ZodString, z.ZodString>;
            ctas: z.ZodArray<z.ZodObject<{
                label: z.ZodString;
                path: z.ZodEnum<{
                    custom: "custom";
                    open_checkout: "open_checkout";
                    view_plans: "view_plans";
                    book_demo: "book_demo";
                    contact_sales: "contact_sales";
                    complete_onboarding: "complete_onboarding";
                    invite_teammate: "invite_teammate";
                    refer_friend: "refer_friend";
                    verify_work_email: "verify_work_email";
                    update_payment_method: "update_payment_method";
                    enable_auto_renewal: "enable_auto_renewal";
                    manage_subscription: "manage_subscription";
                    switch_billing_period: "switch_billing_period";
                    extend_trial: "extend_trial";
                    open_rt_placement: "open_rt_placement";
                    dismiss: "dismiss";
                    snooze: "snooze";
                }>;
                config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            }, z.core.$strip>>;
        }, z.core.$strip>>>;
        surface_slot_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
        content_link: z.ZodOptional<z.ZodObject<{
            message_block_id: z.ZodOptional<z.ZodString>;
            ui_path_id: z.ZodOptional<z.ZodString>;
            promotion_id: z.ZodOptional<z.ZodString>;
            content_payload_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
    }, z.core.$strip>>>;
    placements: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        category: z.ZodEnum<{
            fixed: "fixed";
            other_conversion: "other_conversion";
            retention: "retention";
            gated: "gated";
            usage_credit_seat: "usage_credit_seat";
            trials: "trials";
        }>;
        trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
            type: z.ZodLiteral<"surface_render">;
            slot_id: z.ZodString;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"entitlement_gate">;
            entitlement_handle: z.ZodString;
            tier_threshold: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"usage_threshold">;
            entitlement_handle: z.ZodString;
            threshold_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"credit_threshold">;
            entitlement_handle: z.ZodString;
            threshold_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"seat_threshold">;
            entitlement_handle: z.ZodString;
            threshold_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_started">;
            trial_type: z.ZodOptional<z.ZodEnum<{
                reverse: "reverse";
                free: "free";
            }>>;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_progress">;
            progress_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_ending">;
            days_before_end: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_ended">;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_converted">;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"qualifier">;
            qualifier: z.ZodString;
        }, z.core.$strip>], "type">;
        payloads: z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            target: z.ZodObject<{
                plan_ids: z.ZodArray<z.ZodString>;
                billing_cadences: z.ZodOptional<z.ZodArray<z.ZodString>>;
                segment_chips: z.ZodArray<z.ZodString>;
            }, z.core.$strip>;
            surfaces: z.ZodArray<z.ZodObject<{
                template_id: z.ZodString;
                fields: z.ZodRecord<z.ZodString, z.ZodString>;
                ctas: z.ZodArray<z.ZodObject<{
                    label: z.ZodString;
                    path: z.ZodEnum<{
                        custom: "custom";
                        open_checkout: "open_checkout";
                        view_plans: "view_plans";
                        book_demo: "book_demo";
                        contact_sales: "contact_sales";
                        complete_onboarding: "complete_onboarding";
                        invite_teammate: "invite_teammate";
                        refer_friend: "refer_friend";
                        verify_work_email: "verify_work_email";
                        update_payment_method: "update_payment_method";
                        enable_auto_renewal: "enable_auto_renewal";
                        manage_subscription: "manage_subscription";
                        switch_billing_period: "switch_billing_period";
                        extend_trial: "extend_trial";
                        open_rt_placement: "open_rt_placement";
                        dismiss: "dismiss";
                        snooze: "snooze";
                    }>;
                    config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                }, z.core.$strip>>;
            }, z.core.$strip>>;
            caps: z.ZodOptional<z.ZodObject<{
                max_per_period: z.ZodOptional<z.ZodObject<{
                    count: z.ZodNumber;
                    period: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        lifetime: "lifetime";
                        session: "session";
                    }>;
                }, z.core.$strip>>;
                cooldown_days: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>>;
            surface_slot_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
            remind_later_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            created_at: z.ZodOptional<z.ZodString>;
            recommendation_strategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
                custom: "custom";
                next_tier_up: "next_tier_up";
                best_value: "best_value";
            }>>>;
            recommendation_plan_override: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        order: z.ZodNumber;
        objective: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    content_promotions: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        discount: z.ZodString;
        type: z.ZodString;
        status: z.ZodString;
    }, z.core.$strip>>>;
    personalization_tokens: z.ZodOptional<z.ZodArray<z.ZodObject<{
        token: z.ZodString;
        label: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        category: z.ZodEnum<{
            custom: "custom";
            billing: "billing";
            plan: "plan";
            user: "user";
            trial: "trial";
            usage: "usage";
            promotion: "promotion";
        }>;
        data_source: z.ZodOptional<z.ZodString>;
        example_value: z.ZodOptional<z.ZodString>;
        value_map: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        format: z.ZodOptional<z.ZodEnum<{
            string: "string";
            number: "number";
            date: "date";
            currency: "currency";
            percentage: "percentage";
        }>>;
    }, z.core.$strip>>>;
    surface_templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        surface_type: z.ZodString;
        fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            type: z.ZodOptional<z.ZodString>;
            required: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strip>>>;
    }, z.core.$strip>>>;
    free_trial_rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        handle: z.ZodString;
        plan_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        segment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        trial_limit_type: z.ZodDefault<z.ZodEnum<{
            time: "time";
            usage: "usage";
        }>>;
        duration_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        grace_period_days: z.ZodDefault<z.ZodNumber>;
        usage_entitlement_handle: z.ZodOptional<z.ZodString>;
        usage_limit_value: z.ZodOptional<z.ZodNumber>;
        require_payment_method: z.ZodDefault<z.ZodBoolean>;
        auto_convert: z.ZodDefault<z.ZodBoolean>;
        convert_to_plan_id: z.ZodOptional<z.ZodString>;
        fallback_plan_id: z.ZodOptional<z.ZodString>;
        limit_per_customer: z.ZodDefault<z.ZodNumber>;
        is_active: z.ZodDefault<z.ZodBoolean>;
        metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strip>>>;
    reverse_trial_rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        handle: z.ZodString;
        premium_plan_id: z.ZodString;
        fallback_plan_id: z.ZodString;
        segment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        trial_limit_type: z.ZodDefault<z.ZodEnum<{
            time: "time";
            usage: "usage";
        }>>;
        duration_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        usage_entitlement_handle: z.ZodOptional<z.ZodString>;
        usage_limit_value: z.ZodOptional<z.ZodNumber>;
        start_policy: z.ZodDefault<z.ZodEnum<{
            manual: "manual";
            signup: "signup";
            first_premium_access: "first_premium_access";
        }>>;
        show_upgrade_prompt_at_day: z.ZodOptional<z.ZodNumber>;
        entitlements_during_trial: z.ZodDefault<z.ZodArray<z.ZodString>>;
        is_active: z.ZodDefault<z.ZodBoolean>;
        metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strip>>>;
    objectives: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        name: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    plan_variations: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        plan_handle: z.ZodString;
        billing_period: z.ZodEnum<{
            custom: "custom";
            monthly: "monthly";
            annual: "annual";
            one_time: "one_time";
        }>;
        segment_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_amount: z.ZodNumber;
        currency: z.ZodDefault<z.ZodString>;
        pricing_model: z.ZodEnum<{
            flat: "flat";
            per_unit: "per_unit";
            tiered: "tiered";
            metered: "metered";
        }>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
        stripe_price_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_source: z.ZodEnum<{
            stripe: "stripe";
            static: "static";
            clerk: "clerk";
        }>;
    }, z.core.$strip>>>;
    addon_variations: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        addon_handle: z.ZodString;
        billing_period: z.ZodEnum<{
            custom: "custom";
            monthly: "monthly";
            annual: "annual";
            one_time: "one_time";
        }>;
        segment_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_amount: z.ZodNumber;
        currency: z.ZodDefault<z.ZodString>;
        pricing_model: z.ZodEnum<{
            flat: "flat";
            per_unit: "per_unit";
            tiered: "tiered";
            metered: "metered";
        }>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
        stripe_price_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_source: z.ZodEnum<{
            stripe: "stripe";
            static: "static";
        }>;
    }, z.core.$strip>>>;
    extension_rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
        kind: z.ZodString;
        must_understand: z.ZodOptional<z.ZodBoolean>;
        schema_version: z.ZodNumber;
        config: z.ZodUnknown;
    }, z.core.$strip>>>;
    seat_types: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        name: z.ZodString;
        description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        is_default: z.ZodDefault<z.ZodBoolean>;
        is_buyer: z.ZodDefault<z.ZodBoolean>;
        entitlement_handles: z.ZodDefault<z.ZodArray<z.ZodString>>;
    }, z.core.$strip>>>;
    enforcement_defaults: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        entitlement_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        soft_limit_percent: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        hard_limit_percent: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        soft_limit_action: z.ZodString;
        hard_limit_action: z.ZodString;
        grace_period_hours: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        notification_channels: z.ZodDefault<z.ZodArray<z.ZodString>>;
        is_active: z.ZodDefault<z.ZodBoolean>;
    }, z.core.$strip>>>;
    placement_settings: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        global_frequency_cap: z.ZodDefault<z.ZodNullable<z.ZodObject<{
            capRules: z.ZodDefault<z.ZodArray<z.ZodObject<{
                id: z.ZodString;
                group: z.ZodArray<z.ZodObject<{
                    kind: z.ZodEnum<{
                        template: "template";
                        slot: "slot";
                    }>;
                    id: z.ZodString;
                    label: z.ZodOptional<z.ZodString>;
                }, z.core.$strip>>;
                cap: z.ZodObject<{
                    count: z.ZodNumber;
                    period: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        session: "session";
                    }>;
                }, z.core.$strip>;
            }, z.core.$strip>>>;
            sessionCooldownMinutes: z.ZodDefault<z.ZodNumber>;
            remindLaterMinutes: z.ZodDefault<z.ZodNumber>;
            testMode: z.ZodDefault<z.ZodEnum<{
                off: "off";
                test_users: "test_users";
                all_traffic: "all_traffic";
            }>>;
        }, z.core.$strip>>>;
        global_frequency_cap_period: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            hour: "hour";
            session: "session";
        }>>>;
        suppress_for_paid: z.ZodDefault<z.ZodBoolean>;
        suppress_for_trial: z.ZodDefault<z.ZodBoolean>;
        allow_stacking: z.ZodDefault<z.ZodBoolean>;
        priority_collision_strategy: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    }, z.core.$strip>>>;
    segment_dimensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        name: z.ZodString;
        category: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        visibility_toggle: z.ZodDefault<z.ZodBoolean>;
        source_type: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    }, z.core.$strip>>>;
    meter_bindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        entitlement_handle: z.ZodString;
        meter_handle: z.ZodString;
        limit: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        reset_period: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    }, z.core.$strip>>>;
    experiments: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
    signal_catalog: z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
}, z.core.$strip>;
declare const PlaybookSchema: z.ZodPreprocess<z.ZodObject<{
    artifact_type: z.ZodLiteral<"playbook">;
    format_version: z.ZodLiteral<"1.0.0">;
    playbook_handle: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    tenant_id: z.ZodOptional<z.ZodString>;
    environment_id: z.ZodOptional<z.ZodString>;
    project_id: z.ZodOptional<z.ZodString>;
    exported_at: z.ZodOptional<z.ZodString>;
    schema_version: z.ZodOptional<z.ZodString>;
    bundle_schema_version: z.ZodOptional<z.ZodNumber>;
    bundle_min_readable_schema_version: z.ZodOptional<z.ZodNumber>;
    plans: z.ZodArray<z.ZodObject<{
        unique_handle: z.ZodString;
        name: z.ZodString;
        tier_position: z.ZodDefault<z.ZodNumber>;
        sort_order: z.ZodDefault<z.ZodNumber>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
    }, z.core.$strip>>;
    addons: z.ZodOptional<z.ZodArray<z.ZodObject<{
        unique_handle: z.ZodString;
        name: z.ZodString;
        sort_order: z.ZodDefault<z.ZodNumber>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
    }, z.core.$strip>>>;
    entitlements: z.ZodArray<z.ZodObject<{
        unique_handle: z.ZodString;
        name: z.ZodString;
        type: z.ZodEnum<{
            feature: "feature";
            capability_tier: "capability_tier";
            usage_limit: "usage_limit";
            price_per_unit: "price_per_unit";
            rate_limit: "rate_limit";
            credits: "credits";
            seat: "seat";
        }>;
        unit: z.ZodOptional<z.ZodString>;
        tier_definitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            handle: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
    }, z.core.$strip>>;
    entitlement_rules: z.ZodArray<z.ZodObject<{
        current_usage: z.ZodDefault<z.ZodNumber>;
        allocation: z.ZodOptional<z.ZodEnum<{
            per_instance: "per_instance";
            account_pool: "account_pool";
            per_user: "per_user";
            per_user_pooled: "per_user_pooled";
        }>>;
        objective: z.ZodOptional<z.ZodString>;
        enabled: z.ZodOptional<z.ZodBoolean>;
        currency: z.ZodOptional<z.ZodString>;
        enforcement: z.ZodOptional<z.ZodEnum<{
            hard_block: "hard_block";
            block_with_upsell: "block_with_upsell";
            degrade: "degrade";
            allow_overage: "allow_overage";
        }>>;
        seat_type_id: z.ZodOptional<z.ZodString>;
        period_scope: z.ZodOptional<z.ZodEnum<{
            per_month: "per_month";
            per_year: "per_year";
            per_billing_period: "per_billing_period";
            lifetime: "lifetime";
            concurrent: "concurrent";
            per_instance: "per_instance";
            per_second: "per_second";
            per_minute: "per_minute";
            per_hour: "per_hour";
            per_6_hours: "per_6_hours";
            per_day: "per_day";
            per_week: "per_week";
        }>>;
        reset_period: z.ZodOptional<z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            year: "year";
            quarter: "quarter";
            billing_period: "billing_period";
            hour: "hour";
            six_hours: "six_hours";
        }>>;
        limit_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
        tier_value: z.ZodOptional<z.ZodString>;
        rate_value: z.ZodOptional<z.ZodNumber>;
        initial_grant: z.ZodOptional<z.ZodNumber>;
        allowance_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
        rollover_enabled: z.ZodOptional<z.ZodBoolean>;
        max_balance: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>>;
        included_count: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
        max_seats: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>>;
        amount_cents: z.ZodOptional<z.ZodNumber>;
        id: z.ZodString;
        entitlement_id: z.ZodString;
        targets: z.ZodArray<z.ZodObject<{
            kind: z.ZodEnum<{
                plan: "plan";
                addon: "addon";
                plan_variation: "plan_variation";
                addon_variation: "addon_variation";
            }>;
            id: z.ZodString;
        }, z.core.$strip>>;
        segment_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
        kind: z.ZodOptional<z.ZodEnum<{
            feature: "feature";
            capability_tier: "capability_tier";
            usage_limit: "usage_limit";
            price_per_unit: "price_per_unit";
            rate_limit: "rate_limit";
            credits: "credits";
            seat: "seat";
        }>>;
        unit: z.ZodOptional<z.ZodString>;
        tier_name: z.ZodOptional<z.ZodString>;
        tier_description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    segments: z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        handle: z.ZodString;
        predicates: z.ZodOptional<z.ZodArray<z.ZodObject<{
            field: z.ZodString;
            operator: z.ZodEnum<{
                in: "in";
                eq: "eq";
                neq: "neq";
                gte: "gte";
                lte: "lte";
                contains: "contains";
                gt: "gt";
                lt: "lt";
            }>;
            value: z.ZodString;
        }, z.core.$strip>>>;
        dimension_id: z.ZodOptional<z.ZodString>;
        experiment_handle: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    content_ui_paths: z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        action_type: z.ZodEnum<{
            book_demo: "book_demo";
            contact_sales: "contact_sales";
            complete_onboarding: "complete_onboarding";
            invite_teammate: "invite_teammate";
            refer_friend: "refer_friend";
            verify_work_email: "verify_work_email";
            update_payment_method: "update_payment_method";
            enable_auto_renewal: "enable_auto_renewal";
            manage_subscription: "manage_subscription";
            switch_billing_period: "switch_billing_period";
            extend_trial: "extend_trial";
            dismiss: "dismiss";
            snooze: "snooze";
            open_checkout_modal: "open_checkout_modal";
            navigate_to_plans: "navigate_to_plans";
            open_upgrade_modal: "open_upgrade_modal";
            open_placement: "open_placement";
            open_feature_tour: "open_feature_tour";
            custom_url: "custom_url";
        }>;
        plan_handle: z.ZodOptional<z.ZodString>;
        promotion_id: z.ZodOptional<z.ZodString>;
        placement_handle: z.ZodOptional<z.ZodString>;
        url: z.ZodOptional<z.ZodString>;
        tour_id: z.ZodOptional<z.ZodString>;
        target_billing_period: z.ZodOptional<z.ZodEnum<{
            monthly: "monthly";
            annual: "annual";
        }>>;
        description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    slot_configs: z.ZodOptional<z.ZodArray<z.ZodObject<{
        slot_id: z.ZodString;
        active: z.ZodBoolean;
        triggers: z.ZodArray<z.ZodString>;
    }, z.core.$strip>>>;
    content_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
    theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    placement_slots: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        label: z.ZodString;
        description: z.ZodString;
        surface_type: z.ZodString;
        placement_handle: z.ZodString;
        template: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    message_blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
        block_id: z.ZodString;
        tenant_id: z.ZodString;
        name: z.ZodString;
        surface_template_id: z.ZodOptional<z.ZodString>;
        default_content: z.ZodObject<{
            header: z.ZodOptional<z.ZodString>;
            body: z.ZodOptional<z.ZodString>;
            cta_label: z.ZodOptional<z.ZodString>;
            secondary_cta_label: z.ZodOptional<z.ZodString>;
        }, z.core.$catchall<z.ZodUnknown>>;
        segment_overrides: z.ZodOptional<z.ZodArray<z.ZodObject<{
            segment_value_id: z.ZodString;
            content: z.ZodObject<{
                header: z.ZodOptional<z.ZodString>;
                body: z.ZodOptional<z.ZodString>;
                cta_label: z.ZodOptional<z.ZodString>;
                secondary_cta_label: z.ZodOptional<z.ZodString>;
            }, z.core.$catchall<z.ZodUnknown>>;
        }, z.core.$strip>>>;
        child_blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
            slot: z.ZodString;
            block_id: z.ZodString;
        }, z.core.$strip>>>;
        tokens_used: z.ZodOptional<z.ZodArray<z.ZodString>>;
        status: z.ZodEnum<{
            active: "active";
            draft: "draft";
            archived: "archived";
        }>;
        created_at: z.ZodString;
        updated_at: z.ZodString;
    }, z.core.$strip>>>;
    placement_payloads: z.ZodOptional<z.ZodArray<z.ZodObject<{
        payload_id: z.ZodString;
        placement_id: z.ZodString;
        target: z.ZodObject<{
            plan_ids: z.ZodArray<z.ZodString>;
            billing_cadences: z.ZodOptional<z.ZodArray<z.ZodString>>;
            segment_chips: z.ZodArray<z.ZodString>;
        }, z.core.$strip>;
        caps: z.ZodOptional<z.ZodObject<{
            max_per_period: z.ZodOptional<z.ZodObject<{
                count: z.ZodNumber;
                period: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    lifetime: "lifetime";
                    session: "session";
                }>;
            }, z.core.$strip>>;
            cooldown_days: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>;
        remind_later_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        created_at: z.ZodString;
        updated_at: z.ZodOptional<z.ZodString>;
        source_mode: z.ZodEnum<{
            inline: "inline";
            content_linked: "content_linked";
        }>;
        surfaces: z.ZodOptional<z.ZodArray<z.ZodObject<{
            template_id: z.ZodString;
            fields: z.ZodRecord<z.ZodString, z.ZodString>;
            ctas: z.ZodArray<z.ZodObject<{
                label: z.ZodString;
                path: z.ZodEnum<{
                    custom: "custom";
                    open_checkout: "open_checkout";
                    view_plans: "view_plans";
                    book_demo: "book_demo";
                    contact_sales: "contact_sales";
                    complete_onboarding: "complete_onboarding";
                    invite_teammate: "invite_teammate";
                    refer_friend: "refer_friend";
                    verify_work_email: "verify_work_email";
                    update_payment_method: "update_payment_method";
                    enable_auto_renewal: "enable_auto_renewal";
                    manage_subscription: "manage_subscription";
                    switch_billing_period: "switch_billing_period";
                    extend_trial: "extend_trial";
                    open_rt_placement: "open_rt_placement";
                    dismiss: "dismiss";
                    snooze: "snooze";
                }>;
                config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            }, z.core.$strip>>;
        }, z.core.$strip>>>;
        surface_slot_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
        content_link: z.ZodOptional<z.ZodObject<{
            message_block_id: z.ZodOptional<z.ZodString>;
            ui_path_id: z.ZodOptional<z.ZodString>;
            promotion_id: z.ZodOptional<z.ZodString>;
            content_payload_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
    }, z.core.$strip>>>;
    placements: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        category: z.ZodEnum<{
            fixed: "fixed";
            other_conversion: "other_conversion";
            retention: "retention";
            gated: "gated";
            usage_credit_seat: "usage_credit_seat";
            trials: "trials";
        }>;
        trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
            type: z.ZodLiteral<"surface_render">;
            slot_id: z.ZodString;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"entitlement_gate">;
            entitlement_handle: z.ZodString;
            tier_threshold: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"usage_threshold">;
            entitlement_handle: z.ZodString;
            threshold_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"credit_threshold">;
            entitlement_handle: z.ZodString;
            threshold_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"seat_threshold">;
            entitlement_handle: z.ZodString;
            threshold_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_started">;
            trial_type: z.ZodOptional<z.ZodEnum<{
                reverse: "reverse";
                free: "free";
            }>>;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_progress">;
            progress_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_ending">;
            days_before_end: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_ended">;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_converted">;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"qualifier">;
            qualifier: z.ZodString;
        }, z.core.$strip>], "type">;
        payloads: z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            target: z.ZodObject<{
                plan_ids: z.ZodArray<z.ZodString>;
                billing_cadences: z.ZodOptional<z.ZodArray<z.ZodString>>;
                segment_chips: z.ZodArray<z.ZodString>;
            }, z.core.$strip>;
            surfaces: z.ZodArray<z.ZodObject<{
                template_id: z.ZodString;
                fields: z.ZodRecord<z.ZodString, z.ZodString>;
                ctas: z.ZodArray<z.ZodObject<{
                    label: z.ZodString;
                    path: z.ZodEnum<{
                        custom: "custom";
                        open_checkout: "open_checkout";
                        view_plans: "view_plans";
                        book_demo: "book_demo";
                        contact_sales: "contact_sales";
                        complete_onboarding: "complete_onboarding";
                        invite_teammate: "invite_teammate";
                        refer_friend: "refer_friend";
                        verify_work_email: "verify_work_email";
                        update_payment_method: "update_payment_method";
                        enable_auto_renewal: "enable_auto_renewal";
                        manage_subscription: "manage_subscription";
                        switch_billing_period: "switch_billing_period";
                        extend_trial: "extend_trial";
                        open_rt_placement: "open_rt_placement";
                        dismiss: "dismiss";
                        snooze: "snooze";
                    }>;
                    config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                }, z.core.$strip>>;
            }, z.core.$strip>>;
            caps: z.ZodOptional<z.ZodObject<{
                max_per_period: z.ZodOptional<z.ZodObject<{
                    count: z.ZodNumber;
                    period: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        lifetime: "lifetime";
                        session: "session";
                    }>;
                }, z.core.$strip>>;
                cooldown_days: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>>;
            surface_slot_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
            remind_later_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            created_at: z.ZodOptional<z.ZodString>;
            recommendation_strategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
                custom: "custom";
                next_tier_up: "next_tier_up";
                best_value: "best_value";
            }>>>;
            recommendation_plan_override: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        order: z.ZodNumber;
        objective: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    content_promotions: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        discount: z.ZodString;
        type: z.ZodString;
        status: z.ZodString;
    }, z.core.$strip>>>;
    personalization_tokens: z.ZodOptional<z.ZodArray<z.ZodObject<{
        token: z.ZodString;
        label: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        category: z.ZodEnum<{
            custom: "custom";
            billing: "billing";
            plan: "plan";
            user: "user";
            trial: "trial";
            usage: "usage";
            promotion: "promotion";
        }>;
        data_source: z.ZodOptional<z.ZodString>;
        example_value: z.ZodOptional<z.ZodString>;
        value_map: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        format: z.ZodOptional<z.ZodEnum<{
            string: "string";
            number: "number";
            date: "date";
            currency: "currency";
            percentage: "percentage";
        }>>;
    }, z.core.$strip>>>;
    surface_templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        surface_type: z.ZodString;
        fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            type: z.ZodOptional<z.ZodString>;
            required: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strip>>>;
    }, z.core.$strip>>>;
    free_trial_rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        handle: z.ZodString;
        plan_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        segment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        trial_limit_type: z.ZodDefault<z.ZodEnum<{
            time: "time";
            usage: "usage";
        }>>;
        duration_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        grace_period_days: z.ZodDefault<z.ZodNumber>;
        usage_entitlement_handle: z.ZodOptional<z.ZodString>;
        usage_limit_value: z.ZodOptional<z.ZodNumber>;
        require_payment_method: z.ZodDefault<z.ZodBoolean>;
        auto_convert: z.ZodDefault<z.ZodBoolean>;
        convert_to_plan_id: z.ZodOptional<z.ZodString>;
        fallback_plan_id: z.ZodOptional<z.ZodString>;
        limit_per_customer: z.ZodDefault<z.ZodNumber>;
        is_active: z.ZodDefault<z.ZodBoolean>;
        metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strip>>>;
    reverse_trial_rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        handle: z.ZodString;
        premium_plan_id: z.ZodString;
        fallback_plan_id: z.ZodString;
        segment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        trial_limit_type: z.ZodDefault<z.ZodEnum<{
            time: "time";
            usage: "usage";
        }>>;
        duration_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        usage_entitlement_handle: z.ZodOptional<z.ZodString>;
        usage_limit_value: z.ZodOptional<z.ZodNumber>;
        start_policy: z.ZodDefault<z.ZodEnum<{
            manual: "manual";
            signup: "signup";
            first_premium_access: "first_premium_access";
        }>>;
        show_upgrade_prompt_at_day: z.ZodOptional<z.ZodNumber>;
        entitlements_during_trial: z.ZodDefault<z.ZodArray<z.ZodString>>;
        is_active: z.ZodDefault<z.ZodBoolean>;
        metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strip>>>;
    objectives: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        name: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    plan_variations: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        plan_handle: z.ZodString;
        billing_period: z.ZodEnum<{
            custom: "custom";
            monthly: "monthly";
            annual: "annual";
            one_time: "one_time";
        }>;
        segment_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_amount: z.ZodNumber;
        currency: z.ZodDefault<z.ZodString>;
        pricing_model: z.ZodEnum<{
            flat: "flat";
            per_unit: "per_unit";
            tiered: "tiered";
            metered: "metered";
        }>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
        stripe_price_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_source: z.ZodEnum<{
            stripe: "stripe";
            static: "static";
            clerk: "clerk";
        }>;
    }, z.core.$strip>>>;
    addon_variations: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        addon_handle: z.ZodString;
        billing_period: z.ZodEnum<{
            custom: "custom";
            monthly: "monthly";
            annual: "annual";
            one_time: "one_time";
        }>;
        segment_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_amount: z.ZodNumber;
        currency: z.ZodDefault<z.ZodString>;
        pricing_model: z.ZodEnum<{
            flat: "flat";
            per_unit: "per_unit";
            tiered: "tiered";
            metered: "metered";
        }>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
        stripe_price_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_source: z.ZodEnum<{
            stripe: "stripe";
            static: "static";
        }>;
    }, z.core.$strip>>>;
    extension_rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
        kind: z.ZodString;
        must_understand: z.ZodOptional<z.ZodBoolean>;
        schema_version: z.ZodNumber;
        config: z.ZodUnknown;
    }, z.core.$strip>>>;
    seat_types: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        name: z.ZodString;
        description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        is_default: z.ZodDefault<z.ZodBoolean>;
        is_buyer: z.ZodDefault<z.ZodBoolean>;
        entitlement_handles: z.ZodDefault<z.ZodArray<z.ZodString>>;
    }, z.core.$strip>>>;
    enforcement_defaults: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        entitlement_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        soft_limit_percent: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        hard_limit_percent: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        soft_limit_action: z.ZodString;
        hard_limit_action: z.ZodString;
        grace_period_hours: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        notification_channels: z.ZodDefault<z.ZodArray<z.ZodString>>;
        is_active: z.ZodDefault<z.ZodBoolean>;
    }, z.core.$strip>>>;
    placement_settings: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        global_frequency_cap: z.ZodDefault<z.ZodNullable<z.ZodObject<{
            capRules: z.ZodDefault<z.ZodArray<z.ZodObject<{
                id: z.ZodString;
                group: z.ZodArray<z.ZodObject<{
                    kind: z.ZodEnum<{
                        template: "template";
                        slot: "slot";
                    }>;
                    id: z.ZodString;
                    label: z.ZodOptional<z.ZodString>;
                }, z.core.$strip>>;
                cap: z.ZodObject<{
                    count: z.ZodNumber;
                    period: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        session: "session";
                    }>;
                }, z.core.$strip>;
            }, z.core.$strip>>>;
            sessionCooldownMinutes: z.ZodDefault<z.ZodNumber>;
            remindLaterMinutes: z.ZodDefault<z.ZodNumber>;
            testMode: z.ZodDefault<z.ZodEnum<{
                off: "off";
                test_users: "test_users";
                all_traffic: "all_traffic";
            }>>;
        }, z.core.$strip>>>;
        global_frequency_cap_period: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            hour: "hour";
            session: "session";
        }>>>;
        suppress_for_paid: z.ZodDefault<z.ZodBoolean>;
        suppress_for_trial: z.ZodDefault<z.ZodBoolean>;
        allow_stacking: z.ZodDefault<z.ZodBoolean>;
        priority_collision_strategy: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    }, z.core.$strip>>>;
    segment_dimensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        name: z.ZodString;
        category: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        visibility_toggle: z.ZodDefault<z.ZodBoolean>;
        source_type: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    }, z.core.$strip>>>;
    meter_bindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        entitlement_handle: z.ZodString;
        meter_handle: z.ZodString;
        limit: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        reset_period: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    }, z.core.$strip>>>;
    experiments: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
    signal_catalog: z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
}, z.core.$strip>>;
/**
 * Strict variant of the canonical config schema (plan 147 TASK-11, Workstream C,
 * REQ-8 / AC-6). Identical to `PlaybookSchema` — same legacy-header normalization,
 * same known fields — except the composed object is `.strict()`, so a
 * genuinely-unknown top-level key (a typo, a removed-phantom-field remnant) is
 * REJECTED with an `unrecognized_keys` issue instead of silently stripped.
 *
 * This is the "block" tier: the server import + SDK opt into it to hard-reject
 * unknown fields, while the shared `PlaybookSchema` / CLI stay lenient (strip and
 * warn). Strictness is opt-in — `PlaybookSchema`'s behavior is unchanged.
 *
 * Correctness nuance: the deprecated fields `theme`, `slot_configs`, and
 * `content_overrides` are DEFINED fields on `PlaybookBodySchema` (they carry
 * `schemaDeprecation` meta but ARE in the schema), so `.strict()` ACCEPTS them —
 * they are known keys, absorbed + warned about separately by the downstream
 * deprecation-repair pass. `.strict()` here rejects only keys that are not in the
 * schema at all. Because `normalizeConfigHeaderInput` deletes the legacy
 * `version` / `change_set_id` keys before the object schema runs, a legacy
 * `export-config.json` also passes the strict schema unchanged.
 *
 * Top-level strictness only (matching the CLI's top-level `unknownTopLevelKeys`
 * and REQ-8's "unknown top-level config fields"): nested item schemas are NOT
 * deep-`.strict()`ed. Like `PlaybookSchema`, the `.meta({ id })` rides on the
 * `z.preprocess` wrapper and the inner strict object stays id-less, so codegen
 * emits one `PlaybookStrict` component (a second id would trip "Duplicate schema
 * id").
 */
declare const PlaybookStrictSchema: z.ZodPreprocess<z.ZodObject<{
    artifact_type: z.ZodLiteral<"playbook">;
    format_version: z.ZodLiteral<"1.0.0">;
    playbook_handle: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    tenant_id: z.ZodOptional<z.ZodString>;
    environment_id: z.ZodOptional<z.ZodString>;
    project_id: z.ZodOptional<z.ZodString>;
    exported_at: z.ZodOptional<z.ZodString>;
    schema_version: z.ZodOptional<z.ZodString>;
    bundle_schema_version: z.ZodOptional<z.ZodNumber>;
    bundle_min_readable_schema_version: z.ZodOptional<z.ZodNumber>;
    plans: z.ZodArray<z.ZodObject<{
        unique_handle: z.ZodString;
        name: z.ZodString;
        tier_position: z.ZodDefault<z.ZodNumber>;
        sort_order: z.ZodDefault<z.ZodNumber>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
    }, z.core.$strip>>;
    addons: z.ZodOptional<z.ZodArray<z.ZodObject<{
        unique_handle: z.ZodString;
        name: z.ZodString;
        sort_order: z.ZodDefault<z.ZodNumber>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
    }, z.core.$strip>>>;
    entitlements: z.ZodArray<z.ZodObject<{
        unique_handle: z.ZodString;
        name: z.ZodString;
        type: z.ZodEnum<{
            feature: "feature";
            capability_tier: "capability_tier";
            usage_limit: "usage_limit";
            price_per_unit: "price_per_unit";
            rate_limit: "rate_limit";
            credits: "credits";
            seat: "seat";
        }>;
        unit: z.ZodOptional<z.ZodString>;
        tier_definitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            handle: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
    }, z.core.$strip>>;
    entitlement_rules: z.ZodArray<z.ZodObject<{
        current_usage: z.ZodDefault<z.ZodNumber>;
        allocation: z.ZodOptional<z.ZodEnum<{
            per_instance: "per_instance";
            account_pool: "account_pool";
            per_user: "per_user";
            per_user_pooled: "per_user_pooled";
        }>>;
        objective: z.ZodOptional<z.ZodString>;
        enabled: z.ZodOptional<z.ZodBoolean>;
        currency: z.ZodOptional<z.ZodString>;
        enforcement: z.ZodOptional<z.ZodEnum<{
            hard_block: "hard_block";
            block_with_upsell: "block_with_upsell";
            degrade: "degrade";
            allow_overage: "allow_overage";
        }>>;
        seat_type_id: z.ZodOptional<z.ZodString>;
        period_scope: z.ZodOptional<z.ZodEnum<{
            per_month: "per_month";
            per_year: "per_year";
            per_billing_period: "per_billing_period";
            lifetime: "lifetime";
            concurrent: "concurrent";
            per_instance: "per_instance";
            per_second: "per_second";
            per_minute: "per_minute";
            per_hour: "per_hour";
            per_6_hours: "per_6_hours";
            per_day: "per_day";
            per_week: "per_week";
        }>>;
        reset_period: z.ZodOptional<z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            year: "year";
            quarter: "quarter";
            billing_period: "billing_period";
            hour: "hour";
            six_hours: "six_hours";
        }>>;
        limit_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
        tier_value: z.ZodOptional<z.ZodString>;
        rate_value: z.ZodOptional<z.ZodNumber>;
        initial_grant: z.ZodOptional<z.ZodNumber>;
        allowance_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
        rollover_enabled: z.ZodOptional<z.ZodBoolean>;
        max_balance: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>>;
        included_count: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
        max_seats: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>>;
        amount_cents: z.ZodOptional<z.ZodNumber>;
        id: z.ZodString;
        entitlement_id: z.ZodString;
        targets: z.ZodArray<z.ZodObject<{
            kind: z.ZodEnum<{
                plan: "plan";
                addon: "addon";
                plan_variation: "plan_variation";
                addon_variation: "addon_variation";
            }>;
            id: z.ZodString;
        }, z.core.$strip>>;
        segment_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
        kind: z.ZodOptional<z.ZodEnum<{
            feature: "feature";
            capability_tier: "capability_tier";
            usage_limit: "usage_limit";
            price_per_unit: "price_per_unit";
            rate_limit: "rate_limit";
            credits: "credits";
            seat: "seat";
        }>>;
        unit: z.ZodOptional<z.ZodString>;
        tier_name: z.ZodOptional<z.ZodString>;
        tier_description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    segments: z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        handle: z.ZodString;
        predicates: z.ZodOptional<z.ZodArray<z.ZodObject<{
            field: z.ZodString;
            operator: z.ZodEnum<{
                in: "in";
                eq: "eq";
                neq: "neq";
                gte: "gte";
                lte: "lte";
                contains: "contains";
                gt: "gt";
                lt: "lt";
            }>;
            value: z.ZodString;
        }, z.core.$strip>>>;
        dimension_id: z.ZodOptional<z.ZodString>;
        experiment_handle: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    content_ui_paths: z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        action_type: z.ZodEnum<{
            book_demo: "book_demo";
            contact_sales: "contact_sales";
            complete_onboarding: "complete_onboarding";
            invite_teammate: "invite_teammate";
            refer_friend: "refer_friend";
            verify_work_email: "verify_work_email";
            update_payment_method: "update_payment_method";
            enable_auto_renewal: "enable_auto_renewal";
            manage_subscription: "manage_subscription";
            switch_billing_period: "switch_billing_period";
            extend_trial: "extend_trial";
            dismiss: "dismiss";
            snooze: "snooze";
            open_checkout_modal: "open_checkout_modal";
            navigate_to_plans: "navigate_to_plans";
            open_upgrade_modal: "open_upgrade_modal";
            open_placement: "open_placement";
            open_feature_tour: "open_feature_tour";
            custom_url: "custom_url";
        }>;
        plan_handle: z.ZodOptional<z.ZodString>;
        promotion_id: z.ZodOptional<z.ZodString>;
        placement_handle: z.ZodOptional<z.ZodString>;
        url: z.ZodOptional<z.ZodString>;
        tour_id: z.ZodOptional<z.ZodString>;
        target_billing_period: z.ZodOptional<z.ZodEnum<{
            monthly: "monthly";
            annual: "annual";
        }>>;
        description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    slot_configs: z.ZodOptional<z.ZodArray<z.ZodObject<{
        slot_id: z.ZodString;
        active: z.ZodBoolean;
        triggers: z.ZodArray<z.ZodString>;
    }, z.core.$strip>>>;
    content_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
    theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    placement_slots: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        label: z.ZodString;
        description: z.ZodString;
        surface_type: z.ZodString;
        placement_handle: z.ZodString;
        template: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    message_blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
        block_id: z.ZodString;
        tenant_id: z.ZodString;
        name: z.ZodString;
        surface_template_id: z.ZodOptional<z.ZodString>;
        default_content: z.ZodObject<{
            header: z.ZodOptional<z.ZodString>;
            body: z.ZodOptional<z.ZodString>;
            cta_label: z.ZodOptional<z.ZodString>;
            secondary_cta_label: z.ZodOptional<z.ZodString>;
        }, z.core.$catchall<z.ZodUnknown>>;
        segment_overrides: z.ZodOptional<z.ZodArray<z.ZodObject<{
            segment_value_id: z.ZodString;
            content: z.ZodObject<{
                header: z.ZodOptional<z.ZodString>;
                body: z.ZodOptional<z.ZodString>;
                cta_label: z.ZodOptional<z.ZodString>;
                secondary_cta_label: z.ZodOptional<z.ZodString>;
            }, z.core.$catchall<z.ZodUnknown>>;
        }, z.core.$strip>>>;
        child_blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
            slot: z.ZodString;
            block_id: z.ZodString;
        }, z.core.$strip>>>;
        tokens_used: z.ZodOptional<z.ZodArray<z.ZodString>>;
        status: z.ZodEnum<{
            active: "active";
            draft: "draft";
            archived: "archived";
        }>;
        created_at: z.ZodString;
        updated_at: z.ZodString;
    }, z.core.$strip>>>;
    placement_payloads: z.ZodOptional<z.ZodArray<z.ZodObject<{
        payload_id: z.ZodString;
        placement_id: z.ZodString;
        target: z.ZodObject<{
            plan_ids: z.ZodArray<z.ZodString>;
            billing_cadences: z.ZodOptional<z.ZodArray<z.ZodString>>;
            segment_chips: z.ZodArray<z.ZodString>;
        }, z.core.$strip>;
        caps: z.ZodOptional<z.ZodObject<{
            max_per_period: z.ZodOptional<z.ZodObject<{
                count: z.ZodNumber;
                period: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    lifetime: "lifetime";
                    session: "session";
                }>;
            }, z.core.$strip>>;
            cooldown_days: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>;
        remind_later_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        created_at: z.ZodString;
        updated_at: z.ZodOptional<z.ZodString>;
        source_mode: z.ZodEnum<{
            inline: "inline";
            content_linked: "content_linked";
        }>;
        surfaces: z.ZodOptional<z.ZodArray<z.ZodObject<{
            template_id: z.ZodString;
            fields: z.ZodRecord<z.ZodString, z.ZodString>;
            ctas: z.ZodArray<z.ZodObject<{
                label: z.ZodString;
                path: z.ZodEnum<{
                    custom: "custom";
                    open_checkout: "open_checkout";
                    view_plans: "view_plans";
                    book_demo: "book_demo";
                    contact_sales: "contact_sales";
                    complete_onboarding: "complete_onboarding";
                    invite_teammate: "invite_teammate";
                    refer_friend: "refer_friend";
                    verify_work_email: "verify_work_email";
                    update_payment_method: "update_payment_method";
                    enable_auto_renewal: "enable_auto_renewal";
                    manage_subscription: "manage_subscription";
                    switch_billing_period: "switch_billing_period";
                    extend_trial: "extend_trial";
                    open_rt_placement: "open_rt_placement";
                    dismiss: "dismiss";
                    snooze: "snooze";
                }>;
                config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            }, z.core.$strip>>;
        }, z.core.$strip>>>;
        surface_slot_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
        content_link: z.ZodOptional<z.ZodObject<{
            message_block_id: z.ZodOptional<z.ZodString>;
            ui_path_id: z.ZodOptional<z.ZodString>;
            promotion_id: z.ZodOptional<z.ZodString>;
            content_payload_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
    }, z.core.$strip>>>;
    placements: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        category: z.ZodEnum<{
            fixed: "fixed";
            other_conversion: "other_conversion";
            retention: "retention";
            gated: "gated";
            usage_credit_seat: "usage_credit_seat";
            trials: "trials";
        }>;
        trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
            type: z.ZodLiteral<"surface_render">;
            slot_id: z.ZodString;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"entitlement_gate">;
            entitlement_handle: z.ZodString;
            tier_threshold: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"usage_threshold">;
            entitlement_handle: z.ZodString;
            threshold_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"credit_threshold">;
            entitlement_handle: z.ZodString;
            threshold_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"seat_threshold">;
            entitlement_handle: z.ZodString;
            threshold_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_started">;
            trial_type: z.ZodOptional<z.ZodEnum<{
                reverse: "reverse";
                free: "free";
            }>>;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_progress">;
            progress_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_ending">;
            days_before_end: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_ended">;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_converted">;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"qualifier">;
            qualifier: z.ZodString;
        }, z.core.$strip>], "type">;
        payloads: z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            target: z.ZodObject<{
                plan_ids: z.ZodArray<z.ZodString>;
                billing_cadences: z.ZodOptional<z.ZodArray<z.ZodString>>;
                segment_chips: z.ZodArray<z.ZodString>;
            }, z.core.$strip>;
            surfaces: z.ZodArray<z.ZodObject<{
                template_id: z.ZodString;
                fields: z.ZodRecord<z.ZodString, z.ZodString>;
                ctas: z.ZodArray<z.ZodObject<{
                    label: z.ZodString;
                    path: z.ZodEnum<{
                        custom: "custom";
                        open_checkout: "open_checkout";
                        view_plans: "view_plans";
                        book_demo: "book_demo";
                        contact_sales: "contact_sales";
                        complete_onboarding: "complete_onboarding";
                        invite_teammate: "invite_teammate";
                        refer_friend: "refer_friend";
                        verify_work_email: "verify_work_email";
                        update_payment_method: "update_payment_method";
                        enable_auto_renewal: "enable_auto_renewal";
                        manage_subscription: "manage_subscription";
                        switch_billing_period: "switch_billing_period";
                        extend_trial: "extend_trial";
                        open_rt_placement: "open_rt_placement";
                        dismiss: "dismiss";
                        snooze: "snooze";
                    }>;
                    config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                }, z.core.$strip>>;
            }, z.core.$strip>>;
            caps: z.ZodOptional<z.ZodObject<{
                max_per_period: z.ZodOptional<z.ZodObject<{
                    count: z.ZodNumber;
                    period: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        lifetime: "lifetime";
                        session: "session";
                    }>;
                }, z.core.$strip>>;
                cooldown_days: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>>;
            surface_slot_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
            remind_later_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            created_at: z.ZodOptional<z.ZodString>;
            recommendation_strategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
                custom: "custom";
                next_tier_up: "next_tier_up";
                best_value: "best_value";
            }>>>;
            recommendation_plan_override: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        order: z.ZodNumber;
        objective: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    content_promotions: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        discount: z.ZodString;
        type: z.ZodString;
        status: z.ZodString;
    }, z.core.$strip>>>;
    personalization_tokens: z.ZodOptional<z.ZodArray<z.ZodObject<{
        token: z.ZodString;
        label: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        category: z.ZodEnum<{
            custom: "custom";
            billing: "billing";
            plan: "plan";
            user: "user";
            trial: "trial";
            usage: "usage";
            promotion: "promotion";
        }>;
        data_source: z.ZodOptional<z.ZodString>;
        example_value: z.ZodOptional<z.ZodString>;
        value_map: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        format: z.ZodOptional<z.ZodEnum<{
            string: "string";
            number: "number";
            date: "date";
            currency: "currency";
            percentage: "percentage";
        }>>;
    }, z.core.$strip>>>;
    surface_templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        surface_type: z.ZodString;
        fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            type: z.ZodOptional<z.ZodString>;
            required: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strip>>>;
    }, z.core.$strip>>>;
    free_trial_rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        handle: z.ZodString;
        plan_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        segment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        trial_limit_type: z.ZodDefault<z.ZodEnum<{
            time: "time";
            usage: "usage";
        }>>;
        duration_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        grace_period_days: z.ZodDefault<z.ZodNumber>;
        usage_entitlement_handle: z.ZodOptional<z.ZodString>;
        usage_limit_value: z.ZodOptional<z.ZodNumber>;
        require_payment_method: z.ZodDefault<z.ZodBoolean>;
        auto_convert: z.ZodDefault<z.ZodBoolean>;
        convert_to_plan_id: z.ZodOptional<z.ZodString>;
        fallback_plan_id: z.ZodOptional<z.ZodString>;
        limit_per_customer: z.ZodDefault<z.ZodNumber>;
        is_active: z.ZodDefault<z.ZodBoolean>;
        metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strip>>>;
    reverse_trial_rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        handle: z.ZodString;
        premium_plan_id: z.ZodString;
        fallback_plan_id: z.ZodString;
        segment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        trial_limit_type: z.ZodDefault<z.ZodEnum<{
            time: "time";
            usage: "usage";
        }>>;
        duration_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        usage_entitlement_handle: z.ZodOptional<z.ZodString>;
        usage_limit_value: z.ZodOptional<z.ZodNumber>;
        start_policy: z.ZodDefault<z.ZodEnum<{
            manual: "manual";
            signup: "signup";
            first_premium_access: "first_premium_access";
        }>>;
        show_upgrade_prompt_at_day: z.ZodOptional<z.ZodNumber>;
        entitlements_during_trial: z.ZodDefault<z.ZodArray<z.ZodString>>;
        is_active: z.ZodDefault<z.ZodBoolean>;
        metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strip>>>;
    objectives: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        name: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    plan_variations: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        plan_handle: z.ZodString;
        billing_period: z.ZodEnum<{
            custom: "custom";
            monthly: "monthly";
            annual: "annual";
            one_time: "one_time";
        }>;
        segment_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_amount: z.ZodNumber;
        currency: z.ZodDefault<z.ZodString>;
        pricing_model: z.ZodEnum<{
            flat: "flat";
            per_unit: "per_unit";
            tiered: "tiered";
            metered: "metered";
        }>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
        stripe_price_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_source: z.ZodEnum<{
            stripe: "stripe";
            static: "static";
            clerk: "clerk";
        }>;
    }, z.core.$strip>>>;
    addon_variations: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        addon_handle: z.ZodString;
        billing_period: z.ZodEnum<{
            custom: "custom";
            monthly: "monthly";
            annual: "annual";
            one_time: "one_time";
        }>;
        segment_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_amount: z.ZodNumber;
        currency: z.ZodDefault<z.ZodString>;
        pricing_model: z.ZodEnum<{
            flat: "flat";
            per_unit: "per_unit";
            tiered: "tiered";
            metered: "metered";
        }>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
        stripe_price_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_source: z.ZodEnum<{
            stripe: "stripe";
            static: "static";
        }>;
    }, z.core.$strip>>>;
    extension_rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
        kind: z.ZodString;
        must_understand: z.ZodOptional<z.ZodBoolean>;
        schema_version: z.ZodNumber;
        config: z.ZodUnknown;
    }, z.core.$strip>>>;
    seat_types: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        name: z.ZodString;
        description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        is_default: z.ZodDefault<z.ZodBoolean>;
        is_buyer: z.ZodDefault<z.ZodBoolean>;
        entitlement_handles: z.ZodDefault<z.ZodArray<z.ZodString>>;
    }, z.core.$strip>>>;
    enforcement_defaults: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        entitlement_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        soft_limit_percent: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        hard_limit_percent: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        soft_limit_action: z.ZodString;
        hard_limit_action: z.ZodString;
        grace_period_hours: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        notification_channels: z.ZodDefault<z.ZodArray<z.ZodString>>;
        is_active: z.ZodDefault<z.ZodBoolean>;
    }, z.core.$strip>>>;
    placement_settings: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        global_frequency_cap: z.ZodDefault<z.ZodNullable<z.ZodObject<{
            capRules: z.ZodDefault<z.ZodArray<z.ZodObject<{
                id: z.ZodString;
                group: z.ZodArray<z.ZodObject<{
                    kind: z.ZodEnum<{
                        template: "template";
                        slot: "slot";
                    }>;
                    id: z.ZodString;
                    label: z.ZodOptional<z.ZodString>;
                }, z.core.$strip>>;
                cap: z.ZodObject<{
                    count: z.ZodNumber;
                    period: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        session: "session";
                    }>;
                }, z.core.$strip>;
            }, z.core.$strip>>>;
            sessionCooldownMinutes: z.ZodDefault<z.ZodNumber>;
            remindLaterMinutes: z.ZodDefault<z.ZodNumber>;
            testMode: z.ZodDefault<z.ZodEnum<{
                off: "off";
                test_users: "test_users";
                all_traffic: "all_traffic";
            }>>;
        }, z.core.$strip>>>;
        global_frequency_cap_period: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            hour: "hour";
            session: "session";
        }>>>;
        suppress_for_paid: z.ZodDefault<z.ZodBoolean>;
        suppress_for_trial: z.ZodDefault<z.ZodBoolean>;
        allow_stacking: z.ZodDefault<z.ZodBoolean>;
        priority_collision_strategy: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    }, z.core.$strip>>>;
    segment_dimensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        name: z.ZodString;
        category: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        visibility_toggle: z.ZodDefault<z.ZodBoolean>;
        source_type: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    }, z.core.$strip>>>;
    meter_bindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        entitlement_handle: z.ZodString;
        meter_handle: z.ZodString;
        limit: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        reset_period: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    }, z.core.$strip>>>;
    experiments: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
    signal_catalog: z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
}, z.core.$strict>>;
/**
 * @deprecated Deprecated name for the one concrete config (`PlaybookSchema`).
 * Retained so existing `@revt-eng/schema` consumers keep resolving; new code
 * should import `PlaybookSchema`. Because it *is* `PlaybookSchema`, it now parses
 * the canonical Playbook and the legacy `export-config.json` shape alike.
 */
declare const RevTurbineConfigSchema: z.ZodPreprocess<z.ZodObject<{
    artifact_type: z.ZodLiteral<"playbook">;
    format_version: z.ZodLiteral<"1.0.0">;
    playbook_handle: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    tenant_id: z.ZodOptional<z.ZodString>;
    environment_id: z.ZodOptional<z.ZodString>;
    project_id: z.ZodOptional<z.ZodString>;
    exported_at: z.ZodOptional<z.ZodString>;
    schema_version: z.ZodOptional<z.ZodString>;
    bundle_schema_version: z.ZodOptional<z.ZodNumber>;
    bundle_min_readable_schema_version: z.ZodOptional<z.ZodNumber>;
    plans: z.ZodArray<z.ZodObject<{
        unique_handle: z.ZodString;
        name: z.ZodString;
        tier_position: z.ZodDefault<z.ZodNumber>;
        sort_order: z.ZodDefault<z.ZodNumber>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
    }, z.core.$strip>>;
    addons: z.ZodOptional<z.ZodArray<z.ZodObject<{
        unique_handle: z.ZodString;
        name: z.ZodString;
        sort_order: z.ZodDefault<z.ZodNumber>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
    }, z.core.$strip>>>;
    entitlements: z.ZodArray<z.ZodObject<{
        unique_handle: z.ZodString;
        name: z.ZodString;
        type: z.ZodEnum<{
            feature: "feature";
            capability_tier: "capability_tier";
            usage_limit: "usage_limit";
            price_per_unit: "price_per_unit";
            rate_limit: "rate_limit";
            credits: "credits";
            seat: "seat";
        }>;
        unit: z.ZodOptional<z.ZodString>;
        tier_definitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            handle: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
    }, z.core.$strip>>;
    entitlement_rules: z.ZodArray<z.ZodObject<{
        current_usage: z.ZodDefault<z.ZodNumber>;
        allocation: z.ZodOptional<z.ZodEnum<{
            per_instance: "per_instance";
            account_pool: "account_pool";
            per_user: "per_user";
            per_user_pooled: "per_user_pooled";
        }>>;
        objective: z.ZodOptional<z.ZodString>;
        enabled: z.ZodOptional<z.ZodBoolean>;
        currency: z.ZodOptional<z.ZodString>;
        enforcement: z.ZodOptional<z.ZodEnum<{
            hard_block: "hard_block";
            block_with_upsell: "block_with_upsell";
            degrade: "degrade";
            allow_overage: "allow_overage";
        }>>;
        seat_type_id: z.ZodOptional<z.ZodString>;
        period_scope: z.ZodOptional<z.ZodEnum<{
            per_month: "per_month";
            per_year: "per_year";
            per_billing_period: "per_billing_period";
            lifetime: "lifetime";
            concurrent: "concurrent";
            per_instance: "per_instance";
            per_second: "per_second";
            per_minute: "per_minute";
            per_hour: "per_hour";
            per_6_hours: "per_6_hours";
            per_day: "per_day";
            per_week: "per_week";
        }>>;
        reset_period: z.ZodOptional<z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            year: "year";
            quarter: "quarter";
            billing_period: "billing_period";
            hour: "hour";
            six_hours: "six_hours";
        }>>;
        limit_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
        tier_value: z.ZodOptional<z.ZodString>;
        rate_value: z.ZodOptional<z.ZodNumber>;
        initial_grant: z.ZodOptional<z.ZodNumber>;
        allowance_value: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
        rollover_enabled: z.ZodOptional<z.ZodBoolean>;
        max_balance: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>>;
        included_count: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>;
        max_seats: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>>>;
        amount_cents: z.ZodOptional<z.ZodNumber>;
        id: z.ZodString;
        entitlement_id: z.ZodString;
        targets: z.ZodArray<z.ZodObject<{
            kind: z.ZodEnum<{
                plan: "plan";
                addon: "addon";
                plan_variation: "plan_variation";
                addon_variation: "addon_variation";
            }>;
            id: z.ZodString;
        }, z.core.$strip>>;
        segment_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
        kind: z.ZodOptional<z.ZodEnum<{
            feature: "feature";
            capability_tier: "capability_tier";
            usage_limit: "usage_limit";
            price_per_unit: "price_per_unit";
            rate_limit: "rate_limit";
            credits: "credits";
            seat: "seat";
        }>>;
        unit: z.ZodOptional<z.ZodString>;
        tier_name: z.ZodOptional<z.ZodString>;
        tier_description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    segments: z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        handle: z.ZodString;
        predicates: z.ZodOptional<z.ZodArray<z.ZodObject<{
            field: z.ZodString;
            operator: z.ZodEnum<{
                in: "in";
                eq: "eq";
                neq: "neq";
                gte: "gte";
                lte: "lte";
                contains: "contains";
                gt: "gt";
                lt: "lt";
            }>;
            value: z.ZodString;
        }, z.core.$strip>>>;
        dimension_id: z.ZodOptional<z.ZodString>;
        experiment_handle: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    content_ui_paths: z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        action_type: z.ZodEnum<{
            book_demo: "book_demo";
            contact_sales: "contact_sales";
            complete_onboarding: "complete_onboarding";
            invite_teammate: "invite_teammate";
            refer_friend: "refer_friend";
            verify_work_email: "verify_work_email";
            update_payment_method: "update_payment_method";
            enable_auto_renewal: "enable_auto_renewal";
            manage_subscription: "manage_subscription";
            switch_billing_period: "switch_billing_period";
            extend_trial: "extend_trial";
            dismiss: "dismiss";
            snooze: "snooze";
            open_checkout_modal: "open_checkout_modal";
            navigate_to_plans: "navigate_to_plans";
            open_upgrade_modal: "open_upgrade_modal";
            open_placement: "open_placement";
            open_feature_tour: "open_feature_tour";
            custom_url: "custom_url";
        }>;
        plan_handle: z.ZodOptional<z.ZodString>;
        promotion_id: z.ZodOptional<z.ZodString>;
        placement_handle: z.ZodOptional<z.ZodString>;
        url: z.ZodOptional<z.ZodString>;
        tour_id: z.ZodOptional<z.ZodString>;
        target_billing_period: z.ZodOptional<z.ZodEnum<{
            monthly: "monthly";
            annual: "annual";
        }>>;
        description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    slot_configs: z.ZodOptional<z.ZodArray<z.ZodObject<{
        slot_id: z.ZodString;
        active: z.ZodBoolean;
        triggers: z.ZodArray<z.ZodString>;
    }, z.core.$strip>>>;
    content_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
    theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    placement_slots: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        label: z.ZodString;
        description: z.ZodString;
        surface_type: z.ZodString;
        placement_handle: z.ZodString;
        template: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    message_blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
        block_id: z.ZodString;
        tenant_id: z.ZodString;
        name: z.ZodString;
        surface_template_id: z.ZodOptional<z.ZodString>;
        default_content: z.ZodObject<{
            header: z.ZodOptional<z.ZodString>;
            body: z.ZodOptional<z.ZodString>;
            cta_label: z.ZodOptional<z.ZodString>;
            secondary_cta_label: z.ZodOptional<z.ZodString>;
        }, z.core.$catchall<z.ZodUnknown>>;
        segment_overrides: z.ZodOptional<z.ZodArray<z.ZodObject<{
            segment_value_id: z.ZodString;
            content: z.ZodObject<{
                header: z.ZodOptional<z.ZodString>;
                body: z.ZodOptional<z.ZodString>;
                cta_label: z.ZodOptional<z.ZodString>;
                secondary_cta_label: z.ZodOptional<z.ZodString>;
            }, z.core.$catchall<z.ZodUnknown>>;
        }, z.core.$strip>>>;
        child_blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
            slot: z.ZodString;
            block_id: z.ZodString;
        }, z.core.$strip>>>;
        tokens_used: z.ZodOptional<z.ZodArray<z.ZodString>>;
        status: z.ZodEnum<{
            active: "active";
            draft: "draft";
            archived: "archived";
        }>;
        created_at: z.ZodString;
        updated_at: z.ZodString;
    }, z.core.$strip>>>;
    placement_payloads: z.ZodOptional<z.ZodArray<z.ZodObject<{
        payload_id: z.ZodString;
        placement_id: z.ZodString;
        target: z.ZodObject<{
            plan_ids: z.ZodArray<z.ZodString>;
            billing_cadences: z.ZodOptional<z.ZodArray<z.ZodString>>;
            segment_chips: z.ZodArray<z.ZodString>;
        }, z.core.$strip>;
        caps: z.ZodOptional<z.ZodObject<{
            max_per_period: z.ZodOptional<z.ZodObject<{
                count: z.ZodNumber;
                period: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    lifetime: "lifetime";
                    session: "session";
                }>;
            }, z.core.$strip>>;
            cooldown_days: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>;
        remind_later_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        created_at: z.ZodString;
        updated_at: z.ZodOptional<z.ZodString>;
        source_mode: z.ZodEnum<{
            inline: "inline";
            content_linked: "content_linked";
        }>;
        surfaces: z.ZodOptional<z.ZodArray<z.ZodObject<{
            template_id: z.ZodString;
            fields: z.ZodRecord<z.ZodString, z.ZodString>;
            ctas: z.ZodArray<z.ZodObject<{
                label: z.ZodString;
                path: z.ZodEnum<{
                    custom: "custom";
                    open_checkout: "open_checkout";
                    view_plans: "view_plans";
                    book_demo: "book_demo";
                    contact_sales: "contact_sales";
                    complete_onboarding: "complete_onboarding";
                    invite_teammate: "invite_teammate";
                    refer_friend: "refer_friend";
                    verify_work_email: "verify_work_email";
                    update_payment_method: "update_payment_method";
                    enable_auto_renewal: "enable_auto_renewal";
                    manage_subscription: "manage_subscription";
                    switch_billing_period: "switch_billing_period";
                    extend_trial: "extend_trial";
                    open_rt_placement: "open_rt_placement";
                    dismiss: "dismiss";
                    snooze: "snooze";
                }>;
                config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            }, z.core.$strip>>;
        }, z.core.$strip>>>;
        surface_slot_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
        content_link: z.ZodOptional<z.ZodObject<{
            message_block_id: z.ZodOptional<z.ZodString>;
            ui_path_id: z.ZodOptional<z.ZodString>;
            promotion_id: z.ZodOptional<z.ZodString>;
            content_payload_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
    }, z.core.$strip>>>;
    placements: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        category: z.ZodEnum<{
            fixed: "fixed";
            other_conversion: "other_conversion";
            retention: "retention";
            gated: "gated";
            usage_credit_seat: "usage_credit_seat";
            trials: "trials";
        }>;
        trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
            type: z.ZodLiteral<"surface_render">;
            slot_id: z.ZodString;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"entitlement_gate">;
            entitlement_handle: z.ZodString;
            tier_threshold: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"usage_threshold">;
            entitlement_handle: z.ZodString;
            threshold_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"credit_threshold">;
            entitlement_handle: z.ZodString;
            threshold_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"seat_threshold">;
            entitlement_handle: z.ZodString;
            threshold_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_started">;
            trial_type: z.ZodOptional<z.ZodEnum<{
                reverse: "reverse";
                free: "free";
            }>>;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_progress">;
            progress_percent: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_ending">;
            days_before_end: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_ended">;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"trial_converted">;
        }, z.core.$strip>, z.ZodObject<{
            type: z.ZodLiteral<"qualifier">;
            qualifier: z.ZodString;
        }, z.core.$strip>], "type">;
        payloads: z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            target: z.ZodObject<{
                plan_ids: z.ZodArray<z.ZodString>;
                billing_cadences: z.ZodOptional<z.ZodArray<z.ZodString>>;
                segment_chips: z.ZodArray<z.ZodString>;
            }, z.core.$strip>;
            surfaces: z.ZodArray<z.ZodObject<{
                template_id: z.ZodString;
                fields: z.ZodRecord<z.ZodString, z.ZodString>;
                ctas: z.ZodArray<z.ZodObject<{
                    label: z.ZodString;
                    path: z.ZodEnum<{
                        custom: "custom";
                        open_checkout: "open_checkout";
                        view_plans: "view_plans";
                        book_demo: "book_demo";
                        contact_sales: "contact_sales";
                        complete_onboarding: "complete_onboarding";
                        invite_teammate: "invite_teammate";
                        refer_friend: "refer_friend";
                        verify_work_email: "verify_work_email";
                        update_payment_method: "update_payment_method";
                        enable_auto_renewal: "enable_auto_renewal";
                        manage_subscription: "manage_subscription";
                        switch_billing_period: "switch_billing_period";
                        extend_trial: "extend_trial";
                        open_rt_placement: "open_rt_placement";
                        dismiss: "dismiss";
                        snooze: "snooze";
                    }>;
                    config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                }, z.core.$strip>>;
            }, z.core.$strip>>;
            caps: z.ZodOptional<z.ZodObject<{
                max_per_period: z.ZodOptional<z.ZodObject<{
                    count: z.ZodNumber;
                    period: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        lifetime: "lifetime";
                        session: "session";
                    }>;
                }, z.core.$strip>>;
                cooldown_days: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>>;
            surface_slot_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
            remind_later_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
            created_at: z.ZodOptional<z.ZodString>;
            recommendation_strategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
                custom: "custom";
                next_tier_up: "next_tier_up";
                best_value: "best_value";
            }>>>;
            recommendation_plan_override: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        order: z.ZodNumber;
        objective: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    content_promotions: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        discount: z.ZodString;
        type: z.ZodString;
        status: z.ZodString;
    }, z.core.$strip>>>;
    personalization_tokens: z.ZodOptional<z.ZodArray<z.ZodObject<{
        token: z.ZodString;
        label: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        category: z.ZodEnum<{
            custom: "custom";
            billing: "billing";
            plan: "plan";
            user: "user";
            trial: "trial";
            usage: "usage";
            promotion: "promotion";
        }>;
        data_source: z.ZodOptional<z.ZodString>;
        example_value: z.ZodOptional<z.ZodString>;
        value_map: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        format: z.ZodOptional<z.ZodEnum<{
            string: "string";
            number: "number";
            date: "date";
            currency: "currency";
            percentage: "percentage";
        }>>;
    }, z.core.$strip>>>;
    surface_templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        surface_type: z.ZodString;
        fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            type: z.ZodOptional<z.ZodString>;
            required: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strip>>>;
    }, z.core.$strip>>>;
    free_trial_rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        handle: z.ZodString;
        plan_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        segment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        trial_limit_type: z.ZodDefault<z.ZodEnum<{
            time: "time";
            usage: "usage";
        }>>;
        duration_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        grace_period_days: z.ZodDefault<z.ZodNumber>;
        usage_entitlement_handle: z.ZodOptional<z.ZodString>;
        usage_limit_value: z.ZodOptional<z.ZodNumber>;
        require_payment_method: z.ZodDefault<z.ZodBoolean>;
        auto_convert: z.ZodDefault<z.ZodBoolean>;
        convert_to_plan_id: z.ZodOptional<z.ZodString>;
        fallback_plan_id: z.ZodOptional<z.ZodString>;
        limit_per_customer: z.ZodDefault<z.ZodNumber>;
        is_active: z.ZodDefault<z.ZodBoolean>;
        metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strip>>>;
    reverse_trial_rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        handle: z.ZodString;
        premium_plan_id: z.ZodString;
        fallback_plan_id: z.ZodString;
        segment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        trial_limit_type: z.ZodDefault<z.ZodEnum<{
            time: "time";
            usage: "usage";
        }>>;
        duration_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        usage_entitlement_handle: z.ZodOptional<z.ZodString>;
        usage_limit_value: z.ZodOptional<z.ZodNumber>;
        start_policy: z.ZodDefault<z.ZodEnum<{
            manual: "manual";
            signup: "signup";
            first_premium_access: "first_premium_access";
        }>>;
        show_upgrade_prompt_at_day: z.ZodOptional<z.ZodNumber>;
        entitlements_during_trial: z.ZodDefault<z.ZodArray<z.ZodString>>;
        is_active: z.ZodDefault<z.ZodBoolean>;
        metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strip>>>;
    objectives: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        name: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    plan_variations: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        plan_handle: z.ZodString;
        billing_period: z.ZodEnum<{
            custom: "custom";
            monthly: "monthly";
            annual: "annual";
            one_time: "one_time";
        }>;
        segment_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_amount: z.ZodNumber;
        currency: z.ZodDefault<z.ZodString>;
        pricing_model: z.ZodEnum<{
            flat: "flat";
            per_unit: "per_unit";
            tiered: "tiered";
            metered: "metered";
        }>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
        stripe_price_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_source: z.ZodEnum<{
            stripe: "stripe";
            static: "static";
            clerk: "clerk";
        }>;
    }, z.core.$strip>>>;
    addon_variations: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        addon_handle: z.ZodString;
        billing_period: z.ZodEnum<{
            custom: "custom";
            monthly: "monthly";
            annual: "annual";
            one_time: "one_time";
        }>;
        segment_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_amount: z.ZodNumber;
        currency: z.ZodDefault<z.ZodString>;
        pricing_model: z.ZodEnum<{
            flat: "flat";
            per_unit: "per_unit";
            tiered: "tiered";
            metered: "metered";
        }>;
        visibility: z.ZodDefault<z.ZodEnum<{
            legacy: "legacy";
            public: "public";
            unlisted: "unlisted";
        }>>;
        stripe_price_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        price_source: z.ZodEnum<{
            stripe: "stripe";
            static: "static";
        }>;
    }, z.core.$strip>>>;
    extension_rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
        kind: z.ZodString;
        must_understand: z.ZodOptional<z.ZodBoolean>;
        schema_version: z.ZodNumber;
        config: z.ZodUnknown;
    }, z.core.$strip>>>;
    seat_types: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        name: z.ZodString;
        description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        is_default: z.ZodDefault<z.ZodBoolean>;
        is_buyer: z.ZodDefault<z.ZodBoolean>;
        entitlement_handles: z.ZodDefault<z.ZodArray<z.ZodString>>;
    }, z.core.$strip>>>;
    enforcement_defaults: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        entitlement_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        soft_limit_percent: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        hard_limit_percent: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        soft_limit_action: z.ZodString;
        hard_limit_action: z.ZodString;
        grace_period_hours: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        notification_channels: z.ZodDefault<z.ZodArray<z.ZodString>>;
        is_active: z.ZodDefault<z.ZodBoolean>;
    }, z.core.$strip>>>;
    placement_settings: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        global_frequency_cap: z.ZodDefault<z.ZodNullable<z.ZodObject<{
            capRules: z.ZodDefault<z.ZodArray<z.ZodObject<{
                id: z.ZodString;
                group: z.ZodArray<z.ZodObject<{
                    kind: z.ZodEnum<{
                        template: "template";
                        slot: "slot";
                    }>;
                    id: z.ZodString;
                    label: z.ZodOptional<z.ZodString>;
                }, z.core.$strip>>;
                cap: z.ZodObject<{
                    count: z.ZodNumber;
                    period: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        session: "session";
                    }>;
                }, z.core.$strip>;
            }, z.core.$strip>>>;
            sessionCooldownMinutes: z.ZodDefault<z.ZodNumber>;
            remindLaterMinutes: z.ZodDefault<z.ZodNumber>;
            testMode: z.ZodDefault<z.ZodEnum<{
                off: "off";
                test_users: "test_users";
                all_traffic: "all_traffic";
            }>>;
        }, z.core.$strip>>>;
        global_frequency_cap_period: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
            day: "day";
            week: "week";
            month: "month";
            hour: "hour";
            session: "session";
        }>>>;
        suppress_for_paid: z.ZodDefault<z.ZodBoolean>;
        suppress_for_trial: z.ZodDefault<z.ZodBoolean>;
        allow_stacking: z.ZodDefault<z.ZodBoolean>;
        priority_collision_strategy: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    }, z.core.$strip>>>;
    segment_dimensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        name: z.ZodString;
        category: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        visibility_toggle: z.ZodDefault<z.ZodBoolean>;
        source_type: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    }, z.core.$strip>>>;
    meter_bindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        entitlement_handle: z.ZodString;
        meter_handle: z.ZodString;
        limit: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
        reset_period: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    }, z.core.$strip>>>;
    experiments: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
    signal_catalog: z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
}, z.core.$strip>>;
/**
 * @deprecated Prefer `PlaybookSchema.parse`. Thin, throw-guarded wrapper kept for
 * call-site compatibility: it still rejects a config that already carries the
 * canonical discriminator (callers reaching for it are asserting "this is the
 * legacy wire"), then normalizes through the one lenient schema.
 */
declare function normalizeLegacyConfig(input: unknown): z.infer<typeof PlaybookSchema>;
/**
 * @deprecated Prefer `PlaybookSchema.parse`. The lenient header now absorbs both
 * wire shapes, so this is a thin pass-through kept for call-site compatibility.
 */
declare function parsePlaybook(input: unknown): z.infer<typeof PlaybookSchema>;
declare const configPaths: ZodOpenApiPathsObject;

/**
 * Changelog schemas — audit log entries for control-plane changes.
 */

declare const ChangeLogActionSchema: z.ZodEnum<{
    delete: "delete";
    create: "create";
    update: "update";
    reorder: "reorder";
    duplicate: "duplicate";
    publish: "publish";
    archive: "archive";
    restore: "restore";
    sync: "sync";
}>;
declare const ChangeLogEntrySchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    action: z.ZodEnum<{
        delete: "delete";
        create: "create";
        update: "update";
        reorder: "reorder";
        duplicate: "duplicate";
        publish: "publish";
        archive: "archive";
        restore: "restore";
        sync: "sync";
    }>;
    resource_type: z.ZodString;
    resource_id: z.ZodString;
    resource_name: z.ZodOptional<z.ZodString>;
    actor_id: z.ZodString;
    actor_email: z.ZodOptional<z.ZodString>;
    diff: z.ZodOptional<z.ZodObject<{
        before: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        after: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strip>>;
    summary: z.ZodOptional<z.ZodString>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const changelogPaths: ZodOpenApiPathsObject;

/**
 * Tenant schemas — top-level data isolation boundary.
 *
 * A Tenant is the root grouping of all data.  Data may NEVER be joined
 * across Tenants; every query is implicitly scoped to a single tenant_id.
 */

declare const TenantStatusSchema: z.ZodEnum<{
    active: "active";
    suspended: "suspended";
    archived: "archived";
}>;
declare const TenantSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    name: z.ZodString;
    handle: z.ZodString;
    status: z.ZodDefault<z.ZodEnum<{
        active: "active";
        suspended: "suspended";
        archived: "archived";
    }>>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const tenantPaths: ZodOpenApiPathsObject;

/**
 * Environment schemas — ephemeral environments for configuration branching.
 *
 * Environments are analogous to git branches:
 *  • "production" always exists and is the default. It cannot be deleted.
 *  • Developers can create feature/staging environments that clone
 *    a point-in-time snapshot from another environment (like `git checkout -b`).
 *  • Changes in an environment are isolated until explicitly promoted
 *    (merged) into another environment.
 *  • Protected environments can require approval before changes deploy.
 */

declare const EnvironmentStatusSchema: z.ZodEnum<{
    active: "active";
    archived: "archived";
    locked: "locked";
}>;
declare const EnvironmentSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    name: z.ZodString;
    handle: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    is_production: z.ZodDefault<z.ZodBoolean>;
    status: z.ZodDefault<z.ZodEnum<{
        active: "active";
        archived: "archived";
        locked: "locked";
    }>>;
    cloned_from_environment_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    cloned_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    cloned_at_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    requires_approval: z.ZodDefault<z.ZodBoolean>;
    auto_deploy_on_approval: z.ZodDefault<z.ZodBoolean>;
    created_by: z.ZodOptional<z.ZodString>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const EnvironmentPromotionRequestSchema: z.ZodObject<{
    source_environment_id: z.ZodString;
    target_environment_id: z.ZodString;
    playbook_version_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
    strategy: z.ZodDefault<z.ZodEnum<{
        all_current: "all_current";
        selected_playbook_versions: "selected_playbook_versions";
    }>>;
}, z.core.$strip>;
declare const environmentPaths: ZodOpenApiPathsObject;

/**
 * Decision schemas — ServerEvaluationPayload for SSR hydration,
 * PlacementDecisionOutput for typed decision results,
 * and EntitlementCheckResult for entitlement responses.
 */

declare const SupersessionReasonSchema: z.ZodEnum<{
    milestone_version: "milestone_version";
    milestone_order: "milestone_order";
}>;
declare const SupersessionRecordSchema: z.ZodObject<{
    superseded_output_id: z.ZodString;
    superseded_by: z.ZodString;
    reason: z.ZodEnum<{
        milestone_version: "milestone_version";
        milestone_order: "milestone_order";
    }>;
}, z.core.$strip>;
declare const EntitlementStatusSchema: z.ZodEnum<{
    allowed: "allowed";
    limited: "limited";
    denied: "denied";
}>;
declare const PlacementDecisionOutputSchema: z.ZodObject<{
    output_id: z.ZodString;
    category: z.ZodString;
    surface: z.ZodObject<{
        template: z.ZodOptional<z.ZodString>;
        type: z.ZodEnum<{
            push: "push";
            custom: "custom";
            banner: "banner";
            modal: "modal";
            tooltip: "tooltip";
            sidebar: "sidebar";
            inline: "inline";
            toast: "toast";
            fullscreen: "fullscreen";
            email: "email";
            sms: "sms";
            in_page: "in_page";
            button: "button";
            full_page: "full_page";
            agent: "agent";
            cli: "cli";
        }>;
        slot_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>;
    content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    promotion: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    cta_path: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    ui_path: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    rule_id: z.ZodString;
    decision_id: z.ZodString;
    config_version: z.ZodString;
    present_upsell: z.ZodBoolean;
    message_block_handle: z.ZodOptional<z.ZodString>;
    message_block_id: z.ZodOptional<z.ZodString>;
    experiment_id: z.ZodOptional<z.ZodString>;
    variant_key: z.ZodOptional<z.ZodString>;
    experiment_version_id: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const EntitlementCheckResultSchema: z.ZodObject<{
    status: z.ZodEnum<{
        allowed: "allowed";
        limited: "limited";
        denied: "denied";
    }>;
    allowed: z.ZodBoolean;
    reason: z.ZodOptional<z.ZodString>;
    current_tier: z.ZodOptional<z.ZodString>;
    limit: z.ZodOptional<z.ZodNumber>;
    used: z.ZodOptional<z.ZodNumber>;
    remaining: z.ZodOptional<z.ZodNumber>;
    rule_handle: z.ZodOptional<z.ZodString>;
    contributing_rule_handles: z.ZodOptional<z.ZodArray<z.ZodString>>;
    placement: z.ZodOptional<z.ZodObject<{
        output_id: z.ZodString;
        category: z.ZodString;
        surface: z.ZodObject<{
            template: z.ZodOptional<z.ZodString>;
            type: z.ZodEnum<{
                push: "push";
                custom: "custom";
                banner: "banner";
                modal: "modal";
                tooltip: "tooltip";
                sidebar: "sidebar";
                inline: "inline";
                toast: "toast";
                fullscreen: "fullscreen";
                email: "email";
                sms: "sms";
                in_page: "in_page";
                button: "button";
                full_page: "full_page";
                agent: "agent";
                cli: "cli";
            }>;
            slot_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>;
        content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        promotion: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        cta_path: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        ui_path: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        rule_id: z.ZodString;
        decision_id: z.ZodString;
        config_version: z.ZodString;
        present_upsell: z.ZodBoolean;
        message_block_handle: z.ZodOptional<z.ZodString>;
        message_block_id: z.ZodOptional<z.ZodString>;
        experiment_id: z.ZodOptional<z.ZodString>;
        variant_key: z.ZodOptional<z.ZodString>;
        experiment_version_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
}, z.core.$strip>;
declare const RuntimePromotionSnapshotSchema: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodOptional<z.ZodString>;
    discount: z.ZodOptional<z.ZodString>;
    type: z.ZodOptional<z.ZodString>;
    status: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const ServerEvaluationPayloadUserSchema: z.ZodObject<{
    id: z.ZodString;
    anonymous_id: z.ZodOptional<z.ZodString>;
    traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const ServerEvaluationPayloadDecisionsItemSchema: z.ZodObject<{
    slot_id: z.ZodOptional<z.ZodString>;
    entitlement_handle: z.ZodOptional<z.ZodString>;
    plan_handle: z.ZodOptional<z.ZodString>;
    placement_handle: z.ZodOptional<z.ZodString>;
    visible: z.ZodBoolean;
    output: z.ZodOptional<z.ZodObject<{
        output_id: z.ZodString;
        category: z.ZodString;
        surface: z.ZodObject<{
            template: z.ZodOptional<z.ZodString>;
            type: z.ZodEnum<{
                push: "push";
                custom: "custom";
                banner: "banner";
                modal: "modal";
                tooltip: "tooltip";
                sidebar: "sidebar";
                inline: "inline";
                toast: "toast";
                fullscreen: "fullscreen";
                email: "email";
                sms: "sms";
                in_page: "in_page";
                button: "button";
                full_page: "full_page";
                agent: "agent";
                cli: "cli";
            }>;
            slot_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>;
        content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        promotion: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        cta_path: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        ui_path: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        rule_id: z.ZodString;
        decision_id: z.ZodString;
        config_version: z.ZodString;
        present_upsell: z.ZodBoolean;
        message_block_handle: z.ZodOptional<z.ZodString>;
        message_block_id: z.ZodOptional<z.ZodString>;
        experiment_id: z.ZodOptional<z.ZodString>;
        variant_key: z.ZodOptional<z.ZodString>;
        experiment_version_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    reason_codes: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
/** Alias: identical schema used in server evaluation payload entitlements map. */
declare const ServerEvaluationPayloadEntitlementsValueSchema: z.ZodObject<{
    status: z.ZodEnum<{
        allowed: "allowed";
        limited: "limited";
        denied: "denied";
    }>;
    allowed: z.ZodBoolean;
    reason: z.ZodOptional<z.ZodString>;
    current_tier: z.ZodOptional<z.ZodString>;
    limit: z.ZodOptional<z.ZodNumber>;
    used: z.ZodOptional<z.ZodNumber>;
    remaining: z.ZodOptional<z.ZodNumber>;
    rule_handle: z.ZodOptional<z.ZodString>;
    contributing_rule_handles: z.ZodOptional<z.ZodArray<z.ZodString>>;
    placement: z.ZodOptional<z.ZodObject<{
        output_id: z.ZodString;
        category: z.ZodString;
        surface: z.ZodObject<{
            template: z.ZodOptional<z.ZodString>;
            type: z.ZodEnum<{
                push: "push";
                custom: "custom";
                banner: "banner";
                modal: "modal";
                tooltip: "tooltip";
                sidebar: "sidebar";
                inline: "inline";
                toast: "toast";
                fullscreen: "fullscreen";
                email: "email";
                sms: "sms";
                in_page: "in_page";
                button: "button";
                full_page: "full_page";
                agent: "agent";
                cli: "cli";
            }>;
            slot_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>;
        content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        promotion: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        cta_path: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        ui_path: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        rule_id: z.ZodString;
        decision_id: z.ZodString;
        config_version: z.ZodString;
        present_upsell: z.ZodBoolean;
        message_block_handle: z.ZodOptional<z.ZodString>;
        message_block_id: z.ZodOptional<z.ZodString>;
        experiment_id: z.ZodOptional<z.ZodString>;
        variant_key: z.ZodOptional<z.ZodString>;
        experiment_version_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
}, z.core.$strip>;
/**
 * Server evaluation payload trial status — full `UserTrialStatus` pass-through.
 *
 * Previously omitted the `state` field on the grounds that state was
 * SDK-derived. Plan 43 TASK-13 made the control plane authoritative
 * for state (the Stripe webhook flips `TrialInstance.status` to
 * `'converted'`), so omitting it from the server payload starves the
 * SDK of the transition signal. The schema now carries `state` so
 * `PlanProvider.trialState` receives the server-derived value
 * end-to-end.
 */
declare const ServerEvaluationPayloadTrialStatusSchema: z.ZodObject<{
    in_trial: z.ZodBoolean;
    instance_id: z.ZodOptional<z.ZodString>;
    started_at: z.ZodOptional<z.ZodString>;
    trial_type: z.ZodOptional<z.ZodString>;
    plan_handle: z.ZodOptional<z.ZodString>;
    state: z.ZodOptional<z.ZodEnum<{
        converted: "converted";
        active: "active";
        none: "none";
        expired: "expired";
        running_out: "running_out";
    }>>;
    trial_limit_type: z.ZodOptional<z.ZodEnum<{
        time: "time";
        usage: "usage";
    }>>;
    progress_percent: z.ZodOptional<z.ZodNumber>;
    day_number: z.ZodOptional<z.ZodNumber>;
    days_remaining: z.ZodOptional<z.ZodNumber>;
    usage_entitlement_handle: z.ZodOptional<z.ZodString>;
    usage_consumed: z.ZodOptional<z.ZodNumber>;
    usage_remaining: z.ZodOptional<z.ZodNumber>;
    usage_limit: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
declare const ServerEvaluationPayloadUserContextSchema: z.ZodObject<{
    segments: z.ZodOptional<z.ZodArray<z.ZodString>>;
    traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    usage_balances: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
}, z.core.$strip>;
declare const ServerEvaluationPayloadSchema: z.ZodObject<{
    version: z.ZodLiteral<"1.0.0">;
    request_id: z.ZodString;
    tenant_id: z.ZodString;
    evaluated_at: z.ZodString;
    ttl_seconds: z.ZodNumber;
    user: z.ZodObject<{
        id: z.ZodString;
        anonymous_id: z.ZodOptional<z.ZodString>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strip>;
    decisions: z.ZodArray<z.ZodObject<{
        slot_id: z.ZodOptional<z.ZodString>;
        entitlement_handle: z.ZodOptional<z.ZodString>;
        plan_handle: z.ZodOptional<z.ZodString>;
        placement_handle: z.ZodOptional<z.ZodString>;
        visible: z.ZodBoolean;
        output: z.ZodOptional<z.ZodObject<{
            output_id: z.ZodString;
            category: z.ZodString;
            surface: z.ZodObject<{
                template: z.ZodOptional<z.ZodString>;
                type: z.ZodEnum<{
                    push: "push";
                    custom: "custom";
                    banner: "banner";
                    modal: "modal";
                    tooltip: "tooltip";
                    sidebar: "sidebar";
                    inline: "inline";
                    toast: "toast";
                    fullscreen: "fullscreen";
                    email: "email";
                    sms: "sms";
                    in_page: "in_page";
                    button: "button";
                    full_page: "full_page";
                    agent: "agent";
                    cli: "cli";
                }>;
                slot_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strip>;
            content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            promotion: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            cta_path: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            ui_path: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            rule_id: z.ZodString;
            decision_id: z.ZodString;
            config_version: z.ZodString;
            present_upsell: z.ZodBoolean;
            message_block_handle: z.ZodOptional<z.ZodString>;
            message_block_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        reason_codes: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$strip>>;
    entitlements: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        status: z.ZodEnum<{
            allowed: "allowed";
            limited: "limited";
            denied: "denied";
        }>;
        allowed: z.ZodBoolean;
        reason: z.ZodOptional<z.ZodString>;
        current_tier: z.ZodOptional<z.ZodString>;
        limit: z.ZodOptional<z.ZodNumber>;
        used: z.ZodOptional<z.ZodNumber>;
        remaining: z.ZodOptional<z.ZodNumber>;
        rule_handle: z.ZodOptional<z.ZodString>;
        contributing_rule_handles: z.ZodOptional<z.ZodArray<z.ZodString>>;
        placement: z.ZodOptional<z.ZodObject<{
            output_id: z.ZodString;
            category: z.ZodString;
            surface: z.ZodObject<{
                template: z.ZodOptional<z.ZodString>;
                type: z.ZodEnum<{
                    push: "push";
                    custom: "custom";
                    banner: "banner";
                    modal: "modal";
                    tooltip: "tooltip";
                    sidebar: "sidebar";
                    inline: "inline";
                    toast: "toast";
                    fullscreen: "fullscreen";
                    email: "email";
                    sms: "sms";
                    in_page: "in_page";
                    button: "button";
                    full_page: "full_page";
                    agent: "agent";
                    cli: "cli";
                }>;
                slot_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strip>;
            content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            promotion: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            cta_path: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            ui_path: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            rule_id: z.ZodString;
            decision_id: z.ZodString;
            config_version: z.ZodString;
            present_upsell: z.ZodBoolean;
            message_block_handle: z.ZodOptional<z.ZodString>;
            message_block_id: z.ZodOptional<z.ZodString>;
            experiment_id: z.ZodOptional<z.ZodString>;
            variant_key: z.ZodOptional<z.ZodString>;
            experiment_version_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
    }, z.core.$strip>>>;
    theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    trial_status: z.ZodOptional<z.ZodObject<{
        in_trial: z.ZodBoolean;
        instance_id: z.ZodOptional<z.ZodString>;
        started_at: z.ZodOptional<z.ZodString>;
        trial_type: z.ZodOptional<z.ZodString>;
        plan_handle: z.ZodOptional<z.ZodString>;
        state: z.ZodOptional<z.ZodEnum<{
            converted: "converted";
            active: "active";
            none: "none";
            expired: "expired";
            running_out: "running_out";
        }>>;
        trial_limit_type: z.ZodOptional<z.ZodEnum<{
            time: "time";
            usage: "usage";
        }>>;
        progress_percent: z.ZodOptional<z.ZodNumber>;
        day_number: z.ZodOptional<z.ZodNumber>;
        days_remaining: z.ZodOptional<z.ZodNumber>;
        usage_entitlement_handle: z.ZodOptional<z.ZodString>;
        usage_consumed: z.ZodOptional<z.ZodNumber>;
        usage_remaining: z.ZodOptional<z.ZodNumber>;
        usage_limit: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
    user_context: z.ZodOptional<z.ZodObject<{
        segments: z.ZodOptional<z.ZodArray<z.ZodString>>;
        traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        usage_balances: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
    }, z.core.$strip>>;
}, z.core.$strip>;

/**
 * PlaybookVersion schemas — grouped configuration changes with a review/deploy lifecycle.
 *
 * PlaybookVersions are analogous to git commits wrapped with a pull-request workflow:
 *
 *   draft → awaiting_approval → approved → deploying → deployed
 *                              ↳ rejected
 *   (any non-deployed state)  → archived
 *
 * Lifecycle:
 *  1. When a config change is submitted and no active PlaybookVersion exists,
 *     the user is prompted to either create a new PlaybookVersion or associate
 *     the change with an existing draft PlaybookVersion.
 *  2. Config entries reference the PlaybookVersion via playbook_version_id.
 *  3. Submitting for approval transitions status to "awaiting_approval".
 *  4. On deploy, for each entry sharing the playbook_version_id:
 *       a. The current active entry is found by handle + is_current=true
 *       b. That entry is set to is_current=false (superseded)
 *       c. The new entry is set to is_current=true
 *       d. If the current sequence ≠ base_sequence, a conflict is flagged
 *
 * Git-inspired enhancements:
 *  • base_snapshot_sequence — max global sequence at PlaybookVersion creation, used
 *    to detect any concurrent changes (like HEAD at branch creation).
 *  • Per-entry base_sequence — parent version this change was forked from,
 *    enabling precise conflict detection (like git's 3-way merge).
 *  • Rollback — create a new PlaybookVersion that reverts a previously deployed one
 *    by copying the prior versions forward.
 *  • Cherry-pick — select individual entries from one PlaybookVersion into another.
 *  • Labels — arbitrary tags for categorizing PlaybookVersions (feature, hotfix, etc.).
 */

declare const PlaybookVersionStatusSchema: z.ZodEnum<{
    rejected: "rejected";
    draft: "draft";
    archived: "archived";
    awaiting_approval: "awaiting_approval";
    approved: "approved";
    deploying: "deploying";
    deployed: "deployed";
}>;
declare const PlaybookVersionSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodString;
    name: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    status: z.ZodDefault<z.ZodEnum<{
        rejected: "rejected";
        draft: "draft";
        archived: "archived";
        awaiting_approval: "awaiting_approval";
        approved: "approved";
        deploying: "deploying";
        deployed: "deployed";
    }>>;
    labels: z.ZodDefault<z.ZodArray<z.ZodString>>;
    created_by: z.ZodString;
    submitted_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    reviewed_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    deployed_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    submitted_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    reviewed_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    deployed_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    base_snapshot_sequence: z.ZodDefault<z.ZodNumber>;
    entry_count: z.ZodDefault<z.ZodNumber>;
    conflict_count: z.ZodDefault<z.ZodNumber>;
    rollback_of_playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    cherry_picked_from_playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    review_notes: z.ZodOptional<z.ZodString>;
    rejection_reason: z.ZodOptional<z.ZodString>;
    snapshot: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
    bundle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    bundle_sha256: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const PlaybookVersionEntrySummarySchema: z.ZodObject<{
    handle: z.ZodString;
    resource_type: z.ZodString;
    resource_name: z.ZodOptional<z.ZodString>;
    action: z.ZodEnum<{
        delete: "delete";
        create: "create";
        update: "update";
    }>;
    has_conflict: z.ZodBoolean;
}, z.core.$strip>;
declare const PlaybookVersionDiffSchema: z.ZodObject<{
    playbook_version_id: z.ZodString;
    entries: z.ZodArray<z.ZodObject<{
        handle: z.ZodString;
        resource_type: z.ZodString;
        resource_name: z.ZodOptional<z.ZodString>;
        action: z.ZodEnum<{
            delete: "delete";
            create: "create";
            update: "update";
        }>;
        has_conflict: z.ZodBoolean;
    }, z.core.$strip>>;
    total_entries: z.ZodNumber;
    total_conflicts: z.ZodNumber;
    deployable: z.ZodBoolean;
}, z.core.$strip>;
declare const PlaybookVersionDeployResultSchema: z.ZodObject<{
    playbook_version_id: z.ZodString;
    deployed_count: z.ZodNumber;
    superseded_count: z.ZodNumber;
    skipped_conflicts: z.ZodNumber;
    deployed_at: z.ZodString;
}, z.core.$strip>;
declare const playbookVersionPaths: ZodOpenApiPathsObject;

/**
 * Settings schemas — tenant config, feature flags, MCP config,
 * and onboarding checklist.
 */

/** Platform default for activity-scaled analytics artifacts (plan 196 R6). */
declare const DEFAULT_ANALYTICS_RETENTION_DAYS = 365;
/**
 * Server-only metadata for one provider endpoint (plan 202 TASK-1).
 *
 * The credential value deliberately has no field in this schema. The opaque
 * reference resolves through SecretStoreProvider; only this metadata may be
 * exposed to operators or agents.
 */
declare const ProviderConnectionSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    provider_handle: z.ZodString;
    provider_type: z.ZodString;
    endpoint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    credential_reference: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    environment_id: z.ZodDefault<z.ZodString>;
    health_state: z.ZodDefault<z.ZodEnum<{
        available: "available";
        stale: "stale";
        unavailable: "unavailable";
        unsupported: "unsupported";
        partial: "partial";
    }>>;
    last_health_check_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    supported_capability_versions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodNumber>>>;
    external_project_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    external_workspace_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    timeout_ms: z.ZodDefault<z.ZodNumber>;
    stale_after_ms: z.ZodDefault<z.ZodNumber>;
    unavailable_after_failures: z.ZodDefault<z.ZodNumber>;
}, z.core.$strip>;
declare const FlagValueTypeSchema: z.ZodEnum<{
    string: "string";
    number: "number";
    boolean: "boolean";
    json: "json";
}>;
declare const FeatureFlagSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    key: z.ZodString;
    value_type: z.ZodDefault<z.ZodEnum<{
        string: "string";
        number: "number";
        boolean: "boolean";
        json: "json";
    }>>;
    value: z.ZodDefault<z.ZodString>;
    description: z.ZodOptional<z.ZodString>;
    enabled: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
/** Gate touch ages in days. This is one atomic JSON setting: partial endpoint
 * writes and per-endpoint fallbacks cannot change its meaning. BL-0499 TASK-1. */
declare const GateWindowDaysSchema: z.ZodObject<{
    min_age_days: z.ZodNumber;
    max_age_days: z.ZodNumber;
}, z.core.$strict>;
declare const TenantConfigSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    workspace_name: z.ZodString;
    support_email: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    timezone: z.ZodDefault<z.ZodString>;
    reporting_day_boundary_hour: z.ZodDefault<z.ZodNumber>;
    reporting_calendar_version: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    analytics_min_sample: z.ZodDefault<z.ZodNumber>;
    paid_conversion_window_days: z.ZodDefault<z.ZodNumber>;
    quiet_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    gate_follow_up_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    gate_window_days: z.ZodOptional<z.ZodNullable<z.ZodObject<{
        min_age_days: z.ZodNumber;
        max_age_days: z.ZodNumber;
    }, z.core.$strict>>>;
    payment_evidence: z.ZodOptional<z.ZodNullable<z.ZodObject<{
        enabled: z.ZodDefault<z.ZodBoolean>;
        cadence_tokens: z.ZodArray<z.ZodObject<{
            token: z.ZodString;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
        }, z.core.$strict>>;
        payment_type_key: z.ZodNullable<z.ZodString>;
        start_values: z.ZodArray<z.ZodString>;
        renewal_values: z.ZodArray<z.ZodString>;
        start_marker_keys: z.ZodArray<z.ZodString>;
        amount_key: z.ZodNullable<z.ZodString>;
        amount_encoding: z.ZodEnum<{
            base64_json: "base64_json";
            json: "json";
            integer: "integer";
        }>;
        amount_fields: z.ZodArray<z.ZodString>;
        tax_fields: z.ZodArray<z.ZodString>;
        price_point_fields: z.ZodArray<z.ZodString>;
        plans: z.ZodArray<z.ZodObject<{
            description: z.ZodString;
            variation_handle: z.ZodString;
            product_handle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
            item_kind: z.ZodDefault<z.ZodEnum<{
                plan: "plan";
                addon: "addon";
            }>>;
            interval: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>>>;
            interval_count: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
            effective_start: z.ZodDefault<z.ZodNullable<z.ZodISODateTime>>;
            effective_end: z.ZodDefault<z.ZodNullable<z.ZodISODateTime>>;
        }, z.core.$strict>>;
        grace_days: z.ZodNumber;
    }, z.core.$strict>>>;
    default_currency: z.ZodDefault<z.ZodString>;
    logo_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    activity_window_days: z.ZodDefault<z.ZodNumber>;
    activity_high_min: z.ZodDefault<z.ZodNumber>;
    activity_medium_min: z.ZodDefault<z.ZodNumber>;
    activity_low_min: z.ZodDefault<z.ZodNumber>;
    analytics_retention_days: z.ZodDefault<z.ZodNumber>;
}, z.core.$strip>;
/** Compatible partial settings snapshot; transport boundaries use TenantConfig
 * writable schemas. This does not assert a successful tenant storage read. */
type AnalyticsGateSettingsConfig = Partial<Pick<z.infer<typeof TenantConfigSchema>, 'analytics_min_sample' | 'quiet_days' | 'gate_follow_up_days' | 'gate_window_days'>>;
declare const McpConfigSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    server_url: z.ZodString;
    api_token_hint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    allow_write_actions: z.ZodDefault<z.ZodBoolean>;
    enabled_tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
    enabled: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
declare const OnboardingChecklistSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    step_key: z.ZodString;
    label: z.ZodString;
    done: z.ZodDefault<z.ZodBoolean>;
    completed_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
declare const AuditActorTypeSchema: z.ZodEnum<{
    agent: "agent";
    user: "user";
    system: "system";
    webhook: "webhook";
}>;
declare const AuditEventSchema: z.ZodObject<{
    id: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    actor_type: z.ZodEnum<{
        agent: "agent";
        user: "user";
        system: "system";
        webhook: "webhook";
    }>;
    actor_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    action: z.ZodString;
    object_type: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    object_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    payload: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
    occurred_at: z.ZodString;
}, z.core.$strip>;
declare const PlacementTestUserIdentifierTypeSchema: z.ZodEnum<{
    email: "email";
    user_id: "user_id";
    account_id: "account_id";
}>;
declare const PlacementTestUserSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    tenant_id: z.ZodString;
    environment_id: z.ZodDefault<z.ZodString>;
    playbook_version_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    is_current: z.ZodDefault<z.ZodBoolean>;
    is_deleted: z.ZodDefault<z.ZodBoolean>;
    delete_date: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    sequence: z.ZodDefault<z.ZodNumber>;
    base_sequence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    handle: z.ZodString;
    identifier: z.ZodString;
    identifier_type: z.ZodDefault<z.ZodEnum<{
        email: "email";
        user_id: "user_id";
        account_id: "account_id";
    }>>;
    note: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    added_by: z.ZodString;
}, z.core.$strip>;
declare const settingsPaths: ZodOpenApiPathsObject;

/**
 * Auth schemas — Zod definitions for Better Auth tables.
 *
 * Covers: users, sessions, accounts, verifications, two-factor,
 * organizations, members, and invitations.
 */

declare const UserRoleSchema: z.ZodEnum<{
    user: "user";
    admin: "admin";
}>;
declare const AuthUserSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    name: z.ZodString;
    email: z.ZodString;
    email_verified: z.ZodDefault<z.ZodBoolean>;
    image: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    role: z.ZodDefault<z.ZodEnum<{
        user: "user";
        admin: "admin";
    }>>;
    banned: z.ZodDefault<z.ZodBoolean>;
    ban_reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    ban_expires: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    two_factor_enabled: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
declare const AuthSessionSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    expires_at: z.ZodString;
    token: z.ZodString;
    ip_address: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    user_agent: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    user_id: z.ZodString;
    active_organization_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    impersonated_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
declare const AuthAccountSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    account_id: z.ZodString;
    provider_id: z.ZodString;
    user_id: z.ZodString;
    access_token: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    refresh_token: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    id_token: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    access_token_expires_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    refresh_token_expires_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    scope: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    password: z.ZodDefault<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
declare const AuthVerificationSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    identifier: z.ZodString;
    value: z.ZodString;
    expires_at: z.ZodString;
}, z.core.$strip>;
declare const AuthTwoFactorSchema: z.ZodObject<{
    id: z.ZodString;
    secret: z.ZodString;
    backup_codes: z.ZodString;
    user_id: z.ZodString;
    verified: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
declare const AuthOrganizationSchema: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    slug: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    logo: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    created_at: z.ZodString;
    metadata: z.ZodDefault<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
declare const RoleSchema: z.ZodEnum<{
    viewer: "viewer";
    collaborator: "collaborator";
    approver: "approver";
    admin: "admin";
}>;
type Role$1 = z.infer<typeof RoleSchema>;
/** Numeric rank used for `requireAtLeast` comparisons. Higher = more privilege. */
declare const ROLE_RANK: {
    readonly viewer: 0;
    readonly collaborator: 1;
    readonly approver: 2;
    readonly admin: 3;
};
declare const PermissionResourceSchema: z.ZodEnum<{
    billing: "billing";
    plans: "plans";
    settings: "settings";
    content: "content";
    entitlements: "entitlements";
    placements: "placements";
    experiments: "experiments";
    users: "users";
    tenant: "tenant";
    targeting: "targeting";
    audit: "audit";
    mcp: "mcp";
    api_tokens: "api_tokens";
    ingest_keys: "ingest_keys";
}>;
declare const PermissionActionSchema: z.ZodEnum<{
    delete: "delete";
    create: "create";
    update: "update";
    publish: "publish";
    read: "read";
    approve: "approve";
    invite: "invite";
    manage_roles: "manage_roles";
}>;
declare const PermissionSchema: z.ZodObject<{
    resource: z.ZodEnum<{
        billing: "billing";
        plans: "plans";
        settings: "settings";
        content: "content";
        entitlements: "entitlements";
        placements: "placements";
        experiments: "experiments";
        users: "users";
        tenant: "tenant";
        targeting: "targeting";
        audit: "audit";
        mcp: "mcp";
        api_tokens: "api_tokens";
        ingest_keys: "ingest_keys";
    }>;
    action: z.ZodEnum<{
        delete: "delete";
        create: "create";
        update: "update";
        publish: "publish";
        read: "read";
        approve: "approve";
        invite: "invite";
        manage_roles: "manage_roles";
    }>;
}, z.core.$strip>;
/**
 * Canonical role → permissions map. Each higher role MUST be a superset of
 * the prior — enforced by tests in revturbine-web.
 */
declare const ROLE_PERMISSIONS: {
    readonly viewer: {
        resource: "billing" | "plans" | "settings" | "content" | "entitlements" | "placements" | "experiments" | "users" | "tenant" | "targeting" | "audit" | "mcp" | "api_tokens" | "ingest_keys";
        action: "delete" | "create" | "update" | "publish" | "read" | "approve" | "invite" | "manage_roles";
    }[];
    readonly collaborator: {
        resource: "billing" | "plans" | "settings" | "content" | "entitlements" | "placements" | "experiments" | "users" | "tenant" | "targeting" | "audit" | "mcp" | "api_tokens" | "ingest_keys";
        action: "delete" | "create" | "update" | "publish" | "read" | "approve" | "invite" | "manage_roles";
    }[];
    readonly approver: {
        resource: "billing" | "plans" | "settings" | "content" | "entitlements" | "placements" | "experiments" | "users" | "tenant" | "targeting" | "audit" | "mcp" | "api_tokens" | "ingest_keys";
        action: "delete" | "create" | "update" | "publish" | "read" | "approve" | "invite" | "manage_roles";
    }[];
    readonly admin: {
        resource: "billing" | "plans" | "settings" | "content" | "entitlements" | "placements" | "experiments" | "users" | "tenant" | "targeting" | "audit" | "mcp" | "api_tokens" | "ingest_keys";
        action: "delete" | "create" | "update" | "publish" | "read" | "approve" | "invite" | "manage_roles";
    }[];
};
declare const McpTokenScopeSchema: z.ZodEnum<{
    "billing:delete": "billing:delete";
    "billing:create": "billing:create";
    "billing:update": "billing:update";
    "billing:publish": "billing:publish";
    "billing:read": "billing:read";
    "billing:approve": "billing:approve";
    "billing:invite": "billing:invite";
    "billing:manage_roles": "billing:manage_roles";
    "plans:delete": "plans:delete";
    "plans:create": "plans:create";
    "plans:update": "plans:update";
    "plans:publish": "plans:publish";
    "plans:read": "plans:read";
    "plans:approve": "plans:approve";
    "plans:invite": "plans:invite";
    "plans:manage_roles": "plans:manage_roles";
    "settings:delete": "settings:delete";
    "settings:create": "settings:create";
    "settings:update": "settings:update";
    "settings:publish": "settings:publish";
    "settings:read": "settings:read";
    "settings:approve": "settings:approve";
    "settings:invite": "settings:invite";
    "settings:manage_roles": "settings:manage_roles";
    "content:delete": "content:delete";
    "content:create": "content:create";
    "content:update": "content:update";
    "content:publish": "content:publish";
    "content:read": "content:read";
    "content:approve": "content:approve";
    "content:invite": "content:invite";
    "content:manage_roles": "content:manage_roles";
    "entitlements:delete": "entitlements:delete";
    "entitlements:create": "entitlements:create";
    "entitlements:update": "entitlements:update";
    "entitlements:publish": "entitlements:publish";
    "entitlements:read": "entitlements:read";
    "entitlements:approve": "entitlements:approve";
    "entitlements:invite": "entitlements:invite";
    "entitlements:manage_roles": "entitlements:manage_roles";
    "placements:delete": "placements:delete";
    "placements:create": "placements:create";
    "placements:update": "placements:update";
    "placements:publish": "placements:publish";
    "placements:read": "placements:read";
    "placements:approve": "placements:approve";
    "placements:invite": "placements:invite";
    "placements:manage_roles": "placements:manage_roles";
    "experiments:delete": "experiments:delete";
    "experiments:create": "experiments:create";
    "experiments:update": "experiments:update";
    "experiments:publish": "experiments:publish";
    "experiments:read": "experiments:read";
    "experiments:approve": "experiments:approve";
    "experiments:invite": "experiments:invite";
    "experiments:manage_roles": "experiments:manage_roles";
    "users:delete": "users:delete";
    "users:create": "users:create";
    "users:update": "users:update";
    "users:publish": "users:publish";
    "users:read": "users:read";
    "users:approve": "users:approve";
    "users:invite": "users:invite";
    "users:manage_roles": "users:manage_roles";
    "tenant:delete": "tenant:delete";
    "tenant:create": "tenant:create";
    "tenant:update": "tenant:update";
    "tenant:publish": "tenant:publish";
    "tenant:read": "tenant:read";
    "tenant:approve": "tenant:approve";
    "tenant:invite": "tenant:invite";
    "tenant:manage_roles": "tenant:manage_roles";
    "targeting:delete": "targeting:delete";
    "targeting:create": "targeting:create";
    "targeting:update": "targeting:update";
    "targeting:publish": "targeting:publish";
    "targeting:read": "targeting:read";
    "targeting:approve": "targeting:approve";
    "targeting:invite": "targeting:invite";
    "targeting:manage_roles": "targeting:manage_roles";
    "audit:delete": "audit:delete";
    "audit:create": "audit:create";
    "audit:update": "audit:update";
    "audit:publish": "audit:publish";
    "audit:read": "audit:read";
    "audit:approve": "audit:approve";
    "audit:invite": "audit:invite";
    "audit:manage_roles": "audit:manage_roles";
    "mcp:delete": "mcp:delete";
    "mcp:create": "mcp:create";
    "mcp:update": "mcp:update";
    "mcp:publish": "mcp:publish";
    "mcp:read": "mcp:read";
    "mcp:approve": "mcp:approve";
    "mcp:invite": "mcp:invite";
    "mcp:manage_roles": "mcp:manage_roles";
    "api_tokens:delete": "api_tokens:delete";
    "api_tokens:create": "api_tokens:create";
    "api_tokens:update": "api_tokens:update";
    "api_tokens:publish": "api_tokens:publish";
    "api_tokens:read": "api_tokens:read";
    "api_tokens:approve": "api_tokens:approve";
    "api_tokens:invite": "api_tokens:invite";
    "api_tokens:manage_roles": "api_tokens:manage_roles";
    "ingest_keys:delete": "ingest_keys:delete";
    "ingest_keys:create": "ingest_keys:create";
    "ingest_keys:update": "ingest_keys:update";
    "ingest_keys:publish": "ingest_keys:publish";
    "ingest_keys:read": "ingest_keys:read";
    "ingest_keys:approve": "ingest_keys:approve";
    "ingest_keys:invite": "ingest_keys:invite";
    "ingest_keys:manage_roles": "ingest_keys:manage_roles";
}>;
type McpTokenScope$1 = z.infer<typeof McpTokenScopeSchema>;
/**
 * Whether every requested scope is granted by `role` per ROLE_PERMISSIONS.
 * Empty scopes returns true (a scopeless token is role-only — the pre-MCP
 * behaviour). The mint endpoint uses this to enforce REQ-4.
 */
declare function scopesSubsetOfRole(scopes: readonly McpTokenScope$1[], role: Role$1): boolean;
declare const INGEST_WRITE_SCOPE: "ingest:write";
type IngestWriteScope = typeof INGEST_WRITE_SCOPE;
declare const OrgMemberRoleSchema: z.ZodEnum<{
    viewer: "viewer";
    collaborator: "collaborator";
    approver: "approver";
    admin: "admin";
}>;
declare const AuthMemberSchema: z.ZodObject<{
    id: z.ZodString;
    organization_id: z.ZodString;
    user_id: z.ZodString;
    role: z.ZodDefault<z.ZodEnum<{
        viewer: "viewer";
        collaborator: "collaborator";
        approver: "approver";
        admin: "admin";
    }>>;
    created_at: z.ZodString;
}, z.core.$strip>;
declare const InvitationStatusSchema: z.ZodEnum<{
    canceled: "canceled";
    expired: "expired";
    accepted: "accepted";
    rejected: "rejected";
    pending: "pending";
}>;
declare const AuthInvitationSchema: z.ZodObject<{
    id: z.ZodString;
    organization_id: z.ZodString;
    email: z.ZodString;
    role: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
        viewer: "viewer";
        collaborator: "collaborator";
        approver: "approver";
        admin: "admin";
    }>>>;
    status: z.ZodDefault<z.ZodEnum<{
        canceled: "canceled";
        expired: "expired";
        accepted: "accepted";
        rejected: "rejected";
        pending: "pending";
    }>>;
    expires_at: z.ZodString;
    created_at: z.ZodString;
    inviter_id: z.ZodString;
}, z.core.$strip>;
declare const AuthPasskeySchema: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    public_key: z.ZodString;
    user_id: z.ZodString;
    credential_id: z.ZodString;
    counter: z.ZodDefault<z.ZodNumber>;
    device_type: z.ZodString;
    backed_up: z.ZodDefault<z.ZodBoolean>;
    transports: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    created_at: z.ZodString;
    aaguid: z.ZodDefault<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
declare const AuthApiKeySchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    config_id: z.ZodString;
    name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    start: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    reference_id: z.ZodString;
    prefix: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    key: z.ZodString;
    refill_interval: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    refill_amount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    last_refill_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    enabled: z.ZodDefault<z.ZodBoolean>;
    rate_limit_enabled: z.ZodDefault<z.ZodBoolean>;
    rate_limit_time_window: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    rate_limit_max: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    request_count: z.ZodDefault<z.ZodNumber>;
    remaining: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
    last_request: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    expires_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    permissions: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    metadata: z.ZodDefault<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
declare const AuthSsoProviderSchema: z.ZodObject<{
    id: z.ZodString;
    issuer: z.ZodString;
    oidc_config: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    saml_config: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    user_id: z.ZodString;
    provider_id: z.ZodString;
    organization_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    domain: z.ZodString;
}, z.core.$strip>;

/**
 * Server capability provider primitives (plan 197 TASK-1).
 *
 * The Zod half of the provider family whose TypeScript half is `./types.ts`.
 * Those are the SDK's *domain* providers, evaluated inside a customer's app.
 * These are the primitives every *server capability* provider output carries:
 * where a value came from, and whether it can be trusted.
 *
 * Three primitives, deliberately small:
 *
 *   ProviderProvenance    stamped on every provider output (spec §4.5)
 *   ProviderAvailability  five states, none of which is a value of zero (§4.6)
 *   ProviderBindingRef    the only thing that crosses into versioned
 *                         experiment configuration (§4.4)
 *
 * Naming note: `provenance` already means two unrelated things in this repo —
 * `PLAYBOOK_PROVENANCE_HEADER_FACETS` (schema metadata marking a field as
 * runtime-stamped) and per-entity source enums such as a plan's Stripe origin.
 * Neither describes a provider's output, which is why this is a new type
 * rather than an extension of either.
 */

/**
 * The server-side capabilities a provider can be bound to.
 *
 * Six correspond to the capability provider interfaces of §4.3 (authored in
 * TASK-5); `experiment_assignment` is the seventh, because §6.2 decomposes an
 * experiment into three independent bindings — assignment, evidence, analysis —
 * and assignment is the one the SDK's `ExperimentAssignmentProvider` already
 * fills. This enum exists in TASK-1 because `ProviderBindingRef` cannot be
 * defined without it; the interfaces those names refer to arrive later.
 */
declare const ProviderCapabilitySchema: z.ZodEnum<{
    analytics_execution: "analytics_execution";
    experiment_assignment: "experiment_assignment";
    experiment_evidence: "experiment_evidence";
    experiment_analysis: "experiment_analysis";
    growth_signal: "growth_signal";
    growth_benchmark: "growth_benchmark";
    optimization: "optimization";
}>;
/**
 * Canonical provider availability states (§4.6).
 *
 * **These are different from a valid value of zero.** A detector or statistical
 * analysis whose required input is not `available` MUST abstain or return an
 * explicit insufficiency result; it must never treat the absence of data as a
 * measurement of zero. That rule is what this enum exists to make expressible —
 * without it, "no data" and "measured none" are the same `0` and every
 * downstream conclusion inherits the confusion.
 *
 * `partial` means some requested slice resolved and some did not; `stale` means
 * the value resolved but is older than its freshness policy allows;
 * `unsupported` means the provider cannot serve this request at all, which is a
 * configuration error rather than an outage.
 */
declare const ProviderAvailabilitySchema: z.ZodEnum<{
    available: "available";
    stale: "stale";
    unavailable: "unavailable";
    unsupported: "unsupported";
    partial: "partial";
}>;
/**
 * Stamped on every provider output (§4.5).
 *
 * `contract_version` is **required from the first commit**, deliberately. It is
 * the affordance that lets a consumer reject or adapt an output whose shape has
 * moved, and retrofitting it later would mean every already-persisted result
 * carries an unknown contract. Twelve sibling plans pin these contracts; the
 * cost of the field now is one integer, and the cost of adding it after they
 * ship is a migration across all of them.
 *
 * `data_watermark` and `source_revision` are optional because not every source
 * has them: a watermark is meaningful for a streaming store that lags, and a
 * source revision for a versioned artifact. A provider that has neither should
 * omit them rather than inventing a value.
 */
declare const ProviderProvenanceSchema: z.ZodObject<{
    provider_handle: z.ZodString;
    provider_type: z.ZodString;
    provider_version: z.ZodString;
    contract_version: z.ZodNumber;
    generated_at: z.ZodString;
    data_watermark: z.ZodOptional<z.ZodString>;
    source_revision: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/**
 * The only part of a provider binding that crosses into versioned experiment
 * configuration (§4.4).
 *
 * **Deliberately just two fields.** Provider type, endpoint, encrypted
 * credential reference, tenant scope, health state, supported capability
 * versions, and timeout policy all live on the server-only `ProviderConnection`
 * that plan 202 authors — not here, and never in a Playbook, an AnalyticsView,
 * an Experiment variant `config`, SDK public configuration, or an agent prompt
 * (§17.3). Keeping this type small is what makes that prohibition enforceable:
 * there is no field here that could carry a secret.
 */
declare const ProviderBindingRefSchema: z.ZodObject<{
    provider_handle: z.ZodString;
    capability: z.ZodEnum<{
        analytics_execution: "analytics_execution";
        experiment_assignment: "experiment_assignment";
        experiment_evidence: "experiment_evidence";
        experiment_analysis: "experiment_analysis";
        growth_signal: "growth_signal";
        growth_benchmark: "growth_benchmark";
        optimization: "optimization";
    }>;
}, z.core.$strip>;

/** Private source custody (RM-0264 TASK-31A). No provider payload passthrough. */

/** A current retrieval proves state at retrieval, never at an earlier event. */
declare const BillingEvidenceProvenanceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    kind: z.ZodLiteral<"event_snapshot">;
    event_id: z.ZodString;
    source_recorded_at: z.ZodISODateTime;
    event_type: z.ZodOptional<z.ZodString>;
    payload_style: z.ZodOptional<z.ZodEnum<{
        snapshot: "snapshot";
        thin: "thin";
    }>>;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    observed_at: z.ZodISODateTime;
}, z.core.$strict>, z.ZodObject<{
    kind: z.ZodLiteral<"retrieved_snapshot">;
    retrieved_at: z.ZodISODateTime;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    observed_at: z.ZodISODateTime;
}, z.core.$strict>], "kind">;
declare const BillingComponentEvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    coverage: z.ZodLiteral<"unknown">;
    reason: z.ZodEnum<{
        not_hydrated: "not_hydrated";
        page_limit: "page_limit";
        unavailable_history: "unavailable_history";
        unresolved_reference: "unresolved_reference";
        unresolved_allocation: "unresolved_allocation";
        provider_failure: "provider_failure";
    }>;
}, z.core.$strict>, z.ZodObject<{
    coverage: z.ZodLiteral<"partial">;
    reason: z.ZodEnum<{
        not_hydrated: "not_hydrated";
        page_limit: "page_limit";
        unavailable_history: "unavailable_history";
        unresolved_reference: "unresolved_reference";
        unresolved_allocation: "unresolved_allocation";
        provider_failure: "provider_failure";
    }>;
    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"event_snapshot">;
        event_id: z.ZodString;
        source_recorded_at: z.ZodISODateTime;
        event_type: z.ZodOptional<z.ZodString>;
        payload_style: z.ZodOptional<z.ZodEnum<{
            snapshot: "snapshot";
            thin: "thin";
        }>>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"retrieved_snapshot">;
        retrieved_at: z.ZodISODateTime;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>], "kind">;
}, z.core.$strict>, z.ZodObject<{
    coverage: z.ZodLiteral<"complete">;
    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"event_snapshot">;
        event_id: z.ZodString;
        source_recorded_at: z.ZodISODateTime;
        event_type: z.ZodOptional<z.ZodString>;
        payload_style: z.ZodOptional<z.ZodEnum<{
            snapshot: "snapshot";
            thin: "thin";
        }>>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"retrieved_snapshot">;
        retrieved_at: z.ZodISODateTime;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>], "kind">;
}, z.core.$strict>], "coverage">;
/** Array position is source application order. Unknown terms retain identity. */
declare const BillingDiscountEvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    coverage: z.ZodLiteral<"unknown">;
    discount_id: z.ZodOptional<z.ZodString>;
    reference: z.ZodOptional<z.ZodObject<{
        kind: z.ZodEnum<{
            discount: "discount";
            coupon: "coupon";
            promotion_code: "promotion_code";
        }>;
        id: z.ZodString;
    }, z.core.$strict>>;
    reason: z.ZodEnum<{
        not_hydrated: "not_hydrated";
        page_limit: "page_limit";
        unavailable_history: "unavailable_history";
        unresolved_reference: "unresolved_reference";
        unresolved_allocation: "unresolved_allocation";
        provider_failure: "provider_failure";
    }>;
}, z.core.$strict>, z.ZodObject<{
    coverage: z.ZodLiteral<"known">;
    terms: z.ZodObject<{
        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"percentage">;
            percent: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"fixed">;
            currency: z.ZodString;
            currency_exponent: z.ZodNumber;
            amount_minor: z.ZodString;
        }, z.core.$strict>], "kind">;
        discount_id: z.ZodString;
        recurrence: z.ZodEnum<{
            recurring: "recurring";
            invoice_only: "invoice_only";
        }>;
        item_id: z.ZodNullable<z.ZodString>;
        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
        starts_at: z.ZodISODateTime;
        ends_at: z.ZodNullable<z.ZodISODateTime>;
    }, z.core.$strict>;
    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"event_snapshot">;
        event_id: z.ZodString;
        source_recorded_at: z.ZodISODateTime;
        event_type: z.ZodOptional<z.ZodString>;
        payload_style: z.ZodOptional<z.ZodEnum<{
            snapshot: "snapshot";
            thin: "thin";
        }>>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"retrieved_snapshot">;
        retrieved_at: z.ZodISODateTime;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>], "kind">;
    applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
        coverage: z.ZodLiteral<"unknown">;
        reason: z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>;
    }, z.core.$strict>, z.ZodObject<{
        coverage: z.ZodLiteral<"known">;
        discount: z.ZodObject<{
            discount_id: z.ZodString;
            recurrence: z.ZodEnum<{
                recurring: "recurring";
                invoice_only: "invoice_only";
            }>;
            item_id: z.ZodNullable<z.ZodString>;
            product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
            starts_at: z.ZodISODateTime;
            ends_at: z.ZodNullable<z.ZodISODateTime>;
            value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"percentage">;
                percent: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"fixed">;
                amount_minor: z.ZodString;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                    item_id: z.ZodString;
                    amount_minor: z.ZodString;
                }, z.core.$strict>>>;
                allocations_coverage: z.ZodEnum<{
                    partial: "partial";
                    complete: "complete";
                }>;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
    }, z.core.$strict>], "coverage">;
}, z.core.$strict>], "coverage">;
/** Revision-local schedule identity. Never a provider subscription-item ID. */
declare function deriveBillingScheduleComponentKey(input: {
    phase_occurrence_key: string;
    source_revision: string;
    position: number;
}): string;
declare const BillingSourceComponentIdentitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    kind: z.ZodLiteral<"subscription_item">;
    item_id: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    kind: z.ZodLiteral<"schedule_component">;
    phase_occurrence_key: z.ZodString;
    source_revision: z.ZodString;
    position: z.ZodNumber;
    component_key: z.ZodString;
}, z.core.$strict>], "kind">;
declare const BillingSourceComponentObservationSchema: z.ZodObject<{
    identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"subscription_item">;
        item_id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"schedule_component">;
        phase_occurrence_key: z.ZodString;
        source_revision: z.ZodString;
        position: z.ZodNumber;
        component_key: z.ZodString;
    }, z.core.$strict>], "kind">;
    quantity: z.ZodNullable<z.ZodNumber>;
    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"event_snapshot">;
        event_id: z.ZodString;
        source_recorded_at: z.ZodISODateTime;
        event_type: z.ZodOptional<z.ZodString>;
        payload_style: z.ZodOptional<z.ZodEnum<{
            snapshot: "snapshot";
            thin: "thin";
        }>>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"retrieved_snapshot">;
        retrieved_at: z.ZodISODateTime;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>], "kind">;
    price: z.ZodDiscriminatedUnion<[z.ZodObject<{
        coverage: z.ZodLiteral<"unknown">;
        price_id: z.ZodNullable<z.ZodString>;
        reason: z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>;
    }, z.core.$strict>, z.ZodObject<{
        coverage: z.ZodLiteral<"known">;
        price: z.ZodObject<{
            price_id: z.ZodString;
            product_id: z.ZodOptional<z.ZodString>;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
            usage_type: z.ZodEnum<{
                metered: "metered";
                licensed: "licensed";
            }>;
            unit_amount_minor: z.ZodNullable<z.ZodString>;
            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                billing_scheme: z.ZodLiteral<"per_unit">;
                unit_amount_decimal: z.ZodString;
                transform_quantity: z.ZodNullable<z.ZodObject<{
                    divide_by: z.ZodNumber;
                    round: z.ZodEnum<{
                        up: "up";
                        down: "down";
                    }>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                billing_scheme: z.ZodLiteral<"tiered">;
                tiers_mode: z.ZodEnum<{
                    graduated: "graduated";
                    volume: "volume";
                }>;
                tiers: z.ZodArray<z.ZodObject<{
                    up_to: z.ZodNullable<z.ZodNumber>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>], "billing_scheme">>;
        }, z.core.$strict>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
    }, z.core.$strict>], "coverage">;
    discounts: z.ZodOptional<z.ZodObject<{
        evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            discount_id: z.ZodOptional<z.ZodString>;
            reference: z.ZodOptional<z.ZodObject<{
                kind: z.ZodEnum<{
                    discount: "discount";
                    coupon: "coupon";
                    promotion_code: "promotion_code";
                }>;
                id: z.ZodString;
            }, z.core.$strict>>;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"known">;
            terms: z.ZodObject<{
                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"percentage">;
                    percent: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"fixed">;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    amount_minor: z.ZodString;
                }, z.core.$strict>], "kind">;
                discount_id: z.ZodString;
                recurrence: z.ZodEnum<{
                    recurring: "recurring";
                    invoice_only: "invoice_only";
                }>;
                item_id: z.ZodNullable<z.ZodString>;
                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                starts_at: z.ZodISODateTime;
                ends_at: z.ZodNullable<z.ZodISODateTime>;
            }, z.core.$strict>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                discount: z.ZodObject<{
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        amount_minor: z.ZodString;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                            item_id: z.ZodString;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>>>;
                        allocations_coverage: z.ZodEnum<{
                            partial: "partial";
                            complete: "complete";
                        }>;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
        }, z.core.$strict>], "coverage">>;
    }, z.core.$strict>>;
}, z.core.$strict>;
declare const BillingSourceEvidenceSchema: z.ZodObject<{
    items: z.ZodDiscriminatedUnion<[z.ZodObject<{
        coverage: z.ZodLiteral<"unknown">;
        reason: z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>;
    }, z.core.$strict>, z.ZodObject<{
        coverage: z.ZodLiteral<"partial">;
        reason: z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
    }, z.core.$strict>, z.ZodObject<{
        coverage: z.ZodLiteral<"complete">;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
    }, z.core.$strict>], "coverage">;
    prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
        coverage: z.ZodLiteral<"unknown">;
        reason: z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>;
    }, z.core.$strict>, z.ZodObject<{
        coverage: z.ZodLiteral<"partial">;
        reason: z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
    }, z.core.$strict>, z.ZodObject<{
        coverage: z.ZodLiteral<"complete">;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
    }, z.core.$strict>], "coverage">;
    discounts: z.ZodObject<{
        evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            discount_id: z.ZodOptional<z.ZodString>;
            reference: z.ZodOptional<z.ZodObject<{
                kind: z.ZodEnum<{
                    discount: "discount";
                    coupon: "coupon";
                    promotion_code: "promotion_code";
                }>;
                id: z.ZodString;
            }, z.core.$strict>>;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"known">;
            terms: z.ZodObject<{
                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"percentage">;
                    percent: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"fixed">;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    amount_minor: z.ZodString;
                }, z.core.$strict>], "kind">;
                discount_id: z.ZodString;
                recurrence: z.ZodEnum<{
                    recurring: "recurring";
                    invoice_only: "invoice_only";
                }>;
                item_id: z.ZodNullable<z.ZodString>;
                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                starts_at: z.ZodISODateTime;
                ends_at: z.ZodNullable<z.ZodISODateTime>;
            }, z.core.$strict>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                discount: z.ZodObject<{
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        amount_minor: z.ZodString;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                            item_id: z.ZodString;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>>>;
                        allocations_coverage: z.ZodEnum<{
                            partial: "partial";
                            complete: "complete";
                        }>;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
        }, z.core.$strict>], "coverage">>;
    }, z.core.$strict>;
    phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
        coverage: z.ZodLiteral<"unknown">;
        reason: z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>;
    }, z.core.$strict>, z.ZodObject<{
        coverage: z.ZodLiteral<"partial">;
        reason: z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
    }, z.core.$strict>, z.ZodObject<{
        coverage: z.ZodLiteral<"complete">;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
    }, z.core.$strict>], "coverage">>;
    components: z.ZodOptional<z.ZodArray<z.ZodObject<{
        identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"subscription_item">;
            item_id: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"schedule_component">;
            phase_occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            position: z.ZodNumber;
            component_key: z.ZodString;
        }, z.core.$strict>], "kind">;
        quantity: z.ZodNullable<z.ZodNumber>;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
        price: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            price_id: z.ZodNullable<z.ZodString>;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"known">;
            price: z.ZodObject<{
                price_id: z.ZodString;
                product_id: z.ZodOptional<z.ZodString>;
                interval: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    year: "year";
                }>;
                interval_count: z.ZodNumber;
                usage_type: z.ZodEnum<{
                    metered: "metered";
                    licensed: "licensed";
                }>;
                unit_amount_minor: z.ZodNullable<z.ZodString>;
                terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"per_unit">;
                    unit_amount_decimal: z.ZodString;
                    transform_quantity: z.ZodNullable<z.ZodObject<{
                        divide_by: z.ZodNumber;
                        round: z.ZodEnum<{
                            up: "up";
                            down: "down";
                        }>;
                    }, z.core.$strict>>;
                }, z.core.$strict>, z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"tiered">;
                    tiers_mode: z.ZodEnum<{
                        graduated: "graduated";
                        volume: "volume";
                    }>;
                    tiers: z.ZodArray<z.ZodObject<{
                        up_to: z.ZodNullable<z.ZodNumber>;
                        unit_amount_decimal: z.ZodNullable<z.ZodString>;
                        flat_amount_minor: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>], "billing_scheme">>;
            }, z.core.$strict>;
            currency: z.ZodString;
            currency_exponent: z.ZodNumber;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodOptional<z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>>;
    }, z.core.$strict>>>;
}, z.core.$strict>;
declare const BillingSourceObservationEvidenceSchema: z.ZodObject<{
    items: z.ZodDiscriminatedUnion<[z.ZodObject<{
        coverage: z.ZodLiteral<"unknown">;
        reason: z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>;
    }, z.core.$strict>, z.ZodObject<{
        coverage: z.ZodLiteral<"partial">;
        reason: z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
    }, z.core.$strict>, z.ZodObject<{
        coverage: z.ZodLiteral<"complete">;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
    }, z.core.$strict>], "coverage">;
    prices: z.ZodDiscriminatedUnion<[z.ZodObject<{
        coverage: z.ZodLiteral<"unknown">;
        reason: z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>;
    }, z.core.$strict>, z.ZodObject<{
        coverage: z.ZodLiteral<"partial">;
        reason: z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
    }, z.core.$strict>, z.ZodObject<{
        coverage: z.ZodLiteral<"complete">;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
    }, z.core.$strict>], "coverage">;
    discounts: z.ZodObject<{
        evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            discount_id: z.ZodOptional<z.ZodString>;
            reference: z.ZodOptional<z.ZodObject<{
                kind: z.ZodEnum<{
                    discount: "discount";
                    coupon: "coupon";
                    promotion_code: "promotion_code";
                }>;
                id: z.ZodString;
            }, z.core.$strict>>;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"known">;
            terms: z.ZodObject<{
                value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"percentage">;
                    percent: z.ZodString;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"fixed">;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    amount_minor: z.ZodString;
                }, z.core.$strict>], "kind">;
                discount_id: z.ZodString;
                recurrence: z.ZodEnum<{
                    recurring: "recurring";
                    invoice_only: "invoice_only";
                }>;
                item_id: z.ZodNullable<z.ZodString>;
                product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                starts_at: z.ZodISODateTime;
                ends_at: z.ZodNullable<z.ZodISODateTime>;
            }, z.core.$strict>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                discount: z.ZodObject<{
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        amount_minor: z.ZodString;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                            item_id: z.ZodString;
                            amount_minor: z.ZodString;
                        }, z.core.$strict>>>;
                        allocations_coverage: z.ZodEnum<{
                            partial: "partial";
                            complete: "complete";
                        }>;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
        }, z.core.$strict>], "coverage">>;
    }, z.core.$strict>;
    phases: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
        coverage: z.ZodLiteral<"unknown">;
        reason: z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>;
    }, z.core.$strict>, z.ZodObject<{
        coverage: z.ZodLiteral<"partial">;
        reason: z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
    }, z.core.$strict>, z.ZodObject<{
        coverage: z.ZodLiteral<"complete">;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
    }, z.core.$strict>], "coverage">>;
    components: z.ZodArray<z.ZodObject<{
        identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"subscription_item">;
            item_id: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"schedule_component">;
            phase_occurrence_key: z.ZodString;
            source_revision: z.ZodString;
            position: z.ZodNumber;
            component_key: z.ZodString;
        }, z.core.$strict>], "kind">;
        quantity: z.ZodNullable<z.ZodNumber>;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
        price: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            price_id: z.ZodNullable<z.ZodString>;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"known">;
            price: z.ZodObject<{
                price_id: z.ZodString;
                product_id: z.ZodOptional<z.ZodString>;
                interval: z.ZodEnum<{
                    day: "day";
                    week: "week";
                    month: "month";
                    year: "year";
                }>;
                interval_count: z.ZodNumber;
                usage_type: z.ZodEnum<{
                    metered: "metered";
                    licensed: "licensed";
                }>;
                unit_amount_minor: z.ZodNullable<z.ZodString>;
                terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"per_unit">;
                    unit_amount_decimal: z.ZodString;
                    transform_quantity: z.ZodNullable<z.ZodObject<{
                        divide_by: z.ZodNumber;
                        round: z.ZodEnum<{
                            up: "up";
                            down: "down";
                        }>;
                    }, z.core.$strict>>;
                }, z.core.$strict>, z.ZodObject<{
                    billing_scheme: z.ZodLiteral<"tiered">;
                    tiers_mode: z.ZodEnum<{
                        graduated: "graduated";
                        volume: "volume";
                    }>;
                    tiers: z.ZodArray<z.ZodObject<{
                        up_to: z.ZodNullable<z.ZodNumber>;
                        unit_amount_decimal: z.ZodNullable<z.ZodString>;
                        flat_amount_minor: z.ZodNullable<z.ZodString>;
                    }, z.core.$strict>>;
                }, z.core.$strict>], "billing_scheme">>;
            }, z.core.$strict>;
            currency: z.ZodString;
            currency_exponent: z.ZodNumber;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        discounts: z.ZodOptional<z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            ordered: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                discount_id: z.ZodOptional<z.ZodString>;
                reference: z.ZodOptional<z.ZodObject<{
                    kind: z.ZodEnum<{
                        discount: "discount";
                        coupon: "coupon";
                        promotion_code: "promotion_code";
                    }>;
                    id: z.ZodString;
                }, z.core.$strict>>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                terms: z.ZodObject<{
                    value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"percentage">;
                        percent: z.ZodString;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"fixed">;
                        currency: z.ZodString;
                        currency_exponent: z.ZodNumber;
                        amount_minor: z.ZodString;
                    }, z.core.$strict>], "kind">;
                    discount_id: z.ZodString;
                    recurrence: z.ZodEnum<{
                        recurring: "recurring";
                        invoice_only: "invoice_only";
                    }>;
                    item_id: z.ZodNullable<z.ZodString>;
                    product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                    starts_at: z.ZodISODateTime;
                    ends_at: z.ZodNullable<z.ZodISODateTime>;
                }, z.core.$strict>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
                applied: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"known">;
                    discount: z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
            }, z.core.$strict>], "coverage">>;
        }, z.core.$strict>>;
    }, z.core.$strict>>;
}, z.core.$strict>;
type BillingEvidenceProvenance$1 = z.infer<typeof BillingEvidenceProvenanceSchema>;

/** Private invoice custody (RM-0264 TASK-32A). No invoice status is proof of cash. */

/** Transport page bound, independent of the history store's 250-fact batch / 251-revision lookup. */
declare const MAX_BILLING_INVOICE_PAGES = 12;
/** Includes nested tax/discount/proration/price-tier entries, preventing multiplicative expansion. */
declare const MAX_BILLING_INVOICE_OBSERVATION_ENTRIES = 250;
/** Named provider amounts stay separate; absent tax, due date and prior status stay null/unknown. */
declare const BillingInvoiceHeaderObservationSchema: z.ZodObject<{
    created_at: z.ZodNullable<z.ZodISODateTime>;
    due_at: z.ZodNullable<z.ZodISODateTime>;
    finalized_at: z.ZodNullable<z.ZodISODateTime>;
    paid_at: z.ZodNullable<z.ZodISODateTime>;
    voided_at: z.ZodNullable<z.ZodISODateTime>;
    marked_uncollectible_at: z.ZodNullable<z.ZodISODateTime>;
    subtotal_minor: z.ZodNullable<z.ZodString>;
    subtotal_excluding_tax_minor: z.ZodNullable<z.ZodString>;
    total_minor: z.ZodNullable<z.ZodString>;
    total_excluding_tax_minor: z.ZodNullable<z.ZodString>;
    amount_due_minor: z.ZodNullable<z.ZodString>;
    amount_paid_minor: z.ZodNullable<z.ZodString>;
    amount_remaining_minor: z.ZodNullable<z.ZodString>;
    amount_overpaid_minor: z.ZodNullable<z.ZodString>;
    starting_balance_minor: z.ZodNullable<z.ZodString>;
    ending_balance_minor: z.ZodNullable<z.ZodString>;
    pre_payment_credit_notes_amount_minor: z.ZodNullable<z.ZodString>;
    post_payment_credit_notes_amount_minor: z.ZodNullable<z.ZodString>;
    taxes: z.ZodObject<{
        evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        data: z.ZodArray<z.ZodObject<{
            amount_minor: z.ZodNullable<z.ZodString>;
            tax_behavior: z.ZodNullable<z.ZodEnum<{
                inclusive: "inclusive";
                exclusive: "exclusive";
            }>>;
            tax_rate_id: z.ZodNullable<z.ZodString>;
            taxable_amount_minor: z.ZodNullable<z.ZodString>;
            taxability_reason: z.ZodNullable<z.ZodEnum<{
                customer_exempt: "customer_exempt";
                not_available: "not_available";
                not_collecting: "not_collecting";
                not_subject_to_tax: "not_subject_to_tax";
                not_supported: "not_supported";
                portion_product_exempt: "portion_product_exempt";
                portion_reduced_rated: "portion_reduced_rated";
                portion_standard_rated: "portion_standard_rated";
                product_exempt: "product_exempt";
                product_exempt_holiday: "product_exempt_holiday";
                proportionally_rated: "proportionally_rated";
                reduced_rated: "reduced_rated";
                reverse_charge: "reverse_charge";
                standard_rated: "standard_rated";
                taxable_basis_reduced: "taxable_basis_reduced";
                zero_rated: "zero_rated";
            }>>;
        }, z.core.$strict>>;
    }, z.core.$strict>;
    discounts: z.ZodObject<{
        evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        data: z.ZodArray<z.ZodObject<{
            discount_id: z.ZodString;
            amount_minor: z.ZodNullable<z.ZodString>;
        }, z.core.$strict>>;
    }, z.core.$strict>;
    pretax_credits: z.ZodObject<{
        evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        data: z.ZodArray<z.ZodObject<{
            type: z.ZodEnum<{
                discount: "discount";
                credit_balance_transaction: "credit_balance_transaction";
            }>;
            reference_id: z.ZodString;
            amount_minor: z.ZodNullable<z.ZodString>;
        }, z.core.$strict>>;
    }, z.core.$strict>;
    currency: z.ZodNullable<z.ZodString>;
    currency_exponent: z.ZodNullable<z.ZodNumber>;
    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"event_snapshot">;
        event_id: z.ZodString;
        source_recorded_at: z.ZodISODateTime;
        event_type: z.ZodOptional<z.ZodString>;
        payload_style: z.ZodOptional<z.ZodEnum<{
            snapshot: "snapshot";
            thin: "thin";
        }>>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"retrieved_snapshot">;
        retrieved_at: z.ZodISODateTime;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>], "kind">;
    api_version: z.ZodNullable<z.ZodString>;
    subscription_id: z.ZodNullable<z.ZodString>;
    status: z.ZodNullable<z.ZodEnum<{
        void: "void";
        paid: "paid";
        draft: "draft";
        open: "open";
        uncollectible: "uncollectible";
    }>>;
    previous_status: z.ZodNullable<z.ZodEnum<{
        void: "void";
        paid: "paid";
        draft: "draft";
        open: "open";
        uncollectible: "uncollectible";
    }>>;
    collection_method: z.ZodNullable<z.ZodEnum<{
        charge_automatically: "charge_automatically";
        send_invoice: "send_invoice";
    }>>;
}, z.core.$strict>;
/** Inclusive source period bounds are observations, not a normalized service interval. */
declare const BillingInvoiceLineObservationSchema: z.ZodObject<{
    amount_minor: z.ZodNullable<z.ZodString>;
    subtotal_minor: z.ZodNullable<z.ZodString>;
    quantity: z.ZodNullable<z.ZodNumber>;
    quantity_decimal: z.ZodNullable<z.ZodString>;
    period_start_at: z.ZodNullable<z.ZodISODateTime>;
    period_end_at: z.ZodNullable<z.ZodISODateTime>;
    parent: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
        proration: z.ZodNullable<z.ZodBoolean>;
        credited_items: z.ZodNullable<z.ZodObject<{
            invoice_id: z.ZodString;
            invoice_line_ids: z.ZodArray<z.ZodString>;
        }, z.core.$strict>>;
        type: z.ZodLiteral<"invoice_item_details">;
        invoice_item_id: z.ZodNullable<z.ZodString>;
        subscription_id: z.ZodNullable<z.ZodString>;
    }, z.core.$strict>, z.ZodObject<{
        proration: z.ZodNullable<z.ZodBoolean>;
        credited_items: z.ZodNullable<z.ZodObject<{
            invoice_id: z.ZodString;
            invoice_line_ids: z.ZodArray<z.ZodString>;
        }, z.core.$strict>>;
        type: z.ZodLiteral<"subscription_item_details">;
        subscription_item_id: z.ZodNullable<z.ZodString>;
        invoice_item_id: z.ZodNullable<z.ZodString>;
        subscription_id: z.ZodNullable<z.ZodString>;
    }, z.core.$strict>], "type">>;
    pricing: z.ZodNullable<z.ZodObject<{
        type: z.ZodLiteral<"price_details">;
        price_id: z.ZodNullable<z.ZodString>;
        product_id: z.ZodNullable<z.ZodString>;
        unit_amount_decimal: z.ZodNullable<z.ZodString>;
    }, z.core.$strict>>;
    price: z.ZodDiscriminatedUnion<[z.ZodObject<{
        coverage: z.ZodLiteral<"unknown">;
        price_id: z.ZodNullable<z.ZodString>;
        reason: z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>;
    }, z.core.$strict>, z.ZodObject<{
        coverage: z.ZodLiteral<"known">;
        price: z.ZodObject<{
            price_id: z.ZodString;
            product_id: z.ZodOptional<z.ZodString>;
            interval: z.ZodEnum<{
                day: "day";
                week: "week";
                month: "month";
                year: "year";
            }>;
            interval_count: z.ZodNumber;
            usage_type: z.ZodEnum<{
                metered: "metered";
                licensed: "licensed";
            }>;
            unit_amount_minor: z.ZodNullable<z.ZodString>;
            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                billing_scheme: z.ZodLiteral<"per_unit">;
                unit_amount_decimal: z.ZodString;
                transform_quantity: z.ZodNullable<z.ZodObject<{
                    divide_by: z.ZodNumber;
                    round: z.ZodEnum<{
                        up: "up";
                        down: "down";
                    }>;
                }, z.core.$strict>>;
            }, z.core.$strict>, z.ZodObject<{
                billing_scheme: z.ZodLiteral<"tiered">;
                tiers_mode: z.ZodEnum<{
                    graduated: "graduated";
                    volume: "volume";
                }>;
                tiers: z.ZodArray<z.ZodObject<{
                    up_to: z.ZodNullable<z.ZodNumber>;
                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>], "billing_scheme">>;
        }, z.core.$strict>;
        currency: z.ZodString;
        currency_exponent: z.ZodNumber;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
    }, z.core.$strict>], "coverage">;
    discountable: z.ZodNullable<z.ZodBoolean>;
    discounts: z.ZodObject<{
        evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        data: z.ZodArray<z.ZodObject<{
            discount_id: z.ZodString;
            amount_minor: z.ZodNullable<z.ZodString>;
        }, z.core.$strict>>;
    }, z.core.$strict>;
    taxes: z.ZodObject<{
        evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        data: z.ZodArray<z.ZodObject<{
            amount_minor: z.ZodNullable<z.ZodString>;
            tax_behavior: z.ZodNullable<z.ZodEnum<{
                inclusive: "inclusive";
                exclusive: "exclusive";
            }>>;
            tax_rate_id: z.ZodNullable<z.ZodString>;
            taxable_amount_minor: z.ZodNullable<z.ZodString>;
            taxability_reason: z.ZodNullable<z.ZodEnum<{
                customer_exempt: "customer_exempt";
                not_available: "not_available";
                not_collecting: "not_collecting";
                not_subject_to_tax: "not_subject_to_tax";
                not_supported: "not_supported";
                portion_product_exempt: "portion_product_exempt";
                portion_reduced_rated: "portion_reduced_rated";
                portion_standard_rated: "portion_standard_rated";
                product_exempt: "product_exempt";
                product_exempt_holiday: "product_exempt_holiday";
                proportionally_rated: "proportionally_rated";
                reduced_rated: "reduced_rated";
                reverse_charge: "reverse_charge";
                standard_rated: "standard_rated";
                taxable_basis_reduced: "taxable_basis_reduced";
                zero_rated: "zero_rated";
            }>>;
        }, z.core.$strict>>;
    }, z.core.$strict>;
    pretax_credits: z.ZodObject<{
        evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        data: z.ZodArray<z.ZodObject<{
            type: z.ZodEnum<{
                discount: "discount";
                credit_balance_transaction: "credit_balance_transaction";
            }>;
            reference_id: z.ZodString;
            amount_minor: z.ZodNullable<z.ZodString>;
        }, z.core.$strict>>;
    }, z.core.$strict>;
    currency: z.ZodNullable<z.ZodString>;
    currency_exponent: z.ZodNullable<z.ZodNumber>;
    line_id: z.ZodString;
    invoice_id: z.ZodString;
    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"event_snapshot">;
        event_id: z.ZodString;
        source_recorded_at: z.ZodISODateTime;
        event_type: z.ZodOptional<z.ZodString>;
        payload_style: z.ZodOptional<z.ZodEnum<{
            snapshot: "snapshot";
            thin: "thin";
        }>>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"retrieved_snapshot">;
        retrieved_at: z.ZodISODateTime;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>], "kind">;
}, z.core.$strict>;
/** A payment_record is a provider reference; it does not establish economic out-of-band settlement. */
declare const BillingInvoicePaymentObservationSchema: z.ZodObject<{
    amount_requested_minor: z.ZodNullable<z.ZodString>;
    amount_paid_minor: z.ZodNullable<z.ZodString>;
    created_at: z.ZodNullable<z.ZodISODateTime>;
    paid_at: z.ZodNullable<z.ZodISODateTime>;
    canceled_at: z.ZodNullable<z.ZodISODateTime>;
    currency: z.ZodNullable<z.ZodString>;
    currency_exponent: z.ZodNullable<z.ZodNumber>;
    invoice_payment_id: z.ZodString;
    invoice_id: z.ZodString;
    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"event_snapshot">;
        event_id: z.ZodString;
        source_recorded_at: z.ZodISODateTime;
        event_type: z.ZodOptional<z.ZodString>;
        payload_style: z.ZodOptional<z.ZodEnum<{
            snapshot: "snapshot";
            thin: "thin";
        }>>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"retrieved_snapshot">;
        retrieved_at: z.ZodISODateTime;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>], "kind">;
    payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
        type: z.ZodLiteral<"payment_intent">;
        payment_id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"charge">;
        payment_id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"payment_record">;
        payment_id: z.ZodString;
    }, z.core.$strict>, z.ZodObject<{
        type: z.ZodLiteral<"unknown">;
        reason: z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>;
    }, z.core.$strict>], "type">;
    status: z.ZodNullable<z.ZodEnum<{
        canceled: "canceled";
        paid: "paid";
        open: "open";
    }>>;
    is_default: z.ZodNullable<z.ZodBoolean>;
}, z.core.$strict>;
declare const BillingInvoiceSourceEvidenceSchema: z.ZodObject<{
    header: z.ZodObject<{
        created_at: z.ZodNullable<z.ZodISODateTime>;
        due_at: z.ZodNullable<z.ZodISODateTime>;
        finalized_at: z.ZodNullable<z.ZodISODateTime>;
        paid_at: z.ZodNullable<z.ZodISODateTime>;
        voided_at: z.ZodNullable<z.ZodISODateTime>;
        marked_uncollectible_at: z.ZodNullable<z.ZodISODateTime>;
        subtotal_minor: z.ZodNullable<z.ZodString>;
        subtotal_excluding_tax_minor: z.ZodNullable<z.ZodString>;
        total_minor: z.ZodNullable<z.ZodString>;
        total_excluding_tax_minor: z.ZodNullable<z.ZodString>;
        amount_due_minor: z.ZodNullable<z.ZodString>;
        amount_paid_minor: z.ZodNullable<z.ZodString>;
        amount_remaining_minor: z.ZodNullable<z.ZodString>;
        amount_overpaid_minor: z.ZodNullable<z.ZodString>;
        starting_balance_minor: z.ZodNullable<z.ZodString>;
        ending_balance_minor: z.ZodNullable<z.ZodString>;
        pre_payment_credit_notes_amount_minor: z.ZodNullable<z.ZodString>;
        post_payment_credit_notes_amount_minor: z.ZodNullable<z.ZodString>;
        taxes: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            data: z.ZodArray<z.ZodObject<{
                amount_minor: z.ZodNullable<z.ZodString>;
                tax_behavior: z.ZodNullable<z.ZodEnum<{
                    inclusive: "inclusive";
                    exclusive: "exclusive";
                }>>;
                tax_rate_id: z.ZodNullable<z.ZodString>;
                taxable_amount_minor: z.ZodNullable<z.ZodString>;
                taxability_reason: z.ZodNullable<z.ZodEnum<{
                    customer_exempt: "customer_exempt";
                    not_available: "not_available";
                    not_collecting: "not_collecting";
                    not_subject_to_tax: "not_subject_to_tax";
                    not_supported: "not_supported";
                    portion_product_exempt: "portion_product_exempt";
                    portion_reduced_rated: "portion_reduced_rated";
                    portion_standard_rated: "portion_standard_rated";
                    product_exempt: "product_exempt";
                    product_exempt_holiday: "product_exempt_holiday";
                    proportionally_rated: "proportionally_rated";
                    reduced_rated: "reduced_rated";
                    reverse_charge: "reverse_charge";
                    standard_rated: "standard_rated";
                    taxable_basis_reduced: "taxable_basis_reduced";
                    zero_rated: "zero_rated";
                }>>;
            }, z.core.$strict>>;
        }, z.core.$strict>;
        discounts: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            data: z.ZodArray<z.ZodObject<{
                discount_id: z.ZodString;
                amount_minor: z.ZodNullable<z.ZodString>;
            }, z.core.$strict>>;
        }, z.core.$strict>;
        pretax_credits: z.ZodObject<{
            evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"partial">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"complete">;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            data: z.ZodArray<z.ZodObject<{
                type: z.ZodEnum<{
                    discount: "discount";
                    credit_balance_transaction: "credit_balance_transaction";
                }>;
                reference_id: z.ZodString;
                amount_minor: z.ZodNullable<z.ZodString>;
            }, z.core.$strict>>;
        }, z.core.$strict>;
        currency: z.ZodNullable<z.ZodString>;
        currency_exponent: z.ZodNullable<z.ZodNumber>;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
        api_version: z.ZodNullable<z.ZodString>;
        subscription_id: z.ZodNullable<z.ZodString>;
        status: z.ZodNullable<z.ZodEnum<{
            void: "void";
            paid: "paid";
            draft: "draft";
            open: "open";
            uncollectible: "uncollectible";
        }>>;
        previous_status: z.ZodNullable<z.ZodEnum<{
            void: "void";
            paid: "paid";
            draft: "draft";
            open: "open";
            uncollectible: "uncollectible";
        }>>;
        collection_method: z.ZodNullable<z.ZodEnum<{
            charge_automatically: "charge_automatically";
            send_invoice: "send_invoice";
        }>>;
    }, z.core.$strict>;
    lines: z.ZodObject<{
        evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        data: z.ZodArray<z.ZodObject<{
            amount_minor: z.ZodNullable<z.ZodString>;
            subtotal_minor: z.ZodNullable<z.ZodString>;
            quantity: z.ZodNullable<z.ZodNumber>;
            quantity_decimal: z.ZodNullable<z.ZodString>;
            period_start_at: z.ZodNullable<z.ZodISODateTime>;
            period_end_at: z.ZodNullable<z.ZodISODateTime>;
            parent: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
                proration: z.ZodNullable<z.ZodBoolean>;
                credited_items: z.ZodNullable<z.ZodObject<{
                    invoice_id: z.ZodString;
                    invoice_line_ids: z.ZodArray<z.ZodString>;
                }, z.core.$strict>>;
                type: z.ZodLiteral<"invoice_item_details">;
                invoice_item_id: z.ZodNullable<z.ZodString>;
                subscription_id: z.ZodNullable<z.ZodString>;
            }, z.core.$strict>, z.ZodObject<{
                proration: z.ZodNullable<z.ZodBoolean>;
                credited_items: z.ZodNullable<z.ZodObject<{
                    invoice_id: z.ZodString;
                    invoice_line_ids: z.ZodArray<z.ZodString>;
                }, z.core.$strict>>;
                type: z.ZodLiteral<"subscription_item_details">;
                subscription_item_id: z.ZodNullable<z.ZodString>;
                invoice_item_id: z.ZodNullable<z.ZodString>;
                subscription_id: z.ZodNullable<z.ZodString>;
            }, z.core.$strict>], "type">>;
            pricing: z.ZodNullable<z.ZodObject<{
                type: z.ZodLiteral<"price_details">;
                price_id: z.ZodNullable<z.ZodString>;
                product_id: z.ZodNullable<z.ZodString>;
                unit_amount_decimal: z.ZodNullable<z.ZodString>;
            }, z.core.$strict>>;
            price: z.ZodDiscriminatedUnion<[z.ZodObject<{
                coverage: z.ZodLiteral<"unknown">;
                price_id: z.ZodNullable<z.ZodString>;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>, z.ZodObject<{
                coverage: z.ZodLiteral<"known">;
                price: z.ZodObject<{
                    price_id: z.ZodString;
                    product_id: z.ZodOptional<z.ZodString>;
                    interval: z.ZodEnum<{
                        day: "day";
                        week: "week";
                        month: "month";
                        year: "year";
                    }>;
                    interval_count: z.ZodNumber;
                    usage_type: z.ZodEnum<{
                        metered: "metered";
                        licensed: "licensed";
                    }>;
                    unit_amount_minor: z.ZodNullable<z.ZodString>;
                    terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"per_unit">;
                        unit_amount_decimal: z.ZodString;
                        transform_quantity: z.ZodNullable<z.ZodObject<{
                            divide_by: z.ZodNumber;
                            round: z.ZodEnum<{
                                up: "up";
                                down: "down";
                            }>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>, z.ZodObject<{
                        billing_scheme: z.ZodLiteral<"tiered">;
                        tiers_mode: z.ZodEnum<{
                            graduated: "graduated";
                            volume: "volume";
                        }>;
                        tiers: z.ZodArray<z.ZodObject<{
                            up_to: z.ZodNullable<z.ZodNumber>;
                            unit_amount_decimal: z.ZodNullable<z.ZodString>;
                            flat_amount_minor: z.ZodNullable<z.ZodString>;
                        }, z.core.$strict>>;
                    }, z.core.$strict>], "billing_scheme">>;
                }, z.core.$strict>;
                currency: z.ZodString;
                currency_exponent: z.ZodNumber;
                provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"event_snapshot">;
                    event_id: z.ZodString;
                    source_recorded_at: z.ZodISODateTime;
                    event_type: z.ZodOptional<z.ZodString>;
                    payload_style: z.ZodOptional<z.ZodEnum<{
                        snapshot: "snapshot";
                        thin: "thin";
                    }>>;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>, z.ZodObject<{
                    kind: z.ZodLiteral<"retrieved_snapshot">;
                    retrieved_at: z.ZodISODateTime;
                    source: z.ZodObject<{
                        tenant_id: z.ZodString;
                        account_id: z.ZodString;
                        livemode: z.ZodBoolean;
                        provider: z.ZodEnum<{
                            stripe: "stripe";
                        }>;
                        simulation_id: z.ZodOptional<z.ZodString>;
                    }, z.core.$strict>;
                    observed_at: z.ZodISODateTime;
                }, z.core.$strict>], "kind">;
            }, z.core.$strict>], "coverage">;
            discountable: z.ZodNullable<z.ZodBoolean>;
            discounts: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                data: z.ZodArray<z.ZodObject<{
                    discount_id: z.ZodString;
                    amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>;
            taxes: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                data: z.ZodArray<z.ZodObject<{
                    amount_minor: z.ZodNullable<z.ZodString>;
                    tax_behavior: z.ZodNullable<z.ZodEnum<{
                        inclusive: "inclusive";
                        exclusive: "exclusive";
                    }>>;
                    tax_rate_id: z.ZodNullable<z.ZodString>;
                    taxable_amount_minor: z.ZodNullable<z.ZodString>;
                    taxability_reason: z.ZodNullable<z.ZodEnum<{
                        customer_exempt: "customer_exempt";
                        not_available: "not_available";
                        not_collecting: "not_collecting";
                        not_subject_to_tax: "not_subject_to_tax";
                        not_supported: "not_supported";
                        portion_product_exempt: "portion_product_exempt";
                        portion_reduced_rated: "portion_reduced_rated";
                        portion_standard_rated: "portion_standard_rated";
                        product_exempt: "product_exempt";
                        product_exempt_holiday: "product_exempt_holiday";
                        proportionally_rated: "proportionally_rated";
                        reduced_rated: "reduced_rated";
                        reverse_charge: "reverse_charge";
                        standard_rated: "standard_rated";
                        taxable_basis_reduced: "taxable_basis_reduced";
                        zero_rated: "zero_rated";
                    }>>;
                }, z.core.$strict>>;
            }, z.core.$strict>;
            pretax_credits: z.ZodObject<{
                evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    coverage: z.ZodLiteral<"unknown">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"partial">;
                    reason: z.ZodEnum<{
                        not_hydrated: "not_hydrated";
                        page_limit: "page_limit";
                        unavailable_history: "unavailable_history";
                        unresolved_reference: "unresolved_reference";
                        unresolved_allocation: "unresolved_allocation";
                        provider_failure: "provider_failure";
                    }>;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>, z.ZodObject<{
                    coverage: z.ZodLiteral<"complete">;
                    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                        kind: z.ZodLiteral<"event_snapshot">;
                        event_id: z.ZodString;
                        source_recorded_at: z.ZodISODateTime;
                        event_type: z.ZodOptional<z.ZodString>;
                        payload_style: z.ZodOptional<z.ZodEnum<{
                            snapshot: "snapshot";
                            thin: "thin";
                        }>>;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>, z.ZodObject<{
                        kind: z.ZodLiteral<"retrieved_snapshot">;
                        retrieved_at: z.ZodISODateTime;
                        source: z.ZodObject<{
                            tenant_id: z.ZodString;
                            account_id: z.ZodString;
                            livemode: z.ZodBoolean;
                            provider: z.ZodEnum<{
                                stripe: "stripe";
                            }>;
                            simulation_id: z.ZodOptional<z.ZodString>;
                        }, z.core.$strict>;
                        observed_at: z.ZodISODateTime;
                    }, z.core.$strict>], "kind">;
                }, z.core.$strict>], "coverage">;
                data: z.ZodArray<z.ZodObject<{
                    type: z.ZodEnum<{
                        discount: "discount";
                        credit_balance_transaction: "credit_balance_transaction";
                    }>;
                    reference_id: z.ZodString;
                    amount_minor: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
            line_id: z.ZodString;
            invoice_id: z.ZodString;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>>;
        pages_fetched: z.ZodNumber;
        has_more: z.ZodNullable<z.ZodBoolean>;
        next_cursor: z.ZodNullable<z.ZodString>;
        total_count: z.ZodNullable<z.ZodNumber>;
    }, z.core.$strict>;
    payments: z.ZodObject<{
        evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        data: z.ZodArray<z.ZodObject<{
            amount_requested_minor: z.ZodNullable<z.ZodString>;
            amount_paid_minor: z.ZodNullable<z.ZodString>;
            created_at: z.ZodNullable<z.ZodISODateTime>;
            paid_at: z.ZodNullable<z.ZodISODateTime>;
            canceled_at: z.ZodNullable<z.ZodISODateTime>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
            invoice_payment_id: z.ZodString;
            invoice_id: z.ZodString;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
                type: z.ZodLiteral<"payment_intent">;
                payment_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"charge">;
                payment_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"payment_record">;
                payment_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>], "type">;
            status: z.ZodNullable<z.ZodEnum<{
                canceled: "canceled";
                paid: "paid";
                open: "open";
            }>>;
            is_default: z.ZodNullable<z.ZodBoolean>;
        }, z.core.$strict>>;
        pages_fetched: z.ZodNumber;
        has_more: z.ZodNullable<z.ZodBoolean>;
        next_cursor: z.ZodNullable<z.ZodString>;
        total_count: z.ZodNullable<z.ZodNumber>;
    }, z.core.$strict>;
    event_payment: z.ZodOptional<z.ZodObject<{
        amount_requested_minor: z.ZodNullable<z.ZodString>;
        amount_paid_minor: z.ZodNullable<z.ZodString>;
        created_at: z.ZodNullable<z.ZodISODateTime>;
        paid_at: z.ZodNullable<z.ZodISODateTime>;
        canceled_at: z.ZodNullable<z.ZodISODateTime>;
        currency: z.ZodNullable<z.ZodString>;
        currency_exponent: z.ZodNullable<z.ZodNumber>;
        invoice_payment_id: z.ZodString;
        invoice_id: z.ZodString;
        payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
            type: z.ZodLiteral<"payment_intent">;
            payment_id: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"charge">;
            payment_id: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"payment_record">;
            payment_id: z.ZodString;
        }, z.core.$strict>, z.ZodObject<{
            type: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>], "type">;
        status: z.ZodNullable<z.ZodEnum<{
            canceled: "canceled";
            paid: "paid";
            open: "open";
        }>>;
        is_default: z.ZodNullable<z.ZodBoolean>;
        provenance: z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>;
    }, z.core.$strict>>;
}, z.core.$strict>;
type BillingInvoiceSourceEvidence$1 = z.infer<typeof BillingInvoiceSourceEvidenceSchema>;
/** All nested evidence remains independently scoped and timed, including incomplete lists. */
declare function billingInvoiceEvidenceProvenances(e: BillingInvoiceSourceEvidence$1): BillingEvidenceProvenance$1[];

/** Verified catalog identities, not package-version ranges or a global alias.
 * fixture-12: scaffold v0.1.322 / 8c6be446; fixture-13: v0.1.323 / 741d370e.
 * fixture-14: v0.1.378 / f8b25868; fixture-16: v0.1.454 / e7ad3522.
 * semantic-8dcae06e1cd5: web's retained generated catalog, inspected 2026-10-09.
 * semantic-d0d6054192a3: web 8e7346d7, semantic-catalog.generated.json
 * sha256 51e02b126489ec1ee841049113731c9ac9163b18342ff858731c17b1ca81a416;
 * eight weekly V1 definitions/inputs/carriers verified 2026-10-09, not unrelated legacy IDs.
 * fixture-18: BL-0504 structural stock refile; numerical V1 and legacy carriers unchanged.
 * TASK-39 owns rewriting every reference and preserving the immutable old revision.
 */
declare function financialCatalogCompatibility(input: {
    catalog_version: string;
    metric: string;
    policy_version?: string;
}): {
    status: 'preserve' | 'migrate' | 'needs_attention';
    metric: string;
    basis: string;
    reason: string;
};

type Query = z.infer<typeof AnalyticsViewQuerySchema>;
type View = z.infer<typeof AnalyticsViewSchema>;
type AnalyticsQueryConceptCompatibility = {
    status: 'preserve' | 'rebind' | 'needs_attention';
    query: Query;
    reason?: string;
};
/** Current-context calls omit provenance; saved-view callers must provide the retained catalog identity. */
declare function resolveAnalyticsQueryConcept(query: Query, catalog: AnalyticsCatalogView, sourceCatalogVersion?: string): AnalyticsQueryConceptCompatibility;
/** Read-time structural compatibility only; never rewrites a saved document or changes metric policy. */
declare function normalizeAnalyticsQueryConcept(query: Query, catalog: AnalyticsCatalogView): Query;
declare function normalizeAnalyticsViewConcepts(view: View, catalog: AnalyticsCatalogView): View;

/** Private provider observations; named amounts do not assert economic collections. */

declare const BillingChargeObservationSchema: z.ZodObject<{
    amount_minor: z.ZodNullable<z.ZodString>;
    amount_captured_minor: z.ZodNullable<z.ZodString>;
    amount_refunded_minor: z.ZodNullable<z.ZodString>;
    paid: z.ZodNullable<z.ZodBoolean>;
    captured: z.ZodNullable<z.ZodBoolean>;
    refunded: z.ZodNullable<z.ZodBoolean>;
    disputed: z.ZodNullable<z.ZodBoolean>;
    status: z.ZodNullable<z.ZodEnum<{
        pending: "pending";
        succeeded: "succeeded";
        failed: "failed";
    }>>;
    payment_intent_id: z.ZodNullable<z.ZodString>;
    balance_transaction_id: z.ZodNullable<z.ZodString>;
    failure_balance_transaction_id: z.ZodNullable<z.ZodString>;
    source_transfer_id: z.ZodNullable<z.ZodString>;
    on_behalf_of: z.ZodNullable<z.ZodString>;
    transfer_destination: z.ZodNullable<z.ZodString>;
    currency: z.ZodNullable<z.ZodString>;
    currency_exponent: z.ZodNullable<z.ZodNumber>;
    object_type: z.ZodLiteral<"charge">;
    object_id: z.ZodString;
    customer_ref: z.ZodNullable<z.ZodString>;
    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"event_snapshot">;
        event_id: z.ZodString;
        source_recorded_at: z.ZodISODateTime;
        event_type: z.ZodOptional<z.ZodString>;
        payload_style: z.ZodOptional<z.ZodEnum<{
            snapshot: "snapshot";
            thin: "thin";
        }>>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"retrieved_snapshot">;
        retrieved_at: z.ZodISODateTime;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>], "kind">;
    api_version: z.ZodNullable<z.ZodString>;
    created_at: z.ZodNullable<z.ZodISODateTime>;
    gaps: z.ZodArray<z.ZodEnum<{
        not_hydrated: "not_hydrated";
        page_limit: "page_limit";
        unavailable_history: "unavailable_history";
        unresolved_reference: "unresolved_reference";
        unresolved_allocation: "unresolved_allocation";
        provider_failure: "provider_failure";
    }>>;
}, z.core.$strict>;
declare const BillingPaymentIntentObservationSchema: z.ZodObject<{
    amount_requested_minor: z.ZodNullable<z.ZodString>;
    amount_received_minor: z.ZodNullable<z.ZodString>;
    amount_capturable_minor: z.ZodNullable<z.ZodString>;
    status: z.ZodNullable<z.ZodEnum<{
        canceled: "canceled";
        succeeded: "succeeded";
        requires_payment_method: "requires_payment_method";
        requires_confirmation: "requires_confirmation";
        requires_action: "requires_action";
        processing: "processing";
        requires_capture: "requires_capture";
    }>>;
    capture_method: z.ZodNullable<z.ZodEnum<{
        automatic: "automatic";
        automatic_async: "automatic_async";
        manual: "manual";
    }>>;
    canceled_at: z.ZodNullable<z.ZodISODateTime>;
    cancellation_reason: z.ZodNullable<z.ZodEnum<{
        duplicate: "duplicate";
        expired: "expired";
        fraudulent: "fraudulent";
        automatic: "automatic";
        abandoned: "abandoned";
        failed_invoice: "failed_invoice";
        requested_by_customer: "requested_by_customer";
        void_invoice: "void_invoice";
    }>>;
    latest_charge_id: z.ZodNullable<z.ZodString>;
    on_behalf_of: z.ZodNullable<z.ZodString>;
    transfer_destination: z.ZodNullable<z.ZodString>;
    currency: z.ZodNullable<z.ZodString>;
    currency_exponent: z.ZodNullable<z.ZodNumber>;
    object_type: z.ZodLiteral<"payment_intent">;
    object_id: z.ZodString;
    customer_ref: z.ZodNullable<z.ZodString>;
    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"event_snapshot">;
        event_id: z.ZodString;
        source_recorded_at: z.ZodISODateTime;
        event_type: z.ZodOptional<z.ZodString>;
        payload_style: z.ZodOptional<z.ZodEnum<{
            snapshot: "snapshot";
            thin: "thin";
        }>>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"retrieved_snapshot">;
        retrieved_at: z.ZodISODateTime;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>], "kind">;
    api_version: z.ZodNullable<z.ZodString>;
    created_at: z.ZodNullable<z.ZodISODateTime>;
    gaps: z.ZodArray<z.ZodEnum<{
        not_hydrated: "not_hydrated";
        page_limit: "page_limit";
        unavailable_history: "unavailable_history";
        unresolved_reference: "unresolved_reference";
        unresolved_allocation: "unresolved_allocation";
        provider_failure: "provider_failure";
    }>>;
}, z.core.$strict>;
declare const BillingPaymentRecordObservationSchema: z.ZodObject<{
    object_type: z.ZodLiteral<"payment_record">;
    amount: z.ZodObject<{
        amount_minor: z.ZodNullable<z.ZodString>;
        currency: z.ZodNullable<z.ZodString>;
        currency_exponent: z.ZodNullable<z.ZodNumber>;
    }, z.core.$strict>;
    amount_requested: z.ZodObject<{
        amount_minor: z.ZodNullable<z.ZodString>;
        currency: z.ZodNullable<z.ZodString>;
        currency_exponent: z.ZodNullable<z.ZodNumber>;
    }, z.core.$strict>;
    amount_authorized: z.ZodObject<{
        amount_minor: z.ZodNullable<z.ZodString>;
        currency: z.ZodNullable<z.ZodString>;
        currency_exponent: z.ZodNullable<z.ZodNumber>;
    }, z.core.$strict>;
    amount_canceled: z.ZodObject<{
        amount_minor: z.ZodNullable<z.ZodString>;
        currency: z.ZodNullable<z.ZodString>;
        currency_exponent: z.ZodNullable<z.ZodNumber>;
    }, z.core.$strict>;
    amount_failed: z.ZodObject<{
        amount_minor: z.ZodNullable<z.ZodString>;
        currency: z.ZodNullable<z.ZodString>;
        currency_exponent: z.ZodNullable<z.ZodNumber>;
    }, z.core.$strict>;
    amount_guaranteed: z.ZodObject<{
        amount_minor: z.ZodNullable<z.ZodString>;
        currency: z.ZodNullable<z.ZodString>;
        currency_exponent: z.ZodNullable<z.ZodNumber>;
    }, z.core.$strict>;
    amount_refunded: z.ZodObject<{
        amount_minor: z.ZodNullable<z.ZodString>;
        currency: z.ZodNullable<z.ZodString>;
        currency_exponent: z.ZodNullable<z.ZodNumber>;
    }, z.core.$strict>;
    application_id: z.ZodNullable<z.ZodString>;
    latest_payment_attempt_record_id: z.ZodNullable<z.ZodString>;
    reported_by: z.ZodNullable<z.ZodEnum<{
        stripe: "stripe";
        self: "self";
    }>>;
    processor_type: z.ZodNullable<z.ZodLiteral<"custom">>;
    object_id: z.ZodString;
    customer_ref: z.ZodNullable<z.ZodString>;
    provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"event_snapshot">;
        event_id: z.ZodString;
        source_recorded_at: z.ZodISODateTime;
        event_type: z.ZodOptional<z.ZodString>;
        payload_style: z.ZodOptional<z.ZodEnum<{
            snapshot: "snapshot";
            thin: "thin";
        }>>;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"retrieved_snapshot">;
        retrieved_at: z.ZodISODateTime;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        observed_at: z.ZodISODateTime;
    }, z.core.$strict>], "kind">;
    api_version: z.ZodNullable<z.ZodString>;
    created_at: z.ZodNullable<z.ZodISODateTime>;
    gaps: z.ZodArray<z.ZodEnum<{
        not_hydrated: "not_hydrated";
        page_limit: "page_limit";
        unavailable_history: "unavailable_history";
        unresolved_reference: "unresolved_reference";
        unresolved_allocation: "unresolved_allocation";
        provider_failure: "provider_failure";
    }>>;
}, z.core.$strict>;
declare const BillingPaymentSourceEvidenceSchema: z.ZodObject<{
    header: z.ZodDiscriminatedUnion<[z.ZodObject<{
        amount_requested_minor: z.ZodNullable<z.ZodString>;
        amount_received_minor: z.ZodNullable<z.ZodString>;
        amount_capturable_minor: z.ZodNullable<z.ZodString>;
        status: z.ZodNullable<z.ZodEnum<{
            canceled: "canceled";
            succeeded: "succeeded";
            requires_payment_method: "requires_payment_method";
            requires_confirmation: "requires_confirmation";
            requires_action: "requires_action";
            processing: "processing";
            requires_capture: "requires_capture";
        }>>;
        capture_method: z.ZodNullable<z.ZodEnum<{
            automatic: "automatic";
            automatic_async: "automatic_async";
            manual: "manual";
        }>>;
        canceled_at: z.ZodNullable<z.ZodISODateTime>;
        cancellation_reason: z.ZodNullable<z.ZodEnum<{
            duplicate: "duplicate";
            expired: "expired";
            fraudulent: "fraudulent";
            automatic: "automatic";
            abandoned: "abandoned";
            failed_invoice: "failed_invoice";
            requested_by_customer: "requested_by_customer";
            void_invoice: "void_invoice";
        }>>;
        latest_charge_id: z.ZodNullable<z.ZodString>;
        on_behalf_of: z.ZodNullable<z.ZodString>;
        transfer_destination: z.ZodNullable<z.ZodString>;
        currency: z.ZodNullable<z.ZodString>;
        currency_exponent: z.ZodNullable<z.ZodNumber>;
        object_type: z.ZodLiteral<"payment_intent">;
        object_id: z.ZodString;
        customer_ref: z.ZodNullable<z.ZodString>;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
        api_version: z.ZodNullable<z.ZodString>;
        created_at: z.ZodNullable<z.ZodISODateTime>;
        gaps: z.ZodArray<z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>>;
    }, z.core.$strict>, z.ZodObject<{
        amount_minor: z.ZodNullable<z.ZodString>;
        amount_captured_minor: z.ZodNullable<z.ZodString>;
        amount_refunded_minor: z.ZodNullable<z.ZodString>;
        paid: z.ZodNullable<z.ZodBoolean>;
        captured: z.ZodNullable<z.ZodBoolean>;
        refunded: z.ZodNullable<z.ZodBoolean>;
        disputed: z.ZodNullable<z.ZodBoolean>;
        status: z.ZodNullable<z.ZodEnum<{
            pending: "pending";
            succeeded: "succeeded";
            failed: "failed";
        }>>;
        payment_intent_id: z.ZodNullable<z.ZodString>;
        balance_transaction_id: z.ZodNullable<z.ZodString>;
        failure_balance_transaction_id: z.ZodNullable<z.ZodString>;
        source_transfer_id: z.ZodNullable<z.ZodString>;
        on_behalf_of: z.ZodNullable<z.ZodString>;
        transfer_destination: z.ZodNullable<z.ZodString>;
        currency: z.ZodNullable<z.ZodString>;
        currency_exponent: z.ZodNullable<z.ZodNumber>;
        object_type: z.ZodLiteral<"charge">;
        object_id: z.ZodString;
        customer_ref: z.ZodNullable<z.ZodString>;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
        api_version: z.ZodNullable<z.ZodString>;
        created_at: z.ZodNullable<z.ZodISODateTime>;
        gaps: z.ZodArray<z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>>;
    }, z.core.$strict>, z.ZodObject<{
        object_type: z.ZodLiteral<"payment_record">;
        amount: z.ZodObject<{
            amount_minor: z.ZodNullable<z.ZodString>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
        }, z.core.$strict>;
        amount_requested: z.ZodObject<{
            amount_minor: z.ZodNullable<z.ZodString>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
        }, z.core.$strict>;
        amount_authorized: z.ZodObject<{
            amount_minor: z.ZodNullable<z.ZodString>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
        }, z.core.$strict>;
        amount_canceled: z.ZodObject<{
            amount_minor: z.ZodNullable<z.ZodString>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
        }, z.core.$strict>;
        amount_failed: z.ZodObject<{
            amount_minor: z.ZodNullable<z.ZodString>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
        }, z.core.$strict>;
        amount_guaranteed: z.ZodObject<{
            amount_minor: z.ZodNullable<z.ZodString>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
        }, z.core.$strict>;
        amount_refunded: z.ZodObject<{
            amount_minor: z.ZodNullable<z.ZodString>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
        }, z.core.$strict>;
        application_id: z.ZodNullable<z.ZodString>;
        latest_payment_attempt_record_id: z.ZodNullable<z.ZodString>;
        reported_by: z.ZodNullable<z.ZodEnum<{
            stripe: "stripe";
            self: "self";
        }>>;
        processor_type: z.ZodNullable<z.ZodLiteral<"custom">>;
        object_id: z.ZodString;
        customer_ref: z.ZodNullable<z.ZodString>;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
        api_version: z.ZodNullable<z.ZodString>;
        created_at: z.ZodNullable<z.ZodISODateTime>;
        gaps: z.ZodArray<z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>>;
    }, z.core.$strict>], "object_type">;
    linked_charge: z.ZodOptional<z.ZodObject<{
        amount_minor: z.ZodNullable<z.ZodString>;
        amount_captured_minor: z.ZodNullable<z.ZodString>;
        amount_refunded_minor: z.ZodNullable<z.ZodString>;
        paid: z.ZodNullable<z.ZodBoolean>;
        captured: z.ZodNullable<z.ZodBoolean>;
        refunded: z.ZodNullable<z.ZodBoolean>;
        disputed: z.ZodNullable<z.ZodBoolean>;
        status: z.ZodNullable<z.ZodEnum<{
            pending: "pending";
            succeeded: "succeeded";
            failed: "failed";
        }>>;
        payment_intent_id: z.ZodNullable<z.ZodString>;
        balance_transaction_id: z.ZodNullable<z.ZodString>;
        failure_balance_transaction_id: z.ZodNullable<z.ZodString>;
        source_transfer_id: z.ZodNullable<z.ZodString>;
        on_behalf_of: z.ZodNullable<z.ZodString>;
        transfer_destination: z.ZodNullable<z.ZodString>;
        currency: z.ZodNullable<z.ZodString>;
        currency_exponent: z.ZodNullable<z.ZodNumber>;
        object_type: z.ZodLiteral<"charge">;
        object_id: z.ZodString;
        customer_ref: z.ZodNullable<z.ZodString>;
        provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"event_snapshot">;
            event_id: z.ZodString;
            source_recorded_at: z.ZodISODateTime;
            event_type: z.ZodOptional<z.ZodString>;
            payload_style: z.ZodOptional<z.ZodEnum<{
                snapshot: "snapshot";
                thin: "thin";
            }>>;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"retrieved_snapshot">;
            retrieved_at: z.ZodISODateTime;
            source: z.ZodObject<{
                tenant_id: z.ZodString;
                account_id: z.ZodString;
                livemode: z.ZodBoolean;
                provider: z.ZodEnum<{
                    stripe: "stripe";
                }>;
                simulation_id: z.ZodOptional<z.ZodString>;
            }, z.core.$strict>;
            observed_at: z.ZodISODateTime;
        }, z.core.$strict>], "kind">;
        api_version: z.ZodNullable<z.ZodString>;
        created_at: z.ZodNullable<z.ZodISODateTime>;
        gaps: z.ZodArray<z.ZodEnum<{
            not_hydrated: "not_hydrated";
            page_limit: "page_limit";
            unavailable_history: "unavailable_history";
            unresolved_reference: "unresolved_reference";
            unresolved_allocation: "unresolved_allocation";
            provider_failure: "provider_failure";
        }>>;
    }, z.core.$strict>>;
    allocations: z.ZodObject<{
        evidence: z.ZodDiscriminatedUnion<[z.ZodObject<{
            coverage: z.ZodLiteral<"unknown">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"partial">;
            reason: z.ZodEnum<{
                not_hydrated: "not_hydrated";
                page_limit: "page_limit";
                unavailable_history: "unavailable_history";
                unresolved_reference: "unresolved_reference";
                unresolved_allocation: "unresolved_allocation";
                provider_failure: "provider_failure";
            }>;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>, z.ZodObject<{
            coverage: z.ZodLiteral<"complete">;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
        }, z.core.$strict>], "coverage">;
        data: z.ZodArray<z.ZodObject<{
            amount_requested_minor: z.ZodNullable<z.ZodString>;
            amount_paid_minor: z.ZodNullable<z.ZodString>;
            created_at: z.ZodNullable<z.ZodISODateTime>;
            paid_at: z.ZodNullable<z.ZodISODateTime>;
            canceled_at: z.ZodNullable<z.ZodISODateTime>;
            currency: z.ZodNullable<z.ZodString>;
            currency_exponent: z.ZodNullable<z.ZodNumber>;
            invoice_payment_id: z.ZodString;
            invoice_id: z.ZodString;
            provenance: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"event_snapshot">;
                event_id: z.ZodString;
                source_recorded_at: z.ZodISODateTime;
                event_type: z.ZodOptional<z.ZodString>;
                payload_style: z.ZodOptional<z.ZodEnum<{
                    snapshot: "snapshot";
                    thin: "thin";
                }>>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"retrieved_snapshot">;
                retrieved_at: z.ZodISODateTime;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                observed_at: z.ZodISODateTime;
            }, z.core.$strict>], "kind">;
            payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
                type: z.ZodLiteral<"payment_intent">;
                payment_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"charge">;
                payment_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"payment_record">;
                payment_id: z.ZodString;
            }, z.core.$strict>, z.ZodObject<{
                type: z.ZodLiteral<"unknown">;
                reason: z.ZodEnum<{
                    not_hydrated: "not_hydrated";
                    page_limit: "page_limit";
                    unavailable_history: "unavailable_history";
                    unresolved_reference: "unresolved_reference";
                    unresolved_allocation: "unresolved_allocation";
                    provider_failure: "provider_failure";
                }>;
            }, z.core.$strict>], "type">;
            status: z.ZodNullable<z.ZodEnum<{
                canceled: "canceled";
                paid: "paid";
                open: "open";
            }>>;
            is_default: z.ZodNullable<z.ZodBoolean>;
        }, z.core.$strict>>;
        pages_fetched: z.ZodNumber;
        has_more: z.ZodNullable<z.ZodBoolean>;
        next_cursor: z.ZodNullable<z.ZodString>;
        total_count: z.ZodNullable<z.ZodNumber>;
        subject: z.ZodObject<{
            type: z.ZodEnum<{
                charge: "charge";
                payment_intent: "payment_intent";
                payment_record: "payment_record";
            }>;
            id: z.ZodString;
        }, z.core.$strict>;
    }, z.core.$strict>;
}, z.core.$strict>;
type BillingPaymentSourceEvidence$1 = z.infer<typeof BillingPaymentSourceEvidenceSchema>;
declare function billingPaymentEvidenceProvenances(e: BillingPaymentSourceEvidence$1): BillingEvidenceProvenance$1[];

/** Additive billing calculation policy; trial horizon has its own authority. */
declare const BILLING_LIFECYCLE_POLICY_VERSION = "billing-lifecycle-transitions-v1";

/** BL-0228 TASK-1: transient calculation contracts, not warehouse rows. */

declare const BillingLifecycleEvidenceSchema: z.ZodObject<{
    revision_key: z.ZodString;
    source_event_ids: z.ZodArray<z.ZodString>;
    commercial_activity_ids: z.ZodArray<z.ZodString>;
    payer_id: z.ZodString;
    account_resolution: z.ZodEnum<{
        resolved: "resolved";
        unresolved: "unresolved";
        multi_account: "multi_account";
    }>;
    account_id: z.ZodNullable<z.ZodString>;
    mapping_evidence_id: z.ZodNullable<z.ZodString>;
    before_tiers: z.ZodArray<z.ZodObject<{
        plan_id: z.ZodString;
        tier: z.ZodNumber;
        snapshot_id: z.ZodString;
    }, z.core.$strict>>;
    after_tiers: z.ZodArray<z.ZodObject<{
        plan_id: z.ZodString;
        tier: z.ZodNumber;
        snapshot_id: z.ZodString;
    }, z.core.$strict>>;
}, z.core.$strict>;
declare const BillingLifecycleInputSchema: z.ZodObject<{
    recurring: z.ZodObject<{
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        generation_id: z.ZodString;
        mapping_generation_id: z.ZodString;
        start: z.ZodISODateTime;
        end: z.ZodISODateTime;
        observed_cutoff: z.ZodISODateTime;
        opening: z.ZodObject<{
            as_of: z.ZodISODateTime;
            basis: z.ZodEnum<{
                imported_opening_balance: "imported_opening_balance";
                verified_snapshot: "verified_snapshot";
            }>;
        }, z.core.$strict>;
        opening_items: z.ZodArray<z.ZodObject<{
            plan_id: z.ZodNullable<z.ZodString>;
            variation_id: z.ZodNullable<z.ZodString>;
            billing_period: z.ZodNullable<z.ZodString>;
            segment_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
            subscription_id: z.ZodString;
            item_id: z.ZodString;
            rt_account_id: z.ZodString;
            currency: z.ZodString;
            currency_exponent: z.ZodNumber;
            mrr_minor: z.ZodString;
            subscribed: z.ZodBoolean;
        }, z.core.$strict>>;
        opening_history: z.ZodArray<z.ZodObject<{
            rt_account_id: z.ZodString;
            currency: z.ZodString;
            ever_paid: z.ZodEnum<{
                unknown: "unknown";
                yes: "yes";
                no: "no";
            }>;
            first_paid_basis: z.ZodEnum<{
                never: "never";
                unknown: "unknown";
                known: "known";
                before_series_start: "before_series_start";
            }>;
            first_paid_at: z.ZodNullable<z.ZodISODateTime>;
        }, z.core.$strict>>;
        history_coverage: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
        }>;
        occurrences: z.ZodArray<z.ZodObject<{
            revision: z.ZodObject<{
                revision_version: z.ZodLiteral<1>;
                source: z.ZodObject<{
                    tenant_id: z.ZodString;
                    account_id: z.ZodString;
                    livemode: z.ZodBoolean;
                    provider: z.ZodEnum<{
                        stripe: "stripe";
                    }>;
                    simulation_id: z.ZodOptional<z.ZodString>;
                }, z.core.$strict>;
                profile: z.ZodEnum<{
                    subscription: "subscription";
                    schedule: "schedule";
                    invoice: "invoice";
                    transaction: "transaction";
                    refund: "refund";
                    credit: "credit";
                    balance: "balance";
                    loss: "loss";
                }>;
                kind: z.ZodString;
                occurrence_key: z.ZodString;
                source_revision: z.ZodString;
                revision_key: z.ZodString;
                source_order: z.ZodNullable<z.ZodNumber>;
                supersedes_revision: z.ZodNullable<z.ZodString>;
                effective_at: z.ZodISODateTime;
                source_recorded_at: z.ZodISODateTime;
                observed_at: z.ZodISODateTime;
                economic_ownership: z.ZodEnum<{
                    unknown: "unknown";
                    owner: "owner";
                    non_owner: "non_owner";
                }>;
                legacy_billing_ref: z.ZodNullable<z.ZodString>;
                fact_digest: z.ZodString;
            }, z.core.$strict>;
            action: z.ZodEnum<{
                apply: "apply";
                retract: "retract";
            }>;
            atomicity: z.ZodEnum<{
                single_contract: "single_contract";
                source_confirmed: "source_confirmed";
            }>;
            cause: z.ZodEnum<{
                quantity: "quantity";
                price: "price";
                activation: "activation";
                discount: "discount";
                discount_expiry: "discount_expiry";
                cancellation: "cancellation";
                service_pause: "service_pause";
                trial_end: "trial_end";
                plan_switch: "plan_switch";
                billing_period_switch: "billing_period_switch";
                segment_change: "segment_change";
                currency_transfer: "currency_transfer";
                identity_transfer: "identity_transfer";
                other: "other";
            }>;
            contracts: z.ZodArray<z.ZodObject<{
                subscription_id: z.ZodString;
                rt_account_id: z.ZodString;
                mapping_revision: z.ZodNumber;
                mapping_basis: z.ZodEnum<{
                    verified_link: "verified_link";
                    approved_correction: "approved_correction";
                }>;
                segment_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                normalization: z.ZodObject<{
                    at: z.ZodISODateTime;
                    currency: z.ZodString;
                    currency_exponent: z.ZodNumber;
                    status: z.ZodEnum<{
                        active: "active";
                        past_due: "past_due";
                        canceled: "canceled";
                        trialing: "trialing";
                        unpaid: "unpaid";
                        incomplete: "incomplete";
                        incomplete_expired: "incomplete_expired";
                        paused: "paused";
                    }>;
                    service_active_from: z.ZodISODateTime;
                    service_ends_at: z.ZodNullable<z.ZodISODateTime>;
                    collection_paused: z.ZodBoolean;
                    items: z.ZodArray<z.ZodObject<{
                        item_id: z.ZodString;
                        price: z.ZodObject<{
                            price_id: z.ZodString;
                            product_id: z.ZodOptional<z.ZodString>;
                            interval: z.ZodEnum<{
                                day: "day";
                                week: "week";
                                month: "month";
                                year: "year";
                            }>;
                            interval_count: z.ZodNumber;
                            usage_type: z.ZodEnum<{
                                metered: "metered";
                                licensed: "licensed";
                            }>;
                            unit_amount_minor: z.ZodNullable<z.ZodString>;
                            terms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
                                billing_scheme: z.ZodLiteral<"per_unit">;
                                unit_amount_decimal: z.ZodString;
                                transform_quantity: z.ZodNullable<z.ZodObject<{
                                    divide_by: z.ZodNumber;
                                    round: z.ZodEnum<{
                                        up: "up";
                                        down: "down";
                                    }>;
                                }, z.core.$strict>>;
                            }, z.core.$strict>, z.ZodObject<{
                                billing_scheme: z.ZodLiteral<"tiered">;
                                tiers_mode: z.ZodEnum<{
                                    graduated: "graduated";
                                    volume: "volume";
                                }>;
                                tiers: z.ZodArray<z.ZodObject<{
                                    up_to: z.ZodNullable<z.ZodNumber>;
                                    unit_amount_decimal: z.ZodNullable<z.ZodString>;
                                    flat_amount_minor: z.ZodNullable<z.ZodString>;
                                }, z.core.$strict>>;
                            }, z.core.$strict>], "billing_scheme">>;
                        }, z.core.$strict>;
                        quantity: z.ZodNumber;
                        trial_end_at: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
                        item_state: z.ZodEnum<{
                            present: "present";
                            removed: "removed";
                        }>;
                        contract_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
                            amount_minor: z.ZodString;
                            embedded_discount_ids: z.ZodArray<z.ZodString>;
                        }, z.core.$strict>>>;
                        billed_usage: z.ZodOptional<z.ZodObject<{
                            amount_minor: z.ZodString;
                            includes_minimum: z.ZodBoolean;
                        }, z.core.$strict>>;
                    }, z.core.$strict>>;
                    items_coverage: z.ZodEnum<{
                        partial: "partial";
                        complete: "complete";
                    }>;
                    discounts: z.ZodArray<z.ZodObject<{
                        discount_id: z.ZodString;
                        recurrence: z.ZodEnum<{
                            recurring: "recurring";
                            invoice_only: "invoice_only";
                        }>;
                        item_id: z.ZodNullable<z.ZodString>;
                        product_ids: z.ZodNullable<z.ZodArray<z.ZodString>>;
                        starts_at: z.ZodISODateTime;
                        ends_at: z.ZodNullable<z.ZodISODateTime>;
                        value: z.ZodDiscriminatedUnion<[z.ZodObject<{
                            kind: z.ZodLiteral<"percentage">;
                            percent: z.ZodString;
                        }, z.core.$strict>, z.ZodObject<{
                            kind: z.ZodLiteral<"fixed">;
                            amount_minor: z.ZodString;
                            currency: z.ZodString;
                            currency_exponent: z.ZodNumber;
                            allocations: z.ZodNullable<z.ZodArray<z.ZodObject<{
                                item_id: z.ZodString;
                                amount_minor: z.ZodString;
                            }, z.core.$strict>>>;
                            allocations_coverage: z.ZodEnum<{
                                partial: "partial";
                                complete: "complete";
                            }>;
                        }, z.core.$strict>], "kind">;
                    }, z.core.$strict>>;
                    discounts_coverage: z.ZodEnum<{
                        partial: "partial";
                        complete: "complete";
                    }>;
                }, z.core.$strict>;
                item_bindings: z.ZodArray<z.ZodObject<{
                    item_id: z.ZodString;
                    plan_id: z.ZodNullable<z.ZodString>;
                    variation_id: z.ZodNullable<z.ZodString>;
                }, z.core.$strict>>;
            }, z.core.$strict>>;
        }, z.core.$strict>>;
        calendar_version: z.ZodString;
        daily_closes: z.ZodArray<z.ZodISODateTime>;
        opening_segment_id: z.ZodNullable<z.ZodString>;
    }, z.core.$strict>;
    scope_resolution: z.ZodEnum<{
        resolved: "resolved";
        unresolved: "unresolved";
        conflicting: "conflicting";
    }>;
    product_id: z.ZodNullable<z.ZodString>;
    environment_id: z.ZodNullable<z.ZodString>;
    evidence: z.ZodArray<z.ZodObject<{
        revision_key: z.ZodString;
        source_event_ids: z.ZodArray<z.ZodString>;
        commercial_activity_ids: z.ZodArray<z.ZodString>;
        payer_id: z.ZodString;
        account_resolution: z.ZodEnum<{
            resolved: "resolved";
            unresolved: "unresolved";
            multi_account: "multi_account";
        }>;
        account_id: z.ZodNullable<z.ZodString>;
        mapping_evidence_id: z.ZodNullable<z.ZodString>;
        before_tiers: z.ZodArray<z.ZodObject<{
            plan_id: z.ZodString;
            tier: z.ZodNumber;
            snapshot_id: z.ZodString;
        }, z.core.$strict>>;
        after_tiers: z.ZodArray<z.ZodObject<{
            plan_id: z.ZodString;
            tier: z.ZodNumber;
            snapshot_id: z.ZodString;
        }, z.core.$strict>>;
    }, z.core.$strict>>;
}, z.core.$strict>;
declare const BillingLifecycleTransitionSchema: z.ZodObject<{
    policy_version: z.ZodLiteral<"billing-lifecycle-transitions-v1">;
    accounting_policy_version: z.ZodLiteral<"recurring-movements-exact-v1">;
    source: z.ZodObject<{
        tenant_id: z.ZodString;
        account_id: z.ZodString;
        livemode: z.ZodBoolean;
        provider: z.ZodEnum<{
            stripe: "stripe";
        }>;
        simulation_id: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>;
    product_id: z.ZodString;
    environment_id: z.ZodString;
    generation_id: z.ZodString;
    mapping_generation_id: z.ZodString;
    transition_id: z.ZodString;
    occurrence_key: z.ZodString;
    revision_key: z.ZodString;
    account_id: z.ZodString;
    payer_id: z.ZodString;
    mapping_evidence_id: z.ZodString;
    kind: z.ZodEnum<{
        paid_started: "paid_started";
        reactivated: "reactivated";
        paid_ended: "paid_ended";
        plan_upgraded: "plan_upgraded";
        plan_downgraded: "plan_downgraded";
    }>;
    effective_at: z.ZodISODateTime;
    observed_at: z.ZodISODateTime;
    source_recorded_at: z.ZodISODateTime;
    source_event_ids: z.ZodArray<z.ZodString>;
    subscription_ids: z.ZodArray<z.ZodString>;
    commercial_activity_ids: z.ZodArray<z.ZodString>;
    from_state: z.ZodEnum<{
        unknown: "unknown";
        free: "free";
        paying: "paying";
        previously_paying: "previously_paying";
    }>;
    to_state: z.ZodEnum<{
        unknown: "unknown";
        free: "free";
        paying: "paying";
        previously_paying: "previously_paying";
    }>;
    from_mrr_positive: z.ZodBoolean;
    to_mrr_positive: z.ZodBoolean;
    subscribed_before: z.ZodBoolean;
    subscribed_after: z.ZodBoolean;
    history_unknown: z.ZodBoolean;
    from_plan_id: z.ZodNullable<z.ZodString>;
    to_plan_id: z.ZodNullable<z.ZodString>;
    from_tier: z.ZodNullable<z.ZodNumber>;
    to_tier: z.ZodNullable<z.ZodNumber>;
    tier_evidence: z.ZodArray<z.ZodObject<{
        plan_id: z.ZodString;
        tier: z.ZodNumber;
        snapshot_id: z.ZodString;
    }, z.core.$strict>>;
    causes: z.ZodArray<z.ZodString>;
    stock: z.ZodArray<z.ZodObject<{
        currency: z.ZodString;
        before_items: z.ZodArray<z.ZodString>;
        after_items: z.ZodArray<z.ZodString>;
    }, z.core.$strict>>;
}, z.core.$strict>;
declare const BillingLifecycleResultSchema: z.ZodObject<{
    policy_version: z.ZodLiteral<"billing-lifecycle-transitions-v1">;
    status: z.ZodEnum<{
        unavailable: "unavailable";
        partial: "partial";
        complete: "complete";
    }>;
    rows: z.ZodArray<z.ZodObject<{
        policy_version: z.ZodLiteral<"billing-lifecycle-transitions-v1">;
        accounting_policy_version: z.ZodLiteral<"recurring-movements-exact-v1">;
        source: z.ZodObject<{
            tenant_id: z.ZodString;
            account_id: z.ZodString;
            livemode: z.ZodBoolean;
            provider: z.ZodEnum<{
                stripe: "stripe";
            }>;
            simulation_id: z.ZodOptional<z.ZodString>;
        }, z.core.$strict>;
        product_id: z.ZodString;
        environment_id: z.ZodString;
        generation_id: z.ZodString;
        mapping_generation_id: z.ZodString;
        transition_id: z.ZodString;
        occurrence_key: z.ZodString;
        revision_key: z.ZodString;
        account_id: z.ZodString;
        payer_id: z.ZodString;
        mapping_evidence_id: z.ZodString;
        kind: z.ZodEnum<{
            paid_started: "paid_started";
            reactivated: "reactivated";
            paid_ended: "paid_ended";
            plan_upgraded: "plan_upgraded";
            plan_downgraded: "plan_downgraded";
        }>;
        effective_at: z.ZodISODateTime;
        observed_at: z.ZodISODateTime;
        source_recorded_at: z.ZodISODateTime;
        source_event_ids: z.ZodArray<z.ZodString>;
        subscription_ids: z.ZodArray<z.ZodString>;
        commercial_activity_ids: z.ZodArray<z.ZodString>;
        from_state: z.ZodEnum<{
            unknown: "unknown";
            free: "free";
            paying: "paying";
            previously_paying: "previously_paying";
        }>;
        to_state: z.ZodEnum<{
            unknown: "unknown";
            free: "free";
            paying: "paying";
            previously_paying: "previously_paying";
        }>;
        from_mrr_positive: z.ZodBoolean;
        to_mrr_positive: z.ZodBoolean;
        subscribed_before: z.ZodBoolean;
        subscribed_after: z.ZodBoolean;
        history_unknown: z.ZodBoolean;
        from_plan_id: z.ZodNullable<z.ZodString>;
        to_plan_id: z.ZodNullable<z.ZodString>;
        from_tier: z.ZodNullable<z.ZodNumber>;
        to_tier: z.ZodNullable<z.ZodNumber>;
        tier_evidence: z.ZodArray<z.ZodObject<{
            plan_id: z.ZodString;
            tier: z.ZodNumber;
            snapshot_id: z.ZodString;
        }, z.core.$strict>>;
        causes: z.ZodArray<z.ZodString>;
        stock: z.ZodArray<z.ZodObject<{
            currency: z.ZodString;
            before_items: z.ZodArray<z.ZodString>;
            after_items: z.ZodArray<z.ZodString>;
        }, z.core.$strict>>;
    }, z.core.$strict>>;
    gaps: z.ZodArray<z.ZodObject<{
        reason: z.ZodString;
        key: z.ZodString;
    }, z.core.$strict>>;
}, z.core.$strict>;

/** BL-0230 TASK-1: retained lineage metadata, never proof of a published artifact. */

/** Inclusive execution limits shared by source validation and the future history store. */
declare const BILLING_LIFECYCLE_STORAGE_LIMITS: Readonly<{
    payload_bytes: number;
    partition_transition_links: 1000;
    partition_source_revisions: 10000;
    partition_mapping_references: 1000;
    partition_config_snapshot_ids: 1000;
    selected_partitions: 128;
    selected_payload_bytes: number;
    selected_transition_links: 10000;
    distinct_source_revisions: 10000;
    distinct_mapping_references: 10000;
    distinct_config_snapshot_ids: 10000;
    descriptor_batch_keys: 251;
    database_statements: 256;
    descriptor_bytes: number;
    descriptor_batch_bytes: number;
    generation_wire_bytes: number;
}>;
declare const BillingLifecycleSourceRevisionSchema: z.ZodObject<{
    revision_key: z.ZodString;
    fact_digest: z.ZodString;
}, z.core.$strict>;
declare const BillingLifecycleMappingReferenceSchema: z.ZodObject<{
    mapping_evidence_id: z.ZodString;
    customer_ref: z.ZodString;
    mapping_revision: z.ZodNumber;
    account_id: z.ZodString;
}, z.core.$strict>;
declare const BillingLifecycleTransitionLinkSchema: z.ZodObject<{
    transition_id: z.ZodString;
    source_revision_keys: z.ZodArray<z.ZodString>;
    mapping_evidence_id: z.ZodString;
    config_snapshot_ids: z.ZodArray<z.ZodString>;
}, z.core.$strict>;
declare const BillingLifecyclePartitionSelectionSchema: z.ZodObject<{
    partition_key: z.ZodString;
    generation_id: z.ZodString;
    artifact_generation_id: z.ZodString;
    payload_digest: z.ZodString;
    payload_bytes: z.ZodNumber;
    transition_link_count: z.ZodNumber;
    source_revision_count: z.ZodNumber;
    mapping_reference_count: z.ZodNumber;
}, z.core.$strict>;
declare const BillingLifecyclePartitionSchema: z.ZodObject<{
    kind: z.ZodLiteral<"partition">;
    partition_key: z.ZodString;
    artifact_generation_id: z.ZodString;
    artifact_digest: z.ZodString;
    source_revisions: z.ZodArray<z.ZodObject<{
        revision_key: z.ZodString;
        fact_digest: z.ZodString;
    }, z.core.$strict>>;
    mapping_references: z.ZodArray<z.ZodObject<{
        mapping_evidence_id: z.ZodString;
        customer_ref: z.ZodString;
        mapping_revision: z.ZodNumber;
        account_id: z.ZodString;
    }, z.core.$strict>>;
    config_snapshot_ids: z.ZodArray<z.ZodString>;
    transition_links: z.ZodArray<z.ZodObject<{
        transition_id: z.ZodString;
        source_revision_keys: z.ZodArray<z.ZodString>;
        mapping_evidence_id: z.ZodString;
        config_snapshot_ids: z.ZodArray<z.ZodString>;
    }, z.core.$strict>>;
    version: z.ZodLiteral<1>;
    product_id: z.ZodString;
    environment_id: z.ZodString;
    lifecycle_policy_version: z.ZodString;
    accounting_policy_version: z.ZodString;
    mapping_generation_id: z.ZodString;
}, z.core.$strict>;
declare const BillingLifecycleManifestSchema: z.ZodObject<{
    kind: z.ZodLiteral<"manifest">;
    selections: z.ZodArray<z.ZodObject<{
        partition_key: z.ZodString;
        generation_id: z.ZodString;
        artifact_generation_id: z.ZodString;
        payload_digest: z.ZodString;
        payload_bytes: z.ZodNumber;
        transition_link_count: z.ZodNumber;
        source_revision_count: z.ZodNumber;
        mapping_reference_count: z.ZodNumber;
    }, z.core.$strict>>;
    version: z.ZodLiteral<1>;
    product_id: z.ZodString;
    environment_id: z.ZodString;
    lifecycle_policy_version: z.ZodString;
    accounting_policy_version: z.ZodString;
    mapping_generation_id: z.ZodString;
}, z.core.$strict>;
declare const BillingLifecyclePayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    kind: z.ZodLiteral<"partition">;
    partition_key: z.ZodString;
    artifact_generation_id: z.ZodString;
    artifact_digest: z.ZodString;
    source_revisions: z.ZodArray<z.ZodObject<{
        revision_key: z.ZodString;
        fact_digest: z.ZodString;
    }, z.core.$strict>>;
    mapping_references: z.ZodArray<z.ZodObject<{
        mapping_evidence_id: z.ZodString;
        customer_ref: z.ZodString;
        mapping_revision: z.ZodNumber;
        account_id: z.ZodString;
    }, z.core.$strict>>;
    config_snapshot_ids: z.ZodArray<z.ZodString>;
    transition_links: z.ZodArray<z.ZodObject<{
        transition_id: z.ZodString;
        source_revision_keys: z.ZodArray<z.ZodString>;
        mapping_evidence_id: z.ZodString;
        config_snapshot_ids: z.ZodArray<z.ZodString>;
    }, z.core.$strict>>;
    version: z.ZodLiteral<1>;
    product_id: z.ZodString;
    environment_id: z.ZodString;
    lifecycle_policy_version: z.ZodString;
    accounting_policy_version: z.ZodString;
    mapping_generation_id: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    kind: z.ZodLiteral<"manifest">;
    selections: z.ZodArray<z.ZodObject<{
        partition_key: z.ZodString;
        generation_id: z.ZodString;
        artifact_generation_id: z.ZodString;
        payload_digest: z.ZodString;
        payload_bytes: z.ZodNumber;
        transition_link_count: z.ZodNumber;
        source_revision_count: z.ZodNumber;
        mapping_reference_count: z.ZodNumber;
    }, z.core.$strict>>;
    version: z.ZodLiteral<1>;
    product_id: z.ZodString;
    environment_id: z.ZodString;
    lifecycle_policy_version: z.ZodString;
    accounting_policy_version: z.ZodString;
    mapping_generation_id: z.ZodString;
}, z.core.$strict>], "kind">;
/** Exact canonical UTF-8 accounting; callers never allocate from declared byte fields. */
declare function billingLifecyclePayloadProof(input: unknown): {
    payload_digest: string;
    payload_bytes: number;
};
/** Presence and all metadata are immutable; a correction needs a new generation ID. */
declare function sameBillingLifecyclePayload(before: unknown | undefined, after: unknown | undefined): boolean;

/** Private control/result limits; existing HTTP fact-batch limits remain separate. */
declare const SIMULATION_RUNNER_LIMITS: Readonly<{
    control_bytes: number;
    evidence_bytes: number;
    summary_bytes: number;
    artifact_archive_bytes: number;
    artifact_download_bytes: number;
    qualification_run_summaries: 20;
    qualification_read_bytes: number;
    qualification_request_seconds: 10;
    qualification_wait_seconds: 60;
    reset_max_age_seconds: 21600;
    admission_start_seconds: 600;
    slices: 512;
    concurrent_children: 4;
    slice_timeout_seconds: 600;
    execute_timeout_seconds: 14400;
    convergence_seconds: 1800;
    poll_seconds: 15;
    workflow_timeout_minutes: 250;
    query_page_rows: 500;
    query_pages: 2000;
    export_bytes: number;
    examples: 20;
}>;
declare const simulationRunnerResources: readonly ["events_clickstream", "events_billing", "placement_presentations", "placement_exposure_attribution", "experiment_assignments", "conversion_touch_attribution", "aggregates_daily_revenue", "subscription_stock_weekly", "gate_event_fields", "user_account_map"];
declare const SIMULATION_RESET_PREDICATE = "tenant_id = 'tenant_simulation'";
declare const SIMULATION_RESET_PREDICATE_DIGEST: string;
declare const SIMULATION_RESET_RESOURCE_SET_DIGEST: string;
declare const SimulationExecutionFingerprintSchema: z.ZodObject<{
    version: z.ZodLiteral<1>;
    tenant_id: z.ZodLiteral<"tenant_simulation">;
    environment: z.ZodLiteral<"production">;
    test: z.ZodLiteral<true>;
    profile: z.ZodLiteral<"ci">;
    seed: z.ZodLiteral<205006>;
    scenario_digest: z.ZodString;
    playbook_digest: z.ZodString;
    inventory_digest: z.ZodString;
    packages: z.ZodObject<{
        schema: z.ZodString;
        schema_drizzle: z.ZodString;
        core: z.ZodString;
        optimization_core: z.ZodString;
        tinybird: z.ZodString;
    }, z.core.$strict>;
    demo_source_commit: z.ZodString;
    app_commit: z.ZodString;
    worker_commit: z.ZodString;
    simulation_generation: z.ZodString;
    stripe_generation: z.ZodString;
    mapper_revision: z.ZodString;
}, z.core.$strict>;
declare const SimulationTerminalZeroReceiptSchema: z.ZodObject<{
    applied_entry_receipt_id: z.ZodString;
    workflow_run_id: z.ZodString;
    workflow_attempt: z.ZodNumber;
    terminal_at: z.ZodISODateTime;
    resources: z.ZodArray<z.ZodObject<{
        resource: z.ZodEnum<{
            events_billing: "events_billing";
            events_clickstream: "events_clickstream";
            placement_presentations: "placement_presentations";
            placement_exposure_attribution: "placement_exposure_attribution";
            experiment_assignments: "experiment_assignments";
            conversion_touch_attribution: "conversion_touch_attribution";
            aggregates_daily_revenue: "aggregates_daily_revenue";
            subscription_stock_weekly: "subscription_stock_weekly";
            gate_event_fields: "gate_event_fields";
            user_account_map: "user_account_map";
        }>;
        predelete_physical_count: z.ZodNumber;
        delete_job_id: z.ZodString;
        delete_status: z.ZodLiteral<"complete">;
        zero_read_at: z.ZodISODateTime;
        remaining_physical_count: z.ZodLiteral<0>;
        remaining_logical_count: z.ZodLiteral<0>;
    }, z.core.$strict>>;
    entry_id: z.ZodString;
    predicate_digest: z.ZodLiteral<string>;
    resource_set_digest: z.ZodLiteral<string>;
}, z.core.$strict>;
declare const SimulationProbeReceiptSchema: z.ZodObject<{
    kind: z.ZodEnum<{
        billing: "billing";
        ingest: "ingest";
    }>;
    probe_run_id: z.ZodString;
    workflow_run_id: z.ZodString;
    workflow_attempt: z.ZodNumber;
    deployment_id: z.ZodString;
    source_commit: z.ZodString;
    observed_interval: z.ZodObject<{
        start: z.ZodISODateTime;
        end: z.ZodISODateTime;
    }, z.core.$strict>;
    event_time: z.ZodISODateTime;
    environment_id: z.ZodLiteral<"production">;
    payload_digest: z.ZodString;
}, z.core.$strict>;
/** These fields describe authenticated artifacts; parsing does not authenticate them. */
declare const SimulationControlEvidenceSchema: z.ZodObject<{
    version: z.ZodLiteral<1>;
    collector: z.ZodObject<{
        run_id: z.ZodString;
        run_attempt: z.ZodNumber;
        workflow_commit: z.ZodString;
    }, z.core.$strict>;
    packets: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"reset">;
        producer: z.ZodObject<{
            repository: z.ZodLiteral<"revt-eng/revturbine-web">;
            run_id: z.ZodString;
            run_attempt: z.ZodNumber;
            job_id: z.ZodString;
            workflow_commit: z.ZodString;
            checkout_commit: z.ZodString;
            source_commit: z.ZodString;
            completed_at: z.ZodISODateTime;
            conclusion: z.ZodLiteral<"success">;
            workflow_path: z.ZodLiteral<".github/workflows/tinybird-destructive-migration.yml">;
            job: z.ZodLiteral<"destructive">;
            ref: z.ZodLiteral<"refs/heads/staging">;
            event_name: z.ZodEnum<{
                push: "push";
                workflow_dispatch: "workflow_dispatch";
            }>;
            mode: z.ZodLiteral<"apply">;
            ledger_commit: z.ZodString;
        }, z.core.$strict>;
        artifact: z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            filename: z.ZodString;
            archive_digest: z.ZodString;
            receipt_digest: z.ZodString;
            archive_bytes: z.ZodNumber;
            created_at: z.ZodISODateTime;
            expires_at: z.ZodISODateTime;
        }, z.core.$strict>;
        receipt: z.ZodObject<{
            applied_entry_receipt_id: z.ZodString;
            workflow_run_id: z.ZodString;
            workflow_attempt: z.ZodNumber;
            terminal_at: z.ZodISODateTime;
            resources: z.ZodArray<z.ZodObject<{
                resource: z.ZodEnum<{
                    events_billing: "events_billing";
                    events_clickstream: "events_clickstream";
                    placement_presentations: "placement_presentations";
                    placement_exposure_attribution: "placement_exposure_attribution";
                    experiment_assignments: "experiment_assignments";
                    conversion_touch_attribution: "conversion_touch_attribution";
                    aggregates_daily_revenue: "aggregates_daily_revenue";
                    subscription_stock_weekly: "subscription_stock_weekly";
                    gate_event_fields: "gate_event_fields";
                    user_account_map: "user_account_map";
                }>;
                predelete_physical_count: z.ZodNumber;
                delete_job_id: z.ZodString;
                delete_status: z.ZodLiteral<"complete">;
                zero_read_at: z.ZodISODateTime;
                remaining_physical_count: z.ZodLiteral<0>;
                remaining_logical_count: z.ZodLiteral<0>;
            }, z.core.$strict>>;
            entry_id: z.ZodString;
            predicate_digest: z.ZodLiteral<string>;
            resource_set_digest: z.ZodLiteral<string>;
        }, z.core.$strict>;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"ingest">;
        producer: z.ZodObject<{
            repository: z.ZodLiteral<"revt-eng/revturbine-web">;
            run_id: z.ZodString;
            run_attempt: z.ZodNumber;
            job_id: z.ZodString;
            workflow_commit: z.ZodString;
            checkout_commit: z.ZodString;
            source_commit: z.ZodString;
            completed_at: z.ZodISODateTime;
            conclusion: z.ZodLiteral<"success">;
            workflow_path: z.ZodLiteral<".github/workflows/promote-staging-to-main.yml">;
            job: z.ZodLiteral<"analytics-live">;
            event_name: z.ZodLiteral<"deployment_status">;
            ref: z.ZodLiteral<"refs/heads/staging">;
            deployment_commit: z.ZodString;
            deployment_environment: z.ZodLiteral<"staging">;
        }, z.core.$strict>;
        artifact: z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            filename: z.ZodString;
            archive_digest: z.ZodString;
            receipt_digest: z.ZodString;
            archive_bytes: z.ZodNumber;
            created_at: z.ZodISODateTime;
            expires_at: z.ZodISODateTime;
        }, z.core.$strict>;
        receipt: z.ZodObject<{
            kind: z.ZodEnum<{
                billing: "billing";
                ingest: "ingest";
            }>;
            probe_run_id: z.ZodString;
            workflow_run_id: z.ZodString;
            workflow_attempt: z.ZodNumber;
            deployment_id: z.ZodString;
            source_commit: z.ZodString;
            observed_interval: z.ZodObject<{
                start: z.ZodISODateTime;
                end: z.ZodISODateTime;
            }, z.core.$strict>;
            event_time: z.ZodISODateTime;
            environment_id: z.ZodLiteral<"production">;
            payload_digest: z.ZodString;
        }, z.core.$strict>;
    }, z.core.$strict>, z.ZodObject<{
        kind: z.ZodLiteral<"billing">;
        producer: z.ZodObject<{
            repository: z.ZodLiteral<"revt-eng/revturbine-web">;
            run_id: z.ZodString;
            run_attempt: z.ZodNumber;
            job_id: z.ZodString;
            workflow_commit: z.ZodString;
            checkout_commit: z.ZodString;
            source_commit: z.ZodString;
            completed_at: z.ZodISODateTime;
            conclusion: z.ZodLiteral<"success">;
            workflow_path: z.ZodLiteral<".github/workflows/promote-staging-to-main.yml">;
            job: z.ZodLiteral<"analytics-live">;
            event_name: z.ZodLiteral<"deployment_status">;
            ref: z.ZodLiteral<"refs/heads/staging">;
            deployment_commit: z.ZodString;
            deployment_environment: z.ZodLiteral<"staging">;
        }, z.core.$strict>;
        artifact: z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            filename: z.ZodString;
            archive_digest: z.ZodString;
            receipt_digest: z.ZodString;
            archive_bytes: z.ZodNumber;
            created_at: z.ZodISODateTime;
            expires_at: z.ZodISODateTime;
        }, z.core.$strict>;
        receipt: z.ZodObject<{
            kind: z.ZodEnum<{
                billing: "billing";
                ingest: "ingest";
            }>;
            probe_run_id: z.ZodString;
            workflow_run_id: z.ZodString;
            workflow_attempt: z.ZodNumber;
            deployment_id: z.ZodString;
            source_commit: z.ZodString;
            observed_interval: z.ZodObject<{
                start: z.ZodISODateTime;
                end: z.ZodISODateTime;
            }, z.core.$strict>;
            event_time: z.ZodISODateTime;
            environment_id: z.ZodLiteral<"production">;
            payload_digest: z.ZodString;
        }, z.core.$strict>;
    }, z.core.$strict>], "kind">>;
}, z.core.$strict>;
/** Caller fields express expectations only. Principal/event/run identity is server supplied. */
declare const SimulationPrepareRequestSchema: z.ZodObject<{
    operation: z.ZodLiteral<"prepare">;
    profile: z.ZodLiteral<"ci">;
    seed: z.ZodLiteral<205006>;
    expected_app_commit: z.ZodString;
    evidence: z.ZodObject<{
        version: z.ZodLiteral<1>;
        collector: z.ZodObject<{
            run_id: z.ZodString;
            run_attempt: z.ZodNumber;
            workflow_commit: z.ZodString;
        }, z.core.$strict>;
        packets: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"reset">;
            producer: z.ZodObject<{
                repository: z.ZodLiteral<"revt-eng/revturbine-web">;
                run_id: z.ZodString;
                run_attempt: z.ZodNumber;
                job_id: z.ZodString;
                workflow_commit: z.ZodString;
                checkout_commit: z.ZodString;
                source_commit: z.ZodString;
                completed_at: z.ZodISODateTime;
                conclusion: z.ZodLiteral<"success">;
                workflow_path: z.ZodLiteral<".github/workflows/tinybird-destructive-migration.yml">;
                job: z.ZodLiteral<"destructive">;
                ref: z.ZodLiteral<"refs/heads/staging">;
                event_name: z.ZodEnum<{
                    push: "push";
                    workflow_dispatch: "workflow_dispatch";
                }>;
                mode: z.ZodLiteral<"apply">;
                ledger_commit: z.ZodString;
            }, z.core.$strict>;
            artifact: z.ZodObject<{
                id: z.ZodString;
                name: z.ZodString;
                filename: z.ZodString;
                archive_digest: z.ZodString;
                receipt_digest: z.ZodString;
                archive_bytes: z.ZodNumber;
                created_at: z.ZodISODateTime;
                expires_at: z.ZodISODateTime;
            }, z.core.$strict>;
            receipt: z.ZodObject<{
                applied_entry_receipt_id: z.ZodString;
                workflow_run_id: z.ZodString;
                workflow_attempt: z.ZodNumber;
                terminal_at: z.ZodISODateTime;
                resources: z.ZodArray<z.ZodObject<{
                    resource: z.ZodEnum<{
                        events_billing: "events_billing";
                        events_clickstream: "events_clickstream";
                        placement_presentations: "placement_presentations";
                        placement_exposure_attribution: "placement_exposure_attribution";
                        experiment_assignments: "experiment_assignments";
                        conversion_touch_attribution: "conversion_touch_attribution";
                        aggregates_daily_revenue: "aggregates_daily_revenue";
                        subscription_stock_weekly: "subscription_stock_weekly";
                        gate_event_fields: "gate_event_fields";
                        user_account_map: "user_account_map";
                    }>;
                    predelete_physical_count: z.ZodNumber;
                    delete_job_id: z.ZodString;
                    delete_status: z.ZodLiteral<"complete">;
                    zero_read_at: z.ZodISODateTime;
                    remaining_physical_count: z.ZodLiteral<0>;
                    remaining_logical_count: z.ZodLiteral<0>;
                }, z.core.$strict>>;
                entry_id: z.ZodString;
                predicate_digest: z.ZodLiteral<string>;
                resource_set_digest: z.ZodLiteral<string>;
            }, z.core.$strict>;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"ingest">;
            producer: z.ZodObject<{
                repository: z.ZodLiteral<"revt-eng/revturbine-web">;
                run_id: z.ZodString;
                run_attempt: z.ZodNumber;
                job_id: z.ZodString;
                workflow_commit: z.ZodString;
                checkout_commit: z.ZodString;
                source_commit: z.ZodString;
                completed_at: z.ZodISODateTime;
                conclusion: z.ZodLiteral<"success">;
                workflow_path: z.ZodLiteral<".github/workflows/promote-staging-to-main.yml">;
                job: z.ZodLiteral<"analytics-live">;
                event_name: z.ZodLiteral<"deployment_status">;
                ref: z.ZodLiteral<"refs/heads/staging">;
                deployment_commit: z.ZodString;
                deployment_environment: z.ZodLiteral<"staging">;
            }, z.core.$strict>;
            artifact: z.ZodObject<{
                id: z.ZodString;
                name: z.ZodString;
                filename: z.ZodString;
                archive_digest: z.ZodString;
                receipt_digest: z.ZodString;
                archive_bytes: z.ZodNumber;
                created_at: z.ZodISODateTime;
                expires_at: z.ZodISODateTime;
            }, z.core.$strict>;
            receipt: z.ZodObject<{
                kind: z.ZodEnum<{
                    billing: "billing";
                    ingest: "ingest";
                }>;
                probe_run_id: z.ZodString;
                workflow_run_id: z.ZodString;
                workflow_attempt: z.ZodNumber;
                deployment_id: z.ZodString;
                source_commit: z.ZodString;
                observed_interval: z.ZodObject<{
                    start: z.ZodISODateTime;
                    end: z.ZodISODateTime;
                }, z.core.$strict>;
                event_time: z.ZodISODateTime;
                environment_id: z.ZodLiteral<"production">;
                payload_digest: z.ZodString;
            }, z.core.$strict>;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"billing">;
            producer: z.ZodObject<{
                repository: z.ZodLiteral<"revt-eng/revturbine-web">;
                run_id: z.ZodString;
                run_attempt: z.ZodNumber;
                job_id: z.ZodString;
                workflow_commit: z.ZodString;
                checkout_commit: z.ZodString;
                source_commit: z.ZodString;
                completed_at: z.ZodISODateTime;
                conclusion: z.ZodLiteral<"success">;
                workflow_path: z.ZodLiteral<".github/workflows/promote-staging-to-main.yml">;
                job: z.ZodLiteral<"analytics-live">;
                event_name: z.ZodLiteral<"deployment_status">;
                ref: z.ZodLiteral<"refs/heads/staging">;
                deployment_commit: z.ZodString;
                deployment_environment: z.ZodLiteral<"staging">;
            }, z.core.$strict>;
            artifact: z.ZodObject<{
                id: z.ZodString;
                name: z.ZodString;
                filename: z.ZodString;
                archive_digest: z.ZodString;
                receipt_digest: z.ZodString;
                archive_bytes: z.ZodNumber;
                created_at: z.ZodISODateTime;
                expires_at: z.ZodISODateTime;
            }, z.core.$strict>;
            receipt: z.ZodObject<{
                kind: z.ZodEnum<{
                    billing: "billing";
                    ingest: "ingest";
                }>;
                probe_run_id: z.ZodString;
                workflow_run_id: z.ZodString;
                workflow_attempt: z.ZodNumber;
                deployment_id: z.ZodString;
                source_commit: z.ZodString;
                observed_interval: z.ZodObject<{
                    start: z.ZodISODateTime;
                    end: z.ZodISODateTime;
                }, z.core.$strict>;
                event_time: z.ZodISODateTime;
                environment_id: z.ZodLiteral<"production">;
                payload_digest: z.ZodString;
            }, z.core.$strict>;
        }, z.core.$strict>], "kind">>;
    }, z.core.$strict>;
}, z.core.$strict>;
declare const SimulationExecuteRequestSchema: z.ZodObject<{
    operation: z.ZodLiteral<"execute">;
    preparation_event_id: z.ZodString;
    fingerprint: z.ZodObject<{
        version: z.ZodLiteral<1>;
        tenant_id: z.ZodLiteral<"tenant_simulation">;
        environment: z.ZodLiteral<"production">;
        test: z.ZodLiteral<true>;
        profile: z.ZodLiteral<"ci">;
        seed: z.ZodLiteral<205006>;
        scenario_digest: z.ZodString;
        playbook_digest: z.ZodString;
        inventory_digest: z.ZodString;
        packages: z.ZodObject<{
            schema: z.ZodString;
            schema_drizzle: z.ZodString;
            core: z.ZodString;
            optimization_core: z.ZodString;
            tinybird: z.ZodString;
        }, z.core.$strict>;
        demo_source_commit: z.ZodString;
        app_commit: z.ZodString;
        worker_commit: z.ZodString;
        simulation_generation: z.ZodString;
        stripe_generation: z.ZodString;
        mapper_revision: z.ZodString;
    }, z.core.$strict>;
    reset: z.ZodObject<{
        entry_id: z.ZodString;
        predicate_digest: z.ZodLiteral<string>;
        resource_set_digest: z.ZodLiteral<string>;
    }, z.core.$strict>;
    evidence: z.ZodObject<{
        version: z.ZodLiteral<1>;
        collector: z.ZodObject<{
            run_id: z.ZodString;
            run_attempt: z.ZodNumber;
            workflow_commit: z.ZodString;
        }, z.core.$strict>;
        packets: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"reset">;
            producer: z.ZodObject<{
                repository: z.ZodLiteral<"revt-eng/revturbine-web">;
                run_id: z.ZodString;
                run_attempt: z.ZodNumber;
                job_id: z.ZodString;
                workflow_commit: z.ZodString;
                checkout_commit: z.ZodString;
                source_commit: z.ZodString;
                completed_at: z.ZodISODateTime;
                conclusion: z.ZodLiteral<"success">;
                workflow_path: z.ZodLiteral<".github/workflows/tinybird-destructive-migration.yml">;
                job: z.ZodLiteral<"destructive">;
                ref: z.ZodLiteral<"refs/heads/staging">;
                event_name: z.ZodEnum<{
                    push: "push";
                    workflow_dispatch: "workflow_dispatch";
                }>;
                mode: z.ZodLiteral<"apply">;
                ledger_commit: z.ZodString;
            }, z.core.$strict>;
            artifact: z.ZodObject<{
                id: z.ZodString;
                name: z.ZodString;
                filename: z.ZodString;
                archive_digest: z.ZodString;
                receipt_digest: z.ZodString;
                archive_bytes: z.ZodNumber;
                created_at: z.ZodISODateTime;
                expires_at: z.ZodISODateTime;
            }, z.core.$strict>;
            receipt: z.ZodObject<{
                applied_entry_receipt_id: z.ZodString;
                workflow_run_id: z.ZodString;
                workflow_attempt: z.ZodNumber;
                terminal_at: z.ZodISODateTime;
                resources: z.ZodArray<z.ZodObject<{
                    resource: z.ZodEnum<{
                        events_billing: "events_billing";
                        events_clickstream: "events_clickstream";
                        placement_presentations: "placement_presentations";
                        placement_exposure_attribution: "placement_exposure_attribution";
                        experiment_assignments: "experiment_assignments";
                        conversion_touch_attribution: "conversion_touch_attribution";
                        aggregates_daily_revenue: "aggregates_daily_revenue";
                        subscription_stock_weekly: "subscription_stock_weekly";
                        gate_event_fields: "gate_event_fields";
                        user_account_map: "user_account_map";
                    }>;
                    predelete_physical_count: z.ZodNumber;
                    delete_job_id: z.ZodString;
                    delete_status: z.ZodLiteral<"complete">;
                    zero_read_at: z.ZodISODateTime;
                    remaining_physical_count: z.ZodLiteral<0>;
                    remaining_logical_count: z.ZodLiteral<0>;
                }, z.core.$strict>>;
                entry_id: z.ZodString;
                predicate_digest: z.ZodLiteral<string>;
                resource_set_digest: z.ZodLiteral<string>;
            }, z.core.$strict>;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"ingest">;
            producer: z.ZodObject<{
                repository: z.ZodLiteral<"revt-eng/revturbine-web">;
                run_id: z.ZodString;
                run_attempt: z.ZodNumber;
                job_id: z.ZodString;
                workflow_commit: z.ZodString;
                checkout_commit: z.ZodString;
                source_commit: z.ZodString;
                completed_at: z.ZodISODateTime;
                conclusion: z.ZodLiteral<"success">;
                workflow_path: z.ZodLiteral<".github/workflows/promote-staging-to-main.yml">;
                job: z.ZodLiteral<"analytics-live">;
                event_name: z.ZodLiteral<"deployment_status">;
                ref: z.ZodLiteral<"refs/heads/staging">;
                deployment_commit: z.ZodString;
                deployment_environment: z.ZodLiteral<"staging">;
            }, z.core.$strict>;
            artifact: z.ZodObject<{
                id: z.ZodString;
                name: z.ZodString;
                filename: z.ZodString;
                archive_digest: z.ZodString;
                receipt_digest: z.ZodString;
                archive_bytes: z.ZodNumber;
                created_at: z.ZodISODateTime;
                expires_at: z.ZodISODateTime;
            }, z.core.$strict>;
            receipt: z.ZodObject<{
                kind: z.ZodEnum<{
                    billing: "billing";
                    ingest: "ingest";
                }>;
                probe_run_id: z.ZodString;
                workflow_run_id: z.ZodString;
                workflow_attempt: z.ZodNumber;
                deployment_id: z.ZodString;
                source_commit: z.ZodString;
                observed_interval: z.ZodObject<{
                    start: z.ZodISODateTime;
                    end: z.ZodISODateTime;
                }, z.core.$strict>;
                event_time: z.ZodISODateTime;
                environment_id: z.ZodLiteral<"production">;
                payload_digest: z.ZodString;
            }, z.core.$strict>;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"billing">;
            producer: z.ZodObject<{
                repository: z.ZodLiteral<"revt-eng/revturbine-web">;
                run_id: z.ZodString;
                run_attempt: z.ZodNumber;
                job_id: z.ZodString;
                workflow_commit: z.ZodString;
                checkout_commit: z.ZodString;
                source_commit: z.ZodString;
                completed_at: z.ZodISODateTime;
                conclusion: z.ZodLiteral<"success">;
                workflow_path: z.ZodLiteral<".github/workflows/promote-staging-to-main.yml">;
                job: z.ZodLiteral<"analytics-live">;
                event_name: z.ZodLiteral<"deployment_status">;
                ref: z.ZodLiteral<"refs/heads/staging">;
                deployment_commit: z.ZodString;
                deployment_environment: z.ZodLiteral<"staging">;
            }, z.core.$strict>;
            artifact: z.ZodObject<{
                id: z.ZodString;
                name: z.ZodString;
                filename: z.ZodString;
                archive_digest: z.ZodString;
                receipt_digest: z.ZodString;
                archive_bytes: z.ZodNumber;
                created_at: z.ZodISODateTime;
                expires_at: z.ZodISODateTime;
            }, z.core.$strict>;
            receipt: z.ZodObject<{
                kind: z.ZodEnum<{
                    billing: "billing";
                    ingest: "ingest";
                }>;
                probe_run_id: z.ZodString;
                workflow_run_id: z.ZodString;
                workflow_attempt: z.ZodNumber;
                deployment_id: z.ZodString;
                source_commit: z.ZodString;
                observed_interval: z.ZodObject<{
                    start: z.ZodISODateTime;
                    end: z.ZodISODateTime;
                }, z.core.$strict>;
                event_time: z.ZodISODateTime;
                environment_id: z.ZodLiteral<"production">;
                payload_digest: z.ZodString;
            }, z.core.$strict>;
        }, z.core.$strict>], "kind">>;
    }, z.core.$strict>;
}, z.core.$strict>;
declare const SimulationControlRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
    operation: z.ZodLiteral<"prepare">;
    profile: z.ZodLiteral<"ci">;
    seed: z.ZodLiteral<205006>;
    expected_app_commit: z.ZodString;
    evidence: z.ZodObject<{
        version: z.ZodLiteral<1>;
        collector: z.ZodObject<{
            run_id: z.ZodString;
            run_attempt: z.ZodNumber;
            workflow_commit: z.ZodString;
        }, z.core.$strict>;
        packets: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"reset">;
            producer: z.ZodObject<{
                repository: z.ZodLiteral<"revt-eng/revturbine-web">;
                run_id: z.ZodString;
                run_attempt: z.ZodNumber;
                job_id: z.ZodString;
                workflow_commit: z.ZodString;
                checkout_commit: z.ZodString;
                source_commit: z.ZodString;
                completed_at: z.ZodISODateTime;
                conclusion: z.ZodLiteral<"success">;
                workflow_path: z.ZodLiteral<".github/workflows/tinybird-destructive-migration.yml">;
                job: z.ZodLiteral<"destructive">;
                ref: z.ZodLiteral<"refs/heads/staging">;
                event_name: z.ZodEnum<{
                    push: "push";
                    workflow_dispatch: "workflow_dispatch";
                }>;
                mode: z.ZodLiteral<"apply">;
                ledger_commit: z.ZodString;
            }, z.core.$strict>;
            artifact: z.ZodObject<{
                id: z.ZodString;
                name: z.ZodString;
                filename: z.ZodString;
                archive_digest: z.ZodString;
                receipt_digest: z.ZodString;
                archive_bytes: z.ZodNumber;
                created_at: z.ZodISODateTime;
                expires_at: z.ZodISODateTime;
            }, z.core.$strict>;
            receipt: z.ZodObject<{
                applied_entry_receipt_id: z.ZodString;
                workflow_run_id: z.ZodString;
                workflow_attempt: z.ZodNumber;
                terminal_at: z.ZodISODateTime;
                resources: z.ZodArray<z.ZodObject<{
                    resource: z.ZodEnum<{
                        events_billing: "events_billing";
                        events_clickstream: "events_clickstream";
                        placement_presentations: "placement_presentations";
                        placement_exposure_attribution: "placement_exposure_attribution";
                        experiment_assignments: "experiment_assignments";
                        conversion_touch_attribution: "conversion_touch_attribution";
                        aggregates_daily_revenue: "aggregates_daily_revenue";
                        subscription_stock_weekly: "subscription_stock_weekly";
                        gate_event_fields: "gate_event_fields";
                        user_account_map: "user_account_map";
                    }>;
                    predelete_physical_count: z.ZodNumber;
                    delete_job_id: z.ZodString;
                    delete_status: z.ZodLiteral<"complete">;
                    zero_read_at: z.ZodISODateTime;
                    remaining_physical_count: z.ZodLiteral<0>;
                    remaining_logical_count: z.ZodLiteral<0>;
                }, z.core.$strict>>;
                entry_id: z.ZodString;
                predicate_digest: z.ZodLiteral<string>;
                resource_set_digest: z.ZodLiteral<string>;
            }, z.core.$strict>;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"ingest">;
            producer: z.ZodObject<{
                repository: z.ZodLiteral<"revt-eng/revturbine-web">;
                run_id: z.ZodString;
                run_attempt: z.ZodNumber;
                job_id: z.ZodString;
                workflow_commit: z.ZodString;
                checkout_commit: z.ZodString;
                source_commit: z.ZodString;
                completed_at: z.ZodISODateTime;
                conclusion: z.ZodLiteral<"success">;
                workflow_path: z.ZodLiteral<".github/workflows/promote-staging-to-main.yml">;
                job: z.ZodLiteral<"analytics-live">;
                event_name: z.ZodLiteral<"deployment_status">;
                ref: z.ZodLiteral<"refs/heads/staging">;
                deployment_commit: z.ZodString;
                deployment_environment: z.ZodLiteral<"staging">;
            }, z.core.$strict>;
            artifact: z.ZodObject<{
                id: z.ZodString;
                name: z.ZodString;
                filename: z.ZodString;
                archive_digest: z.ZodString;
                receipt_digest: z.ZodString;
                archive_bytes: z.ZodNumber;
                created_at: z.ZodISODateTime;
                expires_at: z.ZodISODateTime;
            }, z.core.$strict>;
            receipt: z.ZodObject<{
                kind: z.ZodEnum<{
                    billing: "billing";
                    ingest: "ingest";
                }>;
                probe_run_id: z.ZodString;
                workflow_run_id: z.ZodString;
                workflow_attempt: z.ZodNumber;
                deployment_id: z.ZodString;
                source_commit: z.ZodString;
                observed_interval: z.ZodObject<{
                    start: z.ZodISODateTime;
                    end: z.ZodISODateTime;
                }, z.core.$strict>;
                event_time: z.ZodISODateTime;
                environment_id: z.ZodLiteral<"production">;
                payload_digest: z.ZodString;
            }, z.core.$strict>;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"billing">;
            producer: z.ZodObject<{
                repository: z.ZodLiteral<"revt-eng/revturbine-web">;
                run_id: z.ZodString;
                run_attempt: z.ZodNumber;
                job_id: z.ZodString;
                workflow_commit: z.ZodString;
                checkout_commit: z.ZodString;
                source_commit: z.ZodString;
                completed_at: z.ZodISODateTime;
                conclusion: z.ZodLiteral<"success">;
                workflow_path: z.ZodLiteral<".github/workflows/promote-staging-to-main.yml">;
                job: z.ZodLiteral<"analytics-live">;
                event_name: z.ZodLiteral<"deployment_status">;
                ref: z.ZodLiteral<"refs/heads/staging">;
                deployment_commit: z.ZodString;
                deployment_environment: z.ZodLiteral<"staging">;
            }, z.core.$strict>;
            artifact: z.ZodObject<{
                id: z.ZodString;
                name: z.ZodString;
                filename: z.ZodString;
                archive_digest: z.ZodString;
                receipt_digest: z.ZodString;
                archive_bytes: z.ZodNumber;
                created_at: z.ZodISODateTime;
                expires_at: z.ZodISODateTime;
            }, z.core.$strict>;
            receipt: z.ZodObject<{
                kind: z.ZodEnum<{
                    billing: "billing";
                    ingest: "ingest";
                }>;
                probe_run_id: z.ZodString;
                workflow_run_id: z.ZodString;
                workflow_attempt: z.ZodNumber;
                deployment_id: z.ZodString;
                source_commit: z.ZodString;
                observed_interval: z.ZodObject<{
                    start: z.ZodISODateTime;
                    end: z.ZodISODateTime;
                }, z.core.$strict>;
                event_time: z.ZodISODateTime;
                environment_id: z.ZodLiteral<"production">;
                payload_digest: z.ZodString;
            }, z.core.$strict>;
        }, z.core.$strict>], "kind">>;
    }, z.core.$strict>;
}, z.core.$strict>, z.ZodObject<{
    operation: z.ZodLiteral<"execute">;
    preparation_event_id: z.ZodString;
    fingerprint: z.ZodObject<{
        version: z.ZodLiteral<1>;
        tenant_id: z.ZodLiteral<"tenant_simulation">;
        environment: z.ZodLiteral<"production">;
        test: z.ZodLiteral<true>;
        profile: z.ZodLiteral<"ci">;
        seed: z.ZodLiteral<205006>;
        scenario_digest: z.ZodString;
        playbook_digest: z.ZodString;
        inventory_digest: z.ZodString;
        packages: z.ZodObject<{
            schema: z.ZodString;
            schema_drizzle: z.ZodString;
            core: z.ZodString;
            optimization_core: z.ZodString;
            tinybird: z.ZodString;
        }, z.core.$strict>;
        demo_source_commit: z.ZodString;
        app_commit: z.ZodString;
        worker_commit: z.ZodString;
        simulation_generation: z.ZodString;
        stripe_generation: z.ZodString;
        mapper_revision: z.ZodString;
    }, z.core.$strict>;
    reset: z.ZodObject<{
        entry_id: z.ZodString;
        predicate_digest: z.ZodLiteral<string>;
        resource_set_digest: z.ZodLiteral<string>;
    }, z.core.$strict>;
    evidence: z.ZodObject<{
        version: z.ZodLiteral<1>;
        collector: z.ZodObject<{
            run_id: z.ZodString;
            run_attempt: z.ZodNumber;
            workflow_commit: z.ZodString;
        }, z.core.$strict>;
        packets: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"reset">;
            producer: z.ZodObject<{
                repository: z.ZodLiteral<"revt-eng/revturbine-web">;
                run_id: z.ZodString;
                run_attempt: z.ZodNumber;
                job_id: z.ZodString;
                workflow_commit: z.ZodString;
                checkout_commit: z.ZodString;
                source_commit: z.ZodString;
                completed_at: z.ZodISODateTime;
                conclusion: z.ZodLiteral<"success">;
                workflow_path: z.ZodLiteral<".github/workflows/tinybird-destructive-migration.yml">;
                job: z.ZodLiteral<"destructive">;
                ref: z.ZodLiteral<"refs/heads/staging">;
                event_name: z.ZodEnum<{
                    push: "push";
                    workflow_dispatch: "workflow_dispatch";
                }>;
                mode: z.ZodLiteral<"apply">;
                ledger_commit: z.ZodString;
            }, z.core.$strict>;
            artifact: z.ZodObject<{
                id: z.ZodString;
                name: z.ZodString;
                filename: z.ZodString;
                archive_digest: z.ZodString;
                receipt_digest: z.ZodString;
                archive_bytes: z.ZodNumber;
                created_at: z.ZodISODateTime;
                expires_at: z.ZodISODateTime;
            }, z.core.$strict>;
            receipt: z.ZodObject<{
                applied_entry_receipt_id: z.ZodString;
                workflow_run_id: z.ZodString;
                workflow_attempt: z.ZodNumber;
                terminal_at: z.ZodISODateTime;
                resources: z.ZodArray<z.ZodObject<{
                    resource: z.ZodEnum<{
                        events_billing: "events_billing";
                        events_clickstream: "events_clickstream";
                        placement_presentations: "placement_presentations";
                        placement_exposure_attribution: "placement_exposure_attribution";
                        experiment_assignments: "experiment_assignments";
                        conversion_touch_attribution: "conversion_touch_attribution";
                        aggregates_daily_revenue: "aggregates_daily_revenue";
                        subscription_stock_weekly: "subscription_stock_weekly";
                        gate_event_fields: "gate_event_fields";
                        user_account_map: "user_account_map";
                    }>;
                    predelete_physical_count: z.ZodNumber;
                    delete_job_id: z.ZodString;
                    delete_status: z.ZodLiteral<"complete">;
                    zero_read_at: z.ZodISODateTime;
                    remaining_physical_count: z.ZodLiteral<0>;
                    remaining_logical_count: z.ZodLiteral<0>;
                }, z.core.$strict>>;
                entry_id: z.ZodString;
                predicate_digest: z.ZodLiteral<string>;
                resource_set_digest: z.ZodLiteral<string>;
            }, z.core.$strict>;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"ingest">;
            producer: z.ZodObject<{
                repository: z.ZodLiteral<"revt-eng/revturbine-web">;
                run_id: z.ZodString;
                run_attempt: z.ZodNumber;
                job_id: z.ZodString;
                workflow_commit: z.ZodString;
                checkout_commit: z.ZodString;
                source_commit: z.ZodString;
                completed_at: z.ZodISODateTime;
                conclusion: z.ZodLiteral<"success">;
                workflow_path: z.ZodLiteral<".github/workflows/promote-staging-to-main.yml">;
                job: z.ZodLiteral<"analytics-live">;
                event_name: z.ZodLiteral<"deployment_status">;
                ref: z.ZodLiteral<"refs/heads/staging">;
                deployment_commit: z.ZodString;
                deployment_environment: z.ZodLiteral<"staging">;
            }, z.core.$strict>;
            artifact: z.ZodObject<{
                id: z.ZodString;
                name: z.ZodString;
                filename: z.ZodString;
                archive_digest: z.ZodString;
                receipt_digest: z.ZodString;
                archive_bytes: z.ZodNumber;
                created_at: z.ZodISODateTime;
                expires_at: z.ZodISODateTime;
            }, z.core.$strict>;
            receipt: z.ZodObject<{
                kind: z.ZodEnum<{
                    billing: "billing";
                    ingest: "ingest";
                }>;
                probe_run_id: z.ZodString;
                workflow_run_id: z.ZodString;
                workflow_attempt: z.ZodNumber;
                deployment_id: z.ZodString;
                source_commit: z.ZodString;
                observed_interval: z.ZodObject<{
                    start: z.ZodISODateTime;
                    end: z.ZodISODateTime;
                }, z.core.$strict>;
                event_time: z.ZodISODateTime;
                environment_id: z.ZodLiteral<"production">;
                payload_digest: z.ZodString;
            }, z.core.$strict>;
        }, z.core.$strict>, z.ZodObject<{
            kind: z.ZodLiteral<"billing">;
            producer: z.ZodObject<{
                repository: z.ZodLiteral<"revt-eng/revturbine-web">;
                run_id: z.ZodString;
                run_attempt: z.ZodNumber;
                job_id: z.ZodString;
                workflow_commit: z.ZodString;
                checkout_commit: z.ZodString;
                source_commit: z.ZodString;
                completed_at: z.ZodISODateTime;
                conclusion: z.ZodLiteral<"success">;
                workflow_path: z.ZodLiteral<".github/workflows/promote-staging-to-main.yml">;
                job: z.ZodLiteral<"analytics-live">;
                event_name: z.ZodLiteral<"deployment_status">;
                ref: z.ZodLiteral<"refs/heads/staging">;
                deployment_commit: z.ZodString;
                deployment_environment: z.ZodLiteral<"staging">;
            }, z.core.$strict>;
            artifact: z.ZodObject<{
                id: z.ZodString;
                name: z.ZodString;
                filename: z.ZodString;
                archive_digest: z.ZodString;
                receipt_digest: z.ZodString;
                archive_bytes: z.ZodNumber;
                created_at: z.ZodISODateTime;
                expires_at: z.ZodISODateTime;
            }, z.core.$strict>;
            receipt: z.ZodObject<{
                kind: z.ZodEnum<{
                    billing: "billing";
                    ingest: "ingest";
                }>;
                probe_run_id: z.ZodString;
                workflow_run_id: z.ZodString;
                workflow_attempt: z.ZodNumber;
                deployment_id: z.ZodString;
                source_commit: z.ZodString;
                observed_interval: z.ZodObject<{
                    start: z.ZodISODateTime;
                    end: z.ZodISODateTime;
                }, z.core.$strict>;
                event_time: z.ZodISODateTime;
                environment_id: z.ZodLiteral<"production">;
                payload_digest: z.ZodString;
            }, z.core.$strict>;
        }, z.core.$strict>], "kind">>;
    }, z.core.$strict>;
}, z.core.$strict>]>;
declare function simulationControlRequestDigest(input: unknown): string;
declare function simulationControlEvidenceDigest(input: unknown): string;
/** Reset ownership is independent of caller, attestation, preparation and fingerprint. */
declare function simulationExecuteOccurrenceKey(input: unknown): string;
/** Sanitized server output, never a caller credential or an authority grant. */
declare const SimulationVerifiedProvenanceSchema: z.ZodObject<{
    version: z.ZodLiteral<1>;
    verifier_version: z.ZodLiteral<"github-oidc-v1">;
    request_digest: z.ZodString;
    evidence_digest: z.ZodString;
    collector: z.ZodObject<{
        run_id: z.ZodString;
        run_attempt: z.ZodNumber;
        workflow_commit: z.ZodString;
    }, z.core.$strict>;
    repository: z.ZodLiteral<"revt-eng/revturbine-web">;
    repository_id: z.ZodLiteral<"1206186530">;
    owner: z.ZodLiteral<"revt-eng">;
    owner_id: z.ZodLiteral<"266579130">;
    runner_environment: z.ZodLiteral<"github-hosted">;
    event_name: z.ZodLiteral<"workflow_dispatch">;
    ref: z.ZodLiteral<"refs/heads/main">;
    ref_type: z.ZodLiteral<"branch">;
    workflow_ref: z.ZodLiteral<"revt-eng/revturbine-web/.github/workflows/growth-lab-control.yml@refs/heads/main">;
    subject: z.ZodLiteral<"repo:revt-eng/revturbine-web:ref:refs/heads/main">;
    token_issued_at: z.ZodISODateTime;
    token_not_before_at: z.ZodISODateTime;
    token_expires_at: z.ZodISODateTime;
    verified_at: z.ZodISODateTime;
}, z.core.$strict>;
declare const SimulationVerifiedControlEventSchema: z.ZodObject<{
    request: z.ZodUnion<readonly [z.ZodObject<{
        operation: z.ZodLiteral<"prepare">;
        profile: z.ZodLiteral<"ci">;
        seed: z.ZodLiteral<205006>;
        expected_app_commit: z.ZodString;
        evidence: z.ZodObject<{
            version: z.ZodLiteral<1>;
            collector: z.ZodObject<{
                run_id: z.ZodString;
                run_attempt: z.ZodNumber;
                workflow_commit: z.ZodString;
            }, z.core.$strict>;
            packets: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"reset">;
                producer: z.ZodObject<{
                    repository: z.ZodLiteral<"revt-eng/revturbine-web">;
                    run_id: z.ZodString;
                    run_attempt: z.ZodNumber;
                    job_id: z.ZodString;
                    workflow_commit: z.ZodString;
                    checkout_commit: z.ZodString;
                    source_commit: z.ZodString;
                    completed_at: z.ZodISODateTime;
                    conclusion: z.ZodLiteral<"success">;
                    workflow_path: z.ZodLiteral<".github/workflows/tinybird-destructive-migration.yml">;
                    job: z.ZodLiteral<"destructive">;
                    ref: z.ZodLiteral<"refs/heads/staging">;
                    event_name: z.ZodEnum<{
                        push: "push";
                        workflow_dispatch: "workflow_dispatch";
                    }>;
                    mode: z.ZodLiteral<"apply">;
                    ledger_commit: z.ZodString;
                }, z.core.$strict>;
                artifact: z.ZodObject<{
                    id: z.ZodString;
                    name: z.ZodString;
                    filename: z.ZodString;
                    archive_digest: z.ZodString;
                    receipt_digest: z.ZodString;
                    archive_bytes: z.ZodNumber;
                    created_at: z.ZodISODateTime;
                    expires_at: z.ZodISODateTime;
                }, z.core.$strict>;
                receipt: z.ZodObject<{
                    applied_entry_receipt_id: z.ZodString;
                    workflow_run_id: z.ZodString;
                    workflow_attempt: z.ZodNumber;
                    terminal_at: z.ZodISODateTime;
                    resources: z.ZodArray<z.ZodObject<{
                        resource: z.ZodEnum<{
                            events_billing: "events_billing";
                            events_clickstream: "events_clickstream";
                            placement_presentations: "placement_presentations";
                            placement_exposure_attribution: "placement_exposure_attribution";
                            experiment_assignments: "experiment_assignments";
                            conversion_touch_attribution: "conversion_touch_attribution";
                            aggregates_daily_revenue: "aggregates_daily_revenue";
                            subscription_stock_weekly: "subscription_stock_weekly";
                            gate_event_fields: "gate_event_fields";
                            user_account_map: "user_account_map";
                        }>;
                        predelete_physical_count: z.ZodNumber;
                        delete_job_id: z.ZodString;
                        delete_status: z.ZodLiteral<"complete">;
                        zero_read_at: z.ZodISODateTime;
                        remaining_physical_count: z.ZodLiteral<0>;
                        remaining_logical_count: z.ZodLiteral<0>;
                    }, z.core.$strict>>;
                    entry_id: z.ZodString;
                    predicate_digest: z.ZodLiteral<string>;
                    resource_set_digest: z.ZodLiteral<string>;
                }, z.core.$strict>;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"ingest">;
                producer: z.ZodObject<{
                    repository: z.ZodLiteral<"revt-eng/revturbine-web">;
                    run_id: z.ZodString;
                    run_attempt: z.ZodNumber;
                    job_id: z.ZodString;
                    workflow_commit: z.ZodString;
                    checkout_commit: z.ZodString;
                    source_commit: z.ZodString;
                    completed_at: z.ZodISODateTime;
                    conclusion: z.ZodLiteral<"success">;
                    workflow_path: z.ZodLiteral<".github/workflows/promote-staging-to-main.yml">;
                    job: z.ZodLiteral<"analytics-live">;
                    event_name: z.ZodLiteral<"deployment_status">;
                    ref: z.ZodLiteral<"refs/heads/staging">;
                    deployment_commit: z.ZodString;
                    deployment_environment: z.ZodLiteral<"staging">;
                }, z.core.$strict>;
                artifact: z.ZodObject<{
                    id: z.ZodString;
                    name: z.ZodString;
                    filename: z.ZodString;
                    archive_digest: z.ZodString;
                    receipt_digest: z.ZodString;
                    archive_bytes: z.ZodNumber;
                    created_at: z.ZodISODateTime;
                    expires_at: z.ZodISODateTime;
                }, z.core.$strict>;
                receipt: z.ZodObject<{
                    kind: z.ZodEnum<{
                        billing: "billing";
                        ingest: "ingest";
                    }>;
                    probe_run_id: z.ZodString;
                    workflow_run_id: z.ZodString;
                    workflow_attempt: z.ZodNumber;
                    deployment_id: z.ZodString;
                    source_commit: z.ZodString;
                    observed_interval: z.ZodObject<{
                        start: z.ZodISODateTime;
                        end: z.ZodISODateTime;
                    }, z.core.$strict>;
                    event_time: z.ZodISODateTime;
                    environment_id: z.ZodLiteral<"production">;
                    payload_digest: z.ZodString;
                }, z.core.$strict>;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"billing">;
                producer: z.ZodObject<{
                    repository: z.ZodLiteral<"revt-eng/revturbine-web">;
                    run_id: z.ZodString;
                    run_attempt: z.ZodNumber;
                    job_id: z.ZodString;
                    workflow_commit: z.ZodString;
                    checkout_commit: z.ZodString;
                    source_commit: z.ZodString;
                    completed_at: z.ZodISODateTime;
                    conclusion: z.ZodLiteral<"success">;
                    workflow_path: z.ZodLiteral<".github/workflows/promote-staging-to-main.yml">;
                    job: z.ZodLiteral<"analytics-live">;
                    event_name: z.ZodLiteral<"deployment_status">;
                    ref: z.ZodLiteral<"refs/heads/staging">;
                    deployment_commit: z.ZodString;
                    deployment_environment: z.ZodLiteral<"staging">;
                }, z.core.$strict>;
                artifact: z.ZodObject<{
                    id: z.ZodString;
                    name: z.ZodString;
                    filename: z.ZodString;
                    archive_digest: z.ZodString;
                    receipt_digest: z.ZodString;
                    archive_bytes: z.ZodNumber;
                    created_at: z.ZodISODateTime;
                    expires_at: z.ZodISODateTime;
                }, z.core.$strict>;
                receipt: z.ZodObject<{
                    kind: z.ZodEnum<{
                        billing: "billing";
                        ingest: "ingest";
                    }>;
                    probe_run_id: z.ZodString;
                    workflow_run_id: z.ZodString;
                    workflow_attempt: z.ZodNumber;
                    deployment_id: z.ZodString;
                    source_commit: z.ZodString;
                    observed_interval: z.ZodObject<{
                        start: z.ZodISODateTime;
                        end: z.ZodISODateTime;
                    }, z.core.$strict>;
                    event_time: z.ZodISODateTime;
                    environment_id: z.ZodLiteral<"production">;
                    payload_digest: z.ZodString;
                }, z.core.$strict>;
            }, z.core.$strict>], "kind">>;
        }, z.core.$strict>;
    }, z.core.$strict>, z.ZodObject<{
        operation: z.ZodLiteral<"execute">;
        preparation_event_id: z.ZodString;
        fingerprint: z.ZodObject<{
            version: z.ZodLiteral<1>;
            tenant_id: z.ZodLiteral<"tenant_simulation">;
            environment: z.ZodLiteral<"production">;
            test: z.ZodLiteral<true>;
            profile: z.ZodLiteral<"ci">;
            seed: z.ZodLiteral<205006>;
            scenario_digest: z.ZodString;
            playbook_digest: z.ZodString;
            inventory_digest: z.ZodString;
            packages: z.ZodObject<{
                schema: z.ZodString;
                schema_drizzle: z.ZodString;
                core: z.ZodString;
                optimization_core: z.ZodString;
                tinybird: z.ZodString;
            }, z.core.$strict>;
            demo_source_commit: z.ZodString;
            app_commit: z.ZodString;
            worker_commit: z.ZodString;
            simulation_generation: z.ZodString;
            stripe_generation: z.ZodString;
            mapper_revision: z.ZodString;
        }, z.core.$strict>;
        reset: z.ZodObject<{
            entry_id: z.ZodString;
            predicate_digest: z.ZodLiteral<string>;
            resource_set_digest: z.ZodLiteral<string>;
        }, z.core.$strict>;
        evidence: z.ZodObject<{
            version: z.ZodLiteral<1>;
            collector: z.ZodObject<{
                run_id: z.ZodString;
                run_attempt: z.ZodNumber;
                workflow_commit: z.ZodString;
            }, z.core.$strict>;
            packets: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"reset">;
                producer: z.ZodObject<{
                    repository: z.ZodLiteral<"revt-eng/revturbine-web">;
                    run_id: z.ZodString;
                    run_attempt: z.ZodNumber;
                    job_id: z.ZodString;
                    workflow_commit: z.ZodString;
                    checkout_commit: z.ZodString;
                    source_commit: z.ZodString;
                    completed_at: z.ZodISODateTime;
                    conclusion: z.ZodLiteral<"success">;
                    workflow_path: z.ZodLiteral<".github/workflows/tinybird-destructive-migration.yml">;
                    job: z.ZodLiteral<"destructive">;
                    ref: z.ZodLiteral<"refs/heads/staging">;
                    event_name: z.ZodEnum<{
                        push: "push";
                        workflow_dispatch: "workflow_dispatch";
                    }>;
                    mode: z.ZodLiteral<"apply">;
                    ledger_commit: z.ZodString;
                }, z.core.$strict>;
                artifact: z.ZodObject<{
                    id: z.ZodString;
                    name: z.ZodString;
                    filename: z.ZodString;
                    archive_digest: z.ZodString;
                    receipt_digest: z.ZodString;
                    archive_bytes: z.ZodNumber;
                    created_at: z.ZodISODateTime;
                    expires_at: z.ZodISODateTime;
                }, z.core.$strict>;
                receipt: z.ZodObject<{
                    applied_entry_receipt_id: z.ZodString;
                    workflow_run_id: z.ZodString;
                    workflow_attempt: z.ZodNumber;
                    terminal_at: z.ZodISODateTime;
                    resources: z.ZodArray<z.ZodObject<{
                        resource: z.ZodEnum<{
                            events_billing: "events_billing";
                            events_clickstream: "events_clickstream";
                            placement_presentations: "placement_presentations";
                            placement_exposure_attribution: "placement_exposure_attribution";
                            experiment_assignments: "experiment_assignments";
                            conversion_touch_attribution: "conversion_touch_attribution";
                            aggregates_daily_revenue: "aggregates_daily_revenue";
                            subscription_stock_weekly: "subscription_stock_weekly";
                            gate_event_fields: "gate_event_fields";
                            user_account_map: "user_account_map";
                        }>;
                        predelete_physical_count: z.ZodNumber;
                        delete_job_id: z.ZodString;
                        delete_status: z.ZodLiteral<"complete">;
                        zero_read_at: z.ZodISODateTime;
                        remaining_physical_count: z.ZodLiteral<0>;
                        remaining_logical_count: z.ZodLiteral<0>;
                    }, z.core.$strict>>;
                    entry_id: z.ZodString;
                    predicate_digest: z.ZodLiteral<string>;
                    resource_set_digest: z.ZodLiteral<string>;
                }, z.core.$strict>;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"ingest">;
                producer: z.ZodObject<{
                    repository: z.ZodLiteral<"revt-eng/revturbine-web">;
                    run_id: z.ZodString;
                    run_attempt: z.ZodNumber;
                    job_id: z.ZodString;
                    workflow_commit: z.ZodString;
                    checkout_commit: z.ZodString;
                    source_commit: z.ZodString;
                    completed_at: z.ZodISODateTime;
                    conclusion: z.ZodLiteral<"success">;
                    workflow_path: z.ZodLiteral<".github/workflows/promote-staging-to-main.yml">;
                    job: z.ZodLiteral<"analytics-live">;
                    event_name: z.ZodLiteral<"deployment_status">;
                    ref: z.ZodLiteral<"refs/heads/staging">;
                    deployment_commit: z.ZodString;
                    deployment_environment: z.ZodLiteral<"staging">;
                }, z.core.$strict>;
                artifact: z.ZodObject<{
                    id: z.ZodString;
                    name: z.ZodString;
                    filename: z.ZodString;
                    archive_digest: z.ZodString;
                    receipt_digest: z.ZodString;
                    archive_bytes: z.ZodNumber;
                    created_at: z.ZodISODateTime;
                    expires_at: z.ZodISODateTime;
                }, z.core.$strict>;
                receipt: z.ZodObject<{
                    kind: z.ZodEnum<{
                        billing: "billing";
                        ingest: "ingest";
                    }>;
                    probe_run_id: z.ZodString;
                    workflow_run_id: z.ZodString;
                    workflow_attempt: z.ZodNumber;
                    deployment_id: z.ZodString;
                    source_commit: z.ZodString;
                    observed_interval: z.ZodObject<{
                        start: z.ZodISODateTime;
                        end: z.ZodISODateTime;
                    }, z.core.$strict>;
                    event_time: z.ZodISODateTime;
                    environment_id: z.ZodLiteral<"production">;
                    payload_digest: z.ZodString;
                }, z.core.$strict>;
            }, z.core.$strict>, z.ZodObject<{
                kind: z.ZodLiteral<"billing">;
                producer: z.ZodObject<{
                    repository: z.ZodLiteral<"revt-eng/revturbine-web">;
                    run_id: z.ZodString;
                    run_attempt: z.ZodNumber;
                    job_id: z.ZodString;
                    workflow_commit: z.ZodString;
                    checkout_commit: z.ZodString;
                    source_commit: z.ZodString;
                    completed_at: z.ZodISODateTime;
                    conclusion: z.ZodLiteral<"success">;
                    workflow_path: z.ZodLiteral<".github/workflows/promote-staging-to-main.yml">;
                    job: z.ZodLiteral<"analytics-live">;
                    event_name: z.ZodLiteral<"deployment_status">;
                    ref: z.ZodLiteral<"refs/heads/staging">;
                    deployment_commit: z.ZodString;
                    deployment_environment: z.ZodLiteral<"staging">;
                }, z.core.$strict>;
                artifact: z.ZodObject<{
                    id: z.ZodString;
                    name: z.ZodString;
                    filename: z.ZodString;
                    archive_digest: z.ZodString;
                    receipt_digest: z.ZodString;
                    archive_bytes: z.ZodNumber;
                    created_at: z.ZodISODateTime;
                    expires_at: z.ZodISODateTime;
                }, z.core.$strict>;
                receipt: z.ZodObject<{
                    kind: z.ZodEnum<{
                        billing: "billing";
                        ingest: "ingest";
                    }>;
                    probe_run_id: z.ZodString;
                    workflow_run_id: z.ZodString;
                    workflow_attempt: z.ZodNumber;
                    deployment_id: z.ZodString;
                    source_commit: z.ZodString;
                    observed_interval: z.ZodObject<{
                        start: z.ZodISODateTime;
                        end: z.ZodISODateTime;
                    }, z.core.$strict>;
                    event_time: z.ZodISODateTime;
                    environment_id: z.ZodLiteral<"production">;
                    payload_digest: z.ZodString;
                }, z.core.$strict>;
            }, z.core.$strict>], "kind">>;
        }, z.core.$strict>;
    }, z.core.$strict>]>;
    provenance: z.ZodObject<{
        version: z.ZodLiteral<1>;
        verifier_version: z.ZodLiteral<"github-oidc-v1">;
        request_digest: z.ZodString;
        evidence_digest: z.ZodString;
        collector: z.ZodObject<{
            run_id: z.ZodString;
            run_attempt: z.ZodNumber;
            workflow_commit: z.ZodString;
        }, z.core.$strict>;
        repository: z.ZodLiteral<"revt-eng/revturbine-web">;
        repository_id: z.ZodLiteral<"1206186530">;
        owner: z.ZodLiteral<"revt-eng">;
        owner_id: z.ZodLiteral<"266579130">;
        runner_environment: z.ZodLiteral<"github-hosted">;
        event_name: z.ZodLiteral<"workflow_dispatch">;
        ref: z.ZodLiteral<"refs/heads/main">;
        ref_type: z.ZodLiteral<"branch">;
        workflow_ref: z.ZodLiteral<"revt-eng/revturbine-web/.github/workflows/growth-lab-control.yml@refs/heads/main">;
        subject: z.ZodLiteral<"repo:revt-eng/revturbine-web:ref:refs/heads/main">;
        token_issued_at: z.ZodISODateTime;
        token_not_before_at: z.ZodISODateTime;
        token_expires_at: z.ZodISODateTime;
        verified_at: z.ZodISODateTime;
    }, z.core.$strict>;
    requested_by: z.ZodString;
}, z.core.$strict>;
declare const SimulationExecutionAdmissionSchema: z.ZodObject<{
    occurrence_key: z.ZodString;
    admitted_at: z.ZodISODateTime;
    start_before: z.ZodISODateTime;
    deadline_at: z.ZodISODateTime;
    original_event_id: z.ZodString;
    original_run_id: z.ZodString;
}, z.core.$strict>;
declare const SimulationChildQualificationRequestSchema: z.ZodObject<{
    operation: z.ZodLiteral<"qualify">;
    parent_event_id: z.ZodString;
    parent_run_id: z.ZodString;
    requested_by: z.ZodString;
    fingerprint: z.ZodObject<{
        version: z.ZodLiteral<1>;
        tenant_id: z.ZodLiteral<"tenant_simulation">;
        environment: z.ZodLiteral<"production">;
        test: z.ZodLiteral<true>;
        profile: z.ZodLiteral<"ci">;
        seed: z.ZodLiteral<205006>;
        scenario_digest: z.ZodString;
        playbook_digest: z.ZodString;
        inventory_digest: z.ZodString;
        packages: z.ZodObject<{
            schema: z.ZodString;
            schema_drizzle: z.ZodString;
            core: z.ZodString;
            optimization_core: z.ZodString;
            tinybird: z.ZodString;
        }, z.core.$strict>;
        demo_source_commit: z.ZodString;
        app_commit: z.ZodString;
        worker_commit: z.ZodString;
        simulation_generation: z.ZodString;
        stripe_generation: z.ZodString;
        mapper_revision: z.ZodString;
    }, z.core.$strict>;
    qualification_id: z.ZodString;
}, z.core.$strict>;
declare const SimulationChildQualificationReceiptSchema: z.ZodObject<{
    operation: z.ZodLiteral<"qualify">;
    status: z.ZodEnum<{
        qualified: "qualified";
        refused: "refused";
    }>;
    parent_event_id: z.ZodString;
    parent_run_id: z.ZodString;
    qualification_id: z.ZodString;
    invocation_event_id: z.ZodNullable<z.ZodString>;
    child_runtime_run_id: z.ZodString;
    original_child_run_id: z.ZodNullable<z.ZodString>;
    logical_handler: z.ZodLiteral<"simulation-seed-slice">;
    provider_function_id: z.ZodNullable<z.ZodString>;
    environment_id: z.ZodString;
    environment: z.ZodLiteral<"production">;
    worker_commit: z.ZodString;
    fingerprint_digest: z.ZodString;
    observed_at: z.ZodISODateTime;
    association_digest: z.ZodNullable<z.ZodString>;
    errors: z.ZodArray<z.ZodObject<{
        code: z.ZodEnum<{
            canceled: "canceled";
            unauthorized: "unauthorized";
            identity_mismatch: "identity_mismatch";
            unsupported_lane: "unsupported_lane";
            busy: "busy";
            unknown_lane: "unknown_lane";
            budget_exceeded: "budget_exceeded";
            measurement_missing: "measurement_missing";
            reset_unverified: "reset_unverified";
            footprint_mismatch: "footprint_mismatch";
            source_drift: "source_drift";
            partial_acknowledgment: "partial_acknowledgment";
            child_missing: "child_missing";
            history_expired: "history_expired";
            provider_unavailable: "provider_unavailable";
            timeout: "timeout";
            unsafe_retry: "unsafe_retry";
            reconciliation_failed: "reconciliation_failed";
            replay_unverified: "replay_unverified";
            conflict: "conflict";
        }>;
        message: z.ZodString;
    }, z.core.$strict>>;
}, z.core.$strict>;
declare const SimulationPreparationReceiptSchema: z.ZodObject<{
    operation: z.ZodLiteral<"prepare">;
    status: z.ZodEnum<{
        failed: "failed";
        refused: "refused";
        prepared: "prepared";
    }>;
    identity: z.ZodObject<{
        requested_by: z.ZodString;
        event_id: z.ZodString;
        run_id: z.ZodString;
        deployment_id: z.ZodString;
        function_id: z.ZodLiteral<"simulation-seed-requested">;
        inngest_environment_id: z.ZodString;
        app_commit: z.ZodString;
        worker_commit: z.ZodString;
    }, z.core.$strict>;
    provenance: z.ZodNullable<z.ZodObject<{
        version: z.ZodLiteral<1>;
        verifier_version: z.ZodLiteral<"github-oidc-v1">;
        request_digest: z.ZodString;
        evidence_digest: z.ZodString;
        collector: z.ZodObject<{
            run_id: z.ZodString;
            run_attempt: z.ZodNumber;
            workflow_commit: z.ZodString;
        }, z.core.$strict>;
        repository: z.ZodLiteral<"revt-eng/revturbine-web">;
        repository_id: z.ZodLiteral<"1206186530">;
        owner: z.ZodLiteral<"revt-eng">;
        owner_id: z.ZodLiteral<"266579130">;
        runner_environment: z.ZodLiteral<"github-hosted">;
        event_name: z.ZodLiteral<"workflow_dispatch">;
        ref: z.ZodLiteral<"refs/heads/main">;
        ref_type: z.ZodLiteral<"branch">;
        workflow_ref: z.ZodLiteral<"revt-eng/revturbine-web/.github/workflows/growth-lab-control.yml@refs/heads/main">;
        subject: z.ZodLiteral<"repo:revt-eng/revturbine-web:ref:refs/heads/main">;
        token_issued_at: z.ZodISODateTime;
        token_not_before_at: z.ZodISODateTime;
        token_expires_at: z.ZodISODateTime;
        verified_at: z.ZodISODateTime;
    }, z.core.$strict>>;
    child_qualification: z.ZodNullable<z.ZodObject<{
        operation: z.ZodLiteral<"qualify">;
        status: z.ZodEnum<{
            qualified: "qualified";
            refused: "refused";
        }>;
        parent_event_id: z.ZodString;
        parent_run_id: z.ZodString;
        qualification_id: z.ZodString;
        invocation_event_id: z.ZodNullable<z.ZodString>;
        child_runtime_run_id: z.ZodString;
        original_child_run_id: z.ZodNullable<z.ZodString>;
        logical_handler: z.ZodLiteral<"simulation-seed-slice">;
        provider_function_id: z.ZodNullable<z.ZodString>;
        environment_id: z.ZodString;
        environment: z.ZodLiteral<"production">;
        worker_commit: z.ZodString;
        fingerprint_digest: z.ZodString;
        observed_at: z.ZodISODateTime;
        association_digest: z.ZodNullable<z.ZodString>;
        errors: z.ZodArray<z.ZodObject<{
            code: z.ZodEnum<{
                canceled: "canceled";
                unauthorized: "unauthorized";
                identity_mismatch: "identity_mismatch";
                unsupported_lane: "unsupported_lane";
                busy: "busy";
                unknown_lane: "unknown_lane";
                budget_exceeded: "budget_exceeded";
                measurement_missing: "measurement_missing";
                reset_unverified: "reset_unverified";
                footprint_mismatch: "footprint_mismatch";
                source_drift: "source_drift";
                partial_acknowledgment: "partial_acknowledgment";
                child_missing: "child_missing";
                history_expired: "history_expired";
                provider_unavailable: "provider_unavailable";
                timeout: "timeout";
                unsafe_retry: "unsafe_retry";
                reconciliation_failed: "reconciliation_failed";
                replay_unverified: "replay_unverified";
                conflict: "conflict";
            }>;
            message: z.ZodString;
        }, z.core.$strict>>;
    }, z.core.$strict>>;
    fingerprint: z.ZodObject<{
        version: z.ZodLiteral<1>;
        tenant_id: z.ZodLiteral<"tenant_simulation">;
        environment: z.ZodLiteral<"production">;
        test: z.ZodLiteral<true>;
        profile: z.ZodLiteral<"ci">;
        seed: z.ZodLiteral<205006>;
        scenario_digest: z.ZodString;
        playbook_digest: z.ZodString;
        inventory_digest: z.ZodString;
        packages: z.ZodObject<{
            schema: z.ZodString;
            schema_drizzle: z.ZodString;
            core: z.ZodString;
            optimization_core: z.ZodString;
            tinybird: z.ZodString;
        }, z.core.$strict>;
        demo_source_commit: z.ZodString;
        app_commit: z.ZodString;
        worker_commit: z.ZodString;
        simulation_generation: z.ZodString;
        stripe_generation: z.ZodString;
        mapper_revision: z.ZodString;
    }, z.core.$strict>;
    prepared_at: z.ZodISODateTime;
    expires_at: z.ZodISODateTime;
    config_read_authorized: z.ZodBoolean;
    lanes: z.ZodArray<z.ZodObject<{
        lane: z.ZodEnum<{
            billing: "billing";
            clickstream: "clickstream";
            interactions: "interactions";
        }>;
        slices: z.ZodNumber;
        items: z.ZodNumber;
        inventory_digest: z.ZodString;
        max_http_payload_bytes: z.ZodNumber;
        door_limit_bytes: z.ZodNumber;
    }, z.core.$strict>>;
    measurements: z.ZodArray<z.ZodObject<{
        lane: z.ZodEnum<{
            billing: "billing";
            clickstream: "clickstream";
            interactions: "interactions";
        }>;
        status: z.ZodEnum<{
            unknown: "unknown";
            measured: "measured";
        }>;
        workflow_run_id: z.ZodNullable<z.ZodString>;
        deployment_id: z.ZodString;
        receipt_id: z.ZodNullable<z.ZodString>;
        observed_rows: z.ZodNullable<z.ZodNumber>;
        elapsed_ms: z.ZodNullable<z.ZodNumber>;
        measured_at: z.ZodNullable<z.ZodISODateTime>;
    }, z.core.$strict>>;
    prior_lanes: z.ZodArray<z.ZodObject<{
        deployment_id: z.ZodString;
        inngest_environment_id: z.ZodString;
        disposition: z.ZodEnum<{
            unknown: "unknown";
            busy: "busy";
            clear: "clear";
        }>;
        terminal_receipt_id: z.ZodNullable<z.ZodString>;
    }, z.core.$strict>>;
    budget: z.ZodObject<{
        child_concurrency: z.ZodNumber;
        slice_timeout_seconds: z.ZodNumber;
        deadline_seconds: z.ZodNumber;
        convergence_seconds: z.ZodNumber;
        poll_seconds: z.ZodLiteral<15>;
        workflow_timeout_minutes: z.ZodNumber;
        estimated_seconds: z.ZodNullable<z.ZodNumber>;
        assumptions: z.ZodArray<z.ZodString>;
    }, z.core.$strict>;
    pending_reset_entries: z.ZodArray<z.ZodString>;
    applied_reset_entries: z.ZodArray<z.ZodString>;
    resources: z.ZodArray<z.ZodObject<{
        resource: z.ZodEnum<{
            events_billing: "events_billing";
            events_clickstream: "events_clickstream";
            placement_presentations: "placement_presentations";
            placement_exposure_attribution: "placement_exposure_attribution";
            experiment_assignments: "experiment_assignments";
            conversion_touch_attribution: "conversion_touch_attribution";
            aggregates_daily_revenue: "aggregates_daily_revenue";
            subscription_stock_weekly: "subscription_stock_weekly";
            gate_event_fields: "gate_event_fields";
            user_account_map: "user_account_map";
        }>;
        expected: z.ZodNullable<z.ZodObject<{
            count: z.ZodNumber;
            digest: z.ZodString;
            examples: z.ZodArray<z.ZodString>;
        }, z.core.$strict>>;
        unresolved_reason: z.ZodNullable<z.ZodString>;
    }, z.core.$strict>>;
    errors: z.ZodArray<z.ZodObject<{
        code: z.ZodEnum<{
            canceled: "canceled";
            unauthorized: "unauthorized";
            identity_mismatch: "identity_mismatch";
            unsupported_lane: "unsupported_lane";
            busy: "busy";
            unknown_lane: "unknown_lane";
            budget_exceeded: "budget_exceeded";
            measurement_missing: "measurement_missing";
            reset_unverified: "reset_unverified";
            footprint_mismatch: "footprint_mismatch";
            source_drift: "source_drift";
            partial_acknowledgment: "partial_acknowledgment";
            child_missing: "child_missing";
            history_expired: "history_expired";
            provider_unavailable: "provider_unavailable";
            timeout: "timeout";
            unsafe_retry: "unsafe_retry";
            reconciliation_failed: "reconciliation_failed";
            replay_unverified: "replay_unverified";
            conflict: "conflict";
        }>;
        message: z.ZodString;
    }, z.core.$strict>>;
}, z.core.$strict>;
declare const SimulationSliceRequestSchema: z.ZodObject<{
    operation: z.ZodLiteral<"execute_slice">;
    admission: z.ZodObject<{
        occurrence_key: z.ZodString;
        admitted_at: z.ZodISODateTime;
        start_before: z.ZodISODateTime;
        deadline_at: z.ZodISODateTime;
        original_event_id: z.ZodString;
        original_run_id: z.ZodString;
    }, z.core.$strict>;
    parent_event_id: z.ZodString;
    parent_run_id: z.ZodString;
    requested_by: z.ZodString;
    fingerprint: z.ZodObject<{
        version: z.ZodLiteral<1>;
        tenant_id: z.ZodLiteral<"tenant_simulation">;
        environment: z.ZodLiteral<"production">;
        test: z.ZodLiteral<true>;
        profile: z.ZodLiteral<"ci">;
        seed: z.ZodLiteral<205006>;
        scenario_digest: z.ZodString;
        playbook_digest: z.ZodString;
        inventory_digest: z.ZodString;
        packages: z.ZodObject<{
            schema: z.ZodString;
            schema_drizzle: z.ZodString;
            core: z.ZodString;
            optimization_core: z.ZodString;
            tinybird: z.ZodString;
        }, z.core.$strict>;
        demo_source_commit: z.ZodString;
        app_commit: z.ZodString;
        worker_commit: z.ZodString;
        simulation_generation: z.ZodString;
        stripe_generation: z.ZodString;
        mapper_revision: z.ZodString;
    }, z.core.$strict>;
    lane: z.ZodEnum<{
        billing: "billing";
        clickstream: "clickstream";
        interactions: "interactions";
    }>;
    index: z.ZodNumber;
    expected: z.ZodNumber;
    expected_inventory_digest: z.ZodString;
}, z.core.$strict>;
declare const SimulationChildControlRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
    operation: z.ZodLiteral<"qualify">;
    parent_event_id: z.ZodString;
    parent_run_id: z.ZodString;
    requested_by: z.ZodString;
    fingerprint: z.ZodObject<{
        version: z.ZodLiteral<1>;
        tenant_id: z.ZodLiteral<"tenant_simulation">;
        environment: z.ZodLiteral<"production">;
        test: z.ZodLiteral<true>;
        profile: z.ZodLiteral<"ci">;
        seed: z.ZodLiteral<205006>;
        scenario_digest: z.ZodString;
        playbook_digest: z.ZodString;
        inventory_digest: z.ZodString;
        packages: z.ZodObject<{
            schema: z.ZodString;
            schema_drizzle: z.ZodString;
            core: z.ZodString;
            optimization_core: z.ZodString;
            tinybird: z.ZodString;
        }, z.core.$strict>;
        demo_source_commit: z.ZodString;
        app_commit: z.ZodString;
        worker_commit: z.ZodString;
        simulation_generation: z.ZodString;
        stripe_generation: z.ZodString;
        mapper_revision: z.ZodString;
    }, z.core.$strict>;
    qualification_id: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
    operation: z.ZodLiteral<"execute_slice">;
    admission: z.ZodObject<{
        occurrence_key: z.ZodString;
        admitted_at: z.ZodISODateTime;
        start_before: z.ZodISODateTime;
        deadline_at: z.ZodISODateTime;
        original_event_id: z.ZodString;
        original_run_id: z.ZodString;
    }, z.core.$strict>;
    parent_event_id: z.ZodString;
    parent_run_id: z.ZodString;
    requested_by: z.ZodString;
    fingerprint: z.ZodObject<{
        version: z.ZodLiteral<1>;
        tenant_id: z.ZodLiteral<"tenant_simulation">;
        environment: z.ZodLiteral<"production">;
        test: z.ZodLiteral<true>;
        profile: z.ZodLiteral<"ci">;
        seed: z.ZodLiteral<205006>;
        scenario_digest: z.ZodString;
        playbook_digest: z.ZodString;
        inventory_digest: z.ZodString;
        packages: z.ZodObject<{
            schema: z.ZodString;
            schema_drizzle: z.ZodString;
            core: z.ZodString;
            optimization_core: z.ZodString;
            tinybird: z.ZodString;
        }, z.core.$strict>;
        demo_source_commit: z.ZodString;
        app_commit: z.ZodString;
        worker_commit: z.ZodString;
        simulation_generation: z.ZodString;
        stripe_generation: z.ZodString;
        mapper_revision: z.ZodString;
    }, z.core.$strict>;
    lane: z.ZodEnum<{
        billing: "billing";
        clickstream: "clickstream";
        interactions: "interactions";
    }>;
    index: z.ZodNumber;
    expected: z.ZodNumber;
    expected_inventory_digest: z.ZodString;
}, z.core.$strict>]>;
declare const SimulationSliceReceiptSchema: z.ZodObject<{
    status: z.ZodEnum<{
        unknown: "unknown";
        canceled: "canceled";
        complete: "complete";
        failed: "failed";
        running: "running";
        skipped: "skipped";
    }>;
    fingerprint: z.ZodObject<{
        version: z.ZodLiteral<1>;
        tenant_id: z.ZodLiteral<"tenant_simulation">;
        environment: z.ZodLiteral<"production">;
        test: z.ZodLiteral<true>;
        profile: z.ZodLiteral<"ci">;
        seed: z.ZodLiteral<205006>;
        scenario_digest: z.ZodString;
        playbook_digest: z.ZodString;
        inventory_digest: z.ZodString;
        packages: z.ZodObject<{
            schema: z.ZodString;
            schema_drizzle: z.ZodString;
            core: z.ZodString;
            optimization_core: z.ZodString;
            tinybird: z.ZodString;
        }, z.core.$strict>;
        demo_source_commit: z.ZodString;
        app_commit: z.ZodString;
        worker_commit: z.ZodString;
        simulation_generation: z.ZodString;
        stripe_generation: z.ZodString;
        mapper_revision: z.ZodString;
    }, z.core.$strict>;
    worker_commit: z.ZodString;
    expected_inventory_digest: z.ZodString;
    expected: z.ZodNumber;
    accepted: z.ZodNullable<z.ZodNumber>;
    rejected: z.ZodNullable<z.ZodNumber>;
    duplicate: z.ZodNullable<z.ZodNumber>;
    elapsed_ms: z.ZodNumber;
    door_request_ids: z.ZodArray<z.ZodString>;
    door_receipt_ids: z.ZodArray<z.ZodString>;
    readback: z.ZodNullable<z.ZodObject<{
        count: z.ZodNumber;
        digest: z.ZodString;
        examples: z.ZodArray<z.ZodString>;
    }, z.core.$strict>>;
    errors: z.ZodArray<z.ZodObject<{
        code: z.ZodEnum<{
            canceled: "canceled";
            unauthorized: "unauthorized";
            identity_mismatch: "identity_mismatch";
            unsupported_lane: "unsupported_lane";
            busy: "busy";
            unknown_lane: "unknown_lane";
            budget_exceeded: "budget_exceeded";
            measurement_missing: "measurement_missing";
            reset_unverified: "reset_unverified";
            footprint_mismatch: "footprint_mismatch";
            source_drift: "source_drift";
            partial_acknowledgment: "partial_acknowledgment";
            child_missing: "child_missing";
            history_expired: "history_expired";
            provider_unavailable: "provider_unavailable";
            timeout: "timeout";
            unsafe_retry: "unsafe_retry";
            reconciliation_failed: "reconciliation_failed";
            replay_unverified: "replay_unverified";
            conflict: "conflict";
        }>;
        message: z.ZodString;
    }, z.core.$strict>>;
    lane: z.ZodEnum<{
        billing: "billing";
        clickstream: "clickstream";
        interactions: "interactions";
    }>;
    index: z.ZodNumber;
    child_run_id: z.ZodString;
    parent_event_id: z.ZodString;
    parent_run_id: z.ZodString;
}, z.core.$strict>;
/** Typed retained evidence is not authentication: adapters independently prove its provenance. */
declare const SimulationRunReceiptSchema: z.ZodObject<{
    operation: z.ZodLiteral<"execute">;
    status: z.ZodEnum<{
        unknown: "unknown";
        canceled: "canceled";
        expired: "expired";
        complete: "complete";
        failed: "failed";
        refused: "refused";
        queued: "queued";
        running: "running";
        skipped: "skipped";
        timed_out: "timed_out";
    }>;
    phase: z.ZodEnum<{
        slices: "slices";
        admission: "admission";
        setup: "setup";
        source_reconciliation: "source_reconciliation";
        replay: "replay";
        qualification: "qualification";
    }>;
    identity: z.ZodObject<{
        requested_by: z.ZodString;
        event_id: z.ZodString;
        run_id: z.ZodString;
        deployment_id: z.ZodString;
        function_id: z.ZodLiteral<"simulation-seed-requested">;
        inngest_environment_id: z.ZodString;
        app_commit: z.ZodString;
        worker_commit: z.ZodString;
    }, z.core.$strict>;
    provenance: z.ZodNullable<z.ZodObject<{
        version: z.ZodLiteral<1>;
        verifier_version: z.ZodLiteral<"github-oidc-v1">;
        request_digest: z.ZodString;
        evidence_digest: z.ZodString;
        collector: z.ZodObject<{
            run_id: z.ZodString;
            run_attempt: z.ZodNumber;
            workflow_commit: z.ZodString;
        }, z.core.$strict>;
        repository: z.ZodLiteral<"revt-eng/revturbine-web">;
        repository_id: z.ZodLiteral<"1206186530">;
        owner: z.ZodLiteral<"revt-eng">;
        owner_id: z.ZodLiteral<"266579130">;
        runner_environment: z.ZodLiteral<"github-hosted">;
        event_name: z.ZodLiteral<"workflow_dispatch">;
        ref: z.ZodLiteral<"refs/heads/main">;
        ref_type: z.ZodLiteral<"branch">;
        workflow_ref: z.ZodLiteral<"revt-eng/revturbine-web/.github/workflows/growth-lab-control.yml@refs/heads/main">;
        subject: z.ZodLiteral<"repo:revt-eng/revturbine-web:ref:refs/heads/main">;
        token_issued_at: z.ZodISODateTime;
        token_not_before_at: z.ZodISODateTime;
        token_expires_at: z.ZodISODateTime;
        verified_at: z.ZodISODateTime;
    }, z.core.$strict>>;
    admission: z.ZodNullable<z.ZodObject<{
        occurrence_key: z.ZodString;
        admitted_at: z.ZodISODateTime;
        start_before: z.ZodISODateTime;
        deadline_at: z.ZodISODateTime;
        original_event_id: z.ZodString;
        original_run_id: z.ZodString;
    }, z.core.$strict>>;
    fingerprint: z.ZodObject<{
        version: z.ZodLiteral<1>;
        tenant_id: z.ZodLiteral<"tenant_simulation">;
        environment: z.ZodLiteral<"production">;
        test: z.ZodLiteral<true>;
        profile: z.ZodLiteral<"ci">;
        seed: z.ZodLiteral<205006>;
        scenario_digest: z.ZodString;
        playbook_digest: z.ZodString;
        inventory_digest: z.ZodString;
        packages: z.ZodObject<{
            schema: z.ZodString;
            schema_drizzle: z.ZodString;
            core: z.ZodString;
            optimization_core: z.ZodString;
            tinybird: z.ZodString;
        }, z.core.$strict>;
        demo_source_commit: z.ZodString;
        app_commit: z.ZodString;
        worker_commit: z.ZodString;
        simulation_generation: z.ZodString;
        stripe_generation: z.ZodString;
        mapper_revision: z.ZodString;
    }, z.core.$strict>;
    fingerprint_digest: z.ZodString;
    prepared_inventory_digest: z.ZodString;
    started_at: z.ZodISODateTime;
    deadline_at: z.ZodISODateTime;
    preparation_event_id: z.ZodString;
    requested_reset: z.ZodObject<{
        entry_id: z.ZodString;
        predicate_digest: z.ZodLiteral<string>;
        resource_set_digest: z.ZodLiteral<string>;
    }, z.core.$strict>;
    completed_at: z.ZodNullable<z.ZodISODateTime>;
    expires_at: z.ZodISODateTime;
    reset_zero: z.ZodNullable<z.ZodObject<{
        applied_entry_receipt_id: z.ZodString;
        workflow_run_id: z.ZodString;
        workflow_attempt: z.ZodNumber;
        terminal_at: z.ZodISODateTime;
        resources: z.ZodArray<z.ZodObject<{
            resource: z.ZodEnum<{
                events_billing: "events_billing";
                events_clickstream: "events_clickstream";
                placement_presentations: "placement_presentations";
                placement_exposure_attribution: "placement_exposure_attribution";
                experiment_assignments: "experiment_assignments";
                conversion_touch_attribution: "conversion_touch_attribution";
                aggregates_daily_revenue: "aggregates_daily_revenue";
                subscription_stock_weekly: "subscription_stock_weekly";
                gate_event_fields: "gate_event_fields";
                user_account_map: "user_account_map";
            }>;
            predelete_physical_count: z.ZodNumber;
            delete_job_id: z.ZodString;
            delete_status: z.ZodLiteral<"complete">;
            zero_read_at: z.ZodISODateTime;
            remaining_physical_count: z.ZodLiteral<0>;
            remaining_logical_count: z.ZodLiteral<0>;
        }, z.core.$strict>>;
        entry_id: z.ZodString;
        predicate_digest: z.ZodLiteral<string>;
        resource_set_digest: z.ZodLiteral<string>;
    }, z.core.$strict>>;
    admitted_footprint: z.ZodNullable<z.ZodObject<{
        status: z.ZodEnum<{
            empty: "empty";
            exact_probes: "exact_probes";
        }>;
        observed_at: z.ZodISODateTime;
        allowlist_digest: z.ZodString;
        probe_runs: z.ZodArray<z.ZodObject<{
            kind: z.ZodEnum<{
                billing: "billing";
                ingest: "ingest";
            }>;
            probe_run_id: z.ZodString;
            workflow_run_id: z.ZodString;
            workflow_attempt: z.ZodNumber;
            deployment_id: z.ZodString;
            source_commit: z.ZodString;
            observed_interval: z.ZodObject<{
                start: z.ZodISODateTime;
                end: z.ZodISODateTime;
            }, z.core.$strict>;
            event_time: z.ZodISODateTime;
            environment_id: z.ZodLiteral<"production">;
            payload_digest: z.ZodString;
        }, z.core.$strict>>;
        resources: z.ZodArray<z.ZodObject<{
            resource: z.ZodEnum<{
                events_billing: "events_billing";
                events_clickstream: "events_clickstream";
                placement_presentations: "placement_presentations";
                placement_exposure_attribution: "placement_exposure_attribution";
                experiment_assignments: "experiment_assignments";
                conversion_touch_attribution: "conversion_touch_attribution";
                aggregates_daily_revenue: "aggregates_daily_revenue";
                subscription_stock_weekly: "subscription_stock_weekly";
                gate_event_fields: "gate_event_fields";
                user_account_map: "user_account_map";
            }>;
            physical_count: z.ZodNumber;
            logical_count: z.ZodNumber;
            expected_logical_count: z.ZodNumber;
            expected_key_digest: z.ZodString;
            observed_key_digest: z.ZodString;
            expected_payload_digest: z.ZodString;
            observed_payload_digest: z.ZodString;
            every_measure_zero: z.ZodNullable<z.ZodBoolean>;
            complete_read: z.ZodLiteral<true>;
        }, z.core.$strict>>;
    }, z.core.$strict>>;
    setup_receipt: z.ZodNullable<z.ZodObject<{
        config_version: z.ZodString;
        staged_receipt_id: z.ZodString;
        launch_receipt_id: z.ZodString;
        readback_receipt_id: z.ZodString;
        price_inventory_digest: z.ZodString;
    }, z.core.$strict>>;
    planned_lanes: z.ZodArray<z.ZodObject<{
        lane: z.ZodEnum<{
            billing: "billing";
            clickstream: "clickstream";
            interactions: "interactions";
        }>;
        slices: z.ZodNumber;
        items: z.ZodNumber;
        inventory_digest: z.ZodString;
        max_http_payload_bytes: z.ZodNumber;
        door_limit_bytes: z.ZodNumber;
    }, z.core.$strict>>;
    slices: z.ZodArray<z.ZodObject<{
        status: z.ZodEnum<{
            unknown: "unknown";
            canceled: "canceled";
            complete: "complete";
            failed: "failed";
            running: "running";
            skipped: "skipped";
        }>;
        expected: z.ZodNumber;
        acknowledged: z.ZodNullable<z.ZodNumber>;
        receipt_digest: z.ZodString;
        lane: z.ZodEnum<{
            billing: "billing";
            clickstream: "clickstream";
            interactions: "interactions";
        }>;
        index: z.ZodNumber;
        child_run_id: z.ZodString;
    }, z.core.$strict>>;
    resources: z.ZodArray<z.ZodObject<{
        resource: z.ZodEnum<{
            events_billing: "events_billing";
            events_clickstream: "events_clickstream";
            placement_presentations: "placement_presentations";
            placement_exposure_attribution: "placement_exposure_attribution";
            experiment_assignments: "experiment_assignments";
            conversion_touch_attribution: "conversion_touch_attribution";
            aggregates_daily_revenue: "aggregates_daily_revenue";
            subscription_stock_weekly: "subscription_stock_weekly";
            gate_event_fields: "gate_event_fields";
            user_account_map: "user_account_map";
        }>;
        disposition: z.ZodEnum<{
            active: "active";
            deprecated_footprint_only: "deprecated_footprint_only";
        }>;
        deprecation_authority: z.ZodNullable<z.ZodString>;
        count_basis: z.ZodEnum<{
            logical_replacing: "logical_replacing";
            physical_append: "physical_append";
            logical_grouped: "logical_grouped";
        }>;
        physical_count: z.ZodNumber;
        observed: z.ZodObject<{
            count: z.ZodNumber;
            digest: z.ZodString;
            examples: z.ZodArray<z.ZodString>;
        }, z.core.$strict>;
        expected: z.ZodNullable<z.ZodObject<{
            count: z.ZodNumber;
            digest: z.ZodString;
            examples: z.ZodArray<z.ZodString>;
        }, z.core.$strict>>;
        status: z.ZodEnum<{
            unresolved: "unresolved";
            matched: "matched";
            footprint_recorded: "footprint_recorded";
        }>;
    }, z.core.$strict>>;
    replay: z.ZodNullable<z.ZodObject<{
        event_id: z.ZodString;
        run_id: z.ZodString;
        status: z.ZodEnum<{
            unknown: "unknown";
            complete: "complete";
            failed: "failed";
            unchanged: "unchanged";
            running: "running";
        }>;
        generation_id: z.ZodNullable<z.ZodString>;
        policy: z.ZodLiteral<"mrr-v1-subscription-state">;
        source_interval: z.ZodObject<{
            start: z.ZodISODateTime;
            end: z.ZodISODateTime;
        }, z.core.$strict>;
        source_inventory_digest: z.ZodString;
        output_count: z.ZodNullable<z.ZodNumber>;
        output_digest: z.ZodNullable<z.ZodString>;
        manifest_last_verified: z.ZodBoolean;
        oracle_matched: z.ZodBoolean;
        served_matched: z.ZodBoolean;
        provider_diagnostic: z.ZodEnum<{
            error: "error";
            matched: "matched";
            skipped_not_connected: "skipped_not_connected";
        }>;
    }, z.core.$strict>>;
    errors: z.ZodArray<z.ZodObject<{
        code: z.ZodEnum<{
            canceled: "canceled";
            unauthorized: "unauthorized";
            identity_mismatch: "identity_mismatch";
            unsupported_lane: "unsupported_lane";
            busy: "busy";
            unknown_lane: "unknown_lane";
            budget_exceeded: "budget_exceeded";
            measurement_missing: "measurement_missing";
            reset_unverified: "reset_unverified";
            footprint_mismatch: "footprint_mismatch";
            source_drift: "source_drift";
            partial_acknowledgment: "partial_acknowledgment";
            child_missing: "child_missing";
            history_expired: "history_expired";
            provider_unavailable: "provider_unavailable";
            timeout: "timeout";
            unsafe_retry: "unsafe_retry";
            reconciliation_failed: "reconciliation_failed";
            replay_unverified: "replay_unverified";
            conflict: "conflict";
        }>;
        message: z.ZodString;
    }, z.core.$strict>>;
}, z.core.$strict>;
/** Resolve summary references against retained child results, never caller assertions. No I/O. */
declare function simulationRunChildrenMatch(runInput: unknown, childInputs: readonly unknown[]): boolean;

// AUTO-GENERATED by scripts/generate-zod-outputs.ts - do not edit.



type AccountPrimaryContactBinding = z.infer<typeof AccountPrimaryContactBindingSchema>;
type AccountPrimaryContactHistory = z.infer<typeof AccountPrimaryContactHistorySchema>;
type ActivityLevel = z.infer<typeof ActivityLevelSchema>;
type AddOn = z.infer<typeof AddOnSchema>;
type AddOnVariation = z.infer<typeof AddOnVariationSchema>;
type Alert = z.infer<typeof AlertSchema>;
type AnalysisProvenance = z.infer<typeof AnalysisProvenanceSchema>;
type AnalyticsAgentCatalogEntryKind = z.infer<typeof AnalyticsAgentCatalogEntryKindSchema>;
type AnalyticsAgentCatalogEntry = z.infer<typeof AnalyticsAgentCatalogEntrySchema>;
type AnalyticsAnalyticalUnit = z.infer<typeof AnalyticsAnalyticalUnitSchema>;
type AnalyticsAnnotationChange = z.infer<typeof AnalyticsAnnotationChangeSchema>;
type AnalyticsAnnotationGeneration = z.infer<typeof AnalyticsAnnotationGenerationSchema>;
type AnalyticsAnnotationKind = z.infer<typeof AnalyticsAnnotationKindSchema>;
type AnalyticsAnnotationMarker = z.infer<typeof AnalyticsAnnotationMarkerSchema>;
type AnalyticsAnnotationRequest = z.infer<typeof AnalyticsAnnotationRequestSchema>;
type AnalyticsAnnotationResponse = z.infer<typeof AnalyticsAnnotationResponseSchema>;
type AnalyticsAnnotation = z.infer<typeof AnalyticsAnnotationSchema>;
type AnalyticsAnnotationSeries = z.infer<typeof AnalyticsAnnotationSeriesSchema>;
type AnalyticsAnnotationSource = z.infer<typeof AnalyticsAnnotationSourceSchema>;
type AnalyticsBlockError = z.infer<typeof AnalyticsBlockErrorSchema>;
type AnalyticsBlockResult = z.infer<typeof AnalyticsBlockResultSchema>;
type AnalyticsCardinalityClass = z.infer<typeof AnalyticsCardinalityClassSchema>;
type AnalyticsCatalogAnnotationKind = z.infer<typeof AnalyticsCatalogAnnotationKindSchema>;
type AnalyticsCatalogConcept = z.infer<typeof AnalyticsCatalogConceptSchema>;
type AnalyticsCatalogDeprecation = z.infer<typeof AnalyticsCatalogDeprecationSchema>;
type AnalyticsCatalogDimension = z.infer<typeof AnalyticsCatalogDimensionSchema>;
type AnalyticsCatalogMetric = z.infer<typeof AnalyticsCatalogMetricSchema>;
type AnalyticsCatalogMetricValidated = z.infer<typeof AnalyticsCatalogMetricValidatedSchema>;
type AnalyticsCatalogProvenanceKind = z.infer<typeof AnalyticsCatalogProvenanceKindSchema>;
type AnalyticsCatalogProvenance = z.infer<typeof AnalyticsCatalogProvenanceSchema>;
type AnalyticsCatalog = z.infer<typeof AnalyticsCatalogSchema>;
type AnalyticsCatalogSearchResult = z.infer<typeof AnalyticsCatalogSearchResultSchema>;
type AnalyticsCatalogSource = z.infer<typeof AnalyticsCatalogSourceSchema>;
type AnalyticsClassification = z.infer<typeof AnalyticsClassificationSchema>;
type AnalyticsCompareDelta = z.infer<typeof AnalyticsCompareDeltaSchema>;
type AnalyticsCompareExperiment = z.infer<typeof AnalyticsCompareExperimentSchema>;
type AnalyticsCompareMode = z.infer<typeof AnalyticsCompareModeSchema>;
type AnalyticsCompareSegment = z.infer<typeof AnalyticsCompareSegmentSchema>;
type AnalyticsCompileResolution = z.infer<typeof AnalyticsCompileResolutionSchema>;
type AnalyticsCoverage = z.infer<typeof AnalyticsCoverageSchema>;
type AnalyticsCustomizationCapability = z.infer<typeof AnalyticsCustomizationCapabilitySchema>;
type AnalyticsCustomizationPolicy = z.infer<typeof AnalyticsCustomizationPolicySchema>;
type AnalyticsDimensionCapability = z.infer<typeof AnalyticsDimensionCapabilitySchema>;
type AnalyticsDimensionType = z.infer<typeof AnalyticsDimensionTypeSchema>;
type AnalyticsFieldType = z.infer<typeof AnalyticsFieldTypeSchema>;
type AnalyticsFilterControl = z.infer<typeof AnalyticsFilterControlSchema>;
type AnalyticsFilterOperator = z.infer<typeof AnalyticsFilterOperatorSchema>;
type AnalyticsFilterState = z.infer<typeof AnalyticsFilterStateSchema>;
type AnalyticsFilterValue = z.infer<typeof AnalyticsFilterValueSchema>;
type AnalyticsFormatSpec = z.infer<typeof AnalyticsFormatSpecSchema>;
type AnalyticsFxRateEvidence = z.infer<typeof AnalyticsFxRateEvidenceSchema>;
type AnalyticsFxRateEvidenceSet = z.infer<typeof AnalyticsFxRateEvidenceSetSchema>;
type AnalyticsGateSettingsApplied = z.infer<typeof AnalyticsGateSettingsAppliedSchema>;
type AnalyticsGateSettingsConfigured = z.infer<typeof AnalyticsGateSettingsConfiguredSchema>;
type AnalyticsGateSettingsMeta = z.infer<typeof AnalyticsGateSettingsMetaSchema>;
type AnalyticsGateSettingsProvenance = z.infer<typeof AnalyticsGateSettingsProvenanceSchema>;
type AnalyticsGateSettingsTarget = z.infer<typeof AnalyticsGateSettingsTargetSchema>;
type AnalyticsGateSettingsValues = z.infer<typeof AnalyticsGateSettingsValuesSchema>;
type AnalyticsHistoricalMode = z.infer<typeof AnalyticsHistoricalModeSchema>;
type AnalyticsMetricAccounting = z.infer<typeof AnalyticsMetricAccountingSchema>;
type AnalyticsMetricAggregationSemantics = z.infer<typeof AnalyticsMetricAggregationSemanticsSchema>;
type AnalyticsMetricCurrencyPolicy = z.infer<typeof AnalyticsMetricCurrencyPolicySchema>;
type AnalyticsMetricDirection = z.infer<typeof AnalyticsMetricDirectionSchema>;
type AnalyticsMetricSemantics = z.infer<typeof AnalyticsMetricSemanticsSchema>;
type AnalyticsMetricStatisticalType = z.infer<typeof AnalyticsMetricStatisticalTypeSchema>;
type AnalyticsMetricWindowAlignment = z.infer<typeof AnalyticsMetricWindowAlignmentSchema>;
type AnalyticsMetricWindowPeriod = z.infer<typeof AnalyticsMetricWindowPeriodSchema>;
type AnalyticsMetricWindow = z.infer<typeof AnalyticsMetricWindowSchema>;
type AnalyticsPeriodCompareMode = z.infer<typeof AnalyticsPeriodCompareModeSchema>;
type AnalyticsQueryFamily = z.infer<typeof AnalyticsQueryFamilySchema>;
type AnalyticsQueryOverrides = z.infer<typeof AnalyticsQueryOverridesSchema>;
type AnalyticsQueryRequest = z.infer<typeof AnalyticsQueryRequestSchema>;
type AnalyticsQueryResponse = z.infer<typeof AnalyticsQueryResponseSchema>;
type AnalyticsRecurringMovementBasis = z.infer<typeof AnalyticsRecurringMovementBasisSchema>;
type AnalyticsRenderCartesian = z.infer<typeof AnalyticsRenderCartesianSchema>;
type AnalyticsRenderFunnel = z.infer<typeof AnalyticsRenderFunnelSchema>;
type AnalyticsRenderMetric = z.infer<typeof AnalyticsRenderMetricSchema>;
type AnalyticsRenderRecommendations = z.infer<typeof AnalyticsRenderRecommendationsSchema>;
type AnalyticsRenderSpec = z.infer<typeof AnalyticsRenderSpecSchema>;
type AnalyticsRenderTable = z.infer<typeof AnalyticsRenderTableSchema>;
type AnalyticsRenderTimeline = z.infer<typeof AnalyticsRenderTimelineSchema>;
type AnalyticsReportingCurrencyMeta = z.infer<typeof AnalyticsReportingCurrencyMetaSchema>;
type AnalyticsResultAccounting = z.infer<typeof AnalyticsResultAccountingSchema>;
type AnalyticsResultField = z.infer<typeof AnalyticsResultFieldSchema>;
type AnalyticsResultMeta = z.infer<typeof AnalyticsResultMetaSchema>;
type AnalyticsResult = z.infer<typeof AnalyticsResultSchema>;
type AnalyticsSafeChartOptions = z.infer<typeof AnalyticsSafeChartOptionsSchema>;
type AnalyticsSavedView = z.infer<typeof AnalyticsSavedViewSchema>;
type AnalyticsSemanticFilter = z.infer<typeof AnalyticsSemanticFilterSchema>;
type AnalyticsSemanticId = z.infer<typeof AnalyticsSemanticIdSchema>;
type AnalyticsSourceScope = z.infer<typeof AnalyticsSourceScopeSchema>;
type AnalyticsSuggestedPatchOp = z.infer<typeof AnalyticsSuggestedPatchOpSchema>;
type AnalyticsTemplateSummary = z.infer<typeof AnalyticsTemplateSummarySchema>;
type AnalyticsTimeGrain = z.infer<typeof AnalyticsTimeGrainSchema>;
type AnalyticsValidationIssue = z.infer<typeof AnalyticsValidationIssueSchema>;
type AnalyticsValidationResult = z.infer<typeof AnalyticsValidationResultSchema>;
type AnalyticsViewAccessRole = z.infer<typeof AnalyticsViewAccessRoleSchema>;
type AnalyticsViewAccess = z.infer<typeof AnalyticsViewAccessSchema>;
type AnalyticsViewBlockDraft = z.infer<typeof AnalyticsViewBlockDraftSchema>;
type AnalyticsViewBlock = z.infer<typeof AnalyticsViewBlockSchema>;
type AnalyticsViewDraft = z.infer<typeof AnalyticsViewDraftSchema>;
type AnalyticsViewFilterDraft = z.infer<typeof AnalyticsViewFilterDraftSchema>;
type AnalyticsViewFilter = z.infer<typeof AnalyticsViewFilterSchema>;
type AnalyticsViewHandoffDraft = z.infer<typeof AnalyticsViewHandoffDraftSchema>;
type AnalyticsViewHandoff = z.infer<typeof AnalyticsViewHandoffSchema>;
type AnalyticsViewLayout = z.infer<typeof AnalyticsViewLayoutSchema>;
type AnalyticsViewQuery = z.infer<typeof AnalyticsViewQuerySchema>;
type AnalyticsViewRevision = z.infer<typeof AnalyticsViewRevisionSchema>;
type AnalyticsView = z.infer<typeof AnalyticsViewSchema>;
type AnalyticsViewVisibility = z.infer<typeof AnalyticsViewVisibilitySchema>;
type AnalyticsWarning = z.infer<typeof AnalyticsWarningSchema>;
type AuditActorType = z.infer<typeof AuditActorTypeSchema>;
type AuditEvent = z.infer<typeof AuditEventSchema>;
type AuthAccount = z.infer<typeof AuthAccountSchema>;
type AuthApiKey = z.infer<typeof AuthApiKeySchema>;
type AuthInvitation = z.infer<typeof AuthInvitationSchema>;
type AuthMember = z.infer<typeof AuthMemberSchema>;
type AuthOrganization = z.infer<typeof AuthOrganizationSchema>;
type AuthPasskey = z.infer<typeof AuthPasskeySchema>;
type AuthSession = z.infer<typeof AuthSessionSchema>;
type AuthSsoProvider = z.infer<typeof AuthSsoProviderSchema>;
type AuthTwoFactor = z.infer<typeof AuthTwoFactorSchema>;
type AuthUser = z.infer<typeof AuthUserSchema>;
type AuthVerification = z.infer<typeof AuthVerificationSchema>;
type B2BSegmentEventName = z.infer<typeof B2BSegmentEventNameSchema>;
type BillingAccountBindingActor = z.infer<typeof BillingAccountBindingActorSchema>;
type BillingAccountBindingEvidence = z.infer<typeof BillingAccountBindingEvidenceSchema>;
type BillingAccountingRevision = z.infer<typeof BillingAccountingRevisionSchema>;
type BillingAccountMappingRevision = z.infer<typeof BillingAccountMappingRevisionSchema>;
type BillingAllocation = z.infer<typeof BillingAllocationSchema>;
type BillingBalanceProfile = z.infer<typeof BillingBalanceProfileSchema>;
type BillingCadence = z.infer<typeof BillingCadenceSchema>;
type BillingChargeObservation = z.infer<typeof BillingChargeObservationSchema>;
type BillingCommittedInput = z.infer<typeof BillingCommittedInputSchema>;
type BillingCommittedResult = z.infer<typeof BillingCommittedResultSchema>;
type BillingCompletedGenerationCheckpoint = z.infer<typeof BillingCompletedGenerationCheckpointSchema>;
type BillingComponentEvidence = z.infer<typeof BillingComponentEvidenceSchema>;
type BillingCoverageCheckpoint = z.infer<typeof BillingCoverageCheckpointSchema>;
type BillingCoverageGapRange = z.infer<typeof BillingCoverageGapRangeSchema>;
type BillingCoverageGapReason = z.infer<typeof BillingCoverageGapReasonSchema>;
type BillingCoverageRecord = z.infer<typeof BillingCoverageRecordSchema>;
type BillingCoverageUnavailableReason = z.infer<typeof BillingCoverageUnavailableReasonSchema>;
type BillingCreditNoteLine = z.infer<typeof BillingCreditNoteLineSchema>;
type BillingCreditProfile = z.infer<typeof BillingCreditProfileSchema>;
type BillingCreditSettlement = z.infer<typeof BillingCreditSettlementSchema>;
type BillingDiscountEvidence = z.infer<typeof BillingDiscountEvidenceSchema>;
type BillingEconomicOwner = z.infer<typeof BillingEconomicOwnerSchema>;
type BillingEvidenceProvenance = z.infer<typeof BillingEvidenceProvenanceSchema>;
type BillingFactHistory = z.infer<typeof BillingFactHistorySchema>;
type BillingFactReference = z.infer<typeof BillingFactReferenceSchema>;
type BillingGenerationCheckpoint = z.infer<typeof BillingGenerationCheckpointSchema>;
type BillingGenerationRecord = z.infer<typeof BillingGenerationRecordSchema>;
type BillingGeneration = z.infer<typeof BillingGenerationSchema>;
type BillingHealthStatus = z.infer<typeof BillingHealthStatusSchema>;
type BillingInvoiceHeaderObservation = z.infer<typeof BillingInvoiceHeaderObservationSchema>;
type BillingInvoiceLineObservation = z.infer<typeof BillingInvoiceLineObservationSchema>;
type BillingInvoicePaymentObservation = z.infer<typeof BillingInvoicePaymentObservationSchema>;
type BillingInvoicePaymentSource = z.infer<typeof BillingInvoicePaymentSourceSchema>;
type BillingInvoiceProfile = z.infer<typeof BillingInvoiceProfileSchema>;
type BillingInvoiceSourceEvidence = z.infer<typeof BillingInvoiceSourceEvidenceSchema>;
type BillingItemStateDerivation = z.infer<typeof BillingItemStateDerivationSchema>;
type BillingItemStateObservation = z.infer<typeof BillingItemStateObservationSchema>;
type BillingLifecycleEvidence = z.infer<typeof BillingLifecycleEvidenceSchema>;
type BillingLifecycleInput = z.infer<typeof BillingLifecycleInputSchema>;
type BillingLifecycleManifest = z.infer<typeof BillingLifecycleManifestSchema>;
type BillingLifecycleMappingReference = z.infer<typeof BillingLifecycleMappingReferenceSchema>;
type BillingLifecyclePartition = z.infer<typeof BillingLifecyclePartitionSchema>;
type BillingLifecyclePartitionSelection = z.infer<typeof BillingLifecyclePartitionSelectionSchema>;
type BillingLifecyclePayload = z.infer<typeof BillingLifecyclePayloadSchema>;
type BillingLifecycleResult = z.infer<typeof BillingLifecycleResultSchema>;
type BillingLifecycleSourceRevision = z.infer<typeof BillingLifecycleSourceRevisionSchema>;
type BillingLifecycleTransitionLink = z.infer<typeof BillingLifecycleTransitionLinkSchema>;
type BillingLifecycleTransition = z.infer<typeof BillingLifecycleTransitionSchema>;
type BillingLossProfile = z.infer<typeof BillingLossProfileSchema>;
type BillingMappingHistory = z.infer<typeof BillingMappingHistorySchema>;
type BillingMirrorInvoiceLine = z.infer<typeof BillingMirrorInvoiceLineSchema>;
type BillingMirrorInvoice = z.infer<typeof BillingMirrorInvoiceSchema>;
type BillingMirrorOffering = z.infer<typeof BillingMirrorOfferingSchema>;
type BillingMirrorPayer = z.infer<typeof BillingMirrorPayerSchema>;
type BillingMirrorPayment = z.infer<typeof BillingMirrorPaymentSchema>;
type BillingMirrorPaymentStatus = z.infer<typeof BillingMirrorPaymentStatusSchema>;
type BillingMirrorPrice = z.infer<typeof BillingMirrorPriceSchema>;
type BillingMirrorPriceTerm = z.infer<typeof BillingMirrorPriceTermSchema>;
type BillingMirrorSubscriptionItem = z.infer<typeof BillingMirrorSubscriptionItemSchema>;
type BillingMirrorSubscription = z.infer<typeof BillingMirrorSubscriptionSchema>;
type BillingObservation = z.infer<typeof BillingObservationSchema>;
type BillingOccurrence = z.infer<typeof BillingOccurrenceSchema>;
type BillingOpeningSeed = z.infer<typeof BillingOpeningSeedSchema>;
type BillingOutputRowKey = z.infer<typeof BillingOutputRowKeySchema>;
type BillingPaymentIntentObservation = z.infer<typeof BillingPaymentIntentObservationSchema>;
type BillingPaymentRecordObservation = z.infer<typeof BillingPaymentRecordObservationSchema>;
type BillingPaymentSourceEvidence = z.infer<typeof BillingPaymentSourceEvidenceSchema>;
type BillingPriceTerms = z.infer<typeof BillingPriceTermsSchema>;
type BillingPriceTier = z.infer<typeof BillingPriceTierSchema>;
type BillingProfile = z.infer<typeof BillingProfileSchema>;
type BillingReconciliation = z.infer<typeof BillingReconciliationSchema>;
type BillingRecurrence = z.infer<typeof BillingRecurrenceSchema>;
type BillingRecurringDiscount = z.infer<typeof BillingRecurringDiscountSchema>;
type BillingRecurringDiscountTerms = z.infer<typeof BillingRecurringDiscountTermsSchema>;
type BillingRecurringMovementContract = z.infer<typeof BillingRecurringMovementContractSchema>;
type BillingRecurringMovementInput = z.infer<typeof BillingRecurringMovementInputSchema>;
type BillingRecurringMovementOccurrence = z.infer<typeof BillingRecurringMovementOccurrenceSchema>;
type BillingRecurringNormalizationInput = z.infer<typeof BillingRecurringNormalizationInputSchema>;
type BillingRecurringNormalizationItem = z.infer<typeof BillingRecurringNormalizationItemSchema>;
type BillingRecurringOpeningItem = z.infer<typeof BillingRecurringOpeningItemSchema>;
type BillingRecurringPrice = z.infer<typeof BillingRecurringPriceSchema>;
type BillingRefundProfile = z.infer<typeof BillingRefundProfileSchema>;
type BillingRepeatableOccurrence = z.infer<typeof BillingRepeatableOccurrenceSchema>;
type BillingScheduleProfile = z.infer<typeof BillingScheduleProfileSchema>;
type BillingSettlementAmount = z.infer<typeof BillingSettlementAmountSchema>;
type BillingSourceComponentIdentity = z.infer<typeof BillingSourceComponentIdentitySchema>;
type BillingSourceComponentObservation = z.infer<typeof BillingSourceComponentObservationSchema>;
type BillingSourceEvidence = z.infer<typeof BillingSourceEvidenceSchema>;
type BillingSourceObservationEvidence = z.infer<typeof BillingSourceObservationEvidenceSchema>;
type BillingSourceScope = z.infer<typeof BillingSourceScopeSchema>;
type BillingSubscriptionItemSnapshot = z.infer<typeof BillingSubscriptionItemSnapshotSchema>;
type BillingSubscriptionProfile = z.infer<typeof BillingSubscriptionProfileSchema>;
type BillingTransactionProfile = z.infer<typeof BillingTransactionProfileSchema>;
type BrandingConfig = z.infer<typeof BrandingConfigSchema>;
type CanonicalAliasEvent = z.infer<typeof CanonicalAliasEventSchema>;
type CanonicalAnalyticsEvent = z.infer<typeof CanonicalAnalyticsEventSchema>;
type CanonicalGroupEvent = z.infer<typeof CanonicalGroupEventSchema>;
type CanonicalIdentifyEvent = z.infer<typeof CanonicalIdentifyEventSchema>;
type CanonicalPageEvent = z.infer<typeof CanonicalPageEventSchema>;
type CanonicalScreenEvent = z.infer<typeof CanonicalScreenEventSchema>;
type CanonicalSegmentContext = z.infer<typeof CanonicalSegmentContextSchema>;
type CanonicalTrackEvent = z.infer<typeof CanonicalTrackEventSchema>;
type ChangeLogAction = z.infer<typeof ChangeLogActionSchema>;
type ChangeLogEntry = z.infer<typeof ChangeLogEntrySchema>;
type ClientContext = z.infer<typeof ClientContextSchema>;
type CohortMonth = z.infer<typeof CohortMonthSchema>;
type ComponentType = z.infer<typeof ComponentTypeSchema>;
type ContentPayloadSegmentEntry = z.infer<typeof ContentPayloadSegmentEntrySchema>;
type ContentPlacementPayload = z.infer<typeof ContentPlacementPayloadSchema>;
type ContentPromotion = z.infer<typeof ContentPromotionSchema>;
type ContentUiPath = z.infer<typeof ContentUiPathSchema>;
type ControlPlaneEventSource = z.infer<typeof ControlPlaneEventSourceSchema>;
type ControlPlaneEventType = z.infer<typeof ControlPlaneEventTypeSchema>;
type ControlPlaneSemanticEvent = z.infer<typeof ControlPlaneSemanticEventSchema>;
type CtaActionType = z.infer<typeof CtaActionTypeSchema>;
type CtaObject = z.infer<typeof CtaObjectSchema>;
type CtaPath = z.infer<typeof CtaPathSchema>;
type CtaPathType = z.infer<typeof CtaPathTypeSchema>;
type Currency = z.infer<typeof CurrencySchema>;
type CustomerAccountCreate = z.infer<typeof CustomerAccountCreateSchema>;
type CustomerAccountListQuery = z.infer<typeof CustomerAccountListQuerySchema>;
type CustomerAccount = z.infer<typeof CustomerAccountSchema>;
type CustomerBuiltinDimensions = z.infer<typeof CustomerBuiltinDimensionsSchema>;
type CustomerCatalogQuery = z.infer<typeof CustomerCatalogQuerySchema>;
type CustomerEntityLinkCreate = z.infer<typeof CustomerEntityLinkCreateSchema>;
type CustomerEntityLinkListQuery = z.infer<typeof CustomerEntityLinkListQuerySchema>;
type CustomerEntityLink = z.infer<typeof CustomerEntityLinkSchema>;
type CustomerOverrideDuration = z.infer<typeof CustomerOverrideDurationSchema>;
type CustomerOverride = z.infer<typeof CustomerOverrideSchema>;
type CustomerOverrideStatus = z.infer<typeof CustomerOverrideStatusSchema>;
type CustomerOverrideType = z.infer<typeof CustomerOverrideTypeSchema>;
type Customer = z.infer<typeof CustomerSchema>;
type CustomerSummary = z.infer<typeof CustomerSummarySchema>;
type CustomerUserCreate = z.infer<typeof CustomerUserCreateSchema>;
type CustomerUserListQuery = z.infer<typeof CustomerUserListQuerySchema>;
type CustomerUser = z.infer<typeof CustomerUserSchema>;
type DefaultTemplateIds = z.infer<typeof DefaultTemplateIdsSchema>;
type DeleteProtectionDecision = z.infer<typeof DeleteProtectionDecisionSchema>;
type DetectorRequirements = z.infer<typeof DetectorRequirementsSchema>;
type DimensionCategory = z.infer<typeof DimensionCategorySchema>;
type DimensionSourceType = z.infer<typeof DimensionSourceTypeSchema>;
type DiscountType = z.infer<typeof DiscountTypeSchema>;
type DriftReport = z.infer<typeof DriftReportSchema>;
type EnforcementAction = z.infer<typeof EnforcementActionSchema>;
type EnforcementMode = z.infer<typeof EnforcementModeSchema>;
type EntitlementCheckResult$1 = z.infer<typeof EntitlementCheckResultSchema>;
type EntitlementGrant$1 = z.infer<typeof EntitlementGrantSchema>;
type EntitlementGrantSet$1 = z.infer<typeof EntitlementGrantSetSchema>;
type EntitlementGrantSource = z.infer<typeof EntitlementGrantSourceSchema>;
type EntitlementGrantStatus = z.infer<typeof EntitlementGrantStatusSchema>;
type EntitlementRulePeriodUnit = z.infer<typeof EntitlementRulePeriodUnitSchema>;
type EntitlementRule = z.infer<typeof EntitlementRuleSchema>;
type EntitlementRuleTargetKind$1 = z.infer<typeof EntitlementRuleTargetKindSchema>;
type EntitlementRuleTarget = z.infer<typeof EntitlementRuleTargetSchema>;
type EntitlementRuleValidated = z.infer<typeof EntitlementRuleValidatedSchema>;
type EntitlementRuleVariant = z.infer<typeof EntitlementRuleVariantSchema>;
type Entitlement = z.infer<typeof EntitlementSchema>;
type EntitlementStatus$1 = z.infer<typeof EntitlementStatusSchema>;
type EntitlementType = z.infer<typeof EntitlementTypeSchema>;
type EnvironmentPromotionRequest = z.infer<typeof EnvironmentPromotionRequestSchema>;
type Environment = z.infer<typeof EnvironmentSchema>;
type EnvironmentStatus = z.infer<typeof EnvironmentStatusSchema>;
type EventEnvelope = z.infer<typeof EventEnvelopeSchema>;
type EventIngestBatch = z.infer<typeof EventIngestBatchSchema>;
type EventPrefixFamily = z.infer<typeof EventPrefixFamilySchema>;
type EventSearchParams = z.infer<typeof EventSearchParamsSchema>;
type EventSource = z.infer<typeof EventSourceSchema>;
type EventStability = z.infer<typeof EventStabilitySchema>;
type EventSurface = z.infer<typeof EventSurfaceSchema>;
type EventTaxonomyEntry = z.infer<typeof EventTaxonomyEntrySchema>;
type EventTaxonomy = z.infer<typeof EventTaxonomySchema>;
type EvidenceCoverageState = z.infer<typeof EvidenceCoverageStateSchema>;
type EvidenceReasonColumn = z.infer<typeof EvidenceReasonColumnSchema>;
type EvidenceRequirement = z.infer<typeof EvidenceRequirementSchema>;
type ExperimentAnalysisConfig = z.infer<typeof ExperimentAnalysisConfigSchema>;
type ExperimentAnalysisDefinition = z.infer<typeof ExperimentAnalysisDefinitionSchema>;
type ExperimentAnalysisResultRecord = z.infer<typeof ExperimentAnalysisResultRecordSchema>;
type ExperimentAnalysisResult = z.infer<typeof ExperimentAnalysisResultSchema>;
type ExperimentAssignmentFact = z.infer<typeof ExperimentAssignmentFactSchema>;
type ExperimentAssignmentSource = z.infer<typeof ExperimentAssignmentSourceSchema>;
type ExperimentDecisionFindingCode = z.infer<typeof ExperimentDecisionFindingCodeSchema>;
type ExperimentDecisionPolicy = z.infer<typeof ExperimentDecisionPolicySchema>;
type ExperimentDecisionRecord = z.infer<typeof ExperimentDecisionRecordSchema>;
type ExperimentDecisionType = z.infer<typeof ExperimentDecisionTypeSchema>;
type ExperimentEvidence = z.infer<typeof ExperimentEvidenceSchema>;
type ExperimentEvidenceSnapshot = z.infer<typeof ExperimentEvidenceSnapshotSchema>;
type ExperimentHealth = z.infer<typeof ExperimentHealthSchema>;
type ExperimentMetricEvidencePlan = z.infer<typeof ExperimentMetricEvidencePlanSchema>;
type ExperimentMetricResult = z.infer<typeof ExperimentMetricResultSchema>;
type Experiment = z.infer<typeof ExperimentSchema>;
type ExperimentStatus = z.infer<typeof ExperimentStatusSchema>;
type ExperimentType = z.infer<typeof ExperimentTypeSchema>;
type ExperimentVariant = z.infer<typeof ExperimentVariantSchema>;
type ExperimentVariantTarget = z.infer<typeof ExperimentVariantTargetSchema>;
type ExportedConfigPlacementItem = z.infer<typeof RevTurbineConfigPlacementItemSchema>;
type ExportedConfig = z.infer<typeof RevTurbineConfigSchema>;
type ExportedConfigSegmentsItemPredicatesItem = z.infer<typeof RevTurbineConfigSegmentsItemPredicatesItemSchema>;
type ExportedConfigSegmentsItem = z.infer<typeof RevTurbineConfigSegmentsItemSchema>;
type ExportedConfigUiPathActionType = z.infer<typeof RevTurbineConfigUiPathActionTypeSchema>;
type FeatureFlag = z.infer<typeof FeatureFlagSchema>;
type FeatureFlagValue = z.infer<typeof FeatureFlagValueSchema>;
type FieldDefinition = z.infer<typeof FieldDefinitionSchema>;
type FlagValueType = z.infer<typeof FlagValueTypeSchema>;
type FreeTrialRule = z.infer<typeof FreeTrialRuleSchema>;
type FreeTrialSettings = z.infer<typeof FreeTrialSettingsSchema>;
type FunnelStep = z.infer<typeof FunnelStepSchema>;
type FxDailyRateRow = z.infer<typeof FxDailyRateRowSchema>;
type FxProvider = z.infer<typeof FxProviderSchema>;
type FxRateDecimal = z.infer<typeof FxRateDecimalSchema>;
type GateWindowDays = z.infer<typeof GateWindowDaysSchema>;
type GrowthSignalBundle = z.infer<typeof GrowthSignalBundleSchema>;
type GrowthSignalPoint = z.infer<typeof GrowthSignalPointSchema>;
type GrowthSignalSeries = z.infer<typeof GrowthSignalSeriesSchema>;
type Identity = z.infer<typeof IdentitySchema>;
type IngestedEvent = z.infer<typeof IngestedEventSchema>;
type InvitationStatus = z.infer<typeof InvitationStatusSchema>;
type InvoicePaymentStatus = z.infer<typeof InvoicePaymentStatusSchema>;
type InvoiceSettlementBasis = z.infer<typeof InvoiceSettlementBasisSchema>;
type InvoiceStatus = z.infer<typeof InvoiceStatusSchema>;
type KpiAggregate = z.infer<typeof KpiAggregateSchema>;
type LocalizedText = z.infer<typeof LocalizedTextSchema>;
type ManagedActivation = z.infer<typeof ManagedActivationSchema>;
type ManagedBaselineInput = z.infer<typeof ManagedBaselineInputSchema>;
type ManagedBaselineResult = z.infer<typeof ManagedBaselineResultSchema>;
type ManagedEvidence = z.infer<typeof ManagedEvidenceSchema>;
type ManagedItemBaseline = z.infer<typeof ManagedItemBaselineSchema>;
type ManagedItemHistory = z.infer<typeof ManagedItemHistorySchema>;
type ManagedItemSubject = z.infer<typeof ManagedItemSubjectSchema>;
type McpConfig = z.infer<typeof McpConfigSchema>;
type McpTokenScope = z.infer<typeof McpTokenScopeSchema>;
type MessageBlockContent = z.infer<typeof MessageBlockContentSchema>;
type MessageBlockRecord = z.infer<typeof MessageBlockRecordSchema>;
type MessageBlock = z.infer<typeof MessageBlockSchema>;
type Message = z.infer<typeof MessageSchema>;
type MeteringConfig = z.infer<typeof MeteringConfigSchema>;
type MrrAccountFactsRow = z.infer<typeof MrrAccountFactsRowSchema>;
type MrrCalendarVersion = z.infer<typeof MrrCalendarVersionSchema>;
type MrrDailyRow = z.infer<typeof MrrDailyRowSchema>;
type MrrLocalDate = z.infer<typeof MrrLocalDateSchema>;
type MrrMovementComponent = z.infer<typeof MrrMovementComponentSchema>;
type MrrMovementDailyRow = z.infer<typeof MrrMovementDailyRowSchema>;
type MrrMovementReason = z.infer<typeof MrrMovementReasonSchema>;
type MrrPolicySwitchRow = z.infer<typeof MrrPolicySwitchRowSchema>;
type MrrPolicyVersion = z.infer<typeof MrrPolicyVersionSchema>;
type MrrTenantStateRow = z.infer<typeof MrrTenantStateRowSchema>;
type Objective = z.infer<typeof ObjectiveSchema>;
type ObservationMaturity = z.infer<typeof ObservationMaturitySchema>;
type OnboardingChecklist = z.infer<typeof OnboardingChecklistSchema>;
type OnboardingState = z.infer<typeof OnboardingStateSchema>;
type OperatorEventRequestRow = z.infer<typeof OperatorEventRequestRowSchema>;
type OpportunityCandidate = z.infer<typeof OpportunityCandidateSchema>;
type OpportunityEvidence = z.infer<typeof OpportunityEvidenceSchema>;
type OpportunityInterpretation = z.infer<typeof OpportunityInterpretationSchema>;
type OptimizationSuggestion = z.infer<typeof OptimizationSuggestionSchema>;
type OrgMemberRole = z.infer<typeof OrgMemberRoleSchema>;
type PaginationParams = z.infer<typeof PaginationParamsSchema>;
type PayerAccountLinkHistoryEntry = z.infer<typeof PayerAccountLinkHistoryEntrySchema>;
type PayerAccountLinkHistory = z.infer<typeof PayerAccountLinkHistorySchema>;
type PayerAccountLinkItem = z.infer<typeof PayerAccountLinkItemSchema>;
type PayerAccountLinkListQuery = z.infer<typeof PayerAccountLinkListQuerySchema>;
type PayerAccountLinkList = z.infer<typeof PayerAccountLinkListSchema>;
type PayerAccountLinkRequest = z.infer<typeof PayerAccountLinkRequestSchema>;
type PayerAccountLinkResult = z.infer<typeof PayerAccountLinkResultSchema>;
type PayerAccountLinkState = z.infer<typeof PayerAccountLinkStateSchema>;
type PayerAccountLinkSummary = z.infer<typeof PayerAccountLinkSummarySchema>;
type PayerAccountMatchResult = z.infer<typeof PayerAccountMatchResultSchema>;
type PayerAccountMoney = z.infer<typeof PayerAccountMoneySchema>;
type PayerKey = z.infer<typeof PayerKeySchema>;
type PaymentEvidenceCadenceToken = z.infer<typeof PaymentEvidenceCadenceTokenSchema>;
type PaymentEvidenceConfig = z.infer<typeof PaymentEvidenceConfigSchema>;
type PaymentEvidencePlanMapping = z.infer<typeof PaymentEvidencePlanMappingSchema>;
type PermissionAction = z.infer<typeof PermissionActionSchema>;
type PermissionResource = z.infer<typeof PermissionResourceSchema>;
type Permission = z.infer<typeof PermissionSchema>;
type PersonalizationToken = z.infer<typeof PersonalizationTokenSchema>;
type PlacementCategory = z.infer<typeof PlacementCategorySchema>;
type PlacementDecisionOutput = z.infer<typeof PlacementDecisionOutputSchema>;
type PlacementPayload = z.infer<typeof PlacementPayloadSchema>;
type PlacementPerformanceRow = z.infer<typeof PlacementPerformanceRowSchema>;
type Placement = z.infer<typeof PlacementSchema>;
type PlacementSettingsCapRuleGroupItem = z.infer<typeof PlacementSettingsCapRuleGroupItemSchema>;
type PlacementSettingsCapRule = z.infer<typeof PlacementSettingsCapRuleSchema>;
type PlacementSettingsCapState = z.infer<typeof PlacementSettingsCapStateSchema>;
type PlacementSettings = z.infer<typeof PlacementSettingsSchema>;
type PlacementTestMode = z.infer<typeof PlacementTestModeSchema>;
type PlacementTestUserIdentifierType = z.infer<typeof PlacementTestUserIdentifierTypeSchema>;
type PlacementTestUser = z.infer<typeof PlacementTestUserSchema>;
type PlacementWarningCode = z.infer<typeof PlacementWarningCodeSchema>;
type PlacementWarning = z.infer<typeof PlacementWarningSchema>;
type Plan = z.infer<typeof PlanSchema>;
type PlanVariation = z.infer<typeof PlanVariationSchema>;
type PlanVisibility = z.infer<typeof PlanVisibilitySchema>;
type PlaybookBody = z.infer<typeof PlaybookBodySchema>;
type PlaybookHeader = z.infer<typeof PlaybookHeaderSchema>;
type PlaybookObject = z.infer<typeof PlaybookObjectSchema>;
type PlaybookPlacementItem = z.infer<typeof RevTurbineConfigPlacementItemSchema>;
type Playbook = z.infer<typeof PlaybookSchema>;
type PlaybookSegmentsItemPredicatesItem = z.infer<typeof RevTurbineConfigSegmentsItemPredicatesItemSchema>;
type PlaybookSegmentsItem = z.infer<typeof RevTurbineConfigSegmentsItemSchema>;
type PlaybookStrict = z.infer<typeof PlaybookStrictSchema>;
type PlaybookUiPathActionType = z.infer<typeof RevTurbineConfigUiPathActionTypeSchema>;
type PlaybookVersionDeployResult = z.infer<typeof PlaybookVersionDeployResultSchema>;
type PlaybookVersionDiff = z.infer<typeof PlaybookVersionDiffSchema>;
type PlaybookVersionEntrySummary = z.infer<typeof PlaybookVersionEntrySummarySchema>;
type PlaybookVersion = z.infer<typeof PlaybookVersionSchema>;
type PlaybookVersionStatus = z.infer<typeof PlaybookVersionStatusSchema>;
type PresentationOutcome = z.infer<typeof PresentationOutcomeSchema>;
type PriceSource = z.infer<typeof PriceSourceSchema>;
type PricingModel = z.infer<typeof PricingModelSchema>;
type PrimaryContactDesignation = z.infer<typeof PrimaryContactDesignationSchema>;
type PrimaryContactResolution = z.infer<typeof PrimaryContactResolutionSchema>;
type PrimaryContactUnresolvedReason = z.infer<typeof PrimaryContactUnresolvedReasonSchema>;
type Promotion = z.infer<typeof PromotionSchema>;
type PromotionStatus = z.infer<typeof PromotionStatusSchema>;
type ProviderAvailability = z.infer<typeof ProviderAvailabilitySchema>;
type ProviderBindingRef = z.infer<typeof ProviderBindingRefSchema>;
type ProviderCapability = z.infer<typeof ProviderCapabilitySchema>;
type ProviderConnection = z.infer<typeof ProviderConnectionSchema>;
type ProviderProvenance = z.infer<typeof ProviderProvenanceSchema>;
type PurchasedAddon$1 = z.infer<typeof PurchasedAddonSchema$1>;
type PurchasedAddons = z.infer<typeof PurchasedAddonsSchema>;
type RevenueMetric = z.infer<typeof RevenueMetricSchema>;
type ReverseTrialRule = z.infer<typeof ReverseTrialRuleSchema>;
type ReverseTrialSettings = z.infer<typeof ReverseTrialSettingsSchema>;
type ReverseTrialStartPolicy = z.infer<typeof ReverseTrialStartPolicySchema>;
type RevturbineB2BTrackEvent = z.infer<typeof RevturbineB2BTrackEventSchema>;
type RevturbineCanonicalEventContext = z.infer<typeof RevturbineCanonicalEventContextSchema>;
type RevTurbineConfigAddonsItem = z.infer<typeof RevTurbineConfigAddonsItemSchema>;
type RevTurbineConfigAddonVariationsItem = z.infer<typeof RevTurbineConfigAddonVariationsItemSchema>;
type RevTurbineConfigEnforcementDefaultsItem = z.infer<typeof RevTurbineConfigEnforcementDefaultsItemSchema>;
type RevTurbineConfigEntitlementRulesItem = z.infer<typeof RevTurbineConfigEntitlementRulesItemSchema>;
type RevTurbineConfigEntitlementsItem = z.infer<typeof RevTurbineConfigEntitlementsItemSchema>;
type RevTurbineConfigMeterBindingsItem = z.infer<typeof RevTurbineConfigMeterBindingsItemSchema>;
type RevTurbineConfigObjectivesItem = z.infer<typeof RevTurbineConfigObjectivesItemSchema>;
type RevTurbineConfigPeriodCap = z.infer<typeof RevTurbineConfigPeriodCapSchema>;
type RevTurbineConfigPersonalizationTokensItem = z.infer<typeof RevTurbineConfigPersonalizationTokensItemSchema>;
type RevTurbineConfigPlacementCategory = z.infer<typeof RevTurbineConfigPlacementCategorySchema>;
type RevTurbineConfigPlacementItem = z.infer<typeof RevTurbineConfigPlacementItemSchema>;
type RevTurbineConfigPlacementPayloadItem = z.infer<typeof RevTurbineConfigPlacementPayloadItemSchema>;
type RevTurbineConfigPlacementSettingsItem = z.infer<typeof RevTurbineConfigPlacementSettingsItemSchema>;
type RevTurbineConfigPlacementSlotsItem = z.infer<typeof RevTurbineConfigPlacementSlotsItemSchema>;
type RevTurbineConfigPlacementTrigger = z.infer<typeof RevTurbineConfigPlacementTriggerSchema>;
type RevTurbineConfigPlansItem = z.infer<typeof RevTurbineConfigPlansItemSchema>;
type RevTurbineConfigPlanVariationsItem = z.infer<typeof RevTurbineConfigPlanVariationsItemSchema>;
type RevTurbineConfig = z.infer<typeof RevTurbineConfigSchema>;
type RevTurbineConfigSeatTypesItem = z.infer<typeof RevTurbineConfigSeatTypesItemSchema>;
type RevTurbineConfigSegmentDimensionsItem = z.infer<typeof RevTurbineConfigSegmentDimensionsItemSchema>;
type RevTurbineConfigSegmentsItemPredicatesItem = z.infer<typeof RevTurbineConfigSegmentsItemPredicatesItemSchema>;
type RevTurbineConfigSegmentsItem = z.infer<typeof RevTurbineConfigSegmentsItemSchema>;
type RevTurbineConfigSlotConfigsItem = z.infer<typeof RevTurbineConfigSlotConfigsItemSchema>;
type RevTurbineConfigStudioCtaConfig = z.infer<typeof RevTurbineConfigStudioCtaConfigSchema>;
type RevTurbineConfigStudioPayloadCaps = z.infer<typeof RevTurbineConfigStudioPayloadCapsSchema>;
type RevTurbineConfigStudioPayload = z.infer<typeof RevTurbineConfigStudioPayloadSchema>;
type RevTurbineConfigStudioPayloadSurface = z.infer<typeof RevTurbineConfigStudioPayloadSurfaceSchema>;
type RevTurbineConfigStudioPayloadTarget = z.infer<typeof RevTurbineConfigStudioPayloadTargetSchema>;
type RevTurbineConfigSurfaceTemplatesItemFieldsItem = z.infer<typeof RevTurbineConfigSurfaceTemplatesItemFieldsItemSchema>;
type RevTurbineConfigSurfaceTemplatesItem = z.infer<typeof RevTurbineConfigSurfaceTemplatesItemSchema>;
type RevTurbineConfigUiPathActionType = z.infer<typeof RevTurbineConfigUiPathActionTypeSchema>;
type RevturbineEventContext = z.infer<typeof RevturbineEventContextSchema>;
type RevturbineIdentitySource = z.infer<typeof RevturbineIdentitySourceSchema>;
type RevturbineProducerAliasEvent = z.infer<typeof RevturbineProducerAliasEventSchema>;
type RevturbineProducerEventContext = z.infer<typeof RevturbineProducerEventContextSchema>;
type RevturbineProducerEvent = z.infer<typeof RevturbineProducerEventSchema>;
type RevturbineProducerGroupEvent = z.infer<typeof RevturbineProducerGroupEventSchema>;
type RevturbineProducerIdentifyEvent = z.infer<typeof RevturbineProducerIdentifyEventSchema>;
type RevturbineProducerPageEvent = z.infer<typeof RevturbineProducerPageEventSchema>;
type RevturbineProducerScreenEvent = z.infer<typeof RevturbineProducerScreenEventSchema>;
type RevturbineProducerSegmentContext = z.infer<typeof RevturbineProducerSegmentContextSchema>;
type RevturbineProducerTrackEvent = z.infer<typeof RevturbineProducerTrackEventSchema>;
type Role = z.infer<typeof RoleSchema>;
type RuleVisibility = z.infer<typeof RuleVisibilitySchema>;
type RuntimePromotionSnapshot = z.infer<typeof RuntimePromotionSnapshotSchema>;
type SdkConfigShape = z.infer<typeof SdkConfigShapeSchema>;
type SdkMetaEvent = z.infer<typeof SdkMetaEventSchema>;
type SdkMetaEventType = z.infer<typeof SdkMetaEventTypeSchema>;
type SdkMetaIngestBatch = z.infer<typeof SdkMetaIngestBatchSchema>;
type SeatType = z.infer<typeof SeatTypeSchema>;
type SegmentAliasInput = z.infer<typeof SegmentAliasInputSchema>;
type SegmentB2BTrackEvent = z.infer<typeof SegmentB2BTrackEventSchema>;
type SegmentDimension = z.infer<typeof SegmentDimensionSchema>;
type SegmentEventContext = z.infer<typeof SegmentEventContextSchema>;
type SegmentEventInput = z.infer<typeof SegmentEventInputSchema>;
type SegmentGroupInput = z.infer<typeof SegmentGroupInputSchema>;
type SegmentIdentifyInput = z.infer<typeof SegmentIdentifyInputSchema>;
type SegmentIngestBatch = z.infer<typeof SegmentIngestBatchSchema>;
type SegmentLibraryContext = z.infer<typeof SegmentLibraryContextSchema>;
type SegmentPageContext = z.infer<typeof SegmentPageContextSchema>;
type SegmentPageInput = z.infer<typeof SegmentPageInputSchema>;
type Segment = z.infer<typeof SegmentSchema>;
type SegmentScreenInput = z.infer<typeof SegmentScreenInputSchema>;
type SegmentTrackInput = z.infer<typeof SegmentTrackInputSchema>;
type SegmentValue = z.infer<typeof SegmentValueSchema>;
type SemanticEvent = z.infer<typeof SemanticEventSchema>;
type ServerBuiltinDimensionsWrite = z.infer<typeof ServerBuiltinDimensionsWriteSchema>;
type ServerEvaluationPayloadDecisionsItem = z.infer<typeof ServerEvaluationPayloadDecisionsItemSchema>;
type ServerEvaluationPayloadEntitlementsValue = z.infer<typeof ServerEvaluationPayloadEntitlementsValueSchema>;
type ServerEvaluationPayload = z.infer<typeof ServerEvaluationPayloadSchema>;
type ServerEvaluationPayloadTrialStatus = z.infer<typeof ServerEvaluationPayloadTrialStatusSchema>;
type ServerEvaluationPayloadUserContext = z.infer<typeof ServerEvaluationPayloadUserContextSchema>;
type ServerEvaluationPayloadUser = z.infer<typeof ServerEvaluationPayloadUserSchema>;
type ServerUserBuiltinDimensions = z.infer<typeof ServerUserBuiltinDimensionsSchema>;
type ServerUserContextAssignment = z.infer<typeof ServerUserContextAssignmentSchema>;
type ServerUserContextUpsert = z.infer<typeof ServerUserContextUpsertSchema>;
type Severity = z.infer<typeof SeveritySchema>;
type SimulationChildControlRequest = z.infer<typeof SimulationChildControlRequestSchema>;
type SimulationChildQualificationReceipt = z.infer<typeof SimulationChildQualificationReceiptSchema>;
type SimulationChildQualificationRequest = z.infer<typeof SimulationChildQualificationRequestSchema>;
type SimulationControlEvidence = z.infer<typeof SimulationControlEvidenceSchema>;
type SimulationControlRequest = z.infer<typeof SimulationControlRequestSchema>;
type SimulationExecuteRequest = z.infer<typeof SimulationExecuteRequestSchema>;
type SimulationExecutionAdmission = z.infer<typeof SimulationExecutionAdmissionSchema>;
type SimulationExecutionFingerprint = z.infer<typeof SimulationExecutionFingerprintSchema>;
type SimulationPreparationReceipt = z.infer<typeof SimulationPreparationReceiptSchema>;
type SimulationPrepareRequest = z.infer<typeof SimulationPrepareRequestSchema>;
type SimulationProbeReceipt = z.infer<typeof SimulationProbeReceiptSchema>;
type SimulationRunReceipt = z.infer<typeof SimulationRunReceiptSchema>;
type SimulationSliceReceipt = z.infer<typeof SimulationSliceReceiptSchema>;
type SimulationSliceRequest = z.infer<typeof SimulationSliceRequestSchema>;
type SimulationTerminalZeroReceipt = z.infer<typeof SimulationTerminalZeroReceiptSchema>;
type SimulationVerifiedControlEvent = z.infer<typeof SimulationVerifiedControlEventSchema>;
type SimulationVerifiedProvenance = z.infer<typeof SimulationVerifiedProvenanceSchema>;
type StripeBillingScope = z.infer<typeof StripeBillingScopeSchema>;
type StripeCustomerInventory = z.infer<typeof StripeCustomerInventorySchema>;
type StripeDiscoveryAccountLinkStatus = z.infer<typeof StripeDiscoveryAccountLinkStatusSchema>;
type StripeDiscoveryFailureCode = z.infer<typeof StripeDiscoveryFailureCodeSchema>;
type StripeDiscoveryFailureColumn = z.infer<typeof StripeDiscoveryFailureColumnSchema>;
type StripeDiscoveryHealthState = z.infer<typeof StripeDiscoveryHealthStateSchema>;
type StripeDiscoveryLinkEvidence = z.infer<typeof StripeDiscoveryLinkEvidenceSchema>;
type StripeDiscoveryMapRequest = z.infer<typeof StripeDiscoveryMapRequestSchema>;
type StripeDiscoveryMapResult = z.infer<typeof StripeDiscoveryMapResultSchema>;
type StripeDiscoveryObservation = z.infer<typeof StripeDiscoveryObservationSchema>;
type StripeDiscoveryPendingSubscription = z.infer<typeof StripeDiscoveryPendingSubscriptionSchema>;
type StripeDiscoveryPhase = z.infer<typeof StripeDiscoveryPhaseSchema>;
type StripeDiscoveryPopulation = z.infer<typeof StripeDiscoveryPopulationSchema>;
type StripeDiscoveryRun = z.infer<typeof StripeDiscoveryRunSchema>;
type StripeDiscoveryRunStatus = z.infer<typeof StripeDiscoveryRunStatusSchema>;
type StripeDiscoveryStartResult = z.infer<typeof StripeDiscoveryStartResultSchema>;
type StripeDiscoveryState = z.infer<typeof StripeDiscoveryStateSchema>;
type StripeDiscoveryStatus = z.infer<typeof StripeDiscoveryStatusSchema>;
type StripeDiscoveryTrigger = z.infer<typeof StripeDiscoveryTriggerSchema>;
type StripeDiscoveryUnmatchedItem = z.infer<typeof StripeDiscoveryUnmatchedItemSchema>;
type StripeDiscoveryUnmatchedPage = z.infer<typeof StripeDiscoveryUnmatchedPageSchema>;
type StripeDiscoveryUnresolvedReason = z.infer<typeof StripeDiscoveryUnresolvedReasonSchema>;
type StripeDiscoveryUserLinkStatus = z.infer<typeof StripeDiscoveryUserLinkStatusSchema>;
type StripeIntegrationConfig = z.infer<typeof StripeIntegrationConfigSchema>;
type StripePriceBillingPeriod = z.infer<typeof StripePriceBillingPeriodSchema>;
type StripePriceMockBillingPeriod = z.infer<typeof StripePriceMockBillingPeriodSchema>;
type StripePriceMock = z.infer<typeof StripePriceMockSchema>;
type StripePrice = z.infer<typeof StripePriceSchema>;
type StripePriceScope = z.infer<typeof StripePriceScopeSchema>;
type StripeSubscriptionEvidence = z.infer<typeof StripeSubscriptionEvidenceSchema>;
type StripeSubscriptionItem = z.infer<typeof StripeSubscriptionItemSchema>;
type StripeSubscriptionStatus = z.infer<typeof StripeSubscriptionStatusSchema>;
type StudioSurfaceType = z.infer<typeof StudioSurfaceTypeSchema>;
type SubscriptionEvidenceKnown = z.infer<typeof SubscriptionEvidenceKnownSchema>;
type SubscriptionEvidenceResult = z.infer<typeof SubscriptionEvidenceResultSchema>;
type SubscriptionEvidenceUnavailableReason = z.infer<typeof SubscriptionEvidenceUnavailableReasonSchema>;
type SubscriptionEvidenceUnavailable = z.infer<typeof SubscriptionEvidenceUnavailableSchema>;
type SubscriptionProtection = z.infer<typeof SubscriptionProtectionSchema>;
type SuggestionSeverity = z.infer<typeof SuggestionSeveritySchema>;
type SupersessionReason = z.infer<typeof SupersessionReasonSchema>;
type SupersessionRecord = z.infer<typeof SupersessionRecordSchema>;
type SurfaceSlot = z.infer<typeof SurfaceSlotSchema>;
type SurfaceSlotStatus = z.infer<typeof SurfaceSlotStatusSchema>;
type SurfaceTemplate = z.infer<typeof SurfaceTemplateSchema>;
type SurfaceTypeCapRule = z.infer<typeof SurfaceTypeCapRuleSchema>;
type SurfaceType = z.infer<typeof SurfaceTypeSchema>;
type TemplateFieldType = z.infer<typeof TemplateFieldTypeSchema>;
type TenantConfig = z.infer<typeof TenantConfigSchema>;
type Tenant = z.infer<typeof TenantSchema>;
type TenantStatus = z.infer<typeof TenantStatusSchema>;
type Theme = z.infer<typeof ThemeSchema>;
type TrackEvent = z.infer<typeof TrackEventSchema>;
type TrackIngestBatch = z.infer<typeof TrackIngestBatchSchema>;
type TreatmentInteractionBatch = z.infer<typeof TreatmentInteractionBatchSchema>;
type TreatmentInteractionInput = z.infer<typeof TreatmentInteractionInputSchema>;
type TreatmentInteractionRequest = z.infer<typeof TreatmentInteractionRequestSchema>;
type TreatmentInteractionType = z.infer<typeof TreatmentInteractionTypeSchema>;
type TrendFeatures = z.infer<typeof TrendFeaturesSchema>;
type TrialEligibilityScope = z.infer<typeof TrialEligibilityScopeSchema>;
type TrialInstance = z.infer<typeof TrialInstanceSchema>;
type TrialLimitPolicy = z.infer<typeof TrialLimitPolicySchema>;
type TrialStatus = z.infer<typeof TrialStatusSchema>;
type TriggerEventType = z.infer<typeof TriggerEventTypeSchema>;
type UiPreference = z.infer<typeof UiPreferenceSchema>;
type UsageAllocation = z.infer<typeof UsageAllocationSchema$1>;
type UsageEnforcementSettings = z.infer<typeof UsageEnforcementSettingsSchema>;
type UsagePeriodScope = z.infer<typeof UsagePeriodScopeSchema>;
type UserBuiltinDimensions = z.infer<typeof UserBuiltinDimensionsSchema>;
type UserContext = z.infer<typeof UserContextSchema>;
type UserInstanceContext = z.infer<typeof UserInstanceContextSchema>;
type UserPlanContext = z.infer<typeof UserPlanContextSchema>;
type UserRole = z.infer<typeof UserRoleSchema>;
type UserTrialStatus = z.infer<typeof UserTrialStatusSchema>;
type UserUsageEntry = z.infer<typeof UserUsageEntrySchema>;
type VariantStatisticalSummary = z.infer<typeof VariantStatisticalSummarySchema>;
type WarGameCapabilityRequirements = z.infer<typeof WarGameCapabilityRequirementsSchema>;
type WarGameCategory = z.infer<typeof WarGameCategorySchema>;
type WarGameGrade = z.infer<typeof WarGameGradeSchema>;
type WarGameOracle = z.infer<typeof WarGameOracleSchema>;
type WarGameQualificationLevel = z.infer<typeof WarGameQualificationLevelSchema>;
type WarGameScenario = z.infer<typeof WarGameScenarioSchema>;
type WebhookDelivery = z.infer<typeof WebhookDeliverySchema>;
type WebhookDispatchStatus = z.infer<typeof WebhookDispatchStatusSchema>;
type WebhookEventLog = z.infer<typeof WebhookEventLogSchema>;
type WebhookEventSource = z.infer<typeof WebhookEventSourceSchema>;
type WebhookEventStatus = z.infer<typeof WebhookEventStatusSchema>;
type WebhookProcessingStatus = z.infer<typeof WebhookProcessingStatusSchema>;
type WebhookReplayEnvelope = z.infer<typeof WebhookReplayEnvelopeSchema>;

declare const REQUIRED_BODY_ARRAY_FIELDS: readonly ["plans", "entitlements", "entitlement_rules", "segments", "content_ui_paths"];
/** A canonical Playbook or the deprecated RevTurbineConfig wire shape. */
type ConfigArtifact = Playbook | RevTurbineConfig;
/**
 * A config artifact as raw parsed JSON — what
 * `import playbook from './revturbine.playbook.json'` produces.
 *
 * This exists because TypeScript widens JSON modules to plain `string`/`number`
 * property types, which can never satisfy the literal-typed
 * {@link ConfigArtifact} (`artifact_type: "playbook"` etc.), so a strict-mode
 * project could not pass the imported JSON without a cast.
 *
 * Widening affects only *literal* types, so it is no reason to give up on the
 * rest of the shape. The body arrays are structurally required here, which
 * makes a truncated artifact a **compile** error at the `localRuntime`
 * boundary rather than a runtime one — the whole point of plan 233. The header
 * fields stay unconstrained because those are exactly the widened ones.
 *
 * The required-field list is *derived* from {@link REQUIRED_BODY_ARRAY_FIELDS},
 * the same constant {@link normalizeConfigArtifactOrThrow} validates against at
 * runtime, so the compile-time and runtime contracts cannot drift apart.
 *
 * The index signature keeps every other field open: a Playbook carries many
 * optional header fields, and a *fetched* artifact (`await res.json()`, typed
 * `any`) still satisfies this, so the served path is not made harder to write —
 * only harder to get silently wrong. Values are still validated at runtime by
 * {@link normalizeConfigArtifactOrThrow}, which fails fast with a descriptive
 * error; this type constrains the *shape*, never the values.
 */
type UnvalidatedConfigArtifact = {
    [K in (typeof REQUIRED_BODY_ARRAY_FIELDS)[number]]: unknown[];
} & {
    [key: string]: unknown;
};
/**
 * The target (tenant + environment) the SDK was initialized against.
 *
 * These are the **authority** on which tenant a runtime decides for. An
 * artifact's own `tenant_id` / `environment_id` are a *guard*: they exist so the
 * CLI can refuse to upload a config to the wrong tenant while setting up demo
 * environments, and they are not a runtime input (plan 233 REQ-2, Kent 2026-09-10).
 *
 * A disagreement between the two warns and proceeds on these values — it never
 * fails init. See {@link normalizeConfigArtifactOrThrow}.
 *
 * @public
 */
interface ConfigTargetDefaults {
    /**
     * Tenant the SDK was initialized with. Wins over the artifact's `tenant_id`.
     * Optional since `0.11.14` (BL-0335): a key-only browser init passes none, and
     * the artifact's own `tenant_id` — stamped by the control plane for the
     * public key's tenant — is used.
     */
    tenantId?: string;
    /** Environment the SDK was initialized with. Wins over the artifact's `environment_id`. */
    environmentId: string;
}
/**
 * @deprecated Renamed to {@link ConfigTargetDefaults} in plan 233 — these values
 * are no longer "legacy defaults" applied only to pre-stamping artifacts; they
 * are the authoritative target for every artifact shape. Kept as an alias so the
 * already-shipped export keeps resolving.
 * @public
 */
type LegacyConfigTargetDefaults = ConfigTargetDefaults;
/**
 * Parse either supported wire shape into the canonical Playbook shape.
 *
 * Presence of either canonical discriminator selects the canonical parser, so
 * an unsupported future `format_version` can never fall back to legacy.
 */
declare function normalizeConfigArtifactOrThrow(raw: unknown, // sdk-ok: boundary-parse
source: string, targetDefaults?: ConfigTargetDefaults): Playbook | undefined;

/**
 * User schemas — Zod definitions for user context, trial status, and usage.
 *
 * These are external/SDK-facing types that describe an identified user's
 * current state (plan, entitlements, usage, personalization tokens).
 */

/** One current purchased holding; quantities are aggregates, not purchase events. */
declare const PurchasedAddonSchema: z.ZodObject<{
    addon_handle: z.ZodString;
    addon_variation_handle: z.ZodOptional<z.ZodString>;
    quantity: z.ZodNumber;
}, z.core.$strip>;
/** Canonical purchased-holding transport type. */
type PurchasedAddon = z.infer<typeof PurchasedAddonSchema>;

/**
 * Core type definitions shared across the isomorphic SDK.
 *
 * These types originate from customer-side.ts but are runtime-agnostic.
 * The web-sdk re-exports them for backward compatibility.
 */

type RevTurbineComponentType = ComponentType;
/** @deprecated Use {@link RevTurbineComponentType}. */
type RevTurbineSurfaceType = RevTurbineComponentType;
/**
 * Full placement output for rich rendering.
 * Re-exported from the schema's `PlacementDecisionOutput`.
 */
type PlacementOutput = PlacementDecisionOutput;
/**
 * Entitlement check outcome.
 * Re-exported from the schema's `EntitlementCheckResult`.
 */
type EntitlementResult = EntitlementCheckResult$1;
interface RevTurbineDecisionContent {
    /** Primary heading text (canonical). */
    header: string;
    /** Body / description text. */
    body: string;
    /** Primary CTA button label (canonical). */
    cta_label: string;
    /** @deprecated Use `header`. */
    title: string;
    /** @deprecated Use `cta_label`. */
    cta: string;
}
type RevTurbineContextMode = 'auto' | 'profile_only' | 'override_only' | 'hybrid_strict';
interface RevTurbineMeterUsageOverride {
    entitlementId: string;
    meterId: string;
    used: number;
}
interface RevTurbinePlacementDecisionOverrides {
    segmentId?: string;
    planId?: string;
    usage?: RevTurbineMeterUsageOverride[];
}
interface RevTurbinePlacementDecisionInput {
    /** Placement ID. */
    placementId: string;
    /** Target user identifier. */
    userId: string;
    /** Customer account identifier (groups users under a single billing entity). */
    accountId?: string;
    /** Product instance within an account (optional; default 1 per account). */
    productInstanceId?: string;
    contextMode?: RevTurbineContextMode;
    overrides?: RevTurbinePlacementDecisionOverrides;
    traits?: Record<string, string | number | boolean>;
    ttlMs?: number;
}
/**
 * Slot/surface-keyed placement request — the input to surface-keyed
 * `getPlacement` (plan 147 REQ-11). Resolves *what placement fills a given
 * surface slot* for the current user; the counterpart to the placement-id-keyed
 * `RevTurbinePlacementDecisionInput`.
 *
 * Mirrors the six-stage runtime model in placement-prioritization.md §1
 * (Qualification includes the slot match) and the `--slot` CLI contract in
 * cli.md (`getPlacement({ slotId, componentType?, planHandle? })`). Kept in core so
 * the SDK, CLI, and server share one shape (Appendix C: the same shared scaffold
 * logic runs both sides).
 */
interface RevTurbinePlacementRequestConfig$1 {
    /** Surface slot id to resolve (matches `placement_slots[].id`). */
    slotId?: string;
    /** Component type; disambiguates a slot that can render more than one component. */
    componentType?: RevTurbineComponentType;
    /** @deprecated Use {@link componentType}. */
    surfaceType?: RevTurbineSurfaceType;
    /** Entitlement handle for entitlement-gated (Access Gate) resolution. */
    entitlementHandle?: string;
    /** Evaluate as if the user were on this plan. */
    planHandle?: string;
    /** Chain from a prior CTA path by placement handle. */
    placementHandle?: string;
    /**
     * Restrict candidates to Fixed-category placements for this call — a slot
     * reserved for PM-wired content (placement-prioritization.md §4 `fixedOnly`).
     */
    fixedOnly?: boolean;
}
interface RevTurbinePlacementDecision {
    /** The placement this decision was made for. */
    placementId: string;
    /** Correlation ID for this request. */
    requestId: string;
    /** Whether the placement should be shown to the user. */
    visible: boolean;
    decisionSource: 'remote' | 'cache' | 'fallback';
    reasonCodes: string[];
    suppressionReason?: string;
    content: RevTurbineDecisionContent;
    /**
     * Full placement output for rich rendering.
     * When present, `useSurfaceSlot` will use this instead of constructing
     * a minimal PlacementOutput from `content`.
     */
    output?: PlacementOutput;
}
interface RevTurbinePlacementRecord {
    id: string;
    name: string;
    route: string;
    placementScopeKey?: string;
    metadata?: Record<string, unknown>;
}
/**
 * A placement resolver is a function that produces a placement decision
 * for a given input.
 *
 * This is the **interface** that concrete resolver factories must return.
 * For example, `createStaticPlacementResolver()` builds one from a static
 * dataset, but other implementations could resolve from an API, a cache,
 * or any other data source.
 */
type PlacementResolver = (input: RevTurbinePlacementDecisionInput, placement?: RevTurbinePlacementRecord, context?: Record<string, unknown>) => Promise<RevTurbinePlacementDecision>;
interface RevTurbineEntitlementContext {
    /** Consumed units for usage-limit entitlements. */
    used?: number;
    /** Remaining balance for credit-based entitlements. */
    balance?: number;
    /** Required tier for capability-tier checks. */
    requiredTier?: string;
}
/**
 * Computed targeting snapshot used by the content resolution pipeline.
 *
 * Built from the canonical {@link UserContext} (schema) plus evaluated
 * segment membership.  The flat `traits` map merges `custom`, boolean
 * `entitlements`, and numeric usage amounts so segment predicates can
 * evaluate against a single key-value namespace.
 */
interface UserTargetingContext {
    userId: string;
    /** Customer account identifier. */
    accountId?: string;
    /** Product instance within an account. */
    productInstanceId?: string;
    segmentIds: string[];
    /** Flattened traits for segment evaluation (custom + entitlements + usage amounts). */
    traits: Record<string, unknown>;
    plan?: string;
    usage?: Record<string, number>;
}
interface RevTurbineEventEnvelope {
    tenant_id: string;
    type: string;
    level: 'INFO';
    message: string;
    url: string;
    path: string;
    page_title: string;
    event_time: string;
    anonymous_id: string;
    user_id: string | null;
    session_id: string;
    tags: string[];
    identity: {
        tenant_id: string;
        user_id: string | null;
        anonymous_id: string;
        traits: Record<string, unknown>;
    };
    properties: Record<string, unknown>;
}
type PersonalizationContext$1 = Record<string, string | number | undefined>;
type ResolvedContent$1 = Record<string, unknown>;
interface PlacementUiPath$1 {
    type: 'open_checkout_modal' | 'navigate_to_plans' | 'open_upgrade_modal' | 'open_placement' | 'book_demo' | 'open_feature_tour' | 'custom_url' | 'contact_sales' | 'complete_onboarding' | 'invite_teammate' | 'refer_friend' | 'verify_work_email' | 'update_payment_method' | 'enable_auto_renewal' | 'manage_subscription' | 'switch_billing_period' | 'dismiss' | 'snooze' | 'extend_trial';
    url?: string;
    plan_handle?: string;
    promotion_id?: string;
    placement_handle?: string;
    [key: string]: unknown;
}
interface RevTurbineThemeInput$1 {
    id?: string;
    name?: string;
    version?: string;
    colors?: Record<string, string>;
    typography?: Record<string, string>;
    shape?: Record<string, string | number>;
    shadows?: Record<string, string>;
}

/** JSON data types and boundary guard, without evaluator or generated-schema dependencies. */
type JsonValue = string | number | boolean | null | JsonValue[] | {
    [key: string]: JsonValue;
};
type JsonObject = {
    [key: string]: JsonValue;
};

/**
 * BL-0156 — `playbook` is the canonical option name; `exportedConfig` is a
 * deprecated alias.
 *
 * "ExportedConfig" is dead vocabulary. Plan 118 renamed the domain object to
 * **Playbook** and plan 104 renamed the schema type to `RevTurbineConfig`, but
 * the *option* and *parameter* names that carry a Playbook around core still
 * spelled it `exportedConfig`. This module is the single place that reconciles
 * the two spellings, mirroring the plan-257 `publicKey` mechanism:
 *
 *   - the canonical `playbook` wins whenever it is supplied,
 *   - the deprecated `exportedConfig` is still accepted,
 *   - supplying only the alias emits ONE warning naming the canonical option,
 *   - supplying BOTH with *different* Playbooks throws instead of silently
 *     picking one — that combination is always a caller bug.
 *
 * Every read site resolves through `resolvePlaybookOption` /
 * `requirePlaybookOption`, so the precedence cannot drift per call site.
 *
 * **Why the warning is not gated on a development build.** Core's ESLint config
 * blocks the `process` global outright (`no-restricted-globals`) because core
 * must run unchanged on edge runtimes and in browsers, so core cannot read
 * `NODE_ENV` the way `web-sdk/build-mode.ts` does. The warning is therefore
 * emitted once per runtime in every build — a single line, only for callers
 * still on the deprecated spelling, and it names the fix.
 *
 * Aliases are removed in the minor after the SDK 0.11.0 cascade.
 *
 * **BL-0172.** `PlaybookOption` is a union so a bag can require *either*
 * spelling (mirroring the single required property it replaced), but each
 * arm declares its own `exportedConfig` property signature. TypeScript does
 * not propagate a `@deprecated` tag across union arms — a tag on one arm's
 * property has no effect on a sibling arm's own declaration of the same
 * name. Every arm below repeats the tag so every bag composed through this
 * union (`LocalRuntimeOptions`, `StaticPlacementResolverOptions`,
 * `LocalPlacementSource`, `EntitlementCheckInput`) gets the IDE
 * strikethrough on `.exportedConfig`, not just a prose mention on
 * {@link OptionalPlaybookOption}.
 */

/**
 * An options bag that must carry a Playbook, under either the canonical
 * `playbook` name or the deprecated `exportedConfig` alias.
 *
 * Modelled as a union so TypeScript still requires one of the two, exactly as
 * the single required property did before the rename.
 */
type PlaybookOption = {
    playbook: RevTurbineConfig;
    /**
     * @deprecated Use `playbook`. Removed in the minor after the SDK
     * 0.11.0 cascade (BL-0156).
     */
    exportedConfig?: RevTurbineConfig;
} | {
    playbook?: RevTurbineConfig;
    /**
     * @deprecated Use `playbook`. Removed in the minor after the SDK
     * 0.11.0 cascade (BL-0156).
     */
    exportedConfig: RevTurbineConfig;
};

/**
 * Placement schemas — Zod definitions for placements, payloads, variants, and surface slots.
 */

declare const CapPeriodSchema: z.ZodEnum<{
    day: "day";
    week: "week";
    month: "month";
    lifetime: "lifetime";
    session: "session";
}>;

/**
 * State types for interaction tracking (dismissals) and presentation caps (cooldowns).
 *
 * These are runtime-agnostic and used by both InteractionTracker and CapEnforcer.
 */

type RevTurbineTreatmentInteractionType = 'impression' | 'dismiss' | 'remind_me_later' | 'cta_clicked' | 'cta_completed' | 'suppress';
interface RevTurbineTreatmentInteractionInput {
    /** User who interacted. */
    userId: string;
    /** Placement the interaction occurred on. */
    placementId: string;
    treatmentId?: string;
    interactionType: RevTurbineTreatmentInteractionType;
    interactionAt?: string;
    /**
     * Surface slot the treatment was presented in — carried through to the
     * `surface_slot_id` field of the wire `TreatmentInteractionInputSchema` so
     * `placement_presentations` (slot discovery / idle detection) is complete.
     */
    surfaceSlotId?: string;
    /** Surface template the treatment rendered with → wire `surface_template_id`. */
    surfaceTemplateId?: string;
    /**
     * Content payload shown → wire `payload_id` (drives per-payload analytics like
     * `payload_perf` / "last payload shown").
     */
    payloadId?: string;
    /**
     * Message block rendered, by its **canonical handle** → wire
     * `message_block_handle`. This is what `message_impact` groups by, so it
     * answers "how does this message perform?" across content edits. Without it
     * that pipe returns nothing at all — it filters on an equality a null can
     * never satisfy (plan 182).
     */
    messageBlockHandle?: string;
    /**
     * The specific message-block **version** rendered → wire `message_block_id`.
     * Handles are canonical; ids address one version in the anchor+ledger model,
     * so grouping by this answers "how did THIS version perform?" — what makes a
     * content edit measurable. Send both when known.
     */
    messageBlockId?: string;
    /**
     * Experiment the presenting decision belonged to → wire `experiment_id`.
     * `experiment_perf` and `message_impact_by_variant` key on this.
     */
    experimentId?: string;
    /** Variant assigned by that experiment → wire `variant_key`. */
    variantKey?: string;
    /**
     * The placement rule that produced the treatment being interacted with —
     * `PlacementOutput.rule_id` — projected onto the `placement_interaction`
     * clickstream payload as `rule_handle` (BL-0182).
     *
     * It reaches the wire `TreatmentInteractionInputSchema` too, as of BL-0200.
     * It deliberately did not under BL-0182: that path is column-shaped and the
     * rule would have needed a datasource migration, while the clickstream
     * carries payload fields inside a JSON column and was readable at once.
     * `placement_exposure_attribution.rule_handle` exists now (web ledger 015),
     * so the base exposure row records the rule the exposure was DECIDED by
     * rather than waiting for attribution to reconstruct one when a conversion
     * lands — which is what makes presentation-grain rule cuts servable.
     *
     * Omitted, never sent empty, when no decision is in scope — a bare
     * `trackTreatmentInteraction` caller supplies no rule, and absence is what
     * keeps the slice's coverage honest.
     */
    ruleHandle?: string;
    /**
     * `PlacementOutput.decision_id` → wire `decision_id`, the key the
     * presentation row, the clickstream and the Checkout metadata bag
     * (`revturbine_decision_id`) share (plan 282 TASK-8/9, BL-0463). The SDK
     * mints this id locally when it decides the placement; nothing is fetched
     * to fill it. Wins over the plan-144 `metadata.decision_id` convention when
     * both are given.
     */
    decisionId?: string;
    /**
     * The segment handles the user was in when the treatment was presented →
     * wire `segment_handles`, the analytics join key (D-58). Handles, never
     * minted ids: the SDK's effective set comes from scaffold's
     * `evaluateSegments` plus any hosted-resolved slugs. `[]` is a real
     * observation (segments resolved, none matched); omit it when no decision
     * was in scope.
     */
    segmentHandles?: readonly string[];
    /**
     * Minted segment ids a hosted context supplied → wire `segment_ids`.
     * Telemetry only, never the join key, and never the evaluated handles;
     * omit it in local mode (D-58).
     */
    segmentIds?: readonly string[];
    metadata?: Record<string, unknown>;
}
interface InteractionState {
    /** Unix timestamp (ms) — when suppression expires. */
    suppressedUntil?: number;
    /** Independent system suppression expiry; category exemptions never bypass it. */
    explicitSuppressedUntil?: number;
    /** Type of last interaction. */
    lastInteractionType?: RevTurbineTreatmentInteractionType;
    /** ISO timestamp of last update. */
    updatedAt: string;
}
type CapPeriod = z.infer<typeof CapPeriodSchema>;
interface PlacementCapRule {
    count: number;
    period: CapPeriod;
}
interface PlacementCapPolicy {
    rules: PlacementCapRule[];
    cooldownMs?: number;
}
interface PresentationCapState {
    /** Timestamps (ms) when the placement was shown. */
    seenAt: number[];
    /** Unix timestamp (ms) — when cooldown expires. */
    cooldownUntil?: number;
}
interface SuppressionResult {
    suppressed: boolean;
    reason?: string;
}
interface CapEnforcementResult {
    allowed: boolean;
    reason?: string;
}

/**
 * Effective entitlements — the ONE answer every SDK runtime uses (D-61,
 * Kent 2026-10-06).
 *
 * The shared evaluator (`deriveLocalEntitlementFromConfiguredRules`) decides
 * each entitlement from the Playbook + user context. An app may then enrich
 * that answer with its own data ("Entitlement Mirroring"): grants on
 * `UserContext.entitlements` and/or an app-registered entitlement provider.
 * The two are merged with a configurable precedence — provider level
 * (`precedence`, default `'app'`) with optional per-field overrides.
 *
 * Browser and server SDKs run this same function on the same inputs: the
 * browser result shapes interaction, the server result verifies it.
 *
 * An entitlement handle neither the Playbook nor the app knows is DENIED
 * (`entitlement_not_in_playbook`) and flagged `unknownHandle`, so the runtime
 * can warn and report it.
 */

/** Which side wins a merge: the app's own data, or the Playbook evaluation. */
type EntitlementSource = 'app' | 'playbook';
/** Fields that can be given their own precedence. `status` carries `allowed` and `reason` with it. */
type EntitlementMergeField = 'status' | 'limit' | 'used' | 'remaining';
interface EntitlementMergeOptions {
    /** Provider-level precedence. Default `'app'`: app-supplied data wins. */
    precedence?: EntitlementSource;
    /** Per-field overrides of `precedence`. */
    fields?: Partial<Record<EntitlementMergeField, EntitlementSource>>;
}
/** A mirrored grant on `UserContext.entitlements`: a boolean, or a grant-shaped record. */
type MirroredEntitlement = boolean | {
    status?: string;
    allowed?: boolean;
    limit?: number;
    used?: number;
    remaining?: number;
    reason?: string;
};
/** The trial facts reverse-trial grants depend on (`UserTrialStatus` subset). */
interface ReverseTrialView {
    in_trial?: boolean;
    trial_type?: string;
    /** The user's BASE plan while on a reverse trial. */
    plan_handle?: string;
}

/**
 * User context lifecycle — pure functions for building, merging,
 * and deriving targeting state from user context + RevTurbineConfig.
 */

/** SDK-facing user context (widened for customer convenience). */
interface UserContextSnapshot {
    /** Current authoritative purchased holdings; an empty array clears them. */
    addons?: PurchasedAddon[];
    id?: string;
    /**
     * THE plan matching identity — the plan's `unique_handle` (plan 191 Q-1).
     * Rule targets, segment plan predicates, and plan resolution match on this
     * value alone.
     */
    plan_handle?: string;
    /**
     * The plan as a bare handle string, or as `{ handle, name, … }` (plan 191
     * Q-1 amendment — the object's identity symbol is `handle`; there is no
     * `id` in plan context). Both shapes carry the same matching identity as
     * the flat `plan_handle` above, which wins when both are set.
     */
    plan?: string | UserPlanContext;
    custom?: Record<string, JsonValue>;
    /**
     * App-supplied entitlement data keyed by handle — a boolean or a grant
     * (D-61 Entitlement Mirroring). Merged with the Playbook evaluation by the
     * effective-entitlement core; flattened into segment traits as a boolean.
     */
    entitlements?: Record<string, MirroredEntitlement>;
    usage?: Record<string, UserUsageEntry>;
    personalization?: Record<string, JsonValue>;
    /** Canonical experiment-handle to variant-handle assignments. */
    experiments?: Record<string, string>;
    /**
     * Built-in segment dimension values (plan 279 PD-3; targeting-studio-ui.md
     * §4.1 "Built-in segment resolution contract"). The ONLY source of the
     * reserved `rt_<dimension>` segment traits: `buildTargetingState` stamps
     * each present, in-vocabulary value and ignores the rest. Delivered by the
     * control plane's client context, or set by the app itself in `local_only`
     * mode and on the server ports — a server-delivered value wins.
     */
    builtin_dimensions?: UserBuiltinDimensions;
}
/** Computed targeting state for segment evaluation and placement resolution. */
interface TargetingState {
    effectivePlan: string | undefined;
    traits: Record<string, JsonValue>;
    usage: Record<string, number>;
    segmentTraits: Record<string, string | number | boolean>;
}

/**
 * The pure trial-episode classifier (plan 276 TASK-12, rulings R-1 / R-2;
 * workspace ruling D-21).
 *
 * `classifyTrialRevision` answers one question over one episode's facts: what
 * revision, if any, does the evidence support? It is a pure function with **no
 * clock of its own**. The caller may pass `observed_through` so a test can show
 * that an elapsed scheduled end changes nothing, but the function never reads
 * the current time and never manufactures an occurrence from it.
 *
 * That is the whole point. Before this module the live behaviour was the R-1(c)
 * violation plan 276 TASK-2 found in shipped code: expiry was derived from the
 * clock at read time, so a trial "expired" because a deadline passed, with no
 * fact anywhere saying the app had actually ended anything. Here an elapsed
 * deadline resolves to `pending_unknown`, and `pending_unknown` is a first-class
 * answer rather than an error — the lifecycle product would rather show an
 * unknown than invent a churn.
 *
 * Four rules carry the rulings:
 *
 *  - **The clock is never an authority (R-1(c)).** No end evidence ⇒ no
 *    `expired`, no `reverted`, no edge. `elapsed_deadline_without_fact` is the
 *    reason, and it is returned whether the deadline passed a moment ago or a
 *    year ago.
 *  - **A conversion links only its own episode (AC-4).** The commitment must be
 *    bound to THIS episode and must begin at or after the evidenced actual end.
 *    A commitment that starts before the episode ended is not this episode's
 *    conversion — card collection and unrelated paid activity cannot convert a
 *    trial.
 *  - **Usage expiry needs exhaustion evidence (R-1 / AC-2).** A usage-metered
 *    episode whose end evidence is not exhaustion stays unknown.
 *  - **A user-subject episode is not an account-wide grant (R-2).** It is
 *    classified normally and reported with `grants_account_access: false`.
 *
 * The result carries no `emit` flag on purpose: `status: 'revision'` IS the
 * instruction to emit one `trial_revision`, and `pending_unknown` IS the
 * instruction to emit nothing.
 */
/** The authority tier of a proving fact. There is no `clock` tier (R-1(c)). */
type TrialEvidenceKind = 'provider_fact' | 'app_fact' | 'usage_exhaustion';
/** A reference to the fact that proved something. Opaque to RevTurbine. */
interface TrialEvidence {
    readonly kind: TrialEvidenceKind;
    readonly ref: string;
    /** When the proving fact says the thing happened. */
    readonly occurred_at: string;
}
/** Every revision an episode can undergo. Mirrors `TrialRevisionPayload.revision`. */
declare const TRIAL_REVISION_KINDS: readonly ["started", "extended", "converted", "reverted", "expired", "revoked"];
type TrialRevisionKind = (typeof TRIAL_REVISION_KINDS)[number];
/**
 * Why an episode has no supported revision. Closed set — a caller rendering
 * "unknown" needs to say WHICH unknown, and a new one has to be declared here
 * rather than passed through as free text.
 */
declare const TRIAL_PENDING_UNKNOWN_REASONS: readonly ["no_authoritative_fact", "elapsed_deadline_without_fact", "episode_open", "usage_expiry_requires_exhaustion_evidence", "commitment_precedes_actual_end", "end_evidence_without_effective_time"];
type TrialPendingUnknownReason = (typeof TRIAL_PENDING_UNKNOWN_REASONS)[number];
/** A paid commitment, as bound to one episode by the producer. */
interface TrialCommitment {
    /** The commitment's own reference (a subscription id, an order id). */
    readonly ref: string;
    /** When the commitment began. */
    readonly started_at: string;
    /**
     * The episode this commitment is BOUND to, per the producer that holds the
     * binding. A commitment naming a different episode (or none) is not this
     * episode's conversion, however well the timing lines up.
     */
    readonly trial_episode_id: string | null;
}
/** One episode's facts, as the producer holds them. */
interface TrialEpisodeFacts {
    readonly trial_episode_id: string;
    readonly account_id: string;
    readonly subject_scope: 'account' | 'user';
    /** Time-bounded or consumption-bounded. Drives the exhaustion rule. */
    readonly limit_type: 'time' | 'usage';
    /** The fact that proves the episode was enrolled. Absent ⇒ nothing is known. */
    readonly enrollment: TrialEvidence | null;
    /** When the episode started, per the enrolling fact. */
    readonly started_at: string | null;
    /** The DECLARED end. Its passing proves only that the time passed. */
    readonly scheduled_end_at: string | null;
    /** The EVIDENCED end. Null until a fact closes the episode. */
    readonly actual_end_at: string | null;
    /** The fact that closed the episode. */
    readonly end_evidence: TrialEvidence | null;
    /** A fact extending the scheduled end while the episode is still open. */
    readonly extension: TrialEvidence | null;
    /** A fact withdrawing the trial before its end. Outranks everything. */
    readonly revocation: TrialEvidence | null;
    /** The commitment the producer bound to this episode, if any. */
    readonly commitment: TrialCommitment | null;
    /** Proof the app actually moved access back to the fallback target. */
    readonly fallback: TrialEvidence | null;
    /** Proof the metered allowance was exhausted (required for usage expiry). */
    readonly exhaustion: TrialEvidence | null;
    /**
     * How far the caller's observation reaches. Carried ONLY so the classifier
     * can distinguish "open" from "deadline elapsed, still unproven" — both of
     * which emit nothing. It can never produce a revision.
     */
    readonly observed_through?: string | null;
}
interface TrialRevisionResolved {
    readonly status: 'revision';
    readonly revision: TrialRevisionKind;
    /** When the revision took effect, per the proving fact. */
    readonly effective_at: string;
    readonly evidence: TrialEvidence;
    /** False for a user-subject episode (R-2): retained, but not account-wide. */
    readonly grants_account_access: boolean;
    /** The commitment this revision links, for a conversion only. */
    readonly commitment_ref: string | null;
}
interface TrialRevisionPending {
    readonly status: 'pending_unknown';
    readonly reason: TrialPendingUnknownReason;
    readonly grants_account_access: boolean;
}
type TrialRevisionClassification = TrialRevisionResolved | TrialRevisionPending;

/**
 * Entitlement schemas — Zod definitions for entitlements, rules, and rule variants.
 */

declare const UsageAllocationSchema: z.ZodEnum<{
    per_instance: "per_instance";
    account_pool: "account_pool";
    per_user: "per_user";
    per_user_pooled: "per_user_pooled";
}>;

/**
 * Trait namespace — allows multiple trait-contributing providers to register
 * under `traits:<namespace>` and merge into the unified traits bag.
 *
 * SDK built-ins: `'traits:trial'`, `'traits:usage'`.
 * Customers can register any namespace (e.g. `'traits:permissions'`,
 * `'traits:feature_flags'`).
 */
type TraitsNamespace = `traits:${string}`;
/**
 * Domain names recognized by the SDK provider registry.
 * Each domain maps to a specific decision-engine input primitive.
 *
 * The `traits` domain and any `traits:<namespace>` domain are merged
 * into a single `traits` slot in `ResolvedProviderContext`.
 */
type DomainProviderName = 'plan' | 'entitlements' | 'segments' | 'experiments' | 'content' | 'rules' | 'traits' | 'theme' | 'events' | 'cta' | 'trial' | TraitsNamespace;
/** Immutable inputs available while resolving a domain provider. */
interface DomainProviderResolutionInput {
    /** Current caller-supplied and trusted server-enriched context snapshot. */
    readonly userContext: Readonly<UserContextSnapshot>;
    /** Changes whenever identity or user context changes. */
    readonly contextRevision: string;
    /** Aborted when this resolution is no longer valid for the current identity. */
    readonly signal: AbortSignal;
}
/**
 * Base interface all domain providers implement.
 *
 * A domain provider supplies a named slice of the decision-engine's input:
 * current plan, entitlement state, user segments, marketing content, rules,
 * or custom traits.
 */
interface DomainProvider<D extends DomainProviderName = DomainProviderName, T = unknown> {
    /** Provider domain name — used as the registry key. */
    readonly domain: D;
    /**
     * Resolve the current value. Called before placement decisions.
     * May be async (e.g. reading from a database or API).
     */
    resolve(input?: DomainProviderResolutionInput): T | Promise<T>;
    /**
     * Optional: subscribe to changes (enables push-based invalidation).
     * Returns an unsubscribe function.
     */
    subscribe?(listener: (next: T) => void): () => void;
    /** Cache TTL in ms. 0 = re-resolve every call (default). */
    cacheTtlMs?: number;
    /** Customer-controlled revision used to invalidate cached provider output. */
    readonly providerRevision?: string | number;
}
interface PlanProviderState {
    /** Current authoritative purchased holdings, never purchase-event deltas. */
    addons?: PurchasedAddon[];
    /** Current plan handle (e.g. 'starter', 'professional', 'enterprise'). */
    currentPlanHandle: string;
    /** Display name (e.g. 'Professional'). */
    currentPlanName?: string;
    /** Formatted price string (e.g. '$49/mo'). */
    currentPlanPrice?: string;
    /** Active billing period. */
    billingPeriod?: 'monthly' | 'annual' | 'none';
    /** Whether a trial is currently active. */
    trialActive?: boolean;
    /**
     * Trial limit model — 'time' (duration-based) or 'usage'
     * (consumption-based). Drives which numeric fields the SDK
     * populates and which trial triggers the resolver matches.
     * Omit for non-trial users.
     */
    trialLimitType?: 'time' | 'usage';
    /**
     * Universal trial progress, 0..100. Computed by
     * `deriveLocalTrialStatusFromInstance`: elapsed/total days for
     * time-based; consumed/limit for usage-based. This is the
     * canonical field the placement-resolver's milestone supersession
     * + trial-trigger matcher consume — both `trial_progress` and
     * `trial_ending` derive from here.
     */
    trialProgressPercent?: number;
    /** Days remaining in trial (time-based). */
    trialDaysRemaining?: number;
    /** Total trial duration in days (time-based). */
    trialDaysTotal?: number;
    /** Trial state (customer-defined, e.g. 'active' | 'running_out' | 'expired' | 'converted'). */
    trialState?: string;
    /** Entitlement handle the trial is scoped to (usage-based). */
    trialUsageEntitlementHandle?: string;
    /** Current consumption of trialUsageEntitlementHandle (usage-based). */
    trialUsageConsumed?: number;
    /** Cap on the usage-scoped entitlement (usage-based). */
    trialUsageLimit?: number;
    /** Available plan handles the user could upgrade/downgrade to. */
    availablePlanHandles?: string[];
    /**
     * Billing-recovery signals, supplied on the user context. Drive the
     * Retention `qualifier` placement triggers (placement-studio-ui.md §3.7):
     * `payment_failed` fires on a hard payment failure, `payment_at_risk` on
     * an expiring / missing-backup payment method. Omitted for users in good
     * standing — a qualifier gate reads `=== true`, so an absent signal
     * correctly never fires the recovery placement.
     */
    paymentFailed?: boolean;
    paymentAtRisk?: boolean;
}
/** Supplies the user's current billing plan context. */
interface PlanProvider extends DomainProvider<'plan', PlanProviderState> {
    readonly domain: 'plan';
}
/** Allocation type determining usage aggregation boundary. */
type EntitlementAllocation = z.infer<typeof UsageAllocationSchema>;
/** A resolved entitlement grant at a specific hierarchy level. */
interface EntitlementGrant {
    entitlementId: string;
    /** Human-readable handle (e.g. 'api_calls', 'seats'). */
    entitlementHandle?: string;
    status: 'allowed' | 'limited' | 'denied';
    limit?: number;
    used?: number;
    allocation?: EntitlementAllocation;
    /** How the limit is enforced when exceeded. */
    enforcement?: 'hard_block' | 'block_with_upsell' | 'degrade' | 'allow_overage';
    /** How this grant was derived. */
    source?: 'rule' | 'user_context' | 'override';
    /** The plan that activated this rule-derived grant. */
    planId?: string;
    /** The segment that matched for this rule-derived grant. */
    segmentId?: string;
    /** The seat type that qualified this grant. */
    seatTypeId?: string;
    /** The entitlement rule id that produced this grant. */
    ruleId?: string;
}
/**
 * Entitlement grants at each level of the identity hierarchy.
 * Most-specific wins: user overrides instance overrides account.
 */
interface EntitlementGrantSet {
    account?: Record<string, EntitlementGrant>;
    instance?: Record<string, EntitlementGrant>;
    user?: Record<string, EntitlementGrant>;
}
interface EntitlementUsageEntry {
    used: number;
    limit: number;
    remaining: number;
    /** Unit label (e.g. 'minutes', 'seats', 'exports'). */
    unit?: string;
    /** Period (e.g. 'monthly', 'lifetime'). */
    period?: string;
    /** Date when usage resets (ISO 8601 date string). */
    reset_date?: string;
}
interface EntitlementProviderState {
    /**
     * D-61: `'playbook_default'` marks entries the static adapter fills with a
     * blanket default policy. Those are NOT app data and never override the
     * Playbook evaluation; entries from any other provider are app-mirrored
     * data and merge with it per the runtime's precedence.
     */
    origin?: 'playbook_default';
    /**
     * All entitlement results keyed by entitlement handle.
     * Each entry carries status ('allowed' | 'limited' | 'denied') so the
     * decision engine can gate placements.
     */
    entries: Record<string, EntitlementResult>;
    /** Usage counters by entitlement handle. */
    usage?: Record<string, EntitlementUsageEntry>;
    /**
     * Multi-level grants for account → instance → user hierarchy.
     * When present, use `resolveEffectiveEntitlements()` to merge.
     */
    grants?: EntitlementGrantSet;
    /**
     * The user's current tier per `capability_tier` entitlement handle
     * (plan 138 TASK-4). A user-context signal, surfaced here so the
     * `entitlement_gate.tier_threshold` placement trigger can rank the current
     * tier against the entitlement's ordered ladder. Absent → the user holds no
     * tier (ranks below every threshold).
     */
    tiers?: Record<string, string>;
}
/** Supplies feature access checks and usage state. */
interface EntitlementProvider extends DomainProvider<'entitlements', EntitlementProviderState> {
    readonly domain: 'entitlements';
}
interface SegmentProviderState {
    /** Materialized segment IDs the user belongs to. */
    segmentIds: string[];
    /** Optional human-readable slugs for convenience. */
    segmentSlugs?: string[];
}
/** Supplies user segment membership for targeting. */
interface SegmentProvider extends DomainProvider<'segments', SegmentProviderState> {
    readonly domain: 'segments';
}
/**
 * The user's experiment assignments, keyed by **experiment handle** with the
 * assigned **variant handle** as the value (plan 183).
 *
 * Handles on both sides, deliberately: a handle is the canonical, version-stable
 * identifier, which is what a `Segment.experiment_handle` match and an analytics
 * grouping must key on. The version id — which *definition* of the experiment
 * was live — travels separately in telemetry, never as the match key.
 *
 * A map because a user can be enrolled in several experiments at once. Absent or
 * empty means enrolled in nothing, which is distinct from "assigned to control".
 */
interface ExperimentProviderState {
    /** `{ [experimentHandle]: variantHandle }`. */
    assignments: Record<string, string>;
    /** Structured outcomes keyed by experiment handle, when supplied by the provider. */
    selections?: Record<string, ExperimentVariantSelection>;
}
/** Named reasons for a provider not returning an assignment. */
type ExperimentVariantNonAssignmentReason = 'not_enrolled' | 'provider_not_ready' | 'provider_unavailable' | 'provider_error' | 'timeout' | 'aborted' | 'unknown_variant' | 'invalid_handle' | 'mapping_missing' | 'provider_missing' | 'ownership_conflict' | 'assignment_conflict';
/**
 * Normalized result returned for one canonical experiment handle.
 * Missing and failed vendor values remain explicit and never become control.
 */
type ExperimentVariantSelection = {
    status: 'assigned';
    experimentHandle: string;
    variantHandle: string;
    providerHandle?: string;
    providerRevision?: string | number;
} | {
    status: 'not_assigned' | 'unavailable' | 'unsupported';
    experimentHandle: string;
    reason: ExperimentVariantNonAssignmentReason;
    providerHandle?: string;
    providerRevision?: string | number;
};
/** One immutable provider-resolution result shared by decisions and telemetry. */
interface EffectiveUserContextResolution {
    readonly userContext: Readonly<UserContextSnapshot>;
    readonly experimentSelections: Readonly<Record<string, ExperimentVariantSelection>>;
    readonly contextRevision: string;
}
/**
 * Supplies experiment enrollment and variant assignment.
 *
 * The binding declares whether RevTurbine manages the desired allocation or an
 * external provider is authoritative. Both modes satisfy this one interface,
 * so segment matching, decisions and telemetry never need to know which
 * produced a value.
 */
interface ExperimentAssignmentProvider extends DomainProvider<'experiments', ExperimentProviderState> {
    readonly domain: 'experiments';
    /** Stable diagnostic identifier; vendor credentials never belong here. */
    readonly providerHandle?: string;
    /** Canonical RevTurbine experiment handles this provider owns. */
    readonly ownedExperimentHandles?: readonly string[];
}
/** @deprecated Prefer `ExperimentAssignmentProvider`; retained as a type alias. */
type ExperimentProvider = ExperimentAssignmentProvider;
interface MessageBlockSnapshot {
    blockId: string;
    name: string;
    surfaceTemplateId?: string;
    defaultContent: Record<string, unknown>;
    segmentOverrides?: Array<{
        segmentId: string;
        content: Record<string, unknown>;
    }>;
    status: 'draft' | 'active' | 'archived';
}
interface PlacementPayloadSnapshot {
    payloadId: string;
    surfaceTemplateId: string;
    defaultMessageBlockId: string;
    segmentContentMap?: Array<{
        segmentId: string;
        messageBlockId: string;
        uiPathId?: string;
        promotionId?: string;
    }>;
    uiPathId?: string;
    promotionId?: string;
    status: 'draft' | 'active' | 'archived';
}
interface ContentProviderState {
    /** Message blocks keyed by block_id. */
    messageBlocks: Record<string, MessageBlockSnapshot>;
    /** Personalization token values for resolving `{{token}}` placeholders. */
    personalization: PersonalizationContext$1;
    /** Placement payloads keyed by surface_template_id (optional). */
    payloads?: Record<string, PlacementPayloadSnapshot>;
}
/** Supplies marketing content from the Content Studio. */
interface ContentProvider extends DomainProvider<'content', ContentProviderState> {
    readonly domain: 'content';
}
/** Mirrors `EntitlementRuleTargetKindSchema` (entitlements/models/schema). */
type EntitlementRuleTargetKind = 'plan' | 'plan_variation' | 'addon' | 'addon_variation';
/** One kind-discriminated targeting entry on an entitlement rule. */
interface EntitlementRuleTargetSnapshot {
    kind: EntitlementRuleTargetKind;
    id: string;
}
interface EntitlementRuleSnapshot {
    /** Resolved numeric allowance; separate from stored sentinel-bearing rule fields. */
    effectiveAllowance?: number;
    /** Rules participating in the resolved allowance, in deterministic source order. */
    contributingRuleHandles?: string[];
    ruleId: string;
    entitlementId: string;
    /**
     * Legacy plan-level fast path. Retained for back-compat; the evaluator
     * prefers `targets` (REQ-2) and falls back to `planIds` only when
     * `targets` is absent. Populated from RevTurbineConfig until plan 32
     * wires `targets` end-to-end (TASK-3b).
     */
    planIds: string[];
    /**
     * Kind-discriminated targeting (plan / plan_variation / addon /
     * addon_variation). When present, the evaluator matches on this instead
     * of `planIds` (plan 34 REQ-2). The data wiring from RevTurbineConfig is
     * plan 32 / TASK-3b; the matching logic + types land here (TASK-3a),
     * forward-compatible.
     */
    targets?: EntitlementRuleTargetSnapshot[];
    /**
     * Plan #39: segment scoping is multi-value with intra-dimension OR +
     * cross-dimension AND (spec §2.5). Empty array means "match all users."
     * Dimension lookup at evaluation time comes from
     * `RuleProviderState.segmentDimensions`; when missing for a given id,
     * the evaluator buckets it into a no-dim group (flat-OR back-compat
     * during the cascade).
     */
    segmentIds: string[];
    kind: 'feature' | 'capability_tier' | 'usage_limit' | 'usage_pricing' | 'usage_rate' | 'credits' | 'seat';
    /** Type-discriminated fields (feature: enabled, usage_limit: limit_value, etc.). */
    fields: Record<string, unknown>;
}
interface PlanRuleSnapshot {
    ruleId: string;
    parentPlanId: string;
    segmentId?: string;
    status: 'draft' | 'active' | 'paused' | 'archived';
    overrides?: {
        priceCents?: number;
        entitlements?: Array<{
            entitlementId: string;
            meters?: Array<{
                meterId: string;
                threshold?: number;
                unlimited?: boolean;
            }>;
        }>;
    };
}
interface RuleProviderState {
    /** Plan variation matching facts from the same Playbook as the rules. */
    planVariations?: Record<string, {
        planHandle: string;
        billingPeriod: string;
        segmentHandle?: string;
    }>;
    /** Purchased variation identity and cadence, independent of the base plan. */
    addonVariations?: Record<string, {
        addonHandle: string;
        billingPeriod: string;
    }>;
    /** Entitlement rules keyed by entitlement_id. */
    entitlementRules: Record<string, EntitlementRuleSnapshot[]>;
    /** Plan rules keyed by plan_id (optional). */
    planRules?: Record<string, PlanRuleSnapshot[]>;
    /**
     * Plan #39 REQ-28: segment_id → dimension_id lookup, populated from
     * `RevTurbineConfig.segments` (or the FB bundle's segments table) when
     * dimensions are known. Optional during the cascade — when missing,
     * the entitlement-rule evaluator falls back to flat-OR membership.
     */
    segmentDimensions?: Record<string, string>;
    /** Config version for cache busting. */
    configVersion: string;
}
/** Supplies entitlement rules and decision configuration. */
interface RuleProvider extends DomainProvider<'rules', RuleProviderState> {
    readonly domain: 'rules';
}
interface TraitsProviderState {
    /** Custom key-value traits for segmentation and personalization. */
    traits: Record<string, string | number | boolean>;
}
interface TraitsProvider<D extends 'traits' | TraitsNamespace = 'traits' | TraitsNamespace> extends DomainProvider<D, TraitsProviderState> {
    readonly domain: D;
}
interface TrialStatusTraits {
    trialStart: string;
    trialDuration: number;
    trialPlan: string;
    reverseToPlan: string;
    trialDaysRemaining: number;
    trialActive: boolean;
}
type TrialStatusProvider = TraitsProvider<'traits:trial'>;
interface UsageTraits {
    [key: string]: number;
}
type UsageTraitsProvider = TraitsProvider<'traits:usage'>;
/**
 * Supplies the app-owned trial-episode FACTS the SDK records (plan 276 R-1(b)).
 *
 * Distinct from `'traits:trial'`, and the distinction is the ruling: the traits
 * provider supplies trial *display state* for local decisions, while this one
 * supplies the *evidence* that a revision occurred. Trial execution and
 * ownership stay entirely with the customer app — the SDK never runs a trial,
 * never enrols one, and never decides that one ended. It records what this
 * provider states, and states nothing when no provider is registered.
 *
 * Its `resolve()` returns the episodes whose revisions are not yet recorded.
 * Returning an empty list is the normal steady state and is never a fault.
 */
interface TrialEvidenceProviderState {
    /**
     * Episodes with a revision the app wants recorded. The shape is the scaffold
     * `TrialEpisodeFacts` contract; the SDK classifies each with
     * `classifyTrialRevision` and emits `trial_revision` only for the ones whose
     * evidence supports a revision. A `pending_unknown` episode emits nothing.
     */
    episodes: readonly TrialEpisodeFacts[];
}
/** Supplies app-owned trial-episode evidence for `trial_revision` recording. */
interface TrialEvidenceProvider extends DomainProvider<'trial', TrialEvidenceProviderState> {
    readonly domain: 'trial';
}
interface ThemeProviderState {
    /** Partial theme overrides to deep-merge with SDK defaults/API theme. */
    overrides: RevTurbineThemeInput$1;
}
/** Supplies customer theme overrides for placement components. */
interface ThemeProvider extends DomainProvider<'theme', ThemeProviderState> {
    readonly domain: 'theme';
}
interface EventConsumer {
    /** Human-readable consumer name (for diagnostics). */
    readonly name: string;
    /** Handle a batch of event envelopes. */
    consume(events: RevTurbineEventEnvelope[]): void | Promise<void>;
}
interface EventConsumerProviderState {
    /** Registered event consumers. */
    consumers: EventConsumer[];
}
/** Supplies event consumers for SDK event fan-out. */
interface EventConsumerProvider extends DomainProvider<'events', EventConsumerProviderState> {
    readonly domain: 'events';
}
type CtaHandler = (uiPath: PlacementUiPath$1, placement: PlacementOutput) => boolean | void;
type CtaHandlerMap = Partial<Record<PlacementUiPath$1['type'], CtaHandler>>;
interface CtaHandlerProviderState {
    /** CTA handlers keyed by PlacementUiPath action type. */
    handlers: CtaHandlerMap;
}
/** Supplies CTA action handlers for placement interactions. */
interface CtaHandlerProvider extends DomainProvider<'cta', CtaHandlerProviderState> {
    readonly domain: 'cta';
}
/**
 * The merged, resolved output of all registered domain providers.
 *
 * The `traits` slot contains the **merged** output of all trait-contributing
 * providers (`'traits'`, `'traits:trial'`, `'traits:usage'`, and any
 * customer-registered `'traits:<namespace>'` providers).
 */
interface ResolvedProviderContext {
    plan?: PlanProviderState;
    entitlements?: EntitlementProviderState;
    segments?: SegmentProviderState;
    experiments?: ExperimentProviderState;
    content?: ContentProviderState;
    rules?: RuleProviderState;
    traits?: TraitsProviderState;
    theme?: ThemeProviderState;
    events?: EventConsumerProviderState;
    cta?: CtaHandlerProviderState;
    trial?: TrialEvidenceProviderState;
}
type AnyDomainProvider = PlanProvider | EntitlementProvider | SegmentProvider | ExperimentProvider | ContentProvider | RuleProvider | TraitsProvider | ThemeProvider | EventConsumerProvider | CtaHandlerProvider | TrialEvidenceProvider;
/**
 * Map a `DomainProviderName` to its resolved state type.
 */
type ResolvedDomainType<D extends DomainProviderName> = D extends keyof ResolvedProviderContext ? ResolvedProviderContext[D] : D extends TraitsNamespace ? TraitsProviderState : unknown;

/**
 * Manages registered domain providers and resolves their collective
 * state into a typed {@link ResolvedProviderContext}.
 *
 * Lifecycle:
 * 1. Providers are registered at SDK init time (or later via hooks).
 * 2. Before each placement decision, `resolveAll()` is called.
 * 3. Each provider's `resolve()` is invoked (or its cached value is reused
 *    if within `cacheTtlMs`).
 * 4. Subscriptions are wired automatically on register for push-based
 *    invalidation.
 */
declare class DomainProviderRegistry {
    private providers;
    private cache;
    private unsubscribers;
    /** Register a domain provider, replacing any existing for the same domain. */
    register(provider: AnyDomainProvider): void;
    /** Unregister a provider by domain name. */
    unregister(domain: DomainProviderName): void;
    /** Remove all providers, caches, and subscriptions. */
    clear(): void;
    /**
     * Resolve all registered providers into a single typed context.
     * Respects per-provider `cacheTtlMs`; stale entries are re-resolved.
     *
     * All trait-contributing providers (`'traits'` and `'traits:*'`) are
     * merged into a single `traits` slot. Later-resolved providers
     * override earlier ones for the same key.
     */
    resolveAll(input?: DomainProviderResolutionInput): Promise<ResolvedProviderContext>;
    /**
     * Return the raw resolved value for a single domain (cache-aware).
     */
    get<D extends DomainProviderName>(domain: D, input?: DomainProviderResolutionInput): Promise<ResolvedDomainType<D> | undefined>;
    /** Check whether a specific domain provider has been registered. */
    has(domain: DomainProviderName): boolean;
    /** Number of registered providers. */
    get size(): number;
    /** Invalidate a single domain cache entry. */
    invalidate(domain: DomainProviderName): void;
    /** Invalidate all cached values (forces re-resolve on next call). */
    invalidateAll(): void;
}

/**
 * Storage abstraction for the RevTurbine SDK core.
 *
 * Provides a pluggable interface that works in browser, server, and edge contexts.
 * Browser environments use `BrowserStorage` (in web-sdk).
 * Server environments can use `InMemoryStorage` or a custom `RevTurbineStorage` implementation.
 */
/**
 * Minimal storage interface matching the Web Storage API subset used by the SDK.
 *
 * Implementations:
 * - `InMemoryStorage` — in-process Map-backed (this file)
 * - `BrowserStorage` — wraps localStorage/sessionStorage (web-sdk)
 * - `DrizzleStateStore` — Postgres-backed via Drizzle (adapters/drizzle-state-store.ts)
 */
interface RevTurbineStorage {
    getItem(key: string): string | null;
    setItem(key: string, value: string): void;
    removeItem(key: string): void;
}
/**
 * In-memory storage backed by a `Map`.
 *
 * Used as the default on the server, edge, or when persistent storage
 * is unavailable. Data does not survive beyond the current process / request.
 */
declare class InMemoryStorage implements RevTurbineStorage {
    private readonly store;
    getItem(key: string): string | null;
    setItem(key: string, value: string): void;
    removeItem(key: string): void;
}

/**
 * InteractionTracker — manages dismissal and interaction suppression state.
 *
 * Isomorphic: works with any RevTurbineStorage backend (InMemoryStorage,
 * BrowserStorage, or a custom RevTurbineStorage).
 *
 * Extracted from customer-side.ts updateInteractionState / suppressionForState.
 */

interface InteractionTrackerOptions {
    storage: RevTurbineStorage;
    tenantId: string;
    userId: string;
    /** Default dismiss cooldown (ms). Default: 7 days (`cooldown_after_dismiss_days`). */
    defaultDismissCooldownMs?: number;
    /** Default remind-me-later delay (ms). Default: 1 hour. */
    defaultRemindLaterMs?: number;
}
declare class InteractionTracker {
    private readonly storage;
    private readonly tenantId;
    private readonly userId;
    private readonly defaultDismissCooldownMs;
    private readonly defaultRemindLaterMs;
    private readonly state;
    constructor(options: InteractionTrackerOptions);
    /** Track an interaction and update suppression state. */
    track(input: RevTurbineTreatmentInteractionInput): void;
    /** Check whether a placement is suppressed by a recent interaction. */
    checkSuppression(placementId: string, userId: string, treatmentId?: string, category?: string): SuppressionResult;
    /** Clear suppression state for a specific placement. */
    clearSuppression(placementId: string, userId: string, treatmentId?: string): void;
    /** Load state from storage. Called automatically on construction. */
    hydrate(): void;
    /** Persist current state to storage. */
    persist(): void;
    private storageKey;
    private stateKey;
}

/**
 * CapEnforcer — manages presentation cap and cooldown state.
 *
 * Isomorphic: works with any RevTurbineStorage backend (InMemoryStorage,
 * BrowserStorage, or a custom RevTurbineStorage).
 *
 * Extracted from customer-side.ts applyPlacementCapsIfNeeded /
 * extractPlacementCapPolicies / presentationCapsByKey.
 */

interface CapEnforcerOptions {
    storage: RevTurbineStorage;
    tenantId: string;
    userId: string;
}
declare class CapEnforcer {
    private readonly storage;
    private readonly tenantId;
    private readonly userId;
    private readonly capsByKey;
    constructor(options: CapEnforcerOptions);
    /**
     * Check whether a placement output is allowed by its cap policies.
     *
     * If allowed, records the presentation (adds seenAt + sets cooldown).
     * If denied, returns the suppression reason.
     */
    enforce(output: PlacementOutput): CapEnforcementResult;
    hydrate(): void;
    persist(): void;
    private storageKey;
    private capKey;
    private extractPolicies;
}

/**
 * Decision engine types — inputs, outputs, and configuration.
 */

interface DecisionEngineOptions {
    /** Enable presentation cap enforcement. Default: true. */
    enableCapsEnforcement?: boolean;
    /** Enable category pipeline for local-mode priority ordering. Default: false. */
    enableCategoryPipelineLocalMode?: boolean;
    /** Default entitlement policy when no provider or entry found. Default: 'deny' (fail closed, D-61). */
    defaultEntitlementPolicy?: 'allow' | 'deny';
}
interface EntitlementCheckResult {
    status: 'allowed' | 'limited' | 'denied';
    allowed: boolean;
    reason?: string;
    limit?: number;
    used?: number;
    remaining?: number;
    tier?: string;
    /**
     * The `unique_handle` of the entitlement rule this verdict came from — the
     * one the §2.6.5 most-permissive selection picked (BL-0062, worksheet gap
     * G3).
     *
     * Both evaluators select a winning rule and, before this, threw its
     * identity away: the Playbook path in
     * `entitlements/controllers/entitlement-check.ts` and the provider-snapshot
     * path in `decisions/controllers/engine.ts`. Carrying it here is what lets
     * an SDK stamp `rule_handle` on the gate event it emits, which is what the
     * analytics rule slice and the attribution keys in the metric-primitives
     * worked example (§3) are keyed on.
     *
     * Absent means no rule produced this verdict — an unknown handle, a
     * missing plan identity, or a default-policy outcome — never "unknown
     * rule".
     */
    rule_handle?: string;
}
interface EvaluationContext {
    /** Resolved provider state. */
    providers: ResolvedProviderContext;
    /** Evaluated segment IDs. */
    segmentIds: string[];
    /** User traits. */
    traits: Record<string, string | number | boolean>;
    /** Current plan handle. */
    planHandle?: string;
}

/**
 * DecisionEngine — isomorphic placement decision pipeline.
 *
 * Runs the full decision flow:
 *   1. Resolve domain providers (DomainProviderRegistry)
 *   2. Evaluate segments
 *   3. Match entitlement rules
 *   4. Resolve placement (local resolver or pre-resolved output)
 *   5. Apply category-aware interaction suppression (InteractionTracker)
 *   6. Enforce presentation caps (CapEnforcer)
 *   7. Return decision
 *
 * Works on edge, server, and client — no browser APIs.
 */

interface DecisionEngineConfig {
    /** Provider registry for resolving domain data. */
    registry: DomainProviderRegistry;
    /** Interaction tracker for dismissal/cooldown suppression. */
    interactionTracker?: InteractionTracker;
    /** Cap enforcer for presentation frequency limits. */
    capEnforcer?: CapEnforcer;
    /** Behavior flags. */
    options?: DecisionEngineOptions;
    /** Registered placements (for local resolver lookup). */
    placements?: Map<string, RevTurbinePlacementRecord>;
    /** Placement resolver — resolves placement decisions from a data source. */
    placementResolver?: PlacementResolver;
}
declare class DecisionEngine {
    private readonly registry;
    private readonly interactionTracker?;
    private readonly capEnforcer?;
    private readonly options;
    private readonly placements;
    private readonly placementResolver?;
    constructor(config: DecisionEngineConfig);
    /**
     * Evaluate a single placement decision.
     *
     * Full pipeline: provider resolution → segment evaluation → local resolver →
     * category-aware suppression → cap enforcement → decision.
     */
    evaluate(input: RevTurbinePlacementDecisionInput): Promise<RevTurbinePlacementDecision>;
    /**
     * Evaluate multiple placement decisions in parallel.
     */
    evaluateBatch(inputs: RevTurbinePlacementDecisionInput[]): Promise<RevTurbinePlacementDecision[]>;
    /**
     * Check entitlement access for a given handle.
     *
     * Uses the entitlements provider and rules provider from the registry
     * to determine access status.
     */
    checkEntitlement(handle: string, context?: RevTurbineEntitlementContext): Promise<EntitlementCheckResult>;
    /**
     * Track a treatment interaction (delegates to InteractionTracker).
     */
    trackInteraction(input: RevTurbineTreatmentInteractionInput): void;
    /**
     * Get the resolved provider context (useful for external callers).
     */
    resolveProviders(): Promise<ResolvedProviderContext>;
    private deriveEntitlementResult;
}

/**
 * Impression history types.
 *
 * Tracks placement impressions and interactions (dismiss, click-through,
 * conversion, suppress) for analytics and dismiss / bare click / system
 * suppression windows. Conversion does not change placement eligibility.
 */
/**
 * Interaction outcomes tracked by the impression history system.
 *
 * - `'impressed'`     — the placement was shown to the user.
 * - `'dismissed'`     — user explicitly closed the placement ("No thanks").
 *   Time-boxed: the placement re-shows after the dismiss cooldown
 *   (`cooldown_after_dismiss_days`, default 7d). Spec: placement-studio-ui.md §
 *   "Cooldown After Dismiss". NOT permanent.
 * - `'clicked_thru'`  — user clicked the CTA but did **not** confirm completion
 *   (e.g. abandoned checkout). Time-boxed like a dismiss — they may return.
 * - `'cta_completed'` — confirmed conversion analytics. Current targeting
 *   determines whether the placement remains applicable.
 * - `'suppressed'`    — system or admin suppressed the placement (time-based).
 *
 * Plan 254 supersedes plan 167's conversion retirement policy.
 */
type ImpressionOutcome = 'impressed' | 'dismissed' | 'clicked_thru' | 'cta_completed' | 'suppressed';
/**
 * A single impression/interaction history record.
 */
interface ImpressionRecord {
    /** Placement config ID (e.g. `'pl_gate_export'`). */
    placementId: string;
    /** Payload ID that was rendered, if available. */
    payloadId?: string;
    /** Surface template that was rendered (e.g. `'modal_overlay'`). */
    surfaceTemplateId?: string;
    /** What happened. */
    outcome: ImpressionOutcome;
    /** ISO-8601 timestamp of when the interaction occurred. */
    occurredAt: string;
    /** Arbitrary metadata (CTA type, surface slot ID, etc.). */
    metadata?: Record<string, unknown>;
}
interface ImpressionQuery {
    /** Filter by placement ID(s). */
    placementIds?: string[];
    /** Filter by outcome(s). */
    outcomes?: ImpressionOutcome[];
    /** Only records after this ISO timestamp. */
    since?: string;
}
/**
 * Pluggable persistence backend for impression history.
 *
 * Implementations:
 * - `InMemoryImpressionStore`   — ephemeral, in-process (default).
 * - `StorageImpressionStore`    — backed by RevTurbineStorage (localStorage/session).
 * - `DrizzleImpressionStore`    — Postgres table via Drizzle.
 * - Custom: any object conforming to this interface.
 */
interface ImpressionHistoryStore {
    /** Append a record. */
    append(userId: string, record: ImpressionRecord): void | Promise<void>;
    /**
     * Query records for a user.
     * Returns records matching the query, most recent first.
     */
    query(userId: string, query?: ImpressionQuery): ImpressionRecord[] | Promise<ImpressionRecord[]>;
    /**
     * @deprecated Conversion no longer retires placements. Built-in stores return
     * an empty set; the resolver does not consult custom retirement indexes.
     */
    getRetiredPlacementIds(userId: string): Set<string> | Promise<Set<string>>;
    /**
     * Return a map of placement IDs → `suppressUntil` ISO timestamps
     * for placements with an active cooldown window — i.e. any record
     * (`dismissed`, `clicked_thru`, or `suppressed`) carrying a future
     * `suppressUntil`.
     */
    getSuppressedPlacements(userId: string): Map<string, string> | Promise<Map<string, string>>;
    /** Remove all records for a user. */
    clear(userId: string): void | Promise<void>;
}

/**
 * ImpressionHistory — records and queries placement impression/interaction history.
 *
 * Wraps an ImpressionHistoryStore backend and provides a clean API for:
 * - Recording impressions and interactions, including conversion analytics.
 * - Checking active dismissal and suppression windows.
 * - Querying full history for debugging / analytics.
 *
 * Isomorphic: works with any store backend (in-memory, localStorage, Postgres).
 */

interface ImpressionHistoryOptions {
    /** Persistence backend. */
    store: ImpressionHistoryStore;
    /** Current user ID. */
    userId: string;
    /** Default suppression duration in milliseconds. Default: 24 h. */
    defaultSuppressionMs?: number;
    /**
     * Default dismiss cooldown in milliseconds — applied to `dismissed` and bare
     * `clicked_thru` outcomes when no explicit window is supplied. Default: 7 days
     * (mirrors `cooldown_after_dismiss_days`).
     */
    defaultDismissCooldownMs?: number;
}
declare class ImpressionHistory {
    private readonly store;
    private userId;
    private readonly defaultSuppressionMs;
    private readonly defaultDismissCooldownMs;
    /**
     * Hot cache of time-suppressed placement IDs → suppressUntil ISO timestamp.
     * Covers dismiss / bare-click cooldowns and system suppressions.
     */
    private suppressedCache;
    /** Derived from existing explicit suppression records; never persisted separately. */
    private explicitSuppressedCache;
    constructor(options: ImpressionHistoryOptions);
    /**
     * Record an impression — the placement was shown to the user.
     */
    recordImpression(placementId: string, payloadId?: string, surfaceTemplateId?: string, metadata?: Record<string, unknown>): Promise<void>;
    /**
     * Record a dismissal — the user explicitly closed the placement ("No thanks").
     * Time-boxed: the placement is hidden for a cooldown window and re-shows once
     * it elapses (plan 167, Q-1; spec placement-studio-ui.md:311). NOT permanent.
     *
     * @param cooldownMs — cooldown window in ms. Falls back to
     *   `defaultDismissCooldownMs` (7 days). The SDK resolves this from the
     *   placement's `cooldown_after_dismiss_days`.
     */
    recordDismissal(placementId: string, payloadId?: string, surfaceTemplateId?: string, metadata?: Record<string, unknown>, cooldownMs?: number): Promise<void>;
    /**
     * Record a bare click-through — the user clicked the CTA but did **not**
     * confirm the conversion (e.g. abandoned checkout). Treated as a cooldown,
     * identical to a dismiss — they may return (plan 167, Q-1). For a confirmed
     * conversion use {@link recordConversion} instead.
     *
     * @param cooldownMs — cooldown window in ms. Falls back to
     *   `defaultDismissCooldownMs` (7 days).
     */
    recordClickThru(placementId: string, payloadId?: string, surfaceTemplateId?: string, metadata?: Record<string, unknown>, cooldownMs?: number): Promise<void>;
    /**
     * Record a confirmed conversion — the user completed the CTA action.
     * Analytics only: current targeting determines future eligibility (plan 254).
     */
    recordConversion(placementId: string, payloadId?: string, surfaceTemplateId?: string, metadata?: Record<string, unknown>): Promise<void>;
    /**
     * Record a suppression — the system or admin suppressed the placement.
     * The placement is hidden for a configurable duration (not permanent).
     *
     * @param durationMs — suppression window in ms. Falls back to `defaultSuppressionMs`.
     */
    recordSuppression(placementId: string, payloadId?: string, surfaceTemplateId?: string, metadata?: Record<string, unknown>, durationMs?: number): Promise<void>;
    /**
     * @deprecated Placements are no longer retired by conversion. Always false.
     */
    isRetired(placementId: string): Promise<boolean>;
    /**
     * @deprecated Placements are no longer retired by conversion. Always empty.
     */
    getRetiredIds(): Promise<Set<string>>;
    /**
     * @deprecated Placements are no longer retired by conversion. Always false.
     */
    isRetiredSync(placementId: string): boolean;
    /**
     * Synchronous check for time-based suppression.
     * Returns `true` if the placement is within its suppression window.
     */
    isSuppressedSync(placementId: string): boolean;
    /**
     * Synchronous check: placement is within an active suppression window.
     */
    isHiddenSync(placementId: string, category?: string): boolean;
    /**
     * Query full history (for debugging, analytics, or inspector panels).
     */
    queryHistory(query?: ImpressionQuery): Promise<ImpressionRecord[]>;
    /**
     * Pre-warm the suppression cache from the store.
     * Call during SDK initialization for synchronous access.
     */
    hydrate(): Promise<void>;
    /**
     * Clear all impression history for this user.
     */
    reset(): Promise<void>;
    /**
     * Switch user identity — clears caches and points at a new user.
     */
    setUserId(userId: string): void;
    private appendRecord;
    private suppressInCache;
}

/**
 * Local placement resolver — unified factory that runs ENTIRELY
 * client-side / in-process (no remote server in the loop) against a
 * JSON RevTurbineConfig (static SDK init, /api/config/import payload,
 * the delivered canonical-JSON payload artifact, demo fixtures).
 *
 * Candidate-build feeds a shared pipeline — slot-metadata narrowing,
 * impression-history filtering, trial-trigger gating, milestone
 * supersession, plan eligibility, usage enrichment, token
 * interpolation, output assembly. (The FlatBuffer bundle arm was
 * retired by plan 177; the Playbook JSON is the only wire format.)
 *
 * Backward-compat: `createStaticPlacementResolver` remains available
 * as a thin wrapper around `createLocalPlacementResolver`.
 */

interface LocalPlacementDataset {
    placements: LocalPlacementEntry[];
}
type LocalPlacementEntry = NonNullable<RevTurbineConfig['placements']>[number];
type LocalPlacementPayload = LocalPlacementEntry['payloads'][number];
type LocalPlacementSurface = LocalPlacementPayload['surfaces'][number];
/** Backward-compat JSON entry point, minus the Playbook. */
interface StaticPlacementResolverOptionsBase {
    placements: LocalPlacementDataset;
    impressionHistory?: ImpressionHistory;
    candidateGate?: PlacementCandidateGate;
}
/**
 * Presentation-policy gate consulted BEFORE the pick (D-59, 2026-10-06):
 * a candidate that would breach a cap is skipped and the next-ranked
 * candidate is considered, per placement-prioritization.md §1 stage 4.
 * The browser SDK supplies it (cap state lives there); server ports have
 * no presentation state and omit it. Must not mutate state — the caller
 * records the presentation after the decision.
 */
type PlacementCandidateGate = (output: PlacementOutput, context: {
    slotId?: string;
}) => {
    allowed: true;
} | {
    allowed: false;
    reason: string;
};
/**
 * Options for {@link createStaticPlacementResolver}.
 *
 * The Playbook is supplied as `playbook`; `exportedConfig` is a deprecated
 * alias removed in the minor after the SDK 0.11.0 cascade (BL-0156).
 */
type StaticPlacementResolverOptions = StaticPlacementResolverOptionsBase & PlaybookOption;
/**
 * Backward-compat JSON entry. Thin wrapper around the unified
 * `createLocalPlacementResolver`. Use the unified factory directly
 * in new code; this wrapper exists so existing SDK consumers don't
 * need a coordinated migration.
 */
declare function createStaticPlacementResolver(options: StaticPlacementResolverOptions): PlacementResolver;

/**
 * Payload resolution — content lookup and personalization token application.
 *
 * Moved from web-sdk/placements/payload-resolution.ts for isomorphic use.
 */

interface ResolvedPayload {
    payload: ContentPlacementPayload;
    messageBlock: MessageBlock;
    resolvedContent: ResolvedContent$1;
    matchedSegmentId?: string;
    uiPathId?: string;
    promotionId?: string;
    uiPath?: ContentUiPath;
    promotion?: ContentPromotion;
}
interface PlacementContentLookupProvider {
    listPayloads(surfaceTemplateId: string): ContentPlacementPayload[] | Promise<ContentPlacementPayload[]>;
    getMessageBlockById(blockId: string): MessageBlock | null | undefined | Promise<MessageBlock | null | undefined>;
    getUiPathById?(uiPathId: string): ContentUiPath | null | undefined | Promise<ContentUiPath | null | undefined>;
    getPromotionById?(promotionId: string): ContentPromotion | null | undefined | Promise<ContentPromotion | null | undefined>;
    listPersonalizationTokens?(): RevTurbineConfigPersonalizationTokensItem[] | Promise<RevTurbineConfigPersonalizationTokensItem[]>;
}
declare function createStaticPlacementContentLookupProvider(input: {
    payloads?: ContentPlacementPayload[];
    messageBlocks?: MessageBlock[];
    uiPaths?: ContentUiPath[];
    promotions?: ContentPromotion[];
    tokens?: RevTurbineConfigPersonalizationTokensItem[];
}): PlacementContentLookupProvider;
declare function applyValueMaps(context: PersonalizationContext$1, tokens: RevTurbineConfigPersonalizationTokensItem[]): PersonalizationContext$1;
interface PayloadResolutionOptions {
    /**
     * When provided, enables cross-dimension AND logic for segment matching.
     * Map of dimension name → segment IDs belonging to that dimension.
     * Intra-dimension: OR (any segment matches). Cross-dimension: AND (all dimensions must match).
     */
    segmentDimensions?: Record<string, string[]>;
}
declare function resolvePayloadForUser(surfaceTemplateId: string, userContext: UserTargetingContext, payloads: ContentPlacementPayload[], blocks: MessageBlock[], tokens: RevTurbineConfigPersonalizationTokensItem[], personalization: PersonalizationContext$1, options?: PayloadResolutionOptions): ResolvedPayload | null;
declare function resolvePayloadForUserWithProvider(surfaceTemplateId: string, userContext: UserTargetingContext, provider: PlacementContentLookupProvider, personalization: PersonalizationContext$1, explicitTokens?: RevTurbineConfigPersonalizationTokensItem[]): Promise<ResolvedPayload | null>;

/**
 * Segment evaluation — predicate-based segment membership resolution.
 *
 * Segments are composed of predicates that target traits on a user
 * context/profile. A segment matches when ALL of its predicates are
 * satisfied (AND logic).
 *
 * Supported predicate operators:
 *   - `eq`       — string equality
 *   - `neq`      — string inequality
 *   - `gt/lt/gte/lte` — numeric comparison
 *   - `contains` — substring / list-item match
 *   - `in`       — trait value appears in comma-separated accepted list
 */

/**
 * Flat key-value traits record used for segment predicate evaluation.
 */
type Trait = Record<string, string | number | boolean>;
/**
 * A user's experiment assignments as resolved by an `ExperimentProvider`
 * (plan 183): `{ [experimentHandle]: variantHandle }`.
 *
 * Handles on both sides — canonical and version-stable, so an experiment edit
 * mints a new version without breaking a segment's reference.
 */
type ExperimentAssignments = Record<string, string>;
/**
 * Evaluate segment definitions against a user's traits.
 *
 * Returns the IDs of every segment whose predicates ALL match (AND logic).
 * Segments with no predicates are skipped.
 */
declare function evaluateSegments(segments: RevTurbineConfigSegmentsItem[], traits: Trait, assignments?: ExperimentAssignments): string[];
/**
 * Result of evaluating a single segment predicate with diagnostic detail.
 */
interface PredicateEvaluationResult {
    field: string;
    operator: string;
    expected: string;
    actual: string | number | boolean | null;
    matched: boolean;
}

/**
 * Trial-status derivation — pure helpers that translate the persisted
 * trial schemas (TrialInstance + FreeTrialRule / ReverseTrialRule) into
 * the transient runtime shape (UserTrialStatus) the SDK consumes via
 * the decision API + PlanProvider.
 *
 * Both trial modes converge through `UserTrialStatus.progress_percent`:
 *
 *   - time-based: progress_percent = elapsed_days / total_days * 100
 *   - usage-based: progress_percent = usage_consumed / usage_limit * 100
 *
 * Downstream rule modules + the placement-resolver supersession read
 * `progress_percent` rather than branching on the limit type. The
 * resolver only branches when matching `trial_ending(days_before_end)`,
 * which is time-specific by spec.
 *
 * These functions are deliberately PURE — no I/O, no `Date.now()` —
 * because they need to behave identically server-side (when the web
 * app builds a ServerEvaluationPayload) and client-side (when the SDK
 * runs in static mode against a bundled config + a trial-instance
 * snapshot). The caller supplies `nowIso` explicitly.
 *
 * Plan 43 audit follow-up — closes the gap surfaced when reviewing
 * PR #70/#71: scaffold had the data models but no canonical place to
 * do the server/SDK shared derivation. SDK was implicitly expected
 * to reimplement; now it can `import { deriveLocalTrialStatusFromInstance }
 * from '@revt-eng/core'`.
 */

/**
 * The Playbook (`RevTurbineConfig`) view of a free / reverse trial rule —
 * the `IdField`-plus-core-fields shapes carried in
 * `RevTurbineConfig.free_trial_rules` / `reverse_trial_rules`. Each is a
 * structural subset of the persisted `FreeTrialRule` / `ReverseTrialRule`
 * that still carries every field the derivation below reads (`id`,
 * `plan_id` / `premium_plan_id`, `usage_entitlement_handle`,
 * `usage_limit_value`, `entitlements_during_trial`). `evaluateTrialStatus`
 * resolves an instance's matching rule from these config arrays.
 */
type ConfigFreeTrialRule = NonNullable<RevTurbineConfig['free_trial_rules']>[number];
type ConfigReverseTrialRule = NonNullable<RevTurbineConfig['reverse_trial_rules']>[number];
/** A free trial rule in either persisted or Playbook-config form. */
type FreeTrialRuleLike = FreeTrialRule | ConfigFreeTrialRule;
/** A reverse trial rule in either persisted or Playbook-config form. */
type ReverseTrialRuleLike = ReverseTrialRule | ConfigReverseTrialRule;
interface DeriveTrialStatusInput {
    /** The persisted trial instance for this customer. */
    instance: TrialInstance;
    /**
     * The matching rule for this instance. For usage-based trials this
     * is required (we need `usage_entitlement_handle` + `usage_limit_value`).
     * For time-based trials this is optional — `trial_type` and
     * `plan_handle` are derived from it when present. Accepts either the
     * persisted rule or its Playbook-config view (both carry the fields
     * read here).
     */
    rule?: FreeTrialRuleLike | ReverseTrialRuleLike;
    /**
     * Current time as an ISO 8601 string. Pure-function contract — the
     * caller is responsible for providing this; the helper never calls
     * `Date.now()` directly so server + SDK can run deterministically
     * against the same instant.
     */
    nowIso: string;
    /**
     * For reverse trials, the plan handle the user is currently on
     * (the BASE plan they revert to). When provided, surfaces as
     * `plan_handle` on the result so PlanProvider hydration can
     * distinguish base vs granted plans. Optional.
     */
    basePlanHandle?: string;
    /**
     * Map of entitlement handle → current consumed amount. Used for
     * usage-based trials to derive `usage_consumed` /
     * `progress_percent`. Required when the instance is usage-based;
     * ignored when time-based. If the trial's entitlement handle isn't
     * in the map, consumption defaults to 0.
     */
    usageBalances?: Record<string, number>;
}
/**
 * Derive the runtime-facing UserTrialStatus from a persisted
 * TrialInstance + matching rule + current time (+ usage balances for
 * usage-based trials). Pure; deterministic; safe to call from both
 * server and SDK.
 *
 * Returns `undefined` when the instance is not yet started, the
 * persisted status is `not_started`, or a usage-based trial is
 * missing its limit snapshot. Otherwise computes:
 *   - in_trial: status='active' AND bounds not crossed
 *   - state: persisted status with lazy 'expired' override + derived 'running_out'
 *   - trial_limit_type: from instance snapshot
 *   - progress_percent: 0..100 universal across modes
 *   - day_number / days_remaining: populated when time-based
 *   - usage_consumed / usage_remaining / usage_limit: populated when usage-based
 *   - trial_type: 'free' or 'reverse' (from instance.rule_type)
 *   - plan_handle: base plan for reverse trials, trial plan for free
 */
declare function deriveLocalTrialStatusFromInstance(input: DeriveTrialStatusInput): UserTrialStatus | undefined;
/**
 * Find the customer's currently-applicable trial instance from a
 * list. Returns the instance with the latest `started_at` whose
 * derived status is 'active' or 'converted' (so trial_converted
 * placements can fire briefly post-conversion); 'expired' /
 * 'cancelled' instances are skipped.
 *
 * For usage-based instances the lazy-expiry check requires
 * `usageBalances` — caller passes it so a usage-exhausted instance
 * is skipped here too. Without `usageBalances`, usage-based
 * instances are matched only by persisted status.
 */
declare function findActiveTrialInstance(instances: readonly TrialInstance[], nowIso: string, usageBalances?: Record<string, number>): TrialInstance | undefined;
/**
 * For a customer on an active reverse trial, derive the entitlement-
 * check inputs that close plan 43 TASK-2. The result is what the
 * caller passes to `EntitlementCheckInput.trialGrantedEntitlementHandles`
 * + `effectivePlanHandle`.
 *
 * Returns `null` when:
 *   - the instance is not a reverse trial (free trials grant
 *     entitlements via the trial plan switch instead)
 *   - the instance doesn't reference the supplied rule
 *   - the rule's `entitlements_during_trial[]` is empty
 */
declare function deriveReverseTrialGrants(instance: TrialInstance, rule: ReverseTrialRuleLike): {
    trialGrantedEntitlementHandles: ReadonlySet<string>;
    effectivePlanHandle: string;
} | null;
/**
 * Pick the customer's most-relevant trial instance for runtime status
 * derivation: the latest-started row (that has already started by
 * `nowIso`) whose persisted status is `active`, `expired`, or
 * `converted`.
 *
 * Unlike {@link findActiveTrialInstance}, this deliberately KEEPS
 * expired-by-bounds and converted rows — `deriveLocalTrialStatusFromInstance`
 * computes the correct `state` ('expired' / 'converted') from them, and
 * `trial_ended` / `trial_converted` placements need that status to fire.
 * `not_started` and `cancelled` instances are dropped (they surface no
 * trial). Future-dated instances (`started_at > nowIso`) are skipped so
 * they can't shadow a currently-relevant one.
 *
 * Pure; deterministic (caller supplies `nowIso`).
 */
declare function findLatestStartedTrialInstance(instances: readonly TrialInstance[], nowIso: string): TrialInstance | undefined;
/**
 * Input to {@link evaluateTrialStatus} — the Playbook's trial-rule arrays
 * (`RevTurbineConfig.free_trial_rules` / `reverse_trial_rules`) plus the
 * customer's own {@link TrialInstance} records.
 */
interface EvaluateTrialStatusInput {
    /**
     * The tenant's free trial rules, straight off the Playbook
     * (`RevTurbineConfig.free_trial_rules`). Optional — omit when the
     * tenant configures no free trials.
     */
    freeTrialRules?: readonly FreeTrialRuleLike[];
    /**
     * The tenant's reverse trial rules
     * (`RevTurbineConfig.reverse_trial_rules`). Optional.
     */
    reverseTrialRules?: readonly ReverseTrialRuleLike[];
    /**
     * The customer's persisted trial instances (per-user state). The
     * active one is selected via {@link findActiveTrialInstance}; its
     * matching rule is resolved from the arrays above by
     * `instance.rule_id`.
     */
    instances: readonly TrialInstance[];
    /**
     * Current time as an ISO 8601 string. Pure-function contract — the
     * caller supplies it so server + SDK evaluate against the same
     * instant (this helper never calls `Date.now()`).
     */
    nowIso: string;
    /** Entitlement handle → consumed amount, for usage-based trials. */
    usageBalances?: Record<string, number>;
    /**
     * For reverse trials, the plan handle the user is currently on (the
     * BASE plan they revert to). Surfaces as `plan_handle` on the result.
     */
    basePlanHandle?: string;
}
/** Result of {@link evaluateTrialStatus}. */
interface EvaluateTrialStatusResult {
    /**
     * The derived runtime trial status to push into
     * `UserContext.trial` / `UserTrialStatus`, or `undefined` when no
     * active trial applies (no active instance, or a malformed one).
     */
    trial: UserTrialStatus | undefined;
    /**
     * Reverse-trial entitlement-grant inputs (plan 43 TASK-2) — what the
     * caller feeds to `EntitlementCheckInput.trialGrantedEntitlementHandles`
     * + `effectivePlanHandle`. `null` unless the active instance is a
     * reverse trial whose matched rule grants entitlements.
     */
    reverseGrants: {
        trialGrantedEntitlementHandles: ReadonlySet<string>;
        effectivePlanHandle: string;
    } | null;
}
/**
 * Evaluate a tenant's `free_trial_rules` / `reverse_trial_rules`
 * (as carried in the Playbook / `RevTurbineConfig`) against a
 * customer's trial instances, and derive the runtime `UserTrialStatus`
 * — the config-driven entry point the SDK uses to push trial state
 * into the user context.
 *
 * This is the counterpart of {@link deriveLocalTrialStatusFromInstance}
 * that resolves the matching rule *from the config arrays* (by
 * `instance.rule_id` + `instance.rule_type`) rather than requiring the
 * caller to supply it. It composes the existing pure helpers:
 *   1. {@link findActiveTrialInstance} picks the active instance.
 *   2. The instance's rule is looked up in the appropriate array.
 *   3. {@link deriveLocalTrialStatusFromInstance} derives the status.
 *   4. For reverse trials, {@link deriveReverseTrialGrants} produces the
 *      entitlement-grant inputs.
 *
 * Pure + deterministic (the caller supplies `nowIso`), so the TS core
 * and the language ports (server-python, …) decide identically.
 * Returns `{ trial: undefined, reverseGrants: null }` when no active
 * trial instance applies.
 */
declare function evaluateTrialStatus(input: EvaluateTrialStatusInput): EvaluateTrialStatusResult;

/**
 * Runtime environment detection for the RevTurbine SDK core.
 *
 * These helpers allow the SDK to adapt behavior based on whether
 * it is running in a browser or server (Node.js / edge / SSR) context.
 */
/** Returns `true` when running in a server-side environment (Node.js, edge, SSR, etc.). */
declare function isServer(): boolean;
/** Returns `true` when running in a browser environment. */
declare function isBrowser(): boolean;

/**
 * Adapter types — shared configuration interfaces for data source adapters.
 *
 * Core defines interfaces only. Infrastructure-specific implementations
 * (Drizzle/Postgres, Redis, browser storage) live in consuming repos.
 */

/** Base options common to all adapters. */
interface AdapterBaseOptions {
    /** Per-provider cache TTL in ms. 0 = re-resolve every call. */
    cacheTtlMs?: number;
}

/**
 * Static adapter — creates domain providers from an RevTurbineConfig snapshot.
 *
 * Works everywhere: edge, server, client. No network calls, no database access.
 * Ideal for:
 * - Edge functions receiving config from a KV store
 * - Server-side rendering with a pre-fetched config
 * - Client-side after hydration from server
 * - Local development / testing
 */

interface StaticAdapterOptions extends AdapterBaseOptions {
    /** The RevTurbineConfig snapshot to build providers from. */
    config: RevTurbineConfig;
    /** Current plan handle for the user. */
    planHandle?: string;
    /** Current plan name for the user. */
    planName?: string;
    /** Usage overrides by entitlement handle. */
    usage?: Record<string, {
        used: number;
        limit: number;
    }>;
    /** Default entitlement policy. Default: 'allow'. */
    defaultEntitlementPolicy?: 'allow' | 'deny';
    /**
     * Billing-recovery signals from the user context, surfaced onto the
     * PlanProvider state for the Retention `qualifier` triggers (§3.7).
     * Omit for users in good standing.
     */
    paymentFailed?: boolean;
    paymentAtRisk?: boolean;
    /**
     * The user's current tier per `capability_tier` entitlement handle,
     * surfaced onto the EntitlementProvider state for the
     * `entitlement_gate.tier_threshold` gate (plan 138 TASK-4). Omit for users
     * holding no tier.
     */
    tiers?: Record<string, string>;
    /**
     * Tenant-authored segment handles the app already resolved for this user
     * (BL-0369). Reported as members verbatim, ahead of any evaluated
     * membership. Omit when the app resolves none.
     */
    segmentIds?: string[];
    /**
     * The user context segment membership is evaluated from (BL-0369). Every
     * configured segment's predicates run against
     * `buildTargetingState(userContext).segmentTraits` — which is where the
     * reserved `rt_<dimension>` traits the generated built-in segments match on
     * come from (`builtin_dimensions`, plan 279 PD-3) — with
     * `userContext.experiments` as the enrollment map. Omit it and no segment is
     * evaluated: membership is `segmentIds` alone (fail closed).
     */
    userContext?: UserContextSnapshot;
    /**
     * The control plane's server-resolved built-in dimensions for this user
     * (BL-0366) — e.g. the `builtin_dimensions` of
     * `GET /api/sdk/user-contexts/{userId}/builtin-dimensions`, fetched with
     * the server key. Applied as a per-key OVERLAY on
     * `userContext.builtin_dimensions` before membership is evaluated: a leaf
     * present here wins over the app-set value (plan 279 PD-3), and an app-set
     * leaf the server did not deliver survives — the same overlay
     * `mergeUserContext` applies to a client-context delivery in the browser.
     * Ignored without a `userContext` (nothing is evaluated then; fail closed).
     * See {@link applyServerBuiltinDimensions}.
     */
    serverBuiltinDimensions?: UserContextSnapshot['builtin_dimensions'];
}
/**
 * Create domain providers from a static RevTurbineConfig snapshot.
 *
 * Returns providers for: plan, entitlements, segments, rules, content, theme.
 */
declare function createStaticProviders(options: StaticAdapterOptions): AnyDomainProvider[];

/**
 * Hydration adapter — creates domain providers from a ServerEvaluationPayload.
 *
 * Used for server→client handoff: the server evaluates decisions and serializes
 * the result as a ServerEvaluationPayload, which the client hydrates into
 * static providers (avoiding redundant API calls or re-evaluation).
 */

interface HydrationAdapterOptions {
    payload: ServerEvaluationPayload;
    cacheTtlMs?: number;
}
/**
 * Create domain providers from a pre-evaluated ServerEvaluationPayload.
 *
 * Each provider returns data extracted from the payload — no network calls.
 * Register these providers in a DecisionEngine for client-side rendering
 * of server-evaluated decisions.
 */
declare function createHydrationProviders(options: HydrationAdapterOptions): AnyDomainProvider[];

/**
 * LocalRuntime — standard composition of core subsystems for local-only
 * (client-side or embedded) placement decisioning.
 *
 * Composes: DomainProviderRegistry + DecisionEngine + InteractionTracker +
 * CapEnforcer + ImpressionHistory + local resolver. All pure, no browser APIs.
 *
 * @example
 * ```ts
 * import { LocalRuntime, createStaticProviders, InMemoryStorage } from '@revt-eng/core';
 *
 * const runtime = new LocalRuntime({
 *   tenantId: 'tenant_abc',
 *   userId: 'user_123',
 *   playbook: myPlaybook,
 *   providers: createStaticProviders({ config: myPlaybook, planHandle: 'pro' }),
 *   storage: new InMemoryStorage(),
 * });
 *
 * const decision = await runtime.getPlacementDecision({ placementId: 'slot_1', userId: 'user_123' });
 * const entitlement = await runtime.checkEntitlement('feature_x');
 * ```
 */

/**
 * `LocalRuntimeOptions` minus the Playbook, which arrives through
 * {@link PlaybookOption} so both the canonical `playbook` name and the
 * deprecated `exportedConfig` alias are accepted.
 */
interface LocalRuntimeOptionsBase {
    /** Tenant identifier. */
    tenantId: string;
    /** Current user identifier. */
    userId: string;
    /** Pre-built domain providers (from createStaticProviders, etc.). */
    providers: AnyDomainProvider[];
    /**
     * Optional pre-built placements dataset. If not provided, derived from
     * `playbook.placements`.
     */
    placements?: LocalPlacementDataset;
    /**
     * Optional custom placement resolver. When provided, takes precedence
     * over the built-in static resolver.
     */
    customResolver?: DecisionEngineConfig['placementResolver'];
    /** Storage backend for interaction state and caps. Default: InMemoryStorage. */
    storage?: RevTurbineStorage;
    /** Impression history store backend. Default: InMemoryImpressionStore. */
    impressionStore?: ImpressionHistoryStore;
    /** Decision engine behavior flags. */
    engineOptions?: DecisionEngineOptions;
    /**
     * D-61 Entitlement Mirroring: the user context's own entitlement data
     * (`UserContext.entitlements`), merged with the Playbook evaluation.
     */
    userEntitlements?: Record<string, MirroredEntitlement>;
    /** Explicit purchased holdings when no plan provider supplies them. */
    addons?: UserContextSnapshot['addons'];
    /** D-61: the user's trial status, so reverse-trial grants evaluate exactly as in the browser. */
    trialStatus?: ReverseTrialView;
    /** D-61: how app-supplied entitlement data merges with the Playbook result. Default: app wins. */
    entitlementMerge?: EntitlementMergeOptions;
    /**
     * Called once per entitlement handle that neither the Playbook nor the app
     * knows (it is denied). The runtime also logs a warning. Wire telemetry here.
     */
    onUnknownEntitlement?: (handle: string) => void;
    /** Interaction tracker options. */
    interactionOptions?: Partial<Pick<InteractionTrackerOptions, 'defaultDismissCooldownMs' | 'defaultRemindLaterMs'>>;
}
/**
 * Options for {@link LocalRuntime}.
 *
 * The Playbook is supplied as `playbook`. The `exportedConfig` spelling is a
 * deprecated alias kept so consumers can migrate incrementally; it is removed
 * in the minor after the SDK 0.11.0 cascade (BL-0156).
 */
type LocalRuntimeOptions = LocalRuntimeOptionsBase & PlaybookOption;
declare class LocalRuntime {
    readonly tenantId: string;
    readonly registry: DomainProviderRegistry;
    readonly engine: DecisionEngine;
    readonly interactionTracker: InteractionTracker;
    readonly capEnforcer: CapEnforcer;
    readonly impressionHistory: ImpressionHistory;
    private readonly playbook;
    private readonly registeredPlacements;
    private readonly userEntitlements;
    private readonly trialStatus;
    private readonly entitlementMerge;
    private readonly addons;
    private readonly onUnknownEntitlement;
    private readonly reportedUnknownEntitlements;
    private userId;
    constructor(options: LocalRuntimeOptions);
    /**
     * Register a placement record so the engine can look it up by ID.
     */
    registerPlacement(record: RevTurbinePlacementRecord): void;
    /**
     * Evaluate a single placement decision through the full pipeline:
     * suppression → providers → segments → resolver → caps → decision.
     */
    getPlacementDecision(input: RevTurbinePlacementDecisionInput): Promise<RevTurbinePlacementDecision>;
    /**
     * Evaluate multiple placement decisions in parallel.
     */
    getPlacementDecisions(inputs: RevTurbinePlacementDecisionInput[]): Promise<RevTurbinePlacementDecision[]>;
    /**
     * Resolve the winning placement for a surface slot + user context (plan 147
     * REQ-11) — the surface-keyed counterpart to the placement-id-keyed
     * `getPlacementDecision`. This is the core/server/CLI entry that shares the
     * SDK's resolution; Appendix C of placement-prioritization.md: "the same
     * shared scaffold logic runs both sides, so a placement ranks the same
     * wherever it is resolved."
     *
     * The slot is resolved from the config's `placement_slots` registry into a
     * placement record whose `surface_template_ids` drive candidate gathering,
     * then the same six-stage pipeline runs (§1): Qualification (slot match) →
     * Targeting → Policy (caps) → Prioritization (§2–§4) → Delivery. Returns
     * `null` when no slot matches the config.
     *
     * `slotId` / `surfaceType` / `entitlementHandle` / `placementHandle` /
     * `fixedOnly` all narrow resolution via the slot record. Plan context is the
     * runtime's constructed plan; `planHandle` ("evaluate as if") is applied by
     * the caller constructing the runtime for that plan (the `--plan-handle`
     * flow), consistent with the parity harness.
     */
    getPlacement(config: RevTurbinePlacementRequestConfig$1): Promise<RevTurbinePlacementDecision | null>;
    /**
     * Check entitlement access locally (D-61): the shared evaluator decides
     * from the Playbook + user context, then app-mirrored data (user-context
     * grants and any app entitlement provider) merges per the runtime's
     * precedence (default: app wins). The browser SDK runs the same function on
     * the same inputs, so the server verifies exactly what the browser showed.
     * An entitlement nobody knows is denied, warned and reported.
     */
    checkEntitlement(handle: string, context?: RevTurbineEntitlementContext): Promise<EntitlementResult>;
    /**
     * Record a treatment interaction (dismiss, snooze, cta_clicked, etc.).
     */
    trackInteraction(input: RevTurbineTreatmentInteractionInput): void;
    /**
     * Clear suppression for a placement.
     */
    clearSuppression(placementId: string, userId?: string): void;
    /**
     * Resolve all domain providers and return the merged context.
     */
    resolveProviders(): Promise<ResolvedProviderContext>;
    /**
     * Evaluate segments for a set of user traits.
     */
    evaluateSegments(traits: Record<string, string | number | boolean>): string[];
    /**
     * Build the full targeting state from a user context snapshot.
     */
    buildTargetingState(context: UserContextSnapshot, usageOverrides?: Record<string, number>): TargetingState;
    /**
     * Derive personalization tokens from the current provider state.
     */
    derivePersonalizationTokens(base?: PersonalizationContext$1): Promise<Record<string, string | number>>;
    /**
     * Switch the active user. Clears interaction/impression caches.
     */
    setUserId(userId: string): void;
    /** Current user ID. */
    getUserId(): string;
    /** Return the active Playbook snapshot. */
    getPlaybook(): RevTurbineConfig;
    /**
     * Return the active Playbook snapshot.
     *
     * @deprecated Use {@link LocalRuntime.getPlaybook}. Removed in the minor
     * after the SDK 0.11.0 cascade (BL-0156).
     */
    getExportedConfig(): RevTurbineConfig;
    /**
     * Pre-warm caches (impression history, etc.) for synchronous access.
     */
    hydrate(): Promise<void>;
    /**
     * Update domain providers. Clears and re-registers.
     */
    updateProviders(providers: AnyDomainProvider[]): void;
    /**
     * Resolve the placement record for a surface-keyed request. Prefers a slot
     * already registered by the caller (the SDK `<Slot>` registration path);
     * otherwise derives it from the config's `placement_slots` registry — the
     * headless server/CLI path, where there is no mounted `<Slot>` to
     * self-register. Returns `null` when no slot matches the config.
     *
     * The derived record carries the metadata the resolver's slot branch reads:
     * `surface_template_ids` (from the slot's `template`) drives candidate
     * gathering; `surface_slot_id` / `entitlement_handle` / `fixedOnly` narrow it.
     */
    private slotRecordForConfig;
    private buildPlacementResolver;
    /** Evaluator inputs from the resolved providers — the same facts the browser SDK uses. */
    private effectiveBase;
    /** App-mirrored data per handle: user-context grants plus non-default provider entries. */
    private appInputsByHandle;
    private reportUnknownEntitlement;
}

/**
 * Assignment-fact carriage (plan 224 TASK-8, war-games spec §9.1).
 *
 * The `experiment_assigned` clickstream event is the assignment plane's source
 * of truth: one fact per (experiment_handle, experiment_version, subject) when
 * the resolved assignment snapshot enrolls a subject. The snapshot itself
 * (`ExperimentVariantSelection`) deliberately carries handles only — the
 * canonical experiment VERSION is not part of the runtime assignment contract
 * (assignment spec §8: the version travels separately in telemetry). This
 * module is that separate channel: a declaration that binds an experiment
 * handle to the canonical version (`Experiment.sequence`) and assignment unit
 * the fact must carry.
 *
 * Declaration-gated by design, mirroring the taxonomy's own discipline: an
 * assignment with no declaration emits NO fact rather than a fact with a
 * fabricated version — a wrong (handle, version) join key poisons SRM, which
 * is worse than a missing row. Unenrolled subjects also emit nothing:
 * not-enrolled is absence (assignment spec §4), never an `enrolled: false`
 * fact.
 */

/** One supported canonical experiment assignment unit (war-games spec §9.1). */
type AssignmentFactUnit = NonNullable<Experiment['assignment_unit']>;
/**
 * Binds one experiment handle to the canonical-version metadata its
 * `experiment_assigned` assignment facts must carry (plan 224, spec §9.1).
 *
 * Supply these either through
 * `RevTurbineInitOptions.experimentAssignmentFacts` (works for ANY assignment
 * source, external adapters included) or — for the native provider — via
 * `CanonicalExperimentAllocation.sequence`, which derives a declaration
 * automatically. An assigned experiment with no declaration emits no fact.
 */
interface ExperimentAssignmentFactDeclaration {
    /** Canonical experiment handle the declaration applies to. */
    experimentHandle: string;
    /**
     * Canonical experiment version — the `Experiment.sequence` of the version
     * whose allocation is live. Integer ≥ 1; the fact's (handle, version) pair
     * is the SRM join key, so this must be the real canonical version, never a
     * guess.
     */
    experimentVersion: number;
    /**
     * Unit the subject identifier represents. Defaults to `'user'`, matching
     * the native provider's default.
     */
    assignmentUnit?: AssignmentFactUnit;
    /**
     * Stable subject identifier for the declared unit. A function is re-read on
     * every emission so a later identity change takes effect; a bare string
     * pins one subject. When omitted, the SDK's user-context `id` is used.
     * With no resolvable subject there is no fact — absent beats wrong.
     */
    subject?: string | (() => string | undefined | null);
}
/**
 * Optional carrier surface for assignment-fact metadata on an experiment
 * provider. The native provider implements it when its allocations carry
 * `sequence`; the SDK harvests declarations from every registered experiment
 * provider that exposes it.
 */
interface ExperimentAssignmentFactMetadataCarrier {
    /** Declarations describing the canonical versions this provider allocates. */
    readonly assignmentFactDeclarations?: readonly ExperimentAssignmentFactDeclaration[];
}
/**
 * Defensively validate one declaration from a plain-JS caller. The SDK is
 * exposed as `window.RevTurbine`, so shapes are checked, never assumed.
 */
declare function isExperimentAssignmentFactDeclaration(value: unknown): value is ExperimentAssignmentFactDeclaration;
/**
 * Harvest valid assignment-fact declarations from providers exposing the
 * {@link ExperimentAssignmentFactMetadataCarrier} surface. Later sources win
 * on a duplicate handle, so pass the most authoritative source last.
 */
declare function collectAssignmentFactDeclarations(sources: ReadonlyArray<object | undefined>, explicit?: readonly ExperimentAssignmentFactDeclaration[]): ReadonlyMap<string, ExperimentAssignmentFactDeclaration>;

/**
 * Branding resolution for the RevTurbine SDK (plan 118 TASK-20).
 *
 * Branding — theme tokens, workspace name, logo, support email — is a **display**
 * concern, decoupled from the monetization Playbook. It is deliberately NOT an
 * evaluator input and never enters the compiled Bundle, so it has no effect on
 * placement decisions or entitlement checks and is not part of cross-language
 * parity.
 *
 * The SDK resolves branding down a four-rung ladder (highest priority wins), so
 * a customer can render fully with no branding passed at all:
 *
 *   1. **Explicit `branding` argument** — passed to the SDK at init.
 *   2. **Branding API** — branding from `GET /api/sdk/theme`, either fetched by
 *      the SDK (`fetchThemeOverride`) or supplied by the host (`apiBranding`).
 *      This **overrides** config-embedded branding: it is the live value, and
 *      managing branding in the control plane is pointless if a stale `theme`
 *      baked into a shipped Playbook outranks it (plan 184).
 *   3. **Legacy config-embedded** — the deprecated `theme` field carried inside
 *      an older `RevTurbineConfig`/`Playbook`. Works, but warns in development.
 *   4. **`DEFAULT_BRANDING`** — structural fallback so the SDK always renders.
 *
 * Each rung's (possibly partial) branding is merged over `DEFAULT_BRANDING`, so
 * the resolved result is always complete.
 */

/**
 * Structural default branding. Neutral, brandless values that let the SDK render
 * completely when no branding is supplied at any rung of the ladder.
 *
 * @public
 */
declare const DEFAULT_BRANDING: Required<Pick<BrandingConfig, 'workspace_name'>> & BrandingConfig;
/**
 * The rung of the branding ladder a resolved value came from. Returned alongside
 * the resolved branding so callers (and tests) can assert provenance and surface
 * the development deprecation warning for the legacy rung.
 *
 * @public
 */
type BrandingSource = 'explicit' | 'legacy-config' | 'branding-api' | 'default';
/**
 * Inputs to {@link resolveBranding}. Every field is optional; with none supplied
 * the ladder resolves to {@link DEFAULT_BRANDING}.
 *
 * @public
 */
interface BrandingResolutionInput {
    /** Resolved display palette used when no branding theme was supplied. */
    colorScheme?: 'light' | 'dark';
    /** Rung 1 — branding passed explicitly to the SDK at init. */
    explicit?: BrandingConfig;
    /**
     * Rung 2 — the legacy `theme` embedded in an older config artifact. Deprecated:
     * supplying it resolves correctly but emits a development-only warning.
     */
    legacyConfigTheme?: BrandingConfig['theme'];
    /** Rung 3 — branding fetched from the Branding API / workspace settings. */
    apiBranding?: BrandingConfig;
    /**
     * When `true` (the default), using the legacy rung logs a one-time
     * development deprecation warning. Set `false` to silence it (e.g. in tests).
     */
    warnOnLegacy?: boolean;
}
/**
 * The outcome of {@link resolveBranding}: the fully-merged branding plus the rung
 * it was resolved from.
 *
 * @public
 */
interface ResolvedBranding {
    /** Fully-populated branding, each rung merged over {@link DEFAULT_BRANDING}. */
    readonly branding: BrandingConfig;
    /** Which ladder rung supplied the (top-priority) branding. */
    readonly source: BrandingSource;
}
/**
 * Resolve branding down the four-rung ladder. Pure and synchronous: fetching the
 * Branding API (rung 3) is the host's job — pass the result as `apiBranding`.
 *
 * @param input - The available branding sources; see {@link BrandingResolutionInput}.
 * @returns The merged branding and the rung it came from.
 * @public
 */
declare function resolveBranding(input?: BrandingResolutionInput): ResolvedBranding;

/** Test-only: forget that the alias warning fired so the next read warns again. @internal */
declare function resetPlaybookAliasWarning(): void;

/**
 * The account-identity fallback contract — BL-0117, Kent's ruling **D-13**
 * (2026-09-25): *"Keep the user-id fallback but explicitly prefix it to make it
 * obvious its a fallback key."*
 *
 * `events_clickstream.account_id` and `placement_presentations.account_id` are
 * analytical **join keys**: `monetization_funnel` and `cohort_rollup` build
 * their account map out of them, and every experiment summary pipe reads them
 * whenever `analysis_unit='account'`. Before this contract the SDK sent
 * `userContext.account_id || userId`, so an integration that identified no
 * account contributed a bogus `user_id → user_id` account and an
 * account-grain readout silently returned the user-grain n while looking
 * perfectly valid.
 *
 * The fix is not to drop the key — a row with no account still needs an
 * attribution handle so per-"account" series stay countable and joinable — it
 * is to make the fabricated key **self-describing**. A key derived from a user
 * id is prefixed with {@link FALLBACK_ACCOUNT_ID_PREFIX}, so any reader can
 * tell a real, integration-supplied account from one the SDK invented:
 *
 * - **Warehouse**: read-time guards exclude prefixed ids from account
 *   denominators (`monetization_funnel`, `cohort_rollup`), so "accounts" means
 *   accounts the integration actually identified.
 * - **Wire**: absence remains valid. `TrackEvent.account_id` is optional as of
 *   `@revt-eng/schema` 0.1.325 (scaffold #375), so a non-browser producer may
 *   still omit the field; the browser SDK's default emit uses the prefixed
 *   fallback rather than omitting, because a countable placeholder beats a
 *   hole in a join.
 *
 * The prefix is **not** a sentinel for a missing value and it is **not**
 * hashed: it is a namespace marker in front of whatever identity key the same
 * event carries in `user_id` (already PII-redacted by the caller, so an
 * email-shaped user id is a hash on both sides of the colon boundary).
 *
 * @module
 */
/**
 * Namespace marker in front of an `account_id` the SDK **fabricated** from the
 * user id because the integration identified no account.
 *
 * Stable wire contract: analytics read-time guards match on this literal, so
 * changing it is a breaking change to every pipe that filters on it. Callers
 * should compare with {@link isFallbackAccountId} rather than re-deriving the
 * string.
 *
 * @example
 * ```ts
 * import { FALLBACK_ACCOUNT_ID_PREFIX } from '@revturbine/sdk';
 *
 * FALLBACK_ACCOUNT_ID_PREFIX; // 'user-fallback:'
 * ```
 *
 * @public
 */
declare const FALLBACK_ACCOUNT_ID_PREFIX = "user-fallback:";
/**
 * Build the fallback account key for a user id — {@link
 * FALLBACK_ACCOUNT_ID_PREFIX} followed by the id verbatim.
 *
 * The id is used exactly as given: redaction and trimming belong to the caller,
 * which already resolved the `user_id` it is about to put on the same wire row.
 * Deriving the key here from a *different* normalization is how the two lanes
 * would stop joining.
 *
 * @param userId - The user id (or anonymous id) the event is attributed to,
 *   already normalized/redacted exactly as it will appear in `user_id`.
 * @returns The prefixed fallback account key.
 *
 * @public
 */
declare function fallbackAccountId(userId: string): string;
/**
 * Whether an `account_id` is one the SDK fabricated from a user id rather than
 * one the integration identified.
 *
 * Use it to keep fabricated keys out of account denominators, exactly as the
 * warehouse read-time guards do. `null`, `undefined`, and the bare prefix with
 * nothing after it are **not** fallback keys — the first two are absence, and
 * the third is not a key at all.
 *
 * @param accountId - The account id to classify.
 * @returns `true` only for a non-empty id carrying the fallback prefix.
 *
 * @public
 */
declare function isFallbackAccountId(accountId: string | null | undefined): boolean;

/**
 * Control-plane semantic events (plan 112).
 *
 * A typed layer over the SDK's raw event emit path for RevTurbine's OWN
 * control-plane activity — web/CLI auth, playbook-version lifecycle, playbook
 * transfer, and product-entity actions. This is the "dogfood" surface:
 * RevTurbine emits its product usage through the same SDK a customer uses.
 *
 * The taxonomy itself is the canonical `ControlPlaneEventType` /
 * `ControlPlaneEventSource` enums from `@revt-eng/schema`; this module adds the
 * source classification map and a small builder so emitters never have to
 * remember whether an event is `system` or `workflow`.
 *
 * Identity mapping (plan 112 REQ-3/REQ-4): the operator → `user_id`, the acting
 * RevTurbine customer tenant → `account_id` (set via
 * {@link RevTurbineCustomerSdk.identify} / `setUserContext`). `tenant_id` is
 * always RevTurbine's own tenant, stamped server-side — never carried here.
 *
 * @module
 */

/**
 * Canonical source classification for every control-plane event type — mirrors
 * the scaffold taxonomy. `system` covers identity/auth + CLI command telemetry;
 * `workflow` covers playbook-version lifecycle, playbook transfer, and
 * product-entity actions.
 *
 * Typed as a total `Record`, so adding a new `ControlPlaneEventType` in scaffold
 * without classifying it here is a compile error.
 */
declare const CONTROL_PLANE_EVENT_SOURCE: Record<ControlPlaneEventType, ControlPlaneEventSource>;
/**
 * Property key under which {@link buildControlPlaneEvent} stamps the source
 * classification on an emitted event's properties bag.
 */
declare const CONTROL_PLANE_SOURCE_KEY = "control_plane_source";
/**
 * The `(eventName, properties)` pair produced by {@link buildControlPlaneEvent}.
 * `eventName` is the control-plane `event_type`; `properties` is the payload
 * with the source classification stamped under {@link CONTROL_PLANE_SOURCE_KEY}.
 */
interface ControlPlaneEmitInput {
    eventName: ControlPlaneEventType;
    properties: Record<string, JsonValue>;
}
/**
 * Build the `(eventName, properties)` pair for a control-plane semantic event,
 * stamping the canonical source classification onto the payload.
 *
 * Pure — used both by the browser SDK's
 * {@link RevTurbineCustomerSdk.trackControlPlaneEvent} and by server/CLI
 * emitters that POST the same shape to the ingest endpoint.
 *
 * @param eventType - A canonical control-plane event type.
 * @param payload - Optional event-specific properties (e.g. `{ resource, resource_id }`).
 * @returns The emit input to hand to the SDK's `capture` path.
 */
declare function buildControlPlaneEvent(eventType: ControlPlaneEventType, payload?: Record<string, JsonValue>): ControlPlaneEmitInput;

/**
 * Storage abstraction for the RevTurbine web SDK.
 *
 * Re-exports core storage types and adds browser-specific implementations.
 */

/**
 * Wraps a browser `Storage` object (`localStorage` or `sessionStorage`)
 * with try/catch guards for quota and security-policy errors.
 */
declare class BrowserStorage implements RevTurbineStorage {
    private readonly backend;
    constructor(backend: Storage);
    getItem(key: string): string | null;
    setItem(key: string, value: string): void;
    removeItem(key: string): void;
}
/**
 * Resolve a persistent storage provider.
 *
 * Priority:
 * 1. Explicitly provided `storage` (customer override)
 * 2. `localStorage` when running in a browser
 * 3. In-memory fallback
 */
declare function resolvePersistentStorage(storage?: RevTurbineStorage): RevTurbineStorage;
/**
 * Resolve a session-scoped storage provider.
 *
 * Priority:
 * 1. Explicitly provided `storage` (customer override)
 * 2. `sessionStorage` when running in a browser
 * 3. In-memory fallback
 */
declare function resolveSessionStorage(storage?: RevTurbineStorage): RevTurbineStorage;

interface TrustedKey {
    key_id: string;
    /** Ed25519 public key with `verify` usage. */
    publicKey: CryptoKey;
}

/**
 * Trial-revision and account-creation recording (plan 276 TASK-13 / BL-0237,
 * under workspace ruling D-21).
 *
 * The SDK gained an emit surface for the two lifecycle facts plan 276 R-1 makes
 * authoritative, and this module holds everything about it that is not the
 * `RevTurbineCustomerSdk` method itself: the payload shapes, the translation
 * from an episode's facts to a wire payload, and the console notice.
 *
 * **Trial execution and ownership stay with the customer app.** The SDK never
 * runs a trial, never enrols one, never decides one ended and holds no
 * trial-enrollment service — that would be the server-side evaluation the SDK
 * boundary forbids. What it does is *record* what the app states, after running
 * the same pure classifier every other port runs, so the fact that reaches the
 * warehouse agrees with the fact the app believes.
 *
 * The classifier is the load-bearing part. `classifyTrialRevision` reads no
 * clock, so an episode whose scheduled end has merely passed produces **no
 * event at all** — which is the behaviour plan 276 TASK-2 found violated in
 * shipped code, where expiry was derived from the clock at read time.
 */

/**
 * The wire payload for one `trial_revision`.
 *
 * Extends scaffold's own contract input rather than restating it, so the two
 * cannot drift and the loose-object openness REQ-9's additive-only policy needs
 * is inherited rather than re-declared. The fields below NARROW the contract to
 * what a producer must actually supply: every one of them is required here,
 * where the wire contract tolerates their absence from an older producer.
 * `emitPlatformEvent` validates against the contract in development builds and
 * the ingest boundary revalidates authoritatively.
 *
 * @public
 */
interface TrialRevisionPayload extends EventPayloadInput<'trial_revision'> {
    trial_episode_id: string;
    account_id: string;
    subject_scope: 'account' | 'user';
    rule_handle: string | null;
    plan_handle: string | null;
    trial_type: string | null;
    revision: TrialRevisionKind;
    effective_at: string;
    scheduled_end_at: string | null;
    actual_end_at: string | null;
    evidence: {
        kind: 'provider_fact' | 'app_fact' | 'usage_exhaustion';
        ref: string;
    };
    provider_ref: string | null;
}
/**
 * The app-owned vocabulary that does not live on `TrialEpisodeFacts`, because
 * the classifier has no use for it: a Playbook rule handle, the trialed plan
 * and the trial type are labels the warehouse groups by, never inputs to the
 * decision (plan 276 R-1(c) — a Playbook trial rule supplies vocabulary only).
 *
 * @public
 */
interface TrialRevisionLabels {
    rule_handle?: string | null;
    plan_handle?: string | null;
    trial_type?: string | null;
    provider_ref?: string | null;
}
/**
 * The payload for one `account_created`, with plan 276 REQ-3 evidence.
 *
 * Narrows scaffold's contract the same way {@link TrialRevisionPayload} does:
 * the wire contract keeps the evidence fields optional+nullable so the
 * pre-existing bare milestone shape stays valid, while this surface requires
 * them — an unevidenced emission is not an authority, so there is no reason to
 * offer a typed way to make one.
 *
 * @public
 */
interface AccountCreatedPayload extends EventPayloadInput<'account_created'> {
    account_id: string;
    created_at: string;
    /** `self_serve_signup` | `invite_accepted` | `provisioned` | `import`. A USER
     * signup is not account creation (plan 276 R-2) and is refused. */
    source: string;
    evidence: {
        kind: 'provider_fact' | 'app_fact' | 'usage_exhaustion';
        ref: string;
    };
    acquisition_source?: string;
}
/** Why a recording call did or did not put a fact on the wire. @public */
type TrialRevisionRecordStatus = 
/** Classified, emitted on the typed platform lane. */
'recorded'
/** Classified and emitted, but this SDK is `local_only`: the fact reached any
 * registered event consumer and never RevTurbine, because local mode makes no
 * server calls at all. */
 | 'recorded_locally'
/** The evidence supports no revision. Nothing was emitted — by design. */
 | 'pending_unknown'
/** No trial provider is registered and no episode was supplied. Nothing was
 * emitted, and the one-time console notice names the gap. */
 | 'no_trial_provider';
/**
 * The outcome of recording one episode. Always returned, never thrown: a
 * telemetry surface must not break the host app, and `pending_unknown` is a
 * legitimate answer rather than a failure.
 *
 * @public
 */
interface TrialRevisionRecordResult {
    status: TrialRevisionRecordStatus;
    /** The classifier's verdict, or null when nothing was classified. */
    classification: TrialRevisionClassification | null;
    /** What was emitted, or null when nothing was. */
    payload: TrialRevisionPayload | null;
}

/**
 * Content fields common to most surface templates.
 * Individual placement slot types extend or narrow these.
 */
interface PlacementContentFields {
    header?: string;
    body?: string;
    cta_label?: string;
    secondary_cta_label?: string;
    message?: string;
    image_url?: string;
    style?: string;
    dismissible?: boolean;
    position?: string;
    duration?: number;
}
/** Resolved content with personalization tokens expanded. */
type ResolvedContent = PlacementContentFields & Record<string, unknown>;
/**
 * CTA action types recognized by the SDK.
 *
 * The built-in action types come from the schema's
 * `RevTurbineConfigUiPathActionType` (the single source of truth). The
 * `(string & {})` member keeps autocomplete for the built-ins while also
 * admitting **tenant-defined custom action names** — a placement authored
 * with a `custom` (or any unmapped) CTA action flows through the engine as
 * `{ type: <action-name>, ...config }`, and the SDK preserves that name so a
 * {@link CtaResolver} can be registered against it via `registerCtaResolver`.
 */
type PlacementUiPathActionType = RevTurbineConfigUiPathActionType | (string & {});
/** UI path action that the CTA triggers. */
interface PlacementUiPath {
    type: PlacementUiPathActionType;
    plan_handle?: string;
    promotion_id?: string;
    placement_handle?: string;
    url?: string;
    tour_id?: string;
    /**
     * Non-whitelisted config keys carried by a tenant-defined custom CTA.
     *
     * The engine spreads a custom CTA's authored `config` into the `cta_path`
     * record; {@link parseUiPath} lifts the known fields (`url`, `plan_handle`,
     * …) onto this object and collects every remaining key here so a custom
     * {@link CtaResolver} can read tenant-specific parameters. Omitted when the
     * action carries no extra params.
     */
    params?: Record<string, unknown>;
}
/**
 * Context handed to a {@link CtaResolver} when a placement CTA is activated.
 */
interface CtaResolverContext {
    /** The full placement output whose CTA was activated. */
    placement: PlacementOutput;
    /** Which CTA fired — the primary button or a secondary action. */
    kind: 'primary' | 'secondary';
    /** Report snooze through the mounted controller and close this occurrence. */
    remindLater?: (seconds?: number) => void;
}
/**
 * Promotion attached to a placement payload.
 *
 * Re-exported from the schema's {@link RuntimePromotionSnapshot} —
 * lightweight promotion snapshot for placement rendering contexts.
 */
type PlacementPromotion = RuntimePromotionSnapshot;
/**
 * Props passed to every placement slot renderer.
 *
 * The generic parameter `C` allows custom slot types to narrow
 * the `content` field to a specific shape, eliminating `unknown` casts:
 *
 * ```ts
 * interface MyContent extends ResolvedContent {
 *   modal_type: string;
 *   benefits: Array<{ text: string }>;
 * }
 * function MySlot(props: PlacementSlotProps<MyContent>) {
 *   props.content.modal_type; // string — no cast needed
 * }
 * ```
 */
interface PlacementSlotProps<C extends ResolvedContent = ResolvedContent> {
    /** The full placement output from the decision engine. */
    placement: PlacementOutput;
    /** Resolved content fields with personalization tokens expanded. */
    content: C;
    /** Parsed UI path for CTA handling. */
    uiPath: PlacementUiPath;
    /** Optional promotion data. */
    promotion?: PlacementPromotion;
    /** Callback when user clicks the primary CTA. */
    onCtaClick: () => void;
    /** Callback when user clicks a secondary CTA. */
    onSecondaryCtaClick?: () => void;
    /** Callback when user dismisses the placement. */
    onDismiss: () => void;
    /**
     * Optional callback when the user chooses "Remind me later" (defer). When
     * provided, dismissible slots render a defer control beside dismiss; the
     * placement re-queues and reappears after the remind-later window
     * (`remind_later_minutes`, default 60) rather than the longer dismiss
     * cooldown (plan 167 REQ-7). **Additive and optional** — omit it and slots
     * render exactly as before, with no defer control.
     */
    onRemindLater?: () => void;
    /** Whether the placement is currently visible. */
    visible: boolean;
    /** Custom CSS class name for styling overrides. */
    className?: string;
    /** Custom inline styles. */
    style?: React.CSSProperties;
    /**
     * Optional exposure ref (plan 144 TASK-9 / REQ-18). Attach it to the slot's
     * true visual root so RevTurbine can observe when the placement actually
     * enters the viewport for viewport-qualified exposure; when
     * `IntersectionObserver` is unavailable it falls back to render
     * (`exposure_basis: 'render_fallback'`). **Additive and optional** — omitting
     * it changes nothing, and it never requires a wrapper element (REQ-18/REQ-19).
     */
    exposureRef?: (element: Element | null) => void;
}
/**
 * A placement slot type definition.
 *
 * Each slot type provides:
 * - A unique `id` matching a surface type or custom identifier
 * - A human-readable `label`
 * - A description of the slot behavior
 * - A React component that renders the placement
 * - Optional `defaultProps` for sensible defaults
 * - An `accepts` predicate controlling which outputs this type handles
 */
interface PlacementSlotType<P extends PlacementSlotProps = PlacementSlotProps> {
    /** Unique identifier for this slot type (e.g. 'banner', 'modal', 'custom:my-widget'). */
    id: string;
    /** Human-readable label for the studio UI. */
    label: string;
    /** Description of this placement type. */
    description: string;
    /** The canonical component type this renderer handles. */
    componentType: RevTurbineComponentType;
    /**
     * Canonical content fields this component renders. Validation and Studio
     * previews use this contract to identify authored fields the component ignores.
     */
    renderedFields: readonly string[];
    /** The React component that renders this placement type. */
    component: React.ComponentType<P>;
    /** Default props merged with resolved props before rendering. */
    defaultProps?: Partial<P>;
    /**
     * Predicate to determine if this slot type can handle a given output.
     * Defaults to matching on `componentType`. Custom implementations can
     * match on template name, content shape, etc.
     */
    accepts?: (output: PlacementOutput) => boolean;
    /**
     * Resolution priority. Higher values are evaluated first when multiple
     * slot types match the same surface type. Use this to let narrow/specific
     * predicates take precedence over broad ones without relying on
     * registration order. Default `0`.
     */
    priority: number;
}
/**
 * Options for registering a custom placement type.
 * Identical to PlacementSlotType but all fields are required except defaultProps, accepts, and priority.
 */
type RegisterPlacementSlotTypeOptions<P extends PlacementSlotProps = PlacementSlotProps> = Omit<PlacementSlotType<P>, 'componentType' | 'accepts' | 'defaultProps' | 'priority' | 'renderedFields'> & {
    /** Canonical component type handled by this renderer. */
    componentType?: RevTurbineComponentType;
    /** @deprecated Use `componentType`. */
    surfaceType?: RevTurbineComponentType;
    defaultProps?: Partial<P>;
    accepts?: (output: PlacementOutput) => boolean;
    /** Machine-readable fields rendered by this component. */
    renderedFields?: readonly string[];
    /** Resolution priority (default `0`). Higher values are evaluated first. */
    priority?: number;
};
/**
 * Personalization token context for resolving `{{token}}` placeholders in content.
 */
interface PersonalizationContext {
    user_name?: string;
    plan_name?: string;
    plan_price?: string;
    upgrade_plan_name?: string;
    upgrade_plan_price?: string;
    usage_current?: string | number;
    usage_limit?: string | number;
    usage_percent?: string | number;
    usage_remaining?: string | number;
    reset_date?: string;
    trial_days_remaining?: string | number;
    trial_days_total?: string | number;
    trial_plan_name?: string;
    trial_features_used?: string | number;
    premium_features_used_count?: string | number;
    top_unused_premium_feature?: string;
    premium_action_count?: string | number;
    specific_features_lost?: string;
    estimated_depletion_date?: string;
    credits_remaining?: string | number;
    seat_count?: string | number;
    seat_limit?: string | number;
    promo_discount?: string;
    [key: string]: string | number | undefined;
}
/**
 * Configuration for the placement preview sandbox.
 */
interface PlacementPreviewConfig {
    /** The placement output to preview. */
    placement: PlacementOutput;
    /** Personalization context for token resolution. */
    personalization?: PersonalizationContext;
    /** Whether to render in a sandboxed iframe. */
    sandboxed?: boolean;
    /** Viewport width for preview. */
    viewportWidth?: number;
    /** Viewport height for preview. */
    viewportHeight?: number;
    /** Device form factor for preview. */
    device?: 'desktop' | 'tablet' | 'mobile';
}
/**
 * Custom code bundle uploaded by a customer for custom placement rendering.
 */
interface PlacementCustomCode {
    /** Unique identifier for this code bundle. */
    id: string;
    /** The placement slot type this code renders. */
    slotTypeId: string;
    /** The React component source code (JSX/TSX). */
    code: string;
    /** Optional CSS/styling to apply. */
    css?: string;
    /** Version identifier for cache busting. */
    version: string;
    /** When this code was last updated. */
    updatedAt: string;
}

/**
 * Registry for placement slot types.
 *
 * Manages built-in and custom placement renderers. The registry resolves
 * a PlacementOutput to the best matching slot type based on surface type
 * and template, then provides the component and resolved props for rendering.
 */
declare class PlacementTypeRegistry {
    private readonly types;
    private readonly componentIndex;
    /**
     * Register a placement slot type. If a type with the same id already exists,
     * it is replaced (allows customer overrides of built-in types).
     */
    register<P extends PlacementSlotProps>(options: RegisterPlacementSlotTypeOptions<P>): void;
    /**
     * Unregister a placement slot type by id.
     * Returns true if the type was found and removed.
     */
    unregister(id: string): boolean;
    /**
     * Look up a slot type by its id.
     */
    get(id: string): PlacementSlotType | undefined;
    /**
     * Resolve the best matching slot type for a placement output.
     *
     * Resolution order:
     * 1. If the output's surface.template matches a registered type id, use it
     * 2. Find all types for the output's surface.type, sort by priority descending,
     *    and pick the first whose `accepts()` returns true
     * 3. Fall back to a 'custom' type if registered
     * 4. Return undefined if no match
     */
    resolve(output: PlacementOutput): PlacementSlotType | undefined;
    /**
     * List all registered slot types.
     */
    listAll(): PlacementSlotType[];
    /**
     * List slot types for a specific surface type.
     */
    listByComponentType(componentType: RevTurbineComponentType): PlacementSlotType[];
    /** @deprecated Use {@link listByComponentType}. */
    listBySurfaceType(componentType: RevTurbineComponentType): PlacementSlotType[];
    /**
     * Check if a slot type id is registered.
     */
    has(id: string): boolean;
}
/**
 * Resolve personalization tokens in a string value.
 * Tokens use the `{{token_name}}` format.
 */
declare function resolveTokens(template: string, context: PersonalizationContext): string;
/**
 * Resolve all personalization tokens in a content object.
 */
declare function resolveContent(content: Record<string, unknown>, // sdk-ok: boundary-parse
context: PersonalizationContext): ResolvedContent;
/**
 * Parse a `cta_path` (or legacy `ui_path`) record from a placement output into
 * a typed {@link PlacementUiPath}.
 *
 * Built-in fields (`url`, `plan_handle`, …) are lifted onto typed properties.
 * The `type` is preserved verbatim for any non-empty string — including
 * tenant-defined custom action names — so a registered {@link CtaResolver} can
 * key on it; only an absent or non-string `type` defaults to `'dismiss'`. Every
 * remaining key is collected into `params` for custom resolvers to read.
 */
declare function parseUiPath(raw: Record<string, unknown>): PlacementUiPath;
/**
 * Parse a promotion record from a placement output.
 */
declare function parsePromotion(raw?: Record<string, unknown>): PlacementPromotion | undefined;
/**
 * Get or create the default global placement type registry.
 *
 * On the React entry the registry comes pre-seeded with the built-in slot
 * types; on the headless entry it starts empty (headless consumers register
 * their own types via {@link PlacementTypeRegistry.register}).
 */
declare function getDefaultRegistry(): PlacementTypeRegistry;
/**
 * Reset the default registry (useful for testing).
 */
declare function resetDefaultRegistry(): void;

/** Context supplied to an app-owned server mutation handler. */
interface ServerActionContext {
    /** The placement whose CTA initiated the action. */
    placement: CtaResolverContext['placement'];
    /** The authored CTA action type (v1 documents `extend_trial`). */
    actionType: string;
    /** Tenant-authored custom CTA parameters, when present. */
    params: Record<string, unknown>;
}
/** Result returned after the app's backend accepts or refuses the mutation. */
interface ServerActionResult {
    success: boolean;
    /** Fresh server-authoritative context to merge after a successful mutation. */
    userContext?: UserContextInput;
}
/** App handler that calls its own backend for a server-owned mutation. */
type ServerActionHandler = (context: ServerActionContext) => Promise<ServerActionResult>;
/** Map of authored CTA action type to app-owned server mutation handler. */
type ServerActionMap = Record<string, ServerActionHandler>;

/** The spec-defined per-placement recommendation strategy. */
type RecommendationStrategy = 'next_tier_up' | 'best_value' | 'custom';

/**
 * Telemetry pipeline counters (plan 144 TASK-8).
 *
 * Per-stage tallies for the event delivery pipeline — a cheap diagnostic
 * surface for answering "why did my events not show up?" without a debugger.
 * `sampled` and `deduped` are wired here but stay zero until the sampling and
 * client-dedupe stages land in later tasks.
 */
/** Running counts for each stage an event passes through (or is dropped at). */
interface TelemetryCounters {
    /** Envelopes built after passing the consent gate. */
    created: number;
    /** Events dropped before any destination — currently the consent gate. */
    dropped: number;
    /** Property values scrubbed by PII redaction. */
    redacted: number;
    /** Events dropped by sampling. Zero until sampling ships. */
    sampled: number;
    /** Events collapsed by client-side dedupe. Zero until dedupe ships. */
    deduped: number;
    /** Envelopes buffered for a later batch flush. */
    queued: number;
    /** Rows the ingest call delivered (2xx). */
    sent: number;
    /** Rows whose ingest delivery failed after retries. */
    failed: number;
}

/**
 * Viewport-exposure substrate (plan 144 TASK-9).
 *
 * A small manager over `IntersectionObserver` that answers "has this element
 * actually entered the viewport?" for viewport-qualified exposure. It exists
 * for REQ-18 (attach exposure to the true visual root) and AC-10 (degrade
 * gracefully when `IntersectionObserver` is unavailable).
 *
 * Two design points the plan calls out:
 *   - **One shared observer per distinct config.** Elements requesting the same
 *     `threshold` + `rootMargin` share a single `IntersectionObserver` — one
 *     observer, many targets — rather than one observer per placement.
 *   - **Graceful fallback (AC-10).** With no `IntersectionObserver` (SSR, old
 *     browsers, a stubbed environment) the manager doesn't throw: it treats
 *     render as exposure and reports `exposure_basis: 'render_fallback'`, so the
 *     signal degrades instead of disappearing.
 */
/**
 * How an element came to be considered "exposed":
 * - `viewport` — it crossed the visibility threshold in the viewport.
 * - `render_fallback` — `IntersectionObserver` was unavailable, so render was
 *   treated as exposure (AC-10).
 */
type ExposureBasis = 'viewport' | 'render_fallback';

/** Non-authoritative display price carried by an eligible variation. */
interface EligiblePrice {
    price: number;
    currency: string;
    pricingModel: 'flat' | 'per_unit' | 'tiered' | 'metered';
    billingPeriod: 'monthly' | 'annual' | 'one_time' | 'custom';
}
/** A public plan variation eligible for the active targeting context. */
interface EligiblePlan {
    handle: string;
    name: string;
    tierPosition: number;
    sortOrder: number;
    variationHandle: string;
    segmentHandle: string | null;
    price: EligiblePrice;
}
/** A public add-on variation eligible for the active targeting context. */
interface EligibleAddon {
    handle: string;
    name: string;
    sortOrder: number;
    variationHandle: string;
    segmentHandle: string | null;
    price: EligiblePrice;
}
/** Format an integer minor-unit amount for Playbook-backed display tokens. */
declare function formatCurrencyMinorUnits(amount: number, currencyCode: string, locale?: string): string;

/** Extensible metadata bag attached to placements, events, and interactions. */
type SdkMetadata = Record<string, JsonValue>;
/** User-provided traits or custom context (inherently untyped from customer code). */
type SdkTraits = Record<string, JsonValue>;
/**
 * Top-level keys {@link RevTurbineCustomerSdk.identify} recognizes on a
 * canonical user-context input. Anything else is dropped and reported
 * (plan 168 REQ-3, plan 191 REQ-3). `satisfies` guards each entry against
 * typos; `update-keys-exhaustiveness.test-d.ts` derives the reverse
 * direction, so an {@link IdentifyContextInput} field identify() does not
 * merge has to be acknowledged there (BL-0352).
 */
declare const RECOGNIZED_IDENTIFY_KEYS: readonly ["account_id", "email", "plan", "plan_handle", "usage", "entitlements", "addons", "custom", "personalization"];
/**
 * The top-level {@link IdentifyContextInput} keys
 * {@link RevTurbineCustomerSdk.identify} merges into the held context (the
 * entries of its recognized-key list). Exported for type-level
 * exhaustiveness checks; it has no runtime value.
 */
type RecognizedIdentifyKey = (typeof RECOGNIZED_IDENTIFY_KEYS)[number];
/** Properties attached to analytics events. */
type SdkEventProperties = Record<string, JsonValue>;
interface RevTurbineSdkProvider {
    getPlacement?: (config: RevTurbinePlacementRequestConfig) => Promise<PlacementOutput | null>;
    checkEntitlement?: (handle: string, context?: RevTurbineEntitlementContext) => Promise<EntitlementResult>;
    persistPlacementTypes?: (types: RevTurbinePlacementTypeEntity[]) => Promise<void>;
    identify?: (userId: string, contextOrTraits?: UserContextInput | SdkTraits) => void;
}
type RevTurbineProviderFactory = (options: RevTurbineInitOptions) => RevTurbineSdkProvider;
type RevTurbineProviderFailureSlotBehavior = 'placeholder' | 'invisible';
interface RevTurbineProviderOptionAugmentations {
    provider?: RevTurbineSdkProvider | RevTurbineProviderFactory;
    providerFallbacks?: Array<RevTurbineSdkProvider | RevTurbineProviderFactory>;
}
type RevTurbineInitWithProviderOptions = RevTurbineInitOptions & RevTurbineProviderOptionAugmentations;
/**
 * Minimal initialization options for local-only mode.
 *
 * When `localRuntime.playbook` (or the deprecated `exportedConfig` alias) is
 * provided, core transport options can be omitted and the SDK will inject
 * safe local defaults. `playbook` is the canonical key; the runtime resolves
 * both through {@link resolveLocalPlaybook}.
 */
type RevTurbineLocalOnlyMinimalInitOptions = Omit<RevTurbineInitOptions, 'tenantId' | 'apiKey' | 'endpoint' | 'mode' | 'runtimeMode' | 'localRuntime'> & {
    tenantId?: string;
    apiKey?: string;
    endpoint?: string;
    mode?: RevTurbineSdkMode;
    runtimeMode?: 'local_only';
    localRuntime: RevTurbineLocalRuntimeOptions & ({
        playbook: ConfigArtifact | UnvalidatedConfigArtifact;
    } | {
        /** @deprecated Use `playbook` — the canonical key for the same artifact. */
        exportedConfig: ConfigArtifact | UnvalidatedConfigArtifact;
    });
};
/**
 * Public SDK initialization input.
 *
 * Accepts either full options for any runtime mode, or local-only minimal
 * options when `localRuntime.playbook` (or the deprecated `exportedConfig`
 * alias) is provided.
 */
type RevTurbineInitInputOptions = RevTurbineInitWithProviderOptions | (RevTurbineLocalOnlyMinimalInitOptions & RevTurbineProviderOptionAugmentations);
/**
 * Every key any init-options branch accepts.
 *
 * Built from the branches rather than written as `keyof RevTurbineInitInputOptions`:
 * `keyof` over a union yields the INTERSECTION of its members' keys, so that
 * form would reject `localRuntime` (local-only branch) and `provider`
 * (augmentation branch) — every key that makes the union worth having.
 */
type RevTurbineInitOptionKey = keyof RevTurbineInitOptions | keyof RevTurbineProviderOptionAugmentations;
/**
 * Exact-check for init options (plan 233 REQ-2b).
 *
 * A key the options do not declare becomes `never`, which turns a typo or a
 * stale option into a compile error instead of a value the SDK silently ignores.
 *
 * The motivating shape is the same one `Exact` was introduced for in plan 191:
 * TypeScript's excess-property check applies only to fresh object literals, so
 * options assembled in a variable — or in an un-annotated `useMemo`, which is
 * exactly how React integrations build them — carried unknown keys with no
 * diagnostic at all.
 *
 * Scope limit worth stating: this cannot catch a wrong VALUE. The escalated
 * `tenant_id` defect was never reachable from here — that one is caught by
 * init-time validation (REQ-1/REQ-2) and the reachable init status (REQ-3).
 *
 * It is *not* true that a Playbook is beyond compile-time reach. An earlier
 * version of this note claimed a served artifact is `Record<string, unknown>`
 * “by necessity”; that was wrong. {@link UnvalidatedConfigArtifact} structurally
 * requires the body arrays, so a truncated Playbook fails to compile at the
 * `localRuntime` boundary. What genuinely cannot be checked is the artifact's
 * *contents* — whether a plan handle exists, whether a rule is satisfiable.
 *
 * @public
 */
type ExactInitOptions<T> = {
    [K in keyof T]: K extends RevTurbineInitOptionKey ? T[K] : never;
};
/**
 * SDK integration mode.
 * - `snippet` — lightweight script tag embed
 * - `react` — React component integration
 * - `iframe` — sandboxed iframe embed
 */
type RevTurbineSdkMode = 'snippet' | 'react' | 'iframe';
/**
 * Hosted-mode endpoint used when `endpoint` is omitted. Every hosted
 * integration talks to the same control plane, so the option is a knob for
 * proxies and self-hosted edges, not a requirement.
 */
declare const DEFAULT_HOSTED_ENDPOINT = "https://revturbine.com/app";
/**
 * Integration mode used when `mode` is omitted. `mode` labels telemetry
 * (`page_view.mode`, diagnostics) and changes no behavior; `<RevTurbineProvider>`
 * passes `'react'`, everything else is a snippet.
 */
declare const DEFAULT_SDK_MODE: RevTurbineSdkMode;
/**
 * Where the Playbook config load stands (BL-0177).
 *
 * `config_unavailable` used to be a single undifferentiated outcome, so a slot
 * that lost the race against a cold config fetch could not tell "wait, it is
 * coming" from "nothing is coming" and rendered its fallback permanently. This
 * is the distinction: `loading` makes a `config_unavailable` decision
 * retriable, `unavailable` makes it terminal for now.
 */
type RevTurbinePlaybookLoadState = 'ready' | 'loading' | 'unavailable';
/**
 * Why the hosted Playbook did not load (BL-0012).
 *
 * A failed load used to look exactly like "no config yet": the fetch returned
 * nothing, `can()` answered `config_unavailable`, and neither the console nor
 * any API named the endpoint or the credential. Read it with
 * `getPlaybookLoadFailure()`; the SDK also warns once per distinct failure
 * while no Playbook is loaded.
 *
 * - `credentials` — no `publicKey` was supplied, so nothing can be fetched
 *   (an `apiKey` is the server key and is never sent from this SDK).
 * - `bootstrap` / `manifest` / `bundle` — a step of the signed CDN delivery
 *   failed; the legacy `config` endpoint is tried next.
 * - `config` — the legacy `GET /api/sdk/config` fetch failed too.
 *
 * @public
 */
interface RevTurbinePlaybookLoadFailure {
    /** Which step failed. */
    stage: 'credentials' | 'bootstrap' | 'manifest' | 'bundle' | 'config';
    /** The URL the step requested, when it made a request. */
    url?: string;
    /** The HTTP status, when the step got a response. */
    status?: number;
    /** A human-readable explanation, naming the credential when it is the likely cause. */
    message: string;
}

/**
 * Convenience input type for identify / setUserContext calls.
 * Omits the persistence envelope fields (`tenant_id`, `user_id`,
 * `created_at`, `updated_at`) which the SDK populates automatically.
 *
 * @example
 * ```ts
 * sdk.identify('user_123', {
 *   account_id: 'acct_456',
 *   email: 'jane@acme.com',
 *   plan_handle: 'pro',
 *   entitlements: { data_export: true },
 *   custom: { role: 'editor' },
 * });
 * ```
 */
type UserContextInput = Omit<UserContext, 'id' | 'tenant_id' | 'user_id' | 'created_at' | 'updated_at'>;
/**
 * User-context fields only the server may write, so the browser input types
 * ({@link IdentifyContextInput}, {@link RevTurbineUserContext} and, through it,
 * {@link RevTurbineUpdateInput}) omit them, and every browser entry point
 * (`identify()`, `update()`, `setUserContext()`, the `user` init option)
 * drops them at runtime for plain-JS callers (BL-0351, BL-0352, BL-0381).
 *
 * Trust is by party (D-46): the browser client never asserts these values;
 * the customer's server may (a server-key user-context write, or a server
 * SDK's overlay inputs), and RevTurbine's server may enrich them.
 *
 * - `seat_type_handle` — the user's seat-type assignment (plan 279, D-36).
 *   It has exactly two writers: the tenant's backend, through a server-key
 *   user-context upsert, and RevTurbine's own server-side enrichment in
 *   hosted mode. It is never accepted from `identify()`, `update()` or any
 *   credential the browser holds; the control plane resolves the delivered
 *   `seat_type` / `buyer_role` built-in dimensions from it.
 * - `activity_score` / `activity_score_computed_at` — computed by the
 *   control plane's hourly activity-score refresh from the event stream and
 *   persisted on `user_contexts` (plan 180; targeting-studio-ui.md §4.1,
 *   Activity State). The browser receives the derived level through the
 *   `activity_level` built-in dimension, never the score, and never writes
 *   either field (D-36's principle).
 * - `builtin_dimensions` — the resolved built-in segment dimensions that
 *   stamp the reserved `rt_<dimension>` traits (plan 279 PD-3, as amended by
 *   D-46; BL-0381). The only browser source is the authenticated
 *   `GET /api/sdk/client-context` delivery, which the SDK merges into its
 *   held context itself; an app-supplied value would let the browser claim
 *   any built-in segment (e.g. `rt.subscription_state.paid`).
 * - `customer_builtin_dimensions` — the customer-set built-in dimension
 *   values and their per-key `override` pins (D-47; BL-0382). Written only by
 *   the customer's server through the server-key `POST /api/sdk/user-contexts`
 *   upsert (server-node `setBuiltinDimensions`); the control plane folds them
 *   into `builtin_dimensions` before delivery.
 */
declare const SERVER_ASSIGNED_USER_CONTEXT_KEYS: readonly ["seat_type_handle", "activity_score", "activity_score_computed_at", "builtin_dimensions", "customer_builtin_dimensions", "retired_at", "provisional", "merged_into"];
type ServerAssignedUserContextKey = (typeof SERVER_ASSIGNED_USER_CONTEXT_KEYS)[number];
/**
 * User-context fields `identify()` does not merge, omitted from
 * {@link IdentifyContextInput} since 0.12.0 (before that they compiled and
 * were dropped at runtime with a warning).
 */
type IdentifyUnmergedUserContextKey = 'email_type' | 'trial' | 'payment_failed' | 'payment_at_risk' | 'tiers' | 'instances' | 'experiments' | 'derived_config_version' | 'context_hash' | 'derived_computed_at';
/**
 * Input accepted by {@link RevTurbineCustomerSdk.identify} for the canonical
 * user-context shape (plan 191). `plan_handle` is THE plan matching
 * identity — the plan's `unique_handle`; the `plan` object is display
 * metadata (name/price/period) and never participates in matching.
 *
 * Server-assigned fields (`seat_type_handle`, `activity_score`,
 * `activity_score_computed_at`, `builtin_dimensions`) are not accepted here
 * (plan 279, D-36, D-46; BL-0352, BL-0381); the tenant's backend or
 * RevTurbine's enrichment writes them.
 *
 * Since 0.12.0 the type also omits the user-context fields `identify()` never
 * merged (it dropped them with a warning): trial, billing and tier state,
 * instances, experiments and the derived-context bookkeeping. Set those
 * through {@link RevTurbineCustomerSdk.update} / `setUserContext`, or let
 * client-context enrichment deliver them.
 */
type IdentifyContextInput = Partial<Omit<UserContextInput, ServerAssignedUserContextKey | IdentifyUnmergedUserContextKey>> & {
    /** THE plan matching identity — the plan's `unique_handle` (e.g. `'pro'`). */
    plan_handle?: string;
};
/**
 * Exact-shape constraint: rejects keys the target shape does not declare, and
 * — unlike TypeScript's built-in excess-property check — keeps rejecting them
 * when the value arrives through a variable rather than a fresh object
 * literal (plan 191 REQ-3).
 *
 * That distinction is the whole point: the shape docs used to teach
 * (`user: { id, context: { plan_handle } }`) compiled cleanly whenever the
 * options object was built in an un-annotated intermediate — a `useMemo`, a
 * helper function, a spread — because excess-property checking had already
 * been discarded. The user then had no plan at runtime, silently. Under this
 * constraint every excess key maps to `never`, so the call fails to compile
 * wherever the object was built.
 *
 * Free-form customer values belong under `custom`, which stays open.
 *
 * @example
 * ```ts
 * // ✗ compile error — `context` is not a user-context field
 * rt.identify('u_1', { context: { plan_handle: 'pro' } });
 * // ✓
 * rt.identify('u_1', { plan_handle: 'pro', custom: { anything: 'you like' } });
 * ```
 */
/**
 * Mints a short-lived client-session token for the signed-in user (plan 191
 * Q-6). Called by the SDK on first need, after `identify()`, and again when a
 * token is rejected as expired. Return the raw `rt_client_…` token your
 * backend minted from `POST /api/sdk/client-sessions`.
 */
type RevTurbineClientSessionProvider = () => string | Promise<string>;
type Exact<Shape, T> = {
    [K in keyof T]: K extends keyof Shape ? T[K] : never;
};

/**
 * Canonical entitlement check status.
 * Re-exported from `@revt-eng/schema`.
 */
type EntitlementStatus = EntitlementStatus$1;

interface RevTurbinePlacementRequestConfig {
    /** Slot identifier used for slot-based decisions. */
    slotId?: string;
    /** Component type declared by the slot integration point. */
    componentType?: RevTurbineComponentType;
    /** @deprecated Use `componentType`. */
    surfaceType?: RevTurbineSurfaceType;
    /** Entitlement handle used for entitlement-based decisions. */
    entitlementHandle?: string;
    /** Optional plan context when rendering plan-specific placements. */
    planHandle?: string;
    /** Optional placement handle for chaining from a prior CTA path. */
    placementHandle?: string;
    /**
     * When true, restrict candidate resolution to Fixed-category placements
     * only for this call. Use when a slot is reserved for PM-wired content
     * (e.g., a header upgrade button that should never show an RT-initiated
     * nudge). RT-initiated placements (Usage/Trial/Conversion/Retention) are
     * filtered out even if they would otherwise match the slot.
     *
     * Defaults to `false`. See placement-prioritization-logic spec §1 and
     * placement-studio-ui.md Appendix C.2 "Restricting a slot to Fixed".
     */
    fixedOnly?: boolean;
}
/** Tenant-scoped placement type metadata persisted by SDK integrations. */
interface RevTurbinePlacementTypeEntity {
    id: string;
    label: string;
    description: string;
    surfaceType: RevTurbineSurfaceType;
    priority?: number;
}
/**
 * Current trial status for the identified user.
 *
 * Re-exported from the schema's {@link UserTrialStatus} — uses the
 * canonical snake_case field names (`in_trial`, `trial_type`, etc.)
 * to match the wire format and avoid brittle remapping.
 */
type RevTurbineTrialContext = UserTrialStatus;
/**
 * Arbitrary key/value metadata persisted with an impression record.
 *
 * Free-form by design — consumers attach whatever context is useful
 * for downstream analytics (CTA type, variant id, surface slot id,
 * experiment arm, etc.). The shape is intentionally untyped because
 * it's a passthrough into the scaffold's ImpressionRecord.metadata
 * field, which is the same type (`Record<string, unknown>`) on the
 * persistence side. Defining the alias here gives the SDK type-
 * safety scan one place to suppress instead of three identical
 * parameter sites.
 */
type RevTurbineImpressionMetadata = Record<string, unknown>;
/** Map of entitlement handle → current usage count. */
type UsageBalances = Record<string, number>;
/**
 * Outcome of {@link RevTurbineCustomerSdk.gate} — the advertised `gate(action, fn)`
 * verb. When the action was permitted, `ran` is `true` and `result` holds the
 * callback's return value; otherwise `ran` is `false`, the callback did not run,
 * and the caller should surface the `entitlement` (e.g. render an `<RTSlot>` paywall).
 */
type RevTurbineGateResult<T> = {
    ran: true;
    result: T;
    entitlement: EntitlementResult;
} | {
    ran: false;
    entitlement: EntitlementResult;
};
/**
 * Input to {@link RevTurbineCustomerSdk.update} — the advertised `update(patch)` verb.
 *
 * Accepts **every session-scoped user-context field** — everything on
 * {@link RevTurbineUserContext} except the identity handle `id` (and the
 * persistence envelope `tenant_id` / `user_id` / timestamps, which the input
 * type never carried). Those are bound at {@link RevTurbineCustomerSdk.identify}
 * time and are not patchable here; use `identify()` to (re)establish identity.
 *
 * Every field is optional and merged with upsert semantics — an omitted field
 * leaves the currently-held value untouched, so a partial patch (e.g. just
 * `{ plan }`) never clobbers other context. Patchable fields include `plan`,
 * `email`, `account_id`, `entitlements`, `custom`, `personalization`, `trial`,
 * the billing-recovery signals (`payment_failed` / `payment_at_risk`), `tiers`,
 * app-known experiment assignments (`experiments`, plan 183), and `usage`.
 * Server-assigned fields (`seat_type_handle`, `activity_score`,
 * `activity_score_computed_at`, `builtin_dimensions`) are not patchable
 * (D-36, D-46; BL-0352, BL-0381): built-in dimension values reach the browser
 * only from the authenticated client-context delivery.
 *
 * `usage` keeps its friendly `Record<string, number>` shape (absolute balances),
 * distinct from the richer per-entry `usage` on {@link RevTurbineUserContext}.
 */
type RevTurbineUpdateInput = Omit<RevTurbineUserContext, 'id' | 'usage'> & {
    /** Usage balances to merge into the current snapshot (absolute values). */
    usage?: UsageBalances;
};
/**
 * Runtime mirror of {@link RevTurbineUpdateInput}'s keys — the fields
 * `update()` patches. `satisfies` guards each entry against typos/renames;
 * `update-keys-exhaustiveness.test-d.ts` (compiled by
 * `pnpm check:types:exact`) derives the reverse direction, so a
 * schema-added context field fails the build until it is acknowledged here
 * or omitted from the browser input types (BL-0352). JS callers' keys
 * outside this set are dropped with a warning rather than merged into the
 * context.
 */
declare const RECOGNIZED_UPDATE_KEYS: readonly ["usage", "addons", "account_id", "email", "email_type", "plan_handle", "plan", "trial", "payment_failed", "payment_at_risk", "tiers", "entitlements", "instances", "custom", "personalization", "experiments", "derived_config_version", "context_hash", "derived_computed_at"];
/**
 * The top-level {@link RevTurbineUpdateInput} keys
 * {@link RevTurbineCustomerSdk.update} patches (the entries of
 * {@link RECOGNIZED_UPDATE_KEYS}). Exported for type-level exhaustiveness
 * checks; it has no runtime value.
 */
type RecognizedUpdateKey = (typeof RECOGNIZED_UPDATE_KEYS)[number];
/** Usage snapshot entry for a usage unit. */
interface RevTurbineUsageSnapshotEntry {
    /** Current consumed amount for the usage unit. */
    current: number;
    /** Configured limit for the usage unit when available. */
    limit?: number;
}
/** Map of usage unit -> usage snapshot. */
type RevTurbineUsageSnapshot = Record<string, RevTurbineUsageSnapshotEntry>;
/** Snapshot of policy-related SDK runtime settings and loaded config metadata. */
interface RevTurbinePolicySnapshot {
    contextPolicy: Required<RevTurbineContextPolicy>;
    placementBehavior: RevTurbinePlacementBehaviorFlags;
    runtimeMode: RevTurbineRuntimeMode;
    /** `format_version` of the loaded Playbook, when the artifact declares one. */
    playbookVersion?: string;
    /**
     * @deprecated Renamed to {@link RevTurbinePolicySnapshot.playbookVersion}
     * (BL-0156). Still emitted with the identical value; removed in
     * `0.13.0`. Read `playbookVersion`.
     */
    exportedConfigVersion?: string;
}
type RevTurbinePersonalizationTokens = Record<string, string | number>;
/**
 * Snapshot of the active targeting context used by placement eligibility.
 */
interface RevTurbineTargeting extends UserTargetingContext {
    /** Segment definitions configured in the active RevTurbineConfig. */
    configuredSegments: RevTurbineConfigSegmentsItem[];
    /** Predicate fields discovered from configured segments (targeting dimensions). */
    configuredTraitFields: string[];
}
/**
 * Payload shape accepted by {@link RevTurbineCustomerSdk.hydrate}.
 *
 * This is a re-export of the generated `ServerEvaluationPayload` from the
 * schema, which is the contract between the server-side SDK's `evaluate()`
 * output and the client-side SDK's hydration input.
 */
type ServerEvaluationHydrationPayload = ServerEvaluationPayload;
/**
 * SDK-local user context state.
 *
 * Extends the canonical {@link UserContextInput} with a local `id` field
 * for user identification. The full persistence-ready {@link UserContext}
 * (with `tenant_id`, `user_id`, timestamps) is built by the SDK via
 * {@link RevTurbineCustomerSdk.getUserContext getUserContext()}.
 *
 * `custom` is widened to `Record<string, unknown>` at the SDK boundary
 * for customer convenience; values are narrowed to `TraitValue` when
 * persisted via the API.
 *
 * `seat_type_handle` is omitted on purpose (plan 279, D-36). A user's seat
 * type is assigned only server-side: by the tenant's backend through a
 * server-key user-context upsert, or by RevTurbine's enrichment in hosted
 * mode. The browser never writes it, so neither `identify()`, `update()`,
 * `setUserContext()` nor the `user` init option accepts it. The browser
 * receives the resolved `seat_type` / `buyer_role` as built-in dimensions
 * delivered by `GET /api/sdk/client-context` instead. The server-computed
 * `activity_score` / `activity_score_computed_at` are omitted on the same
 * principle (BL-0352); the browser receives the derived `activity_level`
 * dimension.
 *
 * `builtin_dimensions` is omitted too (D-46, BL-0381): the browser never
 * asserts a built-in dimension value. The SDK holds the values
 * `fetchClientContext` delivers and stamps the reserved `rt_<dimension>`
 * segment traits from them; read them back through
 * {@link RevTurbineCustomerSdk.getUserContext getUserContext()}. A plain-JS
 * caller that passes any of these keys has them dropped and reported at
 * runtime.
 */
interface RevTurbineUserContext extends Omit<UserContextInput, 'custom' | 'entitlements' | 'usage' | 'personalization' | 'derived_computed_at' | 'context_hash' | ServerAssignedUserContextKey> {
    /** Authenticated user identifier. When undefined, the SDK uses an anonymous ID. */
    id?: string;
    /**
     * Server-computed derived-entitlement cache stamp (plan 74). Optional at the
     * SDK input boundary — local mode does not compute it; the control plane
     * populates and round-trips it, defaulting to `null` when absent.
     */
    derived_computed_at?: UserContextInput['derived_computed_at'];
    /**
     * Server-computed user-context hash (plan 74). Optional at the SDK input
     * boundary for the same reason as `derived_computed_at`.
     */
    context_hash?: UserContextInput['context_hash'];
    /** Customer-defined fields for segmentation and personalization. */
    custom?: SdkTraits;
    /**
     * App-supplied entitlement data, keyed by handle — a boolean or a grant
     * (`status`, `limit`, `used`). This is Entitlement Mirroring (D-61): it
     * merges with the Playbook evaluation, and by default the app's data wins.
     * Browser-supplied data shapes the UI only; the server re-check on the
     * same inputs stays authoritative for paid actions.
     */
    entitlements?: UserContextInput['entitlements'];
    /** Usage entries derived from credits / usage_limit entitlements, keyed by handle. */
    usage?: UserContextInput['usage'];
    /**
     * Transient personalization token map.
     *
     * Holds SDK-derived tokens (plan_name, usage_current, etc.) merged with
     * app-provided tokens.  Not persisted — rebuilt on each SDK session.
     * Widened to accept `unknown` at the SDK boundary; narrowed to
     * `string | number` when serialized.
     */
    personalization?: SdkTraits;
}
/** Page-level context automatically inferred or manually set. */
interface RevTurbinePageContext {
    /** Fully qualified page URL. */
    url?: string;
    /** Document title. */
    title?: string;
    /** HTTP referrer. */
    referrer?: string;
    /** Semantic tags for page classification (e.g. `['pricing', 'upgrade']`). */
    tags?: string[];
}
/**
 * Controls automatic context inference behavior.
 * All flags default to `true` when omitted.
 */
interface RevTurbineContextPolicy {
    /** Infer anonymous user context from browser APIs. */
    inferUser?: boolean;
    /** Infer page context (URL, title, referrer) from `window.location`. */
    inferPage?: boolean;
    /** Automatically track SPA route changes via History API patching. */
    routerAutoTrack?: boolean;
}
/**
 * Feature flags for placement pipeline behavior that may alter decision semantics.
 *
 * Each flag defaults to what the loaded Playbook authors (plan 174 TASK-2 /
 * F-72): authored payload caps (`caps.max_per_period` / `caps.cooldown_days`
 * or a `remind_later_minutes` window) turn on client caps enforcement; a
 * `gated`-category placement turns on auto gated placement; a
 * `trials`-category placement turns on trial auto-triggers. A Playbook that
 * authors none of these leaves every flag `false` — existing integrations
 * whose config authors nothing are unchanged. An explicit
 * {@link RevTurbineInitOptions.placementBehavior} value (true or false)
 * always overrides the derived default.
 */
interface RevTurbinePlacementBehaviorFlags {
    /** Enable client-side payload cap enforcement (max-per-period + cooldown precedence). */
    enableClientCapsEnforcement: boolean;
    /** Enable automatic gated placement rendering helpers on entitlement denial. */
    enableAutoGatedPlacement: boolean;
    /** Enable automatic trial lifecycle trigger derivation in local-only mode. */
    enableTrialAutoTriggers: boolean;
}
/** Resolver function for a UI path action type. */
type RevTurbineUiPathResolver = (uiPath: JsonObject) => void | Promise<void>;
/** Map of `action_type` -> resolver implementation supplied by the customer app. */
type RevTurbineUiPathResolverMap = Record<string, NonNullable<RevTurbineUiPathResolver>>;
/** Extracts `action_type` string literals from a UI path array type. */
type RevTurbineUiPathActionTypes<TUiPaths extends readonly unknown[]> = Extract<{
    [Index in keyof TUiPaths]: TUiPaths[Index] extends {
        action_type: infer ActionType;
    } ? ActionType : never;
}[number], string>;
/** Resolver map that requires handlers for every `action_type` present in `TUiPaths`. */
type RevTurbineRequiredUiPathResolvers<TUiPaths extends readonly unknown[]> = {
    [ActionType in RevTurbineUiPathActionTypes<TUiPaths>]: RevTurbineUiPathResolver;
};
/**
 * Compile-time helper for authoring complete UI-path resolver maps.
 *
 * When `uiPaths` is provided as a `const` array, TypeScript enforces that
 * `resolvers` contains every `action_type` key.
 */
declare function defineUiPathResolvers<const TUiPaths extends readonly unknown[]>(uiPaths: TUiPaths, resolvers: RevTurbineRequiredUiPathResolvers<TUiPaths> & RevTurbineUiPathResolverMap): RevTurbineUiPathResolverMap;
interface RevTurbineUiPathResolverValidationIssue {
    uiPathId?: string;
    name?: string;
    actionType: string;
    reason: 'missing_resolver' | 'missing_action_type';
}
interface RevTurbineUiPathResolverValidationReport {
    valid: boolean;
    totalUiPaths: number;
    resolvedUiPaths: number;
    issues: RevTurbineUiPathResolverValidationIssue[];
}
interface RevTurbineUiPathResolverValidationOptions {
    /** Optional explicit UI path definitions to validate. Defaults to the local Playbook's content_ui_paths. */
    uiPaths?: ContentUiPath[];
    /** Additional action resolver map to validate against for this invocation. */
    resolvers?: RevTurbineUiPathResolverMap;
    /** Include CTA handler provider resolvers from domain providers. Default true. */
    includeProviderHandlers?: boolean;
    /** Throw when missing resolver coverage is detected. Default false. */
    throwOnMissing?: boolean;
}
/**
 * Provider abstraction for Playbook access inside the SDK.
 *
 * Local mode typically uses a static provider backed by `localRuntime.playbook` (or its deprecated `exportedConfig` alias).
 * Other modes can provide custom or REST-backed resolvers via `refresh()`.
 *
 * Implement **`getPlaybook()`** — `getExportedConfig()` is the deprecated
 * spelling of the same accessor, kept so an already-shipped implementation
 * keeps compiling. Both are optional *on this interface* so that neither
 * spelling breaks an existing `implements` clause; the
 * {@link RevTurbineInitOptions.configProvider} option intersects this with a
 * union that still requires exactly one of them, so a provider supplying
 * neither remains a compile error at the call site it is passed to.
 */
interface RevTurbineConfigProvider {
    /** Return the latest available Playbook snapshot. */
    getPlaybook?(): ConfigArtifact | undefined;
    /**
     * @deprecated Renamed to {@link RevTurbineConfigProvider.getPlaybook} —
     * `Playbook` is the canonical name for the artifact (BL-0156). Still fully
     * supported: implement either one. When both are present `getPlaybook()`
     * wins. Removed in `0.13.0`.
     */
    getExportedConfig?(): ConfigArtifact | undefined;
    /** Optionally refresh the snapshot (for example, from a REST API). */
    refresh?(): Promise<ConfigArtifact | undefined>;
}
/**
 * A {@link RevTurbineConfigProvider} that supplies at least one of the two
 * Playbook accessors. This is the shape the SDK actually accepts — the bare
 * interface leaves both optional only so an existing `implements` clause keeps
 * compiling.
 */
type RevTurbineConfigProviderInput = RevTurbineConfigProvider & ({
    getPlaybook(): ConfigArtifact | undefined;
} | {
    /** @deprecated Implement `getPlaybook()` instead. Removed in `0.13.0`. */
    getExportedConfig(): ConfigArtifact | undefined;
});
/**
 * Read a Playbook out of a customer-supplied provider, whichever accessor it
 * implements.
 *
 * `getPlaybook()` is canonical; `getExportedConfig()` is the deprecated
 * spelling. This is the ONE place that decides precedence, so no call site can
 * disagree about which accessor wins — the same single-resolver rule plan 257
 * established for `resolveBrowserPublicKey`.
 *
 * @internal
 */
declare function resolveProviderPlaybook(provider: RevTurbineConfigProvider): ConfigArtifact | undefined;
/**
 * @deprecated Renamed to {@link RevTurbineConfigProvider} (plan 104). Kept as a
 * back-compat alias so existing integrations keep compiling. Removed in
 * `0.13.0` alongside the other `ExportedConfig`-spelled aliases (BL-0156). Use
 * `RevTurbineConfigProvider`.
 */
type ExportedConfigProvider = RevTurbineConfigProvider;
/**
 * The Playbook-named counterpart of the deprecated
 * {@link ExportedConfigProvider} alias (BL-0156).
 *
 * Identical to {@link RevTurbineConfigProvider}, which remains the primary
 * name. This exists so code migrating off `ExportedConfigProvider` has a
 * Playbook-spelled name to land on rather than only the `RevTurbineConfig`
 * one.
 */
type PlaybookProvider = RevTurbineConfigProvider;
/**
 * Options for initializing the RevTurbine SDK.
 *
 * @example
 * ```ts
 * import { initRevTurbine } from '@revturbine/sdk';
 *
 * const session = await initRevTurbine({
 *   publicKey: 'rtk_…', // your ingest key; add your app's origin to its allowed origins
 *   mode: 'react',
 * });
 * ```
 */
/**
 * Behavior-telemetry consent state (plan 144 TASK-8 / REQ-11).
 *
 * - `granted` — emit normally (the default when the `telemetry` option is omitted).
 * - `denied` — prevent event **creation**; nothing reaches ingest, consumers, or
 *   integrations.
 * - `pending` — like `denied` in MVP: events are dropped and never persisted.
 */
type TelemetryConsent = 'granted' | 'denied' | 'pending';
/** Behavior-telemetry configuration (plan 144). */
interface RevTurbineTelemetryOptions {
    /**
     * Consent gate for behavior telemetry. Defaults to `granted`. `denied` and
     * `pending` both stop event creation, so no clickstream event reaches ingest,
     * a registered {@link RevTurbineEventConsumer}, or an integration. Change it at
     * runtime with {@link RevTurbineCustomerSdk.setTelemetryConsent} — no provider
     * remount is needed (REQ-12). Independent of
     * {@link RevTurbineInitOptions.anonymousTelemetry}, which governs the keyless
     * SDK-init beacon (REQ-13).
     */
    consent?: TelemetryConsent;
}
interface RevTurbineInitOptions {
    /**
     * Your RevTurbine tenant identifier — **optional whenever a
     * {@link publicKey} is supplied** (BL-0335, `0.11.14`).
     *
     * The public key is bound to exactly one tenant, so the control plane
     * resolves the tenant from the key alone and the SDK reads it back from the
     * launched Playbook it fetches (the signed manifest's and the Playbook's
     * `tenant_id`). Passing a tenant id as well is still accepted, but the key
     * is the sole arbiter of the tenant (D-49): when the key-authenticated
     * delivery names a different tenant, the SDK warns once per init
     * (`tenantId <x> does not match the key's tenant <y>; using <y>`) and adopts
     * the key's tenant. The control plane likewise ignores a mismatching tenant
     * id (with a server-side warning); it never refuses the request.
     *
     * Still required when there is no public key to identify the tenant — a
     * `local_only` init without `localRuntime.playbook` (with one, the SDK
     * defaults it to `'local'`), or a server-key (`apiKey`) headless init. The
     * SDK throws a descriptive error at init when neither is present.
     */
    tenantId?: string;
    /**
     // @revturbine-graph configuration:revturbine-sdk-internal:web-sdk/customer-side.ts#RevTurbineInitOptions
     * Your **public key** — the browser credential.
     *
     * Mint one in your RevTurbine tenant under **Settings → API Token
     * Management → Ingest Keys**, and add every origin that loads the SDK to its
     * allowed origins (the list fails closed). It is a tenant-scoped `rtk_…`
     * token of type `public`:
     * it authorizes event ingestion (`POST /api/track`) and the read-only
     * SDK fetches (launched Playbook, user context, branding) and carries
     * no role authority, so it is safe to ship in client bundles. The
     * name says what it is — a scanner or an agent that meets `publicKey`
     * in a bundle knows it is meant to be there.
     *
     * Never pass a **server key** here. The server key (type `server`) is
     * the backend credential for `RevTurbineServer` (exported from
     * `@revturbine/sdk/headless`), where it is the `apiKey` option; the
     * control plane refuses it on browser-like requests.
     *
     * Required for hosted runtime modes. Optional for `local_only`, where
     * the SDK fills a placeholder.
     */
    publicKey?: string;
    /**
     * Your **server key** — the secret backend credential.
     *
     * `apiKey` always means the secret server key (`rtk_…`, type `server`,
     * minted under **Settings → API Token Management → Server Token**), exactly
     * as it does on `RevTurbineServer`, which `@revturbine/sdk/headless`
     * exports: `new RevTurbineServer({ tenantId, apiKey, endpoint })` mints
     * client sessions from your server. Keep it in server-side code only.
     *
     * On a backend (no `window` / `document`), `initRevTurbine` authenticates
     * its Playbook delivery and event ingest with `apiKey` when it is supplied
     * (since 0.12.2): a hosted `RuntimeMode.Server` instance in a Node server
     * loads and refreshes the launched Playbook and reports events, with no
     * `publicKey`. Create one instance per process, outside the request
     * handler. The theme API always takes {@link publicKey}.
     *
     * In the browser, pass {@link publicKey} instead. As of `0.11.0` `apiKey`
     * is **no longer accepted as an alias of the public key** (BL-0113): a
     * browser init that supplies only `apiKey` resolves no browser credential
     * and fails at init rather than silently sending a server key — or a
     * placeholder — as the bearer. The `0.10.0` alias window is closed.
     */
    apiKey?: string;
    /**
     * Optional Ed25519 trust store for signed Playbook manifests.
     *
     * When supplied, hosted delivery activates a manifest only after its
     * detached signature verifies against one of these keys. When omitted,
     * transport and content-hash integrity still apply. Manifest activation
     * windows are enforced in both modes, so an expired manifest is never used.
     */
    trustedManifestKeys?: readonly TrustedKey[];
    /**
     * Environment identifier stamped on every ingested clickstream event
     * (`TrackEvent.environment_id`, e.g. `'production'` / `'staging'`). Lets a
     * tenant separate analytics by deployment environment. Defaults to
     * `'production'` when omitted, empty, or whitespace-only.
     */
    environmentId?: string;
    /**
     * Locale used to format Playbook-backed price tokens. When omitted, the
     * host runtime locale is used by `Intl.NumberFormat`.
     */
    locale?: string;
    /**
     * Test-traffic marker (plan 164).
     *
     * Set to `true` when this SDK instance generates **test traffic** — a
     * staging deploy, an integration test, a QA walkthrough. Every emitted
     * event (clickstream via `POST /api/track` and treatment interactions via
     * `POST /api/events/interactions`) is then stamped `test: true`, and
     * RevTurbine analytics **exclude those events by default** from every
     * metric, rollup, and denominator; an `include_test` toggle reveals them.
     *
     * This is a deliberate, code-passed decision: pass it explicitly from your
     * own configuration. The SDK never infers it from the environment (no
     * `NODE_ENV` sniffing) — whether traffic is test traffic is your call, not
     * a deployment artifact. Off by default (`false`); omitted or `false`
     * emits events unchanged.
     */
    test?: boolean;
    /**
     * Analytics/clickstream telemetry opt-out.
     *
     * Analytics is **on by default** (`true`). Set to `false` to opt out:
     * the SDK then emits **no** clickstream events to `POST /api/track`
     * across every path (`capture` / `track` / batched flush / page-unload).
     * Locally-registered {@link RevTurbineEventConsumer} adapters and
     * `local_only` runtime state are unaffected — this flag governs only the
     * RevTurbine ingest network call.
     *
     * Note: this opt-out covers the authed clickstream. The separate keyless
     * anonymous SDK-init beacon has its own opt-out ({@link anonymousTelemetry}).
     */
    analytics?: boolean;
    /**
     * Keyless anonymous SDK-init telemetry opt-out (plan 95).
     *
     * When **no** {@link publicKey} is configured, the SDK sends a single
     * anonymous `sdk_init` beacon to `POST /api/sdk/meta` carrying config-shape
     * **counts only** (number of plans, entitlements, placements, etc.), the SDK
     * version, runtime/schema/bundle versions, and a one-way hashed config id —
     * **never** any user, account, or PII context. It powers RevTurbine's
     * SDK-adoption metrics for installs that haven't wired an ingest key.
     *
     * On by default (`true`). Set to `false` to opt out entirely; the SDK then
     * sends no keyless telemetry. When active, the SDK logs a one-time info
     * console notice naming this flag. Has no effect once a `publicKey`
     * is present (that path uses the authed clickstream instead). This beacon
     * fires in every runtime mode, `local_only` included — a bundled-Playbook
     * install is still a real install worth counting. To silence it for a
     * non-install render (a docs example, a component preview), use
     * {@link previewMode} instead of this customer-facing opt-out.
     */
    anonymousTelemetry?: boolean;
    /**
     * Preview / example render marker.
     *
     * Set to `true` when this SDK instance is **not** a real installation but a
     * throwaway render — a documentation example, a live playground, a component
     * preview, a screenshot harness. The only current effect is that the keyless
     * anonymous `sdk_init` beacon (see {@link anonymousTelemetry}) is suppressed,
     * so these renders never inflate SDK-adoption metrics. Unlike
     * `anonymousTelemetry: false`, this reads as "this isn't an install" rather
     * than a customer opting out of telemetry, and it is reserved for future
     * preview-only behavior.
     *
     * Off by default (`false`).
     */
    previewMode?: boolean;
    /**
     * Behavior-telemetry configuration (plan 144). Currently carries
     * {@link RevTurbineTelemetryOptions.consent}, the granted/denied/pending gate
     * over event creation. Omit it entirely to keep the default `granted`
     * behavior — no change from prior versions.
     */
    telemetry?: RevTurbineTelemetryOptions;
    /**
     * Client-side clickstream batching policy (plan 95). Events are buffered and
     // @revturbine-graph configuration:revturbine-sdk-internal:web-sdk/customer-side.ts#RevTurbineInitOptions
     * flushed to `POST /api/track` on whichever comes first: the batch reaching
     * {@link RevTurbineEventBatchingOptions.maxBatchSize}, the
     * {@link RevTurbineEventBatchingOptions.flushIntervalMs} timer elapsing, or a
     * page-unload signal (`pagehide` / `visibilitychange: hidden`). Tune for
     * low-volume sessions that would otherwise strand events.
     */
    eventBatching?: RevTurbineEventBatchingOptions;
    /**
     * Base URL of the RevTurbine control plane. Defaults to
     * {@link DEFAULT_HOSTED_ENDPOINT}; set it only for a proxy or a self-hosted
     * edge. Local mode ignores it.
     */
    endpoint?: string;
    /**
     * SDK integration mode. Labels telemetry only. Defaults to
     * {@link DEFAULT_SDK_MODE} (`'snippet'`); `<RevTurbineProvider>` passes `'react'`.
     */
    mode?: RevTurbineSdkMode;
    /**
     * SDK deployment/runtime mode:
     * - `revturbine_server` (default): standard RevTurbine-hosted endpoints.
     * - `custom_endpoints`: customer-provided endpoint replacements.
     * - `local_only`: no server calls, runtime data initialized locally.
     */
    runtimeMode?: RevTurbineRuntimeMode;
    /** Optional endpoint overrides used in `custom_endpoints` mode. */
    endpointOverrides?: Partial<RevTurbineEndpointOverrides>;
    /**
     * Optional provider for Playbook-backed data (plans, segments, rules, ui paths).
     *
     * Must implement `getPlaybook()` — or the deprecated `getExportedConfig()`,
     * accepted for one minor. The union is spelled here rather than on
     * {@link RevTurbineConfigProvider} so that an existing `implements
     * RevTurbineConfigProvider` clause keeps compiling while a provider
     * implementing *neither* accessor is still rejected at this call site.
     */
    configProvider?: RevTurbineConfigProviderInput;
    /** Local-only runtime configuration used in `local_only` mode. */
    localRuntime?: RevTurbineLocalRuntimeOptions;
    /**
     * Slot behavior after provider-chain failure disables the SDK.
     * - `invisible` (default): slots return hidden decisions.
     * - `placeholder`: slots return visible placeholder content.
     */
    providerFailureSlotBehavior?: RevTurbineProviderFailureSlotBehavior;
    /** Typed domain providers (plan, entitlements, segments, content, rules, traits). */
    domainProviders?: AnyDomainProvider[];
    /** Maximum time for one client experiment provider resolution. Default: 5000ms. */
    experimentProviderTimeoutMs?: number;
    /**
     * Canonical-version declarations for `experiment_assigned` assignment facts
     * (plan 224, war-games spec §9.1).
     *
     * The assignment fact's (experiment handle, experiment version) pair is the
     * SRM join key, and the runtime assignment snapshot deliberately carries
     * handles only — so a fact is emitted **only** for experiments declared
     * here (or via `CanonicalExperimentAllocation.sequence` on the native
     * provider, which declares automatically). Works for ANY assignment source:
     * native bucketer, external adapters (GrowthBook, Optimizely, custom), and
     * caller-supplied `user.experiments` assignments alike. An assigned
     * experiment with no declaration emits no fact rather than one with a
     * fabricated version; unenrolled subjects emit nothing — not-enrolled is
     * absence. Entries here override a provider-derived declaration for the
     * same handle.
     */
    experimentAssignmentFacts?: readonly ExperimentAssignmentFactDeclaration[];
    /** Optional UI path resolver map used by `validateUiPathResolvers()`. */
    uiPathResolvers?: RevTurbineUiPathResolverMap;
    /**
     * App-owned handlers for CTA-triggered server mutations.
     *
     * A handler calls your backend and returns fresh server-authoritative user
     * context. On success the SDK merges that context and re-evaluates mounted
     * decisions. `extend_trial` is the documented v1 action. A matching
     * `uiPathResolvers` or explicit `registerCtaResolver()` entry takes
     * precedence.
     */
    serverActions?: ServerActionMap;
    user?: RevTurbineUserContext;
    /**
     * Mint a short-lived client-session token (`rt_client_`, plan 157) for the
     * signed-in user — the SDK's hook into server-authoritative context
     * (plan 191 REQ-5 / Q-6).
     *
     * Supply this and the purchase-to-plan loop closes itself: the SDK fetches
     * `GET /api/sdk/client-context` on your behalf, so a Stripe webhook that
     * changes the user's plan reaches client decisions with **no app code** —
     * previously the enrichment path existed but nothing ever called it.
     *
     * A **callback**, not a token value, because these tokens carry a ~10-minute
     * TTL: a static string would go stale mid-session. The SDK calls this when
     * it first needs a token, again after `identify()` (a new user needs a new
     * token), and again when the control plane rejects one as expired — so
     * short TTLs stay an implementation detail of your backend.
     *
     * The token is transport credential, never user context: it is held in
     * memory only, never persisted, never logged, never put in a URL, and never
     * merged into the context the app can set. Rejections are swallowed —
     * enrichment is best-effort and never breaks the host app.
     *
     * @example
     * ```ts
     * initRevTurbine({
     *   publicKey: 'rtk_…',
     *   user: { id: 'user_123', plan_handle: 'free' },
     *   clientSession: () =>
     *     fetch('/api/revturbine-session', { method: 'POST' })
     *       .then((r) => r.json())
     *       .then((j) => j.client_token),
     * });
     * ```
     */
    clientSession?: RevTurbineClientSessionProvider;
    page?: RevTurbinePageContext;
    contextPolicy?: RevTurbineContextPolicy;
    /**
     * Explicit overrides for placement decision behavior flags.
     *
     * When omitted, each flag derives from what the loaded Playbook authors —
     * caps authored → enforcement on; gated placements authored → auto-gating
     * on; trial placements authored → trial triggers on (plan 174 TASK-2 /
     * F-72). Set a flag here (true or false) to pin it regardless of the
     * Playbook.
     */
    placementBehavior?: Partial<RevTurbinePlacementBehaviorFlags>;
    /**
     * How app-supplied entitlement data (`userContext.entitlements`, an app
     * entitlement provider) merges with the Playbook evaluation (D-61).
     * Provider-level `precedence` defaults to `'app'`; `fields` overrides it
     * per field (`status`, `limit`, `used`, `remaining`). Use the same value
     * on your server SDK so verification matches.
     */
    entitlementMerge?: EntitlementMergeOptions;
    extension?: {
        enabled?: boolean;
    };
    /**
     * Persistent storage provider (survives page reloads).
     * Browser default: `localStorage`. Server default: in-memory.
     * Override with a Redis/cookie/DB-backed implementation for SSR persistence.
     */
    persistentStorage?: RevTurbineStorage;
    /**
     * Session-scoped storage provider (cleared when the tab/session ends).
     * Browser default: `sessionStorage`. Server default: in-memory.
     */
    sessionStorage?: RevTurbineStorage;
    /**
     * Explicit branding — theme tokens, workspace name, logo, support email — the
     * top rung of the branding resolution ladder (plan 118). Branding is a display
     * concern only: it never affects placement decisions or entitlement checks and
     * is not part of the compiled Bundle. When omitted, {@link getBranding} falls
     * back to the config's legacy embedded `theme` (deprecated), then
     * {@link apiBranding}, then {@link DEFAULT_BRANDING}. See {@link resolveBranding}.
     */
    branding?: BrandingConfig;
    /** Display palette for embedded theme defaults; defaults to light. */
    colorScheme?: 'light' | 'dark';
    /**
     * Branding fetched from the RevTurbine Branding API or a workspace-settings
     * source, supplied by the host. The third rung of the branding ladder — used
     * when no explicit {@link branding} and no legacy config-embedded theme apply.
     */
    apiBranding?: BrandingConfig;
    /**
     * Fetch the tenant's theme overrides from the control plane's
     * `GET /api/sdk/theme` and apply them OVER the launched Playbook's theme
     * (plan 184).
     *
     * Opt-in and `false` by default, deliberately: the SDK otherwise issues no
     * theme request at all, so an integration with no branding configured never
     * pays a round-trip — and never logs a failed one. Enable it when branding is
     * managed from the RevTurbine dashboard and should change without a redeploy.
     *
     * Independent of {@link apiBranding}, which is the same rung supplied by the
     * host instead of fetched by the SDK.
     *
     * Applies to `<RevTurbineProvider>` and headless `initRevTurbine()` alike.
     * The request authenticates with {@link publicKey} only, which also names
     * the tenant; with no public key nothing is fetched (BL-0477).
     */
    fetchThemeOverride?: boolean;
}
/** Base init options shared by all runtime mode helper builders. */
type RevTurbineInitBaseOptions = Omit<RevTurbineInitOptions, 'runtimeMode' | 'endpointOverrides' | 'localRuntime'>;
/**
 * Runtime-mode values (plan 144). Reference these constants instead of raw
 * string literals when setting {@link RevTurbineInitOptions.runtimeMode} — e.g.
 * `runtimeMode: RuntimeMode.LocalOnly`.
 */
declare const RuntimeMode: {
    /** Standard RevTurbine-hosted endpoints (the default). */
    readonly Server: "revturbine_server";
    /** Customer-provided endpoint replacements. */
    readonly CustomEndpoints: "custom_endpoints";
    /**
     * No server calls — runtime data is initialized locally from
     * {@link RevTurbineInitOptions.localRuntime}. Emits **no telemetry** (neither
     * the `/api/track` clickstream nor the keyless `/api/sdk/meta` beacon), which
     * makes it the correct mode for demos and examples so they never report events.
     */
    readonly LocalOnly: "local_only";
};
/** The set of valid runtime modes (plan 144), derived from {@link RuntimeMode}. */
type RevTurbineRuntimeMode = (typeof RuntimeMode)[keyof typeof RuntimeMode];
/**
 * Per-operation endpoint path/URL overrides for `custom_endpoints` mode.
 * Each key maps to a fully-qualified URL or an `endpoint`-relative path.
 */
interface RevTurbineEndpointOverrides {
    decideContext: string;
    bootstrapContext: string;
    decide: string;
    getPlacement: string;
    checkEntitlement: string;
    userContext: string;
    /** Secure per-user client-safe context read (`GET /api/sdk/client-context`, plan 157). */
    clientContext?: string;
    trialStatus: string;
    ingestEvents: string;
    /** Keyless anonymous SDK telemetry endpoint (`POST /api/sdk/meta`). */
    ingestSdkMeta: string;
    touchpointTransition: string;
    /**
     * @deprecated Ignored since plan 232. This pointed at a fallback the SDK
     * retried when the interactions POST failed — against a route the app does
     * not serve, with the internal queue shape rather than the wire shape, so it
     * could only ever 404. Setting it has no effect; the key remains so an
     * existing integration that passes it still compiles.
     */
    legacyInteractions?: string;
    placementTypes: string;
    /**
     * Optional sink for registered surface slots.
     *
     * RevTurbine hosts **no default route** for this verb (BL-0197). Slot
     * registration is client-local and discovery is ingestion-driven — the
     * pipeline derives discovered slots from the `slot_*` telemetry the SDK
     * already emits through `/api/track`. Set this only when you run your own
     * slot-inventory service; unset, `registerSurfaceSlot()` performs no
     * network write.
     */
    surfaceSlots: string;
}
/** Client-side clickstream batching policy (plan 95 TASK-6). */
interface RevTurbineEventBatchingOptions {
    /**
     * Flush the buffer once this many events are queued. Default `20`.
     * Clamped to a minimum of `1`.
     */
    maxBatchSize?: number;
    /**
     * Also flush the buffer on this interval, in milliseconds, so low-volume
     * sessions don't strand events. Default `5000`. Set to `0` to disable the
     * timer (size + page-unload flushing still apply).
     */
    flushIntervalMs?: number;
}
interface RevTurbineLocalRuntimeData {
    placementDecisionsByPlacementId?: Record<string, RevTurbinePlacementDecision>;
    entitlementByHandle?: Record<string, EntitlementResult>;
    userContextByUserId?: Record<string, UserTargetingContext>;
    trialStatus?: RevTurbineTrialContext;
}
interface RevTurbineLocalRuntimeResolvers {
    getPlacementDecision?: (input: RevTurbinePlacementDecisionInput, placement?: RevTurbinePlacementRecord, context?: JsonObject) => RevTurbinePlacementDecision | Promise<RevTurbinePlacementDecision>;
    getPlacement?: (config: RevTurbinePlacementRequestConfig) => PlacementOutput | null | Promise<PlacementOutput | null>;
    checkEntitlement?: (handle: string, context?: RevTurbineEntitlementContext) => EntitlementResult | Promise<EntitlementResult>;
    fetchUserContext?: (userId: string) => UserTargetingContext | Promise<UserTargetingContext>;
    getTrialStatus?: () => RevTurbineTrialContext | Promise<RevTurbineTrialContext>;
    /** Optional Playbook resolver for provider-backed config access in any mode. */
    resolvePlaybook?: () => ConfigArtifact | Promise<ConfigArtifact>;
    /**
     * @deprecated Renamed to {@link RevTurbineLocalRuntimeResolvers.resolvePlaybook}
     * — `Playbook` is the canonical name for the artifact (BL-0156). Still fully
     * supported: pass either one. When both are supplied `resolvePlaybook` wins.
     * Removed in `0.13.0`.
     */
    resolveExportedConfig?: () => ConfigArtifact | Promise<ConfigArtifact>;
}
/**
 * Resolve the provider-backed Playbook resolver from either accepted key.
 *
 * `resolvePlaybook` is canonical; `resolveExportedConfig` is the deprecated
 * alias. The one place that decides precedence (BL-0156).
 *
 * @internal
 */
declare function resolvePlaybookResolver(resolvers?: Pick<RevTurbineLocalRuntimeResolvers, 'resolvePlaybook' | 'resolveExportedConfig'> | null): (() => ConfigArtifact | Promise<ConfigArtifact>) | undefined;
/**
 * Resolve the local-mode Playbook from either accepted key.
 *
 * `playbook` is canonical; `exportedConfig` is the legacy alias kept for
 * backwards compatibility. Both are optional at the type level, so this is the
 * one place that decides precedence — consumers must not read either key
 * directly or they will disagree about which one wins.
 *
 * The returned artifact may be the raw {@link UnvalidatedConfigArtifact} the
 * caller supplied (e.g. an imported JSON module); the runtime config pipeline
 * validates it via `configArtifactForRuntime` before evaluation.
 */
declare function resolveLocalPlaybook(localRuntime?: Pick<RevTurbineLocalRuntimeOptions, 'playbook' | 'exportedConfig'> | null): ConfigArtifact | UnvalidatedConfigArtifact | undefined;

interface RevTurbineLocalRuntimeOptions {
    /**
     * The {@link Playbook} the SDK evaluates against in local-only execution —
     * plans, entitlements, entitlement rules, segments, ui paths, surface
     * templates, trial, and theme. Providers and resolvers read this to hydrate
     * domain state without a server.
     *
     * Typically distributed as `revturbine.playbook.json`. Accepts the artifact
     * either as the typed {@link ConfigArtifact} or as raw parsed JSON
     * ({@link UnvalidatedConfigArtifact}) — `import playbook from
     * './revturbine.playbook.json'` passes `tsc --strict` directly, no cast
     * needed; the SDK validates the shape at init and fails fast on a malformed
     * artifact.
     *
     * Built-in segments (`rt.<dimension>.<value>`) need no definitions in the
     * file: the SDK adds them at load from RevTurbine's catalogue, with Seat Type
     * values taken from the Playbook's own `seat_types`. An authored segment
     * under the reserved `rt.` prefix is ignored.
     *
     * The definitions exist, but the values do not come from the app: the
     * browser never sets built-in dimensions (D-46, BL-0381). They reach the
     * SDK only from `GET /api/sdk/client-context` (a `clientSession` minter
     * backed by your server), so without that delivery every built-in segment
     * fails closed — a chip or rule naming one matches nobody.
     */
    playbook?: ConfigArtifact | UnvalidatedConfigArtifact;
    /**
     * @deprecated Legacy alias for {@link RevTurbineLocalRuntimeOptions.playbook}.
     * Still fully supported — pass either one. When both are supplied `playbook`
     * wins. Prefer `playbook`: it matches the canonical type name.
     */
    exportedConfig?: ConfigArtifact | UnvalidatedConfigArtifact;
    /** Optional static placements dataset used by the SDK's built-in local resolver. */
    placements?: LocalPlacementDataset;
    /**
     * Arbitrary configuration/context/content passed at initialization for local-only execution.
     * This is persisted under localStorage and used as runtime source-of-truth.
     */
    initialData?: RevTurbineLocalRuntimeData;
    /** Optional resolver callbacks for advanced local decisioning behavior. */
    resolvers?: RevTurbineLocalRuntimeResolvers;
    /** Optional explicit storage key for persisted local-only runtime state. */
    storageKey?: string;
    /**
     * Reactive context callback. When provided, the SDK calls this before every
     * local decision request and passes the result as the third argument to
     * `resolvers.getPlacementDecision`.
     *
     * This allows local resolvers to react to user context changes (plan state,
     * trial day, usage counters) without rebuilding the provider.
     */
    getContext?: () => JsonObject | Promise<JsonObject>;
}
type RevTurbineBaseInitWithoutRuntimeSpecifics = Omit<RevTurbineInitOptions, 'runtimeMode' | 'localRuntime' | 'uiPathResolvers'>;
/**
 * Strict initialization mode for compile-time safety:
 * when using `local_only` runtime with a Playbook (`localRuntime.playbook`, or
 * the legacy `localRuntime.exportedConfig`),
 * `uiPathResolvers` is required.
 */
type RevTurbineInitOptionsStrict = (RevTurbineBaseInitWithoutRuntimeSpecifics & {
    runtimeMode: 'local_only';
    localRuntime: RevTurbineLocalRuntimeOptions & ({
        playbook: ConfigArtifact;
    } | {
        /** @deprecated Use `playbook` — the canonical key for the same artifact. */
        exportedConfig: ConfigArtifact;
    });
    uiPathResolvers: RevTurbineUiPathResolverMap;
}) | (RevTurbineBaseInitWithoutRuntimeSpecifics & {
    runtimeMode: 'local_only';
    localRuntime: RevTurbineLocalRuntimeOptions & {
        playbook?: undefined;
        exportedConfig?: undefined;
    };
    uiPathResolvers?: RevTurbineUiPathResolverMap;
}) | (RevTurbineBaseInitWithoutRuntimeSpecifics & {
    runtimeMode?: Exclude<RevTurbineRuntimeMode, 'local_only'>;
    localRuntime?: RevTurbineLocalRuntimeOptions;
    uiPathResolvers?: RevTurbineUiPathResolverMap;
});
/**
 * Build a server-backed SDK config (default runtime mode).
 */
declare function createServerRuntimeConfig(options: RevTurbineInitBaseOptions): RevTurbineInitOptions;
/**
 * Build a custom-endpoint SDK config.
 */
declare function createCustomEndpointRuntimeConfig(options: RevTurbineInitBaseOptions & {
    endpointOverrides: Partial<RevTurbineEndpointOverrides>;
}): RevTurbineInitOptions;
/**
 * Build a local-only SDK config.
 */
declare function createLocalRuntimeConfig<const TUiPaths extends readonly unknown[]>(options: RevTurbineInitBaseOptions & {
    localRuntime: RevTurbineLocalRuntimeOptions & ({
        playbook: (Omit<RevTurbineConfig, 'content_ui_paths'> & {
            content_ui_paths: TUiPaths;
        }) | (Omit<Playbook, 'content_ui_paths'> & {
            content_ui_paths: TUiPaths;
        });
    } | {
        /** @deprecated Use `playbook` — the canonical key for the same artifact. */
        exportedConfig: (Omit<RevTurbineConfig, 'content_ui_paths'> & {
            content_ui_paths: TUiPaths;
        }) | (Omit<Playbook, 'content_ui_paths'> & {
            content_ui_paths: TUiPaths;
        });
    });
    uiPathResolvers: RevTurbineRequiredUiPathResolvers<TUiPaths> & RevTurbineUiPathResolverMap;
}): RevTurbineInitOptions;
declare function createLocalRuntimeConfig(options: RevTurbineInitBaseOptions & {
    localRuntime: RevTurbineLocalRuntimeOptions;
    uiPathResolvers?: RevTurbineUiPathResolverMap;
}): RevTurbineInitOptions;
/**
 * Build a strict local-only SDK config.
 *
 * Unlike {@link createLocalRuntimeConfig}, this helper always requires
 * `exportedConfig.content_ui_paths` and complete `uiPathResolvers` coverage at
 * compile time for action types present in that Playbook.
 */
declare function createStrictLocalRuntimeConfig<const TUiPaths extends readonly unknown[]>(options: RevTurbineInitBaseOptions & {
    localRuntime: RevTurbineLocalRuntimeOptions & ({
        playbook: (Omit<RevTurbineConfig, 'content_ui_paths'> & {
            content_ui_paths: TUiPaths;
        }) | (Omit<Playbook, 'content_ui_paths'> & {
            content_ui_paths: TUiPaths;
        });
    } | {
        /** @deprecated Use `playbook` — the canonical key for the same artifact. */
        exportedConfig: (Omit<RevTurbineConfig, 'content_ui_paths'> & {
            content_ui_paths: TUiPaths;
        }) | (Omit<Playbook, 'content_ui_paths'> & {
            content_ui_paths: TUiPaths;
        });
    });
    uiPathResolvers: RevTurbineRequiredUiPathResolvers<TUiPaths> & RevTurbineUiPathResolverMap;
}): RevTurbineInitOptions;
/** Optional context for slot-based placement requests. */
interface RevTurbineSlotPlacementRequestOptions {
    entitlementHandle?: string;
    planHandle?: string;
    placementHandle?: string;
}
/** Optional context for entitlement-based placement requests. */
interface RevTurbineEntitlementPlacementRequestOptions {
    slotId?: string;
    componentType?: RevTurbineComponentType;
    /** @deprecated Use `componentType`. */
    surfaceType?: RevTurbineSurfaceType;
    planHandle?: string;
    placementHandle?: string;
}
/** Optional context for chained placement requests. */
interface RevTurbineChainedPlacementRequestOptions {
    slotId?: string;
    componentType?: RevTurbineComponentType;
    /** @deprecated Use `componentType`. */
    surfaceType?: RevTurbineSurfaceType;
    entitlementHandle?: string;
    planHandle?: string;
}
/**
 * Create a typed placement request for slot + surface lookups.
 */
declare function createSlotPlacementRequest(slotId: string, componentType: RevTurbineComponentType, options?: RevTurbineSlotPlacementRequestOptions): RevTurbinePlacementRequestConfig;
/**
 * Create a typed placement request for entitlement-gated lookups.
 */
declare function createEntitlementPlacementRequest(entitlementHandle: string, options?: RevTurbineEntitlementPlacementRequestOptions): RevTurbinePlacementRequestConfig;
/**
 * Create a typed placement request for chained/CTA follow-up lookups.
 */
declare function createChainedPlacementRequest(placementHandle: string, options?: RevTurbineChainedPlacementRequestOptions): RevTurbinePlacementRequestConfig;
/**
 * Configuration for registering a placement slot.
 * The combination of name + route + scope key produces a deterministic placement ID.
 *
 * @deprecated Use `RevTurbineSurfaceSlotConfig`.
 */
interface RevTurbinePlacementConfig {
    /** Human-readable placement name (e.g. `'pricing_banner'`). */
    name: string;
    /** Optional scope key to differentiate placements on the same route. */
    placementScopeKey?: string;
    /** Arbitrary metadata attached to the placement for analytics. */
    metadata?: SdkMetadata;
}
/**
 * Canonical configuration for a renderable surface slot.
 *
 * `id` must be unique within the customer app integration.
 */
interface RevTurbineSurfaceSlotConfig {
    /** Required unique identifier for the surface slot. */
    id: string;
    /** Optional human-readable label used for analytics and debugging. */
    name?: string;
    /**
     * Surface template IDs that this slot accepts.
     *
     * When provided, only placements whose surface template matches one of
     * these IDs are eligible to render in this slot. This acts as a filter
     * at decision time — both the local resolver and the remote
     * decide-context endpoint use this constraint.
     */
    surfaceTemplateIds?: string[];
    /** Arbitrary metadata attached to the slot for analytics and traceability. */
    metadata?: SdkMetadata;
}

interface RevTurbinePlacementContent {
    placementId: string;
    requestId: string;
    decisionSource: 'remote' | 'fallback';
    content: RevTurbineDecisionContent;
}

interface RevTurbineBootstrapDecisionInput {
    userId: string;
    contextMode?: RevTurbineContextMode;
    overrides?: RevTurbinePlacementDecisionOverrides;
    traits?: Record<string, string | number | boolean>;
    ttlMs?: number;
    placementIds: string[];
}

/** Predicate-level evaluation detail for segment matching diagnostics. */
type RevTurbineSegmentPredicateEvaluation = PredicateEvaluationResult;
/** Segment-level evaluation detail for placement diagnostics. */
interface RevTurbineSegmentEvaluation {
    segmentId: string;
    segmentName?: string;
    matched: boolean;
    predicates: RevTurbineSegmentPredicateEvaluation[];
}
/** Entitlement-rule evaluation detail for placement diagnostics. */
interface RevTurbineEntitlementRuleEvaluation {
    ruleId: string;
    entitlementId?: string;
    entitlementHandle?: string;
    kind?: string;
    /** Human-readable plan scopes resolved from `planIds` (e.g. `starter`, `professional`). */
    planScopes: string[];
    planIds: string[];
    /**
     * Segment IDs the rule is scoped to. Empty array means "matches all users".
     * Evaluated with intra-dimension OR + cross-dimension AND per spec §2.5
     * (plan #39 REQ-8).
     */
    segmentIds?: string[];
    matchesPlan: boolean;
    matchesSegment: boolean;
    matched: boolean;
    outcome: EntitlementStatus | 'unknown';
    /** Human-readable description of what this rule grants (e.g. "grants access", "sets limit to 5,000 calls / month"). */
    outcomeDescription?: string;
    reason?: string;
}
/** Placement rule signals extracted from the selected placement output. */
interface RevTurbinePlacementRuleEvaluation {
    ruleId?: string;
    decisionId?: string;
    category?: string;
    suppressionReason?: string;
    reasonCodes: string[];
    capPolicies: Array<{
        count: number;
        period: 'session' | 'day' | 'week' | 'month' | 'lifetime';
        cooldownMs?: number;
    }>;
}
/** Placement payload eligibility detail for explainability UI. */
interface RevTurbinePlacementPayloadEvaluation {
    payloadId: string;
    placementId: string;
    placementName: string;
    status: 'draft' | 'active' | 'disabled';
    planIds: string[];
    planScopes: string[];
    segmentChips: string[];
    surfaceTemplateIds: string[];
    matchesPlan: boolean;
    matchesSegment: boolean;
    eligible: boolean;
    selected: boolean;
}
/** Structured explanation object for placement decision visualization. */
interface RevTurbinePlacementDecisionExplanation {
    generatedAt: string;
    input: RevTurbinePlacementDecisionInput;
    decision: RevTurbinePlacementDecision;
    targeting: RevTurbineTargeting;
    policy: RevTurbinePolicySnapshot;
    entitlements: Record<string, EntitlementResult>;
    segments: RevTurbineSegmentEvaluation[];
    entitlementRules: RevTurbineEntitlementRuleEvaluation[];
    eligiblePayloads: RevTurbinePlacementPayloadEvaluation[];
    placementRules: RevTurbinePlacementRuleEvaluation;
}

/**
 * Optional fields for constructing typed interaction payloads.
 */
interface RevTurbineTreatmentInteractionOptions {
    treatmentId?: string;
    interactionAt?: string;
    metadata?: SdkMetadata;
}
/**
 * Create a typed treatment interaction payload.
 */
declare function createTreatmentInteraction(userId: string, placementId: string, interactionType: RevTurbineTreatmentInteractionType, options?: RevTurbineTreatmentInteractionOptions): RevTurbineTreatmentInteractionInput;
interface RevTurbineEventOptions {
    immediate?: boolean;
}
/**
 * One surface slot this app currently has mounted.
 *
 * @public
 */
interface RevTurbineRegisteredSlot {
    /**
     * The author-facing slot id — what a Playbook placement's `trigger.slot_id`
     * must equal. NOT the internal hashed registry key.
     */
    slotId: string;
    /** Display name supplied at registration. */
    name: string;
    /** Normalized route the slot was mounted on. */
    route: string;
    /** The SDK's internal registry id (hashed). Useful when correlating logs. */
    internalId: string;
    /** Surface template ids the slot declared it can render, if any. */
    surfaceTemplateIds: string[];
}
/**
 * A Playbook placement that targets a surface slot.
 *
 * @public
 */
interface RevTurbineAuthoredSlotRef {
    /** The slot id the placement targets (`trigger.slot_id`). */
    slotId: string;
    /** The authored placement's id. */
    placementId: string;
    /** The placement's category, when the Playbook declares one. */
    category?: string;
}
/**
 * Result of {@link RevTurbineCustomerSdk.diagnoseSlotInventory}.
 *
 * @public
 */
interface RevTurbineSlotInventoryDiagnosis {
    /** Every slot mounted by this app right now. */
    mounted: RevTurbineRegisteredSlot[];
    /** Every slot-targeted placement in the Playbook. */
    authored: RevTurbineAuthoredSlotRef[];
    /**
     * Placements targeting a slot no code renders. **These can never show**, and
     * nothing else reports them — the decision path is never asked about a slot
     * that was never mounted, so there is no error and no reason code.
     */
    authoredButUnmounted: RevTurbineAuthoredSlotRef[];
    /**
     * Slots mounted that no placement targets. They render their fallback
     * forever; usually a typo in the slot id, or config that was never deployed.
     */
    mountedButUnauthored: RevTurbineRegisteredSlot[];
    /**
     * Whether a Playbook was available to diff against. When `false`, `authored`
     * is empty because nothing could be read — which is NOT the same as "nothing
     * is authored", and a caller must not treat the two alike.
     */
    configAvailable: boolean;
}

/** A named semantic event with structured payload. */
interface RevTurbineSemanticEvent {
    /** Event type name (e.g. `'checkout_started'`). */
    eventType: string;
    /** Structured event payload. */
    payload: SdkEventProperties;
    /** Delivery options. */
    options?: RevTurbineEventOptions;
}
/**
 * Canonical trigger event names recognised by the SDK and decision engine.
 *
 * These correspond to the placement categories defined in the product requirements
 * (trial lifecycle, usage/limits, feature gating, retention, expansion).
 */
type RevTurbineTriggerEvent = TriggerEventType;
/** Payload for trial-related trigger events. */
interface TrialTriggerPayload {
    days_remaining?: number;
}
/** Payload for usage/limit trigger events. */
interface UsageTriggerPayload {
    /** The entitlement handle this usage event refers to. */
    entitlement_handle?: string;
    /** Current usage count for the entitlement. */
    current_usage?: number;
    /** Usage limit configured for the entitlement on the active plan. */
    usage_limit?: number;
    usage_percent?: number;
    threshold?: number;
    balance?: number;
    allocation?: number;
    seats_used?: number;
    seats_allowed?: number;
}
/** Payload for feature-gate trigger events. */
interface FeatureGateTriggerPayload {
    feature: string;
}
/** Payload for payment-related trigger events. */
interface PaymentTriggerPayload {
    retry_count?: number;
    renewal_date?: string;
}
/** Union of all typed trigger payloads. */
type RevTurbineTriggerPayload = TrialTriggerPayload | UsageTriggerPayload | FeatureGateTriggerPayload | PaymentTriggerPayload | SdkEventProperties;
/**
 * Create a typed semantic event payload.
 */
declare function createSemanticEvent(eventType: string, payload: SdkEventProperties, options?: RevTurbineEventOptions): RevTurbineSemanticEvent;

/**
 * The Stripe Checkout `revturbine_*` metadata bag for a rendered output
 * (plan 282 REQ-5; research §6.2). String-valued and Stripe-shaped: spread it
 * into a Checkout Session's `metadata` and `subscription_data.metadata` as-is.
 *
 * A key the SDK does not hold is ABSENT, never empty or a placeholder — Stripe
 * reads an empty metadata value as an unset, and an invented id would be worse
 * than a gap on the attribution side.
 */
interface RevTurbineCheckoutMetadataBag {
    /** `PlacementOutput.output_id` — the rendered payload / treatment. */
    revturbine_output_id: string;
    /** The placement whose CTA led to checkout — what confirms credit to it. */
    revturbine_placement_id: string;
    /**
     * The id `identify()` set, as this SDK's own telemetry carries it: an
     * email-shaped id is hashed the same way on every lane, so the purchase
     * joins the presentation and click rows. Absent for an unidentified user.
     */
    revturbine_user_id?: string;
    /**
     * The identified account, redacted like the wire lanes. Absent when none was
     * identified — never the user-derived fallback the interaction lane labels.
     */
    revturbine_account_id?: string;
    /** `PlacementOutput.decision_id`. */
    revturbine_decision_id?: string;
    /** `PlacementOutput.rule_id` — the rule handle the interaction lanes stamp as `rule_handle`. */
    revturbine_rule_id?: string;
    /** The plan the CTA converts onto (`cta_path.plan_handle`), when it names one. */
    revturbine_plan_handle?: string;
}
/**
 * What {@link RevTurbineCustomerSdk.checkoutMetadata} returns: the bag to put
 * on the Checkout Session and its subscription, plus Stripe's own caller-side
 * session key.
 */
interface RevTurbineCheckoutMetadata {
    /**
     * The user id, for the session's `client_reference_id` — Stripe's native
     * caller-side key, which RevTurbine's identity bridge also reads. The same
     * value as `metadata.revturbine_user_id`; absent for an unidentified user.
     */
    client_reference_id?: string;
    /** Pass as BOTH `metadata` and `subscription_data.metadata`. */
    metadata: RevTurbineCheckoutMetadataBag;
}
/**
 * The full input {@link RevTurbineCustomerSdk.trackTreatmentInteraction}
 * accepts — a plain alias of core's {@link RevTurbineTreatmentInteractionInput}
 * (plan 282 TASK-9 follow-up, BL-0463).
 *
 * Through scaffold 0.1.382 this file defined its own
 * `RevTurbineTreatmentInteractionDecisionContext` (`decisionId`,
 * `segmentHandles`, `segmentIds`) and intersected it onto core's input type,
 * because core did not carry those fields yet. Scaffold 0.1.383 (#439) moved
 * that same shape — TSDoc included — onto
 * {@link RevTurbineTreatmentInteractionInput} itself, so the intersection had
 * nothing left to add. This alias exists only so the exported name stays
 * `RevTurbineTreatmentInteractionRequest` for callers; the type it names is
 * now exactly core's.
 */
type RevTurbineTreatmentInteractionRequest = RevTurbineTreatmentInteractionInput;
/**
 * CTA actions that open a plan picker or pricing page rather than checkout
 * itself. A `cta_clicked` on an output whose CTA is one of these emits
 * `checkout_started` (plan 282 TASK-8/9) — the step between the click and
 * checkout, so the placement chain can hold
 * `success ≤ checkout_started ≤ clicked ≤ presented`.
 *
 * `open_checkout_modal` opens checkout directly ("on click") and is
 * deliberately NOT listed: that placement has no separate step, so its started
 * count equals its clicked count. `open_upgrade_modal` opens another placement
 * whose own CTA then decides which of the two it is, so it is not listed
 * either. `view_plans` is the authored alias the local resolver normalizes to
 * `navigate_to_plans`; it is kept for an output built by hand.
 */
declare const CHECKOUT_STARTED_CTA_ACTION_TYPES: readonly string[];
/**
 * Every event name on the taxonomy's `control_plane` surface — emitted via
 * {@link RevTurbineCustomerSdk.trackControlPlaneEvent}, never the platform
 * surface. The TYPE is the CP ingest enum; the runtime set below derives
 * from the taxonomy's surface field, so a scaffold surface reclassification
 * (plan 228's dogfood ruling moved `area_viewed`/`feature_gated` OUT of
 * this surface) flows through on a pin bump with no SDK edit.
 */
type ControlPlaneEventName = (typeof CONTROL_PLANE_EVENT_NAMES)[number];
/**
 * Every platform event the typed emit surface accepts: the full taxonomy
 * MINUS the control-plane surface (structural exclusion — the CP has its own
 * typed path with source classification, and a customer emitting
 * `playbook_version_deployed` would be forging RevTurbine's own product
 * telemetry). Includes the R-2 billing vocabulary: billing facts consumed
 * from Stripe must be equally emittable first-party (plan 228 R-1).
 */
type EmittablePlatformEventName = Exclude<PlatformEventName, ControlPlaneEventName>;
/**
 * Runtime mirror of {@link EmittablePlatformEventName}, derived from the
 * payload-contract map so the emit surface and the taxonomy cannot drift —
 * the parity test asserts this set plus the control-plane surface IS the
 * taxonomy.
 */
declare const EMITTABLE_PLATFORM_EVENT_NAMES: readonly string[];
/**
 * The core RevTurbine customer-facing SDK.
 *
 * Provides methods for:
 * - **Identity** — `identify()`, `resetIdentity()`
 * - **Placements** — `registerPlacement()`, `getPlacementDecision()`, `getPlacement()`
 * - **Entitlements** — `checkEntitlement()`, `updateUsage()`
 * - **Trials** — `getTrialStatus()`
 * - **Events** — `track()` / `capture()` (generic lane; platform-name
 *   collisions are namespaced), `emitPlatformEvent()` (typed platform lane,
 *   contract-validated payloads)
 * - **Interactions** — `trackTreatmentInteraction()`, `dismiss()`, `convert()`
 * - **Context** — `setUserContext()`, `setPageContext()`, `refreshPageContext()`
 *
 * @example
 * ```ts
 * import { initRevTurbine } from '@revturbine/sdk';
 *
 * const session = await initRevTurbine({
 *   publicKey: 'rtk_…',
 *   mode: 'react',
 * });
 *
 * session.identify('user_123', { plan_handle: 'pro' });
 * const branding = session.sdk.getBranding();
 * ```
 */
declare class RevTurbineCustomerSdk {
    /**
     * The tenant the integration passed at init, if any. Optional since BL-0335:
     * with a public key the tenant is read from the launched Playbook instead —
     * see the `tenantId` getter.
     */
    private readonly configuredTenantId?;
    /**
     * Stable namespace for everything the SDK keys LOCALLY — storage keys,
     * cache/cap keys, generated placement ids. It is the configured tenant id
     * when one was passed (so existing integrations keep every persisted key
     * byte-for-byte), else a hash of the public key. It never changes during a
     * session, unlike `tenantId`, which a key-only integration learns only once
     * the Playbook loads.
     */
    private readonly tenantNamespace;
    /** The browser credential — `publicKey`, the only name it arrives under. */
    private readonly publicKey;
    /** Bearer for `/api/track`: the public key, or on a backend the server key (see resolveSdkDeliveryCredential). */
    private readonly ingestBearer;
    /**
     * True when the integration supplied a real `publicKey`, as opposed to the
     * local-only placeholder. Gates the keyless anonymous beacon (plan 95).
     */
    private readonly ingestKeyConfigured;
    private readonly environmentId;
    private readonly locale?;
    private readonly testTraffic;
    private readonly analyticsEnabled;
    private readonly anonymousTelemetryEnabled;
    private readonly previewMode;
    private telemetryConsent;
    private readonly telemetryCounters;
    private readonly maxBatchSize;
    private readonly flushIntervalMs;
    private flushTimer?;
    private readonly batchingTeardown;
    private anonTelemetryNoticeShown;
    private trialProviderNoticeShown;
    private piiRedactionWarned;
    private readonly endpoint;
    private readonly runtimeMode;
    private readonly endpointOverrides;
    private readonly localRuntime?;
    private readonly localStorageKey;
    private readonly mode;
    private readonly policy;
    private readonly extensionEnabled;
    private readonly placementBehaviorOverrides;
    private readonly entitlementMerge;
    /** Entries from an app-registered entitlement provider (D-61 mirroring), from the last provider resolution. */
    private appProviderEntitlements;
    /** Plan from an app-registered plan provider (D-61) — wins over the user-context plan, as on the server. */
    private appProviderPlanHandle;
    private appProviderAddons;
    private appProviderBillingPeriod;
    /** Usage from an app entitlement provider (D-61), fed into the evaluation as on the server. */
    private appProviderUsage;
    /** Segment membership from an app segment provider (D-61), as a server runtime sees it. */
    private appProviderSegments;
    private readonly reportedUnknownEntitlements;
    private derivedPlacementBehaviorMemo;
    private readonly providerFailureSlotBehavior;
    private readonly uiPathResolvers;
    private readonly serverActions;
    private unbridgeUiPathCtaResolvers;
    private unregisterBuiltinSnoozeResolver;
    private unregisterServerActionResolvers;
    private readonly persistentStore;
    private readonly sessionStore;
    private readonly anonymousId;
    private readonly sessionId;
    private readonly decisionCache;
    /**
     * `output_id` → the placement it was decided for, plus the attribution fields
     * the interaction path needs.
     *
     * The public `dismiss()` / `snooze()` / `convert()` take an **output** id,
     * while every terminal-state write is keyed by the **placement** id. Without
     * this index those three methods cannot reach the interaction path at all,
     * which is why `convert()` only ever emitted an event (plan 233 TASK-14).
     *
     * It outlives the decision cache deliberately. A conversion is confirmed after
     * the user comes back from a checkout redirect, long after a 60-second
     * decision TTL has expired and often in a fresh page load — so this persists,
     * and is bounded so a long session cannot grow it without limit.
     */
    private readonly outputPlacementIndex;
    private readonly outputPlacementIndexLimit;
    private readonly interactionState;
    private readonly interactionQueue;
    private readonly defaultDecisionTtlMs;
    private readonly defaultDismissCooldownMs;
    /**
     * Default dismiss cooldown window — 7 days, matching the engine's
     * `cooldown_after_dismiss_days` default. Applied to `dismiss` and bare
     * `cta_clicked` when the payload supplies no explicit `cooldown_ms`
     * (plan 167 REQ-3 / Q-1). Replaces the legacy 24h dismiss window.
     */
    private readonly dismissCooldownDefaultMs;
    private readonly defaultRemindLaterMs;
    private readonly defaultUsageWarningPercent;
    private readonly defaultTrialExpiringDays;
    private readonly events;
    private readonly placements;
    private readonly syncedSurfaceSlotIds;
    private userContext;
    private contextRevision;
    private assignmentFactDeclarationsByHandle;
    private readonly emittedAssignmentFactKeys;
    private emittedAssignmentFactRevision?;
    private providerResolutionController;
    private lastEffectiveContext?;
    /**
     * The effective segment memberships from the most recent provider
     * resolution — resolved provider segments ∪ locally evaluated segments.
     * Stamped onto every event envelope as `segment_ids`, exactly as
     * `experiment_assignments` is stamped (plan 228 TASK-4 / REQ-11a), so
     * segment cuts read as-of-event truth instead of requiring a config join.
     */
    private lastEffectiveSegmentIds;
    /**
     * The effective segment HANDLES at the last resolution — the provider
     * context's `segmentSlugs`: scaffold's `evaluateSegments` output plus any
     * hosted-resolved slugs. The analytics join key the interaction lane sends
     * as `segment_handles` (plan 282 TASK-9; Kent, 2026-09-29). Kept apart from
     * `lastEffectiveSegmentIds`, which mixes minted ids into those handles and
     * stamps the envelope's legacy `segment_ids` (BL-0462 owns that name).
     */
    private lastEffectiveSegmentHandles;
    /**
     * The minted segment ids a hosted context supplied at the last resolution
     * (`resolved.segments.segmentIds`) and nothing else — never the evaluated
     * handles. Telemetry only, sent as the interaction lane's `segment_ids`;
     * `undefined` when no hosted context supplied any, so local mode omits the
     * key entirely.
     */
    private lastHostedSegmentIds?;
    private pageContext;
    /**
     * Secure per-user client token (`rt_client_`, plan 157). Minted by the
     * customer's backend and handed to the SDK; used ONLY as a Bearer for
     * `GET /api/sdk/client-context`. Held in memory only — never persisted to
     * storage, never placed in a URL, never logged.
     */
    private clientContextToken?;
    /**
     * App-supplied minter for the token above (plan 191 Q-6). Its presence is
     * what turns client-context enrichment from "the app must call an
     * undocumented method" into an automatic loop.
     */
    private readonly clientSessionProvider?;
    /** Bounds the 401 re-mint retry to one attempt per fetch. */
    private retriedClientContextAfterMint;
    /**
     * The `traits:server` provider (plan 165 TASK-4), auto-wired on the first
     * successful client-context fetch and fed EXCLUSIVELY from the
     * token-authenticated response — never from app-assertable input (plan 157
     * client-session token model).
     */
    private serverUserContextProvider?;
    /**
     * `computeUserContextHash` of the last applied server context. A subsequent
     * fetch whose evaluation-relevant inputs hash the same is dropped, skipping a
     * redundant segment re-evaluation.
     */
    private lastServerContextHash?;
    /**
     * The plan move an optimistic `convert()` made ahead of the server (BL-0004),
     * held only until a `client-context` read stops reporting the old plan. See
     * {@link dropStalePostConversionPlan}.
     */
    private pendingConversionPlan?;
    private usageBalances;
    private localDecisionsByPlacementId;
    private localEntitlementsByHandle;
    private localUserContextsByUserId;
    /**
     * The SDK-held trial status — written ONLY by the server-delivered /
     * SDK-derived sources (`localRuntime.initialData.trialStatus`, `hydrate()`,
     * `getTrialStatus()`, `setTrialInstances()`), always through
     * {@link writeTrialStatus}. Readers never read it directly: they read
     * {@link resolveTrialView}, which weighs it against the app-supplied
     * `userContext.trial` (BL-0403).
     */
    private localTrialStatus;
    /**
     * Trial write clock (BL-0403). Each source of trial state stamps the next
     * tick when it changes the trial; {@link resolveTrialView} picks the
     * source with the later stamp. `0` = that source has never written.
     */
    private trialWriteClock;
    /** Tick of the last {@link localTrialStatus} write; `0` = never supplied. */
    private trialStatusWrittenAt;
    /** Tick of the last change to `userContext.trial`; `0` = never supplied. */
    private contextTrialWrittenAt;
    private readonly presentationCapsByKey;
    private presentationCapHistory;
    private presentationCapSettingsMemo;
    private sessionStartedAtMs;
    private readonly usageLimitByEntitlement;
    private readonly usageTokenPrefixByEntitlement;
    private readonly segmentIdsByPredicateField;
    private readonly configuredSegmentsById;
    private readonly dirtySegmentIds;
    private readonly segmentMembershipBySegmentId;
    private segmentMembershipUserId?;
    private readonly trialTriggerHistory;
    private readonly configProvider?;
    private readonly branding?;
    private colorScheme;
    private apiBranding?;
    private cachedPlacementResolver?;
    private cachedPlacementResolverConfig?;
    private playbookLoadInFlight;
    private playbookLoadAttempted;
    private playbookAdmissionRefused;
    private credentialFailure?;
    private readonly warnedPlaybookFailures;
    private readonly playbookSettleListeners;
    private playbookWaitMs;
    private sdkDisabledByProviderFailure;
    private sdkDisabledReason?;
    readonly providerRegistry: DomainProviderRegistry;
    readonly placementTypeRegistry: PlacementTypeRegistry;
    readonly impressionHistory: ImpressionHistory;
    constructor(options: RevTurbineInitOptions);
    private isLocalOnlyMode;
    /**
     * The tenant this SDK operates in: the key's tenant once a key-authenticated
     * delivery named one that differs from the configured `tenantId` (D-49),
     * else the configured `tenantId`, else the one the Playbook delivery named
     * (BL-0335). `undefined` only between init and the first Playbook load of a
     * key-only integration.
     */
    private get tenantId();
    /**
     * The tenant header for the SDK's direct control-plane calls: sent only when
     * the integration CONFIGURED a tenant id — and then the key's tenant once it
     * was adopted (D-49). The control plane ignores a mismatching value with a
     * warning. A key-only integration sends none — the key names the tenant.
     */
    private tenantHeader;
    private resolveConfigProvider;
    private refreshPlaybookSnapshot;
    /**
     * Where the Playbook load stands right now (BL-0177).
     *
     * - `ready` — a config is loaded; decisions resolve locally.
     * - `loading` — a load is in flight (or none has been attempted yet) and a
     *   later decision can succeed. A `config_unavailable` seen in this state is
     *   TRANSIENT.
     * - `unavailable` — no config provider is configured, or the last load
     *   settled without one. A `config_unavailable` seen in this state is
     *   TERMINAL for now: nothing is pending, so nothing will re-decide on its
     *   own until something kicks another refresh.
     *
     * @internal
     */
    getPlaybookLoadState(): RevTurbinePlaybookLoadState;
    /**
     * Why the hosted Playbook has not loaded, or `undefined` when nothing failed
     * (BL-0012).
     *
     * A failed load is otherwise indistinguishable from "not loaded yet": checks
     * answer `config_unavailable` either way. This names the failing step, the
     * URL, the HTTP status and — for a 401/403 or a missing `publicKey` — the
     * credential to check. A failed refresh while a previously loaded Playbook
     * is still in use is reported here too; the SDK keeps deciding with the
     * last-known-good Playbook.
     *
     * @example
     * ```ts
     * if (!(await rt.can('export')).allowed) {
     *   const failure = rt.getPlaybookLoadFailure();
     *   if (failure) console.error('RevTurbine Playbook did not load:', failure.message);
     * }
     * ```
     *
     * @public
     */
    getPlaybookLoadFailure(): RevTurbinePlaybookLoadFailure | undefined;
    /**
     * Warn once per distinct failure while no Playbook is loaded (BL-0012).
     * Prod-visible on purpose: in a deployed app this is the only place the
     * cause of a blanket `config_unavailable` deny is ever named.
     */
    private warnPlaybookLoadFailure;
    /**
     * Resolve once the in-flight Playbook load settles, or once `timeoutMs`
     * elapses — whichever comes first — and report the state then (BL-0177).
     *
     * Never rejects and never waits when nothing is pending, so a caller can
     * always await it before failing closed.
     *
     * @internal
     */
    whenPlaybookSettled(timeoutMs?: number): Promise<RevTurbinePlaybookLoadState>;
    /**
     * Subscribe to Playbook load attempts settling (BL-0177).
     *
     * Fires after every attempt, whether it produced a config or not, so a
     * subscriber holding a `config_unavailable` decision can re-decide exactly
     * once per attempt rather than polling. Returns an unsubscribe function.
     *
     * @internal
     */
    /**
     * Override how long {@link whenPlaybookSettled} waits for an in-flight load
     * (BL-0179) — the seam that makes the post-bound retry path testable.
     *
     * The retry path only runs when a load OUTRUNS the wait, which at the 4s
     * default means either a 4s test or fake timers, and fake timers fight
     * React's `act()` (BL-0177 hit exactly this and shipped that path untested).
     * Injecting `0` makes every load outrun the bound deterministically, with
     * real timers.
     *
     * Not part of the supported surface: production code has no reason to move
     * this, and nothing persists it.
     *
     * @internal
     */
    setPlaybookWaitBoundMs(ms: number): void;
    onPlaybookSettled(listener: () => void): () => void;
    private notifyPlaybookSettled;
    private getConfiguredPlaybook;
    /**
     * Effective placement-behavior flags: an explicit init override wins;
     * otherwise each flag derives from what the loaded Playbook authors
     * (plan 174 TASK-2 / F-72). Resolved at read time so hosted modes pick up
     * the derivation once the config snapshot loads — every consumer reads
     * through this one resolver.
     */
    private get placementBehavior();
    private derivePlacementBehaviorFromPlaybook;
    /** Rule ids already warned about by {@link warnOnUnmatchedEntitlementRules}. */
    private readonly unmatchedRuleWarnings;
    /**
     * BL-0426 (2): a rule whose `entitlement_id` names no entitlement
     * `unique_handle` can never apply, so a check on that handle denies with
     * `no_matching_entitlement_rule` and nothing says why. Warn once per rule per
     * SDK instance, in development builds only, naming the rule and the handle.
     * The check's reason contract is unchanged.
     */
    private warnOnUnmatchedEntitlementRules;
    private rebuildSegmentPredicateFieldIndex;
    /**
     * The config-driven placement resolver (core `createStaticPlacementResolver`
     * — the parity-locked engine behind every local_only/demo render), now
     * available in EVERY mode once a config is present (plan 159 TASK-4 / Q-4):
     * in Server mode the config arrives via the plan-159 fetch, so the resolver
     * is built lazily and rebuilt whenever the provider hands back a new config
     * object (revalidation). A custom `localRuntime.resolvers` override still
     * wins in local_only. Returns undefined only while no config is available —
     * callers fail closed with a distinct reason, mirroring TASK-3's
     * checkEntitlement contract.
     */
    private getOrBuildPlacementResolver;
    /**
     * The single usage view placements read (BL-0402): one entry per
     * entitlement handle the SDK holds usage for, in the
     * `EntitlementProviderState.usage` shape the shared threshold gate
     * (`matchesThresholdTrigger`) and the placement token derivation consume.
     *
     * - **Which handles** — every object entry on `userContext.usage` (in
     *   context order, so the first-entry shorthand tokens are unchanged), then
     *   every handle reported only through `update({ usage })` /
     *   `updateUsage()` / `identify(…, { usage })`.
     * - **`used`** — the app-reported balance (`usageBalances`, the most recent
     *   write) wins; else the context entry's `amount`; else `0`. This is the
     *   precedence `getUsage()` and `can()` already apply, so the meter, the
     *   gate, and the placement agree.
     * - **`limit`** — the context entry's own `limit` wins; else the limit
     *   `getUsage()` reports for the handle (the Playbook allowance for the
     *   user's CURRENT plan: the plan-scoped `usage_limit` rule's `limit_value`
     *   or `credits` rule's `allowance_value`); else `0`. `0` means "no
     *   usable limit" (an `unlimited` or absent allowance): the threshold gate
     *   fails closed on it, so no threshold placement fires.
     * - **`remaining`** — `max(0, limit − used)` when a limit is known, else `0`.
     */
    private resolveUsageView;
    /**
     * The single trial view every trial reader shares (BL-0403): the placement
     * resolver's `__providers.plan.trial*` fields (and so `trial_started` /
     * `trial_progress` / `trial_ending` / `trial_ended` / `trial_converted`
     * gating and the `{{trial_days_*}}` tokens), reverse-trial entitlement
     * grants, and a `local_only` `getTrialStatus()` with no resolver.
     *
     * Two sources hold trial state:
     *
     * - **the user context's `trial`** — what the app supplies (`user.trial` at
     *   init, `update({ trial })`, `setUserContext`, a server action's
     *   `userContext` result) plus the authenticated client-context delivery,
     *   which merges its trial into the same field;
     * - **the SDK trial status** — `localRuntime.initialData.trialStatus`,
     *   `hydrate()`'s `trial_status`, `getTrialStatus()`, `setTrialInstances()`.
     *
     * **Precedence: the most recent change wins** — the same rule the usage view
     * applies to reported balances ({@link resolveUsageView}). A server-delivered
     * or hydrated status therefore wins when it was supplied after the app's
     * trial; an app `update({ trial })` made after it wins over it. A write that
     * leaves the context trial unchanged is not a newer write, so re-sending the
     * same trial every render never displaces a fresher server status. A source
     * never supplied does not compete: with no SDK status, the context trial is
     * used; with no context trial (or after it is cleared), the SDK status is.
     */
    private resolveTrialView;
    /**
     * Write the SDK trial status (server-delivered / SDK-derived — see
     * {@link resolveTrialView}) and stamp it as the newest trial write.
     */
    private writeTrialStatus;
    /**
     * Forget the SDK-held trial state of the current user (BL-0417): the SDK
     * trial status, both {@link resolveTrialView} source markers, and the
     * lifecycle stage {@link evaluateTrialLifecycleTriggers} dedupes on — so the
     * next user starts with no trial, and a trial-less next user is not read as
     * "the trial just ended" (`trial_expired`). The context `trial` is cleared by
     * the caller along with the rest of the user context.
     */
    private clearTrialState;
    /**
     * Whether `nextUserId` names a DIFFERENT identified user than the one the
     * SDK currently holds (BL-0417). Anonymous → identified is not a switch: the
     * anonymous visitor becomes that user, so what they accumulated is kept.
     */
    private isIdentifiedUserSwitch;
    /**
     * Drop EVERYTHING the previous user owned on a switch to a different
     * identified user without an intervening reset (BL-0417, BL-0421).
     *
     * A user-id change is a full reset of user-scoped state: the held context
     * (plan handle and plan, entitlements, payment flags, tiers, instances,
     * add-ons, built-in dimensions, experiments, custom and personalization
     * fields, email, account), the SDK trial status and markers, the reported
     * usage balances, the app-provider snapshot and a pending optimistic
     * conversion. Only tenant, session and config survive. The new identity's
     * own values are merged in afterwards by the caller, so user B can never be
     * granted user A's plan or entitlements until the next server delivery.
     *
     * Anonymous → identified and re-identifying the same user are not switches
     * (see {@link isIdentifiedUserSwitch}) and keep merging.
     */
    private dropPreviousUserState;
    /**
     * Run the trial lifecycle evaluation against the resolved trial view
     * (BL-0417). Called after every change that can move the view — the app's
     * context trial (`user.trial` at init, `update({ trial })`,
     * `setUserContext`, a server action's context, the client-context
     * delivery), `hydrate()`, a reset or user switch, and a Playbook load that
     * enables the triggers — so `trial_midpoint` / `trial_expiring` /
     * `trial_expired` fire whichever source supplied the trial.
     *
     * Each stage fires once per trial episode, including after sparse updates
     * and local-state reloads. Identity comes from the trial instance or start
     * time; legacy inputs start a new episode after an explicit end. While the
     * triggers are off (no Playbook loaded yet, or none authoring a `trials`
     * placement) nothing is evaluated or recorded, so a trial supplied before
     * the Playbook loads still fires once it does.
     */
    private syncTrialLifecycleWithView;
    /**
     * Build a minimal provider context from the SDK's user state when no
     * explicit domain providers are registered.  This allows the local
     * placement resolver to access plan and usage data for token
     * interpolation (e.g. `{{usage_remaining}}`).
     */
    private synthesizeProviderContext;
    private immutableProviderUserContext;
    private invalidateEffectiveContext;
    private resolveEffectiveProviderContext;
    /**
     * Resolve the normalized variant used by RevTurbine decisions and telemetry.
     * Missing, conflicting, and unavailable assignments remain explicit and are
     * never converted to a control variant.
     *
     * @public
     */
    getExperimentVariant(experimentHandle: string): Promise<ExperimentVariantSelection>;
    /**
     * Return the immutable ephemeral context currently entering local evaluation.
     *
     * @public
     */
    getEffectiveUserContext(): Promise<Readonly<RevTurbineUserContext>>;
    /**
     * Emit `experiment_assigned` assignment facts for the resolved snapshot
     * (plan 224 TASK-8, war-games spec §9.1). One fact per (experiment handle,
     * experiment version, subject), declaration-gated and deduped per context
     * revision: re-resolution within one revision emits nothing new, and a new
     * revision re-emits the same idempotent `assignment_id`, which collapses in
     * storage. Only `status: 'assigned'` selections emit — an unenrolled
     * subject is absence (assignment spec §4), and provider failures
     * (`unavailable` / `unsupported` / `not_assigned`) never fabricate a fact.
     */
    private emitExperimentAssignmentFacts;
    /** Hash and emit one assignment fact; best-effort, never throws into the app. */
    private emitExperimentAssignmentFact;
    private markAllSegmentsDirty;
    private markSegmentsDirtyForFields;
    private toSegmentEvaluationTraits;
    private buildTargetingState;
    private markSegmentsDirtyFromContextChange;
    /** Resolve current pathname from page context or window.location (server-safe). */
    private currentPathname;
    disableForProviderFailure(reason: string): void;
    private isDisabledByProviderFailure;
    private disabledDecisionForPlacement;
    private disabledPlacementOutputForConfig;
    /**
     * Whether the integrator explicitly configured an endpoint for `key`.
     *
     * Most SDK endpoints have a working default on `revturbine-web`, so the
     * override is a convenience. A few do not — `placementTypes` is the live
     * example: `/api/sdk/placement-types` was never built, and there is no
     * `placement_types` table behind it. For those, the default is not a
     * fallback but a guaranteed 404, so the call is only meaningful when the
     * integrator has pointed it somewhere real (`custom_endpoints`).
     *
     * @internal
     */
    private hasEndpointOverride;
    private endpointFor;
    /**
     * The `placement_slots[]` entry the loaded Playbook authors for a request.
     *
     * BL-0119. `placement_slots` is the authored registry of surfaces: an entry
     * declares a slot's `id`, `surface_type` and `template`, and a placement
     * targets it through `trigger.slot_id`. Scaffold's headless `LocalRuntime`
     * has always resolved it (`slotRecordForConfig`); the browser SDK never did,
     * so a slot-id lookup had nothing to match against and every caller who had
     * not already driven a decision through that slot got `null` /
     * `placement_not_found` while a by-name lookup worked.
     *
     * The matching rules are kept identical to `LocalRuntime.slotRecordForConfig`
     * on purpose — a slot id wins outright; otherwise the component type matches
     * the slot's `surface_type`. Divergence here is divergence in what the same
     * Playbook decides in the browser versus headless.
     *
     * @internal
     */
    private authoredSurfaceSlotFor;
    /**
     * The surface template ids the Playbook declares for an authored slot id.
     *
     * BL-0119. `surface_template_ids` on the registered record is what drops the
     * shared resolver into its slot branch; without it the resolver falls back to
     * direct lookup, which is keyed by placement name/id and can never match a
     * slot id. An integrator who declared the slot in config should not also have
     * to repeat its template at the `registerSurfaceSlot()` call site.
     *
     * @internal
     */
    private authoredSlotTemplateIds;
    /**
     * Resolve a placement request through the Playbook's authored slot registry.
     *
     * BL-0119. Runs only after the local placement cache misses, so an already
     * decided slot keeps its cached output and this path adds no behavior for
     * requests the SDK could already answer. Registration is deliberately local:
     * reading a placement must never write a surface slot back to the control
     * plane.
     *
     * @internal
     */
    private placementFromAuthoredSlot;
    private hydrateLocalRuntimeState;
    private persistLocalRuntimeState;
    private decisionCacheStorageKey;
    private interactionStateStorageKey;
    private presentationCapsStorageKey;
    private outputPlacementIndexStorageKey;
    /**
     * Remember which placement an output belonged to.
     *
     * Called from every path that hands a decision to a caller, because any
     * output a caller can see is an output they can later pass to `convert()`.
     */
    private indexDecisionOutput;
    private hydrateOutputPlacementIndex;
    private persistOutputPlacementIndex;
    private hydrateDecisionCache;
    private persistDecisionCache;
    private hydrateInteractionState;
    private persistInteractionState;
    /** The Playbook's overall presentation cap rules, memoised per config object. */
    private presentationCapSettings;
    /** Start of this tab's session, persisted in session storage. */
    private sessionStartedAt;
    private presentationCapHistoryKey;
    /** History for the current user, hydrated lazily and re-read when the user changes. */
    private currentPresentationCapHistory;
    private presentationCapCandidate;
    /**
     * Pre-pick presentation policy (D-59): per-payload caps, then the
     * Playbook's overall presentation cap rules and session cooldown. Reads
     * state only — the presentation is recorded after the decision.
     */
    private candidateCapGate;
    private recordPresentationCapRules;
    /**
     * D-60 + D-61: the resolver's gates read the SAME effective entitlements
     * `checkEntitlement` returns — the shared evaluation merged with
     * app-mirrored data — for every handle the Playbook, the user context or an
     * app provider knows. A gate slot's reported `entitlement_status` still
     * wins inside the resolver.
     */
    private withSlotEntitlementStatus;
    private slotIdForRecord;
    private hydratePresentationCaps;
    private persistPresentationCaps;
    /**
     * The single resolver for the user's current plan identity (plan 168 REQ-4,
     * reshaped by plan 191 REQ-1/REQ-2 + the Q-1 amendment): the plan's
     * `unique_handle`, read from the first-class fields alone — flat
     * `plan_handle`, else the plan object's `handle` (there is no plan `id`).
     * `custom` is the customer's namespace — never a source of the SDK's own
     * plan semantics. Returns `''` when no plan is set; callers lowercase as
     * needed.
     */
    private resolveContextPlanRaw;
    /**
     * The set of identifiers (lowercased `unique_handle`) naming the user's
     * CURRENT plan for `entitlement_rule` plan-target matching. Identity is
     * handle-based everywhere (plan 191): rule targets carry handles, and the
     * context supplies the handle via `plan_handle` or `plan.handle`.
     */
    private activePlanIdentifiers;
    /** Whether a rule's plan targets include the active plan (no plan target = applies to all plans). */
    private ruleTargetsActivePlan;
    private hydrateUsageLimitRulesFromPlaybook;
    private recalculateDerivedUsageTraits;
    /**
     * Resolves `{{recommended_plan_handle}}` and `{{recommended_plan_name}}`
     * tokens against the user's current commercial plan (per Appendix C.3
     * and targeting-studio-ui.md §4.1 — the base plan, NOT the trial-grant
     * overlay). Falls back to empty strings when the user has no current
     * plan, the plan is at the top of the hierarchy, or the exported config
     * has no plans.
     *
     * Q-3 (plan #46) audit: `userContext.plan.id` is the commercial plan;
     * `effectivePlanHandle` (resolved separately in `deriveLocalEntitlement`
     * for reverse-trial grants) is the trial overlay. The spec example
     * "Free user on Pro reverse trial → recommends Pro" works because Free
     * is the base; next-tier-up from Free is Pro.
     */
    private deriveRecommendedPlanTokens;
    /**
     * Return the SDK-resolved personalization token map.
     *
     * Reads from the transient `personalization` map on the user context,
     * which holds both SDK-derived tokens (plan_name, usage_current, etc.)
     * and app-provided tokens set via `setPersonalization()` or `identify()`.
     *
     * Pass the placement's payload (its `recommendation_strategy` /
     * `recommendation_plan_override` fields) to resolve the
     * `{{recommended_plan_handle}}` / `{{recommended_plan_name}}` tokens for
     * that specific placement (plan #47, Appendix C.3). Without a payload the
     * map carries the user-level `next_tier_up` default; with one, the
     * placement's authored strategy (e.g. a `custom` forced plan) overlays
     * those two tokens. All other tokens are unaffected.
     *
     * @param payload Optional placement payload carrying the per-placement
     *   recommendation strategy. Omit for the user-level default.
     */
    getPersonalizationTokens(payload?: {
        recommendation_strategy?: RecommendationStrategy | null;
        recommendation_plan_override?: string | null;
    }): RevTurbinePersonalizationTokens;
    /**
     * Return the SDK-resolved entitlement snapshot for the active user.
     *
     * The returned object is keyed by entitlement handle and reflects the
     * latest results from local/runtime checks tracked by the SDK.
     */
    getEntitlements(): Record<string, EntitlementResult>;
    /**
     * Return the SDK-resolved usage snapshot for the active user.
     *
     * Keys are usage units (derived from configured usage token prefixes when available),
     * and values include current usage plus optional limit when known.
     *
     * @public
     */
    getUsage(): RevTurbineUsageSnapshot;
    private catalogEligibilityContext;
    private eligiblePlansForSegments;
    private eligibleAddonsForSegments;
    /** Return the public plan variations eligible for the active user. */
    getEligiblePlans(): Promise<EligiblePlan[]>;
    /** Return the public add-on variations eligible for the active user. */
    getEligibleAddons(): Promise<EligibleAddon[]>;
    private formatEligiblePrice;
    private priceTokensForProviders;
    /**
     * The plan-and-recommendation token family the SDK resolves authoritatively
     * from the Playbook, for substitution into decision content.
     *
     * These five are exactly the tokens whose values come from the Playbook's
     * plan catalogue plus the recommendation strategy, so the SDK — not the
     * host app — is the only thing that can fill them in.
     *
     * The usage family (`{{usage_current}}` / `{{usage_limit}}` /
     * `{{usage_remaining}}` / `{{usage_percent}}` and their `<unit>_usage_*`
     * forms) is filled here too, from the SAME provider usage view the
     * threshold gate decided the placement with (BL-0402) — see
     * {@link usageContentTokens}. So are `{{trial_days_remaining}}` and
     * `{{trial_days_total}}`, from the same provider trial state the trial
     * trigger gate read (BL-0403) — see {@link trialContentTokens}. Every other
     * token in the studio table (seats) is resolved on the React render lane by
     * `derivePlacementPersonalizationTokens`, which unknown tokens pass through
     * untouched.
     */
    private derivedContentTokens;
    /**
     * Trial personalization tokens for decision content (BL-0403), read from the
     * provider plan state the placement was decided against — the synthesized
     * {@link resolveTrialView} projection unless a registered plan provider
     * supplies its own. Mirrors `derivePlacementPersonalizationTokens`: each
     * token is filled only when its value is a finite number, so an unknown
     * trial length leaves the token untouched rather than rendering `0`.
     */
    private trialContentTokens;
    /**
     * Usage personalization tokens for decision content, read from the provider
     * usage view the placement was decided against (BL-0402) — the synthesized
     * {@link resolveUsageView} unless a registered entitlements provider
     * supplies its own.
     *
     * Per entitlement: `<unit>_usage_current` always; `<unit>_usage_limit`,
     * `<unit>_usage_remaining` and `<unit>_usage_percent` only when a positive
     * limit is known (an unknown or unlimited allowance leaves those tokens
     * untouched rather than rendering a misleading `0`). The unit prefix and the
     * choice of entitlement for the unprefixed `usage_*` shorthand (and its
     * `current_usage` / `current_limit` / `remaining_usage` aliases) follow
     * `getPersonalizationTokens()`: handles in sorted order, the `core` unit
     * first, else the first with a limit, else the first. Percent is rounded and
     * capped at 100, as it is there.
     */
    private usageContentTokens;
    /**
     * Substitute the SDK-resolved plan/price/recommendation tokens into a
     * decision's content.
     *
     * Only the tokens in {@link derivedContentTokens} are substituted; any
     * other `{{token}}` is left verbatim so the render lane (or the host app)
     * can still resolve it. A token the SDK owns but cannot resolve — a
     * top-of-ladder user has no recommended plan — becomes an empty string,
     * which is the spec's documented empty-token convention and is what keeps
     * raw `{{...}}` braces off the end user's screen.
     */
    private applyPriceTokens;
    /**
     * Return current SDK policy snapshot.
     */
    getPolicy(): RevTurbinePolicySnapshot;
    /**
     * Resolve the branding to render with, down the four-rung ladder (plan 118):
     * the explicit `branding` init option → the config's deprecated embedded
     * `theme` (dev-warns) → the `apiBranding` init option → {@link DEFAULT_BRANDING}.
     *
     * Branding is a display concern only — it never affects placement decisions or
     * entitlement checks. The result is always complete, so callers can render
     * unconditionally even when no branding was supplied.
     *
     * @returns The merged branding and the ladder rung it came from.
     * @public
     */
    getBranding(): ResolvedBranding;
    /**
     * Set the resolved display palette without rebuilding the SDK or its caches.
     * Explicit branding retains precedence; this only selects embedded defaults.
     * @param scheme Resolved light or dark preference.
     * @public
     */
    setColorScheme(scheme: 'light' | 'dark'): void;
    /**
     * Supply the branding-API rung after init.
     *
     * `apiBranding` can be passed at construction when the host fetches branding
     * itself, but with `fetchThemeOverride` the SDK fetches
     * `GET /api/sdk/theme` *after* the instance exists. Without this setter that
     * fetched value reached only the React theme context, so `getBranding()` and
     * `useRevTurbineTheme()` could report different branding for the same tenant
     * (plan 184).
     *
     * @param branding - Branding from the Branding API. Overrides config-embedded
     *   branding but never the explicit `branding` init option.
     * @public
     */
    setApiBranding(branding: BrandingConfig | undefined): void;
    /**
     * The effective entitlement (D-61): the shared core evaluator decides from
     * the Playbook + user context, then app-mirrored data merges per
     * `entitlementMerge` (default: app wins). The server SDKs run the same
     * function on the same inputs, so a server re-check verifies exactly this.
     * An entitlement nobody knows is denied, warned once and reported.
     */
    private deriveLocalEntitlementFromConfiguredRules;
    /**
     * D-61: snapshot what the app's own providers say — plan, entitlement
     * entries, usage — so the browser evaluates on exactly the inputs a server
     * runtime with the same providers would. A static adapter's blanket
     * defaults are not app data.
     */
    private captureAppProviderState;
    /** D-61: resolve the app's providers before an entitlement check (cached per provider TTL). */
    private refreshAppProviderState;
    /** D-61: an unknown entitlement handle is denied; say so once, locally and in telemetry. */
    private reportUnknownEntitlement;
    /**
     * Return the SDK-resolved targeting snapshot for the active user.
     *
     * Includes user id, segment ids, traits, plan, and merged usage so demo
     * surfaces can display the same context used by placement eligibility.
     */
    getTargeting(): RevTurbineTargeting;
    /**
     * Explain why a placement decision was selected.
     *
     * Returns a structured diagnostic payload that includes:
     * - Segment membership evaluation with predicate-level pass/fail details
     * - Entitlement-rule matching outcomes for current targeting context
     * - Placement decision metadata (`rule_id`, reason codes, suppression)
     *
     * Useful for debuggers, QA tooling, and customer-facing explainability UIs.
     *
     * @public
     */
    explainPlacementDecision(input: RevTurbinePlacementDecisionInput): Promise<RevTurbinePlacementDecisionExplanation>;
    private usageThresholdForEntitlement;
    private evaluateUsageThresholdCrossings;
    private evaluateTrialLifecycleTriggers;
    private resolveAnonymousId;
    private installBridge;
    private installRouteTracking;
    /**
     * Merge a caller-supplied patch into the current user context.
     *
     * The single choke point every context entry point flows through
     * (identify / setUserContext / update / rehydrate), so it is also where the
     * removed `plan.id` key is rejected — see {@link rejectLegacyPlanId}.
     *
     * @param next The caller's patch.
     * @param verb Which entry point supplied it, for the rejection diagnostic.
     */
    private mergeUserContext;
    private mergePageContext;
    private collectPageContextIssues;
    private collectPayloadIssues;
    private buildValidationWarningEvent;
    private toEventEnvelope;
    /**
     * Emit the one-time PII-redaction notice (plan 106 REQ-7). Idempotent per
     * SDK instance so a noisy event stream never floods the console.
     */
    private warnPiiRedactedOnce;
    /** True when keyless anonymous telemetry should fire (REQ-4 conditions). */
    private anonymousTelemetryActive;
    /**
     * Session-scoped dedup for `resolution_failure` diagnostics (plan 144 Q-4
     * disposition): one emit per `(reason, primary handle)` pair, capped per
     * session so a render loop can never flood the channel.
     */
    private readonly emittedResolutionDiagnostics;
    /** Session dedup for {@link reportSdkError}, keyed by `reason`. */
    private readonly emittedSdkErrors;
    /** Session dedupe for the unrecognized-context-key report (plan 191 Q-5). */
    private readonly reportedUnrecognizedContextKeys;
    /**
     * Listeners for user-context changes (plan 194 REQ-3).
     *
     * The user context is a private field on this instance, and the instance's
     * identity never changes — so a React tree had no way to learn that
     * `update()` or `identify()` had happened. Mounted gates kept rendering a
     * decision made against the previous context: the SDK returned `denied`
     * while `<Gate>` still rendered its granted children, through an effect
     * flush and a forced parent re-render. Only a remount or a manual
     * `recheck()` fixed it, and `useCan` has no `recheck`.
     *
     * This is the missing half. It is on the SDK rather than in the hooks so the
     * headless controllers get it too — `EntitlementGate.onChange` consumers are
     * not all React.
     */
    private readonly userContextListeners;
    private static readonly RESOLUTION_DIAGNOSTIC_SESSION_CAP;
    /**
     * Gate for `resolution_failure` diagnostics (plan 144 TASK-21). Honors BOTH
     * opt-outs (124 Q-6, decided 2026-08-12): either `anonymousTelemetry: false`
     * or `analytics: false` silences diagnostics — the most conservative
     * reading, so no privacy-minded install is surprised by a new emission.
     * Unlike {@link anonymousTelemetryActive} there is NO keyless requirement:
     * keyed production installs emit diagnostics too (124 Q-7). `previewMode`
     * (docs/playground renders) still suppresses, and the channel is
     * browser-only for now (server-side diagnostics are a named follow-up).
     */
    private diagnosticTelemetryActive;
    /**
     * Emit one `resolution_failure` diagnostic (plan 144 TASK-21 — the plan-124
     * "silent failure" channel): a placement that resolved to the fallback, or
     * an entitlement denied for infrastructure reasons, becomes observable on
     * the keyless meta channel. Field values are author-defined handles and
     * closed reason codes only (TASK-20 allow-list); deduped per
     * `(reason, primary handle)` for the session and capped.
     */
    private emitResolutionFailure;
    /**
     * Report that the SDK itself failed (plan 182 TASK-5).
     *
     * `sdk_error` was declared in the meta taxonomy with no emitter. This is the
     * "the SDK malfunctioned" signal — distinct from `resolution_failure`, which
     * means a *decision* produced nothing. It rides the same anonymous
     * `events_sdk_meta` lane: no tenant, no user, no placement identity.
     *
     * Deduped on `reason` for the session and capped, mirroring
     * {@link emitResolutionFailure} — an SDK failing inside a render loop must
     * not become a telemetry flood. Best-effort and never throwing: this is
     * called from `catch` blocks, so it must not manufacture a second failure.
     *
     * @param reason Stable, categorical cause (e.g. `provider_init_failed`) —
     *   what dashboards group by.
     * @param message Human-readable detail for triage, sent on the same footing
     *   as `sdk_validation_warning`'s message, which already ships on this lane.
     */
    reportSdkError(reason: string, message?: string): void;
    /** Fire the one anonymous `sdk_init` adoption beacon at startup. */
    private emitSdkInitTelemetry;
    /**
     * Config-shape COUNTS only (REQ-6) — number of plans/entitlements/rules/etc.
     * No names, ids, or user context. Returns undefined when no config is loaded.
     */
    private computeConfigShape;
    /**
     * Build + POST one allowlisted anonymous meta event to /api/sdk/meta.
     * No auth header (keyless), no tenant in the body (REQ-9), best-effort and
     * non-throwing. Stamps SDK/schema versions + a one-way hashed config id.
     */
    private emitAnonMeta;
    /**
     * Ungated build + POST of one allowlisted meta event — the shared tail of
     * {@link emitAnonMeta} (keyless adoption beacons, which stay gated on
     * keyless installs) and the `resolution_failure` diagnostics (plan 144
     * TASK-21), which are deliberately NOT keyless-only — keyed production
     * installs emit them too (plan 124 Q-7). Callers gate; this never throws.
     */
    private postAnonMeta;
    /** One-time info notice that keyless telemetry is active + how to disable it (REQ-8b). */
    private showAnonTelemetryNoticeOnce;
    private sendEvents;
    private dispatchToEventConsumers;
    /**
     * True when behavior telemetry may be created and delivered — i.e. consent is
     * `granted` (plan 144 TASK-8 / REQ-11). `denied` and `pending` both return
     * false; `pending` drops rather than persists in MVP.
     */
    private telemetryConsented;
    /**
     * Update behavior-telemetry consent at runtime (plan 144 TASK-8 / REQ-12).
     *
     * Takes effect on the next event with **no** provider remount: `denied` /
     * `pending` stop event creation immediately, so nothing reaches ingest,
     * registered consumers, or integrations; `granted` resumes emission. Does not
     * affect the keyless anonymous SDK-init beacon, which has its own
     * {@link RevTurbineInitOptions.anonymousTelemetry} switch (REQ-13).
     *
     * @param consent - the new consent state
     *
     * @public
     */
    setTelemetryConsent(consent: TelemetryConsent): void;
    /** The current behavior-telemetry consent state (plan 144 TASK-8). */
    getTelemetryConsent(): TelemetryConsent;
    /**
     * A snapshot of the telemetry pipeline counters (plan 144 TASK-8) —
     * created / dropped / redacted / sampled / deduped / queued / sent / failed.
     * A cheap diagnostic for "why did my events not arrive?". Returns a copy, so
     * mutating it never touches the SDK's live tallies.
     */
    getTelemetryCounters(): TelemetryCounters;
    capture(eventName: string, properties: SdkEventProperties, options?: RevTurbineEventOptions): Promise<void>;
    /**
     * Emit a typed platform event (plan 228 TASK-4).
     *
     * The sanctioned first-party path for every platform event OUTSIDE the
     * control plane — SDK lifecycle, gates, placements, milestones, growth
     * signals, and the R-2 billing vocabulary (a billing fact consumed from
     * Stripe is equally emittable here; the ingest path dedupes on the
     * contract's identity keys, e.g. `billing_ref`). The payload parameter type
     * is inferred from the event's payload contract, so the API cannot drift
     * from the schema the payload is validated against.
     *
     * The name is sent RAW — no `clickstream_*` namespacing — which is exactly
     * what distinguishes this from {@link track}: the generic lane namespaces
     * platform collisions, the typed lane IS the platform.
     *
     * In development/test builds the payload is validated against its contract
     * at emit time; a violation emits an `sdk_validation_warning` alongside
     * (never a throw — telemetry must not break the host app). Production
     * builds skip validation; the ingest boundary re-validates authoritatively.
     *
     * @public
     */
    emitPlatformEvent<K extends EmittablePlatformEventName>(eventName: K, payload: EventPayloadInput<K>, options?: RevTurbineEventOptions): Promise<void>;
    /**
     * Emit an `sdk_validation_warning` conforming to its own payload contract
     * (`message` is the contract's required field; `reason` rides along for
     * pre-228 consumers). Fire-and-forget — never throws into the host app.
     */
    private emitSdkWarning;
    private captureRaw;
    /**
     * Emit a typed control-plane semantic event (plan 112).
     *
     * The dogfood-faithful surface for RevTurbine's own product activity:
     * `eventType` is constrained to the canonical {@link ControlPlaneEventType}
     * taxonomy and the `system`/`workflow` source classification is stamped
     * automatically. Forwards through the same ingest + consumer path as
     * {@link capture} — so the event lands in clickstream AND any registered
     * analytics resolver (e.g. a PostHog provider from
     * {@link createPostHogAnalyticsProvider}).
     *
     * Identity comes from the active user context set via {@link identify} /
     * {@link setUserContext}: the operator is `user_id` and the acting RevTurbine
     * customer tenant is `account_id`. `tenant_id` is stamped server-side and is
     * never carried on the event (plan 112 REQ-3/REQ-4). When no account has been
     * identified, `account_id` carries the labelled fallback
     * `user-fallback:<user_id>` — a bare, unlabelled user id is never stamped
     * into an account column (BL-0117, Kent's D-13). Classify it with
     * {@link isFallbackAccountId}.
     *
     * @param eventType - A canonical control-plane event type.
     * @param payload - Optional event-specific properties (e.g. `{ resource, resource_id }`).
     * @param options - Emit options, e.g. `{ immediate: true }` to bypass batching.
     *
     * @example
     * ```ts
     * sdk.identify('operator_42', { account_id: 'tn_acme' });
     * await sdk.trackControlPlaneEvent('playbook_version_deployed', { change_set_id: 'cs_9' });
     * ```
     */
    trackControlPlaneEvent(eventType: ControlPlaneEventType, payload?: SdkEventProperties, options?: RevTurbineEventOptions): Promise<void>;
    /**
     * Flush any buffered clickstream events to `POST /api/track` immediately.
     *
     * Called on the size threshold, the {@link RevTurbineEventBatchingOptions}
     * interval timer, and page-unload. Best-effort and non-throwing — delivery
     * failures are swallowed (plan 95 REQ-3). Safe to call when the buffer is
     * empty (no-op).
     *
     * @public
     */
    flushEvents(): Promise<void>;
    /**
     * Install the interval timer + page-unload listeners that flush buffered
     * clickstream events (plan 95 TASK-6). Browser-only and skipped in
     * `local_only` mode (no network sink). Listeners are released by
     * {@link dispose}.
     */
    private startEventBatchFlushing;
    /**
     * Stop background clickstream flushing and release page-unload listeners.
     * Flushes any buffered events one last time. Call when tearing down an SDK
     * instance (e.g. SPA unmount) to avoid a dangling interval/listeners.
     */
    dispose(): void;
    /**
     * Emit a semantic event through the GENERIC string lane.
     *
     * Since plan 228 TASK-4 this is a customer-lane API, not a platform one: it
     * rides {@link capture}, so a name colliding with platform vocabulary is
     * namespaced `clickstream_*` — platform events cannot be forged from here.
     * The SDK's own platform emissions use {@link emitPlatformEvent}, whose
     * payloads are typed and contract-validated.
     *
     * The fields are passed to {@link capture} DIRECTLY, exactly as a customer's
     * own `capture(name, {...})` call would. Anything else double-wraps them.
     *
     * This used to send `{semantic: true, payload: fields}`. The wire mapping
     * already stores an envelope's properties under the key `payload`, so that
     * inner wrapper landed the fields at `properties.payload.payload.<field>` in
     * `events_clickstream` — one level deeper than every `capture()` event and
     * than the canonical carrier this SDK documents. Readers that followed the
     * documented shape (`user_context_fields`, any analytics pipe) found nothing
     * on a semantic event, which is why gate telemetry was invisible to the
     * entitlement metrics despite being emitted correctly.
     *
     * The `semantic: true` marker went with it: it was written here and read
     * nowhere in the SDK, the web app, or any pipe. It marked nothing and cost a
     * whole nesting level.
     *
     * `liftClickstreamFields` / `pickClickstreamField` are unaffected — they
     * resolve top-level first and fall back to the nested bag, so they read the
     * fields either way. Only the STORED JSON changes shape, and it changes to
     * the shape everything else already expects.
     */
    emitSemantic(eventType: string, payload: SdkEventProperties, options?: RevTurbineEventOptions): Promise<void>;
    /**
     * Optimized routine to evaluate segment membership and usage thresholds.
     * Should be called on every user context or usage update.
     *
     * @param update - Partial user context or usage update payload
     * @param isUsageUpdate - If true, also check usage thresholds
     */
    private evaluateUserSegmentsAndUsage;
    /**
     * Emit the NAMES of the custom user-context fields set in this identify /
     * setUserContext call — names only, never values (plan 114 TASK-4). `custom`
     * is `Pii`-classified, so only its keys are recorded (PII-safe, AC-9), under
     * the reserved {@link USER_CONTEXT_FIELDS_EVENT} clickstream event, giving the
     * control plane a per-`(tenant_id, field_name)` last-seen signal. Best-effort:
     * routes through the normal clickstream path and never throws into the app.
     */
    private emitObservedContextFields;
    /**
     * Merge fields into the session-bound user context. Recognized fields
     * upsert; an omitted field never clobbers a previously-set value. See the
     * advertised {@link update} alias for the full recognized-field contract.
     *
     * Server-assigned fields (`seat_type_handle`, `activity_score`,
     * `activity_score_computed_at`) are dropped and reported, never merged:
     * they are written only by the tenant's backend or RevTurbine's
     * enrichment (D-36, BL-0352). Since 0.12.0 the parameter is
     * {@link Exact}, like {@link identify} and {@link update}: a key
     * `RevTurbineUserContext` does not declare is a compile error even when the
     * object arrives through a variable. Free-form values belong under `custom`.
     *
     * @public
     */
    setUserContext<T extends RevTurbineUserContext>(userContext: Exact<RevTurbineUserContext, T>): void;
    /** {@link setUserContext}'s merge, on a patch already cleared of server-assigned keys. */
    private mergeAcceptedUserContext;
    /**
     * Subscribe to user-context changes — `identify()`, `setUserContext()`,
     * `update()`, `updateUsage()`, and `resetIdentity()` (plan 194 REQ-3).
     *
     * Returns an unsubscribe function. Listeners must never throw; one that does
     * is caught here rather than allowed to break the verb that fired it.
     *
     * @example
     * ```ts
     * const unsubscribe = rt.onUserContextChange(() => refreshMyUi());
     * ```
     */
    onUserContextChange(listener: () => void): () => void;
    /**
     * Tell subscribers the user context changed.
     *
     * Fired from the mutating verbs rather than from `persistLocalRuntimeState`,
     * which several non-context paths also call — over-notifying would re-run
     * every mounted gate's check on an interaction record.
     */
    private notifyUserContextChanged;
    setPageContext(pageContext: RevTurbinePageContext): void;
    refreshPageContext(): void;
    /**
     * Hydrate the SDK with a server-evaluated payload.
     *
     * Call this on the client after receiving a `ServerEvaluationPayload`
     * from the server-side SDK. Applies entitlements, trial status, usage,
     * and user context. Placement decisions are evaluated locally against
     * the current UserContext and Playbook: legacy payloads do not bind their
     * decisions to the producer's complete evaluation context.
     *
     * @example
     * ```ts
     * // In your React component / page hydration:
     * const session = await initRevTurbine({ publicKey, mode: 'react' });
     * session.sdk.hydrate(serverPayload);
     * ```
     */
    hydrate(payload: ServerEvaluationHydrationPayload): void;
    generatePlacementId(input: {
        placementName: string;
        placementScopeKey?: string;
        normalizedPageRoute?: string;
    }): Promise<string>;
    /**
     * Every surface slot this SDK instance currently has mounted.
     *
     * Plan 233 TASK-10. `verify-integration` names the gap this closes in its own
     * text: *"A placement targeting a slot no code renders can never show, and
     * nothing reports this; there is no probe, so walk the Playbook's placement
     * triggers against your inventory of rendered slots."* There was no way to
     * obtain that inventory at runtime — the registry is private and keyed by a
     * hashed id, not by the slot id the author wrote.
     *
     * `slotId` is the author-facing identity (what a Playbook's
     * `trigger.slot_id` must match), not the internal hash. That distinction is
     * the whole point: a diff against authored config is meaningless in hash
     * space.
     *
     * @public
     */
    getRegisteredSlots(): RevTurbineRegisteredSlot[];
    /**
     * Diff the authored Playbook against what this app actually mounted, in both
     * directions.
     *
     * Plan 233 TASK-10 / AC-12. Both directions matter and they fail differently:
     *
     * - **authoredButUnmounted** — a placement targets a slot no code renders. It
     *   can never show. Nothing reports this today; the decision path is never
     *   even asked about a slot that was never mounted, so there is no error, no
     *   warning, and no reason code. This is the silent one.
     * - **mountedButUnauthored** — a slot is mounted that no placement targets. It
     *   renders its fallback forever, which usually means a typo in the slot id
     *   or config that was never deployed.
     *
     * This is a diagnostic and deliberately reports rather than throws: it is run
     * against a live app, and an integration with a stale slot should keep
     * working while someone reads the output.
     *
     * A config-side audit **cannot** produce this. That is the lesson from the
     * August diagnosis of the escalated integration, which concluded the fixed
     * slots were unmounted: they were mounted, and the call sites passed slot ids
     * that no placement targeted. Only the running app knows what it mounted.
     *
     * @public
     */
    diagnoseSlotInventory(): RevTurbineSlotInventoryDiagnosis;
    /**
     * @deprecated Use `registerSurfaceSlot`.
     *
     * @public
     */
    registerPlacement(config: RevTurbinePlacementConfig): Promise<string>;
    /**
     * Mirror a registered surface slot to an explicitly configured backend.
     *
     * **Requires an explicit `surfaceSlots` endpoint override** (BL-0197).
     * There is no default route for this verb and there never was a correct
     * one: the previous default pointed at `/api/placements`, RevTurbine's
     * *authored-config* CRUD. That route validates against `PlacementSchema`
     * (which requires `handle` and `category`), so the legacy surface-slot body
     * this method sends could only ever be rejected — in production every
     * non-`local_only` registration failed with
     * `surface_slot_create_failed:422` and the React runtime turned that into a
     * `slot_error`.
     *
     * It was also wrong in principle. On a same-origin integration the signed-in
     * user's session cookie authenticates the request, so a body the route *did*
     * accept would have let merely loading a gated page create a draft placement
     * in the tenant's Playbook. Only the 422 prevented that.
     *
     * Surface-slot **discovery is ingestion-driven**: the SDK emits its
     * `slot_*` / `placement_*` telemetry through `/api/track` and the pipeline
     * derives discovered slots from it. Registration itself is client-local.
     *
     * @internal
     */
    private upsertSurfaceSlot;
    /**
     * Build the internal placement record for a surface-slot config.
     *
     * Shared by `registerSurfaceSlot` and the BL-0119 authored-slot resolution
     * path so both produce byte-identical records — a second hand-rolled record
     * shape is how the two would drift into deciding differently.
     *
     * When the caller passes no `surfaceTemplateIds`, the ids the Playbook
     * declares for this slot are adopted (BL-0119). An explicit list from the
     * call site always wins: the mounting code knows what it actually renders.
     *
     * @internal
     */
    private buildSurfaceSlotRecord;
    /**
     * Store a surface-slot record in the local registry, marking it unsynced when
     * it is new or has changed. Local only — never writes to the control plane.
     *
     * @internal
     */
    private commitSurfaceSlotRecord;
    /**
     * Register a surface slot with the local runtime and return its placement id.
     *
     * **Client-local by default** (BL-0197): this performs no network write. The
     * slot is recorded in the in-process registry, and the pipeline discovers it
     * from the `slot_*` / `placement_*` telemetry the SDK emits through
     * `/api/track`. A write happens only when `custom_endpoints.surfaceSlots`
     * points at a slot-inventory service you run; there is no fallback to
     * `/api/placements`.
     *
     * @public
     */
    registerSurfaceSlot(config: RevTurbineSurfaceSlotConfig): Promise<string>;
    /**
     * Persist authored placement types to a configured backend.
     *
     * **Requires an explicit `placementTypes` endpoint override.** RevTurbine
     * hosts no `/api/sdk/placement-types` route — the default path was never
     * built, and there is no table behind it — so without an override this
     * method is a no-op rather than a guaranteed 404. It previously threw
     * `persist_placement_types_failed:404` in every non-`local_only` mode, which
     * made a documented method unusable on the documented default path.
     *
     * Supply `endpointOverrides.placementTypes` (or override the provider hook of
     * the same name) to send these somewhere real.
     */
    persistPlacementTypes(types: RevTurbinePlacementTypeEntity[]): Promise<void>;
    private stableStringify;
    private decisionCacheKey;
    private interactionStateKey;
    private readDecisionCache;
    private writeDecisionCache;
    private gateDecisionByInteraction;
    private placementCapKey;
    private extractPlacementCapPolicies;
    private applyPlacementCapsIfNeeded;
    /**
     * Plan 43 TASK-14 — gate a getPlacementDecision result on `cap.v1` policies.
     *
     * On the first decision pass (`tick: true`), the cap state is ticked when
     * the cap allows firing — so a placement with
     * `max_per_period: { count: 1, period: 'lifetime' }` is consumed once.
     * On a cache-hit re-evaluation (`tick: false`), the cap state is only
     * read, so subsequent identical inputs observe the consumed budget and
     * the decision flips to `visible: false` with a `cap_exceeded` reason.
     * Without this re-evaluation, the decision cache would return the
     * stale `visible: true` from before the tick. When
     * `enableClientCapsEnforcement` is false, this helper is a no-op.
     */
    private gateDecisionByCaps;
    private normalizeDecisionFromResponse;
    /**
     * Run the config-driven resolver and apply the standard post-passes —
     * price tokens, interaction suppression, presentation caps, cache write.
     *
     * Extracted so the first-pass resolve and the post-config-wait resolve
     * (BL-0177) cannot drift apart: a second copy of this sequence is how a
     * retry ends up skipping a cap tick or a cache write.
     */
    private resolveDecisionLocally;
    /**
     * Resolve the placement decision for a registered surface slot — the
     * evaluated payload (or lack of one), its reason, and the metadata needed
     * to report the interaction lifecycle ({@link trackTreatmentInteraction},
     * {@link dismiss}, {@link snooze}, {@link convert}).
     *
     * @public
     */
    getPlacementDecision(input: RevTurbinePlacementDecisionInput): Promise<RevTurbinePlacementDecision>;
    preloadPlacementDecisions(inputs: RevTurbinePlacementDecisionInput[]): Promise<void>;
    bootstrapPlacementDecisions(inputs: RevTurbinePlacementDecisionInput[]): Promise<void>;
    /**
     * The authored suppression windows for a payload, in milliseconds.
     *
     * Plan 233 TASK-8b/8c. `caps.cooldown_days` and `remind_later_minutes` are
     * authored per payload and round-trip through export/import (plan 167 AC-8,
     * AC-11), but nothing ever read them back: the only consumer was the
     * `hasAuthoredCaps` feature-flag derivation, which uses their PRESENCE to
     * switch caps enforcement on and discards their values. So a Playbook saying
     * `cooldown_days: 7` flipped a boolean and otherwise did nothing.
     *
     * The decision's `output_id` is the payload id (the resolver sets
     * `output_id: payload.id`), so the authored values are recoverable from the
     * loaded config at interaction time.
     */
    private authoredSuppressionWindows;
    private updateInteractionState;
    private flushInteractionQueue;
    /**
     * Re-queue a failed interaction flush and make the failure VISIBLE.
     *
     * This used to retry against a legacy path that does not exist in the app,
     * with the internal queue shape rather than the wire shape — so a failure
     * produced a silent 404, the batch went back on the queue, and it was
     * discarded at page unload with nothing recorded anywhere. That is how a
     * whole class of dropped presentations stayed invisible (plan 232).
     *
     * Re-queuing is still right — a transient failure should retry on the next
     * flush — but it is now paired with a counter and a diagnostic, so a
     * persistent failure is observable instead of merely quiet.
     */
    private failInteractionFlush;
    /**
     * The account identity to stamp on a treatment interaction — the identified
     * account, or the prefixed user-derived fallback when none was identified.
     *
     * Two rules make this a usable join key rather than a label:
     *
     * 1. **Redacted identically to `/api/track`.** Both paths run the account id
     *    through {@link redactIdentityField}, so an email-shaped account id
     *    becomes the SAME hash in `placement_presentations` and in
     *    `events_clickstream`. Hashing on one path only would produce a hash on
     *    one side and a raw email on the other, and `monetization_funnel` would
     *    join nothing (identity keys are hashed, not sentinelled — the contract
     *    is byte-identical across repos).
     * 2. **A user-derived key is labelled as one.** The ingest route's own
     *    `account_id ?? user_id` fallback stamped a bare user id into an account
     *    column, indistinguishable from a real account. This lane sends
     *    `user-fallback:<user_id>` instead, so the warehouse can exclude it from
     *    account denominators (Kent's D-13, BL-0117).
     */
    private interactionAccountId;
    /**
     * The account identity to stamp on any wire payload — the clickstream lane
     * (`/api/track` → `events_clickstream.account_id`) and the interaction lane
     * (`placement_presentations.account_id`).
     *
     * Both lanes resolve it HERE so they are byte-identical: `monetization_funnel`
     * joins one against the other, and a divergence in trimming, hashing or
     * fallback derivation joins nothing. The rules:
     *
     * 1. **An identified account is sent verbatim**, PII-redacted through
     *    {@link redactIdentityField} — the same hash on both lanes and in every
     *    repo that writes an identity key. A blank/whitespace `account_id` is
     *    not an account; it falls through to rule 2.
     * 2. **No identified account yields a labelled fallback**, never a bare user
     *    id and never a sentinel: {@link fallbackAccountId} prefixes the acting
     *    user's (already-redacted) id with
     *    `FALLBACK_ACCOUNT_ID_PREFIX`. The row stays countable and joinable while
     *    being unmistakably fabricated, which is precisely what BL-0117's
     *    poisoned account map lacked — `monetization_funnel` and `cohort_rollup`
     *    filter these out of account denominators at read time.
     *
     *    Absence stays valid **on the wire** (`TrackEvent.account_id` is optional
     *    as of `@revt-eng/schema` 0.1.325 / scaffold #375) for producers that
     *    have no user identity to derive from; the browser SDK always has one,
     *    so it always sends the fallback rather than a hole.
     *
     * The fallback is derived from `userContext.id || anonymousId` — the SAME
     * source both lanes' `user_id` resolves from — and redacted the same way, so
     * `user-fallback:<x>` on one lane matches `user-fallback:<x>` on the other.
     *
     * @returns The account id to send, whether a hash was applied, and whether
     *   the value is the fabricated fallback rather than an identified account.
     */
    private resolveAccountIdentity;
    /**
     * Report a treatment interaction directly by placement/treatment id — the
     * lower-level counterpart to {@link dismiss}/{@link snooze}/{@link convert},
     * which key off a decision's `output_id` instead.
     *
     * `decisionId`, `segmentHandles` and `segmentIds` (plan 282 TASK-9) ride
     * the interaction onto the wire as `decision_id` / `segment_handles` /
     * `segment_ids`. All optional: given, they win; otherwise the SDK fills
     * them from the output it indexed for `payloadId` (`segment_ids` only when
     * a hosted context supplied minted ids — never in local mode); a caller
     * that supplies none and names no indexed output sends exactly what it
     * sent before.
     *
     * A `cta_clicked` on an indexed output whose CTA opens a plan picker or
     * pricing page ({@link CHECKOUT_STARTED_CTA_ACTION_TYPES}) also emits
     * `checkout_started` — never for a CTA that opens checkout directly.
     *
     * @public
     */
    trackTreatmentInteraction(input: RevTurbineTreatmentInteractionRequest): Promise<void>;
    getPlacementContent(placementId: string, request?: JsonObject): Promise<RevTurbinePlacementContent>;
    /**
     * Report user-context keys the SDK does not recognize, then let the caller
     * strip them (plan 191 REQ-3 / Q-5 ruling).
     *
     * TypeScript rejects these at compile time via {@link Exact}, but plain-JS
     * callers get no such guard — and the previous dev-only warning was
     * compiled out of production builds, which is exactly how the
     * `user: { id, context: { plan_handle } }` shape shipped silently. So this
     * is prod-visible: one `console.warn` per session per distinct key set
     * (never a per-render flood), plus an `sdk_validation_warning` beacon so
     * integration mistakes surface in dashboards instead of only in a console
     * nobody is reading. Never throws — a monetization SDK must not take down
     * the host app over a bad key.
     */
    /**
       * Detect and reject the removed `plan.id` identity key (plan 191 Q-1).
       *
       * Plan identity is the `unique_handle`; `plan.id` was removed from the user
       * context. TypeScript rejects it at compile time via {@link Exact}, but a
       * plain-JS caller — or a stale build — passes it happily, and the failure is
       * SILENT and consequential: {@link resolveContextPlanRaw} finds no handle, so
       * the user reads as having no plan.
       *
       * This comment used to say the result was "fail-closed, with no signal".
       * That was wrong, and wrong in the dangerous direction — until plan 194
       * REQ-1 an unresolvable plan identity made the evaluator SKIP the plan
       * filter, so every plan-targeted rule matched and a plan-gated entitlement
       * came back `allowed`. The core now denies with `no_plan_identity`, which is
       * what makes the fail-closed claim true; both halves are load-bearing, so
       * this guard and that early return should move together.
       *
       * So the legacy shape is rejected rather than tolerated: the offending `id`
       * is stripped from the plan object, the caller gets a prod-visible console
       * error (once per session, mirroring
       * {@link reportUnrecognizedContextKeys}), and an `sdk_validation_warning`
       * rides the anonymous meta lane so the control plane can see integrations
       * still sending it.
       *
       * A plan object carrying BOTH `handle` and `id` keeps the handle — the `id`
       * is simply dropped, since the handle is the identity.
       *
       * @param verb Which entry point received it, for the message and dedupe key.
       * @param plan The caller-supplied plan object, unvalidated.
       * @returns The plan object with any legacy `id` removed, or the input
       *   unchanged when it carries none.
       */
    private rejectLegacyPlanId;
    private reportUnrecognizedContextKeys;
    /**
     * Report server-assigned keys a browser entry point dropped (D-36,
     * BL-0351, BL-0352). Same once-per-session dedupe and anonymous
     * `sdk_validation_warning` lane as {@link reportUnrecognizedContextKeys},
     * with guidance that names the actual writer instead of pointing the caller
     * at `custom` — moving a server-assigned value under `custom` would not make
     * it any less browser-supplied.
     */
    private reportServerAssignedContextKeys;
    private normalizePlacementOutput;
    private validateTrialStatusShape;
    /**
     * Resolve the legacy placement payload for a request config. Prefer
     * {@link getPlacementDecision} for new integrations; kept for the
     * documented legacy request-config path.
     *
     * @public
     */
    getPlacement(config: RevTurbinePlacementRequestConfig): Promise<PlacementOutput | null>;
    /**
     * Evaluate one handle against the configured Playbook and record the result.
     *
     * Extracted so the first-pass evaluation and the post-config-wait evaluation
     * (BL-0179) cannot drift apart: a second copy of this sequence is how a
     * re-evaluation ends up skipping the local cache write or the persist.
     * Returns `null` when no Playbook rule covers the handle — which, before a
     * config has loaded, is every handle.
     */
    private resolveEntitlementLocally;
    /**
     * Evaluate a single entitlement handle for the active user, purely from the
     * loaded UserContext and Playbook. The advertised {@link can} alias wraps
     * this with the friendly verb name.
     *
     * A check that lands before the Playbook does waits out the in-flight load,
     * bounded, and re-evaluates (BL-0179); it fails CLOSED only once nothing more
     * is coming. See {@link RevTurbinePlaybookLoadState}.
     *
     * @public
     */
    checkEntitlement(handle: string, context?: RevTurbineEntitlementContext): Promise<EntitlementResult>;
    /**
     * Set absolute usage balances for the active user and emit any
     * threshold-crossing triggers. See the advertised {@link update} alias's
     * `usage` key for the same contract via the general patch verb.
     *
     * @public
     */
    updateUsage(balances: UsageBalances): void;
    /**
     * Report usage values that are neither a number nor an entry object, so a
     * dropped balance is visible rather than silent (plan 194 REQ-5).
     *
     * `usageAmountsFromEntries` keeps what it understands and drops the rest.
     * Dropping quietly is what let a mis-shaped report leave the meter empty
     * while the gate kept deciding on a stale balance.
     */
    private reportUnusableUsageValues;
    /**
     * Report reported usage keys that match no entitlement handle in the
     * Playbook (plan 194 REQ-2 / Kent's Q-2 ruling: warn, never deny).
     *
     * A one-letter typo — `generatons` for `generations` — reads as zero
     * consumed at any real consumption, so the limit never bites and the check
     * grants forever. Nothing on the path noticed, and the mistake survives
     * review because the correctly-keyed entitlement works in the same session.
     *
     * Deliberately warn-only. Usage reporting is optional, so the SDK cannot
     * tell "used: 0" from "never reported"; denying on an unmatched key would
     * break every legitimately-zero user. The narrow, certain case is the one
     * caught here: a key naming an entitlement the Playbook does not contain.
     *
     * Silent when no Playbook has loaded yet — validating against a config we
     * do not have would warn on every correct key in Server mode's startup
     * window, which trains people to ignore the warning.
     */
    private reportUnmatchedUsageKeys;
    /**
     * `getUserContext()`'s `trial` (BL-0417): the resolved trial view, copied,
     * or nothing when neither trial source was ever supplied (the SDK's
     * `{ in_trial: false }` default is not a fact about the user).
     */
    private userContextTrialProjection;
    /**
     * Build the full persistence-ready {@link UserContext} from the current
     * SDK state. Includes `tenant_id` and `user_id` required for API storage.
     *
     * Also projects the decision-driving fields — `plan_handle`,
     * `builtin_dimensions`, `trial` (the resolved trial view), `tiers`,
     * `payment_failed`, `payment_at_risk` and `instances` — when held. The snapshot is a copy: changing it changes nothing in the SDK;
     * write through `update()` / `setUserContext()`.
     *
     * @public
     */
    getUserContext(): UserContext;
    /**
     * Fetch the resolved user context from the decision API.
     * Returns the user's matched segments, traits, plan, and usage — used
     * to determine which placement payloads are eligible for display.
     *
     * @public
     */
    fetchUserContext(userId: string): Promise<UserTargetingContext>;
    /**
     * Lazily create + register the `traits:server` provider (plan 165 TASK-4).
     * Registered once on the first successful client-context fetch; later fetches
     * only refresh its snapshot.
     */
    private ensureServerUserContextProvider;
    /**
     * Enrich the held UserContext with the user's server-known CLIENT-SAFE context
     * (plan 157). Fetches `GET /api/sdk/client-context` with the provided client
     * token (`rt_client_`, minted by the customer's backend via the server SDK's
     * `clientSessions.create`), maps the client-safe fields (trial state, coarse
     * billing health) into the UserContext, and merges them in — these fields are
     * RevTurbine-authoritative, so they refresh the held context.
     *
     * The token is held in memory only (never storage / URL / logs). Enrichment is
     * best-effort: a network error or non-200 never throws into the app; on 401
     * (expired / revoked) the held token is cleared. Server-side entitlement checks
     * remain authoritative regardless of what the browser sees.
     *
     * @param clientToken the `rt_client_` token; when omitted, reuses the last one.
     */
    fetchClientContext(clientToken?: string): Promise<void>;
    /**
     * Ask the app's `clientSession` minter for a token (plan 191 Q-6).
     *
     * Returns undefined when no minter is configured, when it throws, or when
     * it yields a non-string/empty value — enrichment then simply does not
     * happen. A minter that rejects (backend down, user signed out mid-flight)
     * must never surface as an SDK error in the host app.
     */
    private mintClientSessionToken;
    /**
     * Kick off the client-context loop when — and only when — the app supplied
     * a `clientSession` minter (plan 191 REQ-5). Fire-and-forget by design:
     * called from the constructor and from `identify()`, neither of which may
     * block on the network.
     */
    /** The auto client-context fetch in flight, so overlapping triggers share one mint. */
    private clientContextFetchInFlight;
    private autoFetchClientContext;
    /**
     * Re-mint the client-session token for a DIFFERENT user (a switch): the held
     * one was minted for the previous user. If a fetch is still in flight, its
     * token is discarded once it lands and a fresh one is minted.
     */
    private remintClientContextForSwitch;
    /** Map the client-safe context response into a UserContext patch (plan 157). */
    private mapClientSafeContext;
    /**
     * Apply a UserContext patch — mirrors setUserContext but accepts a partial.
     * RevTurbine-authoritative fields (trial, billing signals, server plan)
     * overlay the held context; undefined fields are skipped by the merge, so
     * app-set values are never nulled.
     *
     * Two callers: the server client-context fetch (plan 157) and the optimistic
     * post-conversion plan move (BL-0004). Both notify subscribers, which is what
     * makes mounted slots and gates re-resolve.
     */
    private applyUserContextPatch;
    /**
     * Record that a placement was rendered to the user. Plan 43 TASK-9.
     *
     * Writes an `impressed` record to the SDK's `ImpressionHistory`,
     * which persists to `localStorage` via `StorageImpressionStore`
     * (or in-memory storage in non-browser environments). The
     * impression contributes to:
     *
     *   - **Frequency caps (`cap.v1`)** — once-per-period limits
     *     count this impression against the user's quota for the
     *     placement.
     *   - **Trial milestone supersession analytics** — for trial_progress
     *     ladders, the supersession diagnostic uses delivery state
     *     to distinguish "replaced an undelivered placement" (counts
     *     in `superseded_placement_ids`) from "lower threshold was
     *     already shown" (NOT counted — spec §3.5 "supersession only
     *     applies to undelivered placements").
     *   - **Generic milestone supersession (`content.milestone_order`)**
     *     — the order-based variant in `applyContentMilestoneSupersession`.
     *
     * Call this from consumer code when the placement is actually
     * shown to the user (e.g., from a React component's `useEffect`
     * on mount, or after the rendering call returns). The SDK does
     * NOT auto-record impressions — surfaces are rendered by consumer
     * code, so only the consumer knows when a placement was actually
     * presented (vs. fetched but not displayed).
     *
     * Safe to call multiple times for the same placement — duplicates
     * append additional impression records (used by frequency caps to
     * count delivery events).
     *
     * @param placementId - The placement's stable rule_id (e.g.
     *   `'pl_trial_progress_70'`). Match `decision.output.rule_id`
     *   from `getPlacementDecision`.
     * @param payloadId - Optional payload variant id, for
     *   variant-level analytics.
     * @param surfaceTemplateId - Optional surface template id, for
     *   per-surface cap accounting.
     * @param metadata - Optional metadata persisted with the record.
     *
     * @example
     * ```ts
     * const decision = await sdk.getPlacementDecision({ placementId: 'slot_trial_modal' });
     * if (decision.visible && decision.output?.rule_id) {
     *   renderBanner(decision.output);
     *   await sdk.recordImpression(decision.output.rule_id, decision.output.output_id);
     * }
     * ```
     */
    recordImpression(placementId: string, payloadId?: string, surfaceTemplateId?: string, metadata?: RevTurbineImpressionMetadata): Promise<void>;
    /**
     * Record a placement dismissal — the user explicitly closed it ("No thanks").
     * Time-boxed: the placement is hidden for the dismiss cooldown
     * (`cooldown_after_dismiss_days`, default 7 days) and re-shows once it elapses
     * (plan 167). NOT permanent — for a confirmed conversion use
     * {@link recordConversion}.
     *
     * @param placementId - The placement's stable rule_id.
     * @param payloadId - Optional payload variant id.
     * @param surfaceTemplateId - Optional surface template id.
     * @param metadata - Optional metadata persisted with the record.
     * @param cooldownMs - Optional explicit cooldown window (ms). Defaults to 7 days.
     */
    recordDismissal(placementId: string, payloadId?: string, surfaceTemplateId?: string, metadata?: RevTurbineImpressionMetadata, cooldownMs?: number): Promise<void>;
    /**
     * Record a bare placement click-through — the user clicked the CTA but did
     * not confirm the conversion (e.g. abandoned checkout). Time-boxed like a
     * dismiss; the placement may return (plan 167). For a confirmed conversion
     * use {@link recordConversion}.
     *
     * @param placementId - The placement's stable rule_id.
     * @param payloadId - Optional payload variant id.
     * @param surfaceTemplateId - Optional surface template id.
     * @param metadata - Optional metadata persisted with the record.
     * @param cooldownMs - Optional explicit cooldown window (ms). Defaults to 7 days.
     */
    recordClickThru(placementId: string, payloadId?: string, surfaceTemplateId?: string, metadata?: RevTurbineImpressionMetadata, cooldownMs?: number): Promise<void>;
    /**
     * Record a confirmed conversion — the user completed the CTA action. The
     * record is retained for analytics. Future eligibility is evaluated from
     * the current UserContext and Playbook.
     *
     * @param placementId - The placement's stable rule_id.
     * @param payloadId - Optional payload variant id.
     * @param surfaceTemplateId - Optional surface template id.
     * @param metadata - Optional metadata persisted with the record.
     */
    recordConversion(placementId: string, payloadId?: string, surfaceTemplateId?: string, metadata?: RevTurbineImpressionMetadata): Promise<void>;
    /**
     * Return the active user's trial status, derived from their trial
     * instances and the configured reverse-trial rules.
     *
     * @public
     */
    getTrialStatus(): Promise<RevTurbineTrialContext>;
    /**
     * Derive and push the user's trial status from their {@link TrialInstance}
     * records, resolving the matching free/reverse trial rule straight from the
     * initialized RevTurbineConfig's `free_trial_rules` / `reverse_trial_rules`.
     *
     * The config-driven counterpart to {@link setTrialStatus}: instead of the
     * host app pre-deriving a `UserTrialStatus`, the SDK evaluates the tenant's
     * trial rules against the supplied instances via `@revt-eng/core`'s
     * `evaluateTrialStatus` and pushes the result into the local trial context
     * that gates `trial_progress` / `trial_ending` / `trial_ended` /
     * `trial_converted` placements. The same evaluator runs in the Python server
     * SDK, so both decide identically.
     *
     * Requires an initialized Playbook (static mode, or any mode with a
     * config provider). Returns the derived status, or `{ in_trial: false }`
     * when no active trial instance applies.
     *
     * @param instances - The user's trial instance records.
     * @param options - Optional `nowIso` clock pin (defaults to the current
     *   time) and `basePlanHandle` (the base plan a reverse-trial user reverts
     *   to, surfaced as `plan_handle`).
     *
     * @public
     */
    setTrialInstances(instances: readonly TrialInstance[], options?: {
        nowIso?: string;
        basePlanHandle?: string;
    }): Promise<RevTurbineTrialContext>;
    /**
     * Record one app-owned trial-episode revision (plan 276 R-1(b), TASK-13).
     *
     * **Trial execution and ownership stay with your app.** RevTurbine runs no
     * trial, enrols nobody and decides nothing about when a trial ended; it
     * records the fact your app states. Pass the episode's facts — including the
     * `evidence` that proves the revision — and the SDK runs the same pure
     * classifier every RevTurbine port runs, then emits one `trial_revision` on
     * the typed platform lane if, and only if, the evidence supports one.
     *
     * The classifier reads **no clock**. An episode whose scheduled end has
     * merely passed emits nothing and comes back `pending_unknown`: an elapsed
     * deadline proves only that the time passed, never that your app ended
     * anything. Supply `actual_end_at` and an `end_evidence` when it did.
     *
     * In `local_only` mode the SDK makes no server calls, so the fact reaches any
     * registered event consumer and never RevTurbine; the result says
     * `recorded_locally` rather than pretending otherwise.
     *
     * Never throws, and never blocks a decision.
     *
     * @param episode - The episode's facts, as your app holds them.
     * @param labels - Playbook vocabulary that rides along for grouping:
     *   `rule_handle`, `plan_handle`, `trial_type`, `provider_ref`. None of it
     *   affects the classification (plan 276 R-1(c)).
     *
     * @public
     */
    recordTrialRevision(episode: TrialEpisodeFacts, labels?: TrialRevisionLabels): Promise<TrialRevisionRecordResult>;
    /**
     * Record every revision the registered trial provider currently states.
     *
     * Resolves the `'trial'` domain provider, classifies each episode it returns
     * and records the ones whose evidence supports a revision. An episode that
     * resolves to `pending_unknown` is reported and emits nothing.
     *
     * With **no trial provider registered** this records nothing, logs the
     * one-time notice naming the gap, and returns a single
     * `no_trial_provider` result — never an error (ruling D-21). Call
     * {@link RevTurbineCustomerSdk.recordTrialRevision} directly if you would
     * rather push episodes than have them pulled.
     *
     * @public
     */
    syncTrialRevisions(labels?: TrialRevisionLabels): Promise<TrialRevisionRecordResult[]>;
    /**
     * Record that a customer account came into existence (plan 276 REQ-3).
     *
     * Requires the account grain, the creation time, the creating act and the
     * evidence that proves it. A **user** signup is not account creation
     * (plan 276 R-2) — emit `user_signed_up` for that; a payload whose `source`
     * names a user-grain act is rejected without emitting, and the result says so.
     *
     * @public
     */
    recordAccountCreated(payload: AccountCreatedPayload): Promise<{
        recorded: boolean;
        reason: string | null;
    }>;
    /**
     * The D-21 nudge: one info-level console line per SDK runtime when trials
     * exist but nothing will record their revisions. Never an error, never a
     * throw, and it changes no decision.
     */
    private noteMissingTrialProviderOnce;
    /**
     * Returns the Playbook snapshot loaded at initialization.
     *
     * Canonical consumers should retain their own Playbook or use
     * {@link normalizeConfigArtifactOrThrow} at their ingestion boundary rather
     * than reading it back out of the SDK.
     */
    getPlaybook(): RevTurbineConfig | undefined;
    /**
     * @deprecated Renamed to {@link RevTurbineCustomerSdk.getPlaybook} —
     * `Playbook` is the canonical name for the artifact (BL-0156). Identical
     * behaviour; removed in `0.13.0`.
     */
    getExportedConfig(): RevTurbineConfig | undefined;
    /**
     * Validate that each configured UI path action has a resolver implementation.
     *
    * By default this validates `localRuntime.playbook.content_ui_paths` (when present)
     * against:
     * - `uiPathResolvers` passed at SDK init
     * - optional `resolvers` passed to this method
     * - CTA handlers from domain providers (`domain: 'cta'`), unless disabled
     *
     * @public
     */
    validateUiPathResolvers(options?: RevTurbineUiPathResolverValidationOptions): Promise<RevTurbineUiPathResolverValidationReport>;
    /**
     * Init-time `uiPathResolvers` coverage check. A gap used to throw and take
     * the whole app down for what is, in effect, an unwired button; per plan 174
     * Q-2 (= plan 168 Q-2, decided 2026-08-10) it now warns and leaves the
     * affected CTAs on the no-op path — the click is tracked and falls back to
     * `onCtaClick`, nothing else happens. `validateUiPathResolvers({
     * throwOnMissing: true })` remains the strict opt-in.
     */
    private warnOnUiPathResolverCoverageGaps;
    /** Route output-addressed callbacks through the canonical interaction/analytics path. */
    private trackOutputInteraction;
    /**
     * The Stripe Checkout `revturbine_*` metadata bag for a rendered output
     * (plan 282 REQ-5; research §6.2), keyed by the `output_id` of a decision
     * this SDK produced — what the customer's server passes when it creates the
     * Checkout Session the output's CTA leads to.
     *
     * Pass `metadata` as the session's `metadata` AND as
     * `subscription_data.metadata`. The session copy is what
     * `checkout.session.completed` carries; the subscription copy is what every
     * later `customer.subscription.*` event carries and what each invoice
     * snapshots under `parent.subscription_details.metadata`, so renewals,
     * failures and recoveries stay attributable without a `customers` row. Pass
     * `client_reference_id` as the session's `client_reference_id`, Stripe's own
     * caller-side key, which the identity bridge also reads as the user id.
     *
     * Checkout cannot set Customer metadata inline: if you let Checkout create
     * the Customer, follow up with `customers.update({ metadata })` — see the
     * billing guide.
     *
     * Every value is one this SDK holds; nothing is minted. The user id is the
     * one `identify()` set, as this SDK's own telemetry carries it (an
     * email-shaped id is hashed the same way on every lane, so the purchase
     * joins the click). The account id is present only when an account was
     * identified — never the user-derived fallback. A key the SDK does not hold
     * is absent, not empty.
     *
     * @returns `null` when no decision from this SDK produced `outputId`.
     * @public
     */
    checkoutMetadata(outputId: string): RevTurbineCheckoutMetadata | null;
    /**
     * Suppress a decision's placement for its authored dismiss cooldown.
     * Terminal for the window: `getPlacementDecision` will not return it again
     * until the cooldown lapses.
     *
     * @public
     */
    dismiss(outputId: string): Promise<void>;
    /**
     * Suppress a decision's placement for a "remind me later" window —
     * `seconds` overrides the authored default.
     *
     * @public
     */
    snooze(outputId: string, seconds?: number): Promise<void>;
    /**
     * Record a confirmed CTA completion, then reload the UserContext so every
     * mounted surface re-decides against the plan the user just converted to.
     *
     * Conversion is **not** a suppression: it writes no cooldown and no permanent
     * retirement (spec §"interaction" table; Kent's plan 254 D-9 ruling). What
     * makes a converted upgrade banner leave the screen is the user no longer
     * matching it — so a conversion that did not refresh the context left the
     * placement mounted until something else happened to re-resolve it. Kent,
     * 2026-09-25 (BL-0004): *"Converting should trigger a reloading of UserContext
     * with the new plan/billing state the user has converted to."*
     *
     * Ordering, and why it is this way round:
     *
     * 1. The interaction is recorded (analytics + attribution), as before.
     * 2. **Optimistically**, locally: when the converted output's CTA names a
     *    target plan (`cta_path.plan_handle`), the held context moves to that plan
     *    immediately. Billing truth arrives by Stripe webhook, so
     *    `GET /api/sdk/client-context` can still report the OLD plan for seconds
     *    after a successful checkout — waiting for it would leave the upgrade
     *    prompt on screen exactly when the user has just paid.
     * 3. Subscribers are notified either way — a conversion whose CTA names no
     *    plan still re-decides mounted slots and re-checks mounted gates, which is
     *    what turns a plan change the host applied itself into a re-render.
     * 4. **Then** the server refresh (`fetchClientContext()`), which overlays the
     *    RevTurbine-authoritative trial / billing-health / plan fields and
     *    notifies again if it changed anything. It is best-effort and never
     *    throws, so awaiting it cannot fail a conversion; with no client-session
     *    minter configured it is a no-op and the optimistic state stands.
     *
     * Mounted `PlacementController`s re-decide and mounted `EntitlementGate`s
     * re-check through their `watchUserContext()` subscriptions — which the React
     * bindings attach for you. Re-resolution emits the normal lifecycle events
     * once per final decision; the transient states emit nothing.
     * `PlacementController.ctaComplete()` is unchanged and remains the
     * component-level path.
     *
     * @public
     */
    convert(outputId: string): Promise<void>;
    /**
     * The BL-0004 post-conversion context reload: optimistic local plan move,
     * then the server refresh. See {@link convert} for the ordering rationale.
     */
    private reloadUserContextAfterConversion;
    /**
     * Keep a stale server plan from undoing an optimistic conversion (BL-0004).
     *
     * Billing truth arrives by Stripe webhook, so a `client-context` read that
     * races the webhook reports the PRE-conversion plan — and the server plan
     * deliberately overlays the app-supplied one (plan 179 TASK-1), so applying
     * that read verbatim would put the upgrade prompt straight back on screen
     * seconds after the user paid.
     *
     * So while a conversion is pending, a server plan equal to the plan converted
     * AWAY from is dropped — only the plan fields, never the trial or billing-health
     * signals, which are authoritative regardless. Any other value (the new plan,
     * or a third one the user was moved to out-of-band) clears the pending state
     * and applies, so this can suppress at most the one value it was created for
     * and cannot outlive the lag it exists to cover.
     */
    private dropStalePostConversionPlan;
    /**
     * The display name the loaded Playbook gives a plan handle, else the handle.
     * Keeps an optimistic plan move from putting a raw handle in front of a user
     * when the Playbook already knows the plan's name.
     */
    private planNameForHandle;
    /**
     * Emit a canonical trigger event. There is no in-SDK consumer that matches
     * on trigger names — the shipped behavior is ingest to `events_clickstream`
     * only (plan 250's wire/consumer matrix); a decision-engine placement
     * trigger matches `trigger.slot_id` against registered slots, not this
     * event's name.
     *
     * Convenience wrapper over {@link emitSemantic} that constrains the event
     * name to {@link RevTurbineTriggerEvent} and attaches standard context
     * (user_id, plan, timestamp) automatically.
     *
     * **Three trigger names land namespaced on the wire.** This rides the
     * generic emit lane, which prefixes `clickstream_` to any name the platform
     * taxonomy already declares — the rule that stops a client forging a
     * first-party fact by naming an event after one. `trial_expired`,
     * `payment_failed` and `feature_gated` collide, so they are stored as
     * `clickstream_trial_expired`, `clickstream_payment_failed` and
     * `clickstream_feature_gated`. Query those names, not the raw ones. The
     * remaining triggers are unaffected, and the platform's own versions of the
     * three are emitted first-party through the typed surface. Pinned by
     * `trigger-namespacing-parity.test.ts` (plan 231 REQ-4).
     *
     * @example
     * ```ts
     * await sdk.emitTrigger('usage_limit_approaching', { usage_percent: 85, threshold: 80 });
     * await sdk.emitTrigger('trial_expiring', { days_remaining: 2 });
     * // stored as `clickstream_feature_gated` — see the collision note above
     * await sdk.emitTrigger('feature_gated', { feature: 'advanced_automation' });
     * ```
     *
     * @public
     */
    emitTrigger(trigger: RevTurbineTriggerEvent, payload?: RevTurbineTriggerPayload, options?: RevTurbineEventOptions): Promise<void>;
    trackEvent(name: string, data?: SdkEventProperties): Promise<void>;
    /**
     * Identify the current user and (optionally) supply their context.
     *
     * Accepts the canonical {@link IdentifyContextInput} — recognized by the
     * presence of `account_id` / `email` / `plan` / `plan_handle` / `usage` /
     * `entitlements` / `custom` — or a legacy plain-traits object, which is
     * stored under `custom` unchanged. `plan_handle` is THE plan matching
     * identity (the plan's `unique_handle`, plan 191 REQ-1); the `plan` object
     * is display metadata and never participates in matching, and nothing in
     * `custom` ever drives plan resolution (REQ-2).
     *
     * Guardrails: an empty id rejects the call; an email-shaped id warns in dev
     * (ids stay opaque — pass emails as `{ email }`); unrecognized top-level
     * keys are named in a dev warning instead of being dropped or routed
     * silently. Legacy-traits behavior is unchanged beyond the diagnostic.
     *
     * `account_id` is OPTIONAL. Identify no account and every event this SDK
     * emits carries `user-fallback:<user_id>` instead — the acting user's id
     * behind the {@link FALLBACK_ACCOUNT_ID_PREFIX} namespace marker, never a
     * bare user id (BL-0117, Kent's D-13). `events_clickstream.account_id` and
     * `placement_presentations.account_id` are the join keys
     * `monetization_funnel` matches accounts on, so the prefix is what lets the
     * warehouse keep a fabricated key out of an account denominator instead of
     * counting it as a real account. Identify an account when you have one.
     *
     * @example
     * ```ts
     * rt.identify('user_123', { plan_handle: 'pro' }); // THE matching identity
     * rt.identify('user_123', { plan_handle: 'pro', plan: { handle: 'pro', name: 'Professional' } });
     * ```
     *
     * @public
     */
    identify<T extends IdentifyContextInput>(userId: string, context?: Exact<IdentifyContextInput, T>): void;
    /**
     * Reset to anonymous user state, re-inferring a fresh anonymous id. Also
     * available as the advertised {@link reset} alias.
     *
     * @public
     */
    resetIdentity(): void;
    /**
     * Hard-reset the user context to a blank slate — removes EVERY user-context
     * value (`id`, `plan`, `email`, `account_id`, `custom`, `usage`,
     * `entitlements`, `personalization`) plus usage balances, and clears the
     * decision cache, interaction state, and impression history.
     *
     * Unlike {@link resetIdentity} (a sign-out that re-infers anonymous context
     * when the `inferUser` policy is on), this performs **no** inference, so the
     * resulting context is guaranteed empty. Mostly for demo / fixture flows that
     * reset cleanly between scenarios.
     *
     * @example
     * // Between demo personas:
     * rt.resetUserContext();
     * rt.identify('demo_pro', { plan_handle: 'pro' });
     */
    resetUserContext(): void;
    /**
     * Shared teardown for {@link resetIdentity} / {@link resetUserContext}:
     * blanks the user context and usage balances, recomputes derived traits, and
     * clears the decision cache, interaction state, and impression history.
     * `reinfer` controls whether anonymous context is re-inferred (sign-out) or
     * the context is left fully empty (hard reset).
     */
    private clearAllUserState;
    /**
     * Check whether the user can do something — the advertised alias of
     * {@link checkEntitlement}. Returns the rich {@link EntitlementResult}
     * (`allowed`, `status`, `reason`, and `limit`/`used`/`remaining` for
     * limit-bearing entitlements). This client check is a UX convenience — for
     * billing-critical or abuse-sensitive actions, re-run the same check on your
     * server before granting access.
     *
     * @example
     * const access = await rt.can('generate_image');
     * if (!access.allowed) showUpgrade();
     *
     * @public
     */
    can(handle: string, context?: RevTurbineEntitlementContext): Promise<EntitlementResult>;
    /**
     * Gate an action behind an entitlement — the advertised `gate(action, fn)` verb.
     * Checks the entitlement for `action`; if allowed, runs `fn` and returns its
     * result; otherwise does NOT run `fn` and returns the entitlement so the caller
     * can surface a paywall (e.g. render an `<RTSlot>`). See {@link RevTurbineGateResult}.
     *
     * @example
     * const gated = await rt.gate('export_pdf', () => exportPdf());
     * if (!gated.ran) openPaywall(gated.entitlement);
     *
     * @public
     */
    gate<T>(action: string, fn: () => T | Promise<T>, context?: RevTurbineEntitlementContext): Promise<RevTurbineGateResult<T>>;
    /**
     * Track an event — the advertised alias of {@link trackEvent}. Powers
     * analytics, frequency caps, attribution, and experiments.
     *
     * Identity comes from the active user context ({@link identify} /
     * {@link setUserContext}). `account_id` carries the identified account when
     * there is one and the labelled fallback `user-fallback:<user_id>` when there
     * is not — never a bare, unlabelled user id (BL-0117, Kent's D-13).
     *
     * @example
     * rt.track('ai_generation_completed', { credits: 3 });
     *
     * @public
     */
    track(name: string, data?: SdkEventProperties): Promise<void>;
    /**
     * Patch the session-bound user context — the advertised `update(patch)` verb.
     * Accepts every session-scoped {@link RevTurbineUserContext} field except the
     * identity handle `id` (see {@link RevTurbineUpdateInput}); to (re)establish
     * identity use {@link identify}.
     *
     * `usage` routes through {@link updateUsage} (absolute balances + usage
     * threshold-crossing events); every other recognized field routes through
     * {@link setUserContext}, which merges with upsert semantics — an omitted field
     * never clobbers a previously-set value. Both stores are updated independently,
     * so `update({ plan, usage })` applies each without interference. Keys outside
     * the recognized set are dropped with a dev-only warning — they never reach
     * the context, and `update({ <handle>: n })` is not a usage report.
     *
     * @example
     * // Bump reported usage:
     * rt.update({ usage: { generations: 25 } });
     *
     * @example
     * // Reflect a plan change and new traits in one call (identity unchanged):
     * rt.update({ plan_handle: 'pro', custom: { role: 'admin' } });
     *
     * @public
     */
    update<T extends RevTurbineUpdateInput>(patch: Exact<RevTurbineUpdateInput, T>): void;
    /**
     * Clear the current user — the advertised alias of {@link resetIdentity}
     * (e.g. on sign-out).
     *
     * @public
     */
    reset(): void;
    onRouteChange(change: {
        path: string;
        title?: string;
        tags?: string[];
    }): void;
}
/** The one name the browser credential arrives under (BL-0113). */
type BrowserKeyOptions = Pick<RevTurbineInitOptions, 'publicKey'>;
/**
 * The credential the SDK authenticates its Playbook delivery
 * (`/api/sdk/bootstrap`, `/api/sdk/config`) and event ingest (`/api/track`)
 * with.
 *
 * On a backend (no `window` / `document`, and not a browser Web Worker or
 * service worker — see {@link isServerKeyContext}) the SERVER key (`apiKey`) wins when
 * supplied: the control plane refuses a public key that arrives without a
 * browser `Origin`, and accepts a server key only from a non-browser caller,
 * scoped to the key's own tenant. That is what makes a hosted
 * `RuntimeMode.Server` instance work in a Node server — one long-lived
 * instance per process loading and refreshing the launched Playbook and
 * reporting events.
 *
 * In a browser — worker scopes included — the server key is NEVER used, whatever was passed: only
 * `publicKey` is read. The theme API and the other browser routes always use
 * the public key ({@link resolveBrowserPublicKey}).
 *
 * @internal
 */
declare function resolveSdkDeliveryCredential(options: Pick<RevTurbineInitOptions, 'publicKey' | 'apiKey'>): {
    token: string;
    kind: 'public' | 'server';
} | undefined;
/**
 * Resolve the browser credential.
 *
 * `publicKey` is the ONLY name. Returns `undefined` when it was not supplied,
 * so callers apply their own default (local-only mode) or fail init.
 *
 * **The `0.10.0` alias window closed in `0.11.0` (BL-0113).** `ingestPublicKey`
 * is gone from {@link RevTurbineInitOptions} entirely — passing it is a type
 * error — and `apiKey` is no longer read here: it means the secret **server**
 * key, for `RevTurbineServer` (exported from `@revturbine/sdk/headless`), and
 * a browser init that supplies only `apiKey` now resolves nothing and fails at
 * init. Plan 257's CHANGELOG entry promised removal "one minor later"; this is
 * that minor.
 *
 * Kept as a function rather than inlined at the three read sites (the SDK
 * class, the React provider, the controllers) so there stays exactly ONE place
 * that decides what the browser credential is — the property that made this
 * removal a three-line change instead of an audit.
 *
 * @internal
 */
declare function resolveBrowserPublicKey(options: BrowserKeyOptions): string | undefined;

/**
 * Theme token structure for RevTurbine SDK placement components.
 *
 * Customers can upload or configure a theme via the API. The SDK fetches
 * theme tokens on initialization and persists them locally for fast
 * subsequent loads.
 */
/** Color tokens used across all placement components. */
interface RevTurbineThemeColors {
    /** Primary brand color (buttons, banners, progress fills). Default `#1e40af`. */
    primary: string;
    /** Text color on primary backgrounds. Default `#ffffff`. */
    primaryText: string;
    /** Secondary/surface background. Default `#f3f4f6`. */
    secondary: string;
    /** Text on secondary backgrounds. Default `#1f2937`. */
    secondaryText: string;
    /** Accent color (e.g. accent buttons). Default `#7c3aed`. */
    accent: string;
    /** Text on accent backgrounds. Default `#ffffff`. */
    accentText: string;
    /** Page/card background. Default `#ffffff`. */
    background: string;
    /** Surface/card background (e.g. inline embed). Default `#f8fafc`. */
    surface: string;
    /** Surface border color. Default `#e2e8f0`. */
    surfaceBorder: string;
    /** Primary text color. Default `#111827`. */
    text: string;
    /** Secondary text color. Default `#4b5563`. */
    textSecondary: string;
    /** Muted/hint text color. Default `#6b7280`. */
    textMuted: string;
    /** Overlay backdrop color. Default `rgba(0,0,0,0.5)`. */
    overlay: string;
    /** Success state color. Default `#16a34a`. */
    success: string;
    /** Warning state color (quota 70-90%). Default `#f59e0b`. */
    warning: string;
    /** Danger state color (quota >90%). Default `#dc2626`. */
    danger: string;
    /** Informational/link color. Default `#60a5fa`. */
    info: string;
    /** Toast/dark surface background. Default `#1f2937`. */
    toastBackground: string;
    /** Toast text color. Default `#ffffff`. */
    toastText: string;
    /** CLI terminal background. Default `#1e1e1e`. */
    cliBackground: string;
    /** CLI terminal text. Default `#d4d4d4`. */
    cliText: string;
    /** CLI link color. Default `#569cd6`. */
    cliLink: string;
    /** Track/unfilled bar background. Default `#e5e7eb`. */
    track: string;
}
/** Typography tokens. */
interface RevTurbineThemeTypography {
    /** Base font family. Default `system-ui, -apple-system, sans-serif`. */
    fontFamily: string;
    /** Monospace font family for CLI. Default `ui-monospace, SFMono-Regular, ...`. */
    fontFamilyMono: string;
    /** Base font size. Default `14px`. */
    fontSize: string;
    /** Small font size (CTA buttons, labels). Default `13px`. */
    fontSizeSmall: string;
    /** Header font size. Default `20px`. */
    fontSizeHeader: string;
    /** Large header font size (full page). Default `28px`. */
    fontSizeLargeHeader: string;
}
/** Shape/radius tokens. */
interface RevTurbineThemeShape {
    /** Small border radius. Default `6px`. */
    borderRadiusSmall: string;
    /** Default border radius. Default `8px`. */
    borderRadius: string;
    /** Large border radius (modal dialog). Default `12px`. */
    borderRadiusLarge: string;
}
/** Shadow tokens. */
interface RevTurbineThemeShadows {
    /** Toast/floating element shadow. Default `0 10px 40px rgba(0,0,0,0.25)`. */
    medium: string;
    /** Modal dialog shadow. Default `0 20px 60px rgba(0,0,0,0.3)`. */
    large: string;
}
/**
 * Complete SDK theme definition.
 * All fields are optional when uploading — missing values fall back to defaults.
 */
interface RevTurbineTheme {
    /** Theme identifier. */
    id?: string;
    /** Human-readable theme name. */
    name?: string;
    /** Monotonic version string for cache invalidation. */
    version?: string;
    /** Color tokens. */
    colors: RevTurbineThemeColors;
    /** Typography tokens. */
    typography: RevTurbineThemeTypography;
    /** Shape tokens. */
    shape: RevTurbineThemeShape;
    /** Shadow tokens. */
    shadows: RevTurbineThemeShadows;
}
/**
 * Partial theme for API responses and user uploads.
 * All values are optional — the SDK deep-merges with defaults.
 */
type RevTurbineThemeInput = {
    id?: string;
    name?: string;
    version?: string;
    colors?: Partial<RevTurbineThemeColors>;
    typography?: Partial<RevTurbineThemeTypography>;
    shape?: Partial<RevTurbineThemeShape>;
    shadows?: Partial<RevTurbineThemeShadows>;
};

/**
 * Headless SDK controllers — framework-agnostic orchestration.
 *
 * These classes encapsulate the register → decide → track → interact lifecycle
 * that the React hooks implement via `useState`/`useEffect`. Use them from
 * Vue, Svelte, Angular, vanilla JS, or server-side code.
 *
 * @example
 * ```ts
 * import { initRevTurbine, PlacementController, EntitlementGate } from '@revturbine/sdk/headless';
 *
 * const session = await initRevTurbine({
 *   tenantId: 'tenant_abc',
 *   publicKey: 'rtk_…',
 *   endpoint: 'https://edge.example.com',
 *   mode: 'snippet',
 *   user: { id: 'user_123', plan_handle: 'pro' },
 * });
 *
 * const banner = session.placement({ surfaceSlot: { id: 'upsell_banner' } });
 * await banner.load();
 * if (banner.visible) { ... }
 * await banner.dismiss();
 *
 * const gate = session.entitlement({ handle: 'brand_kit', autoGate: true });
 * await gate.check();
 * if (gate.denied) { // show gate.gatedPlacement }
 * ```
 */

/** Callback used to subscribe to state changes in controllers. */
type ChangeListener = () => void;
/**
 * Options for creating a {@link PlacementController}.
 */
interface PlacementControllerOptions {
    /** Placement configuration (name, scope key, metadata). */
    placement?: RevTurbinePlacementConfig;
    /** Canonical surface slot configuration (preferred over `placement`). */
    surfaceSlot?: RevTurbineSurfaceSlotConfig;
    /** Target user ID. Falls back to the SDK's current user context. */
    userId?: string;
    /** Context resolution mode. Default `'auto'`. */
    contextMode?: RevTurbineContextMode;
    /** Override segment, plan, or usage for testing. */
    overrides?: RevTurbinePlacementDecisionOverrides;
    /** Custom traits to include in the decision request. */
    traits?: Record<string, string | number | boolean>;
    /** Decision cache TTL in milliseconds. */
    ttlMs?: number;
    /** Whether to track an impression automatically when the decision is visible. Default `true`. */
    autoTrackImpression?: boolean;
    /**
     * When the presentation-writing `impression` fires (plan 144 TASK-11 / REQ-17).
     * - `legacy_resolution` (default) — at decision resolution, exactly as today.
     * - `render` — when the placement's visual root renders.
     * - `viewport` — when the root scrolls into the viewport; if
     *   `IntersectionObserver` is unavailable it falls back to resolution
     *   (Q-8 ruling), tagged `render_fallback`.
     *
     * Only `viewport` (with `IntersectionObserver` present) moves the
     * `placement_presentations` denominator — a deliberate metric-definition
     * change (see the plan's Q-8 / REQ-17b). The default keeps the denominator and
     * its history unchanged.
     */
    placementExposure?: PlacementExposureMode;
    /**
     * The app route this slot renders on, stamped onto every slot lifecycle
     * event as `route` (BL-0207 / D-30) so ingestion-driven discovery can
     * persist it on the discovered surface slot.
     *
     * A string, or a getter read at emission time (so a slot that outlives a
     * client-side navigation reports the route it was evaluated on). Either is
     * normalized by {@link normalizeSlotRoute}: origin, query string and
     * fragment are dropped and identifier-like segments templated to `:id`.
     * The React `usePlacement()` hook supplies this automatically — the nearest
     * `<RevTurbineRoute>` pattern, else `window.location.pathname`. Omitted, a
     * headless controller emits `route: null`.
     */
    route?: string | (() => string | null | undefined);
}
/**
 * When the presentation-writing `impression` fires relative to a placement's
 * lifecycle (plan 144 TASK-11). See {@link PlacementControllerOptions.placementExposure}.
 */
type PlacementExposureMode = 'legacy_resolution' | 'render' | 'viewport';
/**
 * Read-only snapshot of a {@link PlacementController}'s state.
 */
interface PlacementControllerState {
    readonly isLoading: boolean;
    readonly error: string;
    readonly placementId: string;
    readonly visible: boolean;
    readonly decision: RevTurbinePlacementDecision | null;
    readonly content: RevTurbinePlacementContent['content'] | null;
    /**
     * How the placement's visual root came to be considered exposed, or `null`
     * before {@link PlacementController.markVisible} is called (plan 144 TASK-9).
     * `'render_fallback'` when `IntersectionObserver` was unavailable (AC-10).
     */
    readonly exposureBasis: ExposureBasis | null;
}
/**
 * Framework-agnostic placement lifecycle controller.
 *
 * Encapsulates the same register → decide → impression-track → interact flow
 * that the React `usePlacement()` hook provides, but without any framework dependency.
 *
 * Subscribe to state changes with {@link onChange} and read the current state
 * with {@link state}, or just `await load()` for a one-shot pattern.
 *
 * @example
 * ```ts
 * const ctrl = new PlacementController(sdk, { surfaceSlot: { id: 'upsell_banner' } });
 * ctrl.onChange(() => updateUI(ctrl.state));
 * await ctrl.load();
 * ```
 */
declare class PlacementController {
    private readonly sdk;
    private readonly options;
    private readonly listeners;
    private _placementId;
    private _decision;
    private _isLoading;
    private _error;
    private _impressionTracked;
    private _loadSeq;
    private _rendered;
    private _exposed;
    private _exposureBasis;
    private _lastSlotKey;
    private _awaitingConfig;
    private _configRetries;
    private _playbookUnsubscribe;
    private _userContextUnsubscribe;
    constructor(sdk: RevTurbineCustomerSdk, options: PlacementControllerOptions);
    /**
     * Stop listening for Playbook loads and user-context changes. Idempotent; call
     * it when the owning component unmounts (`usePlacement` does).
     */
    dispose(): void;
    /**
     * Drop only the Playbook-load subscription — the within-load-cycle teardown
     * (BL-0177). A mounted controller keeps watching the user context (BL-0004).
     */
    private unsubscribePlaybook;
    /**
     * Re-decide whenever the user context changes (BL-0004).
     *
     * The counterpart to {@link EntitlementGate.watchUserContext}, and the reason
     * `sdk.convert()` now removes a converted placement in place: conversion writes
     * no suppression — eligibility is a function of the user's CURRENT plan and
     * targeting — so the only thing that can take a converted upgrade banner off
     * screen is a re-decide against the reloaded context. Without this the
     * placement stayed mounted until something else happened to re-resolve it, and
     * the host had to call `refresh()` itself or use the component's
     * `ctaComplete()` (the limitation plan 236 TASK-13 recorded).
     *
     * Only re-decides a controller that has already resolved something: before the
     * first `load()` there is nothing on screen to be stale, and firing then would
     * turn every startup `identify()` into a duplicate decision.
     *
     * Calls `load()` rather than `refresh()` on purpose — `refresh()` clears
     * impression/exposure tracking, so a context change would re-credit a
     * presentation the user never saw again.
     *
     * Returns an unsubscribe function; {@link dispose} also drops it.
     */
    watchUserContext(): () => void;
    /**
     * Is this decision a race against a Playbook load rather than a verdict?
     *
     * `config_unavailable` carries both meanings (see
     * `RevTurbinePlaybookLoadState`). Only the transient one is retried, and only
     * while the retry budget holds — a provider that never produces a config must
     * settle into the honest fallback instead of re-deciding forever.
     */
    private isTransientConfigMiss;
    /**
     * Re-decide once a Playbook load attempt settles, if the decision we are
     * holding was only a config race and a config is now available.
     *
     * Bounded three ways: only while the held decision says
     * `config_unavailable`, only when the settled state is `ready`, and never
     * more than {@link MAX_CONFIG_RETRIES} times per load cycle. A successful
     * re-decide clears the reason, which ends the cycle on its own.
     */
    private handlePlaybookSettled;
    /**
     * Give up waiting: publish the `config_unavailable` decision as the answer,
     * with the lifecycle + slot diagnostics that were withheld while a retry was
     * still expected.
     */
    private finalizeAwaitedConfig;
    /** Current state snapshot. */
    get state(): PlacementControllerState;
    /** The configured exposure mode (plan 144 TASK-11). Defaults to `legacy_resolution`. */
    private get exposureMode();
    /**
     * Called when the placement's visual root renders (plan 144 TASK-11). Emits
     * `placement_rendered` once, and under `placementExposure: 'render'` credits
     * the presentation now. Idempotent.
     */
    markRendered(): void;
    /**
     * Called by the viewport-exposure substrate when the placement's visual root
     * first enters the viewport — or immediately with `'render_fallback'` when
     * `IntersectionObserver` is unavailable (plan 144 TASK-9/11 / AC-9, AC-10).
     * Emits `placement_exposed` once with the basis, and under
     * `placementExposure: 'viewport'` a viewport exposure credits the presentation
     * here (Q-8). Idempotent.
     *
     * @param basis - how exposure was established; defaults to `'viewport'`
     */
    markVisible(basis?: ExposureBasis): void;
    /**
     * Fire the presentation-writing `impression` (→ `placement_presentations`)
     * once, tagged with the lifecycle basis it was credited at (plan 144 TASK-11).
     * Honors `autoTrackImpression: false` and only fires for a visible decision.
     * Best-effort — telemetry never breaks a placement.
     */
    private fireImpression;
    /**
     * Emit a placement lifecycle signal (`placement_rendered` / `placement_exposed`)
     * with decision provenance (plan 144 TASK-11). Best-effort.
     */
    private emitPlacementLifecycle;
    /**
     * Shared slot-lifecycle context (plan 144 TASK-10 / spec §10.1): the slot
     * identity, resolved decision facts, and the lifted `decision_id`. Best-effort
     * fields default to `null` before a decision resolves.
     */
    private slotContext;
    /** The slot's route for this emission, normalized; `null` when unknown. Never throws. */
    private resolveRoute;
    /**
     * Emit the slot resolution diagnostics (plan 144 TASK-10 / spec §10.1): always
     * `slot_evaluated`, then exactly one terminal — `slot_filled` (visible),
     * `slot_suppressed` (a cap/cooldown/explicit suppression), or `slot_empty`
     * (nothing matched). Deduped for the decision-cache lifetime and best-effort:
     * these are funnel-denominator signals, not engagement, and must never break a
     * placement. `slot_error` is emitted separately from `load()`'s catch.
     */
    private emitSlotResolution;
    /**
     * Emit `slot_error` when resolution fails and the additive fallback is used
     * (plan 144 TASK-10 / spec §10.1). Deduped per slot so a retrying loop does not
     * flood. Best-effort.
     */
    private emitSlotError;
    /** Emit one slot lifecycle event with the shared context. Best-effort. */
    private emitSlotEvent;
    /**
     * Emit `placement_outcome` — the intended CTA outcome completed (plan 144
     * TASK-10 / spec §10.3). A treatment-attribution signal distinct from the
     * `cta_completed` interaction: it marks the terminal funnel step with decision
     * provenance. Best-effort.
     */
    private emitPlacementOutcome;
    /** Convenience: `true` when the current decision says the placement is visible. */
    get visible(): boolean;
    /** Current resolved content, or `null` if no decision has been loaded. */
    get content(): RevTurbinePlacementContent['content'] | null;
    /** Current decision, or `null` if not yet loaded. */
    get decision(): RevTurbinePlacementDecision | null;
    /** Registered placement ID, or empty string before first `load()`. */
    get placementId(): string;
    /**
     * Register the placement (if needed) and fetch a decision.
     *
     * When `autoTrackImpression` is true (default), a visible decision
     * automatically records an impression event.
     */
    load(): Promise<RevTurbinePlacementDecision | null>;
    /** Re-fetch the placement decision (clears impression + render + exposure tracking). */
    refresh(): Promise<RevTurbinePlacementDecision | null>;
    /** Record a dismiss interaction and hide the placement. */
    /**
     * Record a dismissal.
     *
     * @param cooldownMs - Optional explicit window. Omit it — which is the normal
     *   case — and the SDK resolves the payload's authored `caps.cooldown_days`,
     *   falling back to the 7-day default. This used to default to 24h here and
     *   pass it ALWAYS, so the authored value and the 7-day default were both
     *   unreachable from React (plan 233 TASK-8b).
     */
    dismiss(cooldownMs?: number): Promise<void>;
    /** Record a snooze/remind-me-later interaction and hide the placement. */
    /**
     * Record a snooze / remind-me-later.
     *
     * @param seconds - Optional explicit window. Omit it and the SDK resolves the
     *   payload's authored `remind_later_minutes`, falling back to the tenant
     *   default (plan 233 TASK-8c). Remind-later is a DIFFERENT window from
     *   dismiss and resolves independently.
     */
    snooze(seconds?: number): Promise<void>;
    /** Alias for {@link snooze}. */
    remindMeLater(seconds?: number): Promise<void>;
    /** Record a CTA click interaction. */
    ctaClick(ctaTarget?: string): Promise<void>;
    /** Record a CTA completion interaction and hide the placement. */
    ctaComplete(ctaTarget?: string): Promise<void>;
    /**
     * Subscribe to state changes. Returns an unsubscribe function.
     *
     * @example
     * ```ts
     * const unsub = ctrl.onChange(() => console.log(ctrl.state));
     * // later...
     * unsub();
     * ```
     */
    onChange(listener: ChangeListener): () => void;
    /** Reset the controller state (clears decision, placement ID, etc.). */
    reset(): void;
    private trackInteraction;
    private notify;
}
/**
 * Options for creating an {@link EntitlementGate}.
 */
interface EntitlementGateOptions {
    /** The entitlement handle to check (e.g. `'brand_kit'`, `'mp4_download'`). */
    handle: string;
    /** Optional context (usage, required tier, etc.). */
    context?: RevTurbineEntitlementContext;
    /**
     * When true, automatically resolve a gated placement for denied entitlements.
     * Default `false`.
     */
    autoGate?: boolean;
    /**
     * Optional placement request fields used when auto-gating needs to fetch
     * a placement and one is not attached to the entitlement response.
     */
    gatePlacementRequest?: Omit<RevTurbinePlacementRequestConfig, 'entitlementHandle'>;
}
/**
 * Read-only snapshot of an {@link EntitlementGate}'s state.
 */
interface EntitlementGateState {
    readonly isLoading: boolean;
    readonly error: string | null;
    readonly result: EntitlementResult | null;
    readonly allowed: boolean;
    readonly limited: boolean;
    readonly denied: boolean;
    readonly gatedPlacement: PlacementOutput | null;
}
/**
 * Framework-agnostic entitlement check + auto-gate controller.
 *
 * Encapsulates the same check → gate-resolve flow that the React
 * `useEntitlement()` hook provides.
 *
 * @example
 * ```ts
 * const gate = new EntitlementGate(sdk, { handle: 'brand_kit', autoGate: true });
 * gate.onChange(() => updateUI(gate.state));
 * await gate.check();
 * if (gate.denied && gate.gatedPlacement) { showUpgradeModal(gate.gatedPlacement); }
 * ```
 */
/**
 * Whether an entitlement result denies access.
 *
 * A result denies when its `status` is `'denied'` OR the evaluator's `allowed`
 * verdict is explicitly `false`. The second clause matters for at-cap limit
 * rules: blocking enforcement — including the unset-enforcement default —
 * resolves `{ status: 'limited', allowed: false }`, and gating on status alone
 * silently granted access at the cap (plan 179 TASK-10; the cold-funnel
 * "cap never blocks" trap). Degrade mode (`limited` + `allowed: true`) stays
 * granted.
 */
declare function entitlementResultDenies(result: EntitlementResult | null): boolean;
declare class EntitlementGate {
    private readonly sdk;
    private readonly options;
    private readonly listeners;
    private _isLoading;
    private _error;
    private _result;
    private _gatedPlacement;
    private _lastEvaluatedKey;
    private _awaitedResult;
    private _configRetries;
    private _playbookUnsubscribe;
    private _userContextUnsubscribe;
    constructor(sdk: RevTurbineCustomerSdk, options: EntitlementGateOptions);
    /**
     * Stop listening for Playbook loads and user-context changes. Idempotent; call
     * it when the owning component unmounts (`useEntitlement` does).
     */
    dispose(): void;
    /**
     * Drop only the Playbook-load subscription — the within-check-cycle teardown
     * (BL-0179). A mounted gate keeps watching the user context (BL-0004).
     */
    private unsubscribePlaybook;
    /** Current state snapshot. */
    get state(): EntitlementGateState;
    /** Convenience: `true` when the entitlement is allowed. */
    get allowed(): boolean;
    /** Convenience: `true` when usage is limited (partially exhausted). */
    get limited(): boolean;
    /**
     * Convenience: `true` when the entitlement denies — `status: 'denied'`, or
     * the evaluator's `allowed` verdict is explicitly `false` (an at-cap limit
     * with blocking enforcement resolves `limited` + `allowed: false`; see
     * {@link entitlementResultDenies}).
     */
    get denied(): boolean;
    /** The raw entitlement result, or `null` before first check. */
    get result(): EntitlementResult | null;
    /** Resolved gated placement when `denied` and `autoGate` are active. */
    get gatedPlacement(): PlacementOutput | null;
    /**
     * Run the entitlement check. If denied and `autoGate` is true,
     * also resolves a gated placement.
     */
    check(): Promise<EntitlementResult | null>;
    /**
     * Re-run the entitlement check (alias of {@link check}).
     *
     * An explicit recheck is a fresh cycle, so the config-race budget resets with
     * it (BL-0179) — the caller asking again is not the SDK retrying itself.
     */
    recheck(): Promise<EntitlementResult | null>;
    /**
     * Publish a settled entitlement result: the state, the passive telemetry, and
     * the auto-gated placement.
     *
     * Extracted so the first-pass check and the post-config-wait finalize
     * (BL-0179) cannot drift apart — a second copy is how a re-check ends up
     * skipping the `gate_evaluated` emit or the `autoGate` resolution.
     */
    private publishResult;
    /**
     * Resolve the Access Gate placement for a denied check (BL-0426 (4)).
     *
     * `getPlacement` is asked first, exactly as before — an authored slot named
     * by `gatePlacementRequest`, or a custom `localRuntime.resolvers.getPlacement`,
     * still answers. When it finds nothing, the gate decides through the same
     * gated surface slot `<Gate>` uses: the gated template ids plus the handle
     * and this check's status, through the pure local decision path (D-39).
     * `getPlacement({ entitlementHandle })` alone names no slot, so in local mode
     * it never found the gate. The fallback is best-effort: it never turns a
     * settled deny into an error.
     */
    private resolveGatedPlacement;
    /** The `<Gate>`-equivalent gated-slot decision for {@link resolveGatedPlacement}. */
    private decideGatedSlot;
    /**
     * Is this deny a race against a Playbook load rather than a verdict?
     *
     * Two conditions, both required. The reason must name a config miss —
     * `config_unavailable` in Server mode, `entitlement_not_in_playbook` in
     * local mode, which is the same fact under a mode-specific name — AND the
     * load state must still be `loading`. Once a Playbook is loaded the state is
     * `ready` and `entitlement_not_in_playbook` is the honest terminal verdict it
     * has always been; this never reinterprets it.
     *
     * Bounded by {@link MAX_CONFIG_RETRIES}: a provider that never yields a
     * config must settle into the fail-closed deny instead of re-checking
     * forever.
     */
    private isTransientConfigMiss;
    /**
     * Re-check once a Playbook load attempt settles, if the deny we parked was
     * only a config race and a config is now available (BL-0179).
     *
     * Bounded three ways, mirroring `PlacementController`: only while a parked
     * deny exists, only when the settled state is `ready`, and never more than
     * {@link MAX_CONFIG_RETRIES} times.
     */
    private handlePlaybookSettled;
    /**
     * Give up waiting: publish the parked `config_unavailable` deny as the
     * answer, with the `gate_evaluated` emit that was withheld while a re-check
     * was still expected.
     */
    private finalizeAwaitedConfig;
    /**
     * Read the SDK's Playbook load state, degrading to `null` on a hand-rolled
     * test double that predates it — same contract as {@link watchUserContext}:
     * an SDK that can break the host app's render has failed at its one hard
     * guarantee. A `null` state is never transient, so such a double keeps
     * today's fail-closed behaviour exactly.
     */
    private playbookLoadState;
    /** Subscribe to Playbook load settles, degrading on an older test double. */
    private subscribeToPlaybookSettled;
    /**
     * Emit the passive `gate_evaluated` signal for a resolved entitlement result
     * (plan 144 TASK-10). Deduped on handle+outcome for the gate's lifetime, and
     * best-effort — telemetry must never break a gate check.
     */
    private emitGateEvaluated;
    /** Subscribe to state changes. Returns an unsubscribe function. */
    onChange(listener: ChangeListener): () => void;
    /**
     * Re-evaluate whenever the user context changes (plan 194 REQ-3).
     *
     * `notify()` fires only from inside `check()` — it announces this gate's own
     * re-check and never knew a context change had happened. So after
     * `update({ usage: … })` the SDK returned `denied` while a mounted gate kept
     * rendering granted children, and only a remount or a manual `recheck()`
     * fixed it.
     *
     * Only re-checks a gate that has already produced a result: before the first
     * `check()` there is nothing on screen to be stale, and firing then would
     * turn every `identify()` at startup into a redundant evaluation.
     *
     * `sdk.convert()` reloads the UserContext (BL-0004), so this is also what
     * flips a mounted `useCan` gate to allowed after a conversion.
     *
     * Returns an unsubscribe function. Call it when the gate is discarded —
     * without that, a gate outlives its consumer and keeps re-checking.
     * Idempotent: a second call returns the first subscription rather than
     * orphaning it, and {@link dispose} drops it too.
     */
    watchUserContext(): () => void;
    private notify;
}
/**
 * Options for {@link initRevTurbine}, extending the standard init options
 * with optional bootstrap placements.
 */
type SdkSessionOptions = RevTurbineInitInputOptions & {
    /** Placements to bootstrap (preload decisions) on creation. */
    bootstrapPlacements?: Array<{
        placement: RevTurbinePlacementConfig;
        userId?: string;
        contextMode?: RevTurbineContextMode;
        overrides?: RevTurbinePlacementDecisionOverrides;
        traits?: Record<string, string | number | boolean>;
        ttlMs?: number;
    }>;
};
/**
 * A fully-initialized SDK session with convenience methods for creating
 * placement and entitlement controllers, updating user context,
 * and accessing the underlying SDK instance.
 *
 * This is the recommended entry point for headless (non-React) consumers.
 *
 * @example
 * ```ts
 * const session = await initRevTurbine({
 *   tenantId: 'tenant_abc',
 *   publicKey: 'rtk_…',
 *   endpoint: 'https://edge.example.com',
 *   mode: 'snippet',
 *   user: { id: 'user_123', plan_handle: 'pro' },
 * });
 *
 * // Get a placement by slot ID
 * const banner = session.placement({ surfaceSlot: { id: 'upsell_banner' } });
 * const decision = await banner.load();
 *
 * // Check an entitlement with auto-gate
 * const gate = session.entitlement({ handle: 'brand_kit', autoGate: true });
 * await gate.check();
 *
 * // Update user context (works in any runtime mode)
 * session.identify('user_456', { plan_handle: 'enterprise' });
 * session.setUserContext({ personalization: { company: 'Acme' } });
 * ```
 */
declare class SdkSession {
    /** The underlying SDK instance. Use for advanced/direct operations. */
    readonly sdk: RevTurbineCustomerSdk;
    /** Resolved theme. */
    readonly theme: RevTurbineTheme;
    constructor(sdk: RevTurbineCustomerSdk, theme: RevTurbineTheme);
    /**
     * Identify a user and optionally set traits/context.
     * Triggers segment re-evaluation and clears decision cache.
     */
    identify(userId: string, contextOrTraits?: Parameters<RevTurbineCustomerSdk['identify']>[1]): void;
    /** Reset to anonymous user state. */
    resetIdentity(): void;
    /**
     * Hard-reset the user context to a blank slate (no anonymous inference) —
     * removes every user-context value plus usage balances and clears the
     * decision cache, interaction state, and impression history. Mostly for
     * demo / fixture flows. See {@link RevTurbineCustomerSdk.resetUserContext}.
     */
    resetUserContext(): void;
    /**
     * Merge fields into the current user context.
     * Triggers segment re-evaluation.
     */
    setUserContext(context: RevTurbineUserContext): void;
    /** Get the current resolved user context (includes `tenant_id`, `user_id`). */
    getUserContext(): ReturnType<RevTurbineCustomerSdk['getUserContext']>;
    /** Update usage balances (e.g. after a meter event). */
    updateUsage(balances: UsageBalances): void;
    /**
     * Patch the session-scoped user context — the whole-context-minus-`id`
     * upsert (`update({ plan: {...} })`, `update({ usage: {...} })`, …).
     * Alias of the SDK's `update()`, promoted onto the session facade so the
     * documented `session.update()` verb is real (plan 179 Q-1/Q-3 ruling).
     * Unrecognized keys warn (prod-visible, once per session) and drop, exactly
     * as on the SDK — plan 191 Q-5 made the warning prod-visible rather than
     * dev-only, so this comment was stale in the direction that matters.
     */
    update(patch: RevTurbineUpdateInput): void;
    /** Fetch full user context from the server (server runtime mode). */
    fetchUserContext(userId: string): Promise<UserTargetingContext>;
    /** Get the current trial status. */
    getTrialStatus(): Promise<RevTurbineTrialContext>;
    /** Get a snapshot of current usage balances. */
    getUsage(): RevTurbineUsageSnapshot;
    /**
     * Create a {@link PlacementController} bound to this session's SDK.
     *
     * @example
     * ```ts
     * const banner = session.placement({ surfaceSlot: { id: 'upsell_banner' } });
     * await banner.load();
     * if (banner.visible) { renderBanner(banner.content); }
     * ```
     */
    placement(options: PlacementControllerOptions): PlacementController;
    /**
     * One-shot: register a surface slot, fetch a decision, and return it.
     *
     * For repeated use or interaction tracking, prefer {@link placement} which
     * returns a full controller.
     *
     * `surfaceTemplateIds` limits the slot to those templates. Omitted, the
     * slot accepts the templates the Playbook declares for `slotId`.
     */
    getPlacementBySlotId(slotId: string, options?: Omit<PlacementControllerOptions, 'surfaceSlot' | 'placement'> & {
        /** Surface template ids this slot accepts; defaults to the Playbook's declaration for the slot. */
        surfaceTemplateIds?: string[];
    }): Promise<RevTurbinePlacementDecision | null>;
    /**
     * Get a raw placement output by request config (slot, entitlement, plan, or chained).
     * Returns the full {@link PlacementOutput} or `null`.
     */
    getPlacement(config: RevTurbinePlacementRequestConfig): Promise<PlacementOutput | null>;
    /**
     * Create an {@link EntitlementGate} bound to this session's SDK.
     *
     * @example
     * ```ts
     * const gate = session.entitlement({ handle: 'brand_kit', autoGate: true });
     * await gate.check();
     * if (gate.denied) { showGate(gate.gatedPlacement); }
     * ```
     */
    entitlement(options: EntitlementGateOptions): EntitlementGate;
    /**
     * One-shot entitlement check. For auto-gating or reactive updates,
     * prefer {@link entitlement} which returns a full controller.
     */
    checkEntitlement(handle: string, context?: RevTurbineEntitlementContext): Promise<EntitlementResult>;
    /**
     * The entitlement check as a `can` question — alias of
     * {@link checkEntitlement}, promoted onto the session facade so
     * `session.can('batch_export')` works without the `session.sdk` escape
     * hatch (plan 179 Q-1/Q-3 ruling). Read `.allowed` for the verdict; an
     * at-cap blocked limit resolves `limited` + `allowed: false`.
     */
    can(handle: string, context?: RevTurbineEntitlementContext): Promise<EntitlementResult>;
    /** Track a custom event. */
    trackEvent(name: string, data?: Record<string, JsonObject[string]>): Promise<void>;
    /**
     * Track an event — the advertised alias of {@link trackEvent}, first-class
     * on the session facade so headless code carries the full telemetry surface
     * (plan 179 ruling, Kent 2026-08-13). Powers analytics, frequency caps,
     * attribution, and experiments.
     */
    track(name: string, data?: Record<string, JsonObject[string]>): Promise<void>;
    /**
     * Flush buffered events immediately. Headless processes are often
     * short-lived (scripts, jobs, edge handlers) — call this before exit so
     * buffered `track()` events aren't lost with the process.
     */
    flushEvents(): Promise<void>;
}
/**
 * Create a fully-initialized SDK session.
 *
 * This is the recommended entry point for headless (non-React) consumers.
 * It handles:
 * 1. SDK initialization via `initRevTurbine()`
 * 2. User identification (if `options.user.id` is provided)
 * 3. Theme resolution (from RevTurbineConfig or API)
 * 4. Placement bootstrapping (preloading decisions)
 *
 * The returned {@link SdkSession} exposes the full imperative API:
 * user context management, placement controllers, entitlement gates,
 * and event tracking.
 *
 * @example
 * ```ts
 * const session = await initRevTurbine({
 *   tenantId: 'tenant_abc',
 *   publicKey: 'rtk_…',
 *   endpoint: 'https://edge.example.com',
 *   mode: 'snippet',
 *   user: { id: 'user_123', plan_handle: 'pro' },
 *   bootstrapPlacements: [
 *     { placement: { name: 'pricing_banner' } },
 *   ],
 * });
 * ```
 *
 * @public
 */
declare function initRevTurbine<TUser extends RevTurbineUserContext = RevTurbineUserContext>(options: SdkSessionOptions & {
    user?: Exact<RevTurbineUserContext, TUser>;
}): Promise<SdkSession>;

type HttpMethod = "get" | "put" | "post" | "delete" | "options" | "head" | "patch" | "trace";
type OkStatus = 200 | 201 | 202 | 203 | 204 | 206 | 207 | "2XX";
type ErrorStatus = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 | '5XX' | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 444 | 450 | 451 | 497 | 498 | 499 | '4XX' | "default";
type PathsWithMethod<Paths extends {}, PathnameMethod extends HttpMethod> = {
    [Pathname in keyof Paths]: Paths[Pathname] extends {
        [K in PathnameMethod]: any;
    } ? Pathname : never;
}[keyof Paths];
type ResponseObjectMap<T> = T extends {
    responses: any;
} ? T["responses"] : unknown;
type ResponseContent<T> = T extends {
    content: any;
} ? T["content"] : unknown;
type OperationRequestBody<T> = "requestBody" extends keyof T ? T["requestBody"] : never;
type PickRequestBody<T> = "requestBody" extends keyof T ? Pick<T, "requestBody"> : never;
type IsOperationRequestBodyOptional<T> = RequiredKeysOf<PickRequestBody<T>> extends never ? true : false;
type OperationRequestBodyMediaContent<T> = IsOperationRequestBodyOptional<T> extends true ? ResponseContent<NonNullable<OperationRequestBody<T>>> | undefined : ResponseContent<OperationRequestBody<T>>;
type OperationRequestBodyContent<T> = FilterKeys<OperationRequestBodyMediaContent<T>, MediaType> extends never ? FilterKeys<NonNullable<OperationRequestBodyMediaContent<T>>, MediaType> | undefined : FilterKeys<OperationRequestBodyMediaContent<T>, MediaType>;
type SuccessResponse<T extends Record<string | number, any>, Media extends MediaType = MediaType> = GetResponseContent<T, Media, OkStatus>;
type GetResponseContent<T extends Record<string | number, any>, Media extends MediaType = MediaType, ResponseCode extends keyof T = keyof T> = ResponseCode extends keyof T ? {
    [K in ResponseCode]: T[K]["content"] extends Record<string, any> ? FilterKeys<T[K]["content"], Media> extends never ? T[K]["content"] : FilterKeys<T[K]["content"], Media> : K extends keyof T ? T[K]["content"] : never;
}[ResponseCode] : never;
type ErrorResponse<T extends Record<string | number, any>, Media extends MediaType = MediaType> = GetResponseContent<T, Media, ErrorStatus>;
type FilterKeys<Obj, Matchers> = Obj[keyof Obj & Matchers];
type MediaType = `${string}/${string}`;
type RequiredKeysOfHelper<T> = {
    [K in keyof T]: {} extends Pick<T, K> ? never : K;
}[keyof T];
type RequiredKeysOf<T> = RequiredKeysOfHelper<T> extends undefined ? never : RequiredKeysOfHelper<T>;
type $Read<T> = {
    readonly $read: T;
};
type $Write<T> = {
    readonly $write: T;
};
type Readable<T> = T extends $Write<any> ? never : T extends $Read<infer U> ? Readable<U> : T extends (infer E)[] ? Readable<E>[] : T extends object ? {
    [K in keyof T as NonNullable<T[K]> extends $Write<any> ? never : K]: Readable<T[K]>;
} : T;
type Writable<T> = T extends $Read<any> ? never : T extends $Write<infer U> ? Writable<U> : T extends (infer E)[] ? Writable<E>[] : T extends object ? {
    [K in keyof T as NonNullable<T[K]> extends $Read<any> ? never : K]: Writable<T[K]>;
} & {
    [K in keyof T as NonNullable<T[K]> extends $Read<any> ? K : never]?: never;
} : T;

/** Options for each client instance */
interface ClientOptions extends Omit<RequestInit, "headers"> {
  /** set the common root URL for all API requests */
  baseUrl?: string;
  /** custom fetch (defaults to globalThis.fetch) */
  fetch?: (input: Request) => Promise<Response>;
  /** custom Request (defaults to globalThis.Request) */
  Request?: typeof Request;
  /** global querySerializer */
  querySerializer?: QuerySerializer<unknown> | QuerySerializerOptions;
  /** global bodySerializer */
  bodySerializer?: BodySerializer<unknown>;
  /** global pathSerializer */
  pathSerializer?: PathSerializer;
  headers?: HeadersOptions;
  /** RequestInit extension object to pass as 2nd argument to fetch when supported (defaults to undefined) */
  requestInitExt?: Record<string, unknown>;
}

type HeadersOptions =
  | Required<RequestInit>["headers"]
  | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined>;

type QuerySerializer<T> = (
  query: T extends { parameters: any } ? NonNullable<T["parameters"]["query"]> : Record<string, unknown>,
) => string;

/** @see https://swagger.io/docs/specification/serialization/#query */
type QuerySerializerOptions = {
  /** Set serialization for arrays. @see https://swagger.io/docs/specification/serialization/#query */
  array?: {
    /** default: "form" */
    style: "form" | "spaceDelimited" | "pipeDelimited";
    /** default: true */
    explode: boolean;
  };
  /** Set serialization for objects. @see https://swagger.io/docs/specification/serialization/#query */
  object?: {
    /** default: "deepObject" */
    style: "form" | "deepObject";
    /** default: true */
    explode: boolean;
  };
  /**
   * The `allowReserved` keyword specifies whether the reserved characters
   * `:/?#[]@!$&'()*+,;=` in parameter values are allowed to be sent as they
   * are, or should be percent-encoded. By default, allowReserved is `false`,
   * and reserved characters are percent-encoded.
   * @see https://swagger.io/docs/specification/serialization/#query
   */
  allowReserved?: boolean;
};

type BodySerializer<T> = (body: OperationRequestBodyContent<T>) => any;

type PathSerializer = (pathname: string, pathParams: Record<string, unknown>) => string;

type BodyType<T = unknown> = {
  json: T;
  text: Awaited<ReturnType<Response["text"]>>;
  blob: Awaited<ReturnType<Response["blob"]>>;
  arrayBuffer: Awaited<ReturnType<Response["arrayBuffer"]>>;
  stream: Response["body"];
};
type ParseAs = keyof BodyType;
type ParseAsResponse<T, Options> = Options extends {
  parseAs: ParseAs;
}
  ? BodyType<T>[Options["parseAs"]]
  : T;

interface DefaultParamsOption {
  params?: {
    query?: Record<string, unknown>;
  };
}

type ParamsOption<T> = T extends {
  parameters: any;
}
  ? RequiredKeysOf<T["parameters"]> extends never
    ? { params?: T["parameters"] }
    : { params: T["parameters"] }
  : DefaultParamsOption;

// Writable<T> strips $Read markers (readOnly properties excluded from request body)
type RequestBodyOption<T> =
  Writable<OperationRequestBodyContent<T>> extends never
    ? { body?: never }
    : IsOperationRequestBodyOptional<T> extends true
      ? { body?: Writable<OperationRequestBodyContent<T>> }
      : { body: Writable<OperationRequestBodyContent<T>> };

type FetchOptions<T> = RequestOptions<T> & Omit<RequestInit, "body" | "headers">;

// Readable<T> strips $Write markers (writeOnly properties excluded from response)
type FetchResponse<T extends Record<string | number, any>, Options, Media extends MediaType> =
  | {
      data: ParseAsResponse<Readable<SuccessResponse<ResponseObjectMap<T>, Media>>, Options>;
      error?: never;
      response: Response;
    }
  | {
      data?: never;
      error: Readable<ErrorResponse<ResponseObjectMap<T>, Media>>;
      response: Response;
    };

type RequestOptions<T> = ParamsOption<T> &
  RequestBodyOption<T> & {
    baseUrl?: string;
    querySerializer?: QuerySerializer<T> | QuerySerializerOptions;
    bodySerializer?: BodySerializer<T>;
    pathSerializer?: PathSerializer;
    parseAs?: ParseAs;
    fetch?: ClientOptions["fetch"];
    headers?: HeadersOptions;
    middleware?: Middleware[];
  };

type MergedOptions<T = unknown> = {
  baseUrl: string;
  parseAs: ParseAs;
  querySerializer: QuerySerializer<T>;
  bodySerializer: BodySerializer<T>;
  pathSerializer: PathSerializer;
  fetch: typeof globalThis.fetch;
};

interface MiddlewareRequestParams {
  query?: Record<string, unknown>;
  header?: Record<string, unknown>;
  path?: Record<string, unknown>;
  cookie?: Record<string, unknown>;
}

interface MiddlewareCallbackParams {
  /** Current Request object */
  request: Request;
  /** The original OpenAPI schema path (including curly braces) */
  readonly schemaPath: string;
  /** OpenAPI parameters as provided from openapi-fetch */
  readonly params: MiddlewareRequestParams;
  /** Unique ID for this request */
  readonly id: string;
  /** createClient options (read-only) */
  readonly options: MergedOptions;
}

type MiddlewareOnRequest = (
  options: MiddlewareCallbackParams,
) => void | Request | Response | undefined | Promise<Request | Response | undefined | void>;
type MiddlewareOnResponse = (
  options: MiddlewareCallbackParams & { response: Response },
) => void | Response | undefined | Promise<Response | undefined | void>;
type MiddlewareOnError = (
  options: MiddlewareCallbackParams & { error: unknown },
) => void | Response | Error | Promise<void | Response | Error>;

type Middleware =
  | {
      onRequest: MiddlewareOnRequest;
      onResponse?: MiddlewareOnResponse;
      onError?: MiddlewareOnError;
    }
  | {
      onRequest?: MiddlewareOnRequest;
      onResponse: MiddlewareOnResponse;
      onError?: MiddlewareOnError;
    }
  | {
      onRequest?: MiddlewareOnRequest;
      onResponse?: MiddlewareOnResponse;
      onError: MiddlewareOnError;
    };

/** This type helper makes the 2nd function param required if params/requestBody are required; otherwise, optional */
type MaybeOptionalInit<Params, Location extends keyof Params> =
  RequiredKeysOf<FetchOptions<FilterKeys<Params, Location>>> extends never
    ? FetchOptions<FilterKeys<Params, Location>> | undefined
    : FetchOptions<FilterKeys<Params, Location>>;

// The final init param to accept.
// - Determines if the param is optional or not.
// - Performs arbitrary [key: string] addition.
// Note: the addition MUST happen after all the inference happens (otherwise TS can’t infer if init is required or not).
type InitParam<Init> =
  RequiredKeysOf<Init> extends never ? [(Init & { [key: string]: unknown })?] : [Init & { [key: string]: unknown }];

type ClientMethod<
  Paths extends Record<string, Record<HttpMethod, {}>>,
  Method extends HttpMethod,
  Media extends MediaType,
> = <Path extends PathsWithMethod<Paths, Method>, Init extends MaybeOptionalInit<Paths[Path], Method>>(
  url: Path,
  ...init: InitParam<Init>
) => Promise<FetchResponse<Paths[Path][Method], Init, Media>>;

type ClientRequestMethod<Paths extends Record<string, Record<HttpMethod, {}>>, Media extends MediaType> = <
  Method extends HttpMethod,
  Path extends PathsWithMethod<Paths, Method>,
  Init extends MaybeOptionalInit<Paths[Path], Method>,
>(
  method: Method,
  url: Path,
  ...init: InitParam<Init>
) => Promise<FetchResponse<Paths[Path][Method], Init, Media>>;

interface Client<Paths extends {}, Media extends MediaType = MediaType> {
  request: ClientRequestMethod<Paths, Media>;
  /** Call a GET endpoint */
  GET: ClientMethod<Paths, "get", Media>;
  /** Call a PUT endpoint */
  PUT: ClientMethod<Paths, "put", Media>;
  /** Call a POST endpoint */
  POST: ClientMethod<Paths, "post", Media>;
  /** Call a DELETE endpoint */
  DELETE: ClientMethod<Paths, "delete", Media>;
  /** Call a OPTIONS endpoint */
  OPTIONS: ClientMethod<Paths, "options", Media>;
  /** Call a HEAD endpoint */
  HEAD: ClientMethod<Paths, "head", Media>;
  /** Call a PATCH endpoint */
  PATCH: ClientMethod<Paths, "patch", Media>;
  /** Call a TRACE endpoint */
  TRACE: ClientMethod<Paths, "trace", Media>;
  /** Register middleware */
  use(...middleware: Middleware[]): void;
  /** Unregister middleware */
  eject(...middleware: Middleware[]): void;
}

/**
 * This file was auto-generated by openapi-typescript.
 * Do not make direct changes to the file.
 */

interface paths {
    "/api/plans": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** List plans */
        get: operations["listPlans"];
        put?: never;
        /** Create plan */
        post: operations["createPlan"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/plans/{planId}": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** Get plan by ID */
        get: operations["getPlan"];
        put?: never;
        post?: never;
        /** Delete plan */
        delete: operations["deletePlan"];
        options?: never;
        head?: never;
        /** Update plan */
        patch: operations["updatePlan"];
        trace?: never;
    };
    "/api/plans/reorder": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        /** Reorder plans */
        post: operations["reorderPlans"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/plans/{planId}/variations": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** List plan variations */
        get: operations["listPlanVariations"];
        put?: never;
        /** Create plan variation */
        post: operations["createPlanVariation"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/plan-variations/{variationId}": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** Get plan variation by ID */
        get: operations["getPlanVariation"];
        put?: never;
        post?: never;
        /** Delete plan variation */
        delete: operations["deletePlanVariation"];
        options?: never;
        head?: never;
        /** Update plan variation */
        patch: operations["updatePlanVariation"];
        trace?: never;
    };
    "/api/addons": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** List add-ons */
        get: operations["listAddOns"];
        put?: never;
        /** Create add-on */
        post: operations["createAddOn"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/addons/{addonId}": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** Get add-on by ID */
        get: operations["getAddOn"];
        put?: never;
        post?: never;
        /** Delete add-on */
        delete: operations["deleteAddOn"];
        options?: never;
        head?: never;
        /** Update add-on */
        patch: operations["updateAddOn"];
        trace?: never;
    };
    "/api/addons/{addonId}/variations": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** List add-on variations */
        get: operations["listAddOnVariations"];
        put?: never;
        /** Create add-on variation */
        post: operations["createAddOnVariation"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/addon-variations/{variationId}": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** Get add-on variation by ID */
        get: operations["getAddOnVariation"];
        put?: never;
        post?: never;
        /** Delete add-on variation */
        delete: operations["deleteAddOnVariation"];
        options?: never;
        head?: never;
        /** Update add-on variation */
        patch: operations["updateAddOnVariation"];
        trace?: never;
    };
    "/api/stripe-prices": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** List Stripe prices */
        get: operations["listStripePrices"];
        put?: never;
        /** Create Stripe price */
        post: operations["createStripePrice"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/stripe-prices/{id}": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** Get Stripe price by ID */
        get: operations["getStripePrice"];
        put?: never;
        post?: never;
        /** Delete Stripe price */
        delete: operations["deleteStripePrice"];
        options?: never;
        head?: never;
        /** Update Stripe price */
        patch: operations["updateStripePrice"];
        trace?: never;
    };
    "/api/entitlements": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** List entitlements */
        get: operations["listEntitlements"];
        put?: never;
        /** Create entitlement */
        post: operations["createEntitlement"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/entitlements/{entitlementId}": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** Get entitlement */
        get: operations["getEntitlement"];
        put?: never;
        post?: never;
        /** Delete entitlement */
        delete: operations["deleteEntitlement"];
        options?: never;
        head?: never;
        /** Update entitlement */
        patch: operations["updateEntitlement"];
        trace?: never;
    };
    "/api/entitlements/{entitlementId}/rules": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** List rules for entitlement */
        get: operations["listEntitlementRules"];
        put?: never;
        /** Create entitlement rule */
        post: operations["createEntitlementRule"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/entitlement-rules/{ruleId}": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        post?: never;
        /** Delete entitlement rule */
        delete: operations["deleteEntitlementRule"];
        options?: never;
        head?: never;
        /** Update entitlement rule */
        patch: operations["updateEntitlementRule"];
        trace?: never;
    };
    "/api/entitlement-rules/{ruleId}/duplicate": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        /** Duplicate entitlement rule */
        post: operations["duplicateEntitlementRule"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/entitlement-rules/{ruleId}/variants": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** List A/B variants for rule */
        get: operations["listEntitlementRuleVariants"];
        put?: never;
        /** Create rule A/B variant */
        post: operations["createEntitlementRuleVariant"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/placements": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** List placements */
        get: operations["listPlacements"];
        put?: never;
        /** Create placement */
        post: operations["createPlacement"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/placements/{placementId}": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** Get placement */
        get: operations["getPlacement"];
        put?: never;
        post?: never;
        /** Delete placement */
        delete: operations["deletePlacement"];
        options?: never;
        head?: never;
        /** Update placement */
        patch: operations["updatePlacement"];
        trace?: never;
    };
    "/api/placements/{placementId}/duplicate": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        /** Duplicate placement */
        post: operations["duplicatePlacement"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/placements/reorder": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        /** Reorder placements within category */
        post: operations["reorderPlacements"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/placements/{placementId}/payloads": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** List placement payloads */
        get: operations["listPlacementPayloads"];
        put?: never;
        /** Create placement payload */
        post: operations["createPlacementPayload"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/placement-payloads/{payloadId}": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        post?: never;
        /** Delete placement payload */
        delete: operations["deletePlacementPayload"];
        options?: never;
        head?: never;
        /** Update placement payload */
        patch: operations["updatePlacementPayload"];
        trace?: never;
    };
    "/api/surface-slots": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** List auto-discovered surface slots */
        get: operations["listSurfaceSlots"];
        put?: never;
        post?: never;
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/surface-templates": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** List surface templates */
        get: operations["listSurfaceTemplates"];
        put?: never;
        /** Create surface template */
        post: operations["createSurfaceTemplate"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/messages": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** List message blocks */
        get: operations["listMessageBlocks"];
        put?: never;
        /** Create message block */
        post: operations["createMessageBlock"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/cta-paths": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** List CTA paths */
        get: operations["listCtaPaths"];
        put?: never;
        /** Create custom CTA path */
        post: operations["createCtaPath"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/track": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        /** Ingest a batch of SDK clickstream events */
        post: operations["ingestTrackEvents"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/sdk/meta": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        /**
         * Ingest anonymous SDK telemetry (keyless, non-authed, rate-limited)
         * @description Accepts a small batch of anonymous, keyless SDK telemetry without a public ingest key. Carries config-shape metrics and a one-way hashed config id only — no user context, no tenant binding. Rate-limited per IP; only the SdkMetaEventType allowlist is accepted.
         */
        post: operations["ingestSdkMeta"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/events/interactions": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        /** Record one placement treatment interaction, or a batch of them */
        post: operations["recordTreatmentInteraction"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/sdk/user-contexts": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        /**
         * Set a user's seat type and built-in dimension values — server key only
         * @description Upserts the server-written state of one user by (token tenant, user_id): the seat assignment and/or built-in segment dimension values (D-46). Accepts ONLY a Bearer API token whose token_type is `server`; a session, `client`, `mcp` or `public` credential is refused with 401/403. The tenant comes from the token, never from the request. The body is strict: `user_id`, `seat_type_handle`, `builtin_dimensions`, `override`. `seat_type_handle` must be one of the tenant's current seat types (422 otherwise); `null` clears it; omitted leaves it unchanged. Each `builtin_dimensions` value must be in its dimension's vocabulary (422 otherwise); `null` clears it. `override: true` pins the written dimensions so RevTurbine enrichment does not replace them; without it the write is an update that a newer enrichment change supersedes (last writer wins), and a pinned dimension written without it is unpinned (D-47).
         */
        post: operations["upsertServerUserContext"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/api/sdk/user-contexts/{userId}/builtin-dimensions": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /**
         * Read a user's server-resolved built-in segment dimensions — server key only
         * @description Returns the control plane's built-in segment dimensions (subscription state, trial type, activity level, seat type, buyer role, billing health, …) for one user of the token tenant, so a server SDK can overlay them onto the app-supplied context (the server value wins, PD-3). Accepts ONLY a Bearer API token whose token_type is `server`; a session, `client`, `mcp` or `public` credential is refused with 401/403. The tenant comes from the token, never from the request. An unknown user resolves to each dimension's default, not 404. Request-derived dimensions (`region`, `device_type`) are never present.
         */
        get: operations["getServerUserBuiltinDimensions"];
        put?: never;
        post?: never;
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
}
interface components {
    schemas: {
        /** @enum {string} */
        PlanVisibility: "public" | "unlisted" | "legacy";
        /** @default usd */
        Currency: components["schemas"]["Anon_063c0cce3710"];
        /** @enum {string} */
        PricingModel: "flat" | "per_unit" | "tiered" | "metered";
        /** @enum {string} */
        PriceSource: "stripe" | "static" | "clerk";
        /** @enum {string} */
        StripePriceBillingPeriod: "monthly" | "annual" | "one_time" | "custom";
        /** @enum {string} */
        EntitlementType: "feature" | "capability_tier" | "usage_limit" | "price_per_unit" | "rate_limit" | "credits" | "seat";
        /** @enum {string} */
        UsagePeriodScope: "per_month" | "per_year" | "per_billing_period" | "lifetime" | "concurrent" | "per_instance" | "per_second" | "per_minute" | "per_hour" | "per_6_hours" | "per_day" | "per_week";
        /** @enum {string} */
        UsageAllocation: "account_pool" | "per_instance" | "per_user" | "per_user_pooled";
        EntitlementRuleTarget: {
            kind: components["schemas"]["Anon_70ee2ddbc798"];
            id: components["schemas"]["Anon_57796118d046_5"];
        };
        /** @enum {string} */
        EntitlementRuleTargetKind: "plan" | "plan_variation" | "addon" | "addon_variation";
        /** @enum {string} */
        RuleVisibility: "public" | "non_public";
        /** @enum {string} */
        EntitlementRulePeriodUnit: "month" | "day" | "week" | "quarter" | "year" | "billing_period" | "hour" | "six_hours";
        /** @enum {string} */
        EnforcementMode: "hard_block" | "block_with_upsell" | "degrade" | "allow_overage";
        /** @enum {string} */
        PlacementCategory: "fixed" | "gated_feature" | "usage_limit" | "trial" | "other_conversion" | "retention";
        CtaObject: {
            label: components["schemas"]["Anon_872e58432369"];
            cta_path_type: components["schemas"]["Anon_6fd1ceb6e366"];
            config_fields?: components["schemas"]["Anon_5142f8473790_1"];
        };
        /** @enum {string} */
        CtaPathType: "open_checkout" | "view_plans" | "book_demo" | "contact_sales" | "complete_onboarding" | "invite_teammate" | "refer_friend" | "verify_work_email" | "update_payment_method" | "enable_auto_renewal" | "manage_subscription" | "switch_billing_period" | "extend_trial" | "open_rt_placement" | "dismiss" | "snooze" | "custom";
        /** @enum {string} */
        CapPeriod: "session" | "day" | "week" | "month" | "lifetime";
        SurfaceTemplate: {
            id: components["schemas"]["Anon_fb248bf5a9f7"];
            created_at: components["schemas"]["Anon_be3e2585472d"];
            updated_at: components["schemas"]["Anon_be3e2585472d_1"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_1"];
            environment_id?: components["schemas"]["Anon_51cbbf69cb41"];
            playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
            is_current?: components["schemas"]["Anon_d295959bf4db"];
            is_deleted?: components["schemas"]["Anon_4dc549443053"];
            delete_date?: components["schemas"]["Anon_e4ee8e45dcea"];
            sequence?: components["schemas"]["Anon_ffffc3c874cb"];
            base_sequence?: components["schemas"]["Anon_71a2fb329804"];
            anchor_id: components["schemas"]["Anon_fb248bf5a9f7_2"];
            name: components["schemas"]["Anon_4c26b3baab05_4"];
            handle: components["schemas"]["Anon_af12d548dbee_4"];
            surface_type: components["schemas"]["Anon_b5b008cadebe"];
            field_definitions?: components["schemas"]["Anon_4a3cd2d08b03"];
            description?: components["schemas"]["Anon_ee9224780226_1"];
        };
        /** @enum {string} */
        ComponentType: "banner" | "modal" | "tooltip" | "sidebar" | "inline" | "toast" | "fullscreen" | "email" | "sms" | "push" | "in_page" | "button" | "full_page" | "agent" | "cli" | "custom";
        /** @enum {string} */
        DefaultTemplateIds: "button" | "plans_page_ctas" | "plans_page_full" | "inline_gate_message" | "tooltip" | "in_page_card" | "usage_counter" | "credit_counter" | "trial_counter" | "banner" | "modal_optional" | "modal_blocking" | "toast" | "email" | "sms" | "push" | "cli" | "agent_connector" | "custom_in_app";
        FieldDefinition: {
            name: components["schemas"]["Anon_9ac136edb99a_1"];
            field_type: components["schemas"]["TemplateFieldType"];
            required?: components["schemas"]["Anon_f56777819c8b_1"];
            default_value?: components["schemas"]["Anon_44136fa355b3"];
            order?: components["schemas"]["Anon_97cc9ecfdea9_4"];
            help_text?: components["schemas"]["Anon_373775e26848_3"];
        };
        /** @enum {string} */
        TemplateFieldType: "header" | "body" | "secondary_body" | "message" | "cta_label" | "secondary_label" | "image" | "toggle" | "duration" | "send_delay" | "entitlement" | "plan" | "dropdown" | "json";
        MessageBlockRecord: {
            id: components["schemas"]["Anon_fb248bf5a9f7"];
            created_at: components["schemas"]["Anon_be3e2585472d"];
            updated_at: components["schemas"]["Anon_be3e2585472d_1"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_1"];
            environment_id?: components["schemas"]["Anon_51cbbf69cb41"];
            playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
            is_current?: components["schemas"]["Anon_d295959bf4db"];
            is_deleted?: components["schemas"]["Anon_4dc549443053"];
            delete_date?: components["schemas"]["Anon_e4ee8e45dcea"];
            sequence?: components["schemas"]["Anon_ffffc3c874cb"];
            base_sequence?: components["schemas"]["Anon_71a2fb329804"];
            anchor_id: components["schemas"]["Anon_fb248bf5a9f7_3"];
            name: components["schemas"]["Anon_4c26b3baab05_5"];
            handle: components["schemas"]["Anon_af12d548dbee_5"];
            content_fields?: components["schemas"]["Anon_5142f8473790_3"];
            variation_dimension_id?: components["schemas"]["Anon_96f9066c2fdc_14"];
            variation_values?: components["schemas"]["Anon_fd93d9ab0458"];
            notes?: components["schemas"]["Anon_796ec99afe20"];
            used_in_count?: components["schemas"]["Anon_b32f11b2ff5e"];
        };
        CtaPath: {
            id: components["schemas"]["Anon_fb248bf5a9f7"];
            created_at: components["schemas"]["Anon_be3e2585472d"];
            updated_at: components["schemas"]["Anon_be3e2585472d_1"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_1"];
            environment_id?: components["schemas"]["Anon_51cbbf69cb41"];
            playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
            is_current?: components["schemas"]["Anon_d295959bf4db"];
            is_deleted?: components["schemas"]["Anon_4dc549443053"];
            delete_date?: components["schemas"]["Anon_e4ee8e45dcea"];
            sequence?: components["schemas"]["Anon_ffffc3c874cb"];
            base_sequence?: components["schemas"]["Anon_71a2fb329804"];
            anchor_id: components["schemas"]["Anon_fb248bf5a9f7_4"];
            name: components["schemas"]["Anon_4c26b3baab05_6"];
            handle: components["schemas"]["Anon_af12d548dbee_6"];
            action_type: components["schemas"]["Anon_f3fff0f64dfe"];
            target_url?: components["schemas"]["Anon_96f9066c2fdc_15"];
            target_plan_id?: components["schemas"]["Anon_96f9066c2fdc_16"];
            config_fields?: components["schemas"]["Anon_5142f8473790_4"];
            metadata?: components["schemas"]["Anon_f27cb44c32f6_4"];
        };
        /** @enum {string} */
        CtaActionType: "open_checkout" | "view_plans" | "book_demo" | "contact_sales" | "complete_onboarding" | "invite_teammate" | "refer_friend" | "verify_work_email" | "update_payment_method" | "enable_auto_renewal" | "manage_subscription" | "switch_billing_period" | "extend_trial" | "open_rt_placement" | "dismiss" | "snooze" | "custom";
        TrackIngestBatch: {
            events: components["schemas"]["Anon_3f2bab3833ef"];
        };
        TrackEvent: {
            environment_id: components["schemas"]["Anon_57796118d046_16"];
            user_id: components["schemas"]["Anon_57796118d046_17"];
            account_id?: components["schemas"]["Anon_4e04ec5cc4e6_3"];
            event_name: components["schemas"]["Anon_cd76cef95ac8"];
            event_ts: components["schemas"]["Anon_3c179513a5d9_2"];
            properties?: components["schemas"]["Anon_96f9066c2fdc_20"];
            surface_slot_id?: components["schemas"]["Anon_4fc4bfa2adad_3"];
            placement_id?: components["schemas"]["Anon_4fc4bfa2adad_4"];
            payload_id?: components["schemas"]["Anon_4fc4bfa2adad_5"];
            request_id?: components["schemas"]["Anon_96f9066c2fdc_21"];
            experiment_id?: components["schemas"]["Anon_4fc4bfa2adad_6"];
            variant_key?: components["schemas"]["Anon_4fc4bfa2adad_7"];
            tenant_id?: components["schemas"]["Anon_96f9066c2fdc_22"];
            event_id?: components["schemas"]["Anon_4fc4bfa2adad_8"];
            origin?: components["schemas"]["Anon_093ed29338d0"];
            playbook_version?: components["schemas"]["Anon_4fc4bfa2adad_9"];
            decision_id?: components["schemas"]["Anon_4fc4bfa2adad_10"];
            test?: components["schemas"]["Anon_fb9ddeea992e_2"];
        };
        /** @enum {string} */
        EventOrigin: "explicit" | "automatic" | "derived" | "raw";
        SdkMetaIngestBatch: {
            events: components["schemas"]["Anon_96967a4faf8d"];
        };
        SdkMetaEvent: {
            event_type: components["schemas"]["Anon_53b83ce9a609"];
            occurred_at: components["schemas"]["Anon_3c179513a5d9_3"];
            request_id?: components["schemas"]["Anon_4e04ec5cc4e6_4"];
            config_hash_id?: components["schemas"]["Anon_e17de468dbc9"];
            sdk_version?: components["schemas"]["Anon_e17de468dbc9_1"];
            runtime_mode?: components["schemas"]["Anon_e17de468dbc9_2"];
            schema_version?: components["schemas"]["Anon_e17de468dbc9_3"];
            bundle_version?: components["schemas"]["Anon_e17de468dbc9_4"];
            config_shape?: components["schemas"]["Anon_a070b8adf29f"];
            message?: components["schemas"]["Anon_7e1c99abdd77_2"];
            reason?: components["schemas"]["Anon_e17de468dbc9_5"];
            placement_handle?: components["schemas"]["Anon_e17de468dbc9_6"];
            slot_handle?: components["schemas"]["Anon_e17de468dbc9_7"];
            surface?: components["schemas"]["Anon_e17de468dbc9_8"];
            plan_handle?: components["schemas"]["Anon_e17de468dbc9_9"];
            entitlement_handle?: components["schemas"]["Anon_e17de468dbc9_10"];
        };
        /** @enum {string} */
        SdkMetaEventType: "sdk_init" | "sdk_error" | "sdk_validation_warning" | "resolution_failure";
        SdkConfigShape: {
            plans: components["schemas"]["Anon_274ba4ca49d5"];
            entitlements: components["schemas"]["Anon_274ba4ca49d5_1"];
            entitlement_rules: components["schemas"]["Anon_274ba4ca49d5_2"];
            segments: components["schemas"]["Anon_274ba4ca49d5_3"];
            placements: components["schemas"]["Anon_274ba4ca49d5_4"];
            placement_payloads: components["schemas"]["Anon_274ba4ca49d5_5"];
            content_ui_paths: components["schemas"]["Anon_274ba4ca49d5_6"];
            surface_templates: components["schemas"]["Anon_274ba4ca49d5_7"];
        };
        TreatmentInteractionRequest: components["schemas"]["TreatmentInteractionInput"] | components["schemas"]["TreatmentInteractionBatch"];
        TreatmentInteractionInput: {
            user_id: components["schemas"]["Anon_57796118d046_18"];
            account_id?: components["schemas"]["Anon_4e04ec5cc4e6_5"];
            placement_id: components["schemas"]["Anon_57796118d046_19"];
            treatment_id?: components["schemas"]["Anon_4e04ec5cc4e6_6"];
            surface_slot_id?: components["schemas"]["Anon_4e04ec5cc4e6_7"];
            surface_template_id?: components["schemas"]["Anon_4e04ec5cc4e6_8"];
            payload_id?: components["schemas"]["Anon_4e04ec5cc4e6_9"];
            interaction_type: components["schemas"]["Anon_b540c131c269"];
            interaction_at?: components["schemas"]["Anon_e077e17ea982_3"];
            message_block_handle?: components["schemas"]["Anon_4e04ec5cc4e6_10"];
            message_block_id?: components["schemas"]["Anon_4e04ec5cc4e6_11"];
            experiment_id?: components["schemas"]["Anon_4e04ec5cc4e6_12"];
            variant_key?: components["schemas"]["Anon_4e04ec5cc4e6_13"];
            rule_handle?: components["schemas"]["Anon_94b7b4f4c44a"];
            decision_id?: components["schemas"]["Anon_4e04ec5cc4e6_14"];
            segment_handles?: components["schemas"]["Anon_1071d7e3c379"];
            segment_ids?: components["schemas"]["Anon_1071d7e3c379_1"];
            test?: components["schemas"]["Anon_fb9ddeea992e_3"];
            metadata?: components["schemas"]["Anon_a249e58b3222"];
        };
        /** @enum {string} */
        TreatmentInteractionType: "impression" | "dismiss" | "remind_me_later" | "cta_clicked" | "cta_completed" | "suppress";
        TreatmentInteractionBatch: components["schemas"]["TreatmentInteractionInput"][];
        ServerUserContextUpsert: {
            user_id: components["schemas"]["Anon_761f976a1da1_1"];
            seat_type_handle?: components["schemas"]["Anon_abb9584a79fc_1"];
            builtin_dimensions?: components["schemas"]["Anon_7720c3584d94"];
            override?: components["schemas"]["Anon_fb9ddeea992e_6"];
        };
        /** @default 1 */
        Anon_9370e83b9cfe: number;
        /** @default 25 */
        Anon_7a97c926accf: number;
        Anon_00404e686415: string;
        /**
         * @default asc
         * @enum {string}
         */
        Anon_46b90b81d0d1: "asc" | "desc";
        /** @default false */
        Anon_f56777819c8b: boolean;
        /** @default null */
        Anon_f7fb9744a6e4: components["schemas"]["Anon_f090cb615c84"];
        Anon_f090cb615c84: string | null;
        Anon_4c26b3baab05: components["schemas"]["Anon_52ba84a4bbf3"];
        Anon_52ba84a4bbf3: string;
        Anon_af12d548dbee: components["schemas"]["Anon_0eb2e3b6e08c"];
        Anon_0eb2e3b6e08c: string;
        /** @default 0 */
        Anon_2aa59aec1f23: components["schemas"]["Anon_97cc9ecfdea9"];
        Anon_97cc9ecfdea9: number;
        /** @default 0 */
        Anon_f95d5b2e4f52: components["schemas"]["Anon_278eaeabce08"];
        Anon_278eaeabce08: number;
        /** @default public */
        Anon_a5e31586a542: components["schemas"]["PlanVisibility"];
        Anon_f27cb44c32f6: components["schemas"]["Anon_f2d1b3e449b4"];
        Anon_c65c1fbd5acf: {
            [key: string]: unknown;
        };
        /** @default {} */
        Anon_f2d1b3e449b4: components["schemas"]["Anon_c65c1fbd5acf"];
        Anon_57796118d046: string;
        /** @enum {string} */
        Anon_129e203b1449: "monthly" | "annual" | "one_time" | "custom";
        /** @default null */
        Anon_f7fb9744a6e4_1: components["schemas"]["Anon_f090cb615c84_1"];
        Anon_f090cb615c84_1: string | null;
        Anon_7ab7b70b014d: number;
        Anon_86ff5762cd58: components["schemas"]["Currency"];
        Anon_063c0cce3710: string;
        Anon_1b09b93e2f83: components["schemas"]["PricingModel"];
        /** @default public */
        Anon_a5e31586a542_1: components["schemas"]["PlanVisibility"];
        Anon_96f9066c2fdc: components["schemas"]["Anon_00404e686415_1"];
        Anon_00404e686415_1: string;
        /** @default static */
        Anon_b5714cb1e73b: components["schemas"]["PriceSource"];
        Anon_4c26b3baab05_1: components["schemas"]["Anon_52ba84a4bbf3"];
        Anon_af12d548dbee_1: components["schemas"]["Anon_0eb2e3b6e08c"];
        /** @default 0 */
        Anon_f95d5b2e4f52_1: components["schemas"]["Anon_278eaeabce08_1"];
        Anon_278eaeabce08_1: number;
        /** @default public */
        Anon_a5e31586a542_2: components["schemas"]["PlanVisibility"];
        Anon_f27cb44c32f6_1: components["schemas"]["Anon_f2d1b3e449b4"];
        Anon_57796118d046_1: string;
        /** @enum {string} */
        Anon_129e203b1449_1: "monthly" | "annual" | "one_time" | "custom";
        /** @default null */
        Anon_f7fb9744a6e4_2: components["schemas"]["Anon_f090cb615c84_2"];
        Anon_f090cb615c84_2: string | null;
        Anon_7ab7b70b014d_1: number;
        Anon_86ff5762cd58_1: components["schemas"]["Currency"];
        Anon_1b09b93e2f83_1: components["schemas"]["PricingModel"];
        /** @default public */
        Anon_a5e31586a542_3: components["schemas"]["PlanVisibility"];
        Anon_96f9066c2fdc_1: components["schemas"]["Anon_00404e686415_2"];
        Anon_00404e686415_2: string;
        /** @default static */
        Anon_43943d0e9ae5: components["schemas"]["Anon_4fc7f7e3b3e6"];
        /** @enum {string} */
        Anon_4fc7f7e3b3e6: "stripe" | "static";
        Anon_57796118d046_2: string;
        Anon_57796118d046_3: string;
        Anon_cf08caa6d850: components["schemas"]["StripePriceBillingPeriod"];
        /** @default null */
        Anon_79391150fda1: components["schemas"]["Anon_c648138a0918"];
        Anon_c648138a0918: number | null;
        Anon_86ff5762cd58_2: components["schemas"]["Currency"];
        Anon_1b09b93e2f83_2: components["schemas"]["PricingModel"];
        /** @default null */
        Anon_f7fb9744a6e4_3: components["schemas"]["Anon_f090cb615c84_3"];
        Anon_f090cb615c84_3: string | null;
        /** @default false */
        Anon_062d958a93c4: components["schemas"]["Anon_7cb541e84f22"];
        Anon_7cb541e84f22: boolean;
        Anon_711dc9708535: components["schemas"]["Anon_11c9ad639448"];
        Anon_b0c21ae8f968: string | null;
        /** @default null */
        Anon_11c9ad639448: components["schemas"]["Anon_b0c21ae8f968"];
        Anon_4c26b3baab05_2: components["schemas"]["Anon_52ba84a4bbf3"];
        Anon_af12d548dbee_2: components["schemas"]["Anon_0eb2e3b6e08c"];
        Anon_7e1c99abdd77: components["schemas"]["Anon_373775e26848"];
        Anon_373775e26848: string;
        Anon_467a283cb3f8: components["schemas"]["EntitlementType"];
        Anon_409d6333b38e: components["schemas"]["Anon_d856c03b0c72"];
        Anon_d856c03b0c72: string;
        Anon_2923895ad8e0: components["schemas"]["UsagePeriodScope"];
        Anon_a7c491664ac5: components["schemas"]["UsageAllocation"];
        Anon_09599392a4ee: components["schemas"]["Anon_c44b29c140d0"];
        Anon_c44b29c140d0: {
            name: string;
            handle: string;
            description?: string;
        }[];
        /** @default 0 */
        Anon_f95d5b2e4f52_2: components["schemas"]["Anon_278eaeabce08_2"];
        Anon_278eaeabce08_2: number;
        Anon_f27cb44c32f6_2: components["schemas"]["Anon_f2d1b3e449b4"];
        Anon_57796118d046_4: string;
        Anon_49bb4dc12260: components["schemas"]["EntitlementRuleTarget"][];
        Anon_70ee2ddbc798: components["schemas"]["EntitlementRuleTargetKind"];
        Anon_57796118d046_5: string;
        /** @default [] */
        Anon_f8dbfffc0ce2: components["schemas"]["Anon_681004346c78"];
        Anon_681004346c78: string[];
        /** @default public */
        Anon_b26f420c5d82: components["schemas"]["RuleVisibility"];
        Anon_b2cdc2167b65: components["schemas"]["Anon_479ce264714e"] | null;
        Anon_479ce264714e: components["schemas"]["Anon_0eb2e3b6e08c"];
        Anon_2923895ad8e0_1: components["schemas"]["UsagePeriodScope"];
        Anon_409d6333b38e_1: components["schemas"]["Anon_d856c03b0c72_1"];
        Anon_d856c03b0c72_1: string;
        Anon_49d496ef65c9: components["schemas"]["EntitlementRulePeriodUnit"];
        Anon_811366723713: components["schemas"]["Anon_4c1d2cc17cf8"];
        Anon_4c1d2cc17cf8: number | "unlimited";
        Anon_25c82cf56487: components["schemas"]["EnforcementMode"];
        Anon_82a173df2abc: components["schemas"]["Anon_ff52ebcb2a4e"];
        Anon_ff52ebcb2a4e: number;
        Anon_96f9066c2fdc_2: components["schemas"]["Anon_00404e686415_3"];
        Anon_00404e686415_3: string;
        Anon_7e1e37293611: components["schemas"]["Anon_97cc9ecfdea9_1"];
        Anon_97cc9ecfdea9_1: number;
        Anon_96f9066c2fdc_3: components["schemas"]["Anon_00404e686415_4"];
        Anon_00404e686415_4: string;
        Anon_9c7f41b09bde: components["schemas"]["Anon_cddf8275afa1"];
        Anon_cddf8275afa1: number;
        Anon_9c7f41b09bde_1: components["schemas"]["Anon_cddf8275afa1_1"];
        Anon_cddf8275afa1_1: number;
        Anon_811366723713_1: components["schemas"]["Anon_4c1d2cc17cf8_1"];
        Anon_4c1d2cc17cf8_1: number | "unlimited";
        Anon_fb9ddeea992e: components["schemas"]["Anon_7cb541e84f22_1"];
        Anon_7cb541e84f22_1: boolean;
        /** @default null */
        Anon_d84a41962ed1: components["schemas"]["Anon_853b74b4f5a9"];
        Anon_853b74b4f5a9: (number | "unlimited") | null;
        Anon_96f9066c2fdc_4: components["schemas"]["Anon_00404e686415_5"];
        Anon_00404e686415_5: string;
        Anon_5d154a3d9b9e: components["schemas"]["Anon_e41be67a03a1"];
        Anon_e41be67a03a1: number | "unlimited";
        Anon_28e076aa98f9: components["schemas"]["Anon_408f15090b22"];
        /** @enum {string} */
        Anon_408f15090b22: "hard_cap" | "auto_upgrade_at_renewal";
        Anon_96f9066c2fdc_5: components["schemas"]["Anon_00404e686415_6"];
        Anon_00404e686415_6: string;
        Anon_fb9ddeea992e_1: components["schemas"]["Anon_7cb541e84f22_2"];
        Anon_7cb541e84f22_2: boolean;
        Anon_a7c491664ac5_1: components["schemas"]["UsageAllocation"];
        Anon_0dc47bdde23b: components["schemas"]["Anon_853b74b4f5a9_1"];
        Anon_853b74b4f5a9_1: (number | "unlimited") | null;
        Anon_18968514c96d: components["schemas"]["Anon_278eaeabce08_3"];
        Anon_278eaeabce08_3: number;
        Anon_96f9066c2fdc_6: components["schemas"]["Anon_00404e686415_7"];
        Anon_00404e686415_7: string;
        Anon_7cb541e84f22_3: boolean;
        Anon_c65c1fbd5acf_1: {
            [key: string]: unknown;
        };
        Anon_4c26b3baab05_3: components["schemas"]["Anon_52ba84a4bbf3"];
        Anon_af12d548dbee_3: components["schemas"]["Anon_0eb2e3b6e08c"];
        Anon_ee9224780226: components["schemas"]["Anon_853cc883e392"];
        Anon_373775e26848_1: string;
        Anon_853cc883e392: components["schemas"]["Anon_373775e26848_1"];
        Anon_843e92dde3b4: components["schemas"]["PlacementCategory"];
        Anon_b2cdc2167b65_1: components["schemas"]["Anon_479ce264714e"] | null;
        /** @default 0 */
        Anon_f95d5b2e4f52_3: components["schemas"]["Anon_278eaeabce08_4"];
        Anon_278eaeabce08_4: number;
        Anon_96f9066c2fdc_7: components["schemas"]["Anon_00404e686415_8"];
        Anon_00404e686415_8: string;
        Anon_96f9066c2fdc_8: components["schemas"]["Anon_00404e686415_9"];
        Anon_00404e686415_9: string;
        Anon_96f9066c2fdc_9: components["schemas"]["Anon_00404e686415_10"];
        Anon_00404e686415_10: string;
        Anon_82a173df2abc_1: components["schemas"]["Anon_ff52ebcb2a4e"];
        Anon_66461f6ab64d: components["schemas"]["Anon_1e39f641876a"];
        /** @enum {string} */
        Anon_1e39f641876a: "free" | "reverse";
        Anon_96f9066c2fdc_10: components["schemas"]["Anon_00404e686415_11"];
        Anon_00404e686415_11: string;
        Anon_b3e59c48ae6e: components["schemas"]["Anon_1ef289951720"];
        Anon_1ef289951720: number;
        Anon_7e1e37293611_1: components["schemas"]["Anon_97cc9ecfdea9_2"];
        Anon_97cc9ecfdea9_2: number;
        Anon_a8be2b5da5e8: components["schemas"]["Anon_aa6d7e4eede4"];
        /** @enum {string} */
        Anon_aa6d7e4eede4: "none_always_on" | "overage_vs_upgrade" | "time_bound" | "payment_failed" | "payment_at_risk";
        Anon_e077e17ea982: components["schemas"]["Anon_02ecf48bed22"];
        /** Format: date-time */
        Anon_02ecf48bed22: string;
        Anon_e077e17ea982_1: components["schemas"]["Anon_02ecf48bed22_1"];
        /** Format: date-time */
        Anon_02ecf48bed22_1: string;
        Anon_f27cb44c32f6_3: components["schemas"]["Anon_f2d1b3e449b4"];
        Anon_57796118d046_6: string;
        /** @default 0 */
        Anon_f95d5b2e4f52_4: components["schemas"]["Anon_278eaeabce08_5"];
        Anon_278eaeabce08_5: number;
        /** @default [] */
        Anon_f8dbfffc0ce2_1: components["schemas"]["Anon_681004346c78_1"];
        Anon_681004346c78_1: string[];
        /** @default [] */
        Anon_f8dbfffc0ce2_2: components["schemas"]["Anon_681004346c78_2"];
        Anon_681004346c78_2: string[];
        /** @default [] */
        Anon_f8dbfffc0ce2_3: components["schemas"]["Anon_681004346c78_3"];
        Anon_681004346c78_3: string[];
        /** @default [] */
        Anon_f8dbfffc0ce2_4: components["schemas"]["Anon_681004346c78_4"];
        Anon_681004346c78_4: string[];
        Anon_57796118d046_7: string;
        /** @default {} */
        Anon_5142f8473790: components["schemas"]["Anon_c65c1fbd5acf_2"];
        Anon_c65c1fbd5acf_2: {
            [key: string]: unknown;
        };
        /** @default [] */
        Anon_52685bb19869: components["schemas"]["Anon_ebb6e048f8a5"];
        Anon_ebb6e048f8a5: components["schemas"]["CtaObject"][];
        Anon_872e58432369: string;
        Anon_6fd1ceb6e366: components["schemas"]["CtaPathType"];
        /** @default {} */
        Anon_5142f8473790_1: components["schemas"]["Anon_c65c1fbd5acf_3"];
        Anon_c65c1fbd5acf_3: {
            [key: string]: unknown;
        };
        /** @default null */
        Anon_45e0e0d4a0da: components["schemas"]["Anon_c648138a0918_1"];
        Anon_c648138a0918_1: number | null;
        /** @default session */
        Anon_6ab4ae68d10d: components["schemas"]["CapPeriod"];
        /** @default 7 */
        Anon_3380fd32e874: components["schemas"]["Anon_97cc9ecfdea9_3"];
        Anon_97cc9ecfdea9_3: number;
        /** @default null */
        Anon_45e0e0d4a0da_1: components["schemas"]["Anon_c648138a0918_2"];
        Anon_c648138a0918_2: number | null;
        /** @default next_tier_up */
        Anon_beae1a1b3acf: components["schemas"]["Anon_761abd3347d0"];
        /** @enum {string} */
        Anon_761abd3347d0: "next_tier_up" | "best_value" | "custom";
        Anon_96f9066c2fdc_11: components["schemas"]["Anon_00404e686415_12"];
        Anon_00404e686415_12: string;
        Anon_fb248bf5a9f7: string;
        /** Format: date-time */
        Anon_be3e2585472d: string;
        /** Format: date-time */
        Anon_be3e2585472d_1: string;
        Anon_fb248bf5a9f7_1: string;
        /** @default production */
        Anon_51cbbf69cb41: components["schemas"]["Anon_9ac136edb99a"];
        Anon_9ac136edb99a: string;
        /** @default true */
        Anon_d295959bf4db: components["schemas"]["Anon_7cb541e84f22_4"];
        Anon_7cb541e84f22_4: boolean;
        /** @default false */
        Anon_4dc549443053: components["schemas"]["Anon_7cb541e84f22_5"];
        Anon_7cb541e84f22_5: boolean;
        /** @default null */
        Anon_e4ee8e45dcea: components["schemas"]["Anon_b0c21ae8f968_1"];
        Anon_b0c21ae8f968_1: string | null;
        /** @default 1 */
        Anon_ffffc3c874cb: components["schemas"]["Anon_ea288f4ef558"];
        Anon_ea288f4ef558: number;
        /** @default null */
        Anon_71a2fb329804: components["schemas"]["Anon_86192233f412"];
        Anon_86192233f412: number | null;
        Anon_fb248bf5a9f7_2: string;
        Anon_4c26b3baab05_4: components["schemas"]["Anon_52ba84a4bbf3"];
        Anon_af12d548dbee_4: components["schemas"]["Anon_0eb2e3b6e08c"];
        Anon_b5b008cadebe: components["schemas"]["ComponentType"] | components["schemas"]["DefaultTemplateIds"];
        /** @default [] */
        Anon_4a3cd2d08b03: components["schemas"]["Anon_614b5f6483c2"];
        Anon_614b5f6483c2: components["schemas"]["FieldDefinition"][];
        Anon_9ac136edb99a_1: string;
        /** @default false */
        Anon_f56777819c8b_1: boolean;
        Anon_44136fa355b3: unknown;
        Anon_97cc9ecfdea9_4: number;
        Anon_373775e26848_3: string;
        Anon_ee9224780226_1: components["schemas"]["Anon_853cc883e392"];
        Anon_fb248bf5a9f7_3: string;
        Anon_4c26b3baab05_5: components["schemas"]["Anon_52ba84a4bbf3"];
        Anon_af12d548dbee_5: components["schemas"]["Anon_0eb2e3b6e08c"];
        /** @default {} */
        Anon_5142f8473790_3: components["schemas"]["Anon_c65c1fbd5acf_6"];
        Anon_c65c1fbd5acf_6: {
            [key: string]: unknown;
        };
        Anon_96f9066c2fdc_14: components["schemas"]["Anon_00404e686415_15"];
        Anon_00404e686415_15: string;
        Anon_fd93d9ab0458: components["schemas"]["Anon_f885d34ba245"];
        Anon_f885d34ba245: {
            segment_value_id: string;
            content_fields_override: {
                [key: string]: unknown;
            };
        }[];
        Anon_796ec99afe20: components["schemas"]["Anon_333f67ffab65"];
        Anon_333f67ffab65: string;
        /** @default 0 */
        Anon_b32f11b2ff5e: components["schemas"]["Anon_97cc9ecfdea9_5"];
        Anon_97cc9ecfdea9_5: number;
        Anon_fb248bf5a9f7_4: string;
        Anon_4c26b3baab05_6: components["schemas"]["Anon_52ba84a4bbf3"];
        Anon_af12d548dbee_6: components["schemas"]["Anon_0eb2e3b6e08c"];
        Anon_f3fff0f64dfe: components["schemas"]["CtaActionType"];
        Anon_96f9066c2fdc_15: components["schemas"]["Anon_00404e686415_16"];
        Anon_00404e686415_16: string;
        Anon_96f9066c2fdc_16: components["schemas"]["Anon_00404e686415_17"];
        Anon_00404e686415_17: string;
        /** @default {} */
        Anon_5142f8473790_4: components["schemas"]["Anon_c65c1fbd5acf_7"];
        Anon_c65c1fbd5acf_7: {
            [key: string]: unknown;
        };
        Anon_f27cb44c32f6_4: components["schemas"]["Anon_f2d1b3e449b4"];
        Anon_3f2bab3833ef: components["schemas"]["TrackEvent"][];
        Anon_57796118d046_16: string;
        Anon_57796118d046_17: string;
        Anon_4e04ec5cc4e6_3: components["schemas"]["Anon_9ac136edb99a_8"];
        Anon_9ac136edb99a_8: string;
        Anon_cd76cef95ac8: string;
        /** Format: date-time */
        Anon_3c179513a5d9_2: string;
        Anon_96f9066c2fdc_20: components["schemas"]["Anon_00404e686415_23"];
        Anon_00404e686415_23: string;
        Anon_4fc4bfa2adad_3: components["schemas"]["Anon_f090cb615c84_15"];
        Anon_f090cb615c84_15: string | null;
        Anon_4fc4bfa2adad_4: components["schemas"]["Anon_f090cb615c84_16"];
        Anon_f090cb615c84_16: string | null;
        Anon_4fc4bfa2adad_5: components["schemas"]["Anon_f090cb615c84_17"];
        Anon_f090cb615c84_17: string | null;
        Anon_96f9066c2fdc_21: components["schemas"]["Anon_00404e686415_24"];
        Anon_00404e686415_24: string;
        Anon_4fc4bfa2adad_6: components["schemas"]["Anon_f090cb615c84_18"];
        Anon_f090cb615c84_18: string | null;
        Anon_4fc4bfa2adad_7: components["schemas"]["Anon_f090cb615c84_19"];
        Anon_f090cb615c84_19: string | null;
        Anon_96f9066c2fdc_22: components["schemas"]["Anon_00404e686415_25"];
        Anon_00404e686415_25: string;
        Anon_4fc4bfa2adad_8: components["schemas"]["Anon_f090cb615c84_20"];
        Anon_f090cb615c84_20: string | null;
        Anon_093ed29338d0: components["schemas"]["Anon_dea76bafaf11"];
        Anon_dea76bafaf11: components["schemas"]["EventOrigin"] | null;
        Anon_4fc4bfa2adad_9: components["schemas"]["Anon_f090cb615c84_21"];
        Anon_f090cb615c84_21: string | null;
        Anon_4fc4bfa2adad_10: components["schemas"]["Anon_f090cb615c84_22"];
        Anon_f090cb615c84_22: string | null;
        Anon_fb9ddeea992e_2: components["schemas"]["Anon_7cb541e84f22_32"];
        Anon_7cb541e84f22_32: boolean;
        Anon_96967a4faf8d: components["schemas"]["SdkMetaEvent"][];
        Anon_53b83ce9a609: components["schemas"]["SdkMetaEventType"];
        /** Format: date-time */
        Anon_3c179513a5d9_3: string;
        Anon_4e04ec5cc4e6_4: components["schemas"]["Anon_9ac136edb99a_9"];
        Anon_9ac136edb99a_9: string;
        Anon_e17de468dbc9: components["schemas"]["Anon_520c691f88f7_3"];
        Anon_520c691f88f7_3: string;
        Anon_e17de468dbc9_1: components["schemas"]["Anon_520c691f88f7_4"];
        Anon_520c691f88f7_4: string;
        Anon_e17de468dbc9_2: components["schemas"]["Anon_520c691f88f7_5"];
        Anon_520c691f88f7_5: string;
        Anon_e17de468dbc9_3: components["schemas"]["Anon_520c691f88f7_6"];
        Anon_520c691f88f7_6: string;
        Anon_e17de468dbc9_4: components["schemas"]["Anon_520c691f88f7_7"];
        Anon_520c691f88f7_7: string;
        Anon_a070b8adf29f: components["schemas"]["SdkConfigShape"];
        Anon_274ba4ca49d5: number;
        Anon_274ba4ca49d5_1: number;
        Anon_274ba4ca49d5_2: number;
        Anon_274ba4ca49d5_3: number;
        Anon_274ba4ca49d5_4: number;
        Anon_274ba4ca49d5_5: number;
        Anon_274ba4ca49d5_6: number;
        Anon_274ba4ca49d5_7: number;
        Anon_7e1c99abdd77_2: components["schemas"]["Anon_373775e26848_4"];
        Anon_373775e26848_4: string;
        Anon_e17de468dbc9_5: components["schemas"]["Anon_520c691f88f7_8"];
        Anon_520c691f88f7_8: string;
        Anon_e17de468dbc9_6: components["schemas"]["Anon_520c691f88f7_9"];
        Anon_520c691f88f7_9: string;
        Anon_e17de468dbc9_7: components["schemas"]["Anon_520c691f88f7_10"];
        Anon_520c691f88f7_10: string;
        Anon_e17de468dbc9_8: components["schemas"]["Anon_520c691f88f7_11"];
        Anon_520c691f88f7_11: string;
        Anon_e17de468dbc9_9: components["schemas"]["Anon_520c691f88f7_12"];
        Anon_520c691f88f7_12: string;
        Anon_e17de468dbc9_10: components["schemas"]["Anon_520c691f88f7_13"];
        Anon_520c691f88f7_13: string;
        Anon_57796118d046_18: string;
        Anon_4e04ec5cc4e6_5: components["schemas"]["Anon_9ac136edb99a_10"];
        Anon_9ac136edb99a_10: string;
        Anon_57796118d046_19: string;
        Anon_4e04ec5cc4e6_6: components["schemas"]["Anon_9ac136edb99a_11"];
        Anon_9ac136edb99a_11: string;
        Anon_4e04ec5cc4e6_7: components["schemas"]["Anon_9ac136edb99a_12"];
        Anon_9ac136edb99a_12: string;
        Anon_4e04ec5cc4e6_8: components["schemas"]["Anon_9ac136edb99a_13"];
        Anon_9ac136edb99a_13: string;
        Anon_4e04ec5cc4e6_9: components["schemas"]["Anon_9ac136edb99a_14"];
        Anon_9ac136edb99a_14: string;
        Anon_b540c131c269: components["schemas"]["TreatmentInteractionType"];
        Anon_e077e17ea982_3: components["schemas"]["Anon_02ecf48bed22_3"];
        /** Format: date-time */
        Anon_02ecf48bed22_3: string;
        Anon_4e04ec5cc4e6_10: components["schemas"]["Anon_9ac136edb99a_15"];
        Anon_9ac136edb99a_15: string;
        Anon_4e04ec5cc4e6_11: components["schemas"]["Anon_9ac136edb99a_16"];
        Anon_9ac136edb99a_16: string;
        Anon_4e04ec5cc4e6_12: components["schemas"]["Anon_9ac136edb99a_17"];
        Anon_9ac136edb99a_17: string;
        Anon_4e04ec5cc4e6_13: components["schemas"]["Anon_9ac136edb99a_18"];
        Anon_9ac136edb99a_18: string;
        Anon_94b7b4f4c44a: components["schemas"]["Anon_904af497346b"];
        Anon_904af497346b: string | null;
        Anon_4e04ec5cc4e6_14: components["schemas"]["Anon_9ac136edb99a_19"];
        Anon_9ac136edb99a_19: string;
        Anon_1071d7e3c379: components["schemas"]["Anon_c72f37d06352"];
        Anon_c72f37d06352: string[];
        Anon_1071d7e3c379_1: components["schemas"]["Anon_c72f37d06352_1"];
        Anon_c72f37d06352_1: string[];
        Anon_fb9ddeea992e_3: components["schemas"]["Anon_7cb541e84f22_33"];
        Anon_7cb541e84f22_33: boolean;
        Anon_a249e58b3222: components["schemas"]["Anon_c65c1fbd5acf_8"];
        Anon_c65c1fbd5acf_8: {
            [key: string]: unknown;
        };
        Anon_761f976a1da1_1: string;
        /** @enum {string} */
        Anon_d1623b956533: "new" | "high" | "medium" | "low" | "inactive";
        /** @enum {string} */
        Anon_a68601fc8ae6: "none" | "trial" | "paid" | "cancelled";
        /** @enum {string} */
        Anon_2277a9ff20f2: "none" | "free_trial" | "reverse_trial";
        /** @enum {string} */
        Anon_36144f6ff1f7: "buyer" | "non_buyer";
        /** @enum {string} */
        Anon_2e475c2b8517: "business" | "personal" | "unknown";
        /** @enum {string} */
        Anon_ea3031eacbdb: "no_billing" | "good_standing" | "trial_payment_method_attached" | "payment_method_missing" | "payment_failed" | "payment_overdue" | "cancelled";
        /** @enum {string} */
        Anon_4304284c431c: "us_canada" | "europe" | "rest_of_world";
        /** @enum {string} */
        Anon_eca965e9cb3d: "desktop" | "mobile" | "tablet" | "unknown";
        Anon_abb9584a79fc_1: components["schemas"]["Anon_97d5d0070850_1"];
        Anon_97d5d0070850_1: string | null;
        Anon_7720c3584d94: components["schemas"]["Anon_4b790ef08790"];
        Anon_4b790ef08790: {
            activity_level?: components["schemas"]["Anon_8f515c161b83"];
            subscription_state?: components["schemas"]["Anon_ed91fb5f5619"];
            trial_type?: components["schemas"]["Anon_888d7176e40e"];
            buyer_role?: components["schemas"]["Anon_6bead9fc16d2"];
            email_type?: components["schemas"]["Anon_e92ea640abba"];
            billing_health?: components["schemas"]["Anon_59a9cbd75a66"];
            region?: components["schemas"]["Anon_10d900d3a9e4"];
            device_type?: components["schemas"]["Anon_01efac8cdc3b"];
        };
        Anon_8f515c161b83: components["schemas"]["Anon_d1623b956533"] | null;
        Anon_ed91fb5f5619: components["schemas"]["Anon_a68601fc8ae6"] | null;
        Anon_888d7176e40e: components["schemas"]["Anon_2277a9ff20f2"] | null;
        Anon_6bead9fc16d2: components["schemas"]["Anon_36144f6ff1f7"] | null;
        Anon_e92ea640abba: components["schemas"]["Anon_2e475c2b8517"] | null;
        Anon_59a9cbd75a66: components["schemas"]["Anon_ea3031eacbdb"] | null;
        Anon_10d900d3a9e4: components["schemas"]["Anon_4304284c431c"] | null;
        Anon_01efac8cdc3b: components["schemas"]["Anon_eca965e9cb3d"] | null;
        Anon_fb9ddeea992e_6: components["schemas"]["Anon_7cb541e84f22_37"];
        Anon_7cb541e84f22_37: boolean;
        Plan: {
            id: components["schemas"]["Anon_fb248bf5a9f7_9"];
            created_at: components["schemas"]["Anon_be3e2585472d_2"];
            updated_at: components["schemas"]["Anon_be3e2585472d_3"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
            environment_id: components["schemas"]["Anon_51cbbf69cb41_1"];
            playbook_version_id: components["schemas"]["Anon_f7fb9744a6e4_11"];
            is_current: components["schemas"]["Anon_d295959bf4db_2"];
            is_deleted: components["schemas"]["Anon_4dc549443053_1"];
            delete_date: components["schemas"]["Anon_e4ee8e45dcea_1"];
            sequence: components["schemas"]["Anon_ffffc3c874cb_1"];
            base_sequence: components["schemas"]["Anon_71a2fb329804_1"];
            anchor_id: components["schemas"]["Anon_fb248bf5a9f7_11"];
            name: components["schemas"]["Anon_4c26b3baab05_14"];
            handle: components["schemas"]["Anon_af12d548dbee_20"];
            tier_position: components["schemas"]["Anon_2aa59aec1f23_3"];
            sort_order: components["schemas"]["Anon_f95d5b2e4f52_5"];
            visibility: components["schemas"]["Anon_a5e31586a542_4"];
            metadata: components["schemas"]["Anon_f27cb44c32f6_14"];
        };
        PlanVariation: {
            id: components["schemas"]["Anon_fb248bf5a9f7_9"];
            created_at: components["schemas"]["Anon_be3e2585472d_2"];
            updated_at: components["schemas"]["Anon_be3e2585472d_3"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
            environment_id: components["schemas"]["Anon_51cbbf69cb41_1"];
            playbook_version_id: components["schemas"]["Anon_f7fb9744a6e4_11"];
            is_current: components["schemas"]["Anon_d295959bf4db_2"];
            is_deleted: components["schemas"]["Anon_4dc549443053_1"];
            delete_date: components["schemas"]["Anon_e4ee8e45dcea_1"];
            sequence: components["schemas"]["Anon_ffffc3c874cb_1"];
            base_sequence: components["schemas"]["Anon_71a2fb329804_1"];
            anchor_id: components["schemas"]["Anon_fb248bf5a9f7_12"];
            handle: components["schemas"]["Anon_2457cccd64aa_2"];
            plan_id: components["schemas"]["Anon_57796118d046_32"];
            billing_period: components["schemas"]["Anon_129e203b1449_2"];
            segment_id: components["schemas"]["Anon_f7fb9744a6e4_12"];
            price_amount: components["schemas"]["Anon_7ab7b70b014d_3"];
            currency: components["schemas"]["Anon_1788a9a8a0b9"];
            pricing_model: components["schemas"]["Anon_1b09b93e2f83_3"];
            visibility: components["schemas"]["Anon_a5e31586a542_5"];
            stripe_price_id?: components["schemas"]["Anon_96f9066c2fdc_36"];
            price_source: components["schemas"]["Anon_b5714cb1e73b_1"];
        };
        AddOn: {
            id: components["schemas"]["Anon_fb248bf5a9f7_9"];
            created_at: components["schemas"]["Anon_be3e2585472d_2"];
            updated_at: components["schemas"]["Anon_be3e2585472d_3"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
            environment_id: components["schemas"]["Anon_51cbbf69cb41_1"];
            playbook_version_id: components["schemas"]["Anon_f7fb9744a6e4_11"];
            is_current: components["schemas"]["Anon_d295959bf4db_2"];
            is_deleted: components["schemas"]["Anon_4dc549443053_1"];
            delete_date: components["schemas"]["Anon_e4ee8e45dcea_1"];
            sequence: components["schemas"]["Anon_ffffc3c874cb_1"];
            base_sequence: components["schemas"]["Anon_71a2fb329804_1"];
            anchor_id: components["schemas"]["Anon_fb248bf5a9f7_13"];
            name: components["schemas"]["Anon_4c26b3baab05_15"];
            handle: components["schemas"]["Anon_af12d548dbee_21"];
            sort_order: components["schemas"]["Anon_f95d5b2e4f52_6"];
            visibility: components["schemas"]["Anon_a5e31586a542_6"];
            metadata: components["schemas"]["Anon_f27cb44c32f6_15"];
        };
        AddOnVariation: {
            id: components["schemas"]["Anon_fb248bf5a9f7_9"];
            created_at: components["schemas"]["Anon_be3e2585472d_2"];
            updated_at: components["schemas"]["Anon_be3e2585472d_3"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
            environment_id: components["schemas"]["Anon_51cbbf69cb41_1"];
            playbook_version_id: components["schemas"]["Anon_f7fb9744a6e4_11"];
            is_current: components["schemas"]["Anon_d295959bf4db_2"];
            is_deleted: components["schemas"]["Anon_4dc549443053_1"];
            delete_date: components["schemas"]["Anon_e4ee8e45dcea_1"];
            sequence: components["schemas"]["Anon_ffffc3c874cb_1"];
            base_sequence: components["schemas"]["Anon_71a2fb329804_1"];
            anchor_id: components["schemas"]["Anon_fb248bf5a9f7_14"];
            handle: components["schemas"]["Anon_2457cccd64aa_3"];
            addon_id: components["schemas"]["Anon_57796118d046_33"];
            billing_period: components["schemas"]["Anon_129e203b1449_3"];
            segment_id: components["schemas"]["Anon_f7fb9744a6e4_13"];
            price_amount: components["schemas"]["Anon_7ab7b70b014d_4"];
            currency: components["schemas"]["Anon_1788a9a8a0b9_1"];
            pricing_model: components["schemas"]["Anon_1b09b93e2f83_4"];
            visibility: components["schemas"]["Anon_a5e31586a542_7"];
            stripe_price_id?: components["schemas"]["Anon_96f9066c2fdc_37"];
            price_source: components["schemas"]["Anon_43943d0e9ae5_1"];
        };
        StripePrice: {
            id: components["schemas"]["Anon_fb248bf5a9f7_9"];
            created_at: components["schemas"]["Anon_be3e2585472d_2"];
            updated_at: components["schemas"]["Anon_be3e2585472d_3"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
            stripe_price_id: components["schemas"]["Anon_57796118d046_34"];
            stripe_product_id: components["schemas"]["Anon_57796118d046_35"];
            billing_period: components["schemas"]["Anon_cf08caa6d850_1"];
            unit_amount_cents: components["schemas"]["Anon_79391150fda1_1"];
            currency: components["schemas"]["Anon_1788a9a8a0b9_2"];
            pricing_model: components["schemas"]["Anon_1b09b93e2f83_5"];
            nickname: components["schemas"]["Anon_f7fb9744a6e4_14"];
            is_mock: components["schemas"]["Anon_062d958a93c4_6"];
            last_updated_from_stripe: components["schemas"]["Anon_711dc9708535_7"];
        };
        Entitlement: {
            id: components["schemas"]["Anon_fb248bf5a9f7_9"];
            created_at: components["schemas"]["Anon_be3e2585472d_2"];
            updated_at: components["schemas"]["Anon_be3e2585472d_3"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
            environment_id: components["schemas"]["Anon_51cbbf69cb41_1"];
            playbook_version_id: components["schemas"]["Anon_f7fb9744a6e4_11"];
            is_current: components["schemas"]["Anon_d295959bf4db_2"];
            is_deleted: components["schemas"]["Anon_4dc549443053_1"];
            delete_date: components["schemas"]["Anon_e4ee8e45dcea_1"];
            sequence: components["schemas"]["Anon_ffffc3c874cb_1"];
            base_sequence: components["schemas"]["Anon_71a2fb329804_1"];
            anchor_id: components["schemas"]["Anon_fb248bf5a9f7_15"];
            name: components["schemas"]["Anon_4c26b3baab05_16"];
            handle: components["schemas"]["Anon_af12d548dbee_22"];
            customer_facing_description?: components["schemas"]["Anon_7e1c99abdd77_3"];
            type: components["schemas"]["Anon_467a283cb3f8_1"];
            unit?: components["schemas"]["Anon_409d6333b38e_3"];
            period_scope?: components["schemas"]["Anon_2923895ad8e0_2"];
            allocation?: components["schemas"]["Anon_a7c491664ac5_3"];
            tier_definitions?: components["schemas"]["Anon_aadb63d82c09"];
            sort_order: components["schemas"]["Anon_f95d5b2e4f52_7"];
            metadata: components["schemas"]["Anon_f27cb44c32f6_16"];
        };
        EntitlementRule: {
            id: components["schemas"]["Anon_fb248bf5a9f7_9"];
            created_at: components["schemas"]["Anon_be3e2585472d_2"];
            updated_at: components["schemas"]["Anon_be3e2585472d_3"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
            environment_id: components["schemas"]["Anon_51cbbf69cb41_1"];
            playbook_version_id: components["schemas"]["Anon_f7fb9744a6e4_11"];
            is_current: components["schemas"]["Anon_d295959bf4db_2"];
            is_deleted: components["schemas"]["Anon_4dc549443053_1"];
            delete_date: components["schemas"]["Anon_e4ee8e45dcea_1"];
            sequence: components["schemas"]["Anon_ffffc3c874cb_1"];
            base_sequence: components["schemas"]["Anon_71a2fb329804_1"];
            anchor_id: components["schemas"]["Anon_fb248bf5a9f7_16"];
            handle: components["schemas"]["Anon_2457cccd64aa_4"];
            entitlement_id: components["schemas"]["Anon_57796118d046_36"];
            targets: components["schemas"]["Anon_effbae05e941"];
            segment_ids: components["schemas"]["Anon_f8dbfffc0ce2_10"];
            visibility: components["schemas"]["Anon_b26f420c5d82_1"];
            objective?: components["schemas"]["Anon_b2cdc2167b65_2"];
            period_scope?: components["schemas"]["Anon_2923895ad8e0_3"];
            instance?: components["schemas"]["Anon_409d6333b38e_4"];
            reset_period?: components["schemas"]["Anon_49d496ef65c9_1"];
            limit_value?: components["schemas"]["Anon_811366723713_2"];
            enforcement?: components["schemas"]["Anon_25c82cf56487_2"];
            warning_threshold_percent?: components["schemas"]["Anon_82a173df2abc_2"];
            overage_price_ref?: components["schemas"]["Anon_96f9066c2fdc_38"];
            grace_period_hours?: components["schemas"]["Anon_7e1e37293611_8"];
            tier_value?: components["schemas"]["Anon_96f9066c2fdc_39"];
            rate_value?: components["schemas"]["Anon_9c7f41b09bde_4"];
            initial_grant?: components["schemas"]["Anon_9c7f41b09bde_5"];
            allowance_value?: components["schemas"]["Anon_811366723713_3"];
            rollover_enabled?: components["schemas"]["Anon_fb9ddeea992e_7"];
            max_balance: components["schemas"]["Anon_d84a41962ed1_1"];
            seat_type_id?: components["schemas"]["Anon_96f9066c2fdc_40"];
            included_count?: components["schemas"]["Anon_5d154a3d9b9e_1"];
            at_limit_behavior?: components["schemas"]["Anon_28e076aa98f9_1"];
            stripe_metered_price_id?: components["schemas"]["Anon_96f9066c2fdc_41"];
            enabled?: components["schemas"]["Anon_fb9ddeea992e_8"];
            allocation?: components["schemas"]["Anon_a7c491664ac5_4"];
            max_seats?: components["schemas"]["Anon_0dc47bdde23b_1"];
            amount_cents?: components["schemas"]["Anon_18968514c96d_1"];
            currency?: components["schemas"]["Anon_96f9066c2fdc_42"];
        };
        EntitlementRuleWriteResponse: {
            id: components["schemas"]["Anon_fb248bf5a9f7_9"];
            created_at: components["schemas"]["Anon_be3e2585472d_2"];
            updated_at: components["schemas"]["Anon_be3e2585472d_3"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
            environment_id: components["schemas"]["Anon_51cbbf69cb41_1"];
            playbook_version_id: components["schemas"]["Anon_f7fb9744a6e4_11"];
            is_current: components["schemas"]["Anon_d295959bf4db_2"];
            is_deleted: components["schemas"]["Anon_4dc549443053_1"];
            delete_date: components["schemas"]["Anon_e4ee8e45dcea_1"];
            sequence: components["schemas"]["Anon_ffffc3c874cb_1"];
            base_sequence: components["schemas"]["Anon_71a2fb329804_1"];
            anchor_id: components["schemas"]["Anon_fb248bf5a9f7_16"];
            handle: components["schemas"]["Anon_2457cccd64aa_4"];
            entitlement_id: components["schemas"]["Anon_57796118d046_36"];
            targets: components["schemas"]["Anon_effbae05e941"];
            segment_ids: components["schemas"]["Anon_f8dbfffc0ce2_10"];
            visibility: components["schemas"]["Anon_b26f420c5d82_1"];
            objective?: components["schemas"]["Anon_b2cdc2167b65_2"];
            period_scope?: components["schemas"]["Anon_2923895ad8e0_3"];
            instance?: components["schemas"]["Anon_409d6333b38e_4"];
            reset_period?: components["schemas"]["Anon_49d496ef65c9_1"];
            limit_value?: components["schemas"]["Anon_811366723713_2"];
            enforcement?: components["schemas"]["Anon_25c82cf56487_2"];
            warning_threshold_percent?: components["schemas"]["Anon_82a173df2abc_2"];
            overage_price_ref?: components["schemas"]["Anon_96f9066c2fdc_38"];
            grace_period_hours?: components["schemas"]["Anon_7e1e37293611_8"];
            tier_value?: components["schemas"]["Anon_96f9066c2fdc_39"];
            rate_value?: components["schemas"]["Anon_9c7f41b09bde_4"];
            initial_grant?: components["schemas"]["Anon_9c7f41b09bde_5"];
            allowance_value?: components["schemas"]["Anon_811366723713_3"];
            rollover_enabled?: components["schemas"]["Anon_fb9ddeea992e_7"];
            max_balance: components["schemas"]["Anon_d84a41962ed1_1"];
            seat_type_id?: components["schemas"]["Anon_96f9066c2fdc_40"];
            included_count?: components["schemas"]["Anon_5d154a3d9b9e_1"];
            at_limit_behavior?: components["schemas"]["Anon_28e076aa98f9_1"];
            stripe_metered_price_id?: components["schemas"]["Anon_96f9066c2fdc_41"];
            enabled?: components["schemas"]["Anon_fb9ddeea992e_8"];
            allocation?: components["schemas"]["Anon_a7c491664ac5_4"];
            max_seats?: components["schemas"]["Anon_0dc47bdde23b_1"];
            amount_cents?: components["schemas"]["Anon_18968514c96d_1"];
            currency?: components["schemas"]["Anon_96f9066c2fdc_42"];
            warnings?: components["schemas"]["Anon_94e2b717b43e"];
        };
        EntitlementRuleWarning: {
            code: components["schemas"]["Anon_47cb53910d2c"];
            message: components["schemas"]["Anon_57796118d046_38"];
            path?: components["schemas"]["Anon_e5444c6c0ca5"];
        };
        /** @enum {string} */
        EntitlementRuleWarningCode: "one_time_period_mismatch";
        EntitlementRuleVariant: {
            id: components["schemas"]["Anon_fb248bf5a9f7_9"];
            created_at: components["schemas"]["Anon_be3e2585472d_2"];
            updated_at: components["schemas"]["Anon_be3e2585472d_3"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
            environment_id: components["schemas"]["Anon_51cbbf69cb41_1"];
            playbook_version_id: components["schemas"]["Anon_f7fb9744a6e4_11"];
            is_current: components["schemas"]["Anon_d295959bf4db_2"];
            is_deleted: components["schemas"]["Anon_4dc549443053_1"];
            delete_date: components["schemas"]["Anon_e4ee8e45dcea_1"];
            sequence: components["schemas"]["Anon_ffffc3c874cb_1"];
            base_sequence: components["schemas"]["Anon_71a2fb329804_1"];
            handle: components["schemas"]["Anon_2457cccd64aa_5"];
            rule_id: components["schemas"]["Anon_57796118d046_39"];
            experiment_id: components["schemas"]["Anon_57796118d046_40"];
            variant_name: components["schemas"]["Anon_872e58432369_1"];
            is_control: components["schemas"]["Anon_062d958a93c4_7"];
            override_fields: components["schemas"]["Anon_5142f8473790_6"];
        };
        Placement: {
            id: components["schemas"]["Anon_fb248bf5a9f7_9"];
            created_at: components["schemas"]["Anon_be3e2585472d_2"];
            updated_at: components["schemas"]["Anon_be3e2585472d_3"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
            environment_id: components["schemas"]["Anon_51cbbf69cb41_1"];
            playbook_version_id: components["schemas"]["Anon_f7fb9744a6e4_11"];
            is_current: components["schemas"]["Anon_d295959bf4db_2"];
            is_deleted: components["schemas"]["Anon_4dc549443053_1"];
            delete_date: components["schemas"]["Anon_e4ee8e45dcea_1"];
            sequence: components["schemas"]["Anon_ffffc3c874cb_1"];
            base_sequence: components["schemas"]["Anon_71a2fb329804_1"];
            anchor_id: components["schemas"]["Anon_fb248bf5a9f7_17"];
            name: components["schemas"]["Anon_4c26b3baab05_17"];
            handle: components["schemas"]["Anon_af12d548dbee_23"];
            description?: components["schemas"]["Anon_ee9224780226_5"];
            category: components["schemas"]["Anon_843e92dde3b4_1"];
            objective?: components["schemas"]["Anon_b2cdc2167b65_3"];
            drag_order_in_category: components["schemas"]["Anon_f95d5b2e4f52_8"];
            surface_slot_id?: components["schemas"]["Anon_96f9066c2fdc_43"];
            entitlement_id?: components["schemas"]["Anon_96f9066c2fdc_44"];
            tier_threshold?: components["schemas"]["Anon_96f9066c2fdc_45"];
            threshold_percent?: components["schemas"]["Anon_82a173df2abc_3"];
            trial_type?: components["schemas"]["Anon_66461f6ab64d_1"];
            trigger_type?: components["schemas"]["Anon_96f9066c2fdc_46"];
            trial_progress_percent?: components["schemas"]["Anon_b3e59c48ae6e_2"];
            days_before_end?: components["schemas"]["Anon_7e1e37293611_9"];
            qualifier?: components["schemas"]["Anon_a8be2b5da5e8_1"];
            activation_window_start?: components["schemas"]["Anon_e077e17ea982_6"];
            activation_window_end?: components["schemas"]["Anon_e077e17ea982_7"];
            metadata: components["schemas"]["Anon_f27cb44c32f6_17"];
        };
        PlacementWriteResponse: {
            id: components["schemas"]["Anon_fb248bf5a9f7_9"];
            created_at: components["schemas"]["Anon_be3e2585472d_2"];
            updated_at: components["schemas"]["Anon_be3e2585472d_3"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
            environment_id: components["schemas"]["Anon_51cbbf69cb41_1"];
            playbook_version_id: components["schemas"]["Anon_f7fb9744a6e4_11"];
            is_current: components["schemas"]["Anon_d295959bf4db_2"];
            is_deleted: components["schemas"]["Anon_4dc549443053_1"];
            delete_date: components["schemas"]["Anon_e4ee8e45dcea_1"];
            sequence: components["schemas"]["Anon_ffffc3c874cb_1"];
            base_sequence: components["schemas"]["Anon_71a2fb329804_1"];
            anchor_id: components["schemas"]["Anon_fb248bf5a9f7_17"];
            name: components["schemas"]["Anon_4c26b3baab05_17"];
            handle: components["schemas"]["Anon_af12d548dbee_23"];
            description?: components["schemas"]["Anon_ee9224780226_5"];
            category: components["schemas"]["Anon_843e92dde3b4_1"];
            objective?: components["schemas"]["Anon_b2cdc2167b65_3"];
            drag_order_in_category: components["schemas"]["Anon_f95d5b2e4f52_8"];
            surface_slot_id?: components["schemas"]["Anon_96f9066c2fdc_43"];
            entitlement_id?: components["schemas"]["Anon_96f9066c2fdc_44"];
            tier_threshold?: components["schemas"]["Anon_96f9066c2fdc_45"];
            threshold_percent?: components["schemas"]["Anon_82a173df2abc_3"];
            trial_type?: components["schemas"]["Anon_66461f6ab64d_1"];
            trigger_type?: components["schemas"]["Anon_96f9066c2fdc_46"];
            trial_progress_percent?: components["schemas"]["Anon_b3e59c48ae6e_2"];
            days_before_end?: components["schemas"]["Anon_7e1e37293611_9"];
            qualifier?: components["schemas"]["Anon_a8be2b5da5e8_1"];
            activation_window_start?: components["schemas"]["Anon_e077e17ea982_6"];
            activation_window_end?: components["schemas"]["Anon_e077e17ea982_7"];
            metadata: components["schemas"]["Anon_f27cb44c32f6_17"];
            warnings?: components["schemas"]["Anon_deca7bd23776"];
        };
        PlacementWarning: {
            code: components["schemas"]["Anon_9481d431ae03"];
            message: components["schemas"]["Anon_57796118d046_41"];
            path?: components["schemas"]["Anon_e5444c6c0ca5_1"];
        };
        /** @enum {string} */
        PlacementWarningCode: "threshold_not_emitted";
        PlacementPayload: {
            id: components["schemas"]["Anon_fb248bf5a9f7_9"];
            created_at: components["schemas"]["Anon_be3e2585472d_2"];
            updated_at: components["schemas"]["Anon_be3e2585472d_3"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
            environment_id: components["schemas"]["Anon_51cbbf69cb41_1"];
            playbook_version_id: components["schemas"]["Anon_f7fb9744a6e4_11"];
            is_current: components["schemas"]["Anon_d295959bf4db_2"];
            is_deleted: components["schemas"]["Anon_4dc549443053_1"];
            delete_date: components["schemas"]["Anon_e4ee8e45dcea_1"];
            sequence: components["schemas"]["Anon_ffffc3c874cb_1"];
            base_sequence: components["schemas"]["Anon_71a2fb329804_1"];
            anchor_id: components["schemas"]["Anon_fb248bf5a9f7_18"];
            handle: components["schemas"]["Anon_2457cccd64aa_6"];
            placement_id: components["schemas"]["Anon_57796118d046_42"];
            drag_order: components["schemas"]["Anon_f95d5b2e4f52_9"];
            target_plan_ids: components["schemas"]["Anon_f8dbfffc0ce2_11"];
            target_plan_billing_cadences: components["schemas"]["Anon_f8dbfffc0ce2_12"];
            target_segments: components["schemas"]["Anon_f8dbfffc0ce2_13"];
            surface_slot_ids: components["schemas"]["Anon_f8dbfffc0ce2_14"];
            surface_template_id: components["schemas"]["Anon_57796118d046_43"];
            content_fields: components["schemas"]["Anon_5142f8473790_7"];
            cta_list: components["schemas"]["Anon_6ff5f738216c"];
            max_per_period: components["schemas"]["Anon_45e0e0d4a0da_3"];
            max_period_unit: components["schemas"]["Anon_6ab4ae68d10d_1"];
            cooldown_after_dismiss_days: components["schemas"]["Anon_3380fd32e874_1"];
            remind_later_minutes: components["schemas"]["Anon_45e0e0d4a0da_4"];
            recommendation_strategy: components["schemas"]["Anon_beae1a1b3acf_1"];
            recommendation_plan_override?: components["schemas"]["Anon_96f9066c2fdc_47"];
        };
        SurfaceSlot: {
            id: components["schemas"]["Anon_fb248bf5a9f7_9"];
            created_at: components["schemas"]["Anon_be3e2585472d_2"];
            updated_at: components["schemas"]["Anon_be3e2585472d_3"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
            environment_id: components["schemas"]["Anon_51cbbf69cb41_1"];
            playbook_version_id: components["schemas"]["Anon_f7fb9744a6e4_11"];
            is_current: components["schemas"]["Anon_d295959bf4db_2"];
            is_deleted: components["schemas"]["Anon_4dc549443053_1"];
            delete_date: components["schemas"]["Anon_e4ee8e45dcea_1"];
            sequence: components["schemas"]["Anon_ffffc3c874cb_1"];
            base_sequence: components["schemas"]["Anon_71a2fb329804_1"];
            surface_slot_handle: components["schemas"]["Anon_872e58432369_3"];
            surface_type: components["schemas"]["Anon_67e8169f51c4"];
            surface_template_ids: components["schemas"]["Anon_f8dbfffc0ce2_15"];
            surface_slot_category: components["schemas"]["Anon_28f393a0fbc4"];
            first_seen: components["schemas"]["Anon_be3e2585472d_4"];
            last_seen: components["schemas"]["Anon_be3e2585472d_5"];
            route?: components["schemas"]["Anon_babb60294324"];
            slot_name?: components["schemas"]["Anon_34e621e2f47f"];
            status: components["schemas"]["Anon_4c42c2590496"];
            placement_count: components["schemas"]["Anon_b32f11b2ff5e_2"];
        };
        /** @enum {string} */
        SurfaceSlotStatus: "live" | "idle";
        null: {
            accepted: components["schemas"]["Anon_274ba4ca49d5_28"];
        };
        ServerUserContextAssignment: {
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
            user_id: components["schemas"]["Anon_761f976a1da1_7"];
            updated_at: components["schemas"]["Anon_be3e2585472d_3"];
            seat_type_handle: components["schemas"]["Anon_c5d45818321f"];
            builtin_dimensions: components["schemas"]["Anon_fc091757ffd3"];
            overrides: components["schemas"]["Anon_df4ebd6a2dc0"];
        };
        ServerUserBuiltinDimensions: {
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
            user_id: components["schemas"]["Anon_761f976a1da1_7"];
            builtin_dimensions: components["schemas"]["Anon_ad3c35aa933d"];
            resolved_at: components["schemas"]["Anon_3c179513a5d9_21"];
        };
        Anon_fb248bf5a9f7_9: string;
        /** Format: date-time */
        Anon_be3e2585472d_2: string;
        /** Format: date-time */
        Anon_be3e2585472d_3: string;
        Anon_fb248bf5a9f7_10: string;
        Anon_c65c1fbd5acf_12: {
            [key: string]: unknown;
        };
        /** @default {} */
        Anon_f2d1b3e449b4_1: components["schemas"]["Anon_c65c1fbd5acf_12"];
        Anon_b0c21ae8f968_28: string | null;
        /** @default null */
        Anon_11c9ad639448_1: components["schemas"]["Anon_b0c21ae8f968_28"];
        /** @default production */
        Anon_51cbbf69cb41_1: components["schemas"]["Anon_9ac136edb99a_21"];
        Anon_9ac136edb99a_21: string;
        Anon_0eb2e3b6e08c_5: string;
        Anon_ed3fcc71dea7: {
            error: string;
            code: string;
            request_id: string;
        };
        /** @default null */
        Anon_f7fb9744a6e4_11: components["schemas"]["Anon_f090cb615c84_27"];
        Anon_f090cb615c84_27: string | null;
        /** @default true */
        Anon_d295959bf4db_2: components["schemas"]["Anon_7cb541e84f22_65"];
        Anon_7cb541e84f22_65: boolean;
        /** @default false */
        Anon_4dc549443053_1: components["schemas"]["Anon_7cb541e84f22_66"];
        Anon_7cb541e84f22_66: boolean;
        /** @default null */
        Anon_e4ee8e45dcea_1: components["schemas"]["Anon_b0c21ae8f968_29"];
        Anon_b0c21ae8f968_29: string | null;
        /** @default 1 */
        Anon_ffffc3c874cb_1: components["schemas"]["Anon_ea288f4ef558_16"];
        Anon_ea288f4ef558_16: number;
        /** @default null */
        Anon_71a2fb329804_1: components["schemas"]["Anon_86192233f412_1"];
        Anon_86192233f412_1: number | null;
        Anon_fb248bf5a9f7_11: string;
        Anon_4c26b3baab05_14: components["schemas"]["Anon_52ba84a4bbf3_2"];
        Anon_52ba84a4bbf3_2: string;
        Anon_af12d548dbee_20: components["schemas"]["Anon_0eb2e3b6e08c_5"];
        /** @default 0 */
        Anon_2aa59aec1f23_3: components["schemas"]["Anon_97cc9ecfdea9_36"];
        Anon_97cc9ecfdea9_36: number;
        /** @default 0 */
        Anon_f95d5b2e4f52_5: components["schemas"]["Anon_278eaeabce08_6"];
        Anon_278eaeabce08_6: number;
        /** @default public */
        Anon_a5e31586a542_4: components["schemas"]["PlanVisibility"];
        Anon_f27cb44c32f6_14: components["schemas"]["Anon_f2d1b3e449b4_1"];
        Anon_fb248bf5a9f7_12: string;
        Anon_2457cccd64aa_2: components["schemas"]["Anon_0eb2e3b6e08c_5"];
        Anon_57796118d046_32: string;
        /** @enum {string} */
        Anon_129e203b1449_2: "monthly" | "annual" | "one_time" | "custom";
        /** @default null */
        Anon_f7fb9744a6e4_12: components["schemas"]["Anon_f090cb615c84_28"];
        Anon_f090cb615c84_28: string | null;
        Anon_7ab7b70b014d_3: number;
        Anon_1788a9a8a0b9: components["schemas"]["CurrencyOutput"];
        Anon_063c0cce3710_1: string;
        Anon_1b09b93e2f83_3: components["schemas"]["PricingModel"];
        /** @default public */
        Anon_a5e31586a542_5: components["schemas"]["PlanVisibility"];
        Anon_96f9066c2fdc_36: components["schemas"]["Anon_00404e686415_40"];
        Anon_00404e686415_40: string;
        /** @default static */
        Anon_b5714cb1e73b_1: components["schemas"]["PriceSource"];
        Anon_fb248bf5a9f7_13: string;
        Anon_4c26b3baab05_15: components["schemas"]["Anon_52ba84a4bbf3_2"];
        Anon_af12d548dbee_21: components["schemas"]["Anon_0eb2e3b6e08c_5"];
        /** @default 0 */
        Anon_f95d5b2e4f52_6: components["schemas"]["Anon_278eaeabce08_7"];
        Anon_278eaeabce08_7: number;
        /** @default public */
        Anon_a5e31586a542_6: components["schemas"]["PlanVisibility"];
        Anon_f27cb44c32f6_15: components["schemas"]["Anon_f2d1b3e449b4_1"];
        Anon_fb248bf5a9f7_14: string;
        Anon_2457cccd64aa_3: components["schemas"]["Anon_0eb2e3b6e08c_5"];
        Anon_57796118d046_33: string;
        /** @enum {string} */
        Anon_129e203b1449_3: "monthly" | "annual" | "one_time" | "custom";
        /** @default null */
        Anon_f7fb9744a6e4_13: components["schemas"]["Anon_f090cb615c84_29"];
        Anon_f090cb615c84_29: string | null;
        Anon_7ab7b70b014d_4: number;
        Anon_1788a9a8a0b9_1: components["schemas"]["CurrencyOutput"];
        Anon_1b09b93e2f83_4: components["schemas"]["PricingModel"];
        /** @default public */
        Anon_a5e31586a542_7: components["schemas"]["PlanVisibility"];
        Anon_96f9066c2fdc_37: components["schemas"]["Anon_00404e686415_41"];
        Anon_00404e686415_41: string;
        /** @default static */
        Anon_43943d0e9ae5_1: components["schemas"]["Anon_4fc7f7e3b3e6_1"];
        /** @enum {string} */
        Anon_4fc7f7e3b3e6_1: "stripe" | "static";
        Anon_57796118d046_34: string;
        Anon_57796118d046_35: string;
        Anon_cf08caa6d850_1: components["schemas"]["StripePriceBillingPeriod"];
        /** @default null */
        Anon_79391150fda1_1: components["schemas"]["Anon_c648138a0918_15"];
        Anon_c648138a0918_15: number | null;
        Anon_1788a9a8a0b9_2: components["schemas"]["CurrencyOutput"];
        Anon_1b09b93e2f83_5: components["schemas"]["PricingModel"];
        /** @default null */
        Anon_f7fb9744a6e4_14: components["schemas"]["Anon_f090cb615c84_30"];
        Anon_f090cb615c84_30: string | null;
        /** @default false */
        Anon_062d958a93c4_6: components["schemas"]["Anon_7cb541e84f22_67"];
        Anon_7cb541e84f22_67: boolean;
        Anon_711dc9708535_7: components["schemas"]["Anon_11c9ad639448_1"];
        Anon_fb248bf5a9f7_15: string;
        Anon_4c26b3baab05_16: components["schemas"]["Anon_52ba84a4bbf3_2"];
        Anon_af12d548dbee_22: components["schemas"]["Anon_0eb2e3b6e08c_5"];
        Anon_7e1c99abdd77_3: components["schemas"]["Anon_373775e26848_8"];
        Anon_373775e26848_8: string;
        Anon_467a283cb3f8_1: components["schemas"]["EntitlementType"];
        Anon_409d6333b38e_3: components["schemas"]["Anon_d856c03b0c72_3"];
        Anon_d856c03b0c72_3: string;
        Anon_2923895ad8e0_2: components["schemas"]["UsagePeriodScope"];
        Anon_a7c491664ac5_3: components["schemas"]["UsageAllocation"];
        Anon_aadb63d82c09: components["schemas"]["Anon_7575b43eb52d"];
        Anon_7575b43eb52d: {
            name: string;
            handle: string;
            description?: string;
        }[];
        /** @default 0 */
        Anon_f95d5b2e4f52_7: components["schemas"]["Anon_278eaeabce08_8"];
        Anon_278eaeabce08_8: number;
        Anon_f27cb44c32f6_16: components["schemas"]["Anon_f2d1b3e449b4_1"];
        Anon_fb248bf5a9f7_16: string;
        Anon_2457cccd64aa_4: components["schemas"]["Anon_0eb2e3b6e08c_5"];
        Anon_57796118d046_36: string;
        Anon_effbae05e941: components["schemas"]["EntitlementRuleTargetOutput"][];
        Anon_70ee2ddbc798_1: components["schemas"]["EntitlementRuleTargetKind"];
        Anon_57796118d046_37: string;
        /** @default [] */
        Anon_f8dbfffc0ce2_10: components["schemas"]["Anon_681004346c78_13"];
        Anon_681004346c78_13: string[];
        /** @default public */
        Anon_b26f420c5d82_1: components["schemas"]["RuleVisibility"];
        Anon_b2cdc2167b65_2: components["schemas"]["Anon_479ce264714e_1"] | null;
        Anon_479ce264714e_1: components["schemas"]["Anon_0eb2e3b6e08c_5"];
        Anon_2923895ad8e0_3: components["schemas"]["UsagePeriodScope"];
        Anon_409d6333b38e_4: components["schemas"]["Anon_d856c03b0c72_4"];
        Anon_d856c03b0c72_4: string;
        Anon_49d496ef65c9_1: components["schemas"]["EntitlementRulePeriodUnit"];
        Anon_811366723713_2: components["schemas"]["Anon_4c1d2cc17cf8_2"];
        Anon_4c1d2cc17cf8_2: number | "unlimited";
        Anon_25c82cf56487_2: components["schemas"]["EnforcementMode"];
        Anon_82a173df2abc_2: components["schemas"]["Anon_ff52ebcb2a4e_1"];
        Anon_ff52ebcb2a4e_1: number;
        Anon_96f9066c2fdc_38: components["schemas"]["Anon_00404e686415_42"];
        Anon_00404e686415_42: string;
        Anon_7e1e37293611_8: components["schemas"]["Anon_97cc9ecfdea9_37"];
        Anon_97cc9ecfdea9_37: number;
        Anon_96f9066c2fdc_39: components["schemas"]["Anon_00404e686415_43"];
        Anon_00404e686415_43: string;
        Anon_9c7f41b09bde_4: components["schemas"]["Anon_cddf8275afa1_8"];
        Anon_cddf8275afa1_8: number;
        Anon_9c7f41b09bde_5: components["schemas"]["Anon_cddf8275afa1_9"];
        Anon_cddf8275afa1_9: number;
        Anon_811366723713_3: components["schemas"]["Anon_4c1d2cc17cf8_3"];
        Anon_4c1d2cc17cf8_3: number | "unlimited";
        Anon_fb9ddeea992e_7: components["schemas"]["Anon_7cb541e84f22_68"];
        Anon_7cb541e84f22_68: boolean;
        /** @default null */
        Anon_d84a41962ed1_1: components["schemas"]["Anon_853b74b4f5a9_2"];
        Anon_853b74b4f5a9_2: (number | "unlimited") | null;
        Anon_96f9066c2fdc_40: components["schemas"]["Anon_00404e686415_44"];
        Anon_00404e686415_44: string;
        Anon_5d154a3d9b9e_1: components["schemas"]["Anon_e41be67a03a1_1"];
        Anon_e41be67a03a1_1: number | "unlimited";
        Anon_28e076aa98f9_1: components["schemas"]["Anon_408f15090b22_1"];
        /** @enum {string} */
        Anon_408f15090b22_1: "hard_cap" | "auto_upgrade_at_renewal";
        Anon_96f9066c2fdc_41: components["schemas"]["Anon_00404e686415_45"];
        Anon_00404e686415_45: string;
        Anon_fb9ddeea992e_8: components["schemas"]["Anon_7cb541e84f22_69"];
        Anon_7cb541e84f22_69: boolean;
        Anon_a7c491664ac5_4: components["schemas"]["UsageAllocation"];
        Anon_0dc47bdde23b_1: components["schemas"]["Anon_853b74b4f5a9_3"];
        Anon_853b74b4f5a9_3: (number | "unlimited") | null;
        Anon_18968514c96d_1: components["schemas"]["Anon_278eaeabce08_9"];
        Anon_278eaeabce08_9: number;
        Anon_96f9066c2fdc_42: components["schemas"]["Anon_00404e686415_46"];
        Anon_00404e686415_46: string;
        Anon_94e2b717b43e: components["schemas"]["Anon_b9f8542e5a53"];
        Anon_b9f8542e5a53: components["schemas"]["EntitlementRuleWarning"][];
        Anon_47cb53910d2c: components["schemas"]["EntitlementRuleWarningCode"];
        Anon_57796118d046_38: string;
        Anon_e5444c6c0ca5: components["schemas"]["Anon_9b45bb8cfd31"];
        Anon_9b45bb8cfd31: (string | number)[];
        Anon_2457cccd64aa_5: components["schemas"]["Anon_0eb2e3b6e08c_5"];
        Anon_57796118d046_39: string;
        Anon_57796118d046_40: string;
        Anon_872e58432369_1: string;
        /** @default false */
        Anon_062d958a93c4_7: components["schemas"]["Anon_7cb541e84f22_70"];
        Anon_7cb541e84f22_70: boolean;
        /** @default {} */
        Anon_5142f8473790_6: components["schemas"]["Anon_c65c1fbd5acf_13"];
        Anon_c65c1fbd5acf_13: {
            [key: string]: unknown;
        };
        Anon_fb248bf5a9f7_17: string;
        Anon_4c26b3baab05_17: components["schemas"]["Anon_52ba84a4bbf3_2"];
        Anon_af12d548dbee_23: components["schemas"]["Anon_0eb2e3b6e08c_5"];
        Anon_ee9224780226_5: components["schemas"]["Anon_853cc883e392_1"];
        Anon_373775e26848_9: string;
        Anon_853cc883e392_1: components["schemas"]["Anon_373775e26848_9"];
        Anon_843e92dde3b4_1: components["schemas"]["PlacementCategory"];
        Anon_b2cdc2167b65_3: components["schemas"]["Anon_479ce264714e_1"] | null;
        /** @default 0 */
        Anon_f95d5b2e4f52_8: components["schemas"]["Anon_278eaeabce08_10"];
        Anon_278eaeabce08_10: number;
        Anon_96f9066c2fdc_43: components["schemas"]["Anon_00404e686415_47"];
        Anon_00404e686415_47: string;
        Anon_96f9066c2fdc_44: components["schemas"]["Anon_00404e686415_48"];
        Anon_00404e686415_48: string;
        Anon_96f9066c2fdc_45: components["schemas"]["Anon_00404e686415_49"];
        Anon_00404e686415_49: string;
        Anon_82a173df2abc_3: components["schemas"]["Anon_ff52ebcb2a4e_1"];
        Anon_66461f6ab64d_1: components["schemas"]["Anon_1e39f641876a_1"];
        /** @enum {string} */
        Anon_1e39f641876a_1: "free" | "reverse";
        Anon_96f9066c2fdc_46: components["schemas"]["Anon_00404e686415_50"];
        Anon_00404e686415_50: string;
        Anon_b3e59c48ae6e_2: components["schemas"]["Anon_1ef289951720_4"];
        Anon_1ef289951720_4: number;
        Anon_7e1e37293611_9: components["schemas"]["Anon_97cc9ecfdea9_38"];
        Anon_97cc9ecfdea9_38: number;
        Anon_a8be2b5da5e8_1: components["schemas"]["Anon_aa6d7e4eede4_1"];
        /** @enum {string} */
        Anon_aa6d7e4eede4_1: "none_always_on" | "overage_vs_upgrade" | "time_bound" | "payment_failed" | "payment_at_risk";
        Anon_e077e17ea982_6: components["schemas"]["Anon_02ecf48bed22_8"];
        /** Format: date-time */
        Anon_02ecf48bed22_8: string;
        Anon_e077e17ea982_7: components["schemas"]["Anon_02ecf48bed22_9"];
        /** Format: date-time */
        Anon_02ecf48bed22_9: string;
        Anon_f27cb44c32f6_17: components["schemas"]["Anon_f2d1b3e449b4_1"];
        Anon_deca7bd23776: components["schemas"]["Anon_4683dfa2b0e7"];
        Anon_4683dfa2b0e7: components["schemas"]["PlacementWarning"][];
        Anon_9481d431ae03: components["schemas"]["PlacementWarningCode"];
        Anon_57796118d046_41: string;
        Anon_e5444c6c0ca5_1: components["schemas"]["Anon_9b45bb8cfd31_1"];
        Anon_9b45bb8cfd31_1: (string | number)[];
        Anon_fb248bf5a9f7_18: string;
        Anon_2457cccd64aa_6: components["schemas"]["Anon_0eb2e3b6e08c_5"];
        Anon_57796118d046_42: string;
        /** @default 0 */
        Anon_f95d5b2e4f52_9: components["schemas"]["Anon_278eaeabce08_11"];
        Anon_278eaeabce08_11: number;
        /** @default [] */
        Anon_f8dbfffc0ce2_11: components["schemas"]["Anon_681004346c78_14"];
        Anon_681004346c78_14: string[];
        /** @default [] */
        Anon_f8dbfffc0ce2_12: components["schemas"]["Anon_681004346c78_15"];
        Anon_681004346c78_15: string[];
        /** @default [] */
        Anon_f8dbfffc0ce2_13: components["schemas"]["Anon_681004346c78_16"];
        Anon_681004346c78_16: string[];
        /** @default [] */
        Anon_f8dbfffc0ce2_14: components["schemas"]["Anon_681004346c78_17"];
        Anon_681004346c78_17: string[];
        Anon_57796118d046_43: string;
        /** @default {} */
        Anon_5142f8473790_7: components["schemas"]["Anon_c65c1fbd5acf_14"];
        Anon_c65c1fbd5acf_14: {
            [key: string]: unknown;
        };
        /** @default [] */
        Anon_6ff5f738216c: components["schemas"]["Anon_7a90bc0a7d2c"];
        Anon_7a90bc0a7d2c: components["schemas"]["CtaObjectOutput"][];
        Anon_872e58432369_2: string;
        Anon_6fd1ceb6e366_1: components["schemas"]["CtaPathType"];
        /** @default {} */
        Anon_5142f8473790_8: components["schemas"]["Anon_c65c1fbd5acf_15"];
        Anon_c65c1fbd5acf_15: {
            [key: string]: unknown;
        };
        /** @default null */
        Anon_45e0e0d4a0da_3: components["schemas"]["Anon_c648138a0918_16"];
        Anon_c648138a0918_16: number | null;
        /** @default session */
        Anon_6ab4ae68d10d_1: components["schemas"]["CapPeriod"];
        /** @default 7 */
        Anon_3380fd32e874_1: components["schemas"]["Anon_97cc9ecfdea9_39"];
        Anon_97cc9ecfdea9_39: number;
        /** @default null */
        Anon_45e0e0d4a0da_4: components["schemas"]["Anon_c648138a0918_17"];
        Anon_c648138a0918_17: number | null;
        /** @default next_tier_up */
        Anon_beae1a1b3acf_1: components["schemas"]["Anon_761abd3347d0_1"];
        /** @enum {string} */
        Anon_761abd3347d0_1: "next_tier_up" | "best_value" | "custom";
        Anon_96f9066c2fdc_47: components["schemas"]["Anon_00404e686415_51"];
        Anon_00404e686415_51: string;
        Anon_872e58432369_3: string;
        Anon_67e8169f51c4: components["schemas"]["ComponentType"];
        /** @default [] */
        Anon_f8dbfffc0ce2_15: components["schemas"]["Anon_681004346c78_18"];
        Anon_681004346c78_18: string[];
        /** @default fixed */
        Anon_28f393a0fbc4: components["schemas"]["Anon_e6e93d3e6556"];
        /** @enum {string} */
        Anon_e6e93d3e6556: "fixed" | "gated" | "triggered";
        /** Format: date-time */
        Anon_be3e2585472d_4: string;
        /** Format: date-time */
        Anon_be3e2585472d_5: string;
        Anon_babb60294324: components["schemas"]["Anon_2df8ddc2275c"];
        Anon_2df8ddc2275c: string | null;
        Anon_34e621e2f47f: components["schemas"]["Anon_8c923fd28c9a_1"];
        Anon_8c923fd28c9a_1: string | null;
        /** @default idle */
        Anon_4c42c2590496: components["schemas"]["SurfaceSlotStatus"];
        /** @default 0 */
        Anon_b32f11b2ff5e_2: components["schemas"]["Anon_97cc9ecfdea9_40"];
        Anon_97cc9ecfdea9_40: number;
        Anon_fb248bf5a9f7_21: string;
        Anon_4c26b3baab05_20: components["schemas"]["Anon_52ba84a4bbf3_2"];
        Anon_af12d548dbee_26: components["schemas"]["Anon_0eb2e3b6e08c_5"];
        Anon_b5b008cadebe_1: components["schemas"]["ComponentType"] | components["schemas"]["DefaultTemplateIds"];
        /** @default [] */
        Anon_3b6346b139c2: components["schemas"]["Anon_f836473839d1"];
        Anon_f836473839d1: components["schemas"]["FieldDefinitionOutput"][];
        Anon_9ac136edb99a_22: string;
        /** @default false */
        Anon_f56777819c8b_5: boolean;
        Anon_44136fa355b3_3: unknown;
        Anon_97cc9ecfdea9_45: number;
        Anon_373775e26848_11: string;
        Anon_ee9224780226_7: components["schemas"]["Anon_853cc883e392_1"];
        Anon_fb248bf5a9f7_22: string;
        Anon_4c26b3baab05_21: components["schemas"]["Anon_52ba84a4bbf3_2"];
        Anon_af12d548dbee_27: components["schemas"]["Anon_0eb2e3b6e08c_5"];
        /** @default {} */
        Anon_5142f8473790_11: components["schemas"]["Anon_c65c1fbd5acf_19"];
        Anon_c65c1fbd5acf_19: {
            [key: string]: unknown;
        };
        Anon_96f9066c2fdc_50: components["schemas"]["Anon_00404e686415_54"];
        Anon_00404e686415_54: string;
        Anon_e3bd16668ab2: components["schemas"]["Anon_6387ddceba47"];
        Anon_6387ddceba47: {
            segment_value_id: string;
            content_fields_override: {
                [key: string]: unknown;
            };
        }[];
        Anon_796ec99afe20_3: components["schemas"]["Anon_333f67ffab65_3"];
        Anon_333f67ffab65_3: string;
        /** @default 0 */
        Anon_b32f11b2ff5e_4: components["schemas"]["Anon_97cc9ecfdea9_46"];
        Anon_97cc9ecfdea9_46: number;
        Anon_fb248bf5a9f7_23: string;
        Anon_4c26b3baab05_22: components["schemas"]["Anon_52ba84a4bbf3_2"];
        Anon_af12d548dbee_28: components["schemas"]["Anon_0eb2e3b6e08c_5"];
        Anon_f3fff0f64dfe_1: components["schemas"]["CtaActionType"];
        Anon_96f9066c2fdc_51: components["schemas"]["Anon_00404e686415_55"];
        Anon_00404e686415_55: string;
        Anon_96f9066c2fdc_52: components["schemas"]["Anon_00404e686415_56"];
        Anon_00404e686415_56: string;
        /** @default {} */
        Anon_5142f8473790_12: components["schemas"]["Anon_c65c1fbd5acf_20"];
        Anon_c65c1fbd5acf_20: {
            [key: string]: unknown;
        };
        Anon_f27cb44c32f6_18: components["schemas"]["Anon_f2d1b3e449b4_1"];
        Anon_274ba4ca49d5_28: number;
        Anon_761f976a1da1_7: string;
        Anon_a328336b75d6: {
            activity_level?: components["schemas"]["Anon_3b35bf76a160"];
            subscription_state?: components["schemas"]["Anon_dd3586a1ddbf"];
            trial_type?: components["schemas"]["Anon_a76d44f71d99"];
            seat_type?: components["schemas"]["Anon_4d82b9ae113d"];
            buyer_role?: components["schemas"]["Anon_e49ebf4157ee"];
            email_type?: components["schemas"]["Anon_04c0f0c7b77f"];
            billing_health?: components["schemas"]["Anon_0da5f739d027"];
            region?: components["schemas"]["Anon_56e83e25debd"];
            device_type?: components["schemas"]["Anon_decf640c9996"];
        };
        Anon_3b35bf76a160: components["schemas"]["Anon_d1623b956533_1"];
        /** @enum {string} */
        Anon_d1623b956533_1: "new" | "high" | "medium" | "low" | "inactive";
        Anon_dd3586a1ddbf: components["schemas"]["Anon_a68601fc8ae6_1"];
        /** @enum {string} */
        Anon_a68601fc8ae6_1: "none" | "trial" | "paid" | "cancelled";
        Anon_a76d44f71d99: components["schemas"]["Anon_2277a9ff20f2_1"];
        /** @enum {string} */
        Anon_2277a9ff20f2_1: "none" | "free_trial" | "reverse_trial";
        Anon_4d82b9ae113d: components["schemas"]["Anon_d85e54d83006_1"];
        Anon_d85e54d83006_1: string;
        Anon_e49ebf4157ee: components["schemas"]["Anon_36144f6ff1f7_1"];
        /** @enum {string} */
        Anon_36144f6ff1f7_1: "buyer" | "non_buyer";
        Anon_04c0f0c7b77f: components["schemas"]["Anon_2e475c2b8517_1"];
        /** @enum {string} */
        Anon_2e475c2b8517_1: "business" | "personal" | "unknown";
        Anon_0da5f739d027: components["schemas"]["Anon_ea3031eacbdb_1"];
        /** @enum {string} */
        Anon_ea3031eacbdb_1: "no_billing" | "good_standing" | "trial_payment_method_attached" | "payment_method_missing" | "payment_failed" | "payment_overdue" | "cancelled";
        Anon_56e83e25debd: components["schemas"]["Anon_4304284c431c_1"];
        /** @enum {string} */
        Anon_4304284c431c_1: "us_canada" | "europe" | "rest_of_world";
        Anon_decf640c9996: components["schemas"]["Anon_eca965e9cb3d_1"];
        /** @enum {string} */
        Anon_eca965e9cb3d_1: "desktop" | "mobile" | "tablet" | "unknown";
        Anon_c5d45818321f: components["schemas"]["Anon_0083ff3642e4_2"] | null;
        Anon_0083ff3642e4_2: string;
        Anon_fc091757ffd3: {
            activity_level?: components["schemas"]["Anon_3b35bf76a160_1"];
            subscription_state?: components["schemas"]["Anon_dd3586a1ddbf_1"];
            trial_type?: components["schemas"]["Anon_a76d44f71d99_1"];
            buyer_role?: components["schemas"]["Anon_e49ebf4157ee_1"];
            email_type?: components["schemas"]["Anon_04c0f0c7b77f_1"];
            billing_health?: components["schemas"]["Anon_0da5f739d027_1"];
            region?: components["schemas"]["Anon_56e83e25debd_1"];
            device_type?: components["schemas"]["Anon_decf640c9996_1"];
        };
        Anon_3b35bf76a160_1: components["schemas"]["Anon_d1623b956533_1"];
        Anon_dd3586a1ddbf_1: components["schemas"]["Anon_a68601fc8ae6_1"];
        Anon_a76d44f71d99_1: components["schemas"]["Anon_2277a9ff20f2_1"];
        Anon_e49ebf4157ee_1: components["schemas"]["Anon_36144f6ff1f7_1"];
        Anon_04c0f0c7b77f_1: components["schemas"]["Anon_2e475c2b8517_1"];
        Anon_0da5f739d027_1: components["schemas"]["Anon_ea3031eacbdb_1"];
        Anon_56e83e25debd_1: components["schemas"]["Anon_4304284c431c_1"];
        Anon_decf640c9996_1: components["schemas"]["Anon_eca965e9cb3d_1"];
        Anon_df4ebd6a2dc0: components["schemas"]["Anon_0375edee48c3"][];
        /** @enum {string} */
        Anon_0375edee48c3: "activity_level" | "subscription_state" | "trial_type" | "buyer_role" | "email_type" | "billing_health" | "region" | "device_type";
        Anon_ad3c35aa933d: components["schemas"]["Anon_a328336b75d6"];
        /** Format: date-time */
        Anon_3c179513a5d9_21: string;
        /** @default usd */
        CurrencyOutput: components["schemas"]["Anon_063c0cce3710_1"];
        EntitlementRuleTargetOutput: {
            kind: components["schemas"]["Anon_70ee2ddbc798_1"];
            id: components["schemas"]["Anon_57796118d046_37"];
        };
        CtaObjectOutput: {
            label: components["schemas"]["Anon_872e58432369_2"];
            cta_path_type: components["schemas"]["Anon_6fd1ceb6e366_1"];
            config_fields: components["schemas"]["Anon_5142f8473790_8"];
        };
        SurfaceTemplateOutput: {
            id: components["schemas"]["Anon_fb248bf5a9f7_9"];
            created_at: components["schemas"]["Anon_be3e2585472d_2"];
            updated_at: components["schemas"]["Anon_be3e2585472d_3"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
            environment_id: components["schemas"]["Anon_51cbbf69cb41_1"];
            playbook_version_id: components["schemas"]["Anon_f7fb9744a6e4_11"];
            is_current: components["schemas"]["Anon_d295959bf4db_2"];
            is_deleted: components["schemas"]["Anon_4dc549443053_1"];
            delete_date: components["schemas"]["Anon_e4ee8e45dcea_1"];
            sequence: components["schemas"]["Anon_ffffc3c874cb_1"];
            base_sequence: components["schemas"]["Anon_71a2fb329804_1"];
            anchor_id: components["schemas"]["Anon_fb248bf5a9f7_21"];
            name: components["schemas"]["Anon_4c26b3baab05_20"];
            handle: components["schemas"]["Anon_af12d548dbee_26"];
            surface_type: components["schemas"]["Anon_b5b008cadebe_1"];
            field_definitions: components["schemas"]["Anon_3b6346b139c2"];
            description?: components["schemas"]["Anon_ee9224780226_7"];
        };
        FieldDefinitionOutput: {
            name: components["schemas"]["Anon_9ac136edb99a_22"];
            field_type: components["schemas"]["TemplateFieldType"];
            required: components["schemas"]["Anon_f56777819c8b_5"];
            default_value?: components["schemas"]["Anon_44136fa355b3_3"];
            order?: components["schemas"]["Anon_97cc9ecfdea9_45"];
            help_text?: components["schemas"]["Anon_373775e26848_11"];
        };
        MessageBlockRecordOutput: {
            id: components["schemas"]["Anon_fb248bf5a9f7_9"];
            created_at: components["schemas"]["Anon_be3e2585472d_2"];
            updated_at: components["schemas"]["Anon_be3e2585472d_3"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
            environment_id: components["schemas"]["Anon_51cbbf69cb41_1"];
            playbook_version_id: components["schemas"]["Anon_f7fb9744a6e4_11"];
            is_current: components["schemas"]["Anon_d295959bf4db_2"];
            is_deleted: components["schemas"]["Anon_4dc549443053_1"];
            delete_date: components["schemas"]["Anon_e4ee8e45dcea_1"];
            sequence: components["schemas"]["Anon_ffffc3c874cb_1"];
            base_sequence: components["schemas"]["Anon_71a2fb329804_1"];
            anchor_id: components["schemas"]["Anon_fb248bf5a9f7_22"];
            name: components["schemas"]["Anon_4c26b3baab05_21"];
            handle: components["schemas"]["Anon_af12d548dbee_27"];
            content_fields: components["schemas"]["Anon_5142f8473790_11"];
            variation_dimension_id?: components["schemas"]["Anon_96f9066c2fdc_50"];
            variation_values?: components["schemas"]["Anon_e3bd16668ab2"];
            notes?: components["schemas"]["Anon_796ec99afe20_3"];
            used_in_count: components["schemas"]["Anon_b32f11b2ff5e_4"];
        };
        CtaPathOutput: {
            id: components["schemas"]["Anon_fb248bf5a9f7_9"];
            created_at: components["schemas"]["Anon_be3e2585472d_2"];
            updated_at: components["schemas"]["Anon_be3e2585472d_3"];
            tenant_id: components["schemas"]["Anon_fb248bf5a9f7_10"];
            environment_id: components["schemas"]["Anon_51cbbf69cb41_1"];
            playbook_version_id: components["schemas"]["Anon_f7fb9744a6e4_11"];
            is_current: components["schemas"]["Anon_d295959bf4db_2"];
            is_deleted: components["schemas"]["Anon_4dc549443053_1"];
            delete_date: components["schemas"]["Anon_e4ee8e45dcea_1"];
            sequence: components["schemas"]["Anon_ffffc3c874cb_1"];
            base_sequence: components["schemas"]["Anon_71a2fb329804_1"];
            anchor_id: components["schemas"]["Anon_fb248bf5a9f7_23"];
            name: components["schemas"]["Anon_4c26b3baab05_22"];
            handle: components["schemas"]["Anon_af12d548dbee_28"];
            action_type: components["schemas"]["Anon_f3fff0f64dfe_1"];
            target_url?: components["schemas"]["Anon_96f9066c2fdc_51"];
            target_plan_id?: components["schemas"]["Anon_96f9066c2fdc_52"];
            config_fields: components["schemas"]["Anon_5142f8473790_12"];
            metadata: components["schemas"]["Anon_f27cb44c32f6_18"];
        };
    };
    responses: never;
    parameters: never;
    requestBodies: never;
    headers: never;
    pathItems: never;
}
interface operations {
    listPlans: {
        parameters: {
            query?: {
                page?: components["schemas"]["Anon_9370e83b9cfe"];
                per_page?: components["schemas"]["Anon_7a97c926accf"];
                sort?: components["schemas"]["Anon_00404e686415"];
                order?: components["schemas"]["Anon_46b90b81d0d1"];
                include_deleted?: components["schemas"]["Anon_f56777819c8b"];
            };
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Plan list response */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        items: components["schemas"]["Plan"][];
                    };
                };
            };
            /** @description Error response */
            default: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
        };
    };
    createPlan: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
                    name: components["schemas"]["Anon_4c26b3baab05"];
                    handle: components["schemas"]["Anon_af12d548dbee"];
                    tier_position?: components["schemas"]["Anon_2aa59aec1f23"];
                    sort_order?: components["schemas"]["Anon_f95d5b2e4f52"];
                    visibility?: components["schemas"]["Anon_a5e31586a542"];
                    metadata?: components["schemas"]["Anon_f27cb44c32f6"];
                };
            };
        };
        responses: {
            /** @description Created plan */
            201: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Plan"];
                };
            };
            /** @description Error response */
            default: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
        };
    };
    getPlan: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                planId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Plan detail */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Plan"];
                };
            };
            /** @description Error response */
            default: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
        };
    };
    deletePlan: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                planId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Plan deleted */
            204: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
            /** @description Error response */
            default: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
        };
    };
    updatePlan: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                planId: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
                    name: components["schemas"]["Anon_4c26b3baab05"];
                    handle: components["schemas"]["Anon_af12d548dbee"];
                    tier_position?: components["schemas"]["Anon_2aa59aec1f23"];
                    sort_order?: components["schemas"]["Anon_f95d5b2e4f52"];
                    visibility?: components["schemas"]["Anon_a5e31586a542"];
                    metadata?: components["schemas"]["Anon_f27cb44c32f6"];
                };
            };
        };
        responses: {
            /** @description Updated plan */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Plan"];
                };
            };
            /** @description Error response */
            default: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
        };
    };
    reorderPlans: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    ids: string[];
                };
            };
        };
        responses: {
            /** @description Reordered */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
        };
    };
    listPlanVariations: {
        parameters: {
            query?: {
                page?: components["schemas"]["Anon_9370e83b9cfe"];
                per_page?: components["schemas"]["Anon_7a97c926accf"];
                sort?: components["schemas"]["Anon_00404e686415"];
                order?: components["schemas"]["Anon_46b90b81d0d1"];
                include_deleted?: components["schemas"]["Anon_f56777819c8b"];
            };
            header?: never;
            path: {
                planId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Plan variations */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        items: components["schemas"]["PlanVariation"][];
                    };
                };
            };
        };
    };
    createPlanVariation: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                planId: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
                    plan_id: components["schemas"]["Anon_57796118d046"];
                    billing_period: components["schemas"]["Anon_129e203b1449"];
                    segment_id?: components["schemas"]["Anon_f7fb9744a6e4_1"];
                    price_amount: components["schemas"]["Anon_7ab7b70b014d"];
                    currency?: components["schemas"]["Anon_86ff5762cd58"];
                    pricing_model: components["schemas"]["Anon_1b09b93e2f83"];
                    visibility?: components["schemas"]["Anon_a5e31586a542_1"];
                    stripe_price_id?: components["schemas"]["Anon_96f9066c2fdc"];
                    price_source?: components["schemas"]["Anon_b5714cb1e73b"];
                };
            };
        };
        responses: {
            /** @description Created plan variation */
            201: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["PlanVariation"];
                };
            };
        };
    };
    getPlanVariation: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                variationId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Plan variation detail */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["PlanVariation"];
                };
            };
        };
    };
    deletePlanVariation: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                variationId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Plan variation deleted */
            204: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
        };
    };
    updatePlanVariation: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                variationId: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
                    plan_id: components["schemas"]["Anon_57796118d046"];
                    billing_period: components["schemas"]["Anon_129e203b1449"];
                    segment_id?: components["schemas"]["Anon_f7fb9744a6e4_1"];
                    price_amount: components["schemas"]["Anon_7ab7b70b014d"];
                    currency?: components["schemas"]["Anon_86ff5762cd58"];
                    pricing_model: components["schemas"]["Anon_1b09b93e2f83"];
                    visibility?: components["schemas"]["Anon_a5e31586a542_1"];
                    stripe_price_id?: components["schemas"]["Anon_96f9066c2fdc"];
                    price_source?: components["schemas"]["Anon_b5714cb1e73b"];
                };
            };
        };
        responses: {
            /** @description Updated plan variation */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["PlanVariation"];
                };
            };
        };
    };
    listAddOns: {
        parameters: {
            query?: {
                page?: components["schemas"]["Anon_9370e83b9cfe"];
                per_page?: components["schemas"]["Anon_7a97c926accf"];
                sort?: components["schemas"]["Anon_00404e686415"];
                order?: components["schemas"]["Anon_46b90b81d0d1"];
                include_deleted?: components["schemas"]["Anon_f56777819c8b"];
            };
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Add-on list */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        items: components["schemas"]["AddOn"][];
                    };
                };
            };
        };
    };
    createAddOn: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
                    name: components["schemas"]["Anon_4c26b3baab05_1"];
                    handle: components["schemas"]["Anon_af12d548dbee_1"];
                    sort_order?: components["schemas"]["Anon_f95d5b2e4f52_1"];
                    visibility?: components["schemas"]["Anon_a5e31586a542_2"];
                    metadata?: components["schemas"]["Anon_f27cb44c32f6_1"];
                };
            };
        };
        responses: {
            /** @description Created add-on */
            201: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["AddOn"];
                };
            };
        };
    };
    getAddOn: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                addonId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Add-on detail */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["AddOn"];
                };
            };
        };
    };
    deleteAddOn: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                addonId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Add-on deleted */
            204: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
        };
    };
    updateAddOn: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                addonId: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
                    name: components["schemas"]["Anon_4c26b3baab05_1"];
                    handle: components["schemas"]["Anon_af12d548dbee_1"];
                    sort_order?: components["schemas"]["Anon_f95d5b2e4f52_1"];
                    visibility?: components["schemas"]["Anon_a5e31586a542_2"];
                    metadata?: components["schemas"]["Anon_f27cb44c32f6_1"];
                };
            };
        };
        responses: {
            /** @description Updated add-on */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["AddOn"];
                };
            };
        };
    };
    listAddOnVariations: {
        parameters: {
            query?: {
                page?: components["schemas"]["Anon_9370e83b9cfe"];
                per_page?: components["schemas"]["Anon_7a97c926accf"];
                sort?: components["schemas"]["Anon_00404e686415"];
                order?: components["schemas"]["Anon_46b90b81d0d1"];
                include_deleted?: components["schemas"]["Anon_f56777819c8b"];
            };
            header?: never;
            path: {
                addonId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Add-on variations */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        items: components["schemas"]["AddOnVariation"][];
                    };
                };
            };
        };
    };
    createAddOnVariation: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                addonId: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
                    addon_id: components["schemas"]["Anon_57796118d046_1"];
                    billing_period: components["schemas"]["Anon_129e203b1449_1"];
                    segment_id?: components["schemas"]["Anon_f7fb9744a6e4_2"];
                    price_amount: components["schemas"]["Anon_7ab7b70b014d_1"];
                    currency?: components["schemas"]["Anon_86ff5762cd58_1"];
                    pricing_model: components["schemas"]["Anon_1b09b93e2f83_1"];
                    visibility?: components["schemas"]["Anon_a5e31586a542_3"];
                    stripe_price_id?: components["schemas"]["Anon_96f9066c2fdc_1"];
                    price_source?: components["schemas"]["Anon_43943d0e9ae5"];
                };
            };
        };
        responses: {
            /** @description Created variation */
            201: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["AddOnVariation"];
                };
            };
        };
    };
    getAddOnVariation: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                variationId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Add-on variation detail */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["AddOnVariation"];
                };
            };
        };
    };
    deleteAddOnVariation: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                variationId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Variation deleted */
            204: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
        };
    };
    updateAddOnVariation: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                variationId: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
                    addon_id: components["schemas"]["Anon_57796118d046_1"];
                    billing_period: components["schemas"]["Anon_129e203b1449_1"];
                    segment_id?: components["schemas"]["Anon_f7fb9744a6e4_2"];
                    price_amount: components["schemas"]["Anon_7ab7b70b014d_1"];
                    currency?: components["schemas"]["Anon_86ff5762cd58_1"];
                    pricing_model: components["schemas"]["Anon_1b09b93e2f83_1"];
                    visibility?: components["schemas"]["Anon_a5e31586a542_3"];
                    stripe_price_id?: components["schemas"]["Anon_96f9066c2fdc_1"];
                    price_source?: components["schemas"]["Anon_43943d0e9ae5"];
                };
            };
        };
        responses: {
            /** @description Updated variation */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["AddOnVariation"];
                };
            };
        };
    };
    listStripePrices: {
        parameters: {
            query?: {
                page?: components["schemas"]["Anon_9370e83b9cfe"];
                per_page?: components["schemas"]["Anon_7a97c926accf"];
                sort?: components["schemas"]["Anon_00404e686415"];
                order?: components["schemas"]["Anon_46b90b81d0d1"];
                include_deleted?: components["schemas"]["Anon_f56777819c8b"];
            };
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Stripe price list */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        items: components["schemas"]["StripePrice"][];
                    };
                };
            };
        };
    };
    createStripePrice: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    stripe_price_id: components["schemas"]["Anon_57796118d046_2"];
                    stripe_product_id: components["schemas"]["Anon_57796118d046_3"];
                    billing_period: components["schemas"]["Anon_cf08caa6d850"];
                    unit_amount_cents?: components["schemas"]["Anon_79391150fda1"];
                    currency?: components["schemas"]["Anon_86ff5762cd58_2"];
                    pricing_model: components["schemas"]["Anon_1b09b93e2f83_2"];
                    nickname?: components["schemas"]["Anon_f7fb9744a6e4_3"];
                    is_mock?: components["schemas"]["Anon_062d958a93c4"];
                    last_updated_from_stripe?: components["schemas"]["Anon_711dc9708535"];
                };
            };
        };
        responses: {
            /** @description Created Stripe price */
            201: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["StripePrice"];
                };
            };
        };
    };
    getStripePrice: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                id: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Stripe price detail */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["StripePrice"];
                };
            };
        };
    };
    deleteStripePrice: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                id: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Stripe price deleted */
            204: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
        };
    };
    updateStripePrice: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                id: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    stripe_price_id: components["schemas"]["Anon_57796118d046_2"];
                    stripe_product_id: components["schemas"]["Anon_57796118d046_3"];
                    billing_period: components["schemas"]["Anon_cf08caa6d850"];
                    unit_amount_cents?: components["schemas"]["Anon_79391150fda1"];
                    currency?: components["schemas"]["Anon_86ff5762cd58_2"];
                    pricing_model: components["schemas"]["Anon_1b09b93e2f83_2"];
                    nickname?: components["schemas"]["Anon_f7fb9744a6e4_3"];
                    is_mock?: components["schemas"]["Anon_062d958a93c4"];
                    last_updated_from_stripe?: components["schemas"]["Anon_711dc9708535"];
                };
            };
        };
        responses: {
            /** @description Updated Stripe price */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["StripePrice"];
                };
            };
        };
    };
    listEntitlements: {
        parameters: {
            query?: {
                page?: components["schemas"]["Anon_9370e83b9cfe"];
                per_page?: components["schemas"]["Anon_7a97c926accf"];
                sort?: components["schemas"]["Anon_00404e686415"];
                order?: components["schemas"]["Anon_46b90b81d0d1"];
                include_deleted?: components["schemas"]["Anon_f56777819c8b"];
            };
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Entitlement list */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        items: components["schemas"]["Entitlement"][];
                    };
                };
            };
        };
    };
    createEntitlement: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
                    name: components["schemas"]["Anon_4c26b3baab05_2"];
                    handle: components["schemas"]["Anon_af12d548dbee_2"];
                    customer_facing_description?: components["schemas"]["Anon_7e1c99abdd77"];
                    type: components["schemas"]["Anon_467a283cb3f8"];
                    unit?: components["schemas"]["Anon_409d6333b38e"];
                    period_scope?: components["schemas"]["Anon_2923895ad8e0"];
                    allocation?: components["schemas"]["Anon_a7c491664ac5"];
                    tier_definitions?: components["schemas"]["Anon_09599392a4ee"];
                    sort_order?: components["schemas"]["Anon_f95d5b2e4f52_2"];
                    metadata?: components["schemas"]["Anon_f27cb44c32f6_2"];
                };
            };
        };
        responses: {
            /** @description Created */
            201: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Entitlement"];
                };
            };
        };
    };
    getEntitlement: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                entitlementId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Entitlement detail */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Entitlement"];
                };
            };
        };
    };
    deleteEntitlement: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                entitlementId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Deleted */
            204: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
            /** @description Error */
            default: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
        };
    };
    updateEntitlement: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                entitlementId: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
                    name: components["schemas"]["Anon_4c26b3baab05_2"];
                    handle: components["schemas"]["Anon_af12d548dbee_2"];
                    customer_facing_description?: components["schemas"]["Anon_7e1c99abdd77"];
                    type: components["schemas"]["Anon_467a283cb3f8"];
                    unit?: components["schemas"]["Anon_409d6333b38e"];
                    period_scope?: components["schemas"]["Anon_2923895ad8e0"];
                    allocation?: components["schemas"]["Anon_a7c491664ac5"];
                    tier_definitions?: components["schemas"]["Anon_09599392a4ee"];
                    sort_order?: components["schemas"]["Anon_f95d5b2e4f52_2"];
                    metadata?: components["schemas"]["Anon_f27cb44c32f6_2"];
                };
            };
        };
        responses: {
            /** @description Updated */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Entitlement"];
                };
            };
        };
    };
    listEntitlementRules: {
        parameters: {
            query?: {
                page?: components["schemas"]["Anon_9370e83b9cfe"];
                per_page?: components["schemas"]["Anon_7a97c926accf"];
                sort?: components["schemas"]["Anon_00404e686415"];
                order?: components["schemas"]["Anon_46b90b81d0d1"];
                include_deleted?: components["schemas"]["Anon_f56777819c8b"];
            };
            header?: never;
            path: {
                entitlementId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Rule list */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        items: components["schemas"]["EntitlementRule"][];
                    };
                };
            };
        };
    };
    createEntitlementRule: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                entitlementId: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
                    entitlement_id: components["schemas"]["Anon_57796118d046_4"];
                    targets: components["schemas"]["Anon_49bb4dc12260"];
                    segment_ids?: components["schemas"]["Anon_f8dbfffc0ce2"];
                    visibility?: components["schemas"]["Anon_b26f420c5d82"];
                    objective?: components["schemas"]["Anon_b2cdc2167b65"];
                    period_scope?: components["schemas"]["Anon_2923895ad8e0_1"];
                    instance?: components["schemas"]["Anon_409d6333b38e_1"];
                    reset_period?: components["schemas"]["Anon_49d496ef65c9"];
                    limit_value?: components["schemas"]["Anon_811366723713"];
                    enforcement?: components["schemas"]["Anon_25c82cf56487"];
                    warning_threshold_percent?: components["schemas"]["Anon_82a173df2abc"];
                    overage_price_ref?: components["schemas"]["Anon_96f9066c2fdc_2"];
                    grace_period_hours?: components["schemas"]["Anon_7e1e37293611"];
                    tier_value?: components["schemas"]["Anon_96f9066c2fdc_3"];
                    rate_value?: components["schemas"]["Anon_9c7f41b09bde"];
                    initial_grant?: components["schemas"]["Anon_9c7f41b09bde_1"];
                    allowance_value?: components["schemas"]["Anon_811366723713_1"];
                    rollover_enabled?: components["schemas"]["Anon_fb9ddeea992e"];
                    max_balance?: components["schemas"]["Anon_d84a41962ed1"];
                    seat_type_id?: components["schemas"]["Anon_96f9066c2fdc_4"];
                    included_count?: components["schemas"]["Anon_5d154a3d9b9e"];
                    at_limit_behavior?: components["schemas"]["Anon_28e076aa98f9"];
                    stripe_metered_price_id?: components["schemas"]["Anon_96f9066c2fdc_5"];
                    enabled?: components["schemas"]["Anon_fb9ddeea992e_1"];
                    allocation?: components["schemas"]["Anon_a7c491664ac5_1"];
                    max_seats?: components["schemas"]["Anon_0dc47bdde23b"];
                    amount_cents?: components["schemas"]["Anon_18968514c96d"];
                    currency?: components["schemas"]["Anon_96f9066c2fdc_6"];
                };
            };
        };
        responses: {
            /** @description Created */
            201: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["EntitlementRuleWriteResponse"];
                };
            };
        };
    };
    deleteEntitlementRule: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                ruleId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Deleted */
            204: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
        };
    };
    updateEntitlementRule: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                ruleId: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
                    entitlement_id: components["schemas"]["Anon_57796118d046_4"];
                    targets: components["schemas"]["Anon_49bb4dc12260"];
                    segment_ids?: components["schemas"]["Anon_f8dbfffc0ce2"];
                    visibility?: components["schemas"]["Anon_b26f420c5d82"];
                    objective?: components["schemas"]["Anon_b2cdc2167b65"];
                    period_scope?: components["schemas"]["Anon_2923895ad8e0_1"];
                    instance?: components["schemas"]["Anon_409d6333b38e_1"];
                    reset_period?: components["schemas"]["Anon_49d496ef65c9"];
                    limit_value?: components["schemas"]["Anon_811366723713"];
                    enforcement?: components["schemas"]["Anon_25c82cf56487"];
                    warning_threshold_percent?: components["schemas"]["Anon_82a173df2abc"];
                    overage_price_ref?: components["schemas"]["Anon_96f9066c2fdc_2"];
                    grace_period_hours?: components["schemas"]["Anon_7e1e37293611"];
                    tier_value?: components["schemas"]["Anon_96f9066c2fdc_3"];
                    rate_value?: components["schemas"]["Anon_9c7f41b09bde"];
                    initial_grant?: components["schemas"]["Anon_9c7f41b09bde_1"];
                    allowance_value?: components["schemas"]["Anon_811366723713_1"];
                    rollover_enabled?: components["schemas"]["Anon_fb9ddeea992e"];
                    max_balance?: components["schemas"]["Anon_d84a41962ed1"];
                    seat_type_id?: components["schemas"]["Anon_96f9066c2fdc_4"];
                    included_count?: components["schemas"]["Anon_5d154a3d9b9e"];
                    at_limit_behavior?: components["schemas"]["Anon_28e076aa98f9"];
                    stripe_metered_price_id?: components["schemas"]["Anon_96f9066c2fdc_5"];
                    enabled?: components["schemas"]["Anon_fb9ddeea992e_1"];
                    allocation?: components["schemas"]["Anon_a7c491664ac5_1"];
                    max_seats?: components["schemas"]["Anon_0dc47bdde23b"];
                    amount_cents?: components["schemas"]["Anon_18968514c96d"];
                    currency?: components["schemas"]["Anon_96f9066c2fdc_6"];
                };
            };
        };
        responses: {
            /** @description Updated */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["EntitlementRuleWriteResponse"];
                };
            };
        };
    };
    duplicateEntitlementRule: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                ruleId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Duplicated */
            201: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["EntitlementRuleWriteResponse"];
                };
            };
        };
    };
    listEntitlementRuleVariants: {
        parameters: {
            query?: {
                page?: components["schemas"]["Anon_9370e83b9cfe"];
                per_page?: components["schemas"]["Anon_7a97c926accf"];
                sort?: components["schemas"]["Anon_00404e686415"];
                order?: components["schemas"]["Anon_46b90b81d0d1"];
                include_deleted?: components["schemas"]["Anon_f56777819c8b"];
            };
            header?: never;
            path: {
                ruleId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Variant list */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        items: components["schemas"]["EntitlementRuleVariant"][];
                    };
                };
            };
        };
    };
    createEntitlementRuleVariant: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                ruleId: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
                    rule_id: string;
                    experiment_id: string;
                    variant_name: string;
                    /** @default false */
                    is_control?: components["schemas"]["Anon_7cb541e84f22_3"];
                    /** @default {} */
                    override_fields?: components["schemas"]["Anon_c65c1fbd5acf_1"];
                };
            };
        };
        responses: {
            /** @description Created */
            201: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["EntitlementRuleVariant"];
                };
            };
        };
    };
    listPlacements: {
        parameters: {
            query?: {
                page?: components["schemas"]["Anon_9370e83b9cfe"];
                per_page?: components["schemas"]["Anon_7a97c926accf"];
                sort?: components["schemas"]["Anon_00404e686415"];
                order?: components["schemas"]["Anon_46b90b81d0d1"];
                include_deleted?: components["schemas"]["Anon_f56777819c8b"];
            };
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Placement list */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        items: components["schemas"]["Placement"][];
                    };
                };
            };
        };
    };
    createPlacement: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
                    name: components["schemas"]["Anon_4c26b3baab05_3"];
                    handle: components["schemas"]["Anon_af12d548dbee_3"];
                    description?: components["schemas"]["Anon_ee9224780226"];
                    category: components["schemas"]["Anon_843e92dde3b4"];
                    objective?: components["schemas"]["Anon_b2cdc2167b65_1"];
                    drag_order_in_category?: components["schemas"]["Anon_f95d5b2e4f52_3"];
                    surface_slot_id?: components["schemas"]["Anon_96f9066c2fdc_7"];
                    entitlement_id?: components["schemas"]["Anon_96f9066c2fdc_8"];
                    tier_threshold?: components["schemas"]["Anon_96f9066c2fdc_9"];
                    threshold_percent?: components["schemas"]["Anon_82a173df2abc_1"];
                    trial_type?: components["schemas"]["Anon_66461f6ab64d"];
                    trigger_type?: components["schemas"]["Anon_96f9066c2fdc_10"];
                    trial_progress_percent?: components["schemas"]["Anon_b3e59c48ae6e"];
                    days_before_end?: components["schemas"]["Anon_7e1e37293611_1"];
                    qualifier?: components["schemas"]["Anon_a8be2b5da5e8"];
                    activation_window_start?: components["schemas"]["Anon_e077e17ea982"];
                    activation_window_end?: components["schemas"]["Anon_e077e17ea982_1"];
                    metadata?: components["schemas"]["Anon_f27cb44c32f6_3"];
                };
            };
        };
        responses: {
            /** @description Created */
            201: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["PlacementWriteResponse"];
                };
            };
        };
    };
    getPlacement: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                placementId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Placement detail */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Placement"];
                };
            };
        };
    };
    deletePlacement: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                placementId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Deleted */
            204: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
            /** @description Error */
            default: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
        };
    };
    updatePlacement: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                placementId: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
                    name: components["schemas"]["Anon_4c26b3baab05_3"];
                    handle: components["schemas"]["Anon_af12d548dbee_3"];
                    description?: components["schemas"]["Anon_ee9224780226"];
                    category: components["schemas"]["Anon_843e92dde3b4"];
                    objective?: components["schemas"]["Anon_b2cdc2167b65_1"];
                    drag_order_in_category?: components["schemas"]["Anon_f95d5b2e4f52_3"];
                    surface_slot_id?: components["schemas"]["Anon_96f9066c2fdc_7"];
                    entitlement_id?: components["schemas"]["Anon_96f9066c2fdc_8"];
                    tier_threshold?: components["schemas"]["Anon_96f9066c2fdc_9"];
                    threshold_percent?: components["schemas"]["Anon_82a173df2abc_1"];
                    trial_type?: components["schemas"]["Anon_66461f6ab64d"];
                    trigger_type?: components["schemas"]["Anon_96f9066c2fdc_10"];
                    trial_progress_percent?: components["schemas"]["Anon_b3e59c48ae6e"];
                    days_before_end?: components["schemas"]["Anon_7e1e37293611_1"];
                    qualifier?: components["schemas"]["Anon_a8be2b5da5e8"];
                    activation_window_start?: components["schemas"]["Anon_e077e17ea982"];
                    activation_window_end?: components["schemas"]["Anon_e077e17ea982_1"];
                    metadata?: components["schemas"]["Anon_f27cb44c32f6_3"];
                };
            };
        };
        responses: {
            /** @description Updated */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["PlacementWriteResponse"];
                };
            };
        };
    };
    duplicatePlacement: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                placementId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Duplicated */
            201: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Placement"];
                };
            };
        };
    };
    reorderPlacements: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    category: components["schemas"]["PlacementCategory"];
                    ids: string[];
                };
            };
        };
        responses: {
            /** @description Reordered */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
        };
    };
    listPlacementPayloads: {
        parameters: {
            query?: {
                page?: components["schemas"]["Anon_9370e83b9cfe"];
                per_page?: components["schemas"]["Anon_7a97c926accf"];
                sort?: components["schemas"]["Anon_00404e686415"];
                order?: components["schemas"]["Anon_46b90b81d0d1"];
                include_deleted?: components["schemas"]["Anon_f56777819c8b"];
            };
            header?: never;
            path: {
                placementId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Payload list */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        items: components["schemas"]["PlacementPayload"][];
                    };
                };
            };
        };
    };
    createPlacementPayload: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                placementId: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
                    placement_id: components["schemas"]["Anon_57796118d046_6"];
                    drag_order?: components["schemas"]["Anon_f95d5b2e4f52_4"];
                    target_plan_ids?: components["schemas"]["Anon_f8dbfffc0ce2_1"];
                    target_plan_billing_cadences?: components["schemas"]["Anon_f8dbfffc0ce2_2"];
                    target_segments?: components["schemas"]["Anon_f8dbfffc0ce2_3"];
                    surface_slot_ids?: components["schemas"]["Anon_f8dbfffc0ce2_4"];
                    surface_template_id: components["schemas"]["Anon_57796118d046_7"];
                    content_fields?: components["schemas"]["Anon_5142f8473790"];
                    cta_list?: components["schemas"]["Anon_52685bb19869"];
                    max_per_period?: components["schemas"]["Anon_45e0e0d4a0da"];
                    max_period_unit?: components["schemas"]["Anon_6ab4ae68d10d"];
                    cooldown_after_dismiss_days?: components["schemas"]["Anon_3380fd32e874"];
                    remind_later_minutes?: components["schemas"]["Anon_45e0e0d4a0da_1"];
                    recommendation_strategy?: components["schemas"]["Anon_beae1a1b3acf"];
                    recommendation_plan_override?: components["schemas"]["Anon_96f9066c2fdc_11"];
                };
            };
        };
        responses: {
            /** @description Created */
            201: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["PlacementPayload"];
                };
            };
        };
    };
    deletePlacementPayload: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                payloadId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Deleted */
            204: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
        };
    };
    updatePlacementPayload: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                payloadId: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    playbook_version_id?: components["schemas"]["Anon_f7fb9744a6e4"];
                    placement_id: components["schemas"]["Anon_57796118d046_6"];
                    drag_order?: components["schemas"]["Anon_f95d5b2e4f52_4"];
                    target_plan_ids?: components["schemas"]["Anon_f8dbfffc0ce2_1"];
                    target_plan_billing_cadences?: components["schemas"]["Anon_f8dbfffc0ce2_2"];
                    target_segments?: components["schemas"]["Anon_f8dbfffc0ce2_3"];
                    surface_slot_ids?: components["schemas"]["Anon_f8dbfffc0ce2_4"];
                    surface_template_id: components["schemas"]["Anon_57796118d046_7"];
                    content_fields?: components["schemas"]["Anon_5142f8473790"];
                    cta_list?: components["schemas"]["Anon_52685bb19869"];
                    max_per_period?: components["schemas"]["Anon_45e0e0d4a0da"];
                    max_period_unit?: components["schemas"]["Anon_6ab4ae68d10d"];
                    cooldown_after_dismiss_days?: components["schemas"]["Anon_3380fd32e874"];
                    remind_later_minutes?: components["schemas"]["Anon_45e0e0d4a0da_1"];
                    recommendation_strategy?: components["schemas"]["Anon_beae1a1b3acf"];
                    recommendation_plan_override?: components["schemas"]["Anon_96f9066c2fdc_11"];
                };
            };
        };
        responses: {
            /** @description Updated */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["PlacementPayload"];
                };
            };
        };
    };
    listSurfaceSlots: {
        parameters: {
            query?: {
                page?: components["schemas"]["Anon_9370e83b9cfe"];
                per_page?: components["schemas"]["Anon_7a97c926accf"];
                sort?: components["schemas"]["Anon_00404e686415"];
                order?: components["schemas"]["Anon_46b90b81d0d1"];
                include_deleted?: components["schemas"]["Anon_f56777819c8b"];
            };
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Surface slot list */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        items: components["schemas"]["SurfaceSlot"][];
                    };
                };
            };
        };
    };
    listSurfaceTemplates: {
        parameters: {
            query?: {
                page?: components["schemas"]["Anon_9370e83b9cfe"];
                per_page?: components["schemas"]["Anon_7a97c926accf"];
                sort?: components["schemas"]["Anon_00404e686415"];
                order?: components["schemas"]["Anon_46b90b81d0d1"];
                include_deleted?: components["schemas"]["Anon_f56777819c8b"];
            };
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Template list */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        items: components["schemas"]["SurfaceTemplateOutput"][];
                    };
                };
            };
        };
    };
    createSurfaceTemplate: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": components["schemas"]["SurfaceTemplate"];
            };
        };
        responses: {
            /** @description Created */
            201: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["SurfaceTemplateOutput"];
                };
            };
        };
    };
    listMessageBlocks: {
        parameters: {
            query?: {
                page?: components["schemas"]["Anon_9370e83b9cfe"];
                per_page?: components["schemas"]["Anon_7a97c926accf"];
                sort?: components["schemas"]["Anon_00404e686415"];
                order?: components["schemas"]["Anon_46b90b81d0d1"];
                include_deleted?: components["schemas"]["Anon_f56777819c8b"];
            };
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Message block list */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        items: components["schemas"]["MessageBlockRecordOutput"][];
                    };
                };
            };
        };
    };
    createMessageBlock: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": components["schemas"]["MessageBlockRecord"];
            };
        };
        responses: {
            /** @description Created */
            201: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["MessageBlockRecordOutput"];
                };
            };
        };
    };
    listCtaPaths: {
        parameters: {
            query?: {
                page?: components["schemas"]["Anon_9370e83b9cfe"];
                per_page?: components["schemas"]["Anon_7a97c926accf"];
                sort?: components["schemas"]["Anon_00404e686415"];
                order?: components["schemas"]["Anon_46b90b81d0d1"];
                include_deleted?: components["schemas"]["Anon_f56777819c8b"];
            };
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description CTA path list */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        items: components["schemas"]["CtaPathOutput"][];
                    };
                };
            };
        };
    };
    createCtaPath: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": components["schemas"]["CtaPath"];
            };
        };
        responses: {
            /** @description Created */
            201: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["CtaPathOutput"];
                };
            };
        };
    };
    ingestTrackEvents: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": components["schemas"]["TrackIngestBatch"];
            };
        };
        responses: {
            /** @description Events accepted for processing */
            202: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["null"];
                };
            };
            /** @description Error response */
            default: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
        };
    };
    ingestSdkMeta: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": components["schemas"]["SdkMetaIngestBatch"];
            };
        };
        responses: {
            /** @description Telemetry accepted for processing */
            202: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["null"];
                };
            };
            /** @description Rate limit exceeded */
            429: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
            /** @description Error response */
            default: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
        };
    };
    recordTreatmentInteraction: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": components["schemas"]["TreatmentInteractionRequest"];
            };
        };
        responses: {
            /** @description Interaction accepted */
            202: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["null"];
                };
            };
            /** @description Error response */
            default: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
        };
    };
    upsertServerUserContext: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": components["schemas"]["ServerUserContextUpsert"];
            };
        };
        responses: {
            /** @description The resulting server-written state */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["ServerUserContextAssignment"];
                };
            };
            /** @description Malformed body, an empty write, or a key outside user_id / seat_type_handle / builtin_dimensions / override */
            400: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
            /** @description Missing or invalid credential */
            401: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
            /** @description Credential is not a server API token */
            403: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
            /** @description seat_type_handle is not one of the tenant's current seat types, or a builtin_dimensions value is outside its vocabulary */
            422: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
            /** @description Error response */
            default: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
        };
    };
    getServerUserBuiltinDimensions: {
        parameters: {
            query?: never;
            header?: never;
            path: {
                userId: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description The user's server-resolved built-in dimensions */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["ServerUserBuiltinDimensions"];
                };
            };
            /** @description Malformed user id */
            400: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
            /** @description Missing or invalid credential */
            401: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
            /** @description Credential is not a server API token */
            403: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
            /** @description Error response */
            default: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Anon_ed3fcc71dea7"];
                };
            };
        };
    };
}

/**
 * RevTurbine API Client — typed client for the RevTurbine API.
 *
 * Generated from `@revt-eng/schema` external OpenAPI spec via `openapi-typescript`.
 * Uses `openapi-fetch` for type-safe requests with auth injection.
 *
 * @example
 * ```ts
 * const client = createRevTurbineApiClient({
 *   baseUrl: 'https://edge.example.com',
 *   token: process.env.REVTURBINE_SERVER_KEY, // rtk_… (a server key; keep it server-side)
 *   tenantId: 'tenant_abc',
 * });
 *
 * const { data } = await client.GET('/api/plans');
 * ```
 */

interface RevTurbineApiClientConfig {
    /** Base URL of the RevTurbine API. */
    baseUrl: string;
    /** API token for authentication. */
    token?: string;
    /** Tenant ID to include in requests. */
    tenantId?: string;
    /** Additional headers to include in every request. */
    headers?: Record<string, string>;
}
type RevTurbineApiClient = Client<paths>;
/**
 * Create a configured RevTurbine API client instance.
 *
 * @param config - Client configuration.
 * @returns Typed API client with GET, POST, PUT, PATCH, DELETE methods.
 */
declare function createRevTurbineApiClient(config: RevTurbineApiClientConfig): RevTurbineApiClient;
/** Error thrown when an API request fails. */
declare class ApiError extends Error {
    readonly status: number;
    constructor(status: number, message: string);
}

/**
 * Slot route computation (BL-0207, ruling D-30).
 *
 * "The route of a slot should be calculated by react and emitted as part of
 * its events. Slot discovery should pick this up and be able to persist that
 * route." This module is the pure half of that: it decides what a route IS.
 * The React layer (`usePlacement` + `<RevTurbineRoute>`) decides WHEN and
 * from WHERE, and the controller stamps the result onto every slot lifecycle
 * event as `route` (scaffold `slotContextBase.route`).
 *
 * A route is a PATH, never a URL:
 *   - no origin, no query string, no fragment — query strings are where
 *     tokens, emails and search terms live, so they never reach the wire;
 *   - the framework route PATTERN when the host supplies one
 *     (`/projects/[projectId]`, `/billing/:accountId`) — kept verbatim;
 *   - otherwise the concrete `location.pathname` with identifier-like
 *     segments (numbers, UUIDs, long hex, opaque tokens, prefixed ids,
 *     email-shaped values) templated to `:id`, so neither PII nor
 *     per-entity cardinality reaches discovery.
 *
 * Pure and framework-free: exported from the headless entry so a non-React
 * host (or a Next.js app computing its own pattern) can reuse it.
 */
/** Upper bound on an emitted route — matches scaffold `SURFACE_SLOT_ROUTE_MAX_LENGTH`. */
declare const SLOT_ROUTE_MAX_LENGTH = 512;
/** The placeholder an identifier-like path segment is templated to. */
declare const SLOT_ROUTE_ID_PLACEHOLDER = ":id";
/**
 * `true` when a single path segment looks like an identifier or personal data
 * rather than a stable route name. Exported for tests and custom resolvers.
 */
declare function isIdentifierLikeSegment(segment: string): boolean;
/**
 * Normalize a path, URL or route pattern into a slot route.
 *
 * Strips any origin, query string and fragment; collapses duplicate slashes
 * and a trailing slash; keeps route-pattern segments (`[id]`, `:id`)
 * verbatim; templates identifier-like segments to `:id`; bounds the result to
 * {@link SLOT_ROUTE_MAX_LENGTH}. Returns `null` for empty or non-string input.
 *
 * @example
 * ```ts
 * normalizeSlotRoute('https://app.example.com/accounts/4821/billing?tab=x#top');
 * // → '/accounts/:id/billing'
 * normalizeSlotRoute('/projects/[projectId]');
 * // → '/projects/[projectId]'
 * ```
 */
declare function normalizeSlotRoute(input: string | null | undefined): string | null;
/**
 * Framework route params, as Next.js `useParams()` returns them (a catch-all
 * param is an array of segments).
 */
type SlotRouteParams = Readonly<Record<string, string | readonly string[] | undefined>>;
/**
 * Rebuild the framework route PATTERN from a concrete pathname and the
 * framework's route params — the Next.js App Router recipe, without the SDK
 * importing `next/navigation`:
 *
 * ```tsx
 * 'use client';
 * import { useParams, usePathname } from 'next/navigation';
 * import { RevTurbineRoute, routePatternFromParams } from '@revturbine/sdk';
 *
 * export function RouteBoundary({ children }: { children: React.ReactNode }) {
 *   const route = routePatternFromParams(usePathname(), useParams());
 *   return <RevTurbineRoute route={route}>{children}</RevTurbineRoute>;
 * }
 * ```
 *
 * `/projects/p_42/settings` with `{ projectId: 'p_42' }` becomes
 * `/projects/[projectId]/settings`; a catch-all `{ slug: ['a', 'b'] }`
 * becomes `[...slug]`. The result is then normalized like any other route,
 * so a segment the params did not name is still templated if it looks like
 * an identifier.
 */
declare function routePatternFromParams(pathname: string | null | undefined, params: SlotRouteParams | null | undefined): string | null;
/**
 * The browser's current route — `window.location.pathname`, normalized.
 * `null` outside a browser (SSR, server runtimes, workers without `location`).
 */
declare function currentBrowserRoute(): string | null;

/**
 * BrowserRuntime — browser-optimized composition of core subsystems that
 * persists interaction state, caps, and impression history to localStorage.
 *
 * Drop-in replacement for `LocalRuntime` in browser environments. Falls
 * back to in-memory storage when `localStorage` is unavailable (e.g.
 * sandboxed iframes, incognito with quota errors).
 *
 * @example
 * ```ts
 * import { BrowserRuntime } from '@revturbine/sdk';
 * import { createStaticProviders } from '@revt-eng/core';
 *
 * const runtime = new BrowserRuntime({
 *   tenantId: 'tenant_abc',
 *   userId: 'user_123',
 *   playbook: myPlaybook,
 *   providers: createStaticProviders({ config: myPlaybook, planHandle: 'pro' }),
 * });
 *
 * // State survives page reloads — impressions, dismissals, and caps
 * // are persisted to localStorage automatically.
 * await runtime.hydrate();
 *
 * const decision = await runtime.getPlacementDecision({
 *   placementId: 'slot_1',
 *   userId: 'user_123',
 * });
 * ```
 */

type BrowserRuntimeOptionsBase = Omit<LocalRuntimeOptions, 'storage' | 'impressionStore' | 'exportedConfig' | 'playbook'> & {
    /** Target fallback for legacy configs. Omitted or blank resolves to `production`. */
    environmentId?: string;
    /**
     * Override the storage backend. When omitted, `localStorage` is used
     * in the browser, falling back to in-memory storage otherwise.
     */
    storage?: RevTurbineStorage;
    /**
     * Maximum number of impression records to keep per user.
     * Older records are evicted when the limit is reached.
     * Default: 500.
     */
    maxImpressionRecords?: number;
    /**
     * Automatically call `hydrate()` during construction so
     * impression caches are warm by the time the first decision is made.
     * Default: true.
     */
    autoHydrate?: boolean;
};
/**
 * Options for {@link BrowserRuntime}.
 *
 * Exactly one of `playbook` (canonical) or `exportedConfig` (deprecated) is
 * required — the union keeps that a compile-time requirement, exactly as the
 * single required `exportedConfig` property did before the rename (BL-0156).
 */
type BrowserRuntimeOptions = BrowserRuntimeOptionsBase & ({
    /** The Playbook this runtime evaluates against. */
    playbook: ConfigArtifact;
    /** @deprecated Use `playbook`. Removed in `0.13.0`. */
    exportedConfig?: ConfigArtifact;
} | {
    /** The Playbook this runtime evaluates against. */
    playbook?: ConfigArtifact;
    /**
     * @deprecated Renamed to `playbook` — `Playbook` is the canonical name
     * for the artifact (BL-0156). Still fully supported: pass either one.
     * When both are supplied `playbook` wins. Removed in `0.13.0`.
     */
    exportedConfig: ConfigArtifact;
});
declare class BrowserRuntime extends LocalRuntime {
    private readonly _hydratePromise;
    constructor(options: BrowserRuntimeOptions);
    /**
     * Wait for the auto-hydration started in the constructor to complete.
     * Safe to call multiple times — subsequent calls are no-ops.
     */
    ready(): Promise<void>;
}

/** Controls aggregation of customer-owned experiment adapters. */
interface CompositeExperimentProviderOptions {
    /** Maximum time for one adapter resolution. Set to `0` to disable. */
    timeoutMs?: number;
}
/**
 * Combine customer-owned experiment adapters behind the registry's single
 * `experiments` domain. Overlapping declared ownership is rejected for the
 * affected handles instead of allowing registration order to choose a winner.
 */
declare function createCompositeExperimentProvider(providers: readonly ExperimentAssignmentProvider[], options?: CompositeExperimentProviderOptions): ExperimentAssignmentProvider;
/**
 * Materialize one ephemeral user context from caller context and normalized
 * provider outcomes. The caller-owned object is never mutated.
 */
declare function composeEffectiveExperimentContext<TContext extends UserContextSnapshot>(callerContext: Readonly<TContext>, providerState: ExperimentProviderState | undefined, contextRevision: string): EffectiveUserContextResolution & {
    readonly userContext: Readonly<TContext>;
};

/**
 * Server-user-context provider (plan 165 TASK-4 = plan 157's "provider auto-wire"
 * follow-up).
 *
 * Surfaces the user's SERVER-KNOWN, client-safe context — fetched from
 * `GET /api/sdk/client-context` (plan 157) — into the evaluation traits bag under
 * the `traits:server` namespace, so segment/placement evaluation can match on
 * RevTurbine-authoritative signals (trial state, coarse billing) that the app
 * cannot self-assert.
 *
 * Precedence: the SDK merges `traits:<namespace>` domains into one unified traits
 * bag; app-provided traits take precedence over server traits. This provider only
 * contributes the server-authoritative signals below — it never overwrites an
 * app-set trait of the same name.
 *
 * Security (rides plan 157's client-session token model): the snapshot is fed
 * EXCLUSIVELY from the token-authenticated `GET /api/sdk/client-context` fetch —
 * authorized by the opaque `rt_client_` token the customer's backend mints (via
 * `clientSessions.create`, optionally through the hardened OIDC exchange). It is
 * never populated from app-assertable input, so an app cannot forge
 * server-authoritative signals (trial state, billing) into `traits:server`; and
 * because the token scopes the read to its own subject, one user cannot read
 * another's server context. Server-side entitlement checks remain authoritative
 * regardless of what the browser evaluates. The snapshot carries no raw PII (the
 * serve already projected the client-safe view); the transmit path applies
 * `redactPii` to trait/event payloads before they leave the browser regardless.
 */

/**
 * The client-safe, server-known signals surfaced as `traits:server` traits.
 * Sourced from the mapped `/api/sdk/client-context` response.
 */
interface ServerUserContextSnapshot {
    /** Trial signals the control plane owns. */
    trial?: {
        in_trial?: boolean;
        state?: string;
        days_remaining?: number;
    };
    /** Coarse billing-recovery signal (raw failed-payment detail never crosses the boundary). */
    payment_at_risk?: boolean;
}
/** The `traits:server` domain name — a `TraitsNamespace`. */
declare const SERVER_TRAITS_DOMAIN: "traits:server";
/**
 * A {@link TraitsProvider} keyed to `traits:server`. Auto-wired by the SDK when a
 * client-context token is configured; call {@link setSnapshot} whenever a fresh
 * server context is fetched.
 */
declare class ServerUserContextProvider implements TraitsProvider<'traits:server'> {
    readonly domain: "traits:server";
    private snapshot;
    /** Replace the server-known snapshot (called after each client-context fetch). */
    setSnapshot(snapshot: ServerUserContextSnapshot): void;
    /** Whether any server signal is currently present. */
    hasSignals(): boolean;
    /** Resolve the current `traits:server` state for evaluation. */
    resolve(): TraitsProviderState;
    private toTraits;
}

/**
 * The built-in `ExperimentAssignmentProvider` (plan 183 REQ-3b).
 *
 * Deliberately basic, and deliberately opt-in: nothing registers this for you.
 * A customer with their own experimentation tool registers an adapter that
 * reads *their* assignments instead and loses nothing — the third-party path is
 * first-class, not a fallback. The canonical Experiment owns native desired
 * allocation; external bindings declare whether their allocation is managed
 * or observed.
 */

/** One experiment's arms, and optionally how much of the population sees it. */
interface BasicBucketerExperiment {
    /**
     * Either an equal split across the listed variant handles, or explicit
     * relative weights. Weights need not sum to anything in particular — they are
     * normalized — so `{ control: 1, variant_b: 3 }` is a 25/75 split.
     *
     * A variant weighted 0 (or negative) is excluded rather than made
     * unreachable-but-present, so removing an arm and zeroing it behave the same.
     */
    variants: readonly string[] | Readonly<Record<string, number>>;
    /**
     * Fraction of subjects enrolled at all, 0..1. Default 1 (everyone).
     *
     * A subject outside it is reported as NOT ENROLLED — the experiment is simply
     * absent from the assignment map, which is distinct from being assigned to a
     * control arm. That distinction is the whole point of a holdout: control is a
     * measured arm, unenrolled is not in the experiment.
     */
    exposure?: number;
}
interface BasicBucketerOptions {
    /** Keyed by experiment handle — the canonical, version-stable identifier. */
    experiments: Readonly<Record<string, BasicBucketerExperiment>>;
    /**
     * The subject to bucket on. A function is re-read on every resolve, so a
     * later `setUserContext` takes effect; a bare string pins one subject.
     *
     * With no stable subject there is no assignment: bucketing an anonymous or
     * empty id would hand the same person a different arm on the next load and
     * silently poison the results. Absent beats wrong.
     */
    subject: string | (() => string | undefined | null);
}
/**
 * The allocation fields owned by one canonical Experiment version.
 *
 * Derived from the schema type rather than redeclared, so schema evolution is
 * visible here at compile time without making the adapter require unrelated
 * persistence fields.
 */
interface CanonicalExperimentAllocation {
    handle: Experiment['handle'];
    traffic_allocation: Experiment['traffic_allocation'];
    /** Unit represented by the stable subject identifier; defaults to `user`. */
    assignment_unit?: Experiment['assignment_unit'];
    variants: ReadonlyArray<Pick<Experiment['variants'][number], 'variant_id' | 'weight'>>;
    /**
     * Canonical experiment version — the `Experiment.sequence` this allocation
     * was taken from (plan 224, war-games spec §9.1). When present, the native
     * provider derives an {@link ExperimentAssignmentFactDeclaration} so
     * assignments emit the `experiment_assigned` assignment fact with the real
     * (handle, version) SRM join key. When absent, assignment still works but
     * no fact is emitted for this experiment — a fact with a fabricated
     * version is worse than a missing one.
     */
    sequence?: Experiment['sequence'];
}
/** One supported canonical experiment assignment unit. */
type NativeExperimentAssignmentUnit = NonNullable<Experiment['assignment_unit']>;
/** Raised before provider registration when its subject cannot serve an experiment's unit. */
declare class UnsupportedExperimentAssignmentUnitError extends Error {
    /** Experiment whose requested assignment unit cannot be served. */
    readonly experimentHandle: string;
    /** Assignment unit requested by the canonical Experiment version. */
    readonly requestedUnit: NativeExperimentAssignmentUnit;
    /** Unit represented by the provider's configured subject. */
    readonly subjectUnit: NativeExperimentAssignmentUnit;
    /** Construct an unsupported-unit launch error. */
    constructor(experimentHandle: string, requestedUnit: NativeExperimentAssignmentUnit, subjectUnit: NativeExperimentAssignmentUnit);
}
/** Options for the native assignment provider backed by Experiment versions. */
interface NativeExperimentAssignmentOptions {
    /** Canonical, versioned Experiment allocations to execute. */
    experiments: readonly CanonicalExperimentAllocation[];
    /** Stable assignment subject, re-read per resolution when supplied as a function. */
    subject: BasicBucketerOptions['subject'];
    /** Unit represented by `subject`; defaults to `user` for backward compatibility. */
    subjectUnit?: NativeExperimentAssignmentUnit;
}
/**
 * Assign one subject to one experiment, or `undefined` for not-enrolled.
 *
 * Exported for testing and for callers who want the decision without the
 * provider wrapper. Pure: same inputs always give the same arm, with no
 * storage, no clock and no randomness involved.
 */
declare function bucketSubject(subject: string, experimentHandle: string, experiment: BasicBucketerExperiment): string | undefined;
/**
 * Translate canonical fraction weights into the bucketer's ratio + exposure
 * representation.
 *
 * For weights whose positive sum is below one, the missing fraction remains
 * unenrolled: `[0.3, 0.3]` becomes ratio `0.3:0.3` at exposure `0.6`, realizing
 * 30% / 30% / 40% unassigned. If fractions are oversubscribed (sum above one),
 * they are normalized proportionally within `traffic_allocation`; this keeps
 * the conversion total for every schema-valid vector. Zero weights are
 * omitted, matching `bucketSubject()`'s established exclusion semantics.
 */
declare function adaptExperimentVersionToBucketer(experiment: CanonicalExperimentAllocation): BasicBucketerExperiment;
/**
 * Build the native assignment provider whose allocation authority is the
 * canonical Experiment version rather than duplicated SDK configuration.
 */
declare function createNativeExperimentAssignmentProvider(options: NativeExperimentAssignmentOptions): ExperimentAssignmentProvider & ExperimentAssignmentFactMetadataCarrier;
/**
 * Build the built-in bucketer. Register it explicitly to switch it on:
 *
 * ```ts
 * initRevTurbine({
 *   domainProviders: [
 *     createBasicExperimentProvider({
 *       subject: () => currentUserId,
 *       experiments: { pricing_test: { variants: ['control', 'variant_b'] } },
 *     }),
 *   ],
 * });
 * ```
 */
declare function createBasicExperimentProvider(options: BasicBucketerOptions): ExperimentAssignmentProvider;

/**
 * Analytics adapter — bridges RevTurbine SDK events to third-party analytics
 * platforms (Heap, Segment, Amplitude, Mixpanel, PostHog, custom, etc.).
 *
 * Implements the {@link EventConsumerProvider} domain provider interface so it
 * plugs into the SDK's `domainProviders` array at init time.
 *
 * @example
 * ```ts
 * import { createAnalyticsProvider, initRevTurbine } from '@revturbine/sdk';
 *
 * const analytics = createAnalyticsProvider({
 *   handler: (eventName, properties) => {
 *     window.analytics.track(eventName, properties);
 *   },
 * });
 *
 * const session = await initRevTurbine({
 *   tenantId: 'tenant_abc',
 *   publicKey: 'rtk_…',
 *   endpoint: 'https://edge.example.com',
 *   mode: 'snippet',
 *   domainProviders: [analytics],
 * });
 * ```
 *
 * @module
 */

/**
 * Flat properties object passed to the analytics handler after
 * transforming a raw {@link RevTurbineEventEnvelope}.
 */
type AnalyticsEventProperties = Record<string, unknown>;
/**
 * Callback invoked for every SDK event.
 *
 * @param eventName - Normalised event name (e.g. `'placement_interaction'`).
 * @param properties - Flat key-value properties derived from the event envelope.
 */
type AnalyticsEventHandler = (eventName: string, properties: AnalyticsEventProperties) => void;
/**
 * Optional transformer applied before the handler.
 * Return `null` to drop the event silently.
 */
type AnalyticsEventTransformer = (eventName: string, properties: AnalyticsEventProperties) => {
    eventName: string;
    properties: AnalyticsEventProperties;
} | null;
/** Configuration for {@link createAnalyticsProvider}. */
interface AnalyticsProviderOptions {
    /**
     * Callback that pushes one event to the analytics platform.
     * Called once per SDK event after optional transformation.
     */
    handler: AnalyticsEventHandler;
    /**
     * Optional transform applied before the handler.
     * Use this to rename events, enrich properties, or drop events
     * you don't care about.
     *
     * Return `null` to suppress the event.
     */
    transform?: AnalyticsEventTransformer;
    /**
     * When provided, only events whose `type` matches one of these
     * strings are forwarded. All others are silently dropped.
     *
     * @example ['placement_interaction', 'placement_dismissed']
     */
    filter?: string[];
    /**
     * Human-readable consumer name shown in diagnostics.
     * @default 'analytics'
     */
    name?: string;
}
/**
 * Create an analytics domain provider that forwards SDK events
 * (impressions, interactions, triggers, page views, etc.) to a
 * third-party analytics platform.
 *
 * The returned provider should be passed in the `domainProviders`
 * array when calling `initRevTurbine()`.
 *
 * @example Segment
 * ```ts
 * const analytics = createAnalyticsProvider({
 *   handler: (eventName, properties) => {
 *     window.analytics.track(eventName, properties);
 *   },
 * });
 * ```
 *
 * @example Heap (filtered to interactions only)
 * ```ts
 * const analytics = createAnalyticsProvider({
 *   handler: (eventName, properties) => {
 *     heap.track(eventName, properties);
 *   },
 *   filter: ['placement_interaction', 'placement_dismissed', 'placement_converted'],
 * });
 * ```
 *
 * @example Custom transform
 * ```ts
 * const analytics = createAnalyticsProvider({
 *   handler: (name, props) => posthog.capture(name, props),
 *   transform: (name, props) => ({
 *     eventName: `revturbine.${name}`,
 *     properties: { ...props, source: 'revturbine-sdk' },
 *   }),
 * });
 * ```
 */
declare function createAnalyticsProvider(options: AnalyticsProviderOptions): EventConsumerProvider;
/**
 * Minimal shape of a PostHog client — satisfied by both `posthog-js`
 * (browser) and `posthog-node` (server). `capture` is always used; the identity
 * lifecycle methods are optional and only called by {@link createPostHogIntegration}
 * when the matching sync flag is on. This is a structural interface — no PostHog
 * package is imported or bundled (the client is injected).
 */
interface PostHogLike {
    capture(event: string, properties?: Record<string, unknown>): void;
    /** Optional — mirrors a RevTurbine identify when `syncIdentity` is on. */
    identify?(distinctId: string, properties?: Record<string, unknown>): void;
    /** Optional — mirrors an account group when `syncAccountGroup` is on. */
    group?(groupType: string, groupKey: string, properties?: Record<string, unknown>): void;
    /** Optional — called when the identity is cleared (logout) under `syncIdentity`. */
    reset?(): void;
}
/** Configuration for {@link createPostHogAnalyticsProvider}. */
interface PostHogAnalyticsProviderOptions {
    /** The PostHog client instance (`posthog-js` or `posthog-node`). */
    posthog: PostHogLike;
    /**
     * When provided, only events whose `type` matches one of these strings are
     * forwarded to PostHog. Use e.g. the control-plane event types to forward
     * only semantic control-plane events. All others are silently dropped.
     */
    filter?: string[];
    /** Optional transform applied before capture (rename / enrich / drop). */
    transform?: AnalyticsEventTransformer;
    /**
     * Human-readable consumer name shown in diagnostics.
     * @default 'posthog'
     */
    name?: string;
}
/**
 * Create an analytics resolver that forwards SDK events to PostHog (plan 112).
 *
 * A thin PostHog-typed convenience over {@link createAnalyticsProvider}: each
 * SDK event becomes `posthog.capture(eventName, properties)`. Pass the result
 * in the `domainProviders` array at init so the same semantic events feed both
 * the first-party ingest pipeline and PostHog.
 *
 * Like {@link createAnalyticsProvider}, a throw from `posthog.capture` is
 * swallowed — a PostHog failure never crashes the SDK event pipeline.
 *
 * @example
 * ```ts
 * import posthog from 'posthog-js';
 * import { createPostHogAnalyticsProvider, initRevTurbine } from '@revturbine/sdk';
 *
 * const analytics = createPostHogAnalyticsProvider({ posthog });
 * const session = await initRevTurbine({
 *   tenantId: 'tenant_abc',
 *   publicKey: 'rtk_…',
 *   endpoint: 'https://edge.example.com',
 *   mode: 'snippet',
 *   domainProviders: [analytics],
 * });
 * ```
 */
declare function createPostHogAnalyticsProvider(options: PostHogAnalyticsProviderOptions): EventConsumerProvider;
/** Configuration for {@link createPostHogIntegration}. */
interface PostHogIntegrationOptions extends PostHogAnalyticsProviderOptions {
    /**
     * Mirror RevTurbine identify / logout to `posthog.identify` / `posthog.reset`.
     * The distinct id is RevTurbine's already-redacted (hashed) user id — never a
     * raw email. Default `false`.
     */
    syncIdentity?: boolean;
    /**
     * Mirror the `account_id` trait to a PostHog group (`group('account', id)`)
     * when it changes. Default `false`.
     */
    syncAccountGroup?: boolean;
    /**
     * Mirror `page_view` events to a native PostHog `$pageview`. Default `false`.
     */
    mirrorNavigation?: boolean;
}
/**
 * Create a PostHog integration with an optional identity lifecycle (plan 144
 * TASK-17 / REQ-26).
 *
 * A superset of {@link createPostHogAnalyticsProvider}: every event is still
 * `posthog.capture(name, properties)` with the **same `filter` / `transform`
 * semantics** (REQ-27), and — when the matching flag is on — RevTurbine's
 * identify/logout, account grouping, and navigation are mirrored to PostHog's
 * native `identify` / `reset` / `group` / `$pageview`. All sync flags default
 * `false`, so by default this behaves exactly like the capture-only provider.
 *
 * No PostHog package is imported or bundled — the client is injected — so this
 * code is tree-shakable and only pulled in when you import it (AC-20). A throw
 * from any PostHog call is swallowed and never blocks RevTurbine ingest (AC-17).
 *
 * `createPostHogAnalyticsProvider` remains exported for existing integrations.
 */
declare function createPostHogIntegration(options: PostHogIntegrationOptions): EventConsumerProvider;

/**
 * Pre-defined surface template ID sets.
 *
 * Each array represents a semantic grouping of template IDs that a
 * SurfaceSlot can accept. Components can import these directly or
 * pass them as `surfaceTemplateIds` props.
 */
/** Banner templates only — for fixed or triggered banner slots. */
declare const FIXED_BANNER_TEMPLATE_IDS: readonly string[];
/** General banner slot — accepts banners and in-page cards. */
declare const GENERAL_BANNER_TEMPLATE_IDS: readonly string[];
/** General toast slot — accepts toast messages. */
declare const GENERAL_TOAST_TEMPLATE_IDS: readonly string[];
/** General modal slot — accepts modal overlays. */
declare const GENERAL_MODAL_TEMPLATE_IDS: readonly string[];

/**
 * Surface template ID constants.
 *
 * Extracted into a standalone .ts file so the headless (React-free) barrel
 * can import them without pulling in React component modules.
 */
/** Default template IDs accepted by `FixedSurfaceSlot`. */
declare const FIXED_SURFACE_TEMPLATE_IDS: readonly string[];
/** Default template IDs accepted by `AccessGateSurfaceSlot`. */
declare const GATED_SURFACE_TEMPLATE_IDS: readonly string[];
/** Default template IDs accepted by `MessageSurfaceSlot`. */
declare const MESSAGE_SURFACE_TEMPLATE_IDS: readonly string[];

/**
 * Default theme tokens — matches the original hardcoded styles across all
 * built-in placement components. Serves as the fallback when no custom
 * theme is configured or the theme API is unreachable.
 */
declare const DEFAULT_THEME: Readonly<RevTurbineTheme>;
/**
 * Deep-merge a partial theme input with a base theme, producing a complete
 * {@link RevTurbineTheme}.
 *
 * @param input - Partial tokens. Every omitted token falls back to `base`.
 * @param base - The palette to merge over. Defaults to {@link DEFAULT_THEME};
 *   pass {@link DARK_THEME} (or use {@link baseThemeForScheme}) to resolve a
 *   partial brand theme against the dark palette instead.
 */
declare function mergeTheme(input?: RevTurbineThemeInput | null, base?: Readonly<RevTurbineTheme>): RevTurbineTheme;

/** Clear persisted theme (useful on identity reset). */
declare function clearPersistedTheme(tenantId: string, storage?: RevTurbineStorage): void;
interface ThemeLoaderOptions {
    /**
     * Your **public key** — the only credential the theme API accepts
     * (BL-0477). The control plane resolves the tenant from it; a server key is
     * refused with 403. Without a key nothing is fetched and the persisted /
     * `base` theme is returned.
     */
    publicKey?: string;
    /**
     * @deprecated **Ignored since 0.12.2.** Use {@link ThemeLoaderOptions.publicKey}.
     * `apiKey` names the secret server key everywhere else in the SDK, so the
     * theme loader never sends it: a call that supplies only `apiKey` fetches
     * nothing (and warns once) and returns the persisted / `base` theme. Kept so
     * existing callers still compile.
     */
    apiKey?: string;
    /**
     * @deprecated No longer sent (BL-0477): the public key alone identifies the
     * tenant (D-49). Kept so existing callers still compile.
     */
    tenantId?: string;
    /**
     * Namespace for the locally persisted theme. Defaults to a scope derived
     * from the public key, so two keys on one origin never share an entry.
     */
    storageScope?: string;
    /** Base URL of the RevTurbine API Edge. */
    endpoint: string;
    /** Optional storage provider. Falls back to localStorage in browser, in-memory on server. */
    storage?: RevTurbineStorage;
    /**
     * The launched Playbook's theme, used as the BASE that fetched overrides
     * merge over (plan 184). Supplying it means a partial override from the
     * control plane refines the Playbook's theme instead of replacing it.
     */
    base?: RevTurbineThemeInput;
    /** Palette used for tokens absent from the base and fetched override. */
    colorScheme?: 'light' | 'dark';
    /**
     * Called with the RAW override — the persisted copy on the fast path, then
     * the freshly-fetched one — or `null` when there is no override.
     *
     * The resolved {@link RevTurbineTheme} is already merged with defaults, so it
     * can't tell "the API supplied branding" from "nothing was fetched". Callers
     * that must distinguish those — `getBranding()`, which reports which ladder
     * rung won — need this unmerged value (plan 184).
     */
    onOverride?: (override: RevTurbineThemeInput | null) => void;
}
/**
 * Load the tenant's theme:
 * 1. Return the locally-persisted theme immediately (fast path).
 * 2. Fetch the latest from the API in the background.
 * 3. If the remote version differs, update local storage and return the new theme.
 *
 * Returns a resolved {@link RevTurbineTheme} (merged with defaults).
 * Also provides an `onUpdate` callback callers can use to react to
 * background refreshes.
 */
declare function loadTheme(opts: ThemeLoaderOptions, onUpdate?: (theme: RevTurbineTheme) => void): Promise<RevTurbineTheme>;

/**
 * Server-side evaluation types for the RevTurbine SDK.
 *
 * Response/payload types are imported from the generated schema types
 * (`@revt-eng/schema`) so the server SDK is always aligned with the
 * JSON-Schema source of truth. Request-only and configuration types
 * that are SDK-specific (not in the schema) are defined here.
 */

/** A single placement decision within a server evaluation payload. */
type ServerPlacementDecision = ServerEvaluationPayloadDecisionsItem;
/** An entitlement check result within a server evaluation payload. */
type ServerEntitlementResult = ServerEvaluationPayloadEntitlementsValue;
/** User context returned in a server evaluation payload. */
type ServerUserContext = ServerEvaluationPayloadUserContext;
/** A single placement to evaluate on the server. */
interface ServerPlacementRequest {
    /** Slot identifier for slot-based decisions. */
    slotId?: string;
    /** Entitlement handle for entitlement-gated decisions. */
    entitlementHandle?: string;
    /** Plan handle for plan-specific placements. */
    planHandle?: string;
    /** Placement handle for chained CTA paths. */
    placementHandle?: string;
}
/** Full evaluation request submitted to the server SDK. */
interface ServerEvaluationRequest {
    /** Authenticated user identifier. */
    userId: string;
    /** Optional anonymous ID for correlation (generated server-side when omitted). */
    anonymousId?: string;
    /** User traits for segmentation/personalization. */
    traits?: Record<string, unknown>;
    /** Page context when rendering a specific page server-side. */
    page?: {
        url?: string;
        title?: string;
        tags?: string[];
    };
    /** Placements to evaluate. When omitted, evaluates the bootstrap context. */
    placements?: ServerPlacementRequest[];
    /** Entitlement handles to check. */
    entitlementHandles?: string[];
    /** Current usage balances keyed by entitlement handle. */
    usageBalances?: Record<string, number>;
    /** Whether to include the tenant theme in the payload. */
    includeTheme?: boolean;
    /** Whether to include trial status in the payload. */
    includeTrialStatus?: boolean;
    /** Whether to include full user context (segments, traits, balances). */
    includeUserContext?: boolean;
}
/**
 * Input for minting a short-lived, per-user client-session token.
 *
 * The customer backend attests the end user, then mints a browser-safe token
 * scoped to exactly that subject. The tenant is derived server-side from the
 * server key ({@link RevTurbineServerOptions.apiKey}) — never from this input.
 */
interface CreateClientSessionInput {
    /** The end-user subject the token is minted for (opaque to RevTurbine). */
    subject: string;
    /** Optional surface / session scope hint (e.g. a page or feature area). */
    surface?: string;
    /**
     * Client-facing capabilities the token is scoped to. Defaults to
     * `['context:read']` (fetch the user's client-safe context).
     */
    capabilities?: string[];
}
/**
 * Result of minting a client session — a short-lived, opaque browser token.
 *
 * Hand `client_token` to the frontend; it authenticates
 * `GET /api/sdk/client-context`. It carries no user id in the request (the token
 * determines the subject), and expires at `expires_at`.
 */
interface ClientSessionResult {
    /** The opaque `rt_client_` token to return to the browser. */
    client_token: string;
    /** ISO-8601 timestamp at which the token expires. */
    expires_at: string;
}
/**
 * Why a seat-type assignment was refused, derived from the HTTP status of
 * `POST /api/sdk/user-contexts`:
 *
 * - `invalid_request` (400) — malformed body, e.g. an empty user id.
 * - `unauthorized` (401) — missing or invalid credential.
 * - `forbidden` (403) — the credential is not a **server** key. Only a server
 *   key may write a seat assignment (D-36).
 * - `unknown_seat_type` (422) — the handle is not one of the tenant's current
 *   seat types.
 * - `unknown_dimension_value` (422, code `UNKNOWN_DIMENSION_VALUE`) — a
 *   `builtinDimensions` value passed alongside the seat is outside its
 *   dimension's vocabulary (BL-0382).
 * - `request_failed` — any other non-2xx status.
 */
type SeatAssignmentErrorReason = 'invalid_request' | 'unauthorized' | 'forbidden' | 'unknown_seat_type' | 'unknown_dimension_value' | 'request_failed';
/**
 * Options for {@link RevTurbineServer.assignSeatType}: built-in dimension
 * values to write in the SAME server-key upsert as the seat (BL-0382). See
 * {@link SetBuiltinDimensionsOptions} for `override`.
 */
interface AssignSeatTypeOptions {
    /** Built-in dimension values to set (or clear with `null`) with the seat. */
    builtinDimensions?: ServerBuiltinDimensionsWrite;
    /** Pin the `builtinDimensions` written in this call (D-47). Default `false`. */
    override?: boolean;
}
/** Options for {@link RevTurbineServer.setBuiltinDimensions}. */
interface SetBuiltinDimensionsOptions {
    /**
     * `false` (default) — an UPDATE: the value is delivered until a newer
     * RevTurbine enrichment change (Stripe subscription / trial / billing, the
     * activity job, request signals) supersedes it — last writer wins,
     * enrichment included. Writing a pinned dimension without the flag UNPINS it.
     *
     * `true` — an OVERRIDE: the values written in this call are pinned, and
     * RevTurbine enrichment never replaces them until you write that dimension
     * again without the flag, or clear it with `null` (ruling D-47).
     */
    override?: boolean;
}
/**
 * Why a built-in dimension write ({@link RevTurbineServer.setBuiltinDimensions})
 * was refused, derived from the HTTP status of `POST /api/sdk/user-contexts`:
 *
 * - `invalid_request` (400) — malformed body: an empty user id, an empty
 *   dimensions map, `seat_type` (use `assignSeatType`) or an unknown key.
 * - `unauthorized` (401) — missing or invalid credential.
 * - `forbidden` (403) — the credential is not a **server** key.
 * - `unknown_dimension_value` (422) — a value is outside its dimension's
 *   vocabulary.
 * - `request_failed` — any other non-2xx status.
 */
type DimensionWriteErrorReason = 'invalid_request' | 'unauthorized' | 'forbidden' | 'unknown_dimension_value' | 'request_failed';
/**
 * Why a built-in dimension read was refused, derived from the HTTP status of
 * `GET /api/sdk/user-contexts/{userId}/builtin-dimensions`:
 *
 * - `invalid_request` (400) — e.g. a blank user id.
 * - `unauthorized` (401) — missing or invalid credential.
 * - `forbidden` (403) — the credential is not a **server** key, the request
 *   looked browser-originated, or a tenant header named another tenant.
 * - `request_failed` — any other non-2xx status.
 */
type BuiltinDimensionsErrorReason = 'invalid_request' | 'unauthorized' | 'forbidden' | 'request_failed';
/** Options for initializing the RevTurbine server-side SDK. */
interface RevTurbineServerOptions {
    /** Your RevTurbine tenant identifier. */
    tenantId: string;
    /**
     * Your **server key** — the secret backend credential (`rtk_…`, type
     * `server`, minted under **Settings → API Token Management → Server
     * Token**).
     *
     * Keep it in server-side configuration only. It is never the browser
     * SDK's `publicKey`, and the control plane refuses it on browser-like
     * requests.
     */
    apiKey: string;
    /** Base URL of the RevTurbine API Edge. */
    endpoint: string;
    /** Default TTL for evaluation payloads (seconds). Default: 60. */
    defaultTtlSeconds?: number;
    /** Custom fetch implementation (e.g. for testing or non-standard runtimes). */
    fetch?: typeof globalThis.fetch;
}

/**
 * RevTurbine Server-Side SDK Client.
 *
 * Holds the customer's **server key** and mints short-lived, browser-safe
 * `rt_client_` session keys for one end user at a time, and writes server-only
 * user state such as a user's seat-type assignment. Evaluation does not happen
 * here (plan 192) — it runs in the customer SDKs.
 *
 * Designed for:
 * - Next.js RSC / route handlers / `getServerSideProps`
 * - Express / Fastify middleware
 * - Any Node.js backend
 *
 * @example
 * ```ts
 * import { RevTurbineServer } from '@revturbine/sdk/headless';
 *
 * const server = new RevTurbineServer({
 *   tenantId: 'tenant_abc',
 *   apiKey: process.env.REVTURBINE_API_KEY!, // the server key (rtk_…, type server)
 *   endpoint: 'https://revturbine.com/app',
 * });
 *
 * // Mint a session key for the signed-in user and hand it to the browser.
 * const { client_token } = await server.createClientSession({ subject: session.user.id });
 * ```
 */

/**
 * Error thrown when a client-session mint request is rejected by the control
 * plane. Carries only the HTTP status and a correlation id — deliberately never
 * the server key, request headers, or response body — so the key cannot leak
 * through error logs (plan 157 AC-8).
 */
declare class RevTurbineClientSessionError extends Error {
    /** HTTP status returned by the control plane. */
    readonly status: number;
    /** Correlation id for the failed request. */
    readonly requestId: string;
    constructor(
    /** HTTP status returned by the control plane. */
    status: number, 
    /** Correlation id for the failed request. */
    requestId: string);
}
/**
 * Error thrown when a seat-type assignment ({@link RevTurbineServer.assignSeatType})
 * is refused by the control plane.
 *
 * Like {@link RevTurbineClientSessionError} it carries only the HTTP status, a
 * typed {@link SeatAssignmentErrorReason}, the control plane's machine-readable
 * error `code` when one was returned, and a correlation id — never the server
 * key, request headers, or the free-text response message.
 */
declare class RevTurbineSeatAssignmentError extends Error {
    /** HTTP status returned by the control plane. */
    readonly status: number;
    /** Correlation id sent as `x-request-id` on the failed request. */
    readonly requestId: string;
    /** The control plane's machine-readable error code, when the body carried one. */
    readonly code?: string | undefined;
    /** Typed classification of {@link RevTurbineSeatAssignmentError.status}. */
    readonly reason: SeatAssignmentErrorReason;
    constructor(
    /** HTTP status returned by the control plane. */
    status: number, 
    /** Correlation id sent as `x-request-id` on the failed request. */
    requestId: string, 
    /** The control plane's machine-readable error code, when the body carried one. */
    code?: string | undefined);
}
/**
 * Error thrown when a built-in dimension write
 * ({@link RevTurbineServer.setBuiltinDimensions}) is refused by the control
 * plane (BL-0382).
 *
 * Like {@link RevTurbineSeatAssignmentError} it carries only the HTTP status, a
 * typed {@link DimensionWriteErrorReason}, the control plane's machine-readable
 * error `code` when one was returned, and a correlation id — never the server
 * key, request headers, or the free-text response message.
 */
declare class RevTurbineDimensionWriteError extends Error {
    /** HTTP status returned by the control plane. */
    readonly status: number;
    /** Correlation id sent as `x-request-id` on the failed request. */
    readonly requestId: string;
    /** The control plane's machine-readable error code, when the body carried one. */
    readonly code?: string | undefined;
    /** Typed classification of {@link RevTurbineDimensionWriteError.status}. */
    readonly reason: DimensionWriteErrorReason;
    constructor(
    /** HTTP status returned by the control plane. */
    status: number, 
    /** Correlation id sent as `x-request-id` on the failed request. */
    requestId: string, 
    /** The control plane's machine-readable error code, when the body carried one. */
    code?: string | undefined);
}
/**
 * Error thrown when a built-in dimension read
 * ({@link RevTurbineServer.getBuiltinDimensions}) is refused by the control
 * plane.
 *
 * Like {@link RevTurbineSeatAssignmentError} it carries only the HTTP status, a
 * typed {@link BuiltinDimensionsErrorReason}, the control plane's
 * machine-readable error `code` when one was returned, and a correlation id —
 * never the server key, request headers, or the free-text response message.
 */
declare class RevTurbineBuiltinDimensionsError extends Error {
    /** HTTP status returned by the control plane. */
    readonly status: number;
    /** Correlation id sent as `x-request-id` on the failed request. */
    readonly requestId: string;
    /** The control plane's machine-readable error code, when the body carried one. */
    readonly code?: string | undefined;
    /** Typed classification of {@link RevTurbineBuiltinDimensionsError.status}. */
    readonly reason: BuiltinDimensionsErrorReason;
    constructor(
    /** HTTP status returned by the control plane. */
    status: number, 
    /** Correlation id sent as `x-request-id` on the failed request. */
    requestId: string, 
    /** The control plane's machine-readable error code, when the body carried one. */
    code?: string | undefined);
}
/**
 * The RevTurbine server-side client. Holds the server key; mints client
 * sessions ({@link RevTurbineServer.createClientSession}), writes
 * server-only user state ({@link RevTurbineServer.assignSeatType}) and reads
 * the user's server-resolved built-in dimensions
 * ({@link RevTurbineServer.getBuiltinDimensions}).
 */
declare class RevTurbineServer {
    private readonly tenantId;
    private readonly apiKey;
    private readonly endpoint;
    private readonly defaultTtlSeconds;
    private readonly fetchFn;
    private readonly api;
    constructor(options: RevTurbineServerOptions);
    /**
     * Client-session minting namespace (plan 157). Ergonomic form of
     * {@link createClientSession}:
     *
     * @example
     * ```ts
     * const { client_token, expires_at } = await server.clientSessions.create({
     *   subject: session.user.id,
     * });
     * // return client_token to the frontend
     * ```
     */
    get clientSessions(): {
        create: (input: CreateClientSessionInput) => Promise<ClientSessionResult>;
    };
    /**
     * Mint a short-lived, opaque per-user client-session token (plan 157; the
     * server key is the minting authority, plan 256).
     *
     * The customer backend — which holds the server key (passed as
     * {@link RevTurbineServerOptions.apiKey}) — calls this to obtain a browser-safe
     * `rt_client_` token scoped to one end-user subject, then returns the token to
     * its frontend. The frontend authenticates `GET /api/sdk/client-context` with
     * it to read the user's client-safe context.
     *
     * This is a **server-only** capability: the browser SDK never mints tokens (it
     * only consumes them). The tenant is derived server-side from the server key,
     * never from this call.
     *
     * @throws {RevTurbineClientSessionError} if the control plane rejects the mint.
     *   The error carries only the HTTP status + request id — never the key.
     */
    createClientSession(input: CreateClientSessionInput): Promise<ClientSessionResult>;
    /**
     * Assign a user's seat type, or clear it with `null` (plan 279 TASK-16a).
     *
     * Calls `POST /api/sdk/user-contexts` (`upsertServerUserContext`) with exactly
     * `{ user_id, seat_type_handle }`, authenticated by the server key this client
     * holds. The tenant is taken from that key — it is never a parameter, and no
     * tenant header is sent.
     *
     * **Server-written only (D-36).** A user's seat-type assignment is written
     * only by the tenant's backend through this server-key call (or by RevTurbine
     * enrichment). It is never set from the browser: the client SDK's
     * `identify()` / `update()` do not accept `seat_type_handle`, and the endpoint
     * refuses every credential except a server key.
     *
     * Pass `options.builtinDimensions` (and `options.override`) to set built-in
     * dimension values in the same write — see {@link setBuiltinDimensions} for
     * their semantics (BL-0382).
     *
     * @param userId - The tenant's own identifier for the user (non-empty).
     * @param seatTypeHandle - One of the tenant's current seat-type handles, or
     *   `null` to clear the user's assignment.
     * @param options - Optional built-in dimension values to write with the seat.
     * @returns The resulting state, including the stored `seat_type_handle`, the
     *   customer-set `builtin_dimensions`, the pinned `overrides` and `updated_at`.
     * @throws {RevTurbineSeatAssignmentError} if the control plane refuses the
     *   write — `reason` is `unknown_seat_type` for a 422 on the handle,
     *   `unknown_dimension_value` for a 422 on a dimension value, and `forbidden`
     *   for a 403 (the key is not a server key). The error never carries the key.
     *
     * @example
     * ```ts
     * await server.assignSeatType('user_123', 'admin');
     * await server.assignSeatType('user_123', null); // clear the assignment
     * ```
     */
    assignSeatType(userId: string, seatTypeHandle: string | null, options?: AssignSeatTypeOptions): Promise<ServerUserContextAssignment>;
    /**
     * Set a user's built-in segment dimension values from your backend (BL-0382,
     * rulings D-46 / D-47).
     *
     * Calls `POST /api/sdk/user-contexts` (`upsertServerUserContext`) with
     * `{ user_id, builtin_dimensions, override }`, authenticated by the server key
     * this client holds. The tenant is taken from that key — never a parameter.
     * The write is an UPSERT per dimension: dimensions you do not name are left
     * alone, and `null` clears a dimension (its value and its pin). The seat
     * assignment is untouched (use {@link assignSeatType}).
     *
     * Settable dimensions: `subscription_state`, `trial_type`, `billing_health`,
     * `activity_level`, `buyer_role`, `email_type`, `region`, `device_type` —
     * each takes a value from its closed vocabulary (the types enforce it).
     * `seat_type` is not settable here; it is `assignSeatType`.
     *
     * The control plane applies the value before delivery, so both the browser
     * SDK's client context and {@link getBuiltinDimensions} return it:
     * - `override: false` (default): delivered until a newer RevTurbine
     *   enrichment change supersedes it (last writer wins, enrichment included);
     *   writing a pinned dimension without the flag unpins it.
     * - `override: true`: pinned — enrichment never replaces it until you write
     *   the dimension again without the flag, or clear it.
     *
     * @param userId - The tenant's own identifier for the user (non-empty) — the
     *   same key `assignSeatType` and `createClientSession` use.
     * @param dimensions - Dimension → value (or `null` to clear). Must name at
     *   least one dimension.
     * @param options - `{ override }` — see above.
     * @returns The resulting state: `seat_type_handle`, every customer-set
     *   `builtin_dimensions` value now stored, the pinned `overrides`, and
     *   `updated_at`.
     * @throws {RevTurbineDimensionWriteError} if the control plane refuses the
     *   write — `reason` is `unknown_dimension_value` for a 422 and `forbidden`
     *   for a 403 (the key is not a server key). The error never carries the key.
     *
     * @example
     * ```ts
     * // Your billing system knows better than RevTurbine's Stripe view: pin it.
     * await server.setBuiltinDimensions('user_123', { subscription_state: 'paid' }, { override: true });
     * // Hand the dimension back to RevTurbine enrichment.
     * await server.setBuiltinDimensions('user_123', { subscription_state: null });
     * ```
     */
    setBuiltinDimensions(userId: string, dimensions: ServerBuiltinDimensionsWrite, options?: SetBuiltinDimensionsOptions): Promise<ServerUserContextAssignment>;
    /**
     * Read the control plane's server-resolved built-in segment dimensions for
     * one user (BL-0366).
     *
     * Calls `GET /api/sdk/user-contexts/{userId}/builtin-dimensions`
     * (`getServerUserBuiltinDimensions`), authenticated by the server key this
     * client holds. The tenant is taken from that key — it is never a parameter,
     * and no tenant header is sent. The result's `builtin_dimensions` carries the
     * values the browser SDK would receive through the client context
     * (Subscription State, Trial Type, Activity State, Seat Type, Buyer Role,
     * Billing Health, Email Type); `region` / `device_type` are request-derived
     * and never present. An unknown user resolves to each dimension's default.
     *
     * Feed it to local evaluation as the server overlay: pass
     * `result.builtin_dimensions` as `createStaticProviders({ …, userContext,
     * serverBuiltinDimensions })`, which overlays it per key on
     * `userContext.builtin_dimensions` — the server value wins (plan 279 PD-3).
     * The Python and Rust server SDKs accept the same object through
     * `server_builtin_dimensions`.
     *
     * @param userId - The tenant's own identifier for the user (non-empty) — the
     *   same key `assignSeatType` and `createClientSession` use.
     * @returns `{ tenant_id, user_id, builtin_dimensions, resolved_at }`.
     * @throws {RevTurbineBuiltinDimensionsError} if the control plane refuses the
     *   read — `reason` is `forbidden` for a 403 (the key is not a server key).
     *   The error never carries the key.
     *
     * @example
     * ```ts
     * const { builtin_dimensions } = await server.getBuiltinDimensions('user_123');
     * const providers = createStaticProviders({
     *   config: playbook,
     *   userContext: { id: 'user_123' },
     *   serverBuiltinDimensions: builtin_dimensions,
     * });
     * ```
     */
    getBuiltinDimensions(userId: string): Promise<ServerUserBuiltinDimensions>;
    private apiCall;
    private apiGet;
}

export { ACCOUNT_CREATION_PENDING_REASONS, ACCOUNT_CREATION_SOURCES, ANALYTICS_ANNOTATION_KINDS, ANALYTICS_DATE_RANGE_FILTER_VALUE_TYPE, ANALYTICS_FX_RATE_EVIDENCE_LIMIT, ANALYTICS_MIN_SAMPLE_DEFAULT, ANALYTICS_VALIDATION_CODES, ANALYTICS_VIEW_SCHEMA_VERSION, AccountPrimaryContactBindingSchema, AccountPrimaryContactHistorySchema, ActivityLevelSchema, AddOnSchema, AddOnVariationSchema, AlertSchema, AnalysisProvenanceSchema, AnalyticsAgentCatalogEntryKindSchema, AnalyticsAgentCatalogEntrySchema, AnalyticsAnalyticalUnitSchema, AnalyticsAnnotationChangeSchema, AnalyticsAnnotationGenerationSchema, AnalyticsAnnotationKindSchema, AnalyticsAnnotationMarkerSchema, AnalyticsAnnotationRequestSchema, AnalyticsAnnotationResponseSchema, AnalyticsAnnotationSchema, AnalyticsAnnotationSeriesSchema, AnalyticsAnnotationSourceSchema, AnalyticsBlockErrorSchema, AnalyticsBlockResultSchema, AnalyticsCardinalityClassSchema, AnalyticsCatalogAnnotationKindSchema, AnalyticsCatalogConceptSchema, AnalyticsCatalogDeprecationSchema, AnalyticsCatalogDimensionSchema, AnalyticsCatalogMetricSchema, AnalyticsCatalogMetricValidatedSchema, AnalyticsCatalogProvenanceKindSchema, AnalyticsCatalogProvenanceSchema, AnalyticsCatalogSchema, AnalyticsCatalogSearchResultSchema, AnalyticsCatalogSourceSchema, AnalyticsClassificationSchema, AnalyticsCompareDeltaSchema, AnalyticsCompareExperimentSchema, AnalyticsCompareModeSchema, AnalyticsCompareSegmentSchema, AnalyticsCompileResolutionSchema, AnalyticsCoverageSchema, AnalyticsCustomizationCapabilitySchema, AnalyticsCustomizationPolicySchema, AnalyticsDimensionCapabilitySchema, AnalyticsDimensionTypeSchema, AnalyticsFieldTypeSchema, AnalyticsFilterControlSchema, AnalyticsFilterOperatorSchema, AnalyticsFilterStateSchema, AnalyticsFilterValueSchema, AnalyticsFormatSpecSchema, AnalyticsFxRateEvidenceSchema, AnalyticsFxRateEvidenceSetSchema, AnalyticsGateSettingsAppliedSchema, AnalyticsGateSettingsConfiguredSchema, AnalyticsGateSettingsMetaSchema, AnalyticsGateSettingsProvenanceSchema, AnalyticsGateSettingsTargetSchema, AnalyticsGateSettingsValuesSchema, AnalyticsHistoricalModeSchema, AnalyticsMetricAccountingSchema, AnalyticsMetricAggregationSemanticsSchema, AnalyticsMetricCurrencyPolicySchema, AnalyticsMetricDirectionSchema, AnalyticsMetricSemanticsSchema, AnalyticsMetricStatisticalTypeSchema, AnalyticsMetricWindowAlignmentSchema, AnalyticsMetricWindowPeriodSchema, AnalyticsMetricWindowSchema, AnalyticsPeriodCompareModeSchema, AnalyticsQueryFamilySchema, AnalyticsQueryOverridesSchema, AnalyticsQueryRequestSchema, AnalyticsQueryResponseSchema, AnalyticsRecurringMovementBasisSchema, AnalyticsRenderCartesianSchema, AnalyticsRenderFunnelSchema, AnalyticsRenderMetricSchema, AnalyticsRenderRecommendationsSchema, AnalyticsRenderSpecSchema, AnalyticsRenderTableSchema, AnalyticsRenderTimelineSchema, AnalyticsReportingCurrencyMetaSchema, AnalyticsResultAccountingSchema, AnalyticsResultFieldSchema, AnalyticsResultMetaSchema, AnalyticsResultSchema, AnalyticsSafeChartOptionsSchema, AnalyticsSavedViewSchema, AnalyticsSemanticFilterSchema, AnalyticsSemanticIdSchema, AnalyticsSourceScopeSchema, AnalyticsSuggestedPatchOpSchema, AnalyticsTemplateSummarySchema, AnalyticsTimeGrainSchema, AnalyticsValidationIssueSchema, AnalyticsValidationResultSchema, AnalyticsViewAccessRoleSchema, AnalyticsViewAccessSchema, AnalyticsViewBlockDraftSchema, AnalyticsViewBlockSchema, AnalyticsViewDraftSchema, AnalyticsViewFilterDraftSchema, AnalyticsViewFilterSchema, AnalyticsViewHandoffDraftSchema, AnalyticsViewHandoffSchema, AnalyticsViewLayoutSchema, AnalyticsViewQuerySchema, AnalyticsViewRevisionSchema, AnalyticsViewSchema, AnalyticsViewVisibilitySchema, AnalyticsWarningSchema, AnchorFields, AuditActorTypeSchema, AuditEventSchema, AuthAccountSchema, AuthApiKeySchema, AuthInvitationSchema, AuthMemberSchema, AuthOrganizationSchema, AuthPasskeySchema, AuthSessionSchema, AuthSsoProviderSchema, AuthTwoFactorSchema, AuthUserSchema, AuthVerificationSchema, B2BSegmentEventNameSchema, B2B_INPUT_SYNONYMS, B2B_NON_AUTHORITATIVE_OBSERVATIONS, B2B_PENDING_PRODUCERS, B2B_PII_PROPERTIES, B2B_RT_REQUIRED_PROPERTIES, B2B_SEGMENT_EVENT_NAMES, B2B_SEMANTIC_MAP_VERSION, B2B_SOURCE_MAPPINGS, B2B_TRIAL_OUTCOMES, BILLING_ACCOUNTING_CONTRACT_VERSION, BILLING_ACCOUNT_BINDING_AUTO_KINDS, BILLING_ACCOUNT_BINDING_CONFIDENCE, BILLING_ACCOUNT_BINDING_EVIDENCE_KINDS, BILLING_ACCOUNT_BINDING_OPERATOR_KINDS, BILLING_COVERAGE_FAMILIES, BILLING_ITEM_JOIN_KEYS, BILLING_LIFECYCLE_POLICY_VERSION, BILLING_LIFECYCLE_STORAGE_LIMITS, BILLING_MIRROR_ACCOUNT_EXTERNAL_ID_SOURCES, BILLING_MIRROR_COVERAGE_STATES, BILLING_MIRROR_ENTITIES, BILLING_MIRROR_INVOICE_STATUSES, BILLING_MIRROR_LOCAL_FIELDS, BILLING_MIRROR_PAYER_KINDS, BILLING_MIRROR_PAYMENT_STATUSES, BILLING_MIRROR_PROVIDERS, BILLING_MIRROR_ROW_SCHEMAS, BILLING_MIRROR_SUBSCRIPTION_STATUSES, BILLING_OBSERVATION_ENTITY_KINDS, BILLING_OBSERVATION_SCHEMA_VERSION, BILLING_OBSERVATION_SOURCE_KINDS, BILLING_OBSERVATION_SOURCE_TIME_KINDS, BILLING_OBSERVATION_SOURCE_TIME_KIND_OF, BILLING_OCCURRENCE_IDENTITY, BILLING_OCCURRENCE_IDENTITY_VERSION, BILLING_OCCURRENCE_KEY_PREFIX, BILLING_OCCURRENCE_RULES, BILLING_OUTPUT_KEY_PREFIX, BILLING_OUTPUT_KINDS, BILLING_PROFILE_KINDS, BILLING_PROFILE_NAMES, BILLING_PROFILE_VERSION, BILLING_UNIQUE_KEYS, BUILT_IN_TEMPLATE_COMPONENT_TYPES, BillingAccountBindingActorSchema, BillingAccountBindingEvidenceSchema, BillingAccountMappingRevisionSchema, BillingAccountingRevisionSchema, BillingAllocationSchema, BillingBalanceProfileSchema, BillingCadenceSchema, BillingChargeObservationSchema, BillingCommittedInputSchema, BillingCommittedResultSchema, BillingCompletedGenerationCheckpointSchema, BillingComponentEvidenceSchema, BillingCoverageCheckpointSchema, BillingCoverageGapRangeSchema, BillingCoverageGapReasonSchema, BillingCoverageRecordSchema, BillingCoverageUnavailableReasonSchema, BillingCreditNoteLineSchema, BillingCreditProfileSchema, BillingCreditSettlementSchema, BillingDiscountEvidenceSchema, BillingEconomicOwnerSchema, BillingEvidenceProvenanceSchema, BillingFactHistorySchema, BillingFactReferenceSchema, BillingGenerationCheckpointSchema, BillingGenerationRecordSchema, BillingGenerationSchema, BillingHealthStatusSchema, BillingInvoiceHeaderObservationSchema, BillingInvoiceLineObservationSchema, BillingInvoicePaymentObservationSchema, BillingInvoicePaymentSourceSchema, BillingInvoiceProfileSchema, BillingInvoiceSourceEvidenceSchema, BillingItemStateDerivationSchema, BillingItemStateObservationSchema, BillingLifecycleEvidenceSchema, BillingLifecycleInputSchema, BillingLifecycleManifestSchema, BillingLifecycleMappingReferenceSchema, BillingLifecyclePartitionSchema, BillingLifecyclePartitionSelectionSchema, BillingLifecyclePayloadSchema, BillingLifecycleResultSchema, BillingLifecycleSourceRevisionSchema, BillingLifecycleTransitionLinkSchema, BillingLifecycleTransitionSchema, BillingLossProfileSchema, BillingMappingHistorySchema, BillingMirrorInvoiceLineSchema, BillingMirrorInvoiceSchema, BillingMirrorOfferingSchema, BillingMirrorPayerSchema, BillingMirrorPaymentSchema, BillingMirrorPaymentStatusSchema, BillingMirrorPriceSchema, BillingMirrorPriceTermSchema, BillingMirrorSubscriptionItemSchema, BillingMirrorSubscriptionSchema, BillingObservationSchema, BillingOccurrenceSchema, BillingOpeningSeedSchema, BillingOutputRowKeySchema, BillingPaymentIntentObservationSchema, BillingPaymentRecordObservationSchema, BillingPaymentSourceEvidenceSchema, BillingPriceTermsSchema, BillingPriceTierSchema, BillingProfileSchema, BillingReconciliationSchema, BillingRecurrenceSchema, BillingRecurringDiscountSchema, BillingRecurringDiscountTermsSchema, BillingRecurringMovementContractSchema, BillingRecurringMovementInputSchema, BillingRecurringMovementOccurrenceSchema, BillingRecurringNormalizationInputSchema, BillingRecurringNormalizationItemSchema, BillingRecurringOpeningItemSchema, BillingRecurringPriceSchema, BillingRefundProfileSchema, BillingRepeatableOccurrenceSchema, BillingScheduleProfileSchema, BillingSettlementAmountSchema, BillingSourceComponentIdentitySchema, BillingSourceComponentObservationSchema, BillingSourceEvidenceSchema, BillingSourceObservationEvidenceSchema, BillingSourceScopeSchema, BillingSubscriptionItemSnapshotSchema, BillingSubscriptionProfileSchema, BillingTransactionProfileSchema, BrandingConfigSchema, BrowserRuntime, BrowserStorage, CHECKOUT_STARTED_CTA_ACTION_TYPES, CONTROL_PLANE_EVENT_NAMES, CONTROL_PLANE_EVENT_SOURCE, CONTROL_PLANE_SOURCE_KEY, CUSTOMER_SETTABLE_BUILTIN_DIMENSION_KEYS, CanonicalAliasEventSchema, CanonicalAnalyticsEventSchema, CanonicalGroupEventSchema, CanonicalIdentifyEventSchema, CanonicalPageEventSchema, CanonicalScreenEventSchema, CanonicalSegmentContextSchema, CanonicalTrackEventSchema, CapEnforcer, CapPeriodSchema$1 as CapPeriodSchema, ChangeLogActionSchema, ChangeLogEntrySchema, ClientContextSchema, ClientSafe, CohortMonthSchema, ComponentTypeSchema, ContentPayloadSegmentEntrySchema, ContentPlacementPayloadSchema, ContentPromotionSchema, ContentUiPathSchema, ContextVisibility, ControlPlaneEventSourceSchema, ControlPlaneEventTypeSchema, ControlPlaneSemanticEventSchema, CtaActionTypeSchema, CtaObjectSchema, CtaPathSchema, CtaPathTypeSchema, CurrencySchema, CustomerAccountCreateSchema, CustomerAccountListQuerySchema, CustomerAccountSchema, CustomerBuiltinDimensionsSchema, CustomerCatalogQuerySchema, CustomerEntityLinkCreateSchema, CustomerEntityLinkListQuerySchema, CustomerEntityLinkSchema, CustomerOverrideDurationSchema, CustomerOverrideSchema, CustomerOverrideStatusSchema, CustomerOverrideTypeSchema, CustomerSchema, CustomerSummarySchema, CustomerUserCreateSchema, CustomerUserListQuerySchema, CustomerUserSchema, DEFAULT_ANALYTICS_RETENTION_DAYS, DEFAULT_BRANDING, DEFAULT_HOSTED_ENDPOINT, DEFAULT_PAYMENT_EVIDENCE_CONFIG, DEFAULT_SDK_MODE, DEFAULT_TEMPLATE_COMPONENT_TYPES, DEFAULT_THEME, DEPRECATED_EVENT_NAMES, DOGFOOD_CLIENT_EVENT_NAMES, DataClassification, DecisionEngine, DecisionOnly, DefaultTemplateIdsSchema, DeleteProtectionDecisionSchema, DescriptionField, DetectorRequirementsSchema, DimensionCategorySchema, DimensionSourceTypeSchema, DiscountTypeSchema, DomainProviderRegistry, DriftReportSchema, EMITTABLE_PLATFORM_EVENT_NAMES, ENTITLEMENT_STATUS_VALUES, EVENT_ENVELOPE_SCHEMA_VERSION, EVENT_PAYLOAD_CONTRACTS, EVENT_PAYLOAD_EVENT_NAMES, EVENT_PREFIX_FAMILIES, EnforcementActionSchema, EnforcementModeSchema, EntitlementCheckResultSchema, EntitlementGate, EntitlementGrantSchema, EntitlementGrantSetSchema, EntitlementGrantSourceSchema, EntitlementGrantStatusSchema, EntitlementRulePeriodUnitSchema, EntitlementRuleSchema, EntitlementRuleTargetKindSchema, EntitlementRuleTargetSchema, EntitlementRuleValidatedSchema, EntitlementRuleVariantSchema, EntitlementSchema, EntitlementStatusSchema, EntitlementTypeSchema, EnvironmentPromotionRequestSchema, EnvironmentSchema, EnvironmentStatusSchema, EventEnvelopeSchema, EventIngestBatchSchema, EventPrefixFamilySchema, EventSearchParamsSchema, EventSourceSchema, EventStabilitySchema, EventSurfaceSchema, EventTaxonomyEntrySchema, EventTaxonomySchema, EvidenceCoverageStateSchema, EvidenceReasonColumnSchema, EvidenceRequirementSchema, ExperimentAnalysisConfigSchema, ExperimentAnalysisConfigVersionError, ExperimentAnalysisDefinitionSchema, ExperimentAnalysisResultRecordSchema, ExperimentAnalysisResultSchema, ExperimentAssignmentFactSchema, ExperimentAssignmentSourceSchema, ExperimentDecisionFindingCodeSchema, ExperimentDecisionPolicySchema, ExperimentDecisionPolicyVersionError, ExperimentDecisionRecordSchema, ExperimentDecisionTypeSchema, ExperimentEvidenceSchema, ExperimentEvidenceSnapshotSchema, ExperimentHealthSchema, ExperimentMetricEvidencePlanSchema, ExperimentMetricResultSchema, ExperimentSchema, ExperimentStatusSchema, ExperimentTypeSchema, ExperimentVariantSchema, ExperimentVariantTargetSchema, RevTurbineConfigPlacementItemSchema as ExportedConfigPlacementItemSchema, RevTurbineConfigSchema as ExportedConfigSchema, RevTurbineConfigSegmentsItemPredicatesItemSchema as ExportedConfigSegmentsItemPredicatesItemSchema, RevTurbineConfigSegmentsItemSchema as ExportedConfigSegmentsItemSchema, RevTurbineConfigUiPathActionTypeSchema as ExportedConfigUiPathActionTypeSchema, FALLBACK_ACCOUNT_ID_PREFIX, FAMILY_RENDER_COMPATIBILITY, FIRST_SEGMENT_EVENT_ENVELOPE_SCHEMA_VERSION, FIXED_BANNER_TEMPLATE_IDS, FIXED_SURFACE_TEMPLATE_IDS, FIXTURE_ANALYTICS_CATALOG, FeatureFlagSchema, FeatureFlagValueSchema, FeatureGateTriggerPayloadSchema, FieldDefinitionSchema, FlagValueTypeSchema, FreeTrialRuleSchema, FreeTrialSettingsSchema, FunnelStepSchema, FxDailyRateRowSchema, FxProviderSchema, FxRateDecimalSchema, GATED_SURFACE_TEMPLATE_IDS, GENERAL_BANNER_TEMPLATE_IDS, GENERAL_MODAL_TEMPLATE_IDS, GENERAL_TOAST_TEMPLATE_IDS, GateWindowDaysSchema, GrowthSignalBundleSchema, GrowthSignalPointSchema, GrowthSignalSeriesSchema, HANDLE_PATTERN, HandleField, INGEST_WRITE_SCOPE, INVOICE_RECEIVABLE_TRANSITIONS, IdField, IdentityKind, IdentitySchema, InMemoryStorage, IngestedEventSchema, InteractionTracker, InvitationStatusSchema, InvoicePaymentStatusSchema, InvoiceSettlementBasisSchema, InvoiceStatusSchema, KpiAggregateSchema, LEGACY_BILLING_OCCURRENCE_IDENTITY_VERSION, LEGACY_TRACK_EVENT_ENVELOPE_SCHEMA_VERSION, LocalizedTextSchema, MAX_BILLING_CHECKPOINT_LIST, MAX_BILLING_INVOICE_OBSERVATION_ENTRIES, MAX_BILLING_INVOICE_PAGES, MAX_BILLING_PRICE_TIERS, MAX_BILLING_PROFILE_LIST, MAX_EVENT_JSON_DEPTH, MAX_EVENT_TAGS, MAX_EVENT_TAG_LENGTH, MAX_SEGMENT_MESSAGES_PER_BATCH, MAX_TREATMENT_INTERACTIONS_PER_BATCH, MESSAGE_SURFACE_TEMPLATE_IDS, METRIC_IMPACT_COMMENT_MARKER, METRIC_SEMANTICS, METRIC_TIMEZONE_SETTING, MIN_READABLE_EVENT_ENVELOPE_SCHEMA_VERSION, MRR_CHURN_CAUSES, MRR_ITEM_KINDS, MRR_MOVEMENT_KINDS, MRR_MOVEMENT_REASONS, MRR_POLICY_SWITCH_REASONS, MRR_SUPERSEDED_RETENTION_DAYS, MRR_UNVERSIONED_CALENDAR, ManagedActivationSchema, ManagedBaselineInputSchema, ManagedBaselineResultSchema, ManagedEvidenceSchema, ManagedItemBaselineSchema, ManagedItemHistorySchema, ManagedItemSubjectSchema, McpConfigSchema, McpTokenScopeSchema, MessageBlockContentSchema, MessageBlockRecordSchema, MessageBlockSchema, MessageSchema, MetadataField, MeteringConfigSchema, MrrAccountFactsRowSchema, MrrCalendarVersionSchema, MrrDailyRowSchema, MrrLocalDateSchema, MrrMovementComponentSchema, MrrMovementDailyRowSchema, MrrMovementReasonSchema, MrrPolicySwitchRowSchema, MrrPolicyVersionSchema, MrrTenantStateRowSchema, NON_RETRYABLE_EVIDENCE_REASONS, NameField, NullableDatetimeField, OPERATOR_EVENT_MAX_ATTEMPTS, OPERATOR_EVENT_NAMES, OPERATOR_EVENT_STATUSES, ObjectiveField, ObjectiveSchema, ObservationMaturitySchema, OnboardingChecklistSchema, OnboardingStateSchema, OperatorEventRequestRowSchema, OpportunityCandidateSchema, OpportunityEvidenceSchema, OpportunityInterpretationSchema, OptimizationSuggestionSchema, OrgMemberRoleSchema, PAID_CONVERSION_WINDOW_DAYS_DEFAULT, PAYER_ACCOUNT_CHANGED_BY, PAYER_ACCOUNT_LINK_MAX_PAGE, PAYER_ACCOUNT_LINK_OUTCOMES, PAYER_ACCOUNT_LINK_STATES, PAYER_ACCOUNT_MATCH_MISSES, PAYER_KEY_PATTERN, PAYMENT_AMOUNT_BASES, PAYMENT_CADENCE_PROVENANCES, PAYMENT_DERIVATION_EVIDENCE, PAYMENT_EVIDENCE_INTERVALS, PERSISTED_SCHEMA_FACET_EXEMPTIONS, PLATFORM_DEFAULT_METRIC_SEMANTICS, PLATFORM_EMITTED_EVENT_NAMES, PLATFORM_EVENT_TAXONOMY, PLAYBOOK_FORMAT_VERSION, PRIMARY_CONTACT_UNRESOLVED_CODE, PROTECTED_SUBSCRIPTION_SAMPLE_LIMIT, PaginatedResponseSchema, PaginationParamsSchema, PayerAccountLinkHistoryEntrySchema, PayerAccountLinkHistorySchema, PayerAccountLinkItemSchema, PayerAccountLinkListQuerySchema, PayerAccountLinkListSchema, PayerAccountLinkRequestSchema, PayerAccountLinkResultSchema, PayerAccountLinkStateSchema, PayerAccountLinkSummarySchema, PayerAccountMatchResultSchema, PayerAccountMoneySchema, PayerKeySchema, PaymentEvidenceCadenceTokenSchema, PaymentEvidenceConfigSchema, PaymentEvidencePlanMappingSchema, PaymentTriggerPayloadSchema, PermissionActionSchema, PermissionResourceSchema, PermissionSchema, PersonalizationTokenSchema, PlacementCapRuleSchema, PlacementCategorySchema, PlacementController, PlacementDecisionOutputSchema, PlacementPayloadSchema, PlacementPerformanceRowSchema, PlacementSchema, PlacementSettingsCapRuleGroupItemSchema, PlacementSettingsCapRuleSchema, PlacementSettingsCapStateSchema, PlacementSettingsSchema, PlacementTestModeSchema, PlacementTestUserIdentifierTypeSchema, PlacementTestUserSchema, PlacementTypeRegistry, PlacementWarningCodeSchema, PlacementWarningSchema, PlanSchema, PlanVariationSchema, PlanVisibilitySchema, PlaybookBodySchema, PlaybookHeaderSchema, PlaybookObjectSchema, RevTurbineConfigPlacementItemSchema as PlaybookPlacementItemSchema, PlaybookSchema, RevTurbineConfigSegmentsItemPredicatesItemSchema as PlaybookSegmentsItemPredicatesItemSchema, RevTurbineConfigSegmentsItemSchema as PlaybookSegmentsItemSchema, PlaybookStrictSchema, RevTurbineConfigUiPathActionTypeSchema as PlaybookUiPathActionTypeSchema, PlaybookVersionDeployResultSchema, PlaybookVersionDiffSchema, PlaybookVersionEntrySummarySchema, PlaybookVersionSchema, PlaybookVersionStatusSchema, PresentationOutcomeSchema, PriceSourceSchema, PricingModelSchema, PrimaryContactDesignationSchema, PrimaryContactResolutionSchema, PrimaryContactUnresolvedReasonSchema, PromotionSchema, PromotionStatusSchema, ProviderAvailabilitySchema, ProviderBindingRefSchema, ProviderCapabilitySchema, ProviderConnectionSchema, ProviderProvenanceSchema, PurchasedAddonSchema$1 as PurchasedAddonSchema, PurchasedAddonsSchema, RECOGNIZED_UPDATE_KEYS, ROLE_PERMISSIONS, ROLE_RANK, ApiError as RevTurbineApiError, RevTurbineBuiltinDimensionsError, RevTurbineClientSessionError, RevTurbineConfigAddonVariationsItemSchema, RevTurbineConfigAddonsItemSchema, RevTurbineConfigEnforcementDefaultsItemSchema, RevTurbineConfigEntitlementRulesItemSchema, RevTurbineConfigEntitlementsItemSchema, RevTurbineConfigMeterBindingsItemSchema, RevTurbineConfigObjectivesItemSchema, RevTurbineConfigPeriodCapSchema, RevTurbineConfigPersonalizationTokensItemSchema, RevTurbineConfigPlacementCategorySchema, RevTurbineConfigPlacementItemSchema, RevTurbineConfigPlacementPayloadItemSchema, RevTurbineConfigPlacementSettingsItemSchema, RevTurbineConfigPlacementSlotsItemSchema, RevTurbineConfigPlacementTriggerSchema, RevTurbineConfigPlanVariationsItemSchema, RevTurbineConfigPlansItemSchema, RevTurbineConfigSchema, RevTurbineConfigSeatTypesItemSchema, RevTurbineConfigSegmentDimensionsItemSchema, RevTurbineConfigSegmentsItemPredicatesItemSchema, RevTurbineConfigSegmentsItemSchema, RevTurbineConfigSlotConfigsItemSchema, RevTurbineConfigStudioCtaConfigSchema, RevTurbineConfigStudioPayloadCapsSchema, RevTurbineConfigStudioPayloadSchema, RevTurbineConfigStudioPayloadSurfaceSchema, RevTurbineConfigStudioPayloadTargetSchema, RevTurbineConfigSurfaceTemplatesItemFieldsItemSchema, RevTurbineConfigSurfaceTemplatesItemSchema, RevTurbineConfigUiPathActionTypeSchema, RevTurbineCustomerSdk, RevTurbineDimensionWriteError, RevTurbineSeatAssignmentError, RevTurbineServer, RevenueMetricSchema, ReverseTrialRuleSchema, ReverseTrialSettingsSchema, ReverseTrialStartPolicySchema, RevturbineB2BTrackEventSchema, RevturbineCanonicalEventContextSchema, RevturbineEventContextSchema, RevturbineIdentitySourceSchema, RevturbineProducerAliasEventSchema, RevturbineProducerEventContextSchema, RevturbineProducerEventSchema, RevturbineProducerGroupEventSchema, RevturbineProducerIdentifyEventSchema, RevturbineProducerPageEventSchema, RevturbineProducerScreenEventSchema, RevturbineProducerSegmentContextSchema, RevturbineProducerTrackEventSchema, RoleSchema, RuleVisibilitySchema, RuntimeMode, RuntimePromotionSnapshotSchema, SDK_AUTOMATIC_NON_EMITTED_NAMES, SDK_CLIENT_EVENT_NAMES, SDK_META_EVENT_NAMES, SDK_SERVER_EVENT_NAMES, SEGMENT_EVENT_METHODS, SEGMENT_MAX_BATCH_BYTES, SEGMENT_MAX_MESSAGE_BYTES, SEGMENT_MAX_MESSAGE_ID_LENGTH, SEMANTIC_ID_PATTERN, SERVER_TRAITS_DOMAIN, SIMULATION_RESET_PREDICATE, SIMULATION_RESET_PREDICATE_DIGEST, SIMULATION_RESET_RESOURCE_SET_DIGEST, SIMULATION_RUNNER_LIMITS, SLOT_ROUTE_ID_PLACEHOLDER, SLOT_ROUTE_MAX_LENGTH, STRIPE_DISCOVERY_EXTERNAL_CONTRACT_EVIDENCE, STRIPE_DISCOVERY_FAILURE_CODES, STRIPE_DISCOVERY_MAX_ATTEMPT_MS, STRIPE_DISCOVERY_MAX_BINDINGS_PER_TICK, STRIPE_DISCOVERY_MAX_PROVIDER_CALLS_PER_ATTEMPT, STRIPE_DISCOVERY_NO_ITEM_KEY, STRIPE_DISCOVERY_OPENING_STATES, STRIPE_DISCOVERY_PAGE_SIZE, STRIPE_DISCOVERY_PENDING_LIMIT, STRIPE_DISCOVERY_PHASES, STRIPE_DISCOVERY_POPULATION_KEY_READABLE_MAX, STRIPE_DISCOVERY_RUN_STATUSES, STRIPE_DISCOVERY_SCOPE_KEY_READABLE_MAX, STRIPE_DISCOVERY_STATES, STRIPE_DISCOVERY_TRIGGERS, STRIPE_OBJECT_ID_PREFIXES, STRIPE_SUBSCRIPTION_STATUS_VALUES, SUBSCRIPTION_BLOCKER_ENTITY, SUBSCRIPTION_EVIDENCE_UNAVAILABLE_CODE, SUBSCRIPTION_EVIDENCE_UNAVAILABLE_REASONS, SUBSCRIPTION_REFERENCE_EXISTS_CODE, SUBSCRIPTION_STATUS_PROTECTION, SURFACE_SLOT_NAME_MAX_LENGTH, SURFACE_SLOT_ROUTE_MAX_LENGTH, SURFACE_SLOT_STATUS_VALUES, SchemaContext, SchemaExposure, SchemaPersistence, SchemaSource, SdkConfigShapeSchema, SdkMetaEventSchema, SdkMetaEventTypeSchema, SdkMetaIngestBatchSchema, SdkSession, SeatTypeSchema, SegmentAliasInputSchema, SegmentB2BTrackEventSchema, SegmentDimensionSchema, SegmentEventContextSchema, SegmentEventInputSchema, SegmentGroupInputSchema, SegmentIdentifyInputSchema, SegmentIngestBatchSchema, SegmentLibraryContextSchema, SegmentPageContextSchema, SegmentPageInputSchema, SegmentSchema, SegmentScreenInputSchema, SegmentTrackInputSchema, SegmentValueSchema, SemanticEventSchema, ServerBuiltinDimensionsWriteSchema, ServerEvaluationPayloadDecisionsItemSchema, ServerEvaluationPayloadEntitlementsValueSchema, ServerEvaluationPayloadSchema, ServerEvaluationPayloadTrialStatusSchema, ServerEvaluationPayloadUserContextSchema, ServerEvaluationPayloadUserSchema, ServerOnly, ServerUserBuiltinDimensionsSchema, ServerUserContextAssignmentSchema, ServerUserContextProvider, ServerUserContextUpsertSchema, SeveritySchema, SimulationChildControlRequestSchema, SimulationChildQualificationReceiptSchema, SimulationChildQualificationRequestSchema, SimulationControlEvidenceSchema, SimulationControlRequestSchema, SimulationExecuteRequestSchema, SimulationExecutionAdmissionSchema, SimulationExecutionFingerprintSchema, SimulationPreparationReceiptSchema, SimulationPrepareRequestSchema, SimulationProbeReceiptSchema, SimulationRunReceiptSchema, SimulationSliceReceiptSchema, SimulationSliceRequestSchema, SimulationTerminalZeroReceiptSchema, SimulationVerifiedControlEventSchema, SimulationVerifiedProvenanceSchema, StripeBillingScopeSchema, StripeCustomerInventorySchema, StripeDiscoveryAccountLinkStatusSchema, StripeDiscoveryFailureCodeSchema, StripeDiscoveryFailureColumnSchema, StripeDiscoveryHealthStateSchema, StripeDiscoveryLinkEvidenceSchema, StripeDiscoveryMapRequestSchema, StripeDiscoveryMapResultSchema, StripeDiscoveryObservationSchema, StripeDiscoveryPendingSubscriptionSchema, StripeDiscoveryPhaseSchema, StripeDiscoveryPopulationSchema, StripeDiscoveryRunSchema, StripeDiscoveryRunStatusSchema, StripeDiscoveryStartResultSchema, StripeDiscoveryStateSchema, StripeDiscoveryStatusSchema, StripeDiscoveryTriggerSchema, StripeDiscoveryUnmatchedItemSchema, StripeDiscoveryUnmatchedPageSchema, StripeDiscoveryUnresolvedReasonSchema, StripeDiscoveryUserLinkStatusSchema, StripeIntegrationConfigSchema, StripePriceBillingPeriodSchema, StripePriceMockBillingPeriodSchema, StripePriceMockSchema, StripePriceSchema, StripePriceScopeSchema, StripeSubscriptionEvidenceSchema, StripeSubscriptionItemSchema, StripeSubscriptionStatusSchema, StudioSurfaceTypeSchema, SubscriptionEvidenceKnownSchema, SubscriptionEvidenceResultSchema, SubscriptionEvidenceUnavailableReasonSchema, SubscriptionEvidenceUnavailableSchema, SubscriptionProtectionSchema, SuggestionSeveritySchema, SupersessionReasonSchema, SupersessionRecordSchema, SurfaceSlotSchema, SurfaceSlotStatusSchema, SurfaceTemplateSchema, SurfaceTypeCapRuleSchema, SurfaceTypeSchema, TERMINAL_SUBSCRIPTION_STATUSES, TRIAL_PENDING_UNKNOWN_REASONS$1 as TRIAL_PENDING_UNKNOWN_REASONS, TRIAL_REVISION_KINDS$1 as TRIAL_REVISION_KINDS, TemplateFieldTypeSchema, TenantConfigSchema, TenantIdField, TenantSchema, TenantStatusSchema, ThemeSchema, TimestampFields, TrackEventSchema, TrackIngestBatchSchema, TreatmentInteractionBatchSchema, TreatmentInteractionInputSchema, TreatmentInteractionRequestSchema, TreatmentInteractionTypeSchema, TrendFeaturesSchema, TrialEligibilityScopeSchema, TrialInstanceSchema, TrialLimitPolicySchema, TrialStatusSchema, TrialTriggerPayloadSchema, TriggerEventTypeSchema, USER_GRAIN_NON_CREATION_SOURCES, UiPreferenceSchema, UnsupportedExperimentAssignmentUnitError, UsageAllocationSchema$1 as UsageAllocationSchema, UsageEnforcementSettingsSchema, UsagePeriodScopeSchema, UsageTriggerPayloadSchema, UserBuiltinDimensionsSchema, UserContextSchema, UserInstanceContextSchema, UserPlanContextSchema, UserRoleSchema, UserTrialStatusSchema, UserUsageEntrySchema, VIEW_ELEMENT_ID_PATTERN, VariantStatisticalSummarySchema, VersionFields, WEBHOOK_DERIVED_EVENT_NAMES, WarGameCapabilityRequirementsSchema, WarGameCategorySchema, WarGameGradeSchema, WarGameOracleSchema, WarGameQualificationLevelSchema, WarGameScenarioSchema, WebhookDeliverySchema, WebhookDispatchStatusSchema, WebhookEventLogSchema, WebhookEventSourceSchema, WebhookEventStatusSchema, WebhookProcessingStatusSchema, WebhookReplayEnvelopeSchema, accountPrimaryContactHistoryOf, adaptExperimentVersionToBucketer, analyticsPaths, analyticsViewPaths, applyPrimaryContactEnrichment, applyValueMaps, assertExperimentAnalysisConfigUpdateAllowed, assertExperimentDecisionPolicyUpdateAllowed, automaticBindingMaySupersede, billingAccountBindingConfidenceOf, billingAccountingRevisionOf, billingCoverageAccountKey, billingCoverageRecordOf, billingEconomicOwnership, billingFactDigest, billingFactHistoryOf, billingFactReferencesOf, billingGenerationRecordOf, billingHistoryIndexTime, billingInvoiceEvidenceProvenances, billingLifecyclePayloadProof, billingMappingHistoryOf, billingMirrorCommonFields, billingMirrorEffectiveMonthlyMinor, billingMirrorTermKey, billingObservationContentHash, billingPaymentEvidenceProvenances, billingProfileCoverageGaps, billingSourceScopeKey, boundBillingProfileKinds, browserSafeTextSchema, bucketSubject, buildAgentCatalogProjection, buildB2BMappingReport, buildControlPlaneEvent, canActivateBillingGeneration, canonicalB2BEventName, catalogMetricImpact, changelogPaths, classifyAccountCreation, classifyInvoiceTransition, classifySubscriptionStatus, classifyTaxonomyEvent, classifyTrackIngestBody, classifyTrialRevision, clearPersistedTheme, collapseBillingRevisions, collectAssignmentFactDeclarations, collectPersistedSchemas, collectVersionedConfigEntities, compareAccountingRevision, compareBillingInstants, compileAnalyticsDraft, composeEffectiveExperimentContext, configPaths, contentPaths, createAnalyticsProvider, createBasicExperimentProvider, createChainedPlacementRequest, createCompositeExperimentProvider, createCustomEndpointRuntimeConfig, createEntitlementPlacementRequest, createFixtureAnalyticsCatalog, createHydrationProviders, createInMemoryAnalyticsCatalog, createLocalRuntimeConfig, createMetricAvailability, createMetricGraph, createNativeExperimentAssignmentProvider, createPostHogAnalyticsProvider, createPostHogIntegration, createRevTurbineApiClient, createSemanticEvent, createServerRuntimeConfig, createSlotPlacementRequest, createStaticPlacementContentLookupProvider, createStaticPlacementResolver, createStaticProviders, createStrictLocalRuntimeConfig, createTreatmentInteraction, currentBrowserRoute, customerPaths, customerProvisioningPaths, decideDeleteProtection, defaultRenderForQuery, defineUiPathResolvers, deriveB2BEvent, deriveBillingAllocationKey, deriveBillingOccurrenceKey, deriveBillingOutputKey, deriveBillingRevisionKey, deriveBillingScheduleComponentKey, deriveLocalTrialStatusFromInstance, deriveReverseTrialGrants, describeUnavailable, entitlementPaths, entitlementResultDenies, environmentPaths, evaluateSegments, evaluateTrialStatus, eventPaths, experimentPaths, fallbackAccountId, filterExternalSchemas, filterPersistedSchemas, financialCatalogCompatibility, findActiveTrialInstance, findLatestStartedTrialInstance, formatCurrencyMinorUnits, getDefaultRegistry, getFieldClassification, getFieldVisibility, getObjectFieldClassifications, getObjectFieldVisibilities, getSchemaClassification, getSchemaDeprecation, getSchemaExposure, getSchemaFacets, getSchemaIdentity, getSchemaPersistence, initRevTurbine, isAnalyticsDateRangeFilterValue, isAutomaticBillingAccountBindingKind, isBrowser, isEvidencedAccountCreation, isExperimentAssignmentFactDeclaration, isFallbackAccountId, isIdentifierLikeSegment, isLegacyDateRangeArray, isRetryableEvidenceReason, isServer, isValidClerkPlanVariation, isVersionedConfigEntity, jsonPlainViolation, latestBillingAccountBinding, liftTrackEventToSegmentInput, loadTheme, makeAnchor, mergeTheme, metricSemanticsFor, metricSliceStatus, metricWindowPreset, mintedIdentity, mrrCalendarVersionOf, namedIdentity, namespacePlatformCollision, normalizeAnalyticsQueryConcept, normalizeAnalyticsViewConcepts, normalizeBrowserText, normalizeConfigArtifactOrThrow, normalizeLegacyConfig, normalizeSlotRoute, parsePlaybook, parsePromotion, parseUiPath, placementPaths, planPaths, playbookVersionPaths, projectClientSafe, promotionPaths, renderMetricImpact, requireSchemaFacets, resetDefaultRegistry, resetPlaybookAliasWarning, resolveAnalyticsQueryConcept, resolveBillingAccountMapping, resolveBranding, resolveBrowserPublicKey, resolveComponentType, resolveContent, resolveLocalPlaybook, resolvePayloadForUser, resolvePayloadForUserWithProvider, resolvePaymentEvidenceConfig, resolvePersistentStorage, resolvePlaybookResolver, resolvePrimaryContact, resolveProviderPlaybook, resolveSdkDeliveryCredential, resolveSessionStorage, resolveSubscriptionEvidence, resolveTokens, routePatternFromParams, sameBillingLifecyclePayload, schemaDeprecation, schemaFacets, scopesSubsetOfRole, searchAgentCatalog, segmentPaths, settingsPaths, simulationControlEvidenceDigest, simulationControlRequestDigest, simulationExecuteOccurrenceKey, simulationRunChildrenMatch, simulationRunnerResources, stripeDiscoveryDisplayRef, stripeDiscoveryLeaseLive, stripeDiscoveryPopulationFor, stripeDiscoveryPopulationKey, stripeDiscoveryRunId, stripeDiscoveryScopeKey, stripeDiscoveryScopeKeyFrom, stripeProofPopulationVerdict, summarizeInvoicePaymentAllocations, summarizeProtectedSubscriptions, tenantPaths, tenantSuppliedIdSchema, toCreateSchema, toWritableSchema, trialPaths, uiPreferencePaths, unavailableEvidence, userContextPaths, validateAnalyticsQuery, validateAnalyticsView, validateB2BTrack, validateBillingProfileForEvent, validateEventPayload, validatePlacementThresholdWarnings, validateReportingTimezone };
export type { AccountCreationClassification, AccountCreationEvidence, AccountCreationEvidenceKind, AccountCreationFacts, AccountCreationPendingReason, AccountCreationSource, AccountPrimaryContactBinding, AccountPrimaryContactHistory, ActivityLevel, AdapterBaseOptions, AddOn, AddOnVariation, Alert, AnalysisProvenance, AnalyticsAgentCatalogEntry, AnalyticsAgentCatalogEntryKind, AnalyticsAnalyticalUnit, AnalyticsAnnotation, AnalyticsAnnotationChange, AnalyticsAnnotationGeneration, AnalyticsAnnotationKind, AnalyticsAnnotationMarker, AnalyticsAnnotationRequest, AnalyticsAnnotationResponse, AnalyticsAnnotationSeries, AnalyticsAnnotationSource, AnalyticsBlockError, AnalyticsBlockResult, AnalyticsCardinalityClass, AnalyticsCatalog, AnalyticsCatalogAnnotationKind, AnalyticsCatalogConcept, AnalyticsCatalogData, AnalyticsCatalogDeprecation, AnalyticsCatalogDimension, AnalyticsCatalogMetric, AnalyticsCatalogMetricValidated, AnalyticsCatalogProvenance, AnalyticsCatalogProvenanceKind, AnalyticsCatalogSearchResult, AnalyticsCatalogSource, AnalyticsCatalogView, AnalyticsClassification, AnalyticsCompareDelta, AnalyticsCompareExperiment, AnalyticsCompareMode, AnalyticsCompareSegment, AnalyticsCompileOutput, AnalyticsCompileResolution, AnalyticsCoverage, AnalyticsCustomizationCapability, AnalyticsCustomizationPolicy, AnalyticsDateRangeFilterValue, AnalyticsDimensionCapability, AnalyticsDimensionType, AnalyticsEventHandler, AnalyticsEventProperties, AnalyticsEventTransformer, AnalyticsFieldType, AnalyticsFilterControl, AnalyticsFilterOperator, AnalyticsFilterState, AnalyticsFilterValue, AnalyticsFormatSpec, AnalyticsFxRateEvidence, AnalyticsFxRateEvidenceSet, AnalyticsGateSettingsApplied, AnalyticsGateSettingsConfig, AnalyticsGateSettingsConfigured, AnalyticsGateSettingsMeta, AnalyticsGateSettingsProvenance, AnalyticsGateSettingsTarget, AnalyticsGateSettingsValues, AnalyticsHistoricalMode, AnalyticsMetricAccounting, AnalyticsMetricAggregationSemantics, AnalyticsMetricCurrencyPolicy, AnalyticsMetricDirection, AnalyticsMetricSemantics, AnalyticsMetricSliceStatus, AnalyticsMetricStatisticalType, AnalyticsMetricWindow, AnalyticsMetricWindowAlignment, AnalyticsMetricWindowPeriod, AnalyticsPeriodCompareMode, AnalyticsProviderOptions, AnalyticsQueryConceptCompatibility, AnalyticsQueryFamily, AnalyticsQueryOverrides, AnalyticsQueryRequest, AnalyticsQueryResponse, AnalyticsRecurringMovementBasis, AnalyticsRenderCartesian, AnalyticsRenderFunnel, AnalyticsRenderMetric, AnalyticsRenderRecommendations, AnalyticsRenderSpec, AnalyticsRenderTable, AnalyticsRenderTimeline, AnalyticsReportingCurrencyMeta, AnalyticsResult, AnalyticsResultAccounting, AnalyticsResultField, AnalyticsResultMeta, AnalyticsSafeChartOptions, AnalyticsSavedView, AnalyticsSemanticFilter, AnalyticsSemanticId, AnalyticsSourceScope, AnalyticsSuggestedPatchOp, AnalyticsTemplateSummary, AnalyticsTimeGrain, AnalyticsValidationCode, AnalyticsValidationIssue, AnalyticsValidationResult, AnalyticsView, AnalyticsViewAccess, AnalyticsViewAccessRole, AnalyticsViewBlock, AnalyticsViewBlockDraft, AnalyticsViewDraft, AnalyticsViewFilter, AnalyticsViewFilterDraft, AnalyticsViewHandoff, AnalyticsViewHandoffDraft, AnalyticsViewLayout, AnalyticsViewQuery, AnalyticsViewRevision, AnalyticsViewVisibility, AnalyticsWarning, AnyDomainProvider, AssignSeatTypeOptions, AssignmentFactUnit, AuditActorType, AuditEvent, AuthAccount, AuthApiKey, AuthInvitation, AuthMember, AuthOrganization, AuthPasskey, AuthSession, AuthSsoProvider, AuthTwoFactor, AuthUser, AuthVerification, B2BCanonicalClass, B2BDerivation, B2BMappingReport, B2BSegmentEventName, B2BSourceMapping, B2BValidation, BasicBucketerExperiment, BasicBucketerOptions, BillingAccountBindingActor, BillingAccountBindingConfidence, BillingAccountBindingEvidence, BillingAccountBindingEvidenceKind, BillingAccountBindingState, BillingAccountMappingResolution, BillingAccountMappingRevision, BillingAccountingRevision, BillingAllocation, BillingBalanceProfile, BillingCadence, BillingChargeObservation, BillingCommittedInput, BillingCommittedResult, BillingCompletedGenerationCheckpoint, BillingComponentEvidence, BillingCoverageCheckpoint, BillingCoverageGap, BillingCoverageGapRange, BillingCoverageGapReason, BillingCoverageRecord, BillingCoverageUnavailableReason, BillingCreditNoteLine, BillingCreditProfile, BillingCreditSettlement, BillingDiscountEvidence, BillingEconomicOwner, BillingEvidenceProvenance, BillingFactHistory, BillingFactReference, BillingGeneration, BillingGenerationCheckpoint, BillingGenerationRecord, BillingHealthStatus, BillingInvoiceHeaderObservation, BillingInvoiceLineObservation, BillingInvoicePaymentObservation, BillingInvoicePaymentSource, BillingInvoiceProfile, BillingInvoiceReceivableKeyInput, BillingInvoiceSourceEvidence, BillingItemStateDerivation, BillingItemStateObservation, BillingLifecycleEvidence, BillingLifecycleInput, BillingLifecycleManifest, BillingLifecycleMappingReference, BillingLifecyclePartition, BillingLifecyclePartitionSelection, BillingLifecyclePayload, BillingLifecycleResult, BillingLifecycleSourceRevision, BillingLifecycleTransition, BillingLifecycleTransitionLink, BillingLossProfile, BillingMappingHistory, BillingMirrorCoverageState, BillingMirrorEntity, BillingMirrorInvoice, BillingMirrorInvoiceLine, BillingMirrorOffering, BillingMirrorPayer, BillingMirrorPayment, BillingMirrorPaymentStatus, BillingMirrorPrice, BillingMirrorPriceTerm, BillingMirrorProvider, BillingMirrorSubscription, BillingMirrorSubscriptionItem, BillingMirrorSubscriptionStatus, BillingObservation, BillingObservationEntityKind, BillingObservationSourceKind, BillingObservationSourceTimeKind, BillingOccurrence, BillingOpeningSeed, BillingOutputKeyInput, BillingOutputKind, BillingOutputRowKey, BillingPaymentIntentObservation, BillingPaymentRecordObservation, BillingPaymentSourceEvidence, BillingPriceTerms, BillingPriceTier, BillingProfile, BillingProfileBinding, BillingProfileName, BillingReconciliation, BillingRecurrence, BillingRecurringDiscount, BillingRecurringDiscountTerms, BillingRecurringMovementContract, BillingRecurringMovementInput, BillingRecurringMovementOccurrence, BillingRecurringNormalizationInput, BillingRecurringNormalizationItem, BillingRecurringOpeningItem, BillingRecurringPrice, BillingRefundProfile, BillingRepeatableOccurrence, BillingScheduleProfile, BillingSettlementAmount, BillingSourceComponentIdentity, BillingSourceComponentObservation, BillingSourceEvidence, BillingSourceObservationEvidence, BillingSourceScope, BillingSubscriptionItemSnapshot, BillingSubscriptionProfile, BillingTransactionProfile, BrandingConfig, BrandingResolutionInput, BrandingSource, BrowserRuntimeOptions, BuiltinDimensionsErrorReason, CanonicalAliasEvent, CanonicalAnalyticsEvent, CanonicalExperimentAllocation, CanonicalGroupEvent, CanonicalIdentifyEvent, CanonicalPageEvent, CanonicalScreenEvent, CanonicalSegmentContext, CanonicalTrackEvent, CapEnforcementResult, CapPeriod, ChangeListener, ChangeLogAction, ChangeLogEntry, ClientContext, ClientSessionResult, CohortMonth, CompileAnalyticsDraftOptions, ComponentType, CompositeExperimentProviderOptions, ConfigArtifact, ConfigTargetDefaults, ContentPayloadSegmentEntry, ContentPlacementPayload, ContentPromotion, ContentProvider, ContentProviderState, ContentUiPath, ControlPlaneEmitInput, ControlPlaneEventSource, ControlPlaneEventType, ControlPlaneSemanticEvent, CreateClientSessionInput, CtaActionType, CtaHandler, CtaHandlerMap, CtaHandlerProvider, CtaHandlerProviderState, CtaObject, CtaPath, CtaPathType, Currency, Customer, CustomerAccount, CustomerAccountCreate, CustomerAccountListQuery, CustomerBuiltinDimensions, CustomerCatalogQuery, CustomerEntityLink, CustomerEntityLinkCreate, CustomerEntityLinkListQuery, CustomerOverride, CustomerOverrideDuration, CustomerOverrideStatus, CustomerOverrideType, CustomerSettableBuiltinDimensionKey, CustomerSummary, CustomerUser, CustomerUserCreate, CustomerUserListQuery, DataClassificationValue, DecisionEngineOptions, DefaultTemplateIds, DeleteProtectionDecision, DeriveTrialStatusInput, DetectorRequirements, DimensionCategory, DimensionSourceType, DimensionWriteErrorReason, DiscountType, DomainProvider, DomainProviderName, DomainProviderResolutionInput, DriftReport, EffectiveUserContextResolution, EligibleAddon, EligiblePlan, EligiblePrice, EmittablePlatformEventName, EnforcementAction, EnforcementMode, Entitlement, EntitlementCheckResult$1 as EntitlementCheckResult, EntitlementGateOptions, EntitlementGateState, EntitlementGrant$1 as EntitlementGrant, EntitlementGrantSet$1 as EntitlementGrantSet, EntitlementGrantSource, EntitlementGrantStatus, EntitlementProvider, EntitlementProviderState, EntitlementResult, EntitlementRule, EntitlementRulePeriodUnit, EntitlementRuleSnapshot, EntitlementRuleTarget, EntitlementRuleTargetKind$1 as EntitlementRuleTargetKind, EntitlementRuleValidated, EntitlementRuleVariant, EntitlementStatus, EntitlementType, EntitlementUsageEntry, Environment, EnvironmentPromotionRequest, EnvironmentStatus, EvaluateTrialStatusInput, EvaluateTrialStatusResult, EvaluationContext, EventConsumer, EventConsumerProvider, EventConsumerProviderState, EventEnvelope, EventEnvelopeReader, EventIngestBatch, EventPayloadContract, EventPayloadContractMap, EventPayloadInput, EventPrefixFamily, EventSearchParams, EventSource, EventStability, EventSurface, EventTaxonomy, EventTaxonomyEntry, EvidenceCoverageState, EvidenceReasonColumn, EvidenceRequirement, Exact, ExactInitOptions, Experiment, ExperimentAnalysisConfig, ExperimentAnalysisDefinition, ExperimentAnalysisResult, ExperimentAnalysisResultRecord, ExperimentAssignmentFact, ExperimentAssignmentFactDeclaration, ExperimentAssignmentFactMetadataCarrier, ExperimentAssignmentProvider, ExperimentAssignmentSource, ExperimentDecisionFindingCode, ExperimentDecisionPolicy, ExperimentDecisionRecord, ExperimentDecisionType, ExperimentEvidence, ExperimentEvidenceSnapshot, ExperimentHealth, ExperimentMetricEvidencePlan, ExperimentMetricResult, ExperimentProvider, ExperimentProviderState, ExperimentStatus, ExperimentType, ExperimentVariant, ExperimentVariantNonAssignmentReason, ExperimentVariantSelection, ExperimentVariantTarget, ExportedConfig, ExportedConfigPlacementItem, ExportedConfigProvider, ExportedConfigSegmentsItem, ExportedConfigSegmentsItemPredicatesItem, ExportedConfigUiPathActionType, FeatureFlag, FeatureFlagValue, FeatureGateTriggerPayload, FieldDefinition, FlagValueType, FreeTrialRule, FreeTrialSettings, FunnelStep, FxDailyRateRow, FxProvider, FxRateDecimal, GateWindowDays, GrowthSignalBundle, GrowthSignalPoint, GrowthSignalSeries, IdentifyContextInput, Identity, IdentityDeclaration, IngestWriteScope, IngestedEvent, InteractionState, InvitationStatus, InvoicePaymentAllocationSummary, InvoicePaymentStatus, InvoiceReceivableTransition, InvoiceSettlementBasis, InvoiceStatus, JsonObject, JsonValue, KpiAggregate, LegacyConfigTargetDefaults, LocalPlacementDataset, LocalPlacementEntry, LocalPlacementPayload, LocalPlacementSurface, LocalizedText, ManagedActivation, ManagedBaselineInput, ManagedBaselineResult, ManagedEvidence, ManagedItemBaseline, ManagedItemHistory, ManagedItemSubject, McpConfig, McpTokenScope, Message, MessageBlock, MessageBlockContent, MessageBlockRecord, MessageBlockSnapshot, MeteringConfig, MetricAvailability, MetricAvailabilityReads, MetricChange, MetricChangeKind, MetricGraph, MetricGraphNode, MetricImpact, MrrAccountFactsRow, MrrCalendarVersion, MrrDailyRow, MrrLocalDate, MrrMovementComponent, MrrMovementDailyRow, MrrMovementKindValue, MrrMovementReason, MrrPolicySwitchRow, MrrPolicyVersion, MrrTenantStateRow, NativeExperimentAssignmentOptions, NativeExperimentAssignmentUnit, Objective, ObservationMaturity, OnboardingChecklist, OnboardingState, OperatorEventRequestRow, OpportunityCandidate, OpportunityEvidence, OpportunityInterpretation, OptimizationSuggestion, OrgMemberRole, PaginationParams, PayerAccountLinkHistory, PayerAccountLinkHistoryEntry, PayerAccountLinkItem, PayerAccountLinkList, PayerAccountLinkListQuery, PayerAccountLinkRequest, PayerAccountLinkResult, PayerAccountLinkState, PayerAccountLinkSummary, PayerAccountMatchResult, PayerAccountMoney, PayerKey, PaymentAmountBasis, PaymentCadenceProvenance, PaymentDerivationEvidence, PaymentEvidenceCadenceToken, PaymentEvidenceConfig, PaymentEvidenceInterval, PaymentEvidencePlanMapping, PaymentTriggerPayload, Permission, PermissionAction, PermissionResource, PersonalizationContext, PersonalizationToken, Placement, PlacementCapPolicy, PlacementCapRule, PlacementCategory, PlacementContentFields, PlacementContentLookupProvider, PlacementControllerOptions, PlacementControllerState, PlacementCustomCode, PlacementDecisionOutput, PlacementEmittedThresholdLookup, PlacementOutput, PlacementPayload, PlacementPayloadSnapshot, PlacementPerformanceRow, PlacementPreviewConfig, PlacementPromotion, PlacementSettings, PlacementSettingsCapRule, PlacementSettingsCapRuleGroupItem, PlacementSettingsCapState, PlacementSlotProps, PlacementSlotType, PlacementTestMode, PlacementTestUser, PlacementTestUserIdentifierType, PlacementUiPath, PlacementUiPathActionType, PlacementWarning, PlacementWarningCode, Plan, PlanProvider, PlanProviderState, PlanRuleSnapshot, PlanVariation, PlanVisibility, PlatformEventName, Playbook, PlaybookBody, PlaybookHeader, PlaybookObject, PlaybookPlacementItem, PlaybookProvider, PlaybookSegmentsItem, PlaybookSegmentsItemPredicatesItem, PlaybookStrict, PlaybookUiPathActionType, PlaybookVersion, PlaybookVersionDeployResult, PlaybookVersionDiff, PlaybookVersionEntrySummary, PlaybookVersionStatus, PostHogAnalyticsProviderOptions, PostHogIntegrationOptions, PostHogLike, PresentationCapState, PresentationOutcome, PriceSource, PricingModel, PrimaryContactDesignation, PrimaryContactEnrichmentResult, PrimaryContactResolution, PrimaryContactScope, PrimaryContactUnresolvedReason, Promotion, PromotionStatus, ProviderAvailability, ProviderBindingRef, ProviderCapability, ProviderConnection, ProviderProvenance, PurchasedAddon$1 as PurchasedAddon, PurchasedAddons, RecognizedIdentifyKey, RecognizedUpdateKey, RegisterPlacementSlotTypeOptions, ReportingTimezoneValidation, ResolvedBranding, ResolvedContent, ResolvedDomainType, ResolvedPayload, ResolvedProviderContext, RevTurbineApiClient, RevTurbineApiClientConfig, paths as RevTurbineApiPaths, RevTurbineAuthoredSlotRef, RevTurbineBootstrapDecisionInput, RevTurbineChainedPlacementRequestOptions, RevTurbineCheckoutMetadata, RevTurbineCheckoutMetadataBag, RevTurbineClientSessionProvider, RevTurbineComponentType, RevTurbineConfig, RevTurbineConfigAddonVariationsItem, RevTurbineConfigAddonsItem, RevTurbineConfigEnforcementDefaultsItem, RevTurbineConfigEntitlementRulesItem, RevTurbineConfigEntitlementsItem, RevTurbineConfigMeterBindingsItem, RevTurbineConfigObjectivesItem, RevTurbineConfigPeriodCap, RevTurbineConfigPersonalizationTokensItem, RevTurbineConfigPlacementCategory, RevTurbineConfigPlacementItem, RevTurbineConfigPlacementPayloadItem, RevTurbineConfigPlacementSettingsItem, RevTurbineConfigPlacementSlotsItem, RevTurbineConfigPlacementTrigger, RevTurbineConfigPlanVariationsItem, RevTurbineConfigPlansItem, RevTurbineConfigProvider, RevTurbineConfigProviderInput, RevTurbineConfigSeatTypesItem, RevTurbineConfigSegmentDimensionsItem, RevTurbineConfigSegmentsItem, RevTurbineConfigSegmentsItemPredicatesItem, RevTurbineConfigSlotConfigsItem, RevTurbineConfigStudioCtaConfig, RevTurbineConfigStudioPayload, RevTurbineConfigStudioPayloadCaps, RevTurbineConfigStudioPayloadSurface, RevTurbineConfigStudioPayloadTarget, RevTurbineConfigSurfaceTemplatesItem, RevTurbineConfigSurfaceTemplatesItemFieldsItem, RevTurbineConfigUiPathActionType, RevTurbineContextMode, RevTurbineContextPolicy, RevTurbineDecisionContent, RevTurbineEndpointOverrides, RevTurbineEntitlementContext, RevTurbineEntitlementPlacementRequestOptions, RevTurbineEntitlementRuleEvaluation, RevTurbineEventBatchingOptions, RevTurbineEventEnvelope, RevTurbineEventOptions, RevTurbineGateResult, RevTurbineImpressionMetadata, RevTurbineInitBaseOptions, RevTurbineInitInputOptions, RevTurbineInitOptions, RevTurbineInitOptionsStrict, RevTurbineInitWithProviderOptions, RevTurbineLocalOnlyMinimalInitOptions, RevTurbineLocalRuntimeData, RevTurbineLocalRuntimeOptions, RevTurbineLocalRuntimeResolvers, RevTurbineMeterUsageOverride, RevTurbinePageContext, RevTurbinePersonalizationTokens, RevTurbinePlacementBehaviorFlags, RevTurbinePlacementConfig, RevTurbinePlacementContent, RevTurbinePlacementDecision, RevTurbinePlacementDecisionExplanation, RevTurbinePlacementDecisionInput, RevTurbinePlacementDecisionOverrides, RevTurbinePlacementPayloadEvaluation, RevTurbinePlacementRecord, RevTurbinePlacementRequestConfig, RevTurbinePlacementRuleEvaluation, RevTurbinePlacementTypeEntity, RevTurbinePlaybookLoadFailure, RevTurbinePlaybookLoadState, RevTurbinePolicySnapshot, RevTurbineProviderFactory, RevTurbineProviderFailureSlotBehavior, RevTurbineRegisteredSlot, RevTurbineRequiredUiPathResolvers, RevTurbineRuntimeMode, RevTurbineSdkMode, RevTurbineSdkProvider, RevTurbineSegmentEvaluation, RevTurbineSegmentPredicateEvaluation, RevTurbineSemanticEvent, RevTurbineServerOptions, RevTurbineSlotInventoryDiagnosis, RevTurbineSlotPlacementRequestOptions, RevTurbineStorage, RevTurbineSurfaceSlotConfig, RevTurbineSurfaceType, RevTurbineTargeting, RevTurbineTelemetryOptions, RevTurbineTheme, RevTurbineThemeColors, RevTurbineThemeInput, RevTurbineThemeShadows, RevTurbineThemeShape, RevTurbineThemeTypography, RevTurbineTreatmentInteractionInput, RevTurbineTreatmentInteractionOptions, RevTurbineTreatmentInteractionRequest, RevTurbineTreatmentInteractionType, RevTurbineTrialContext, RevTurbineTriggerEvent, RevTurbineTriggerPayload, RevTurbineUiPathActionTypes, RevTurbineUiPathResolver, RevTurbineUiPathResolverMap, RevTurbineUiPathResolverValidationIssue, RevTurbineUiPathResolverValidationOptions, RevTurbineUiPathResolverValidationReport, RevTurbineUpdateInput, RevTurbineUsageSnapshot, RevTurbineUsageSnapshotEntry, RevTurbineUserContext, RevenueMetric, ReverseTrialRule, ReverseTrialSettings, ReverseTrialStartPolicy, RevturbineB2BTrackEvent, RevturbineCanonicalEventContext, RevturbineEventContext, RevturbineIdentitySource, RevturbineProducerAliasEvent, RevturbineProducerEvent, RevturbineProducerEventContext, RevturbineProducerGroupEvent, RevturbineProducerIdentifyEvent, RevturbineProducerPageEvent, RevturbineProducerScreenEvent, RevturbineProducerSegmentContext, RevturbineProducerTrackEvent, Role, RuleProvider, RuleProviderState, RuleVisibility, RuntimePromotionSnapshot, SchemaDeprecation, SchemaFacetOptions, SchemaFacets, SdkConfigShape, SdkEventProperties, SdkMetaEvent, SdkMetaEventType, SdkMetaIngestBatch, SdkMetadata, SdkSessionOptions, SdkTraits, SeatAssignmentErrorReason, SeatType, Segment, SegmentAliasInput, SegmentB2BTrackEvent, SegmentDimension, SegmentEventContext, SegmentEventInput, SegmentEventMethod, SegmentGroupInput, SegmentIdentifyInput, SegmentIngestBatch, SegmentLibraryContext, SegmentPageContext, SegmentPageInput, SegmentProvider, SegmentProviderState, SegmentScreenInput, SegmentTrackInput, SegmentValue, SemanticEvent, ServerActionContext, ServerActionHandler, ServerActionMap, ServerActionResult, ServerBuiltinDimensionsWrite, ServerEntitlementResult, ServerEvaluationHydrationPayload, ServerEvaluationPayload, ServerEvaluationPayloadDecisionsItem, ServerEvaluationPayloadEntitlementsValue, ServerEvaluationPayloadTrialStatus, ServerEvaluationPayloadUser, ServerEvaluationPayloadUserContext, ServerEvaluationRequest, ServerPlacementDecision, ServerPlacementRequest, ServerUserBuiltinDimensions, ServerUserContext, ServerUserContextAssignment, ServerUserContextSnapshot, ServerUserContextUpsert, SetBuiltinDimensionsOptions, Severity, SimulationChildControlRequest, SimulationChildQualificationReceipt, SimulationChildQualificationRequest, SimulationControlEvidence, SimulationControlRequest, SimulationExecuteRequest, SimulationExecutionAdmission, SimulationExecutionFingerprint, SimulationPreparationReceipt, SimulationPrepareRequest, SimulationProbeReceipt, SimulationRunReceipt, SimulationSliceReceipt, SimulationSliceRequest, SimulationTerminalZeroReceipt, SimulationVerifiedControlEvent, SimulationVerifiedProvenance, SlotRouteParams, StaticPlacementResolverOptions, StripeBillingScope, StripeCustomerInventory, StripeDiscoveryAccountLinkStatus, StripeDiscoveryFailureCode, StripeDiscoveryFailureColumn, StripeDiscoveryHealthState, StripeDiscoveryLinkEvidence, StripeDiscoveryMapRequest, StripeDiscoveryMapResult, StripeDiscoveryObservation, StripeDiscoveryPendingSubscription, StripeDiscoveryPhase, StripeDiscoveryPopulation, StripeDiscoveryRun, StripeDiscoveryRunStatus, StripeDiscoveryStartResult, StripeDiscoveryState, StripeDiscoveryStatus, StripeDiscoveryTrigger, StripeDiscoveryUnmatchedItem, StripeDiscoveryUnmatchedPage, StripeDiscoveryUnresolvedReason, StripeDiscoveryUserLinkStatus, StripeIntegrationConfig, StripePrice, StripePriceBillingPeriod, StripePriceMock, StripePriceMockBillingPeriod, StripePriceScope, StripeProofPopulationVerdict, StripeSubscriptionEvidence, StripeSubscriptionItem, StripeSubscriptionStatus, StudioSurfaceType, SubscriptionEvidenceKnown, SubscriptionEvidenceResult, SubscriptionEvidenceUnavailable, SubscriptionEvidenceUnavailableReason, SubscriptionProtection, SuggestionSeverity, SupersessionReason, SupersessionRecord, SuppressionResult, SurfaceAvailability, SurfaceSlot, SurfaceSlotStatus, SurfaceTemplate, SurfaceType, SurfaceTypeCapRule, TelemetryConsent, TemplateFieldType, Tenant, TenantConfig, TenantStatus, Theme, ThemeLoaderOptions, ThemeProvider, ThemeProviderState, TrackEvent, TrackEventLiftResult, TrackIngestBatch, TrackIngestBodyClassification, Trait, TraitsNamespace, TraitsProvider, TraitsProviderState, TreatmentInteractionBatch, TreatmentInteractionInput, TreatmentInteractionRequest, TreatmentInteractionType, TrendFeatures, TrialCommitment$1 as TrialCommitment, TrialEligibilityScope, TrialEpisodeFacts$1 as TrialEpisodeFacts, TrialEvidence$1 as TrialEvidence, TrialEvidenceKind$1 as TrialEvidenceKind, TrialInstance, TrialLimitPolicy, TrialPendingUnknownReason$1 as TrialPendingUnknownReason, TrialRevisionClassification$1 as TrialRevisionClassification, TrialRevisionKind$1 as TrialRevisionKind, TrialRevisionPending$1 as TrialRevisionPending, TrialRevisionResolved$1 as TrialRevisionResolved, TrialStatus, TrialStatusProvider, TrialStatusTraits, TrialTriggerPayload, TriggerEventType, UiPreference, UnvalidatedConfigArtifact, UsageAllocation, UsageBalances, UsageEnforcementSettings, UsagePeriodScope, UsageTraits, UsageTraitsProvider, UsageTriggerPayload, UserBuiltinDimensions, UserContext, UserContextInput, UserInstanceContext, UserPlanContext, UserRole, UserTargetingContext, UserTrialStatus, UserUsageEntry, ValidateAnalyticsViewOptions, VariantStatisticalSummary, WarGameCapabilityRequirements, WarGameCategory, WarGameGrade, WarGameOracle, WarGameQualificationLevel, WarGameScenario, WebhookDelivery, WebhookDispatchStatus, WebhookEventLog, WebhookEventSource, WebhookEventStatus, WebhookProcessingStatus, WebhookReplayEnvelope };
type IExtensionName = `x-${string}`;
