fix(security): lock down admin + add bulk cleanup UI

This commit is contained in:
Young Lee
2026-02-05 23:18:25 -08:00
parent 59cbbd0428
commit 223560e874
12 changed files with 2100 additions and 765 deletions
+21 -7
View File
@@ -18,6 +18,7 @@ export interface EmailData {
export interface FeedConfig {
title: string;
description?: string;
allowed_senders?: string[];
language: string;
site_url: string;
feed_url: string;
@@ -53,16 +54,29 @@ export interface FeedListItem {
declare global {
// This is not an ideal solution but works for our example
interface KVNamespace {
get(key: string, options?: { type: 'text' }): Promise<string | null>;
get(key: string, options: { type: 'json' }): Promise<any | null>;
get(key: string, options: { type: 'arrayBuffer' }): Promise<ArrayBuffer | null>;
get(key: string, options: { type: 'stream' }): Promise<ReadableStream | null>;
put(key: string, value: string | ArrayBuffer | ReadableStream | FormData): Promise<void>;
get(key: string, options?: { type: "text" }): Promise<string | null>;
get(key: string, options: { type: "json" }): Promise<any | null>;
get(
key: string,
options: { type: "arrayBuffer" },
): Promise<ArrayBuffer | null>;
get(
key: string,
options: { type: "stream" },
): Promise<ReadableStream | null>;
put(
key: string,
value: string | ArrayBuffer | ReadableStream | FormData,
): Promise<void>;
delete(key: string): Promise<void>;
list(options?: { prefix?: string; limit?: number; cursor?: string }): Promise<{
list(options?: {
prefix?: string;
limit?: number;
cursor?: string;
}): Promise<{
keys: { name: string; expiration?: number }[];
list_complete: boolean;
cursor?: string;
}>;
}
}
}