Skip to content
This repository was archived by the owner on May 17, 2025. It is now read-only.

Commit d7f614c

Browse files
committed
fix: bad type exports
1 parent e45c1bd commit d7f614c

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

lib/types.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
/* eslint-disable @typescript-eslint/ban-types */
22
import { ConnectionInitMessage, PingMessage, PongMessage } from 'graphql-ws'
33
import { DataMapper } from '@aws/dynamodb-data-mapper'
4-
import { APIGatewayEventRequestContext, APIGatewayProxyEvent } from 'aws-lambda'
4+
import { APIGatewayEventRequestContext, APIGatewayProxyEvent, Handler } from 'aws-lambda'
55
import { GraphQLResolveInfo, GraphQLSchema } from 'graphql'
66
import { DynamoDB } from 'aws-sdk'
77
import { Subscription } from './model/Subscription'
88
import { Connection } from './model/Connection'
9-
import { publish } from './pubsub/publish'
10-
import { complete } from './pubsub/complete'
11-
import { handleGatewayEvent } from './gateway'
12-
import { handleStateMachineEvent } from './stepFunctionHandler'
139

1410
export type ServerArgs = {
1511
schema: GraphQLSchema
@@ -51,10 +47,10 @@ export type ServerClosure = {
5147
} & Omit<ServerArgs, 'tableNames'>
5248

5349
export interface ServerInstance {
54-
gatewayHandler: ReturnType<typeof handleGatewayEvent>
55-
stateMachineHandler:ReturnType<typeof handleStateMachineEvent>
56-
publish:ReturnType<typeof publish>
57-
complete: ReturnType<typeof complete>
50+
gatewayHandler: Handler<APIGatewayWebSocketEvent, WebsocketResponse>
51+
stateMachineHandler: (input: StateFunctionInput) => Promise<StateFunctionInput>
52+
publish: (event: PubSubEvent) => Promise<void>
53+
complete: (event: PubSubEvent) => Promise<void>
5854
}
5955

6056
export type TableNames = {

0 commit comments

Comments
 (0)