[READ-ONLY] Mirror of https://github.com/flo-bit/atmo-garden.
atmo.garden
2.0 kB
62 lines
1// See https://svelte.dev/docs/kit/types#app.d.ts
2// for information about these interfaces
3import type { OAuthSession } from '@atcute/oauth-node-client';
4import type { Client } from '@atcute/client';
5import type { Did } from '@atcute/lexicons';
6
7declare global {
8 namespace App {
9 // interface Error {}
10 interface Locals {
11 session: OAuthSession | null;
12 client: Client | null;
13 did: Did | null;
14 }
15 // interface PageData {}
16 // interface PageState {}
17 interface Platform {
18 env: {
19 OAUTH_SESSIONS: KVNamespace;
20 OAUTH_STATES: KVNamespace;
21 CLIENT_ASSERTION_KEY: string;
22 COOKIE_SECRET: string;
23 OAUTH_PUBLIC_URL: string;
24 PROFILE_CACHE?: KVNamespace;
25 /**
26 * KV namespace holding the materialized sorted feed lists
27 * (`sorted:<sort>` keys, one per PostSort). The cron tick
28 * rewrites these once per minute from `getCombinedFeed`,
29 * and both `getHomeFeed` (main page) and the bsky feed
30 * generator XRPC handler read from them through
31 * `src/lib/reddit/feed-cache.ts`.
32 */
33 FEEDS_CACHE: KVNamespace;
34 DB: D1Database;
35 COMMUNITY_ENCRYPTION_KEY: string;
36 ROOKERY_HOSTNAME: string;
37 ROOKERY_SIGNUP_SECRET: string;
38 CRON_SECRET?: string;
39 // Optional: credentials for adding newly-registered communities
40 // to the public atmo.garden discovery list. If any of these are
41 // missing, registration still succeeds but skips the list-add.
42 ATMO_GARDEN_PDS?: string;
43 ATMO_GARDEN_IDENTIFIER?: string;
44 ATMO_GARDEN_APP_PASSWORD?: string;
45 ATMO_GARDEN_LIST_RKEY?: string;
46 /**
47 * at-uri of the single bsky post emitted as the first entry
48 * in following-* feeds when the viewer follows zero atmo
49 * communities. Created once via
50 * `scripts/create-placeholder-post.ts`. Empty string disables
51 * the placeholder and the feed falls back to the all-<sort>
52 * contents.
53 */
54 FOLLOWING_FEED_PLACEHOLDER_URI?: string;
55 };
56 }
57 }
58}
59import type {} from '@atcute/atproto';
60import type {} from '@atcute/bluesky';
61
62export {};