@intelligentgraphics/openconfiguration.host
    Preparing search index...

    Class Client<SP>

    Type Parameters

    • SP extends object = object

    Implements

    Index

    Constructors

    Properties

    hostStatus: ClientDetectedHost
    off: <K extends "Start">(event: K, listener: Function) => void = ...
    on: <K extends "Start">(
        event: K,
        listener: (data: ClientEvents[K]) => void,
    ) => void = ...
    once: <K extends "Start">(
        event: K,
        listener?: (data: ClientEvents[K]) => void,
    ) => Promise<ClientEvents[K]> = ...

    Methods

    • Returns void

    • Executes a custom host operation.

      The payload is required to have a type attribute used to distinguish between different operations.

      If the host encounters an operation it is not equipped to handle, it should throw an error with the name set to NotSupportedError.

      Type Parameters

      • R

      Parameters

      • payload: { type: string; [property: string]: unknown }

      Returns Promise<R>

    • Returns ("persist" | "prices" | "custom")[]

    • Returns true if the host is not known or has a version that doesn't explicitly define it's features.

      Returns boolean

    • Restores a planning from a backend.

      The backend should return the data that was saved with the pin.

      Will only be used when save is also implemented.

      Parameters

      • pin: string

      Returns Promise<RestoreResult<SP>>

    • Saves plannings to a backend.

      The backend should return a pin that can be used to restore the planning.

      Will only be used when restore is also implemented.

      Parameters

      Returns Promise<SaveResult>

    • Returns void

    • Returns void

    • Returns void

    • Creates a client if a parent window exists.

      This does not mean, that an actual ConfiguratorControlHost exists. It might exist, but we can't know for sure

      Type Parameters

      • SP extends object = object

      Returns Client<SP> | undefined