@subscribe.dev/replicate-frontend-proxy
Version:
AWS Lambda function that serves as a secure proxy for the Replicate API
10 lines (9 loc) • 944 B
TypeScript
import { APIGatewayProxyResult } from 'aws-lambda';
export declare const createResponse: (statusCode: number, body: object | string, headers?: Record<string, string>, origin?: string) => APIGatewayProxyResult;
export declare const ok: (body: object, origin?: string) => APIGatewayProxyResult;
export declare const badRequest: (error: string, details?: string, origin?: string) => APIGatewayProxyResult;
export declare const unauthorized: (error?: string, origin?: string) => APIGatewayProxyResult;
export declare const notFound: (message: string, origin?: string) => APIGatewayProxyResult;
export declare const internalServerError: (error: string, details?: string, stack?: string, origin?: string) => APIGatewayProxyResult;
export declare const corsPreflightResponse: (origin?: string) => APIGatewayProxyResult;
export declare const customError: (statusCode: number, error: string, details?: string, origin?: string) => APIGatewayProxyResult;