atmo.rsvp
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
7interface AtmoEmbedSDK {
8 getParams(): { base: string; accent: string; dark: boolean; did: string | null };
9 createRecord(opts: {
10 collection: string;
11 rkey?: string;
12 record: Record<string, unknown>;
13 }): Promise<{ uri: string }>;
14 deleteRecord(opts: { collection: string; rkey: string }): Promise<void>;
15}
16
17declare global {
18 interface Window {
19 AtmoEmbed?: AtmoEmbedSDK;
20 }
21 namespace App {
22 // interface Error {}
23 interface Locals {
24 session: OAuthSession | null;
25 client: Client | null;
26 did: Did | null;
27 }
28 // interface PageData {}
29 // interface PageState {}
30 interface Platform {
31 env: {
32 OAUTH_SESSIONS: KVNamespace;
33 OAUTH_STATES: KVNamespace;
34 CLIENT_ASSERTION_KEY: string;
35 COOKIE_SECRET: string;
36 OAUTH_PUBLIC_URL: string;
37 DB: D1Database;
38 CRON_SECRET: string;
39 };
40 /** Cloudflare Worker execution context. Use `ctx.waitUntil(promise)` to
41 * let the worker keep a fire-and-forget task alive after the response
42 * has been sent. Optional in dev (wrangler proxy may not provide it). */
43 ctx?: { waitUntil(promise: Promise<unknown>): void };
44 }
45 }
46}
47import type {} from '@atcute/atproto';
48import type {} from '@atcute/bluesky';
49
50export {};