Skip to content

Manifest Reference

Complete list of all SDK exports (v0.10.0).

Import from @z0-app/sdk.


ExportTypeDescription
EntityTypeIdentity and state container
FactTypeImmutable event record
ConfigTypeVersioned configuration
InvariantSettingsTypeRuntime assertion config
EntityLifecycleStateTypeLifecycle state enum
EntityMigrationStateTypeMigration state enum
AnonymizationReasonTypeGDPR anonymization reasons
BudgetModeTypeBudget enforcement mode
ExportTypeDescription
SYSTEM_TENANT_IDstringReserved tenant for platform
CONFIG_TYPESobjectConfig type constants
SYSTEM_FACT_TYPESobjectSystem fact type constants
SCOPE_PRIORITYobjectConfig scope priority order
LIFECYCLE_STATESarrayValid lifecycle states
MIGRATION_STATESarrayValid migration states

ExportTypeDescription
ParentEventTypeBase parent event
ParentEventTypeTypeEvent type enum
ChildRegisteredEventTypeChild registration notification
ChildRetiringEventTypeChild retiring notification
ChildRetiredEventTypeChild retired notification
ChildDeletedEventTypeChild deletion notification
StatsUpdateEventTypeStats aggregation update
AggregationConfigTypeFact aggregation config
FactAggregationRuleTypeSingle aggregation rule
ExportTypeDescription
createChildRegisteredEventFunctionCreate child registered event
createChildRetiringEventFunctionCreate child retiring event
createChildRetiredEventFunctionCreate child retired event
createChildDeletedEventFunctionCreate child deleted event
createStatsUpdateEventFunctionCreate stats update event
isValidParentEventFunctionValidate parent event structure
validateTenantMatchFunctionVerify tenant ID match
PARENT_CACHE_KEYSobjectCache key constants

ExportTypeDescription
FactSummaryTypeFact metadata summary
LedgerSnapshotTypePoint-in-time ledger state
HookConfigTypeHook configuration
HookActionTypeHook action type
FactQueryOptionsTypeFact query filters
FactInputTypeFact creation input
EntityInputTypeEntity creation input
ConfigInputTypeConfig creation input
ConfigUpdateInputTypeConfig update input
LifecycleTransitionInputTypeLifecycle transition params
DeadLetterFactTypeRejected fact record
InFlightStatusTypeIn-flight fact status
LifecycleStatusTypeEntity lifecycle status
DrainingStatusTypeDraining progress status
DrainingOptionsTypeDraining configuration
AnonymizeOptionsTypeGDPR anonymization params
AnonymizeResultTypeAnonymization result
GdprDeletionRequestTypeGDPR deletion request
GdprDeletionResultTypeGDPR deletion result
ExtendReservationRequestTypeReservation extension params
ExtendReservationResultTypeReservation extension result
ForceChargeRequestTypeForce charge params
ForceChargeResultTypeForce charge result
SharedBudgetConfigTypeShared budget configuration
SharedBudgetCheckRequestTypeBudget check params
SharedBudgetCheckResultTypeBudget check result
MigrationStatusTypeMigration status response
MigrationStartInputTypeStart migration params
MigrationVerifyInputTypeVerify migration params
WebhookOwnershipResultTypeWebhook ownership check
ExternalProviderConfigTypeExternal provider config
WebhookRoutingAuditTypeWebhook routing audit log

