Changeset View
Changeset View
Standalone View
Standalone View
lib/types/endpoints.js
// @flow | // @flow | ||||
export type APIRequest = { | export type APIRequest = { | ||||
endpoint: Endpoint, | endpoint: Endpoint, | ||||
input: Object, | input?: Object, | ||||
}; | }; | ||||
export type SocketAPIHandler = (request: APIRequest) => Promise<Object>; | export type SocketAPIHandler = (request: APIRequest) => Promise<Object>; | ||||
export type Endpoint = | export type Endpoint = | ||||
| HTTPOnlyEndpoint | | HTTPOnlyEndpoint | ||||
| SocketOnlyEndpoint | | SocketOnlyEndpoint | ||||
| HTTPPreferredEndpoint | | HTTPPreferredEndpoint | ||||
| SocketPreferredEndpoint; | | SocketPreferredEndpoint; | ||||
▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines |