@camunda8/orchestration-cluster-api
    Preparing search index...

    Class VariableMap<TSchema>

    Result of a DTO-driven variable search.

    Holds the parsed variable values keyed by their declared name. Provides lenient, defensive access via has / get, and a strict validate that parses the values against the schema — returning a fully-typed object or throwing a ZodError when a required variable is missing or malformed.

    Type Parameters

    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    • get raw(): Readonly<Record<string, unknown>>

      The parsed variable values, keyed by variable name.

      Returns Readonly<Record<string, unknown>>

    Methods

    • Lenient access. Returns the JSON-parsed wire value, or undefined when the variable is absent.

      The value is not run through the schema, so a declared key is narrowed to that field's schema input type (z.input) unioned with undefined — not the post-validation output type. This keeps the type honest for schemas with transforms or effects, where the parsed wire value can differ from validate()'s output. Any other key resolves to undefined: the result only ever holds the declared variable names, so an undeclared key can never carry a value.

      Type Parameters

      • K extends string

      Parameters

      • variableName: K

      Returns K extends keyof input<TSchema> ? input<TSchema>[K] | undefined : undefined

    • Whether a variable with the given name is present in the result.

      Parameters

      • variableName: keyof input<TSchema> & string

      Returns boolean

    • Whether a variable with the given name is present in the result.

      Parameters

      • variableName: string

      Returns boolean

    • Strict access. Parses the collected values against the schema and returns the typed object. Required variables must be present and well-formed, otherwise a ZodError is thrown.

      Returns output<TSchema>