ExportTypeDescription
EntityLedgerClassBase ledger class to extend
SystemLedgerClassPlatform-level system ledger
TenantSystemLedgerClassTenant-level system ledger
DEFAULT_BOOTSTRAP_CONFIGobjectDefault bootstrap options
DEFAULT_QUERY_LIMITnumberDefault fact query limit (1000)
ExportTypeDescription
EntityLedgerEnvTypeRequired Durable Object env bindings
FactRowTypeSQLite fact row structure
FactContextTypeFact processing context
BootstrapConfigTypeBootstrap configuration
LedgerOptionsTypeLedger initialization options
ExportTypeDescription
SdkObservabilityFactTypeSDK observability fact
SdkObservabilitySubtypeTypeObservability event subtype
SdkObservabilityDataTypeObservability event data
CacheStatsDataTypeCache statistics payload
FactAppendedDataTypeFact append event payload
SchemaInitDataTypeSchema init event payload
HydrationDoneDataTypeHydration complete payload
TenantStatsPayloadTypeTenant stats payload
ExportTypeDescription
TenantSystemLedgerEnvTypeTenant system ledger env
TenantSystemLedgerOptionsTypeTenant system ledger options

ExportTypeDescription
SubscriptionManagerClassWebSocket/SSE subscription manager
ExportTypeDescription
SubscriptionRowTypeSQLite subscription row
ConnectionRowTypeSQLite connection row

ExportTypeDescription
createMockDOContextFunctionCreate mock Durable Object context
createMockDOStubFunctionCreate mock DO stub
createMockQueueFunctionCreate mock queue
MockDOContextTypeMock DO context type
MockSqlStorageTypeMock SQLite storage type

ExportTypeDescription
LedgerRegistryClassDomain manifest registry
ExportTypeDescription
LedgerConstructorTypeLedger class constructor
EntityDefinitionTypeEntity definition
DomainManifestTypeDomain manifest structure
FactEventHandlerTypeFact event handler function

