Frodo Library - v5.0.0-36
    Preparing search index...

    Type Alias Variable

    type Variable = {
        createVariable(
            variableId: string,
            value: string,
            description?: string,
            expressionType?: VariableExpressionType,
            noEncode?: boolean,
        ): Promise<VariableSkeleton>;
        deleteVariable(variableId: string): Promise<VariableSkeleton>;
        exportVariable(
            variableId: string,
            noDecode?: boolean,
        ): Promise<VariablesExportInterface>;
        exportVariables(noDecode?: boolean): Promise<VariablesExportInterface>;
        importVariable(
            variableId: string,
            importData: VariablesExportInterface,
        ): Promise<VariableSkeleton>;
        importVariables(
            importData: VariablesExportInterface,
            resultCallback?: ResultCallback<VariableSkeleton>,
        ): Promise<VariableSkeleton[]>;
        readVariable(
            variableId: string,
            noDecode?: boolean,
        ): Promise<VariableSkeleton>;
        readVariables(noDecode?: boolean): Promise<VariableSkeleton[]>;
        resolveVariable(
            input: string,
            variables: Record<string, VariableSkeleton>,
        ): Promise<string>;
        updateVariable(
            variableId: string,
            value?: string,
            description?: string,
            expressionType?: VariableExpressionType,
            noEncode?: boolean,
        ): Promise<VariableSkeleton>;
        updateVariableDescription(
            variableId: string,
            description: string,
        ): Promise<VariableSkeleton>;
    }
    Index
    • Create variable

      Parameters

      • variableId: string

        variable id/name

      • value: string

        variable value

      • Optionaldescription: string

        variable description

      • OptionalexpressionType: VariableExpressionType

        type of the value

      • OptionalnoEncode: boolean

        do not encode if passing a pre-encoded (base64) value

      Returns Promise<VariableSkeleton>

      a promise that resolves to a variable object

    • Export variable. The response can be saved to file as is.

      Parameters

      • variableId: string

        variable id/name

      • OptionalnoDecode: boolean

        Do not decode value (default: false)

      Returns Promise<VariablesExportInterface>

      Promise resolving to a VariablesExportInterface object.

    • Import variables

      Parameters

      • importData: VariablesExportInterface

        import data

      • OptionalresultCallback: ResultCallback<VariableSkeleton>

        Optional callback to process individual results. When given, the outcome of every variable is passed to it once, as it happens: a variable that was imported as the variable (a variable that needed no update as it is in the import data), a variable that could not be imported as an error that names the variable and carries the cause. Such a variable is not part of the result and does not stop the others, and the function does not throw for it. Without it, the failures are collected and thrown as one error after every variable was tried.

      Returns Promise<VariableSkeleton[]>

      array of imported variable objects

    • Read variable by id/name

      Parameters

      • variableId: string

        variable id/name

      • OptionalnoDecode: boolean

        Do not decode value (default: false)

      Returns Promise<VariableSkeleton>

      a promise that resolves to a variable object

    • Attempt to resolve a string to an ESV variable in AIC deployments.

      Parameters

      • input: string

        Input string to be evaluated as a possible ESV.

      • variables: Record<string, VariableSkeleton>

        Provide an empty or prepopulated map of ESV variables. The function adds any resolved variables to the map that don't exist.

      Returns Promise<string>

      Returns the resolved value of the ESV or the original input string

    • Update or create variable

      Parameters

      • variableId: string

        variable id/name

      • Optionalvalue: string

        variable value

      • Optionaldescription: string

        variable description

      • OptionalexpressionType: VariableExpressionType

        type of the value

      • OptionalnoEncode: boolean

        do not encode if passing a pre-encoded (base64) value

      Returns Promise<VariableSkeleton>

      a promise that resolves to a variable object, or null if no update was made

    • Update variable description

      Parameters

      • variableId: string

        variable id/name

      • description: string

        variable description

      Returns Promise<VariableSkeleton>

      a promise that resolves to a variable object, or null if no update was made