persona-community-5/.pnpm-store/v3/files/23/109e5a2023c4d5f146f7f31a0ac4dea33771062d8f64d870e6f68350a71e5038c5b052370468d0afc8f32afebc4d84cc4c3df5033b23ec5aaf8fb118eaf45f
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

42 lines
1.3 KiB
Plaintext

import type { RedoclyConfig } from './config-types';
export type ApiFunctionsRequest = {
raw: Request;
headers: Record<string, any>;
params: Record<string, any>;
query: Record<string, any>;
cookies: Record<string, any>;
body: ReadableStream<Uint8Array> | null;
};
export type ApiFunctionsResponse = {
raw: Response;
status: (code: number) => ApiFunctionsResponse;
json: (data: object) => Response;
text: (data: string, code?: number) => Response;
send: (data: string | Buffer | object) => Response;
redirect: (url: string, code?: number) => Response;
cookie: (name: string, value: string, options?: CookieOptions) => ApiFunctionsResponse;
clearCookie: (name: string) => ApiFunctionsResponse;
};
export type ApiFunctionsContext = {
user: {
teams: string[];
claims: Record<string, any>;
email: string | undefined;
idpAccessToken: string | undefined;
idpId: string | undefined;
};
config: RedoclyConfig;
};
export interface CookieOptions {
domain?: string;
expires?: Date;
httpOnly?: boolean;
maxAge?: number;
path?: string;
secure?: boolean;
signed?: boolean;
sameSite?: 'Strict' | 'Lax' | 'None';
}
export type ServerPropsContext = ApiFunctionsContext;
export type ServerPropsRequest = ApiFunctionsRequest;