ExportTypeDescription
generateIdFunctionGenerate prefixed ID
PLATFORM_ID_PREFIXESobjectID prefix constants
ExportTypeDescription
ApiErrorClassRFC 7807 API error
EntityLedgerErrorsobjectPre-built error factories
FieldErrorTypeField validation error
ProblemDetailsTypeRFC 7807 problem details
ExportTypeDescription
authenticateRequestFunctionAuthenticate API request
parseApiKeyFunctionParse API key structure
ApiKeyModeTypeAPI key mode enum
AuthContextTypeAuthentication context
AuthResultTypeAuthentication result
ExportTypeDescription
CreateEntitySchemaZodSchemaEntity creation validator
CreateFactSchemaZodSchemaFact creation validator
CreateConfigSchemaZodSchemaConfig creation validator
ExportTypeDescription
RouterClassSimple request router
ExportTypeDescription
LedgerClientClassType-safe ledger client
LedgerStubClassSingle entity stub
ExportTypeDescription
CircuitBreakerClassCircuit breaker for DO calls
CircuitOpenErrorClassCircuit open error
CircuitBreakerOptionsTypeCircuit breaker config
CircuitBreakerStateTypeCircuit state enum
ExportTypeDescription
ParentDOClientClassParent DO client with circuit breaker
ParentClientOptionsTypeParent client config
CachedResponseTypeCached response structure
ExportTypeDescription
ParentEventsConsumerClassQueue consumer for parent events
createParentEventsConsumerFunctionCreate consumer instance
ParentEventMessageTypeQueue message wrapper
DONamespaceTypeDurable Object namespace
DurableObjectIdTypeDO ID type
DurableObjectStubTypeDO stub type
BatchProcessResultTypeBatch processing result
ParentEventsConsumerOptionsTypeConsumer config
MessageBatchTypeQueue message batch
MessageTypeQueue message
ExportTypeDescription
compareStatesFunctionCompare entity states
createNumericCheckFunctionCreate numeric tolerance check
createExactMatchCheckFunctionCreate exact match check
HealthCheckResultTypeHealth check result
HealthCheckTypeHealth check function
HealthCheckOptionsTypeHealth check config
DivergenceReportTypeState divergence report
HealthCheckableTypeHealth checkable interface
ExportTypeDescription
signPayloadFunctionSign webhook payload
constantTimeCompareFunctionConstant-time string compare
buildWebhookPayloadFunctionBuild webhook payload
generateDeliveryIdFunctionGenerate delivery ID
generateWebhookIdFunctionGenerate webhook ID
matchWebhookTriggerFunctionMatch fact to webhook trigger
findMatchingWebhooksFunctionFind matching webhooks
isRetryableErrorFunctionCheck if HTTP error is retryable
calculateBackoffFunctionCalculate exponential backoff
validateWebhookConfigFunctionValidate webhook config
buildWebhookHeadersFunctionBuild webhook headers
filterPiiFunctionFilter PII from payload
detectPotentialPiiFunctionDetect PII in data
DEFAULT_RETRY_CONFIGobjectDefault retry config
DEFAULT_PII_FIELDSarrayDefault PII field names
ExportTypeDescription
WebhookConfigSettingsTypeWebhook configuration
WebhookDeliveryMessageTypeWebhook delivery queue message
WebhookPayloadTypeWebhook payload structure
WebhookTriggeredDataTypeWebhook triggered event data
WebhookSentDataTypeWebhook sent event data
PiiFilterConfigTypePII filter configuration
ExportTypeDescription
validateWebhookOwnershipFunctionValidate tenant ownership
findTenantByExternalIdFunctionFind tenant by external ID
createRoutingAuditFunctionCreate routing audit log
extractRequestMetadataFunctionExtract request metadata
createDefaultProviderRegistryFunctionCreate default provider registry
registerProviderFunctionRegister webhook provider
twilioParserFunctionTwilio webhook parser
stripeParserFunctionStripe webhook parser
sendgridParserFunctionSendGrid webhook parser
ExportTypeDescription
WebhookProviderParserTypeProvider parser function
ProviderRegistryTypeProvider registry map
ExportTypeDescription
assertInvariantFunctionAssert runtime invariant
InvariantCheckerClassInvariant evaluation engine
InvariantViolationClassInvariant violation error
ExportTypeDescription
resolveBindingAsOfFunctionResolve binding at timestamp
canAssignResourceFunctionCheck if resource can be assigned
buildAssignmentFactFunctionBuild resource assignment fact
buildReleaseFactFunctionBuild resource release fact
getActiveBindingFunctionGet active binding
getEntityBindingsFunctionGet all entity bindings
getAvailableAtFunctionGet resource availability time
bindingFromFactFunctionExtract binding from fact
applyReleaseFunctionApply release to binding
isBindingValidAtFunctionCheck binding validity
resolveBindingAtFunctionResolve binding at time
getBindingHistoryAtFunctionGet binding history
willBindingBeValidAtFunctionCheck future validity
DEFAULT_QUARANTINE_MSnumberDefault quarantine duration
PHONE_NUMBER_CONFIGobjectPhone number resource config
EMAIL_CONFIGobjectEmail resource config
ExportTypeDescription
ResourceBindingTypeResource binding record
BindingResolutionTypeBinding resolution result
AssignResourceOptionsTypeResource assignment options
ReleaseResourceOptionsTypeResource release options
ResourceTypeConfigTypeResource type config
ResourceAssignedDataTypeResource assigned fact data
ResourceReleasedDataTypeResource released fact data
ExportTypeDescription
validateHierarchyDepthFunctionValidate depth limit
calculateDepthFunctionCalculate current depth
buildHierarchyPathFunctionBuild ancestor path
cacheParentDataFunctionCache parent entity data
isCacheValidFunctionCheck cache validity
ParentCacheClassParent data cache
buildAncestorIdsFunctionBuild ancestor ID list
DEFAULT_HIERARCHY_CONFIGobjectDefault hierarchy config
ExportTypeDescription
HierarchyConfigTypeHierarchy configuration
HierarchyPositionTypeEntity position in hierarchy
HierarchyValidationTypeDepth validation result
CachedParentDataTypeCached parent entity data
FlattenedEntityTypeFlattened entity with ancestors
HierarchyPathResultTypeHierarchy path result
AncestorIdsResultTypeAncestor IDs result
ExportTypeDescription
BatchExecutorClassBatch processor with resumability
createBatchProgressFunctionCreate batch progress tracker
progressToOptionsFunctionConvert progress to options
ExportTypeDescription
BatchResultTypeBatch execution result
BatchOptionsTypeBatch execution options
BatchProcessorTypeBatch processor function
BatchProgressTypeBatch progress state
ExportTypeDescription
detectCycleFunctionDetect cycle in chain
canMergeFunctionCheck if merge creates cycle
getChainFunctionGet entity chain
getCanonicalIdFunctionGet canonical entity ID
ExportTypeDescription
CycleResultTypeCycle detection result
MergeCheckTypeMerge validation result
GetNextFnTypeGet next entity function
ExportTypeDescription
getBillingDayFunctionGet billing day for timestamp
isSameBillingDayFunctionCheck if same billing day
getBillingDayStartFunctionGet billing day start time
getBillingDayEndFunctionGet billing day end time
getCurrentBillingDayFunctionGet current billing day
getDaysSinceFunctionGet days since timestamp
ExportTypeDescription
BillingDayTypeBilling day representation
ExportTypeDescription
calculateTieredChargeFunctionCalculate graduated tier pricing
ExportTypeDescription
TierTypePrice tier definition
TierBreakdownItemTypeTier calculation breakdown
TieredChargeResultTypeTier calculation result
ExportTypeDescription
ThresholdMonitorClassThreshold crossing detector
ExportTypeDescription
ThresholdCheckResultTypeThreshold check result
ExportTypeDescription
cascadeFunctionExecute multi-DO operation with rollback
CascadeErrorClassCascade execution error
ExportTypeDescription
CascadeOperationTypeSingle cascade operation
CascadeResultTypeCascade execution result
PartialRollbackTypePartial rollback state
ExportTypeDescription
registerSchemaFunctionRegister fact schema version
validateFactFunctionValidate fact against schema
migrateFactFunctionMigrate fact to latest version
getLatestVersionFunctionGet latest schema version
hasSchemaFunctionCheck if schema exists
clearSchemasFunctionClear schema registry
zobjectRe-exported Zod
ExportTypeDescription
ValidationResultTypeSchema validation result
SchemaOptionsTypeSchema registration options
ExportTypeDescription
RateLimiterClassRate limiter with backpressure
RateLimitErrorClassRate limit exceeded error
ValidationErrorClassRequest validation error
processInOrderFunctionProcess requests in order
createPendingRequestFunctionCreate pending request
isPendingRequestValidFunctionCheck request validity
DEFAULT_RATE_LIMIT_CONFIGobjectDefault rate limit config
AGGRESSIVE_RATE_LIMIT_CONFIGobjectAggressive rate limit config
RELAXED_RATE_LIMIT_CONFIGobjectRelaxed rate limit config
DEFAULT_PENDING_TTL_MSnumberDefault pending request TTL
ExportTypeDescription
RateLimitConfigTypeRate limit configuration
RateLimitStateTypeRate limit state
RateLimitResultTypeRate limit check result
BackpressureSignalTypeBackpressure signal
PendingRequestTypePending request state
LimitNotificationTypeLimit notification
RequestProcessingOrderTypeRequest processing order
ExportTypeDescription
meanFunctionCalculate mean
stddevFunctionCalculate standard deviation
medianFunctionCalculate median
percentileFunctionCalculate percentile
zScoreFunctionCalculate z-score
madFunctionCalculate median absolute deviation
iqrFunctionCalculate interquartile range
aggregateMetricsFunctionAggregate metrics
isOutlierFunctionCheck if value is outlier
excludeOutliersFunctionExclude outliers from dataset
assignToCohortsFunctionAssign tenants to cohorts
matchesCohortCriteriaFunctionCheck cohort match
detectAnomalyFunctionDetect anomaly in metrics
DEFAULT_OUTLIER_CONFIGobjectDefault outlier config
DEFAULT_COHORTSarrayDefault tenant cohorts
ExportTypeDescription
MetricPointTypeSingle metric data point
AggregatedMetricTypeAggregated metric
TenantMetricSummaryTypeTenant metric summary
PlatformMetricTypePlatform-wide metric
TenantCohortTypeTenant cohort definition
CohortCriteriaTypeCohort matching criteria
TenantProfileTypeTenant profile
AnomalyResultTypeAnomaly detection result
OutlierConfigTypeOutlier detection config

