Interface to perform generic Rest API operations.

interface DominoUserRestSession {
    dominoAccess: DominoRestAccess;
    dominoConnector: DominoRestConnector;
    request: (
        operationId: string,
        options: DominoRequestOptions,
    ) => Promise<DominoRequestResponse>;
    requestJsonStream: (
        operationId: string,
        options: DominoRequestOptions,
        subscriber: () => WritableStream<any>,
    ) => Promise<void>;
}

Implemented by

Properties

dominoAccess: DominoRestAccess

Provides access to Domino REST API server.

dominoConnector: DominoRestConnector

Provides accessible operations and its required parameters.

request: (
    operationId: string,
    options: DominoRequestOptions,
) => Promise<DominoRequestResponse>

Generic request method to use. One can call all Domino REST API operations as long as the operation ID and all the provided options are valid.

Type declaration

requestJsonStream: (
    operationId: string,
    options: DominoRequestOptions,
    subscriber: () => WritableStream<any>,
) => Promise<void>

An extension of the request method. It automatically pipes the response data stream through TextDecoderStream, streamSplit and streamTransformToJson respectively before piping it to the given subscriber.

Type declaration

    • (
          operationId: string,
          options: DominoRequestOptions,
          subscriber: () => WritableStream<any>,
      ): Promise<void>
    • Parameters

      • operationId: string

        the operation ID according to OpenAPI specification

      • options: DominoRequestOptions

        all data that needs to be provided to the Domino Rest connector

      • subscriber: () => WritableStream<any>

        a function that receives each JSON from the pipe stream

      Returns Promise<void>

      void, the given subscriber will handle how the response is managed.

received response data stream is null.

received response has error status code.