g1t/apps/web/workers/env.d.ts

42 lines1,595 bytesCodeBlame
1import type { RunnerApi, ServiceBinding } from "@g1t/contracts";
2
3declare global {
4 namespace Cloudflare {
5 interface Env {
6 IDENTITY: ServiceBinding;
7 /** Also serves git over HTTPS through `fetch`. */
8 REPOS: ServiceBinding & { fetch(request: Request): Promise<Response> };
9 /** Also serves the container registry (`/v2/`) through `fetch`. */
10 PACKAGES: ServiceBinding & { fetch(request: Request): Promise<Response> };
11 WORK: ServiceBinding;
12 RUNNER: RunnerApi;
13 BILLING: ServiceBinding;
14 EVENTS: ServiceBinding;
15 INTEGRATIONS: ServiceBinding;
16 WEBHOOKS: ServiceBinding;
17 ACTIONS: ServiceBinding;
18 DEPLOYMENTS: ServiceBinding;
19 PROJECTS: ServiceBinding;
20 SECURITY: ServiceBinding;
21 /** The context hub: catalog, search and scorecards. */
22 CONTEXT: ServiceBinding;
23 /** Search across all of g1t, and Explore. */
24 SEARCH: ServiceBinding;
25 /** Production screenshots, from the og service's `Screenshots` entrypoint. */
26 SCREENSHOTS?: {
27 image(input: { host: string; commit: string; since?: string }): Promise<{
28 body: ArrayBuffer;
29 contentType: string;
30 commit: string;
31 capturedAt: string;
32 } | null>;
33 };
34 BLOBS: KVNamespace;
35 /** Uploaded avatars by SHA-256, with `{ contentType }`; written by identity. */
36 AVATARS: KVNamespace;
37 /** The self-hosted runner's releases (scripts/runner-release.mjs). Absent when self-hosted. */
38 DOWNLOADS?: R2Bucket;
39 }
40 }
41 interface Env extends Cloudflare.Env {}
42}