iya-sts
    Preparing search index...
    build: (
        id: string,
        answers?: Record<string, unknown>,
        options?: { idBase?: string; name?: string },
    ) => BuildResult = ...

    Type Declaration

      • (
            id: string,
            answers?: Record<string, unknown>,
            options?: { idBase?: string; name?: string },
        ): BuildResult
      • Builds a policy model from a template and the answers given.

        A missing or blank answer takes the parameter's default, so a caller that sends nothing gets the documented example.

        Parameters

        • id: string

          the template id

        • Optionalanswers: Record<string, unknown>

          the parameter answers by name

        • Optionaloptions: { idBase?: string; name?: string }

          an optional name for the policy and idBase for its identifiers

        Returns BuildResult

        { ok: true, policy, answers, template }, or { ok: false, why } for an unknown template