rest-vir - v1.0.0
    Preparing search index...

    Class RestVirApi<SpecificService>

    An API generated by generateApi. This can be easily mocked by wrapping this API in makeMockApi.

    Type Parameters

    Index

    Constructors

    Properties

    endpoints: {
        [EndpointPath in string | number | symbol]: SpecificService["endpoints"][EndpointPath] extends GenericEndpointDefinition
            ? any[any] & {
                fetch(
                    ...params: CollapsedFetchEndpointParams<any[any]>,
                ): Promise<FetchEndpointOutput<any[any]>>;
            }
            : never
    }

    All supported endpoints within this API. Use .fetch() on an individual endpoint to send requests to it.

    serviceOrigin: string

    Where this API is hosted. This can be freely modified at any time and it will immediately affect all endpoint.fetch() and webSocket.connect() methods.

    'https://example.com' 'http://localhost:3000'
    

    https://developer.mozilla.org/en-US/docs/Web/API/Location for help on which part of the URL is the origin (if necessary).

    webSockets: {
        [WebSocketPath in string | number | symbol]: SpecificService["webSockets"][WebSocketPath] extends GenericWebSocketDefinition
            ? any[any] & {
                connect(
                    ...params: CollapsedConnectWebSocketParams<any[any], false>,
                ): Promise<ClientWebSocket<any[any]>>;
            }
            : never
    }

    All supported WebSockets within this API. Use .connect() on an individual WebSocket to open up connections to it.