~james/core

core/web/src/app.d.ts -rw-r--r-- 1.4 KiB
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 14 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
declare global {
	namespace App {
		interface PageData {
			// per-page og overrides; the repo layout merges these over its
			// repo-level defaults and renders the one <Meta>
			meta?: {
				title?: string;
				description?: string;
				type?: "website" | "profile" | "article";
				image?: string;
				noindex?: boolean;
			};
			publicConfig?: {
				bobbinUrl: string;
				apiUrl: string;
				deliberiUrl: string;
				delegationUrl: string;
				delegationDid: string;
				delegationHandleDomain: string;
				sitesDomain: string;
				sitesUrl: string;
				moderationServiceDid: string;
				primaryKnotHostname: string;
				primarySpindleHostname: string;
				turnstileSiteKey: string;
				camoEnabled: boolean;
				// when the server defers the diff fetch to the browser
				ssrDiffMaxBytes: number;
				ogreUrl: string;
			};
		}

		interface Platform {
			// the worker's execution context, only present on Cloudflare
			ctx?: { waitUntil(promise: Promise<unknown>): void };
			// worker service bindings, only present when running on Cloudflare
			env?: {
				// diff payloads above this many bytes are not buffered through the
				// ssr worker; the page refetches them from the browser instead.
				// "0" disables. defaults to 5 MiB
				SSR_DIFF_MAX_BYTES?: string;
				BOBBIN?: { fetch(request: Request): Promise<Response> };
				SITEMAP?: { fetch(request: Request): Promise<Response> };
			};
		}
	}
}

export {};