GET /xrpc/app.bsky.actor.searchActorsTypeahead
typeahead.waow.tech
1export interface Env {
2 KV: KVNamespace;
3 ADMIN_SECRET: string;
4 RATE_LIMITER: RateLimit;
5 RATE_LIMITER_STRICT: RateLimit;
6 TURSO_URL: string;
7 TURSO_AUTH_TOKEN: string;
8 SEARCH_BACKEND_URL?: string;
9}
10
11export interface ActorRow {
12 did: string;
13 handle: string;
14 display_name: string;
15 avatar_url: string;
16 labels: string;
17 created_at: string;
18 associated: string;
19}
20
21export interface IngestEvent {
22 did: string;
23 handle?: string;
24 display_name?: string;
25 avatar_cid?: string;
26}
27
28export interface SlingshotResponse {
29 did: string;
30 handle: string;
31 pds: string;
32}
33
34export const CORS_HEADERS = {
35 "Access-Control-Allow-Origin": "*",
36 "Access-Control-Allow-Methods": "GET, POST, OPTIONS",
37 "Access-Control-Allow-Headers": "Content-Type, Authorization, X-Client",
38};
39
40export const SLINGSHOT_URL =
41 "https://slingshot.microcosm.blue/xrpc/blue.microcosm.identity.resolveMiniDoc";
42
43export const BSKY_TYPEAHEAD_URL =
44 "https://public.api.bsky.app/xrpc/app.bsky.actor.searchActorsTypeahead";
45
46export const BSKY_GET_PROFILES_URL =
47 "https://public.api.bsky.app/xrpc/app.bsky.actor.getProfiles";
48
49export const FAVICON = `<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='13' cy='13' r='9' fill='none' stroke='%2344aa99' stroke-width='2.5' opacity='0.8'/%3E%3Cline x1='20' y1='20' x2='28' y2='28' stroke='%2344aa99' stroke-width='2.5' stroke-linecap='round' opacity='0.8'/%3E%3C/svg%3E">`;