ExportTypeDescription
ProjectionEngineClassFact aggregation engine (YAML)
parseProjectionConfigFunctionParse projection YAML
ConfigParseErrorClassConfig parsing error
ConfigValidationErrorClassConfig validation error
ExportTypeDescription
ProjectionConfigTypeProjection configuration
AggregationTypeAggregation definition
AggregationFunctionTypeAggregation function type
TimeWindowTypeTime window config
ProjectionProcessOptionsTypeProcessing options
ExportTypeDescription
MeterEngineClassUsage tracking and budget enforcement
parseMeterConfigFunctionParse meter YAML
MeterNotFoundErrorClassMeter not found error
ExportTypeDescription
MeterConfigTypeMeter configuration
MeterWindowTypeMeter time window
MeterAggregationTypeMeter aggregation function
BudgetCheckConfigTypeBudget check config
OverageConfigTypeOverage handling config
BudgetCheckResultTypeBudget check result (union)
BudgetCheckAllowedTypeBudget check allowed
BudgetCheckRejectedTypeBudget check rejected
OverageDetailsTypeOverage details

ExportTypeDescription
z0objectPlatform instance
bootFunctionBootstrap platform
PLATFORM_MANIFESTobjectPlatform manifest
ExportTypeDescription
PlatformTypePlatform interface
EntityClientTypeEntity client interface
EntityStatsTypeEntity statistics
BootOptionsTypeBoot options
PlatformManifestTypePlatform manifest

