1 |
|
2 | import { APIGatewayProxyEvent, APIGatewayProxyEventV2, APIGatewayProxyResult, Context as LambdaContext } from 'aws-lambda';
|
3 | import { FileUploadOptions, ApolloServerBase, GraphQLOptions } from 'apollo-server-core';
|
4 | import { IncomingHttpHeaders } from 'http';
|
5 | import { Readable } from 'stream';
|
6 | export declare type APIGatewayProxyEventV1OrV2 = APIGatewayProxyEvent | APIGatewayProxyEventV2;
|
7 | export interface CreateHandlerOptions<EventT extends APIGatewayProxyEventV1OrV2 = APIGatewayProxyEventV1OrV2> {
|
8 | cors?: {
|
9 | origin?: boolean | string | string[];
|
10 | methods?: string | string[];
|
11 | allowedHeaders?: string | string[];
|
12 | exposedHeaders?: string | string[];
|
13 | credentials?: boolean;
|
14 | maxAge?: number;
|
15 | };
|
16 | uploadsConfig?: FileUploadOptions;
|
17 | onHealthCheck?: (req: EventT) => Promise<any>;
|
18 | }
|
19 | export declare class FileUploadRequest extends Readable {
|
20 | headers: IncomingHttpHeaders;
|
21 | }
|
22 | export declare class ApolloServer<EventT extends APIGatewayProxyEventV1OrV2 = APIGatewayProxyEventV1OrV2> extends ApolloServerBase {
|
23 | protected serverlessFramework(): boolean;
|
24 | protected supportsUploads(): boolean;
|
25 | createGraphQLServerOptions(event: EventT, context: LambdaContext): Promise<GraphQLOptions>;
|
26 | createHandler({ cors, onHealthCheck }?: CreateHandlerOptions<EventT>): (event: EventT, context: LambdaContext, callback: import("aws-lambda").Callback<APIGatewayProxyResult> | undefined) => void | Promise<APIGatewayProxyResult>;
|
27 | }
|
28 |
|
\ | No newline at end of file |