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

    Interface HostOperations<SP>

    interface HostOperations<SP extends object> {
        calculatePrices?(
            request: PriceCalculationRequest,
        ): Promise<PriceCalculationResponse>;
        executeCustom?(payload: { type: string }): Promise<unknown>;
        restore?(pin: string): Promise<RestoreResult<SP>>;
        save?(params: HostSaveParams<SP>): Promise<SaveResult>;
    }

    Type Parameters

    • SP extends object

    Hierarchy (View Summary)

    Index

    Methods

    • 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.

      Parameters

      • payload: { type: string }

      Returns Promise<unknown>

    • 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>