ExportTypeDescription
schemaBuildersobjectTypeScript schema builders
registerEntityFunctionRegister entity definition
freezeSchemasFunctionFreeze schema registry
isSchemaFrozenFunctionCheck if schemas frozen
getRegisteredEntityFunctionGet registered entity
getRegisteredEntityNamesFunctionGet all entity names
clearSchemaRegistryFunctionClear schema registry
resetIndexCountersFunctionReset index counters
entityToDefinitionFunctionConvert entity to definition
buildManifestFunctionBuild domain manifest
entityToManifestFunctionConvert entity to manifest
fieldToZodFunctionConvert field to Zod schema
entityFieldsToZodFunctionConvert entity fields to Zod
factDataToZodFunctionConvert fact data to Zod
entityFactsToZodFunctionConvert entity facts to Zod
entityToValidatorsFunctionGenerate entity validators
sanitizeValidationErrorFunctionSanitize Zod error
ExportTypeDescription
parseManifestFunctionParse YAML manifest
manifestToBuildersFunctionConvert manifest to builders
parseManifestToBuildersFunctionParse YAML to builders
validateManifestFunctionValidate manifest structure
ManifestParseErrorClassManifest parse error
YamlManifestSchemaZodSchemaYAML manifest validator
ExportTypeDescription
FieldBuilderTypeField builder interface
FieldConfigTypeField configuration
FieldTypeTypeField type enum
EntityBuilderTypeEntity builder interface
EntityConfigTypeEntity configuration
FactDefinitionTypeFact definition
SchemaNamespaceTypeSchema namespace
InferFieldTypeInfer field type
InferEntityFieldsTypeInfer entity fields type
InferEntityFactsTypeInfer entity facts type
InferFactDataTypeInfer fact data type
BuildManifestOptionsTypeManifest build options
EntityValidatorsTypeEntity validators
ExportTypeDescription
YamlManifestTypeYAML manifest structure
YamlEntityTypeYAML entity definition
YamlFieldTypeYAML field definition
YamlConfigTypeYAML config definition
YamlRouteTypeYAML route definition
ManifestParseResultTypeManifest parse result
ManifestBuildersTypeManifest builders

