Implementation:Helicone Helicone Heartbeat Worker Types
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Cloudflare Workers |
| Last Updated | 2026-02-14 06:32 GMT |
Overview
Auto-generated TypeScript type declarations for the Helicone heartbeat monitoring worker, providing compile-time type safety for environment bindings and the full Cloudflare Workers runtime API.
Description
This file is generated by Wrangler (wrangler types -e us) and contains two main sections: (1) the custom Cloudflare.Env interface declaring the worker's environment variable bindings (Slack webhooks, API URLs, AWS credentials, SQS queue URLs), and (2) the complete Cloudflare Workers runtime type declarations including Web APIs (Fetch, Streams, Crypto, WebSocket, Cache, etc.), service worker types, WebAssembly interfaces, and Cloudflare-specific extensions like KV, Durable Objects, R2, Queues, and AI bindings. At 8,640 lines, the vast majority of the file consists of standard Cloudflare runtime types that are regenerated with each Wrangler version update.
Usage
This file is automatically consumed by the TypeScript compiler to provide type checking for the heartbeat worker code. It should not be manually edited. To regenerate it, run wrangler types -e us in the helicone-heartbeat directory.
Code Reference
Source Location
- Repository: Helicone
- File: helicone-heartbeat/worker-configuration.d.ts
Environment Bindings
The custom environment interface is the only project-specific section of this file:
declare namespace Cloudflare {
interface Env {
SLACK_ALERT_CHANNEL: 'C092GFJQP43';
API_HEARTBEAT_URL: string;
SLACK_WEBHOOK_URL: string;
VALHALLA_URL: string;
HELICONE_MANUAL_ACCESS_KEY: string;
AWS_REGION: string;
AWS_ACCESS_KEY_ID: string;
AWS_SECRET_ACCESS_KEY: string;
REQUEST_LOGS_QUEUE_URL: string;
REQUEST_LOGS_QUEUE_URL_LOW_PRIORITY: string;
}
}
interface Env extends Cloudflare.Env {}
Key Environment Variables
| Variable | Type | Description |
|---|---|---|
SLACK_ALERT_CHANNEL |
string literal | Hardcoded Slack channel ID for alerts (C092GFJQP43)
|
API_HEARTBEAT_URL |
string | URL for the heartbeat health check endpoint |
SLACK_WEBHOOK_URL |
string | Slack incoming webhook URL for sending notifications |
VALHALLA_URL |
string | URL of the Jawn (Valhalla) backend service |
HELICONE_MANUAL_ACCESS_KEY |
string | Manual access key for authentication |
AWS_REGION |
string | AWS region for SQS operations |
AWS_ACCESS_KEY_ID |
string | AWS access key for SQS authentication |
AWS_SECRET_ACCESS_KEY |
string | AWS secret key for SQS authentication |
REQUEST_LOGS_QUEUE_URL |
string | SQS queue URL for request log processing |
REQUEST_LOGS_QUEUE_URL_LOW_PRIORITY |
string | SQS queue URL for low-priority request logs |
Runtime Type Categories
The auto-generated runtime types (generated with workerd@1.20250803.0) include:
| Category | Key Types |
|---|---|
| Core Web APIs | DOMException, WorkerGlobalScope, Console, AbortController, AbortSignal
|
| Fetch API | Request, Response, Headers, FetchEvent, URL, URLSearchParams
|
| Streams | ReadableStream, WritableStream, TransformStream
|
| Crypto | SubtleCrypto, CryptoKey, DigestStream
|
| WebSocket | WebSocket, WebSocketPair
|
| WebAssembly | Module, Instance, Memory, Table, Global
|
| Cloudflare-Specific | KVNamespace, DurableObject, R2Bucket, Queue, Ai
|
| Scheduled Events | ScheduledEvent, QueueEvent
|
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| Wrangler config | TOML | Yes | wrangler.toml with environment bindings and worker settings
|
Outputs
| Name | Type | Description |
|---|---|---|
| Type declarations | TypeScript .d.ts | Complete type declarations for environment and runtime APIs |
Generation
# Regenerate this file
cd helicone-heartbeat
wrangler types -e us
- Generator: Wrangler CLI
- Runtime Version: workerd@1.20250803.0 (2025-08-07)
- Total Lines: 8,640
- Custom Lines: ~18 (Env interface)
- Runtime Type Lines: ~8,620 (standard Cloudflare Workers types)