Initial project snapshot
This commit is contained in:
@@ -0,0 +1,529 @@
|
||||
export type Cluster = {
|
||||
id: string;
|
||||
slug: string;
|
||||
name: string;
|
||||
status: string;
|
||||
region?: string | null;
|
||||
metadata?: Record<string, unknown>;
|
||||
created_at: string;
|
||||
updated_at?: string;
|
||||
};
|
||||
|
||||
export type AuthUser = {
|
||||
ID?: string;
|
||||
id?: string;
|
||||
Email?: string;
|
||||
email?: string;
|
||||
};
|
||||
|
||||
export type AuthSession = {
|
||||
ID?: string;
|
||||
id?: string;
|
||||
};
|
||||
|
||||
export type AuthTokens = {
|
||||
access_token: string;
|
||||
access_token_expires_at: string;
|
||||
refresh_token: string;
|
||||
refresh_token_expires_at: string;
|
||||
};
|
||||
|
||||
export type AuthResult = {
|
||||
user: AuthUser;
|
||||
auth_session: AuthSession;
|
||||
tokens: AuthTokens;
|
||||
};
|
||||
|
||||
export type InstallationStatus = {
|
||||
bootstrapped: boolean;
|
||||
authority_state: string;
|
||||
install_id?: string;
|
||||
bootstrapped_owner_email?: string;
|
||||
bootstrapped_at?: string;
|
||||
authority_mode: string;
|
||||
strict_authority: boolean;
|
||||
root_fingerprint?: string;
|
||||
insecure_bootstrap_allowed: boolean;
|
||||
};
|
||||
|
||||
export type BootstrapOwnerResult = {
|
||||
installation: InstallationStatus;
|
||||
user: AuthUser;
|
||||
platform_role: string;
|
||||
};
|
||||
|
||||
export type ClusterAuthorityState = {
|
||||
cluster_id: string;
|
||||
authority_state: string;
|
||||
mutation_mode: string;
|
||||
term: number;
|
||||
notes?: string | null;
|
||||
updated_by_user_id?: string | null;
|
||||
updated_at: string;
|
||||
};
|
||||
|
||||
export type ClusterNode = {
|
||||
id: string;
|
||||
owner_organization_id?: string | null;
|
||||
node_key: string;
|
||||
name: string;
|
||||
ownership_type: string;
|
||||
registration_status: string;
|
||||
health_status: string;
|
||||
version_state: string;
|
||||
partition_state: string;
|
||||
reported_version?: string | null;
|
||||
last_seen_at?: string | null;
|
||||
membership_status: string;
|
||||
membership_metadata?: Record<string, unknown>;
|
||||
node_group_id?: string | null;
|
||||
node_group_name?: string | null;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
};
|
||||
|
||||
export type ClusterNodeGroup = {
|
||||
id: string;
|
||||
cluster_id: string;
|
||||
parent_group_id?: string | null;
|
||||
name: string;
|
||||
description?: string | null;
|
||||
sort_order: number;
|
||||
metadata?: Record<string, unknown>;
|
||||
created_by_user_id?: string | null;
|
||||
created_at: string;
|
||||
updated_at?: string;
|
||||
};
|
||||
|
||||
export type JoinRequest = {
|
||||
id: string;
|
||||
cluster_id: string;
|
||||
node_name: string;
|
||||
node_fingerprint: string;
|
||||
public_key?: string;
|
||||
reported_capabilities: Record<string, unknown>;
|
||||
reported_facts: Record<string, unknown>;
|
||||
requested_roles: unknown[];
|
||||
status: string;
|
||||
reviewed_at?: string | null;
|
||||
approved_node_id?: string | null;
|
||||
rejection_reason?: string | null;
|
||||
created_at: string;
|
||||
updated_at?: string;
|
||||
approval_payload?: Record<string, unknown>;
|
||||
approval_signature?: ClusterSignature;
|
||||
};
|
||||
|
||||
export type ClusterSignature = {
|
||||
schema_version: string;
|
||||
algorithm: string;
|
||||
key_fingerprint: string;
|
||||
signature: string;
|
||||
signed_at: string;
|
||||
};
|
||||
|
||||
export type ClusterAuthorityDescriptor = {
|
||||
schema_version: string;
|
||||
cluster_id: string;
|
||||
authority_state: string;
|
||||
key_algorithm: string;
|
||||
public_key: string;
|
||||
public_key_fingerprint: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
};
|
||||
|
||||
export type CreatedJoinToken = {
|
||||
id: string;
|
||||
cluster_id: string;
|
||||
scope: Record<string, unknown>;
|
||||
expires_at: string;
|
||||
max_uses: number;
|
||||
used_count: number;
|
||||
status: string;
|
||||
created_at: string;
|
||||
revoked_at?: string | null;
|
||||
authority_payload?: Record<string, unknown>;
|
||||
authority_signature?: ClusterSignature;
|
||||
token: string;
|
||||
};
|
||||
|
||||
export type RoleAssignment = {
|
||||
id: string;
|
||||
cluster_id: string;
|
||||
node_id: string;
|
||||
organization_id?: string | null;
|
||||
role: string;
|
||||
status: string;
|
||||
policy?: Record<string, unknown>;
|
||||
assigned_at: string;
|
||||
revoked_at?: string | null;
|
||||
};
|
||||
|
||||
export type AuditEvent = {
|
||||
id: string;
|
||||
cluster_id?: string | null;
|
||||
actor_user_id?: string | null;
|
||||
event_type: string;
|
||||
target_type: string;
|
||||
target_id?: string | null;
|
||||
payload: Record<string, unknown>;
|
||||
created_at: string;
|
||||
};
|
||||
|
||||
export type WorkloadStatus = {
|
||||
id: string;
|
||||
cluster_id: string;
|
||||
node_id: string;
|
||||
service_type: string;
|
||||
reported_state: string;
|
||||
runtime_mode: string;
|
||||
version?: string | null;
|
||||
status_payload?: Record<string, unknown>;
|
||||
observed_at: string;
|
||||
};
|
||||
|
||||
export type NodeWorkloadDesiredState = {
|
||||
cluster_id: string;
|
||||
node_id: string;
|
||||
service_type: string;
|
||||
desired_state: string;
|
||||
version?: string | null;
|
||||
runtime_mode: string;
|
||||
artifact_ref?: string | null;
|
||||
config?: Record<string, unknown>;
|
||||
environment?: Record<string, unknown>;
|
||||
updated_by_user_id?: string | null;
|
||||
updated_at: string;
|
||||
};
|
||||
|
||||
export type NodeHeartbeat = {
|
||||
id: string;
|
||||
cluster_id: string;
|
||||
node_id: string;
|
||||
health_status: string;
|
||||
reported_version?: string | null;
|
||||
capabilities?: Record<string, unknown>;
|
||||
service_states?: Record<string, unknown>;
|
||||
metadata?: Record<string, unknown>;
|
||||
observed_at: string;
|
||||
};
|
||||
|
||||
export type FabricTestingFlag = {
|
||||
id: string;
|
||||
scope_type: string;
|
||||
scope_id?: string | null;
|
||||
cluster_id?: string | null;
|
||||
enabled: boolean;
|
||||
telemetry_enabled: boolean;
|
||||
synthetic_links_enabled: boolean;
|
||||
history_retention_hours: number;
|
||||
metadata?: Record<string, unknown>;
|
||||
updated_by_user_id?: string | null;
|
||||
updated_at: string;
|
||||
};
|
||||
|
||||
export type NodeTelemetryObservation = {
|
||||
id: string;
|
||||
cluster_id: string;
|
||||
node_id: string;
|
||||
cpu_percent?: number | null;
|
||||
memory_used_bytes?: number | null;
|
||||
memory_total_bytes?: number | null;
|
||||
disk_used_bytes?: number | null;
|
||||
disk_total_bytes?: number | null;
|
||||
network_rx_bytes?: number | null;
|
||||
network_tx_bytes?: number | null;
|
||||
process_count?: number | null;
|
||||
payload?: Record<string, unknown>;
|
||||
observed_at: string;
|
||||
};
|
||||
|
||||
export type MeshLink = {
|
||||
id: string;
|
||||
cluster_id: string;
|
||||
source_node_id: string;
|
||||
target_node_id: string;
|
||||
link_status: string;
|
||||
latency_ms?: number | null;
|
||||
quality_score?: number | null;
|
||||
metadata?: Record<string, unknown>;
|
||||
observed_at: string;
|
||||
};
|
||||
|
||||
export type PeerEndpointCandidate = {
|
||||
endpoint_id: string;
|
||||
node_id: string;
|
||||
transport: string;
|
||||
address: string;
|
||||
address_family?: string | null;
|
||||
reachability: string;
|
||||
nat_type?: string | null;
|
||||
connectivity_mode: string;
|
||||
region?: string | null;
|
||||
priority: number;
|
||||
policy_tags?: string[];
|
||||
last_verified_at?: string | null;
|
||||
metadata?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
export type PeerDirectoryEntry = {
|
||||
node_id: string;
|
||||
route_ids?: string[];
|
||||
endpoint_count: number;
|
||||
candidate_count: number;
|
||||
connectivity_modes?: string[];
|
||||
recovery_seed: boolean;
|
||||
};
|
||||
|
||||
export type PeerRecoverySeed = {
|
||||
node_id: string;
|
||||
endpoint: string;
|
||||
transport: string;
|
||||
connectivity_mode?: string | null;
|
||||
region?: string | null;
|
||||
priority: number;
|
||||
last_verified_at?: string | null;
|
||||
metadata?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
export type PeerRendezvousLease = {
|
||||
lease_id: string;
|
||||
peer_node_id: string;
|
||||
relay_node_id: string;
|
||||
relay_endpoint: string;
|
||||
transport: string;
|
||||
connectivity_mode?: string | null;
|
||||
route_ids?: string[];
|
||||
allowed_channels?: string[];
|
||||
priority: number;
|
||||
control_plane_only: boolean;
|
||||
issued_at: string;
|
||||
expires_at: string;
|
||||
reason?: string | null;
|
||||
metadata?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
export type RendezvousRelayPolicyDecision = {
|
||||
route_id?: string;
|
||||
peer_node_id: string;
|
||||
withdrawn_lease_id?: string;
|
||||
stale_relay_node_id?: string;
|
||||
selected_relay_id?: string;
|
||||
selected_endpoint?: string;
|
||||
score?: number;
|
||||
reason: string;
|
||||
score_reasons?: string[];
|
||||
reporter_node_id?: string;
|
||||
};
|
||||
|
||||
export type RendezvousRelayPolicyReport = {
|
||||
schema_version: string;
|
||||
scoring_mode: string;
|
||||
feedback_max_age_seconds: number;
|
||||
stale_relay_count: number;
|
||||
withdrawn_lease_count: number;
|
||||
replacement_lease_count: number;
|
||||
decisions?: RendezvousRelayPolicyDecision[];
|
||||
};
|
||||
|
||||
export type RoutePathDecision = {
|
||||
decision_id: string;
|
||||
route_id: string;
|
||||
cluster_id: string;
|
||||
local_node_id: string;
|
||||
source_node_id: string;
|
||||
destination_node_id: string;
|
||||
original_hops: string[];
|
||||
effective_hops: string[];
|
||||
previous_hop_id?: string;
|
||||
next_hop_id?: string;
|
||||
local_role: string;
|
||||
selected_relay_id?: string;
|
||||
selected_relay_endpoint?: string;
|
||||
stale_relay_node_id?: string;
|
||||
rendezvous_lease_id?: string;
|
||||
rendezvous_lease_reason?: string;
|
||||
decision_source: string;
|
||||
generation: string;
|
||||
path_score?: number;
|
||||
score_reasons?: string[];
|
||||
control_plane_only: boolean;
|
||||
production_forwarding: boolean;
|
||||
expires_at: string;
|
||||
};
|
||||
|
||||
export type RoutePathDecisionReport = {
|
||||
schema_version: string;
|
||||
decision_mode: string;
|
||||
generation: string;
|
||||
decision_count: number;
|
||||
replacement_decision_count: number;
|
||||
control_plane_only: boolean;
|
||||
production_forwarding: boolean;
|
||||
decisions?: RoutePathDecision[];
|
||||
};
|
||||
|
||||
export type SyntheticMeshRoute = {
|
||||
route_id: string;
|
||||
cluster_id: string;
|
||||
source_node_id: string;
|
||||
destination_node_id: string;
|
||||
hops: string[];
|
||||
allowed_channels: string[];
|
||||
expires_at: string;
|
||||
max_ttl: number;
|
||||
max_hops: number;
|
||||
route_version?: string;
|
||||
policy_version?: string;
|
||||
peer_directory_version?: string;
|
||||
};
|
||||
|
||||
export type NodeSyntheticMeshConfig = {
|
||||
enabled: boolean;
|
||||
schema_version: string;
|
||||
cluster_id: string;
|
||||
local_node_id: string;
|
||||
authority_required: boolean;
|
||||
cluster_authority?: ClusterAuthorityDescriptor;
|
||||
authority_payload?: Record<string, unknown>;
|
||||
authority_signature?: ClusterSignature;
|
||||
config_version?: string;
|
||||
peer_directory_version?: string;
|
||||
policy_version?: string;
|
||||
peer_endpoints: Record<string, string>;
|
||||
peer_endpoint_candidates?: Record<string, PeerEndpointCandidate[]>;
|
||||
peer_directory?: PeerDirectoryEntry[];
|
||||
recovery_seeds?: PeerRecoverySeed[];
|
||||
rendezvous_leases?: PeerRendezvousLease[];
|
||||
rendezvous_relay_policy?: RendezvousRelayPolicyReport;
|
||||
route_path_decisions?: RoutePathDecisionReport;
|
||||
routes: SyntheticMeshRoute[];
|
||||
production_forwarding: boolean;
|
||||
};
|
||||
|
||||
export type FabricEntryPoint = {
|
||||
id: string;
|
||||
cluster_id: string;
|
||||
name: string;
|
||||
status: string;
|
||||
endpoint_type: string;
|
||||
public_endpoint?: string | null;
|
||||
policy?: Record<string, unknown>;
|
||||
metadata?: Record<string, unknown>;
|
||||
created_by_user_id?: string | null;
|
||||
created_at: string;
|
||||
updated_at?: string;
|
||||
};
|
||||
|
||||
export type FabricEntryPointNode = {
|
||||
entry_point_id: string;
|
||||
cluster_id: string;
|
||||
node_id: string;
|
||||
status: string;
|
||||
priority: number;
|
||||
metadata?: Record<string, unknown>;
|
||||
added_by_user_id?: string | null;
|
||||
added_at: string;
|
||||
};
|
||||
|
||||
export type FabricEgressPool = {
|
||||
id: string;
|
||||
cluster_id: string;
|
||||
name: string;
|
||||
status: string;
|
||||
description?: string | null;
|
||||
route_scope?: Record<string, unknown>;
|
||||
policy?: Record<string, unknown>;
|
||||
metadata?: Record<string, unknown>;
|
||||
created_by_user_id?: string | null;
|
||||
created_at: string;
|
||||
updated_at?: string;
|
||||
};
|
||||
|
||||
export type FabricEgressPoolNode = {
|
||||
egress_pool_id: string;
|
||||
cluster_id: string;
|
||||
node_id: string;
|
||||
status: string;
|
||||
priority: number;
|
||||
metadata?: Record<string, unknown>;
|
||||
added_by_user_id?: string | null;
|
||||
added_at: string;
|
||||
};
|
||||
|
||||
export type QoSPolicy = {
|
||||
id: string;
|
||||
cluster_id: string;
|
||||
service_class: string;
|
||||
priority: number;
|
||||
reliability_mode: string;
|
||||
drop_policy: string;
|
||||
bandwidth_policy?: Record<string, unknown>;
|
||||
metadata?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
export type ClusterAdminSummary = {
|
||||
cluster_id: string;
|
||||
slug: string;
|
||||
name: string;
|
||||
status: string;
|
||||
region?: string | null;
|
||||
authority_state: string;
|
||||
mutation_mode: string;
|
||||
cluster_key_algorithm?: string | null;
|
||||
cluster_key_fingerprint?: string | null;
|
||||
node_count: number;
|
||||
healthy_node_count: number;
|
||||
pending_join_count: number;
|
||||
active_role_assignment_count: number;
|
||||
last_node_seen_at?: string | null;
|
||||
};
|
||||
|
||||
export type OrganizationAdminSummary = {
|
||||
organization_id: string;
|
||||
resource_count: number;
|
||||
active_session_count: number;
|
||||
service_endpoints: Array<{ protocol: string; count: number }>;
|
||||
connector_status: Record<string, unknown>;
|
||||
topology_exposure: string;
|
||||
};
|
||||
|
||||
export type VPNConnection = {
|
||||
id: string;
|
||||
cluster_id: string;
|
||||
organization_id: string;
|
||||
name: string;
|
||||
target_endpoint: Record<string, unknown>;
|
||||
protocol_family: string;
|
||||
credential_ref?: string | null;
|
||||
mode: string;
|
||||
desired_state: string;
|
||||
allowed_node_policy: Record<string, unknown>;
|
||||
routing_usage: unknown[];
|
||||
route_policy: Record<string, unknown>;
|
||||
qos_policy: Record<string, unknown>;
|
||||
placement_policy: Record<string, unknown>;
|
||||
status: string;
|
||||
metadata: Record<string, unknown>;
|
||||
created_by_user_id?: string | null;
|
||||
updated_by_user_id?: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
};
|
||||
|
||||
export type VPNConnectionLease = {
|
||||
id: string;
|
||||
vpn_connection_id: string;
|
||||
cluster_id: string;
|
||||
owner_node_id: string;
|
||||
lease_generation: number;
|
||||
fencing_token: string;
|
||||
status: string;
|
||||
acquired_at: string;
|
||||
renewed_at: string;
|
||||
expires_at: string;
|
||||
released_at?: string | null;
|
||||
fenced_at?: string | null;
|
||||
metadata: Record<string, unknown>;
|
||||
};
|
||||
Reference in New Issue
Block a user