import { z } from 'zod'; export declare const tenantStatus: z.ZodEnum<{ active: "active"; deleting: "deleting"; reaped: "reaped"; suspended: "suspended"; }>; export type TenantStatus = z.infer; export declare const tenant: z.ZodObject<{ id: z.core.$ZodBranded; slug: z.ZodString; name: z.ZodString; status: z.ZodEnum<{ active: "active"; deleting: "deleting"; reaped: "reaped"; suspended: "suspended"; }>; createdAt: z.core.$ZodBranded; deletingAt: z.ZodNullable>; provisionedByTenant: z.ZodNullable>; }, z.core.$strip>; export type Tenant = z.infer; export declare const createTenantInput: z.ZodObject<{ id: z.core.$ZodBranded; slug: z.ZodString; name: z.ZodString; provisionedByTenant: z.ZodOptional>>; }, z.core.$strip>; export type CreateTenantInput = z.infer; /** * An organization inside a tenant (K-22) — who membership tuples point at and what * `grantToOrg` targets. Portal customers, staff groups, partner companies. * * `slug` and `name` are **attributes, not identity**: the id is a ULID, so renaming an * org cannot silently orphan the tuples and grants that reference it. `tenantId` on the * row is also kernel-design §4.3's required `orgId ↔ tenantId` join — *"an explicit, * stable directory row, one per tenant, never reconstructed from names or slugs"* — * which is why the identity adapter's org sync hangs off this record rather than a * string convention. * * No lifecycle status yet, deliberately: nothing consumes one, and adding a nullable * column later is additive. The branded id is the part that is brutal to retrofit. */ export declare const org: z.ZodObject<{ id: z.core.$ZodBranded; tenantId: z.core.$ZodBranded; slug: z.ZodString; name: z.ZodString; createdAt: z.core.$ZodBranded; }, z.core.$strip>; export type Org = z.infer; export declare const createOrgInput: z.ZodObject<{ id: z.core.$ZodBranded; tenantId: z.core.$ZodBranded; slug: z.ZodString; name: z.ZodString; }, z.core.$strip>; export type CreateOrgInput = z.infer; export declare const scopeStatus: z.ZodEnum<{ active: "active"; archived: "archived"; archiving: "archiving"; provisioning: "provisioning"; reaped: "reaped"; suspended: "suspended"; }>; export type ScopeStatus = z.infer; export declare const storageShape: z.ZodEnum<{ A: "A"; B: "B"; }>; export type StorageShape = z.infer; export declare const jurisdiction: z.ZodEnum<{ eu: "eu"; global: "global"; us: "us"; }>; export type Jurisdiction = z.infer; export declare const provisionableJurisdiction: z.ZodEnum<{ global: "global"; }>; export type ProvisionableJurisdiction = z.infer; /** * A scope's last *failed* migration attempt (kernel-design §5.3), or null when the * last attempt succeeded and when none has run. * * Migrations fail closed per scope: `applyPendingMigrations` rolls back and throws, * so the scope serves nothing. Before this record existed the directory learned * nothing from that — `schemaVersion` is projected only on the success path, so a * half-migrated scope kept a stale value and rendered as healthy. * * Deliberately **not** a `scopeStatus` member: the scope already fails closed at the * migration layer, so nothing about lifecycle gating changes, and the §3.3 machine * (`provisioning → active → suspended ⇄ active → archiving → archived`) has no * sensible transition for it. (`archived → reaped` extends that machine at the terminal * end — a storage reap, K-34 §4.4 — but that is a real lifecycle transition, unlike a * migration failure.) Structured rather than a flag because the * reconciliation sweep (§5.3) retries with backoff and reports * "487/500 migrated, 13 pending, 0 failed" — which needs the attempt count and the * failing version, not a boolean. * * `attempts` counts *consecutive* failures and resets to 0 on a successful apply. */ export declare const migrationFailureRecord: z.ZodObject<{ version: z.ZodString; error: z.ZodString; attempts: z.ZodNumber; lastAttemptAt: z.core.$ZodBranded; }, z.core.$strip>; export type MigrationFailureRecord = z.infer; export declare const migrationFailure: z.ZodNullable; }, z.core.$strip>>; export type MigrationFailure = z.infer; /** * One scope the reconciliation sweep (kernel-design §5.3, #49) still owes a * migration: `pending` = behind the deployed frontier with no recorded failure * (typically never woken since the release), `failed` = its last attempt threw * and the scope fails closed. `flagged` marks a failed scope whose consecutive * attempts crossed the paging threshold — the "page past a threshold" signal. */ export declare const migrationStraggler: z.ZodObject<{ tenantId: z.core.$ZodBranded; scopeId: z.core.$ZodBranded; slug: z.ZodString; vertical: z.ZodNullable; schemaVersion: z.ZodString; state: z.ZodEnum<{ failed: "failed"; pending: "pending"; }>; failure: z.ZodNullable; }, z.core.$strip>>; flagged: z.ZodBoolean; }, z.core.$strip>; export type MigrationStraggler = z.infer; /** * Fleet migration progress in the shape §5.3 names — "release N: X/Y migrated, * P pending, F failed" — computed from the directory alone (§5.4: fleet * questions never fan out). `release` is the deployed migration frontier's * label: the registered (module, version) count, the same number * `scope.schemaVersion` counts toward, so the comparison needs no second * bookkeeping. `complete` is the expand–contract gate: the skew window is * closed — and a destructive follow-up release is shippable — only when it is * true. `stragglers` is capped by the producer (failed first); the counts are * always the whole truth. */ export declare const migrationProgress: z.ZodObject<{ release: z.ZodString; total: z.ZodNumber; migrated: z.ZodNumber; pending: z.ZodNumber; failed: z.ZodNumber; complete: z.ZodBoolean; stragglers: z.ZodArray; scopeId: z.core.$ZodBranded; slug: z.ZodString; vertical: z.ZodNullable; schemaVersion: z.ZodString; state: z.ZodEnum<{ failed: "failed"; pending: "pending"; }>; failure: z.ZodNullable; }, z.core.$strip>>; flagged: z.ZodBoolean; }, z.core.$strip>>; summary: z.ZodString; }, z.core.$strip>; export type MigrationProgress = z.infer; export declare const scope: z.ZodObject<{ id: z.core.$ZodBranded; tenantId: z.core.$ZodBranded; parentScopeId: z.ZodNullable>; slug: z.ZodString; kind: z.ZodString; name: z.ZodString; status: z.ZodEnum<{ active: "active"; archived: "archived"; archiving: "archiving"; provisioning: "provisioning"; reaped: "reaped"; suspended: "suspended"; }>; storageShape: z.ZodEnum<{ A: "A"; B: "B"; }>; jurisdiction: z.ZodEnum<{ eu: "eu"; global: "global"; us: "us"; }>; vertical: z.ZodNullable; verticalVersionId: z.ZodNullable; provisionedVersionId: z.ZodNullable; schemaVersion: z.ZodString; migrationFailure: z.ZodNullable; }, z.core.$strip>>; forkedFrom: z.ZodNullable>; forkedAt: z.ZodNullable>; expiresAt: z.ZodNullable>; servingRef: z.ZodOptional>; archivedAt: z.ZodNullable>; createdAt: z.core.$ZodBranded; }, z.core.$strip>; export type Scope = z.infer; //# sourceMappingURL=tenancy.d.ts.map