yaschema-ws-api
    Preparing search index...

    Interface WsApi<RequestCommandsT, ResponseCommandsT, QueryT>

    A generic WebSocket API description

    interface WsApi<
        RequestCommandsT extends AnyCommands,
        ResponseCommandsT extends AnyCommands,
        QueryT extends AnyQuery,
    > {
        deprecated?: string | boolean;
        description?: string;
        example?: string;
        isYaschemaApi: true;
        isYaschemaWsApi: true;
        name: string;
        routeType: string;
        schemas: {
            connection?: { query?: Schema<QueryT> };
            requests: RequestCommandsT;
            responses: ResponseCommandsT;
        };
        url: string;
    }

    Type Parameters

    Hierarchy

    • Api
      • WsApi
    Index

    Properties

    deprecated?: string | boolean

    If true or a string, use of this Api is deprecated and usage should be discontinued as soon as possible. A string value may be used to document why the deprecation occurred and/or preferred upgrade strategies and APIs.

    description?: string

    A description, which can be used by code generation tools to generate documentation

    example?: string

    An example, which can be used by code generation tools to generate documentation

    isYaschemaApi: true
    isYaschemaWsApi: true
    name: string

    A name that can be used to describe this API, when logging for example

    routeType: string

    The type of route, which will be used to select a URL base and is configurable using setUrlBaseForRouteType

    schemas: {
        connection?: { query?: Schema<QueryT> };
        requests: RequestCommandsT;
        responses: ResponseCommandsT;
    }
    url: string

    The URL for accessing this API, which may be relative to a URL base configuring for the routeType. Use {…} syntax to mark parameters, as you might with Express.