mindee
    Preparing search index...

    Class Endpoint

    Endpoint for a product (OTS or Custom).

    Hierarchy

    • BaseEndpoint
      • Endpoint
    Index

    Asynchronous

    • Requests the results of a queued document from the API. Throws an error if the server's response contains one.

      Parameters

      • queueId: string

        The document's ID in the queue.

      Returns Promise<EndpointResponse>

      a Promise containing the parsed result.

    Other

    owner: string

    Account owning the product.

    settings: ApiSettings

    Settings relating to the API.

    urlName: string

    URL of a product.

    urlRoot: string

    Entire root of the URL for API calls.

    version: string

    Product's version, as a string.

    • Send a file to a prediction API.

      Parameters

      • input: InputSource
      • predictUrl: string
      • includeWords: boolean = false
      • fullText: boolean = false
      • cropper: boolean = false
      • rag: boolean = false
      • workflowId: undefined | string = undefined

      Returns Promise<EndpointResponse>

    • Changes the url to a workflow ID.

      Parameters

      • workflowId: string

      Returns void

    • Reads a response from the API and processes it.

      Parameters

      • options: RequestOptions

        options related to the request itself.

      • resolve: (value: EndpointResponse | PromiseLike<EndpointResponse>) => void

        the resolved response

      • reject: (reason?: any) => void

        promise rejection reason.

      Returns ClientRequest

      the processed request.

    Synchronous