Add Cloudflare API controls

This commit is contained in:
2026-05-08 16:55:22 -04:00
parent cd3acf671d
commit edced5f5c0
7 changed files with 268 additions and 45 deletions
+16
View File
@@ -2,7 +2,23 @@ export interface ElyKvNamespace {
get(key: string): Promise<string | null>;
}
export interface ElyRateLimit {
limit(options: { key: string }): Promise<{ success: boolean }>;
}
export interface ElyAnalyticsDataPoint {
indexes?: (ArrayBuffer | string | null)[];
doubles?: number[];
blobs?: (ArrayBuffer | string | null)[];
}
export interface ElyAnalyticsDataset {
writeDataPoint(event?: ElyAnalyticsDataPoint): void;
}
export interface Env {
ELY_KV: ElyKvNamespace;
ELY_RATE_LIMITER: ElyRateLimit;
ELY_API_AUDIT: ElyAnalyticsDataset;
ELY_ENVIRONMENT: string;
}