/** * Environment configuration schemas and types. * * The env.json document is the single source of truth for a Log10x environment: * cluster identity, SIEM destination, offload destinations (multi-target so we * can drain a legacy bucket while a new one is primary), streamer + retriever * endpoints. Everything tools need to act on a given environment is described * here, validated by zod, and persisted to whichever on-prem store the * customer's cloud uses (Kubernetes ConfigMap, AWS SSM, GCP Secret Manager, * Azure App Configuration, or a local file for dev). * * Schema is versioned (`schema_version`) so we can evolve the document without * breaking older readers — readers refuse on mismatch rather than guess. */ import { z } from 'zod'; /** * A single offload destination — where the Receiver can write objects when a * pattern is tagged `offload`. The array is non-empty because the resolver * needs at least one default to point new offload rules at. `status` lets us * keep historical buckets in the document while signalling they're no longer * being written to (`draining` = still being read, `archived` = read-only * reference, `failed` = quarantined after write errors). */ export declare const offloadDestinationSchema: z.ZodObject<{ nickname: z.ZodString; type: z.ZodEnum<["s3", "gcs", "azure_blob", "file"]>; status: z.ZodDefault>; bucket: z.ZodOptional; prefix: z.ZodOptional; region: z.ZodOptional; project_id: z.ZodOptional; storage_account: z.ZodOptional; path: z.ZodOptional; auth: z.ZodOptional; role: z.ZodOptional; sa: z.ZodOptional; note: z.ZodOptional; }, "strip", z.ZodTypeAny, { method: "none" | "irsa" | "iam_role" | "workload_identity" | "service_principal" | "access_key" | "connection_string"; role?: string | undefined; sa?: string | undefined; note?: string | undefined; }, { method: "none" | "irsa" | "iam_role" | "workload_identity" | "service_principal" | "access_key" | "connection_string"; role?: string | undefined; sa?: string | undefined; note?: string | undefined; }>>; archived_at: z.ZodOptional; first_used_at: z.ZodOptional; note: z.ZodOptional; }, "strip", z.ZodTypeAny, { status: "failed" | "active" | "draining" | "archived"; type: "s3" | "gcs" | "azure_blob" | "file"; nickname: string; auth?: { method: "none" | "irsa" | "iam_role" | "workload_identity" | "service_principal" | "access_key" | "connection_string"; role?: string | undefined; sa?: string | undefined; note?: string | undefined; } | undefined; region?: string | undefined; path?: string | undefined; bucket?: string | undefined; prefix?: string | undefined; project_id?: string | undefined; storage_account?: string | undefined; note?: string | undefined; archived_at?: string | undefined; first_used_at?: string | undefined; }, { type: "s3" | "gcs" | "azure_blob" | "file"; nickname: string; status?: "failed" | "active" | "draining" | "archived" | undefined; auth?: { method: "none" | "irsa" | "iam_role" | "workload_identity" | "service_principal" | "access_key" | "connection_string"; role?: string | undefined; sa?: string | undefined; note?: string | undefined; } | undefined; region?: string | undefined; path?: string | undefined; bucket?: string | undefined; prefix?: string | undefined; project_id?: string | undefined; storage_account?: string | undefined; note?: string | undefined; archived_at?: string | undefined; first_used_at?: string | undefined; }>; /** * Where this environment lives. `type` is the cluster flavour; the rest are * cloud-specific locators that let us emit the right offload-recipe IAM and * choose the right on-prem store implementation (EKS → SSM, GKE → GCP SM, * AKS → Azure App Config). */ export declare const clusterIdentitySchema: z.ZodObject<{ type: z.ZodEnum<["eks", "gke", "aks", "kind", "minikube", "bare_metal", "other"]>; region: z.ZodOptional; account: z.ZodOptional; project_id: z.ZodOptional; subscription: z.ZodOptional; context_name: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "kind" | "eks" | "gke" | "aks" | "minikube" | "bare_metal" | "other"; region?: string | undefined; project_id?: string | undefined; account?: string | undefined; subscription?: string | undefined; context_name?: string | undefined; }, { type: "kind" | "eks" | "gke" | "aks" | "minikube" | "bare_metal" | "other"; region?: string | undefined; project_id?: string | undefined; account?: string | undefined; subscription?: string | undefined; context_name?: string | undefined; }>; /** * The SIEM this environment's logs ultimately land in. Drives action * eligibility (e.g. `tier_down` only makes sense for Datadog/CloudWatch/Azure) * and the explainer copy on commitment_report. */ export declare const siemDestinationSchema: z.ZodObject<{ siem_vendor: z.ZodEnum<["splunk", "datadog", "elasticsearch", "clickhouse", "cloudwatch", "azure-monitor", "gcp-logging", "sumo", "coralogix", "elastic-serverless", "other"]>; region: z.ZodOptional; log_group_prefix: z.ZodOptional; ingest_url: z.ZodOptional; }, "strip", z.ZodTypeAny, { siem_vendor: "datadog" | "other" | "splunk" | "elasticsearch" | "clickhouse" | "cloudwatch" | "azure-monitor" | "gcp-logging" | "sumo" | "coralogix" | "elastic-serverless"; region?: string | undefined; log_group_prefix?: string | undefined; ingest_url?: string | undefined; }, { siem_vendor: "datadog" | "other" | "splunk" | "elasticsearch" | "clickhouse" | "cloudwatch" | "azure-monitor" | "gcp-logging" | "sumo" | "coralogix" | "elastic-serverless"; region?: string | undefined; log_group_prefix?: string | undefined; ingest_url?: string | undefined; }>; /** * Streamer endpoint — the in-cluster service that fronts the Receiver's * compact/sample/drop/offload decisions. `target_path` is the optional * sub-path when the streamer is mounted behind a shared ingress. */ export declare const streamerConfigSchema: z.ZodObject<{ url: z.ZodString; target_path: z.ZodOptional; }, "strip", z.ZodTypeAny, { url: string; target_path?: string | undefined; }, { url: string; target_path?: string | undefined; }>; /** * Retriever endpoint and the queues it owns. The retriever reads from * `input_bucket` (the customer-owned overflow bucket), serves queries via `url`, and uses the four * SQS queues for index/subquery/stream/query coordination. `query_log_group` * is the CloudWatch group we tail when investigating retriever failures. */ export declare const retrieverConfigSchema: z.ZodObject<{ url: z.ZodString; input_bucket: z.ZodString; input_prefix: z.ZodOptional; query_queues: z.ZodObject<{ index: z.ZodString; subquery: z.ZodString; stream: z.ZodString; query: z.ZodString; }, "strip", z.ZodTypeAny, { query: string; index: string; subquery: string; stream: string; }, { query: string; index: string; subquery: string; stream: string; }>; query_log_group: z.ZodOptional; helm_release: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; namespace: string; chart_version?: string | undefined; }, { name: string; namespace: string; chart_version?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { url: string; input_bucket: string; query_queues: { query: string; index: string; subquery: string; stream: string; }; input_prefix?: string | undefined; query_log_group?: string | undefined; helm_release?: { name: string; namespace: string; chart_version?: string | undefined; } | undefined; }, { url: string; input_bucket: string; query_queues: { query: string; index: string; subquery: string; stream: string; }; input_prefix?: string | undefined; query_log_group?: string | undefined; helm_release?: { name: string; namespace: string; chart_version?: string | undefined; } | undefined; }>; /** * The full environment document persisted to the on-prem store. `env_id` is * the stable identifier (UUID); `nickname` is the human-friendly key that * users type at the prompt. Both must resolve to the same document. */ export declare const environmentConfigSchema: z.ZodObject<{ schema_version: z.ZodLiteral<"1.0">; env_id: z.ZodString; nickname: z.ZodString; cluster: z.ZodObject<{ type: z.ZodEnum<["eks", "gke", "aks", "kind", "minikube", "bare_metal", "other"]>; region: z.ZodOptional; account: z.ZodOptional; project_id: z.ZodOptional; subscription: z.ZodOptional; context_name: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "kind" | "eks" | "gke" | "aks" | "minikube" | "bare_metal" | "other"; region?: string | undefined; project_id?: string | undefined; account?: string | undefined; subscription?: string | undefined; context_name?: string | undefined; }, { type: "kind" | "eks" | "gke" | "aks" | "minikube" | "bare_metal" | "other"; region?: string | undefined; project_id?: string | undefined; account?: string | undefined; subscription?: string | undefined; context_name?: string | undefined; }>; destination: z.ZodObject<{ siem_vendor: z.ZodEnum<["splunk", "datadog", "elasticsearch", "clickhouse", "cloudwatch", "azure-monitor", "gcp-logging", "sumo", "coralogix", "elastic-serverless", "other"]>; region: z.ZodOptional; log_group_prefix: z.ZodOptional; ingest_url: z.ZodOptional; }, "strip", z.ZodTypeAny, { siem_vendor: "datadog" | "other" | "splunk" | "elasticsearch" | "clickhouse" | "cloudwatch" | "azure-monitor" | "gcp-logging" | "sumo" | "coralogix" | "elastic-serverless"; region?: string | undefined; log_group_prefix?: string | undefined; ingest_url?: string | undefined; }, { siem_vendor: "datadog" | "other" | "splunk" | "elasticsearch" | "clickhouse" | "cloudwatch" | "azure-monitor" | "gcp-logging" | "sumo" | "coralogix" | "elastic-serverless"; region?: string | undefined; log_group_prefix?: string | undefined; ingest_url?: string | undefined; }>; offload_destinations: z.ZodArray; status: z.ZodDefault>; bucket: z.ZodOptional; prefix: z.ZodOptional; region: z.ZodOptional; project_id: z.ZodOptional; storage_account: z.ZodOptional; path: z.ZodOptional; auth: z.ZodOptional; role: z.ZodOptional; sa: z.ZodOptional; note: z.ZodOptional; }, "strip", z.ZodTypeAny, { method: "none" | "irsa" | "iam_role" | "workload_identity" | "service_principal" | "access_key" | "connection_string"; role?: string | undefined; sa?: string | undefined; note?: string | undefined; }, { method: "none" | "irsa" | "iam_role" | "workload_identity" | "service_principal" | "access_key" | "connection_string"; role?: string | undefined; sa?: string | undefined; note?: string | undefined; }>>; archived_at: z.ZodOptional; first_used_at: z.ZodOptional; note: z.ZodOptional; }, "strip", z.ZodTypeAny, { status: "failed" | "active" | "draining" | "archived"; type: "s3" | "gcs" | "azure_blob" | "file"; nickname: string; auth?: { method: "none" | "irsa" | "iam_role" | "workload_identity" | "service_principal" | "access_key" | "connection_string"; role?: string | undefined; sa?: string | undefined; note?: string | undefined; } | undefined; region?: string | undefined; path?: string | undefined; bucket?: string | undefined; prefix?: string | undefined; project_id?: string | undefined; storage_account?: string | undefined; note?: string | undefined; archived_at?: string | undefined; first_used_at?: string | undefined; }, { type: "s3" | "gcs" | "azure_blob" | "file"; nickname: string; status?: "failed" | "active" | "draining" | "archived" | undefined; auth?: { method: "none" | "irsa" | "iam_role" | "workload_identity" | "service_principal" | "access_key" | "connection_string"; role?: string | undefined; sa?: string | undefined; note?: string | undefined; } | undefined; region?: string | undefined; path?: string | undefined; bucket?: string | undefined; prefix?: string | undefined; project_id?: string | undefined; storage_account?: string | undefined; note?: string | undefined; archived_at?: string | undefined; first_used_at?: string | undefined; }>, "many">; streamer: z.ZodObject<{ url: z.ZodString; target_path: z.ZodOptional; }, "strip", z.ZodTypeAny, { url: string; target_path?: string | undefined; }, { url: string; target_path?: string | undefined; }>; retriever: z.ZodObject<{ url: z.ZodString; input_bucket: z.ZodString; input_prefix: z.ZodOptional; query_queues: z.ZodObject<{ index: z.ZodString; subquery: z.ZodString; stream: z.ZodString; query: z.ZodString; }, "strip", z.ZodTypeAny, { query: string; index: string; subquery: string; stream: string; }, { query: string; index: string; subquery: string; stream: string; }>; query_log_group: z.ZodOptional; helm_release: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; namespace: string; chart_version?: string | undefined; }, { name: string; namespace: string; chart_version?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { url: string; input_bucket: string; query_queues: { query: string; index: string; subquery: string; stream: string; }; input_prefix?: string | undefined; query_log_group?: string | undefined; helm_release?: { name: string; namespace: string; chart_version?: string | undefined; } | undefined; }, { url: string; input_bucket: string; query_queues: { query: string; index: string; subquery: string; stream: string; }; input_prefix?: string | undefined; query_log_group?: string | undefined; helm_release?: { name: string; namespace: string; chart_version?: string | undefined; } | undefined; }>; updated_at: z.ZodOptional; updated_by: z.ZodOptional; }, "strip", z.ZodTypeAny, { nickname: string; schema_version: "1.0"; env_id: string; cluster: { type: "kind" | "eks" | "gke" | "aks" | "minikube" | "bare_metal" | "other"; region?: string | undefined; project_id?: string | undefined; account?: string | undefined; subscription?: string | undefined; context_name?: string | undefined; }; destination: { siem_vendor: "datadog" | "other" | "splunk" | "elasticsearch" | "clickhouse" | "cloudwatch" | "azure-monitor" | "gcp-logging" | "sumo" | "coralogix" | "elastic-serverless"; region?: string | undefined; log_group_prefix?: string | undefined; ingest_url?: string | undefined; }; offload_destinations: { status: "failed" | "active" | "draining" | "archived"; type: "s3" | "gcs" | "azure_blob" | "file"; nickname: string; auth?: { method: "none" | "irsa" | "iam_role" | "workload_identity" | "service_principal" | "access_key" | "connection_string"; role?: string | undefined; sa?: string | undefined; note?: string | undefined; } | undefined; region?: string | undefined; path?: string | undefined; bucket?: string | undefined; prefix?: string | undefined; project_id?: string | undefined; storage_account?: string | undefined; note?: string | undefined; archived_at?: string | undefined; first_used_at?: string | undefined; }[]; streamer: { url: string; target_path?: string | undefined; }; retriever: { url: string; input_bucket: string; query_queues: { query: string; index: string; subquery: string; stream: string; }; input_prefix?: string | undefined; query_log_group?: string | undefined; helm_release?: { name: string; namespace: string; chart_version?: string | undefined; } | undefined; }; updated_at?: string | undefined; updated_by?: string | undefined; }, { nickname: string; schema_version: "1.0"; env_id: string; cluster: { type: "kind" | "eks" | "gke" | "aks" | "minikube" | "bare_metal" | "other"; region?: string | undefined; project_id?: string | undefined; account?: string | undefined; subscription?: string | undefined; context_name?: string | undefined; }; destination: { siem_vendor: "datadog" | "other" | "splunk" | "elasticsearch" | "clickhouse" | "cloudwatch" | "azure-monitor" | "gcp-logging" | "sumo" | "coralogix" | "elastic-serverless"; region?: string | undefined; log_group_prefix?: string | undefined; ingest_url?: string | undefined; }; offload_destinations: { type: "s3" | "gcs" | "azure_blob" | "file"; nickname: string; status?: "failed" | "active" | "draining" | "archived" | undefined; auth?: { method: "none" | "irsa" | "iam_role" | "workload_identity" | "service_principal" | "access_key" | "connection_string"; role?: string | undefined; sa?: string | undefined; note?: string | undefined; } | undefined; region?: string | undefined; path?: string | undefined; bucket?: string | undefined; prefix?: string | undefined; project_id?: string | undefined; storage_account?: string | undefined; note?: string | undefined; archived_at?: string | undefined; first_used_at?: string | undefined; }[]; streamer: { url: string; target_path?: string | undefined; }; retriever: { url: string; input_bucket: string; query_queues: { query: string; index: string; subquery: string; stream: string; }; input_prefix?: string | undefined; query_log_group?: string | undefined; helm_release?: { name: string; namespace: string; chart_version?: string | undefined; } | undefined; }; updated_at?: string | undefined; updated_by?: string | undefined; }>; export type EnvironmentConfig = z.infer; export type OffloadDestination = z.infer; export type ClusterIdentity = z.infer; export type SiemDestination = z.infer; export type StreamerConfig = z.infer; export type RetrieverConfig = z.infer;