@venturekit/core API
Configuration Types
Section titled “Configuration Types”| Type | Description |
|---|---|
BaseConfig | Project identity — name, displayName, region |
SecurityConfig | OAuth scopes, app clients, MFA, password policy |
OAuthScope | Scope definition — name, description |
AppClient | App client — name, allowedScopes, supportsRefreshTokens, generateSecret, token validity |
EnvConfigInput | User-provided environment config (partial, with optional preset) |
EnvConfig | Fully resolved environment config (all fields required) |
ResolvedConfig | Fully merged config — base + security + env with auto-generated tags |
Environment | 'dev' | 'stage' | 'prod' |
Preset | 'nano' | 'micro' | 'medium' | 'large' |
DataSafety | 'relaxed' | 'standard' | 'strict' |
Sub-Configuration Types
Section titled “Sub-Configuration Types”| Type | Description |
|---|---|
LambdaEnvConfig / LambdaEnvConfigInput | Lambda memory, timeout, VPC, logging, tracing, IAM |
ApiEnvConfig / ApiEnvConfigInput | API Gateway throttling, CORS, custom domain |
VpcEnvConfig / VpcEnvConfigInput | VPC AZs, NAT gateways, subnets, security groups |
ObservabilityEnvConfig / ObservabilityEnvConfigInput | Alarms, tracing, metrics, log groups |
WebSocketEnvConfig / WebSocketEnvConfigInput | WebSocket enable, idle timeout, throttling |
CorsConfig | CORS origins, methods, headers, credentials |
CustomDomainConfig | Custom domain name and certificate ARN |
Infrastructure Intent Types
Section titled “Infrastructure Intent Types”| Type | Description |
|---|---|
VentureIntent | Top-level intent — databases, storage, auth, queues, caches, schedules |
DatabaseIntent | Database — id, type, size, name, HA, backups, encryption |
StorageIntent | Storage — id, purpose, CDN, versioning, CORS |
AuthIntent | Auth — id, sign-in methods, MFA, password strength |
QueueIntent | Queue — id, type (standard/FIFO), DLQ, retention |
CacheIntent | Cache — id, type (redis/memcached), size, clustered |
ScheduleIntent | Schedule — id, handler, rate/cron expression |
IntentOutputs | Outputs from provisioned resources |
ResourceSize | 'small' | 'medium' | 'large' | 'xlarge' |
Functions
Section titled “Functions”resolveConfig(base, security, env, envInput)
Section titled “resolveConfig(base, security, env, envInput)”Merges base + security + environment config into a fully resolved ResolvedConfig.
function resolveConfig( base: BaseConfig, security: SecurityConfig, env: Environment, envInput: EnvConfigInput): ResolvedConfigresolveEnvConfig(env, envInput)
Section titled “resolveEnvConfig(env, envInput)”Resolves just the environment config, applying preset defaults and overrides.
function resolveEnvConfig(env: Environment, envInput: EnvConfigInput): EnvConfiggetPreset(name)
Section titled “getPreset(name)”Returns the full PresetConfig for a named preset.
function getPreset(name: Preset): PresetConfigvalidateBaseConfig(config)
Section titled “validateBaseConfig(config)”Validates a BaseConfig and returns a ValidationResult.
function validateBaseConfig(config: BaseConfig): ValidationResultvalidateSecurityConfig(config)
Section titled “validateSecurityConfig(config)”Validates a SecurityConfig and returns a ValidationResult.
function validateSecurityConfig(config: SecurityConfig): ValidationResultvalidateEnvConfigInput(env, config)
Section titled “validateEnvConfigInput(env, config)”Validates an EnvConfigInput and returns a ValidationResult.
function validateEnvConfigInput(env: Environment, config: EnvConfigInput): ValidationResultassertValid(result)
Section titled “assertValid(result)”Throws a ValidationError if the result is invalid.
function assertValid(result: ValidationResult): voidConstants
Section titled “Constants”| Constant | Description |
|---|---|
PRESET_NANO | Nano preset configuration |
PRESET_MICRO | Micro preset configuration |
PRESET_MEDIUM | Medium preset configuration |
PRESET_LARGE | Large preset configuration |
DEFAULT_DATA_SAFETY | Default data safety per environment |
DATA_SAFETY_CONFIG | Data safety configuration mapping |
Classes
Section titled “Classes”ValidationError
Section titled “ValidationError”Error class thrown by assertValid() when validation fails.
class ValidationError { constructor(field: string, message: string, value?: unknown) field: string message: string value?: unknown}