ExportTypeDescription
gatewayContractoRPC RouterGateway contract definitions for all actions
ExportTypeDescription
EntitySchemaZodSchemaEntity structure schema
FactSchemaZodSchemaFact structure schema
FieldErrorSchemaZodSchemaField validation error schema
ProblemDetailsSchemaZodSchemaRFC 7807 problem details schema
EmitInputSchemaZodSchemaEmit action input schema
EmitOutputSchemaZodSchemaEmit action output schema
GetInputSchemaZodSchemaGet action input schema
GetOutputSchemaZodSchemaGet action output schema
CreateInputSchemaZodSchemaCreate action input schema
CreateOutputSchemaZodSchemaCreate action output schema
ListInputSchemaZodSchemaList action input schema
ListOutputSchemaZodSchemaList action output schema
QueryInputSchemaZodSchemaQuery action input schema
QueryOutputSchemaZodSchemaQuery action output schema
ExportTypeDescription
GatewayWorkerClassBase class for API Gateway Workers
GatewayWorkerEnvTypeRequired environment bindings
ExportTypeDescription
createAuthMiddlewareFunctionCreate authentication middleware
createRateLimitMiddlewareFunctionCreate rate limiting middleware
createValidationMiddlewareFunctionCreate request validation middleware
zodErrorsToFieldErrorsFunctionConvert Zod errors to field errors
shapeSuccessResponseFunctionShape success response envelope
shapeErrorResponseFunctionShape error response (RFC 7807)
ExportTypeDescription
AuthModeTypeAuth mode: api_key, public
MiddlewareTypeMiddleware function signature
RateLimitScopeTypeRate limit scope: tenant, global
RouteRateLimitConfigTypeRoute rate limit configuration
ResponseMetaTypeResponse metadata structure
SuccessEnvelopeTypeSuccess response envelope type
ExportTypeDescription
EmitRequestTypeEmit action request type
EmitResponseTypeEmit action response type
GetRequestTypeGet action request type
GetResponseTypeGet action response type
CreateRequestTypeCreate action request type
CreateResponseTypeCreate action response type
ListRequestTypeList action request type
ListResponseTypeList action response type
QueryRequestTypeQuery action request type
QueryResponseTypeQuery action response type
ExportTypeDescription
generateGatewayWorkerFunctionGenerate Worker code from manifest
generateOpenAPISpecFunctionGenerate OpenAPI 3.0 spec from contracts
ExportTypeDescription
GeneratorOptionsTypeGateway code generator options
OpenAPISpecTypeOpenAPI 3.0 specification structure
OpenAPIGeneratorOptionsTypeOpenAPI generator options
PathItemTypeOpenAPI path item
OperationTypeOpenAPI operation
ParameterTypeOpenAPI parameter
RequestBodyTypeOpenAPI request body
ResponseTypeOpenAPI response
JSONSchemaTypeJSON Schema definition
SecuritySchemeTypeOpenAPI security scheme

ExportTypeDescription
VERSIONstringSDK version (0.10.0)

CategoryExports
Core Primitives8 types + 6 constants
Parent Events9 types + 8 functions
Ledger Types30+ types
Base Classes3 classes + 12 types
Managers1 class + 2 types
Test Utilities3 functions + 2 types
Registry1 class + 4 types
Utilities (15 modules)100+ functions/classes
Engines2 engines + 20+ types
Platform2 functions + 5 types
Schema Builder20+ functions + 25+ types
Gateway (NEW)3 classes + 40+ types + 10+ functions
Total350+ exports