Skip to content
Français

createSystemOneDecisionProvider

import { createSystemOneDecisionProvider } from "@elie-laloum/outpost";

Build a bounded HTTP System One provider shared by Jev and compatible Laya endpoints. Append /systemone to the base URL, use explicit bearer authentication or false, retain native JSON extensions and make no internal retries.

Complete example and detailed rules.

  • optionsRequired
    SystemOneDecisionProviderOptions
    HTTP endpoint, explicit authentication and request bounds for the System One protocol.
  • options.baseUrlRequired
    string
    HTTP(S) base URL including the version prefix, such as /v1; /systemone is appended. Credentials, query and fragment are forbidden.
  • options.apiKeyRequired
    string | false
    Explicit nonempty bearer key, or false for an unauthenticated endpoint.
  • options.timeoutMsOptional
    number | undefined
    Request deadline including response reading, in positive integer milliseconds; defaults to 120000.
  • options.maxResponseBytesOptional
    number | undefined
    Positive integer bound on response bytes; defaults to 8 MiB. Oversized responses fail with response.

DecisionProvider

export declare function createSystemOneDecisionProvider(
  options: SystemOneDecisionProviderOptions,
): DecisionProvider;