import { Array as Array_2 } from '@morphic-ts/model-algebras/lib/types';
import { AType } from '@morphic-ts/summoners';
import { Eq } from '@viamedici-spc/fp-ts-extensions';
import { EqT } from '@viamedici-spc/fp-ts-extensions';
import { M } from '@morphic-ts/batteries/lib/summoner-ESBAST';
import { Refinement } from 'fp-ts/Refinement';

export declare type AllowedInExplain = {
    /**
     * Specifies whether all, none, or specific rules are allowed in the explanation result.
     */
    rules?: AllowedRulesInExplain | null;
};

declare interface AllowedInExplain_2 {
    rules?: AllowedRules | null;
}

declare type AllowedRules = (UtilRequiredKeys<AllowedRulesNone, "type"> | UtilRequiredKeys<AllowedRulesSpecific, "type"> | UtilRequiredKeys<AllowedRulesAll, "type">) & {
    type: string;
};

declare interface AllowedRulesAll {
    type: "AllowedRulesAll";
}

export declare type AllowedRulesInExplain = AllowedRulesInExplainNone | AllowedRulesInExplainAll | AllowedRulesInExplainSpecific;

export declare type AllowedRulesInExplainAll = {
    type: AllowedRulesInExplainType.all;
};

export declare type AllowedRulesInExplainNone = {
    type: AllowedRulesInExplainType.none;
};

export declare type AllowedRulesInExplainSpecific = {
    type: AllowedRulesInExplainType.specific;
    rules: ReadonlyArray<GlobalConstraintId>;
};

export declare enum AllowedRulesInExplainType {
    all = "all",
    none = "none",
    specific = "specific"
}

declare interface AllowedRulesNone {
    type: "AllowedRulesNone";
}

declare interface AllowedRulesSpecific {
    type: "AllowedRulesSpecific";
    rules: GlobalConstraintId_2[];
}

declare interface AlwaysIncluded {
    type: "AlwaysIncluded";
}

/**
 * @title Viamedici.Spc.Engine.ConfigurationEngine.RestApi.Service
 * @version v2
 * @license © 2024 Viamedici - All rights reserved (https://viamedici.de)
 * @termsOfService None
 * @baseUrl https://spc.cloud.ceventis.de/hca/api/engine
 * @contact Viamedici Software GmbH <info@viamedici.de> (https://viamedici.de)
 */
declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
    consequence: {
        /**
         * @description The route provides a list of Consequences which is the result of an evaluation weather of a Configuration Model or of made Decisions in conjunction with a Configuration Model, especially with the underlying set of Rules. The overall Configuration Model-Satisfaction State (see Glossary) is also given. A Consequence specifies for a certain Attribute in every case the Value Satisfaction State (true or false). In the case of "false", at least one Decision must still be made regarding an Attribute Value. For a Choice Attribute several Decisions may be still necessary. In addition to the Value Satisfaction State, further information is provided depending on the type of Attribute (see the scheme).
         *
         * @tags Consequence
         * @name ConsequenceGet
         * @summary The route provides the Consequences for all Attributes in the Configuration Session determined by evaluating
         the Configuration Model and the made Decisions (if any).
         * @request GET:/v2/session/configuration/consequence
         * @secure
         */
        consequenceGet: (params?: RequestParams) => Promise<HttpResponse<Consequences, Unspecified>>;
    };
    decision: {
        /**
         * @description The route transmits an Explicit Decision and returns the Consequences and the Affected Decisions. An Affected Decision is a Decision which is in a relation to the executed Explicit Decisions. The object "AffectedDecisions" contains also the Explicit Decisions transmitted by the request. When the API consumer is making a Decision for a Single Select Choice Attribute, the selection is updated to the new Decision. Any previous Choice Value Decision within the Choice Attribute will be replaced.
         *
         * @tags Decision
         * @name DecisionPutDecision
         * @summary The route transmits an Explicit Decision and returns the resulting consequences.
         * @request PUT:/v2/session/configuration/decision
         * @secure
         */
        decisionPutDecision: (data: ExplicitDecision_2, params?: RequestParams) => Promise<HttpResponse<PutDecisionResponse, Unspecified>>;
        /**
         * @description The route provides a list of Decisions which is the result of determinations by a consumer of the API, such as a Configurator, or by the Configuration Engine. A Decision regarding an Attribute consists of two information, the Decision State and the Decision Kind. ### Decision State In case of a Choice Attribute is specified for all Values whether they are included in finding a Solution by the Configuration Engine or not. In case of a Component Attribute is specified whether a referenced Component Configuration Model is included in finding a Solution by the Configuration Engine or not. Set Values of Numeric and Boolean Attributes are always automatically taken into account. ### Decision Kind It states weather a Decision has been made by a consumer of the API or by the Configuration Engine.
         *
         * @tags Decision
         * @name DecisionGetAllDecisions
         * @summary The route provides the Decisions for all Attributes in the Configuration Session determined by a
         consumer of the API or the Configuration Engine.
         * @request GET:/v2/session/configuration/decision
         * @secure
         */
        decisionGetAllDecisions: (params?: RequestParams) => Promise<HttpResponse<Decisions, Unspecified>>;
        /**
         * @description The route transmits an multiple Explicit Decision and returns the Consequences, the Affected Decisions and the Rejected Decisions. An Affected Decision is a Decision which is in a relation to the executed Explicit Decisions. The object "AffectedDecisions" contains also the Explicit Decisions transmitted by the request. A Rejected Decision is an Explicit Decision which contradicts the Configuration Model and has been therefore rejected by the Configuration Engine. There are several modes that control how Decisions are being applied.
         *
         * @tags Decision
         * @name DecisionPutMany
         * @summary The route transmits multiple Explicit Decisions and returns the resulting consequences.
         * @request PUT:/v2/session/configuration/decision/many
         * @secure
         */
        decisionPutMany: (data: ExplicitDecisions, params?: RequestParams) => Promise<HttpResponse<PutManyDecisionsResponse, Unspecified | PutManyDecisionsConflict>>;
    };
    explain: {
        /**
         * No description
         *
         * @tags Explain
         * @name ExplainWhyNotSatisfied
         * @request POST:/v2/session/configuration/consequence/explain/why-not-satisfied
         * @secure
         */
        explainWhyNotSatisfied: (data: WhyNotSatisfiedRequest, params?: RequestParams) => Promise<HttpResponse<ExplainResult, Unspecified>>;
        /**
         * No description
         *
         * @tags Explain
         * @name ExplainWhyNotSatisfiedDecisions
         * @request POST:/v2/session/configuration/consequence/explain/why-not-satisfied/answer/decisions
         * @secure
         */
        explainWhyNotSatisfiedDecisions: (data: WhyNotSatisfiedRequest, params?: RequestParams) => Promise<HttpResponse<DecisionExplanation_2[], Unspecified>>;
        /**
         * No description
         *
         * @tags Explain
         * @name ExplainWhyNotSatisfiedRules
         * @request POST:/v2/session/configuration/consequence/explain/why-not-satisfied/answer/constraints
         * @secure
         */
        explainWhyNotSatisfiedRules: (data: WhyNotSatisfiedRequest, params?: RequestParams) => Promise<HttpResponse<ConstraintExplanation_2[], Unspecified>>;
        /**
         * No description
         *
         * @tags Explain
         * @name ExplainWhyStateNotPossible
         * @request POST:/v2/session/configuration/consequence/explain/why-state-not-possible
         * @secure
         */
        explainWhyStateNotPossible: (data: WhyStateNotPossibleRequest, params?: RequestParams) => Promise<HttpResponse<ExplainResult, Unspecified>>;
        /**
         * No description
         *
         * @tags Explain
         * @name ExplainWhyStateNotPossibleDecisions
         * @request POST:/v2/session/configuration/consequence/explain/why-state-not-possible/answer/decisions
         * @secure
         */
        explainWhyStateNotPossibleDecisions: (data: WhyStateNotPossibleRequest, params?: RequestParams) => Promise<HttpResponse<DecisionExplanation_2[], Unspecified>>;
        /**
         * No description
         *
         * @tags Explain
         * @name ExplainWhyStateNotPossibleRules
         * @request POST:/v2/session/configuration/consequence/explain/why-state-not-possible/answer/constraints
         * @secure
         */
        explainWhyStateNotPossibleRules: (data: WhyStateNotPossibleRequest, params?: RequestParams) => Promise<HttpResponse<ConstraintExplanation_2[], Unspecified>>;
    };
    meta: {
        /**
         * No description
         *
         * @tags Meta
         * @name MetaGetConfigurationModel
         * @request GET:/v2/session/configuration/meta/configuration-model
         * @secure
         */
        metaGetConfigurationModel: (params?: RequestParams) => Promise<HttpResponse<ConfigurationModelMeta[], Unspecified>>;
        /**
         * No description
         *
         * @tags Meta
         * @name MetaGet
         * @request GET:/v2/session/configuration/meta
         * @secure
         */
        metaGet: (params?: RequestParams) => Promise<HttpResponse<CompleteMeta, Unspecified>>;
    };
    session: {
        /**
         * @description This route creates a new Configuration Session. The Session-ID included in the response serves as authentication for all "/session/*" prefixed routes. Note: This route requires API-Credentials.
         *
         * @tags Session
         * @name SessionPost
         * @summary Creates a new Configuration Session.
         * @request POST:/v2/session
         * @secure
         */
        sessionPost: (data: CreateSessionRequest, params?: RequestParams) => Promise<HttpResponse<CreateSessionSuccessResponse, Unspecified | ConfigurationModelNotFeasible_2>>;
        /**
         * @description An existing Configuration Session is terminated. Note: All state associated with the session will be discarded.
         *
         * @tags Session
         * @name SessionDelete
         * @summary Terminates an existing Configuration Session.
         * @request DELETE:/v2/session/{sessionId}
         * @secure
         */
        sessionDelete: (sessionId: string, params?: RequestParams) => Promise<HttpResponse<void, Unspecified>>;
        /**
         * @description An existing Configuration Session is terminated. Note: All state associated with the session will be discarded. This POST request has the same effect as the DELETE request. It must be used when the closing of a browser tab must be responded to. See also the specification under: https://developer.mozilla.org/en-US/docs/Web/API/Beacon_API.
         *
         * @tags Session
         * @name SessionClose
         * @summary Terminates an existing Configuration Session.
         * @request POST:/v2/session/close
         * @secure
         */
        sessionClose: (data: CloseSessionRequest, params?: RequestParams) => Promise<HttpResponse<void, Unspecified>>;
    };
}

declare interface ApiConfig<SecurityDataType = unknown> {
    baseUrl?: string;
    baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
    securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
    customFetch?: typeof fetch;
}

declare interface AssignedChannelNotFound {
    type: "AssignedChannelNotFound";
    title: string;
    detail: string;
    globalChannelId: GlobalChannelId;
}

export declare type Attribute = BooleanAttribute | NumericAttribute | ChoiceAttribute | ComponentAttribute;

declare type AttributeIdStage<TNext> = (attributeId: GlobalAttributeId) => TNext;

declare namespace AttributeInterpreter {
    export {
        isMandatory,
        isChoiceAttributeMultiSelect,
        getAllowedChoiceValues,
        getBlockedChoiceValues,
        getIncludedChoiceValues
    }
}
export { AttributeInterpreter }

export declare type AttributeNotFound = Omit<Engine.AttributeNotFound, "type" | "globalAttributeId"> & {
    readonly type: ConfiguratorErrorType.AttributeNotFound;
    readonly globalAttributeId: GlobalAttributeId;
};

declare interface AttributeNotFound_2 {
    type: "AttributeNotFound";
    title: string;
    detail: string;
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    globalAttributeId: GlobalAttributeId_2;
}

declare namespace AttributeRefinements {
    export {
        booleanAttributeRefinement,
        choiceAttributeRefinement,
        numericAttributeRefinement,
        componentAttributeRefinement
    }
}
export { AttributeRefinements }

export declare type AttributeRelations = ReadonlyArray<DecisionsToRespect>;

declare interface Attributes {
    choiceAttributes?: ChoiceAttribute_2[] | null;
    numericAttributes?: NumericAttribute_2[] | null;
    booleanAttributes?: BooleanAttribute_2[] | null;
    componentAttributes?: ComponentAttribute_2[] | null;
}

export declare enum AttributeType {
    Boolean = "Boolean",
    Numeric = "Numeric",
    Choice = "Choice",
    Component = "Component"
}

declare type AttributeUsageRule = UsageRule & {
    attributeId?: string;
};

export declare type AuthenticationFailure = ReplaceType<Engine.AuthenticationFailure, ConfiguratorErrorType.AuthenticationFailure>;

declare interface AuthenticationFailure_2 {
    type: "AuthenticationFailure";
    title: string;
    detail: string;
}

export declare type AutomaticConflictResolution = {
    type: "Automatic";
};

declare interface AutomaticConflictResolution_2 {
    type: "Automatic";
}

export declare type BaseAttribute = {
    readonly type: AttributeType;
    readonly id: GlobalAttributeId;
    readonly key: GlobalAttributeIdKey;
    /**
     * @remarks To enable the sourceId, set provideSourceId to true in SessionContext. Otherwise, it stays undefined.
     */
    readonly sourceId?: SourceAttributeId;
    readonly isSatisfied: boolean;
    readonly canContributeToConfigurationSatisfaction: boolean;
};

declare type BaseCausedByDecision = {
    readonly type: AttributeType;
    readonly attributeId: GlobalAttributeId;
};

export declare type BaseCollectedDecision<T extends number | boolean | ChoiceValueDecisionState | ComponentDecisionState> = Decision<T> & {
    readonly attributeType: AttributeType;
    readonly attributeId: GlobalAttributeId;
    readonly attributeKey: GlobalAttributeIdKey;
};

declare type BaseExplicitDecision = {
    readonly type: AttributeType;
    readonly attributeId: GlobalAttributeId;
};

export declare type BooleanAttribute = BaseAttribute & {
    readonly type: AttributeType.Boolean;
    readonly decision: Decision<boolean> | null;
    readonly nonOptimisticDecision: Decision<boolean> | null;
    readonly possibleDecisionStates: ReadonlyArray<boolean>;
    readonly selection: Selection_2;
};

declare interface BooleanAttribute_2 {
    attributeId: string;
    isDecisionRequired: boolean;
}

export declare type BooleanAttributeNotFound = Omit<Engine.BooleanAttributeNotFound, "type" | "globalAttributeId"> & {
    readonly type: ConfiguratorErrorType.BooleanAttributeNotFound;
    readonly globalAttributeId: GlobalAttributeId;
};

declare interface BooleanAttributeNotFound_2 {
    type: "BooleanAttributeNotFound";
    title: string;
    detail: string;
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    globalAttributeId: GlobalAttributeId_2;
}

declare const booleanAttributeRefinement: Refinement<Attribute, BooleanAttribute>;

/**
 * A Boolean Consequence is the result of an evaluation weather of a Configuration Model or of made
 * Decisions in conjunction with a Configuration Model.
 * For a Boolean Attribute, represented by a Global Attribute ID, the following is specified:
 * (1) By a boolean is specified whether a Decision is still necessary (isSatisfied = false) or not
 *     (isSatisfied = true).
 * (2) The meta attribute "selection" indicates if a Value assignment (the choice "true" or "false") is mandatory or not.
 * (3) Furthermore, the currently still possible boolean states are indicated.
 */
declare interface BooleanConsequence {
    /**
     * The ability to nest Configuration Models and reuse them in Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used. Details can be found in the scheme "GlobalAttributeId".
     */
    attributeId: GlobalAttributeId_2;
    /**
     * In this case, the meta attribute "isSatisfied" represents the "Value Satisfaction State".
     * The "Value" is one of the two Values of a Boolean Attribute.
     * It indicates for the Attribute under consideration whether Decisions still need to be made.
     */
    isSatisfied: boolean;
    /**
     * A Configurator must be able to realize different use cases. The API must support this, of course.
     * Therefore, there are two possibilities regarding the value assignment of a Boolean Attribute:
     * "Mandatory" means that an assignment TRUE respectively FALSE must be done.
     * "Optional" means that an assignment TRUE respectively FALSE can be done -
     * especially also by the Configuration Engine.
     * The meta attribute represents the design decision of the modeler. It can be used, for example,
     * for the state display of a control.
     */
    selection: Selection_3;
    /**
     * In case of a Boolean Attribute the two possible Decision States are "True" and "False".
     * The object "PossibleDecisionStates" encapsulates the currently still
     * possible boolean states.
     */
    possibleDecisionStates: boolean[];
}

declare interface BooleanDecision {
    /**
     * The ability to nest Configuration Models and reuse them in Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used. Details can be found in the scheme "GlobalAttributeId".
     */
    attributeId: GlobalAttributeId_2;
    /**
     * In the case of a Boolean Decision, the meta attribute "state" represents one of the two Values of the
     * considered Boolean Attribute.
     * The specified Value is always included when the Configuration Engine searches a solution.
     * The other Value is automatically excluded.
     */
    state?: boolean | null;
    /**
     * The meta-attribute "kind" represents the so-called Value Decision Kind.
     * It indicates the responsibility for the selected Value Decision State.
     *
     * ### Implicit
     *             "Implicit" means that the inclusion or exclusion of a Value has been made
     * by the Configuration Engine when there is no other decision left.
     *
     * ### Explicit
     * "Explicit" means that the inclusion or exclusion of a Value has been made
     * by the consumer of the API.
     */
    kind: DecisionKind_2;
}

declare const BooleanDecision_: M<    {}, Readonly<{
type: string;
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: boolean;
}>, Readonly<{
type: "Boolean";
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: boolean;
}>>;

declare type BooleanDecision_2 = AType<typeof BooleanDecision_>;

declare type CancelToken = Symbol | string | number;

export declare type Cardinality = {
    readonly lowerBound: number;
    readonly upperBound: number;
};

/** Controls how many Values can respectively must be selected. */
declare interface Cardinality_2 {
    /**
     * Controls how many Values must be selected.
     * - 0 means that the selection of a Value is optional.
     * - N means that a least N Values must be selected. For example: 1 means that mandatory 1 Value must be selected.
     */
    lowerBound: number;
    /**
     * Controls how many Values can be selected.
     * - 1 means that only one Value can be selected.
     * - N means that optional N Values can be selected.
     */
    upperBound: number;
}

declare interface CardinalityConstraint {
    type: "Cardinality";
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
}

export declare type CausedByBooleanDecision = BaseCausedByDecision & {
    readonly type: AttributeType.Boolean;
    readonly state: boolean;
};

/** The object "CausedByBooleanDecision" encapsulates a Boolean Value with the associated current Decision State. */
declare interface CausedByBooleanDecision_2 {
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
    reason: Reason;
    type: "Boolean";
    state?: boolean | null;
}

export declare type CausedByChoiceValueDecision = BaseCausedByDecision & {
    readonly type: AttributeType.Choice;
    readonly choiceValueId: ChoiceValueId;
    readonly state: ChoiceValueDecisionState;
};

/** The object "CausedByChoiceDecision" encapsulates  a list of Choice Values with the associated current Decision State. */
declare interface CausedByChoiceValueDecision_2 {
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
    reason: Reason;
    type: "Choice";
    choiceValueId: string;
    /**
     * A Decision is a decision about an Attribute. For each Value, it is stated explicitly or implicitly
     * whether it should be included in the search for a Solution by the Configuration Engine.
     * Before a Decision is made, there are two possible "Decision States": "Included" and "Excluded".
     * In case of a Choice Attribute, these are "Value-Decision States", i. e. Decision States regarding a Choice Value.
     * In case of a Component Attribute, these are "Model-Decision States", i. e. Decision States regarding a
     * Component Configuration Model.
     * ### Included
     * "Included" means that a Value of a Choice Attribute or a referenced Component Configuration Model
     * can be taken into account when the Configuration Engine searches for a Solution.
     * ### Excluded
     * "Excluded" means that a considered Value of a Choice Attribute or a referenced Component Configuration Model
     * cannot be taken into account when the Configuration Engine searches for a Solution.
     */
    state: PossibleDecisionState;
}

export declare type CausedByComponentDecision = BaseCausedByDecision & {
    readonly type: AttributeType.Component;
    readonly state: ComponentDecisionState;
};

/**
 * The object "CausedByComponentDecision" specifies weather a referenced Component Configuration Model is taken into account
 * if the Configuration Engine searches a Solution.
 */
declare interface CausedByComponentDecision_2 {
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
    reason: Reason;
    type: "Component";
    /**
     * A Decision is a decision about an Attribute. For each Value, it is stated explicitly or implicitly
     * whether it should be included in the search for a Solution by the Configuration Engine.
     * Before a Decision is made, there are two possible "Decision States": "Included" and "Excluded".
     * In case of a Choice Attribute, these are "Value-Decision States", i. e. Decision States regarding a Choice Value.
     * In case of a Component Attribute, these are "Model-Decision States", i. e. Decision States regarding a
     * Component Configuration Model.
     * ### Included
     * "Included" means that a Value of a Choice Attribute or a referenced Component Configuration Model
     * can be taken into account when the Configuration Engine searches for a Solution.
     * ### Excluded
     * "Excluded" means that a considered Value of a Choice Attribute or a referenced Component Configuration Model
     * cannot be taken into account when the Configuration Engine searches for a Solution.
     */
    state: PossibleDecisionState;
}

export declare type CausedByDecision = BaseCausedByDecision & (CausedByChoiceValueDecision | CausedByNumericDecision | CausedByBooleanDecision | CausedByComponentDecision);

declare type CausedByDecision_2 = (UtilRequiredKeys<CausedByChoiceValueDecision_2, "attributeId" | "reason" | "type"> | UtilRequiredKeys<CausedByNumericDecision_2, "attributeId" | "reason" | "type"> | UtilRequiredKeys<CausedByBooleanDecision_2, "attributeId" | "reason" | "type"> | UtilRequiredKeys<CausedByComponentDecision_2, "attributeId" | "reason" | "type">) & {
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
    reason: Reason;
    type: string;
};

export declare type CausedByNumericDecision = BaseCausedByDecision & {
    readonly type: AttributeType.Numeric;
    readonly state: number;
};

/** The object "CausedByNumericDecision" encapsulates a Numeric Value with the associated current Decision State. */
declare interface CausedByNumericDecision_2 {
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
    reason: Reason;
    type: "Numeric";
    /** @format decimal */
    state?: number | null;
}

export declare type ChannelId = string;

export declare type ChoiceAttribute = BaseAttribute & {
    readonly type: AttributeType.Choice;
    readonly values: ReadonlyMap<ChoiceValueId, ChoiceValue>;
    readonly cardinality: Cardinality;
};

declare interface ChoiceAttribute_2 {
    attributeId: string;
    lowerBound: number;
    upperBound: number;
    choiceValues: ChoiceValue_2[];
}

export declare type ChoiceAttributeNotFound = Omit<Engine.ChoiceAttributeNotFound, "type" | "globalAttributeId"> & {
    readonly type: ConfiguratorErrorType.ChoiceAttributeNotFound;
    readonly globalAttributeId: GlobalAttributeId;
};

declare interface ChoiceAttributeNotFound_2 {
    type: "ChoiceAttributeNotFound";
    title: string;
    detail: string;
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    globalAttributeId: GlobalAttributeId_2;
}

declare const choiceAttributeRefinement: Refinement<Attribute, ChoiceAttribute>;

/**
 * A Choice Consequence is the result of an evaluation weather of a Configuration Model or of made
 * Decisions in conjunction with a Configuration Model.
 * For a Choice Attribute, represented by a Global Attribute ID, the following is specified:
 * (1) By a boolean is specified whether a Decision is still necessary (isSatisfied = false) or not
 *     (isSatisfied = true).
 * (2) In the object "Cardinality" is specified the assignment type of the Attribute Values that is
 *     determined during modeling (mandatory, optional, multiple).
 * (3) Furthermore, the currently still possible decision states are indicated for every Value.
 *     These are represented in the form of a list of objects of type "ChoiceValueConsequence".
 */
declare interface ChoiceConsequence {
    /**
     * The ability to nest Configuration Models in different ways requires an Attribute identifier
     * that is unique across all Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used. Details can be found in the scheme "GlobalAttributeId".
     */
    attributeId: GlobalAttributeId_2;
    /**
     * In this case, the meta attribute "isSatisfied" represents the "Value Satisfaction State".
     * The "Value" is the value of a Choice Attribute, which is always a string.
     * It indicates for the Attribute under consideration whether Decisions still need to be made.
     */
    isSatisfied: boolean;
    /**
     * The value assignment for Attributes can be different: one or more mandatory Values respectively one or more optional Values.
     * The allowed possibilities are specified by giving an upper as well as a lower limit value.
     * Those limit values are contained in the object Cardinality.
     */
    cardinality: Cardinality_2;
    /** "Values" represents a list of Choice Value Consequences. */
    values: ChoiceValueConsequence[];
}

declare type ChoiceDecision = AType<typeof ChoiceDecision_>;

declare const ChoiceDecision_: M<    {}, Readonly<{
type: string;
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
choiceValueId: string;
state: string;
}>, Readonly<{
type: "Choice";
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
choiceValueId: string;
state: "Included" | "Excluded";
}>>;

export declare type ChoiceValue = {
    readonly id: ChoiceValueId;
    readonly decision: Decision<ChoiceValueDecisionState> | null;
    readonly nonOptimisticDecision: Decision<ChoiceValueDecisionState> | null;
    readonly possibleDecisionStates: ReadonlyArray<ChoiceValueDecisionState>;
};

declare interface ChoiceValue_2 {
    choiceValueId: string;
}

/**
 * A Choice Value Consequence specifies the possible Decision States for a certain Value of a Choice Attribute.
 * It is represented by an object of the type "ChoiceValueConsequence".
 */
declare interface ChoiceValueConsequence {
    /** Every item in an enumeration of Values of a Choice Attribute is identified by a string. */
    choiceValueId: string;
    /**
     * There are zwo possible Decision States for a Value of a Choice Attribute: "Included" and "Excluded".
     * The object "PossibleDecisionStates" specifies the currently still possible Decision States
     * for a Choice Value.
     */
    possibleDecisionStates: PossibleDecisionState[];
}

/**
 * A Choice Value Decision is a decision regarding a Value of a Choice Attribute.
 * Such a decision can be made explicitly by a user of the API, e.g. a Configurator or implicitly
 * by the Configuration Engine.
 * It concerns the question of whether a Value is included in finding a Solution
 * (Value-Decision State = “Included”) or not (Value-Decision State = “Excluded”).
 * It also specifies for the considered Value who is responsible for including or excluding:
 * the API consumer or the Configuration Engine.
 */
declare interface ChoiceValueDecision {
    /**
     * The ability to nest Configuration Models and reuse them in Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used. Details can be found in the scheme "GlobalAttributeId".
     */
    attributeId: GlobalAttributeId_2;
    /** A Choice Value is identified by a string. */
    choiceValueId: string;
    /**
     * The meta-attribute "state" represents the so-called Value Decision State.
     *
     * ### state = “Included”
     * "Included" means that the considered Choice Value is taken into account
     * when the Configuration Engine searches for a Solution.
     * - This is analogous to selecting a Value.
     *
     * ### state = “Excluded”
     * "Excluded" means that the considered Choice Value is not taken into account
     * when the Configuration Engine searches for a Solution.
     * - An excluded Value can not become the subject of an Implicit Decision.
     *
     * ### state = "Undefined"
     * "Undefined" states that it is not yet decided if the considered Choice Value is
     * taken into account or not.
     * - This is analogous to not having selected a Value.
     * - An undefined Choice Value can still become the subject of an Implicit Decision.
     */
    state: DecisionState;
    /**
     * The meta-attribute "kind" represents the so-called Value Decision Kind.
     * It indicates the responsibility for the selected Value Decision State.
     *
     * ### Implicit
     *             "Implicit" means that the inclusion or exclusion of a Value has been made
     * by the Configuration Engine when there is no other decision left.
     *
     * ### Explicit
     * "Explicit" means that the inclusion or exclusion of a Value has been made
     * by the consumer of the API.
     */
    kind: DecisionKind_2;
}

export declare enum ChoiceValueDecisionState {
    Included = "Included",
    Excluded = "Excluded"
}

export declare type ChoiceValueId = string;

declare type ChoiceValueIdStage<TNext> = {
    choiceValue: (choiceValueId: ChoiceValueId) => TNext;
};

declare namespace ChoiceValueInterpreter {
    export {
        isAllowed,
        isBlocked
    }
}
export { ChoiceValueInterpreter }

export declare type ChoiceValueNotFound = Omit<Engine.ChoiceValueNotFound, "type" | "globalChoiceValueId"> & {
    readonly type: ConfiguratorErrorType.ChoiceValueNotFound;
    readonly globalAttributeId: GlobalAttributeId;
    readonly choiceValueId: ChoiceValueId;
};

declare interface ChoiceValueNotFound_2 {
    type: "ChoiceValueNotFound";
    title: string;
    detail: string;
    globalChoiceValueId: GlobalChoiceValueId;
}

declare type ChoiceValueUsageRule = UsageRule & {
    attributeId?: string;
    choiceValueId?: string;
};

export declare type ClientSideSessionInitialisationOptions = {
    /**
     * The access token used for authenticating with the Headless Configuration Engine (HCE) API.
     */
    readonly accessToken: string;
};

declare interface CloseSessionRequest {
    sessionId: string;
}

export declare type CollectedBooleanDecision = BaseCollectedDecision<boolean> & {
    readonly attributeType: AttributeType.Boolean;
};

declare const collectedBooleanDecisionRefinement: Refinement<CollectedDecision, CollectedBooleanDecision>;

export declare type CollectedChoiceDecision = BaseCollectedDecision<ChoiceValueDecisionState> & {
    readonly attributeType: AttributeType.Choice;
    readonly choiceValueId: ChoiceValueId;
};

declare const collectedChoiceDecisionRefinement: Refinement<CollectedDecision, CollectedChoiceDecision>;

export declare type CollectedComponentDecision = BaseCollectedDecision<ComponentDecisionState> & {
    readonly attributeType: AttributeType.Component;
};

declare const collectedComponentDecisionRefinement: Refinement<CollectedDecision, CollectedComponentDecision>;

export declare type CollectedDecision = CollectedBooleanDecision | CollectedNumericDecision | CollectedComponentDecision | CollectedChoiceDecision;

declare namespace CollectedDecisionRefinements {
    export {
        collectedBooleanDecisionRefinement,
        collectedNumericDecisionRefinement,
        collectedComponentDecisionRefinement,
        collectedChoiceDecisionRefinement,
        collectedExplicitDecisionRefinement,
        collectedImplicitDecisionRefinement
    }
}
export { CollectedDecisionRefinements }

export declare type CollectedExplicitDecision = CollectedDecision & {
    kind: DecisionKind.Explicit;
};

declare const collectedExplicitDecisionRefinement: Refinement<CollectedDecision, CollectedExplicitDecision>;

export declare type CollectedImplicitDecision = CollectedDecision & {
    kind: DecisionKind.Implicit;
};

declare const collectedImplicitDecisionRefinement: Refinement<CollectedDecision, CollectedImplicitDecision>;

export declare type CollectedNumericDecision = BaseCollectedDecision<number> & {
    readonly attributeType: AttributeType.Numeric;
};

declare const collectedNumericDecisionRefinement: Refinement<CollectedDecision, CollectedNumericDecision>;

declare interface CompleteMeta {
    configurationModels: ConfigurationModelMeta[];
}

export declare type ComponentAttribute = BaseAttribute & {
    readonly type: AttributeType.Component;
    readonly decision: Decision<ComponentDecisionState> | null;
    readonly nonOptimisticDecision: Decision<ComponentDecisionState> | null;
    readonly inclusion: Inclusion;
    readonly selection: Selection_2 | null;
    readonly possibleDecisionStates: ReadonlyArray<ComponentDecisionState>;
};

declare interface ComponentAttribute_2 {
    attributeId: string;
    configurationModelId: string;
    inclusion: ComponentInclusionType;
}

export declare type ComponentAttributeNotFound = Omit<Engine.ComponentAttributeNotFound, "type" | "globalAttributeId"> & {
    readonly type: ConfiguratorErrorType.ComponentAttributeNotFound;
    readonly globalAttributeId: GlobalAttributeId;
};

declare interface ComponentAttributeNotFound_2 {
    type: "ComponentAttributeNotFound";
    title: string;
    detail: string;
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    globalAttributeId: GlobalAttributeId_2;
}

declare const componentAttributeRefinement: Refinement<Attribute, ComponentAttribute>;

/**
 * A Component Consequence is the result of an evaluation weather of a Configuration Model or of made
 * Decisions in conjunction with a Configuration Model.
 * For a Component Attribute, represented by a Global Attribute ID, the following is specified:
 * (1) By a boolean is specified whether a Decision is still necessary (isSatisfied = false) or not
 *     (isSatisfied = true).
 * (2) The meta attribute "inclusion" specifies whether a referenced Component Configuration Model is always
 *     considered in finding a Solution (inclusion = "Always") or only under certain conditions (inclusion = "Optional").
 * (3) The meta attribute "selection" indicates if the referencing of a Component Configuration Model is mandatory or not.
 * (4) Furthermore, the currently still possible Decision States are indicated.
 *     These are represented in the form of a list of objects of type "ChoiceValueConsequence".
 *     Examples can be found in the product documentation.
 */
declare interface ComponentConsequence {
    /**
     * The ability to nest Configuration Models and reuse them in Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used. Details can be found in the scheme "GlobalAttributeId".
     */
    attributeId: GlobalAttributeId_2;
    /**
     * In this case, the meta attribute "isSatisfied" represents the "Value Satisfaction State".
     * The "Value" in this case is the name (identifier) of a Component Configuration Model.
     * It indicates for the Component Attribute under consideration whether Decisions still need to be made.
     * For details and examples see the product documentation.
     */
    isSatisfied: boolean;
    /**
     * The meta attribute "inclusion" maps a design decision when modeling a real-world product. A certain component of a
     * product or system of the real world is either mandatory or it is not required in every case.
     * Accordingly, the reference to a Component Configuration Model is set fixed (inclusion = Always) or
     * it is optional and can be set when necessary (inclusion = Optional).
     * Examples can be found in the product documentation.
     */
    inclusion: Inclusion_2;
    /**
     * The meta attribute "selection" is only relevant if the value assignment for a Component Attribute is optional,
     * i.e. a Component Configuration Model is referenced optionally (inclusion = Optional).
     * There are two possibilities regarding an optionally referenced Component Configuration Model:
     * "Mandatory" means that a decision whether or not to reference a Component Configuration Model is mandatory.
     * "Optional" means that a decision whether or not to reference a Component Configuration Model is optionally.
     * Such a reference can be also set by the Configuration Engine.
     * The meta attribute represents the design decision of the modeler. It can be used, for example,
     * for the state display of a control.
     */
    selection?: Selection_3 | null;
    /**
     * There are two possible Decision States for a Value of a Component Attribute which is a reference to a
     * Component Configuration Model: "Included" and "Excluded".
     * A referenced Component Configuration Model may be part of finding a Solution (Decision State = "Included")
     * or it may be excluded from finding a Solution Decision State = "Excluded"). In other words,
     * the Attributes of the referenced Component Configuration Model and their Values are part of the
     * configuration result or not. Examples can be found in the product documentation.
     * The object "PossibleDecisionStates" encapsulates the currently still possible Decision States for the
     * referenced Component Configuration Model.
     */
    possibleDecisionStates: PossibleDecisionState[];
}

declare interface ComponentDecision {
    /**
     * The ability to nest Configuration Models and reuse them in Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used. Details can be found in the scheme "GlobalAttributeId".
     */
    attributeId: GlobalAttributeId_2;
    /**
     * The meta-attribute "state" represents the so-called Value Decision State. In case of a
     * Component Attribute means "Value" the reference to a Component Configuration Model.
     *
     * ### state = “Included”
     * "Included" means that the referenced Component Configuration Model
     * is taken into account when the Configuration Engine searches for a Solution.
     *
     * ### state = “Excluded”
     * "Excluded" means that he referenced Component Configuration Model is not taken into account
     * when the Configuration Engine searches for a Solution.
     *
     * ### state = "Undefined"
     * "Undefined" states that it is not yet decided if the referenced
     * Component Configuration Model is taken into account or not.
     * - A referenced Component Configuration Model that has the Decision State "undefined"
     *   can still become the subject of an Implicit Decision.
     */
    state: DecisionState;
    /**
     * The meta-attribute "kind" represents the so-called Value Decision Kind.
     * It indicates the responsibility for the selected Value Decision State.
     *
     * ### Implicit
     *             "Implicit" means that the inclusion or exclusion of a Value has been made
     * by the Configuration Engine when there is no other decision left.
     *
     * ### Explicit
     * "Explicit" means that the inclusion or exclusion of a Value has been made
     * by the consumer of the API.
     */
    kind: DecisionKind_2;
}

declare const ComponentDecision_: M<    {}, Readonly<{
type: string;
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: string;
}>, Readonly<{
type: "Component";
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: "Included" | "Excluded";
}>>;

declare type ComponentDecision_2 = AType<typeof ComponentDecision_>;

export declare enum ComponentDecisionState {
    Included = "Included",
    Excluded = "Excluded"
}

declare type ComponentInclusionType = (UtilRequiredKeys<OptionallyIncluded, "type"> | UtilRequiredKeys<AlwaysIncluded, "type">) & {
    type: string;
};

export declare type Configuration = {
    readonly isSatisfied: boolean;
    readonly attributes: ReadonlyMap<GlobalAttributeIdKey, Attribute>;
};

export declare type ConfigurationChanges = {
    readonly isSatisfied: boolean | null;
    readonly attributes: {
        readonly added: ReadonlyArray<Attribute>;
        readonly changed: ReadonlyArray<Attribute>;
        readonly removed: ReadonlyArray<GlobalAttributeId>;
    };
};

export declare type ConfigurationInitializationFailure = ReplaceType<Engine.ConfigurationInitializationFailure, ConfiguratorErrorType.ConfigurationInitializationFailure>;

declare interface ConfigurationInitializationFailure_2 {
    type: "ConfigurationInitializationFailure";
    title: string;
    detail: string;
    deploymentId?: string | null;
}

declare namespace ConfigurationInterpreter {
    export {
        getAttributesOfComponentAttribute,
        getAttributesOfSharedConfigurationModel,
        getAttributesOfRootConfigurationModel,
        getChoiceAttributes,
        getComponentAttributes,
        getNumericAttributes,
        getBooleanAttributes,
        getAttribute,
        getChoiceAttribute,
        getChoiceValue,
        getNumericAttribute,
        getBooleanAttribute,
        getComponentAttribute
    }
}
export { ConfigurationInterpreter }

declare interface ConfigurationModel {
    configurationModelId: string;
    sharedFromConfigurationModels?: string[] | null;
    attributes: Attributes;
    constraints?: Constraint[] | null;
    usageRules?: UsageRules | null;
}

export declare type ConfigurationModelFromChannel = {
    type: ConfigurationModelSourceType.Channel;
    /**
     * Channel name specified for the configuration model deployment.
     */
    channel: ChannelId;
    /**
     * Name of the configuration model deployment.
     */
    deploymentName: string;
};

declare interface ConfigurationModelFromChannel_2 {
    type: "Channel";
    channel: string;
    deploymentName: string;
}

export declare type ConfigurationModelFromPackage = {
    type: ConfigurationModelSourceType.Package;
    /**
     * A self-contained package that describes the configuration model.
     */
    configurationModelPackage: Engine.ConfigurationModelPackage;
};

declare interface ConfigurationModelFromPackage_2 {
    type: "Package";
    configurationModelPackage: ConfigurationModelPackage;
}

export declare type ConfigurationModelId = string;

export declare type ConfigurationModelInvalid = ReplaceType<Engine.ConfigurationModelInvalid, ConfiguratorErrorType.ConfigurationModelInvalid>;

declare interface ConfigurationModelInvalid_2 {
    type: "ConfigurationModelInvalid";
    title: string;
    detail: string;
    validationMessage?: string | null;
}

export declare type ConfigurationModelLoadFailure = ReplaceType<Engine.ConfigurationModelLoadFailure, ConfiguratorErrorType.ConfigurationModelLoadFailure>;

declare interface ConfigurationModelLoadFailure_2 {
    type: "ConfigurationModelLoadFailure";
    title: string;
    detail: string;
}

declare interface ConfigurationModelMeta {
    globalAttributeIds: GlobalAttributeId_2[];
    configurationModelId: string;
}

export declare type ConfigurationModelNotFeasible = Omit<Engine.ConfigurationModelNotFeasible, "type" | "constraintExplanations"> & {
    readonly type: ConfiguratorErrorType.ConfigurationModelNotFeasible;
    readonly constraintExplanations: ReadonlyArray<ConstraintExplanation>;
};

declare interface ConfigurationModelNotFeasible_2 {
    type: "ConfigurationModelNotFeasible";
    title: string;
    detail: string;
    constraintExplanations?: ConstraintExplanation_2[] | null;
}

export declare type ConfigurationModelNotFound = ReplaceType<Engine.ConfigurationModelNotFound, ConfiguratorErrorType.ConfigurationModelNotFound>;

declare interface ConfigurationModelNotFound_2 {
    type: "ConfigurationModelNotFound";
    title: string;
    detail: string;
}

declare interface ConfigurationModelPackage {
    root: string;
    configurationModels: ConfigurationModel[];
}

export declare type ConfigurationModelSource = ConfigurationModelFromChannel | ConfigurationModelFromPackage;

/**
 * There are two ways to make a Configuration Model, which generally consists of several
 * Sub Configuration Models, part of a Configuration Session.
 * (1) A specific deployed model version can be obtained from a specific Channel.
 *     This is the variant for the majority of cases.
 * (2) The nested structure of the sub models can be specified as a "Package" directly in the request body.
 */
declare type ConfigurationModelSource_2 = (UtilRequiredKeys<ConfigurationModelFromChannel_2, "type"> | UtilRequiredKeys<ConfigurationModelFromPackage_2, "type">) & {
    type: string;
};

export declare enum ConfigurationModelSourceType {
    Channel = "Channel",
    Package = "Package"
}

export declare type ConfiguratorError = RequestTimeout | RequestFailure | SerializationError | MissingTenantIdClaim | MissingSessionIdClaim | TenantAccessForbidden | SessionIdInvalid | AuthenticationFailure | SideLoadingForbidden | UsageRuleRestriction | ConfigurationModelInvalid | SolutionNotFeasible | ConfigurationModelNotFound | SolverInitializationFailure | ConfigurationModelLoadFailure | ConfigurationInitializationFailure | SolverPoolInitializationFailure | SetDecisionConflict | SolveOperationTimeout | ExplainConflict | ExplainFailure | SnapshotInvalid | SnapshotNotFound | ConfigurationModelNotFeasible | MakeManyDecisionsConflict | SpecifiedDeploymentForbidden | AttributeNotFound | ChoiceAttributeNotFound | ComponentAttributeNotFound | NumericAttributeNotFound | BooleanAttributeNotFound | ChoiceValueNotFound | NumericDecisionOutOfRange | ConflictWithConsequence | DecisionsToRespectInvalid | SessionNotFound | ServerError | ConnectionError | TaskCancelled | SessionClosed | StoredConfigurationInvalid;

export declare enum ConfiguratorErrorType {
    RequestTimeout = "RequestTimeout",
    RequestFailure = "RequestFailure",
    SerializationError = "SerializationError",
    MissingTenantIdClaim = "MissingTenantIdClaim",
    MissingSessionIdClaim = "MissingSessionIdClaim",
    TenantAccessForbidden = "TenantAccessForbidden",
    SessionIdInvalid = "SessionIdInvalid",
    AuthenticationFailure = "AuthenticationFailure",
    SideLoadingForbidden = "SideLoadingForbidden",
    UsageRuleRestriction = "UsageRuleRestriction",
    ConfigurationModelInvalid = "ConfigurationModelInvalid",
    SolutionNotFeasible = "SolutionNotFeasible",
    ConfigurationModelNotFound = "ConfigurationModelNotFound",
    SolverInitializationFailure = "SolverInitializationFailure",
    ConfigurationModelLoadFailure = "ConfigurationModelLoadFailure",
    ConfigurationInitializationFailure = "ConfigurationInitializationFailure",
    SolverPoolInitializationFailure = "SolverPoolInitializationFailure",
    SetDecisionConflict = "SetDecisionConflict",
    SolveOperationTimeout = "SolveOperationTimeout",
    ExplainConflict = "ExplainConflict",
    ExplainFailure = "ExplainFailure",
    SnapshotInvalid = "SnapshotInvalid",
    SnapshotNotFound = "SnapshotNotFound",
    ConfigurationModelNotFeasible = "ConfigurationModelNotFeasible",
    MakeManyDecisionsConflict = "MakeManyDecisionsConflict",
    SpecifiedDeploymentForbidden = "SpecifiedDeploymentForbidden",
    AttributeNotFound = "AttributeNotFound",
    ChoiceAttributeNotFound = "ChoiceAttributeNotFound",
    ComponentAttributeNotFound = "ComponentAttributeNotFound",
    NumericAttributeNotFound = "NumericAttributeNotFound",
    BooleanAttributeNotFound = "BooleanAttributeNotFound",
    ChoiceValueNotFound = "ChoiceValueNotFound",
    NumericDecisionOutOfRange = "NumericDecisionOutOfRange",
    ConflictWithConsequence = "ConflictWithConsequence",
    DecisionsToRespectInvalid = "DecisionsToRespectInvalid",
    SessionNotFound = "SessionNotFound",
    ServerError = "ServerError",
    ConnectionError = "ConnectionError",
    TaskCancelled = "TaskCancelled",
    SessionClosed = "SessionClosed",
    StoredConfigurationInvalid = "StoredConfigurationInvalid"
}

export declare type ConflictResolution = ManualConflictResolution | AutomaticConflictResolution;

declare type ConflictResolution_2 = (UtilRequiredKeys<ManualConflictResolution_2, "type"> | UtilRequiredKeys<AutomaticConflictResolution_2, "type">) & {
    type: string;
};

export declare type ConflictWithConsequence = Omit<Engine.ConflictWithConsequence, "type" | "globalAttributeId" | "choiceValueId"> & {
    readonly type: ConfiguratorErrorType.ConflictWithConsequence;
    readonly globalAttributeId: GlobalAttributeId;
    readonly choiceValueId?: ChoiceValueId | null;
};

declare interface ConflictWithConsequence_2 {
    type: "ConflictWithConsequence";
    title: string;
    detail: string;
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    globalAttributeId: GlobalAttributeId_2;
    choiceValueId?: string | null;
}

export declare type ConnectionError = {
    readonly type: ConfiguratorErrorType.ConnectionError;
};

/**
 * The Consequences are the result of an evaluation weather of a Configuration Model or of made
 * Decisions in conjunction with a Configuration Model.
 * The Consequences object consists of a boolean attribute representing the overall
 * Configuration Model Satisfaction State and 4 arrays for the different types of Consequences:
 * Choice, Numeric, Boolean and Component. It represents the Configuration State at the beginning
 * of a Configuration Dialogue. During a Configuration Dialogue the "Consequences" are an
 * important part of the Configuration State.
 */
declare interface Consequences {
    /**
     * In this case, the meta attribute "IsConfigurationSatisfied" represents the "Configuration Model-Satisfaction State".
     * It indicates for the whole Configuration Model if Decisions are still required to be made.
     * If it is TRUE then the configuration can be concluded.
     */
    isConfigurationSatisfied: boolean;
    /** TODO: Documentation */
    canAttributeContributeToConfigurationSatisfaction: GlobalAttributeId_2[];
    /**
     * The Choice Consequences are the result of an evaluation weather of a Configuration Model or of made
     * Decisions in conjunction with a Configuration Model.
     * For each Choice Attribute, represented by a Global Attribute ID, the following is specified:
     * (1) By a boolean is specified whether a Decision is still necessary (isSatisfied = false) or not
     *     (isSatisfied = true).
     * (2) In the object "Cardinality" is specified the assignment type of the Attribute Values that is
     *     determined during modeling (mandatory, optional, multiple).
     * (3) Furthermore, the currently still possible Decision States are indicated for every Value.
     *     These are represented in the form of a list of objects of type "ChoiceValueConsequence".
     */
    choiceConsequences: ChoiceConsequence[];
    /**
     * The Numeric Consequences are the result of an evaluation weather of a Configuration Model or of made
     * Decisions in conjunction with a Configuration Model.
     * For each Numeric Attribute, represented by a Global Attribute ID, the following is specified:
     * (1) By a boolean is specified whether a Decision is still necessary (isSatisfied = false) or not
     *     (isSatisfied = true).
     * (2) The meta attribute "selection" indicates if a Value assignment is mandatory or not.
     * (3) The meta attribute "range" specifies a range of numbers by specifying a maximum (max) and a minimum value (min).
     * (4) The number of decimal places is specified by an integer value of the meta-attribute "decimalPlaces".
     */
    numericConsequences: NumericConsequence[];
    /**
     * The Boolean Consequences are the result of an evaluation weather of a Configuration Model or of made
     * Decisions in conjunction with a Configuration Model.
     * For each Boolean Attribute, represented by a Global Attribute ID, the following is specified:
     * (1) By a boolean is specified whether a Decision is still necessary (isSatisfied = false) or not
     *     (isSatisfied = true).
     * (2) The meta attribute "selection" indicates if a Value assignment (the choice "true" or "false") is mandatory or not.
     * (3) Furthermore, the currently still possible boolean states are indicated.
     */
    booleanConsequences: BooleanConsequence[];
    /**
     * The Component Consequences are the result of an evaluation weather of a Configuration Model or of made
     * Decisions in conjunction with a Configuration Model.
     * For each Component Attribute, represented by a Global Attribute ID, the following is specified:
     * (1) By a boolean is specified whether a Decision is still necessary (isSatisfied = false) or not
     *     (isSatisfied = true).
     * (2) The meta attribute "inclusion" specifies whether a referenced Component Configuration Model is always
     *     considered in finding a Solution (inclusion = "Always") or only under certain conditions (inclusion = "Optional").
     * (3) The meta attribute "selection" indicates if the referencing of a Component Configuration Model is mandatory or not.
     * (4) Furthermore, the currently still possible decision states are indicated.
     *     These are represented in the form of a list of objects of type "ChoiceValueConsequence".
     *     Examples can be found in the product documentation.
     */
    componentConsequences: ComponentConsequence[];
}

declare interface Constraint {
    constraintId: string;
    textualConstraint: string;
}

declare type ConstraintDescription = (UtilRequiredKeys<RuleConstraint, "type"> | UtilRequiredKeys<CardinalityConstraint, "type">) & {
    type: string;
};

export declare type ConstraintExplanation = {
    causedByCardinalities: ReadonlyArray<GlobalAttributeId>;
    causedByRules: ReadonlyArray<GlobalConstraintId>;
};

declare interface ConstraintExplanation_2 {
    causedByCardinalities: CardinalityConstraint[];
    causedByRules: RuleConstraint[];
}

export declare type ConstraintsExplainAnswer = {
    constraintExplanations: ReadonlyArray<ConstraintExplanation>;
};

declare type ConstraintUsageRule = UsageRule & {
    constraintId?: string;
};

declare enum ContentType {
    Json = "application/json",
    FormData = "multipart/form-data",
    UrlEncoded = "application/x-www-form-urlencoded",
    Text = "text/plain"
}

/** This object contains the data required to create a new Configuration Session. */
declare interface CreateSessionRequest {
    /**
     * There are two ways to make a Configuration Model, which generally consists of several
     * Sub Configuration Models, part of a Configuration Session.
     * (1) A specific deployed model version can be obtained from a specific Channel.
     *     This is the variant for the majority of cases.
     * (2) The nested structure of the sub models can be specified as a "Package" directly in the request body.
     */
    configurationModelSource: ConfigurationModelSource_2;
    /**
     * This object can be used to specify, which Decisions are to be respected for which Attribute.
     * Note: When using this object, all existing Attributes must be listed.
     * Examples can be found in the product documentation.
     */
    attributeRelations?: DecisionsToRespect_2[] | null;
    /**
     * Contextual information that will be processed in evaluating the Usage Rules.
     * Examples can be found in the product documentation.
     * @example {"principal.country":"de","applicationId":"webshop"}
     */
    usageRuleParameters?: Record<string, string>;
    allowedInExplain?: AllowedInExplain_2 | null;
}

declare type CreateSessionResponse = object;

/** Contains the sessionId and other related data for the successfully created session. */
declare type CreateSessionSuccessResponse = CreateSessionResponse & {
    /** Identifies a Session. */
    sessionId?: string;
    /** Describes the automatic expiration of a session. */
    timeout?: SessionTimeout;
};

export declare type Decision<TState extends boolean | number | ComponentDecisionState | ChoiceValueDecisionState> = {
    readonly state: TState;
    readonly kind: DecisionKind;
};

declare const Decision_: M<    {}, Readonly<{
type: string;
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: number;
}> | Readonly<{
type: string;
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: boolean;
}> | Readonly<{
type: string;
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: string;
}>, Readonly<{
type: "Numeric";
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: number;
}> | Readonly<{
type: "Boolean";
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: boolean;
}> | Readonly<{
type: "Choice";
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
choiceValueId: string;
state: "Included" | "Excluded";
}> | Readonly<{
type: "Component";
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: "Included" | "Excluded";
}>>;

declare type Decision_2 = AType<typeof Decision_>;

export declare type DecisionExplanation = {
    causedByDecisions: ReadonlyArray<CausedByDecision>;
    solution: ExplainSolution;
};

/**
 * In an Explanation are specified the Explicit Decisions (Choice, Numeric, Boolean and Component)
 * which lead to the current Value-Decision State respectively Model-Decision State (Excluded, Included).
 */
declare interface DecisionExplanation_2 {
    causedByChoiceDecisions: CausedByChoiceValueDecision_2[];
    causedByNumericDecisions: CausedByNumericDecision_2[];
    causedByBooleanDecisions: CausedByBooleanDecision_2[];
    causedByComponentDecisions: CausedByComponentDecision_2[];
}

export declare enum DecisionKind {
    Implicit = "Implicit",
    Explicit = "Explicit"
}

/**
 * ### Implicit
 * "Implicit" means that the inclusion or exclusion of a Value has been made
 * by the Configuration Engine when there is no other decision left.
 *
 * ### Explicit
 * "Explicit" means that the inclusion or exclusion of a Value has been made
 * by the consumer.
 */
declare enum DecisionKind_2 {
    Implicit = "Implicit",
    Explicit = "Explicit"
}

/**
 * A Decision is a decision about an Attribute. For each Value, it is stated explicitly or implicitly
 * whether it should be included in the search for a Solution by the Configuration Engine.
 * The object "Decisions" covers lists of Decisions of the 4 various possible kinds.
 * See also the corresponding schemas.
 */
declare interface Decisions {
    /** The object "BooleanDecisions" encapsulates  a list of Boolean Decisions. */
    booleanDecisions: BooleanDecision[];
    /** The object "NumericDecisions" encapsulates  a list of Numeric Decisions. */
    numericDecisions: NumericDecision[];
    /** The object "ComponentDecisions" encapsulates  a list of Component Decisions. */
    componentDecisions: ComponentDecision[];
    /** The object "ChoiceDecisions" encapsulates  a list of Choice Decisions. */
    choiceValueDecisions: ChoiceValueDecision[];
}

export declare type DecisionsExplainAnswer = {
    decisionExplanations: ReadonlyArray<DecisionExplanation>;
};

/**
 * The "Decision State" refers to a Value of a Choice Attribute or a referenced
 * Component Configuration Model. It is transmitted to the Configuration Engine with a request.
 * ### Included
 * "Included" means that a considered Value of a Choice Attribute or a referenced Component Configuration Model
 * are taken into account when the Configuration Engine searches for a Solution.
 * - In case of a Choice Attribute this is analogous to selecting a Value.
 *
 * ### Excluded
 * "Excluded" means that a considered Value of a Choice Attribute or a referenced Component Configuration Model
 * are not taken into account when the Configuration Engine searches for a Solution.
 * - In case of a Choice Attribute an excluded Value can not become the subject of an Implicit Decision.
 *
 * ### Undefined
 * "Undefined" states that it is not yet decided if a considered Choice Value or a referenced
 * Component Configuration Model are taken into account or not.
 * - In case of a Choice Attribute this is analogous to not having selected a Value.
 * - An undefined Choice Value can still become the subject of an Implicit Decision.
 * - A referenced Component Configuration Model that has the Decision State "undefined"
 *   can also become the subject of an Implicit Decision.
 */
declare enum DecisionState {
    Included = "Included",
    Excluded = "Excluded",
    Undefined = "Undefined"
}

export declare type DecisionsToRespect = {
    readonly attributeId: GlobalAttributeId;
    readonly decisions: ReadonlyArray<GlobalAttributeId>;
};

declare interface DecisionsToRespect_2 {
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
    decisions: GlobalAttributeId_2[];
}

export declare type DecisionsToRespectInvalid = Omit<Engine.DecisionsToRespectInvalid, "type" | "globalAttributeId"> & {
    readonly type: ConfiguratorErrorType.DecisionsToRespectInvalid;
    readonly globalAttributeId: GlobalAttributeId;
};

declare interface DecisionsToRespectInvalid_2 {
    type: "DecisionsToRespectInvalid";
    title: string;
    detail: string;
    validationMessage: string;
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    globalAttributeId: GlobalAttributeId_2;
}

/** Alias for KeepExistingDecisionsMode. */
declare interface DefaultMode {
    type: "Default";
}

export declare type DropExistingDecisionsMode = {
    type: "DropExistingDecisions";
    conflictHandling: ConflictResolution;
};

declare interface DropExistingDecisionsMode_2 {
    type: "DropExistingDecisions";
    conflictResolution: ConflictResolution_2;
}

declare namespace Engine {
    export {
        Unspecified,
        ProblemDetails,
        HttpStatusCode,
        RequestTimeout_2 as RequestTimeout,
        RequestFailure_2 as RequestFailure,
        SerializationError_2 as SerializationError,
        InternalServerError,
        MissingTenantIdClaim_2 as MissingTenantIdClaim,
        MissingSessionIdClaim_2 as MissingSessionIdClaim,
        TenantAccessForbidden_2 as TenantAccessForbidden,
        SessionIdInvalid_2 as SessionIdInvalid,
        AuthenticationFailure_2 as AuthenticationFailure,
        SideLoadingForbidden_2 as SideLoadingForbidden,
        SpecifiedDeploymentForbidden_2 as SpecifiedDeploymentForbidden,
        AttributeNotFound_2 as AttributeNotFound,
        GlobalAttributeId_2 as GlobalAttributeId,
        ChoiceAttributeNotFound_2 as ChoiceAttributeNotFound,
        ChoiceValueNotFound_2 as ChoiceValueNotFound,
        GlobalChoiceValueId,
        NumericAttributeNotFound_2 as NumericAttributeNotFound,
        BooleanAttributeNotFound_2 as BooleanAttributeNotFound,
        ComponentAttributeNotFound_2 as ComponentAttributeNotFound,
        NumericDecisionOutOfRange_2 as NumericDecisionOutOfRange,
        ConflictWithConsequence_2 as ConflictWithConsequence,
        UsageRuleRestriction_2 as UsageRuleRestriction,
        ConfigurationModelInvalid_2 as ConfigurationModelInvalid,
        DecisionsToRespectInvalid_2 as DecisionsToRespectInvalid,
        SolutionNotFeasible_2 as SolutionNotFeasible,
        SessionNotFound_2 as SessionNotFound,
        GlobalSessionId,
        PutManyDecisionsConflict,
        ConstraintExplanation_2 as ConstraintExplanation,
        CardinalityConstraint,
        RuleConstraint,
        GlobalConstraintId_2 as GlobalConstraintId,
        ConstraintDescription,
        DecisionExplanation_2 as DecisionExplanation,
        CausedByChoiceValueDecision_2 as CausedByChoiceValueDecision,
        Reason,
        PossibleDecisionState,
        CausedByNumericDecision_2 as CausedByNumericDecision,
        CausedByBooleanDecision_2 as CausedByBooleanDecision,
        CausedByComponentDecision_2 as CausedByComponentDecision,
        CausedByDecision_2 as CausedByDecision,
        ConfigurationModelNotFound_2 as ConfigurationModelNotFound,
        SolverInitializationFailure_2 as SolverInitializationFailure,
        ConfigurationModelLoadFailure_2 as ConfigurationModelLoadFailure,
        ConfigurationModelNotFeasible_2 as ConfigurationModelNotFeasible,
        ConfigurationInitializationFailure_2 as ConfigurationInitializationFailure,
        SolverPoolInitializationFailure_2 as SolverPoolInitializationFailure,
        SetDecisionConflict_2 as SetDecisionConflict,
        SolveOperationTimeout_2 as SolveOperationTimeout,
        ExplainConflict_2 as ExplainConflict,
        ExplainFailure_2 as ExplainFailure,
        SnapshotInvalid_2 as SnapshotInvalid,
        SnapshotNotFound_2 as SnapshotNotFound,
        AssignedChannelNotFound,
        GlobalChannelId,
        GlobalDeploymentId,
        Consequences,
        ChoiceConsequence,
        Cardinality_2 as Cardinality,
        ChoiceValueConsequence,
        NumericConsequence,
        Selection_3 as Selection,
        NumericValueRange,
        BooleanConsequence,
        ComponentConsequence,
        Inclusion_2 as Inclusion,
        PutDecisionResponse,
        Decisions,
        BooleanDecision,
        DecisionKind_2 as DecisionKind,
        NumericDecision,
        ComponentDecision,
        DecisionState,
        ChoiceValueDecision,
        ExplicitDecision_2 as ExplicitDecision,
        ExplicitChoiceValueDecision,
        ExplicitNumericDecision_2 as ExplicitNumericDecision,
        ExplicitBooleanDecision_2 as ExplicitBooleanDecision,
        ExplicitComponentDecision_2 as ExplicitComponentDecision,
        PutManyDecisionsResponse,
        ExplicitDecisions,
        Mode,
        DefaultMode,
        DropExistingDecisionsMode_2 as DropExistingDecisionsMode,
        ConflictResolution_2 as ConflictResolution,
        ManualConflictResolution_2 as ManualConflictResolution,
        AutomaticConflictResolution_2 as AutomaticConflictResolution,
        KeepExistingDecisionsMode_2 as KeepExistingDecisionsMode,
        ExplainResult,
        WhyNotSatisfiedRequest,
        WhyAttributeNotSatisfiedRequest,
        WhyConfigurationNotSatisfiedRequest,
        WhyStateNotPossibleRequest,
        WhyBooleanStateNotPossibleRequest,
        WhyNumericStateNotPossibleRequest,
        WhyChoiceValueStateNotPossibleRequest,
        WhyComponentStateNotPossibleRequest,
        ConfigurationModelMeta,
        CompleteMeta,
        CreateSessionSuccessResponse,
        SessionTimeout,
        CreateSessionResponse,
        CreateSessionRequest,
        ConfigurationModelSource_2 as ConfigurationModelSource,
        ConfigurationModelFromChannel_2 as ConfigurationModelFromChannel,
        ConfigurationModelFromPackage_2 as ConfigurationModelFromPackage,
        ConfigurationModelPackage,
        ConfigurationModel,
        Attributes,
        ChoiceAttribute_2 as ChoiceAttribute,
        ChoiceValue_2 as ChoiceValue,
        NumericAttribute_2 as NumericAttribute,
        BooleanAttribute_2 as BooleanAttribute,
        ComponentAttribute_2 as ComponentAttribute,
        ComponentInclusionType,
        OptionallyIncluded,
        AlwaysIncluded,
        Constraint,
        UsageRules,
        ModelUsageRule,
        UsageRule,
        ExpressionGroup,
        OperatorExpression,
        UsageRuleOperator,
        UsageRuleValueType,
        RegularExpression,
        AttributeUsageRule,
        ChoiceValueUsageRule,
        ConstraintUsageRule,
        DecisionsToRespect_2 as DecisionsToRespect,
        AllowedInExplain_2 as AllowedInExplain,
        AllowedRules,
        AllowedRulesNone,
        AllowedRulesSpecific,
        AllowedRulesAll,
        CloseSessionRequest,
        QueryParamsType,
        ResponseFormat,
        FullRequestParams,
        RequestParams,
        ApiConfig,
        HttpResponse,
        ContentType,
        HttpClient,
        Api
    }
}

export declare type ExplainAnswer = DecisionsExplainAnswer | ConstraintsExplainAnswer | FullExplainAnswer;

export declare type ExplainConflict = ReplaceType<Engine.ExplainConflict, ConfiguratorErrorType.ExplainConflict>;

declare interface ExplainConflict_2 {
    type: "ExplainConflict";
    title: string;
    detail: string;
    source: string;
}

export declare type ExplainFailure = ReplaceType<Engine.ExplainFailure, ConfiguratorErrorType.ExplainFailure>;

declare interface ExplainFailure_2 {
    type: "ExplainFailure";
    title: string;
    detail: string;
    source: string;
}

export declare type ExplainQuestion = WhyIsNotSatisfied | WhyIsStateNotPossible;

export declare type ExplainQuestionBuilder = {
    whyIsNotSatisfied: {
        configuration: WhyIsConfigurationNotSatisfied;
        attribute: AttributeIdStage<WhyIsAttributeNotSatisfied>;
    };
    whyIsStateNotPossible: {
        choice: AttributeIdStage<ChoiceValueIdStage<StateStage<ChoiceValueDecisionState, WhyIsChoiceValueStateNotPossible>>>;
        numeric: AttributeIdStage<StateStage<number, WhyIsNumericStateNotPossible>>;
        boolean: AttributeIdStage<StateStage<boolean, WhyIsBooleanStateNotPossible>>;
        component: AttributeIdStage<StateStage<ComponentDecisionState, WhyIsComponentStateNotPossible>>;
    };
};

export declare const explainQuestionBuilder: ExplainQuestionBuilder;

declare namespace ExplainQuestionBuilderModule {
    export {
        AttributeIdStage,
        ChoiceValueIdStage,
        StateStage,
        ExplainQuestionBuilder,
        explainQuestionBuilder
    }
}
export { ExplainQuestionBuilderModule }

export declare type ExplainQuestionParam = ExplainQuestion | ((b: ExplainQuestionBuilder) => ExplainQuestion);

export declare enum ExplainQuestionSubject {
    choiceValue = "choice-value",
    component = "component",
    boolean = "boolean",
    numeric = "numeric",
    configuration = "configuration",
    attribute = "attribute"
}

export declare enum ExplainQuestionType {
    whyIsNotSatisfied = "why-is-not-satisfied",
    whyIsStateNotPossible = "why-is-state-not-possible"
}

declare interface ExplainResult {
    constraintExplanations: ConstraintExplanation_2[];
    decisionExplanations: DecisionExplanation_2[];
}

export declare type ExplainSolution = {
    readonly decisions: ReadonlyArray<ExplicitDecision>;
    readonly mode: MakeManyDecisionsMode;
};

export declare type ExplicitBooleanDecision = BaseExplicitDecision & {
    readonly type: AttributeType.Boolean;
    readonly state: boolean | null | undefined;
};

/** The object "ExplicitBooleanDecision" encapsulates a Boolean Value with the associated current Decision State. */
declare interface ExplicitBooleanDecision_2 {
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
    type: "Boolean";
    state?: boolean | null;
}

export declare type ExplicitChoiceDecision = BaseExplicitDecision & {
    readonly type: AttributeType.Choice;
    readonly choiceValueId: ChoiceValueId;
    readonly state: ChoiceValueDecisionState | null | undefined;
};

/** The object "ExplicitChoiceDecision" encapsulates  a list of Choice Values with the associated current Decision State. */
declare interface ExplicitChoiceValueDecision {
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
    type: "Choice";
    choiceValueId: string;
    /**
     * The "Decision State" refers to a Value of a Choice Attribute or a referenced
     * Component Configuration Model. It is transmitted to the Configuration Engine with a request.
     * ### Included
     * "Included" means that a considered Value of a Choice Attribute or a referenced Component Configuration Model
     * are taken into account when the Configuration Engine searches for a Solution.
     * - In case of a Choice Attribute this is analogous to selecting a Value.
     *
     * ### Excluded
     * "Excluded" means that a considered Value of a Choice Attribute or a referenced Component Configuration Model
     * are not taken into account when the Configuration Engine searches for a Solution.
     * - In case of a Choice Attribute an excluded Value can not become the subject of an Implicit Decision.
     *
     * ### Undefined
     * "Undefined" states that it is not yet decided if a considered Choice Value or a referenced
     * Component Configuration Model are taken into account or not.
     * - In case of a Choice Attribute this is analogous to not having selected a Value.
     * - An undefined Choice Value can still become the subject of an Implicit Decision.
     * - A referenced Component Configuration Model that has the Decision State "undefined"
     *   can also become the subject of an Implicit Decision.
     */
    state: DecisionState;
}

export declare type ExplicitComponentDecision = BaseExplicitDecision & {
    readonly type: AttributeType.Component;
    readonly state: ComponentDecisionState | null | undefined;
};

/**
 * The object "ExplicitComponentDecision" specifies weather a referenced Component Configuration Model is taken into account
 * if the Configuration Engine searches a Solution.
 */
declare interface ExplicitComponentDecision_2 {
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
    type: "Component";
    /**
     * The "Decision State" refers to a Value of a Choice Attribute or a referenced
     * Component Configuration Model. It is transmitted to the Configuration Engine with a request.
     * ### Included
     * "Included" means that a considered Value of a Choice Attribute or a referenced Component Configuration Model
     * are taken into account when the Configuration Engine searches for a Solution.
     * - In case of a Choice Attribute this is analogous to selecting a Value.
     *
     * ### Excluded
     * "Excluded" means that a considered Value of a Choice Attribute or a referenced Component Configuration Model
     * are not taken into account when the Configuration Engine searches for a Solution.
     * - In case of a Choice Attribute an excluded Value can not become the subject of an Implicit Decision.
     *
     * ### Undefined
     * "Undefined" states that it is not yet decided if a considered Choice Value or a referenced
     * Component Configuration Model are taken into account or not.
     * - In case of a Choice Attribute this is analogous to not having selected a Value.
     * - An undefined Choice Value can still become the subject of an Implicit Decision.
     * - A referenced Component Configuration Model that has the Decision State "undefined"
     *   can also become the subject of an Implicit Decision.
     */
    state: DecisionState;
}

export declare type ExplicitDecision = BaseExplicitDecision & (ExplicitChoiceDecision | ExplicitNumericDecision | ExplicitBooleanDecision | ExplicitComponentDecision);

declare type ExplicitDecision_2 = (UtilRequiredKeys<ExplicitChoiceValueDecision, "attributeId" | "type"> | UtilRequiredKeys<ExplicitNumericDecision_2, "attributeId" | "type"> | UtilRequiredKeys<ExplicitBooleanDecision_2, "attributeId" | "type"> | UtilRequiredKeys<ExplicitComponentDecision_2, "attributeId" | "type">) & {
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
    type: string;
};

/**
 * An Explicit Decision is a Decision which is made by an API consumer, for instance a Configurator.
 * In contrast, an Implicit Decision is made by the Configuration Engine.
 * The object "ExplicitDecisions" encapsulates the Explicit Decisions for every Value of every
 * Attribute of the 4 different types.
 */
declare interface ExplicitDecisions {
    mode?: Mode | null;
    /** The object "ChoiceDecisions" encapsulates  a list of Explicit Choice Decisions. */
    choiceDecisions?: ExplicitChoiceValueDecision[] | null;
    /** The object "NumericDecisions" encapsulates  a list of Explicit Numeric Decisions. */
    numericDecisions?: ExplicitNumericDecision_2[] | null;
    /** The object "BooleanDecisions" encapsulates  a list of Explicit Boolean Decisions. */
    booleanDecisions?: ExplicitBooleanDecision_2[] | null;
    /** The object "ComponentDecisions" encapsulates  a list of Explicit Component Decisions. */
    componentDecisions?: ExplicitComponentDecision_2[] | null;
}

export declare type ExplicitNumericDecision = BaseExplicitDecision & {
    readonly type: AttributeType.Numeric;
    readonly state: number | null | undefined;
};

/** The object "ExplicitNumericDecision" encapsulates a Numeric Value with the associated current Decision State. */
declare interface ExplicitNumericDecision_2 {
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
    type: "Numeric";
    /** @format decimal */
    state?: number | null;
}

declare interface ExpressionGroup {
    groupId: string;
    operatorExpressions?: OperatorExpression[] | null;
    regularExpressions?: RegularExpression[] | null;
}

export declare type FullExplainAnswer = DecisionsExplainAnswer & ConstraintsExplainAnswer;

declare interface FullRequestParams extends Omit<RequestInit, "body"> {
    /** set parameter to `true` for call `securityWorker` for this request */
    secure?: boolean;
    /** request path */
    path: string;
    /** content type of request body */
    type?: ContentType;
    /** query params */
    query?: QueryParamsType;
    /** format of response (i.e. response.json() -> format: "json") */
    format?: ResponseFormat;
    /** request body */
    body?: unknown;
    /** base url */
    baseUrl?: string;
    /** request cancellation token */
    cancelToken?: CancelToken;
}

declare function getAllowedChoiceValues(attribute: ChoiceAttribute): ReadonlyArray<ChoiceValue>;

declare function getAttribute(configuration: Configuration, attributeIdOrKey: GlobalAttributeId | GlobalAttributeIdKey): Attribute | undefined;

declare function getAttribute<A extends Attribute>(configuration: Configuration, attributeIdOrKey: GlobalAttributeId | GlobalAttributeIdKey, refinement: Refinement<Attribute, A>): A | undefined;

declare function getAttributesOfComponentAttribute(attributes: Configuration["attributes"], componentAttributeId: GlobalAttributeId, includeSubcomponents: boolean): ReadonlyArray<Attribute>;

declare function getAttributesOfRootConfigurationModel(attributes: Configuration["attributes"]): ReadonlyArray<Attribute>;

declare function getAttributesOfSharedConfigurationModel(attributes: Configuration["attributes"], sharedConfigurationModelId: ConfigurationModelId, includeSubcomponents: boolean): ReadonlyArray<Attribute>;

declare function getBlockedChoiceValues(attribute: ChoiceAttribute): ReadonlyArray<ChoiceValue>;

declare function getBooleanAttribute(configuration: Configuration, attributeIdOrKey: GlobalAttributeId | GlobalAttributeIdKey): BooleanAttribute | undefined;

declare function getBooleanAttributes(configuration: Configuration): ReadonlyArray<BooleanAttribute>;

declare function getChoiceAttribute(configuration: Configuration, attributeIdOrKey: GlobalAttributeId | GlobalAttributeIdKey): ChoiceAttribute | undefined;

declare function getChoiceAttributes(configuration: Configuration): ReadonlyArray<ChoiceAttribute>;

declare function getChoiceValue(configuration: Configuration, attributeIdOrKey: GlobalAttributeId | GlobalAttributeIdKey, choiceValueId: ChoiceValueId): ChoiceValue | undefined;

declare function getComponentAttribute(configuration: Configuration, attributeIdOrKey: GlobalAttributeId | GlobalAttributeIdKey): ComponentAttribute | undefined;

declare function getComponentAttributes(configuration: Configuration): ReadonlyArray<ComponentAttribute>;

declare function getIncludedChoiceValues(attribute: ChoiceAttribute): ReadonlyArray<ChoiceValue>;

declare function getNumericAttribute(configuration: Configuration, attributeIdOrKey: GlobalAttributeId | GlobalAttributeIdKey): NumericAttribute | undefined;

declare function getNumericAttributes(configuration: Configuration): ReadonlyArray<NumericAttribute>;

export declare type GlobalAttributeId = {
    readonly localId: LocalAttributeId;
    readonly sharedConfigurationModelId?: ConfigurationModelId;
    readonly componentPath?: ReadonlyArray<LocalAttributeId>;
};

declare const GlobalAttributeId_: M<    {}, Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>, Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>>;

/**
 * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
 * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
 * the identifier components is used.
 * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
 * because it is the path to an Attribute.
 * shared component path localId
 * Details can be found in the API product documentation.
 */
declare interface GlobalAttributeId_2 {
    /**
     * The LocalId is the last part of the Attribute Path if there exists a set of referenced Configuration Models .
     * It identifies a local Attribute within a specific Configuration Model.
     * Example: In a Configuration Model "Automobile" could be declared an Attribute with the LocalId "Color".
     * Further examples can be found in the API product documentation.
     */
    localId: string;
    /**
     * The SharedConfigurationModelId is the first part of the Attribute Path (identifier of an Attribute) if it
     * is declared in a Shared Configuration Model which is included in the
     * Configuration Model under consideration.
     * Example path while modeling: "shared::TechnicalShared::AutomobileType". "shared" is a key word of the
     * modelling language, "TechnicalShared" is the name (identifier) of a Shared Configuration Model,
     * "AutomobileType" is the name (identifier) of an Attribute, which is declared in "TechnicalShared".
     * For example, the Attribute "AutomobileType" is used in a Configuration Model called "Automobile".
     * Further examples can be found in the API product documentation.
     */
    sharedConfigurationModelId?: string | null;
    /**
     * The ComponentPath is part of the Attribute Path (identifier of an Attribute) if it
     * is declared in a Component Configuration Model that is referenced in a Configuration Model under consideration.
     * Example path while modeling: "Engine::EngineType". "EngineType" is the name (identifier) of a
     * Component Configuration Model, "EngineType" is the name (identifier) of an Attribute, which
     * is declared in "Engine".
     * For example, the Attribute "EngineType" is used in a Configuration Model called "Automobile".
     * Further examples can be found in the API product documentation.
     */
    componentPath?: string[] | null;
}

declare type GlobalAttributeId_3 = AType<typeof GlobalAttributeId_>;

export declare const globalAttributeIdEq: Eq.Eq<{
    readonly localId: LocalAttributeId;
    readonly sharedConfigurationModelId?: ConfigurationModelId | undefined;
    readonly componentPath?: ReadonlyArray<LocalAttributeId> | undefined;
}>;

export declare type GlobalAttributeIdKey = string;

export declare function GlobalAttributeIdKeyBuilder(attributeId: GlobalAttributeId): GlobalAttributeIdKey;

export declare const globalAttributeIdKeyEq: EqT<GlobalAttributeIdKey>;

declare interface GlobalChannelId {
    deploymentId: GlobalDeploymentId;
    channel: string;
}

declare interface GlobalChoiceValueId {
    choiceValueId: string;
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
}

export declare type GlobalConstraintId = {
    localId: LocalRuleId;
    configurationModelId: ConfigurationModelId;
};

declare interface GlobalConstraintId_2 {
    localId: string;
    configurationModelId: string;
}

export declare const globalConstraintIdEq: Eq.Eq<{
    readonly localId: LocalRuleId;
    readonly configurationModelId: ConfigurationModelId;
}>;

declare interface GlobalDeploymentId {
    localId: string;
    tenantId: string;
}

declare interface GlobalSessionId {
    sessionId: string;
    tenantId: string;
}

declare class HttpClient<SecurityDataType = unknown> {
    baseUrl: string;
    private securityData;
    private securityWorker?;
    private abortControllers;
    private customFetch;
    private baseApiParams;
    constructor(apiConfig?: ApiConfig<SecurityDataType>);
    setSecurityData: (data: SecurityDataType | null) => void;
    protected encodeQueryParam(key: string, value: any): string;
    protected addQueryParam(query: QueryParamsType, key: string): string;
    protected addArrayQueryParam(query: QueryParamsType, key: string): any;
    protected toQueryString(rawQuery?: QueryParamsType): string;
    protected addQueryParams(rawQuery?: QueryParamsType): string;
    private contentFormatters;
    protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams;
    protected createAbortSignal: (cancelToken: CancelToken) => AbortSignal | undefined;
    abortRequest: (cancelToken: CancelToken) => void;
    request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<HttpResponse<T, E>>;
}

declare interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
    data: D;
    error: E;
}

declare enum HttpStatusCode {
    Continue = "Continue",
    SwitchingProtocols = "SwitchingProtocols",
    Processing = "Processing",
    EarlyHints = "EarlyHints",
    OK = "OK",
    Created = "Created",
    Accepted = "Accepted",
    NonAuthoritativeInformation = "NonAuthoritativeInformation",
    NoContent = "NoContent",
    ResetContent = "ResetContent",
    PartialContent = "PartialContent",
    MultiStatus = "MultiStatus",
    AlreadyReported = "AlreadyReported",
    IMUsed = "IMUsed",
    MultipleChoices = "MultipleChoices",
    Ambiguous = "Ambiguous",
    MovedPermanently = "MovedPermanently",
    Moved = "Moved",
    Found = "Found",
    Redirect = "Redirect",
    SeeOther = "SeeOther",
    RedirectMethod = "RedirectMethod",
    NotModified = "NotModified",
    UseProxy = "UseProxy",
    Unused = "Unused",
    TemporaryRedirect = "TemporaryRedirect",
    RedirectKeepVerb = "RedirectKeepVerb",
    PermanentRedirect = "PermanentRedirect",
    BadRequest = "BadRequest",
    Unauthorized = "Unauthorized",
    PaymentRequired = "PaymentRequired",
    Forbidden = "Forbidden",
    NotFound = "NotFound",
    MethodNotAllowed = "MethodNotAllowed",
    NotAcceptable = "NotAcceptable",
    ProxyAuthenticationRequired = "ProxyAuthenticationRequired",
    RequestTimeout = "RequestTimeout",
    Conflict = "Conflict",
    Gone = "Gone",
    LengthRequired = "LengthRequired",
    PreconditionFailed = "PreconditionFailed",
    RequestEntityTooLarge = "RequestEntityTooLarge",
    RequestUriTooLong = "RequestUriTooLong",
    UnsupportedMediaType = "UnsupportedMediaType",
    RequestedRangeNotSatisfiable = "RequestedRangeNotSatisfiable",
    ExpectationFailed = "ExpectationFailed",
    MisdirectedRequest = "MisdirectedRequest",
    UnprocessableEntity = "UnprocessableEntity",
    UnprocessableContent = "UnprocessableContent",
    Locked = "Locked",
    FailedDependency = "FailedDependency",
    UpgradeRequired = "UpgradeRequired",
    PreconditionRequired = "PreconditionRequired",
    TooManyRequests = "TooManyRequests",
    RequestHeaderFieldsTooLarge = "RequestHeaderFieldsTooLarge",
    UnavailableForLegalReasons = "UnavailableForLegalReasons",
    InternalServerError = "InternalServerError",
    NotImplemented = "NotImplemented",
    BadGateway = "BadGateway",
    ServiceUnavailable = "ServiceUnavailable",
    GatewayTimeout = "GatewayTimeout",
    HttpVersionNotSupported = "HttpVersionNotSupported",
    VariantAlsoNegotiates = "VariantAlsoNegotiates",
    InsufficientStorage = "InsufficientStorage",
    LoopDetected = "LoopDetected",
    NotExtended = "NotExtended",
    NetworkAuthenticationRequired = "NetworkAuthenticationRequired"
}

export declare interface IConfigurationSession {
    /**
     * Adds a listener that reacts to changes in the Configuration during specific operations.
     * Once registered, the handler is immediately invoked with the current Configuration state.
     * @param handler The handler to be invoked when configuration changes occur.
     * @return A subscription that allows unsubscribing the handler from future changes.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    addConfigurationChangedListener(handler: OnConfigurationChangedHandler): Subscription;
    /**
     * Adds a listener that reacts to changes of {@link canResetConfiguration}.
     * Once registered, the handler is immediately invoked with the current state.
     * @param handler The handler to be invoked when canResetConfiguration changed.
     * @return A subscription that allows unsubscribing the handler from future changes.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    addCanResetConfigurationChangedListener(handler: OnCanResetConfigurationChangedHandler): Subscription;
    /**
     * Adds a listener that reacts to changes of {@link storeConfiguration}.
     * Once registered, the handler is immediately invoked with the current state.
     * @param handler The handler to be invoked when storeConfiguration changed.
     * @return A subscription that allows unsubscribing the handler from future changes.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    addStoredConfigurationChangedListener(handler: OnStoredConfigurationChangedHandler): Subscription;
    /**
     * Adds a listener that reacts to changes of {@link getDecisions}.
     * Once registered, the handler is immediately invoked with the current state.
     * @param kind The kind of decisions that should be listened to.
     * @param handler The handler to be invoked when getDecisions changed.
     * @return A subscription that allows unsubscribing the handler from future changes.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    addDecisionsChangedListener(kind: DecisionKind.Explicit, handler: OnDecisionsChangedHandler<CollectedExplicitDecision>): Subscription;
    /**
     * Adds a listener that reacts to changes of {@link getDecisions}.
     * Once registered, the handler is immediately invoked with the current state.
     * @param kind The kind of decisions that should be listened to.
     * @param handler The handler to be invoked when getDecisions changed.
     * @return A subscription that allows unsubscribing the handler from future changes.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    addDecisionsChangedListener(kind: DecisionKind.Implicit, handler: OnDecisionsChangedHandler<CollectedImplicitDecision>): Subscription;
    /**
     * Adds a listener that reacts to changes of {@link getDecisions}.
     * Once registered, the handler is immediately invoked with the current state.
     * @param handler The handler to be invoked when getDecisions changed.
     * @return A subscription that allows unsubscribing the handler from future changes.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    addDecisionsChangedListener(handler: OnDecisionsChangedHandler<CollectedDecision>): Subscription;
    /**
     * Retrieves the current SessionContext associated with this session.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    getSessionContext(): SessionContext;
    /**
     * Retrieves the current SessionContext associated with this session.
     * @param queue Whether to queue this operation instead of executing it immediately.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    getSessionContext(queue: true): Promise<SessionContext>;
    /**
     * Retrieves the full state of the Configuration.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    getConfiguration(): Configuration;
    /**
     * Retrieves the full state of the Configuration.
     * @param queue Whether to queue this operation instead of executing it immediately.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    getConfiguration(queue: true): Promise<Configuration>;
    /**
     * Retrieves the changes made to the Configuration since the last time they were cleared.
     * @remarks Changes are aggregated until they are cleared using {@link clearConfigurationChanges}.
     * @remarks This method can be called multiple times without recalculating the changes each time.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    getConfigurationChanges(): ConfigurationChanges;
    /**
     * Clears all tracked Configuration changes.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    clearConfigurationChanges(): void;
    /**
     * Determines if the Configuration can be reset, which is possible if decisions have been made.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    canResetConfiguration(): boolean;
    /**
     * Determines if the Configuration can be reset, which is possible if decisions have been made.
     * @param queue Whether to queue this operation instead of executing it immediately.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    canResetConfiguration(queue: true): Promise<boolean>;
    /**
     * Resets the Configuration to its initial state.
     * @remarks This method can be called multiple times without issue.
     * @throws {TaskCancelled} If the session is closed while the operation is pending or in progress.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    resetConfiguration(): Promise<void>;
    /**
     * Stores the current non-optimistic Configuration state.
     * @remarks The method waits for any pending or ongoing operations to complete before storing the state.
     * @throws {TaskCancelled} If the session is closed while the operation is pending or in progress.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    storeConfiguration(): Promise<StoredConfiguration>;
    /**
     * Overwrites the current Configuration state with a previously stored Configuration.
     * @remarks Ensure that the session was initialized with the same SessionContext as when the configuration was stored,
     * otherwise not all decisions may be restored.
     * @param storedConfiguration The configuration to be restored.
     * @param mode The mode defining how existing decisions should be handled.
     * @return The decisions that were rejected during restoration.
     * @throws {TaskCancelled} If the session is closed while the operation is pending or in progress.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    restoreConfiguration(storedConfiguration: StoredConfiguration, mode: MakeManyDecisionsMode): Promise<MakeManyDecisionsResult>;
    /**
     * Retrieves all explicit non-optimistic decisions in the current Configuration.
     * @param kind The kind of decisions that should be returned.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    getDecisions(kind: DecisionKind.Explicit): ReadonlyArray<CollectedExplicitDecision>;
    /**
     * Retrieves all explicit non-optimistic decisions in the current Configuration.
     * @param kind The kind of decisions that should be returned.
     * @param queue Whether to queue this operation instead of executing it immediately.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    getDecisions(kind: DecisionKind.Explicit, queue: true): Promise<ReadonlyArray<CollectedExplicitDecision>>;
    /**
     * Retrieves all implicit non-optimistic decisions in the current Configuration.
     * @param kind The kind of decisions that should be returned.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    getDecisions(kind: DecisionKind.Implicit): ReadonlyArray<CollectedImplicitDecision>;
    /**
     * Retrieves all implicit non-optimistic decisions in the current Configuration.
     * @param kind The kind of decisions that should be returned.
     * @param queue Whether to queue this operation instead of executing it immediately.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    getDecisions(kind: DecisionKind.Implicit, queue: true): Promise<ReadonlyArray<CollectedImplicitDecision>>;
    /**
     * Retrieves all implicit and explicit, non-optimistic decisions in the current Configuration.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    getDecisions(): ReadonlyArray<CollectedDecision>;
    /**
     * Retrieves all implicit and explicit, non-optimistic decisions in the current Configuration.
     * @param queue Whether to queue this operation instead of executing it immediately.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    getDecisions(queue: true): Promise<ReadonlyArray<CollectedDecision>>;
    /**
     * Makes an explicit decision in the Configuration.
     * @param decision The explicit decision to be made.
     * @throws {TaskCancelled} If the session is closed while the operation is pending or in progress.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    makeDecision(decision: ExplicitDecision): Promise<void>;
    /**
     * Applies a solution that was generated either by explaining a circumstance or as the result of a rejected {@link makeManyDecisions}.
     * @param solution The solution to be applied.
     * @return The decisions that were rejected, depending on how the solution was generated.
     * @throws {MakeManyDecisionsConflict} Depending on how the solution was created.
     * @throws {TaskCancelled} If the session is closed while the operation is pending or in progress.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    applySolution(solution: ExplainSolution): Promise<MakeManyDecisionsResult>;
    /**
     * Sets multiple explicit decisions at once.
     * @param decisions The explicit decisions to be made.
     * @param mode The mode defining how existing decisions should be handled.
     * @return The decisions that were rejected when automatic conflict resolution was applied.
     * @throws {MakeManyDecisionsConflict} If decisions were rejected and manual conflict resolution was required.
     * @throws {TaskCancelled} If the session is closed while the operation is pending or in progress.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     * @deprecated Use {@link makeManyDecisions}
     */
    setMany(decisions: ReadonlyArray<ExplicitDecision>, mode: MakeManyDecisionsMode): Promise<MakeManyDecisionsResult>;
    /**
     * Makes multiple decisions in the Configuration.
     * @param decisions The explicit decisions to be made.
     * @param mode The mode defining how existing decisions should be handled.
     * @return The decisions that were rejected when automatic conflict resolution was applied.
     * @throws {MakeManyDecisionsConflict} If decisions were rejected and manual conflict resolution was required.
     * @throws {TaskCancelled} If the session is closed while the operation is pending or in progress.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    makeManyDecisions(decisions: ReadonlyArray<ExplicitDecision>, mode: MakeManyDecisionsMode): Promise<MakeManyDecisionsResult>;
    /**
     * Sets the SessionContext of the session and attempts to migrate all existing decisions.
     * @param sessionContext The SessionContext to apply.
     * @throws {TaskCancelled} If the session is closed while the operation is pending or in progress.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    setSessionContext(sessionContext: SessionContext): Promise<void>;
    /**
     * Reinitializes the session by creating a new session and attempts to migrate all existing decisions.
     * @throws {TaskCancelled} If the session is closed while the operation is pending or in progress.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    reinitialize(): Promise<void>;
    /**
     * Explains a specific circumstance based on the provided question.
     * @return The decisions that explain the circumstance.
     * @throws {TaskCancelled} If the session is closed while the operation is pending or in progress.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    explain(question: ExplainQuestionParam, answerType: "decisions"): Promise<DecisionsExplainAnswer>;
    /**
     * Explains a specific circumstance based on the provided question.
     * @return The constraints that explain the circumstance.
     * @throws {TaskCancelled} If the session is closed while the operation is pending or in progress.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    explain(question: ExplainQuestionParam, answerType: "constraints"): Promise<ConstraintsExplainAnswer>;
    /**
     * Explains a specific circumstance based on the provided question.
     * @return Both the decisions and constraints that explain the circumstance.
     * @throws {TaskCancelled} If the session is closed while the operation is pending or in progress.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     */
    explain(question: ExplainQuestionParam, answerType: "full"): Promise<FullExplainAnswer>;
    /**
     * Closes the session and makes it unavailable for further operations.
     * @remarks To continue, a new session must be created.
     * @remarks All pending or running operations will be rejected with {@link TaskCancelled}.
     */
    close(): Promise<void>;
    /**
     * Schedules a task to the end of the queue.
     * @param signal An optional AbortSignal which lets the promise become immediately rejected if aborted.
     * @throws {TaskCancelled} If the session is closed while the operation is pending or in progress.
     * @throws {SessionClosed} If the session has already been closed using {@link close}.
     * @throws {ConfiguratorError} If a general configuration error occurs.
     * @throws {AbortSignal.reason} If the {@link signal} is aborted.
     */
    scheduleTask(signal?: AbortSignal | null): Promise<ScheduleTaskResult>;
}

export declare enum Inclusion {
    Always = "Always",
    Optional = "Optional"
}

/**
 * The value of the meta attribute "inclusion" maps a design decision when modeling a real product world. A certain component of a
 * product or system of the real world is either mandatory or it is not required in every case.
 * Accordingly, the reference to a Component Configuration Model is set fixed (inclusion = Always) or
 * it is optional and can be set when necessary (inclusion = Optional).
 * Examples can be found in the product documentation.
 */
declare enum Inclusion_2 {
    Always = "Always",
    Optional = "Optional"
}

declare interface InternalServerError {
    type: "InternalServerError";
    title: string;
    detail: string;
    originalProblemType: string;
}

declare function isAllowed(choiceValue: ChoiceValue): boolean;

declare function isBlocked(choiceValue: ChoiceValue): boolean;

declare function isChoiceAttributeMultiSelect(attribute: ChoiceAttribute): boolean;

export declare interface ISessionFactory {
    /**
     * Creates a new Configuration session using the specified SessionContext.
     * @param sessionContext The initial SessionContext used to configure the session.
     * @return A promise that resolves to an instance of IConfigurationSession.
     */
    createSession(sessionContext: SessionContext): Promise<IConfigurationSession>;
}

declare function isMandatory(attribute: Attribute): boolean;

export declare type KeepExistingDecisionsMode = {
    type: "KeepExistingDecisions";
};

declare interface KeepExistingDecisionsMode_2 {
    type: "KeepExistingDecisions";
}

export declare type LocalAttributeId = string;

export declare type LocalRuleId = string;

export declare const Logger: {
    setLogLevel: (level: LogLevel) => void;
    debug: (message?: any, ...optionalParams: any[]) => void;
    info: (message?: any, ...optionalParams: any[]) => void;
    warn: (message?: any, ...optionalParams: any[]) => void;
    error: (message?: any, ...optionalParams: any[]) => void;
};

declare type LogLevel = "debug" | "info" | "warning" | "error" | "silent";

export declare type MakeManyDecisionsConflict = Omit<Engine.PutManyDecisionsConflict, "type" | "decisionExplanations" | "constraintExplanations"> & {
    readonly type: ConfiguratorErrorType.MakeManyDecisionsConflict;
    readonly decisionExplanations: ReadonlyArray<DecisionExplanation>;
    readonly constraintExplanations: ReadonlyArray<ConstraintExplanation>;
};

export declare type MakeManyDecisionsMode = DropExistingDecisionsMode | KeepExistingDecisionsMode;

export declare type MakeManyDecisionsResult = {
    readonly rejectedDecisions: ReadonlyArray<ExplicitDecision>;
};

export declare type ManualConflictResolution = {
    type: "Manual";
    includeConstraintsInConflictExplanation: boolean;
};

declare interface ManualConflictResolution_2 {
    type: "Manual";
    includeConstraintsInConflictExplanation: boolean;
}

export declare type MissingSessionIdClaim = ReplaceType<Engine.MissingSessionIdClaim, ConfiguratorErrorType.MissingSessionIdClaim>;

declare interface MissingSessionIdClaim_2 {
    type: "MissingSessionIdClaim";
    title: string;
    detail: string;
}

export declare type MissingTenantIdClaim = ReplaceType<Engine.MissingTenantIdClaim, ConfiguratorErrorType.MissingTenantIdClaim>;

declare interface MissingTenantIdClaim_2 {
    type: "MissingTenantIdClaim";
    title: string;
    detail: string;
}

declare type Mode = (UtilRequiredKeys<DefaultMode, "type"> | UtilRequiredKeys<DropExistingDecisionsMode_2, "type"> | UtilRequiredKeys<KeepExistingDecisionsMode_2, "type">) & {
    type: string;
};

declare type ModelUsageRule = UsageRule & object;

export declare type NumericAttribute = BaseAttribute & {
    readonly type: AttributeType.Numeric;
    readonly decision: Decision<number> | null;
    readonly nonOptimisticDecision: Decision<number> | null;
    readonly range: Range_2;
    readonly decimalPlaces: number;
    readonly selection: Selection_2;
};

declare interface NumericAttribute_2 {
    attributeId: string;
    isDecisionRequired: boolean;
    /** @format decimal */
    min: number;
    /** @format decimal */
    max: number;
    decimalPlaces: number;
}

export declare type NumericAttributeNotFound = Omit<Engine.NumericAttributeNotFound, "type" | "globalAttributeId"> & {
    readonly type: ConfiguratorErrorType.NumericAttributeNotFound;
    readonly globalAttributeId: GlobalAttributeId;
};

declare interface NumericAttributeNotFound_2 {
    type: "NumericAttributeNotFound";
    title: string;
    detail: string;
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    globalAttributeId: GlobalAttributeId_2;
}

declare const numericAttributeRefinement: Refinement<Attribute, NumericAttribute>;

/**
 * A Numeric Consequence is the result of an evaluation weather of a Configuration Model or of made
 * Decisions in conjunction with a Configuration Model.
 * For a Numeric Attribute, represented by a Global Attribute ID, the following is specified:
 * (1) By a boolean is specified whether a Decision is still necessary (isSatisfied = false) or not
 *     (isSatisfied = true).
 * (2) The meta attribute "selection" indicates if a Value assignment is mandatory or not.
 * (3) The meta attribute "range" specifies a range of numbers by specifying a maximum (max) and a minimum value (min).
 * (4) The number of decimal places is specified by an integer value of the meta-attribute "decimalPlaces".
 */
declare interface NumericConsequence {
    /**
     * The ability to nest Configuration Models and reuse them in Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used. Details can be found in the scheme "GlobalAttributeId".
     */
    attributeId: GlobalAttributeId_2;
    /**
     * In this case, the meta attribute "isSatisfied" represents the "Value Satisfaction State".
     * The "Value" is the value  of a Numeric Attribute, which is always a decimal number.
     * It indicates for the Attribute under consideration whether Decisions still need to be made.
     */
    isSatisfied: boolean;
    /**
     * A Configurator must be able to realize different use cases. The API must support this, of course.
     * Therefore, there are two possibilities regarding the value assignment of a Numeric Attribute:
     * "Mandatory" means that a Value must be assigned to the considered Numeric Attribute,
     * for example by an user input.
     * "Optional" means that an assignment can be made - but is not required.
     * The meta attribute represents the design decision of the modeler. It can be used, for example,
     * for the state display of a control.
     */
    selection: Selection_3;
    /**
     * Declaring the numeric range for a Numeric Attribute can significantly affect the response time
     * of some routes. The numeric range should therefore be chosen as small as possible.
     */
    range: NumericValueRange;
    /**
     * The number of decimal places for the Values of a Numeric Attribute can significantly affect
     * the response time of some routes. Therefore it should be chosen as small as possible.
     */
    decimalPlaces: number;
}

declare interface NumericDecision {
    /**
     * The ability to nest Configuration Models and reuse them in Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used. Details can be found in the scheme "GlobalAttributeId".
     */
    attributeId: GlobalAttributeId_2;
    /**
     * In the case of a Numeric Decision, the meta attribute "state" represents the Value of the considered
     * Numeric Attribute (a decimal number).
     * This Value is always included when the Configuration Engine searches a solution.
     * @format decimal
     */
    state?: number | null;
    /**
     * The meta-attribute "kind" represents the so-called Value Decision Kind.
     * It indicates the responsibility for the selected Value Decision State.
     *
     * ### Implicit
     *             "Implicit" means that the inclusion or exclusion of a Value has been made
     * by the Configuration Engine when there is no other decision left.
     *
     * ### Explicit
     * "Explicit" means that the inclusion or exclusion of a Value has been made
     * by the consumer of the API.
     */
    kind: DecisionKind_2;
}

declare const NumericDecision_: M<    {}, Readonly<{
type: string;
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: number;
}>, Readonly<{
type: "Numeric";
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: number;
}>>;

declare type NumericDecision_2 = AType<typeof NumericDecision_>;

export declare type NumericDecisionOutOfRange = Omit<Engine.NumericDecisionOutOfRange, "type" | "globalAttributeId"> & {
    readonly type: ConfiguratorErrorType.NumericDecisionOutOfRange;
    readonly globalAttributeId: GlobalAttributeId;
};

declare interface NumericDecisionOutOfRange_2 {
    type: "NumericDecisionOutOfRange";
    title: string;
    detail: string;
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    globalAttributeId: GlobalAttributeId_2;
    range: string;
    /** @format decimal */
    decision: number;
}

/**
 * Declaring the numeric range for a Numeric Attribute can significantly affect the response time
 * of some routes. The numerical range should therefore be chosen as small as possible.
 */
declare interface NumericValueRange {
    /**
     * The minimum value of a numerical range should be chosen as small as possible.
     * @format decimal
     */
    min: number;
    /**
     * The maximum value of a numerical range should be chosen as small as possible.
     * @format decimal
     */
    max: number;
}

export declare type OnCanResetConfigurationChangedHandler = (canResetConfiguration: boolean) => void;

export declare type OnConfigurationChangedHandler = (configuration: Configuration, configurationChanges: ConfigurationChanges) => void;

export declare type OnDecisionsChangedHandler<T extends CollectedDecision> = (decisions: ReadonlyArray<T>) => void;

export declare type OnStoredConfigurationChangedHandler = (storedConfiguration: StoredConfiguration) => void;

declare interface OperatorExpression {
    parameterKey: string;
    operator: UsageRuleOperator;
    valueType: UsageRuleValueType;
    value: string;
}

export declare type OptimisticDecisionOptions = {
    /**
     * Enables the optimistic decisions feature for `makeDecision`.
     * @default true
     */
    readonly makeDecision?: boolean | null;
    /**
     * Enables the optimistic decisions feature for `makeManyDecisions`.
     * @default true
     */
    readonly makeManyDecisions?: boolean | null;
    /**
     * Enables the optimistic decisions feature for `applySolution`.
     * @default true
     */
    readonly applySolution?: boolean | null;
    /**
     * Enables the optimistic decisions feature for `restoreConfiguration`.
     * @default false
     */
    readonly restoreConfiguration?: boolean | null;
    /**
     * Enables the optimistic decisions feature for `resetConfiguration`.
     * @default false
     */
    readonly resetConfiguration?: boolean | null;
};

declare interface OptionallyIncluded {
    type: "OptionallyIncluded";
    isDecisionRequired: boolean;
}

/**
 * A Decision is a decision about an Attribute. For each Value, it is stated explicitly or implicitly
 * whether it should be included in the search for a Solution by the Configuration Engine.
 * Before a Decision is made, there are two possible "Decision States": "Included" and "Excluded".
 * In case of a Choice Attribute, these are "Value-Decision States", i. e. Decision States regarding a Choice Value.
 * In case of a Component Attribute, these are "Model-Decision States", i. e. Decision States regarding a
 * Component Configuration Model.
 * ### Included
 * "Included" means that a Value of a Choice Attribute or a referenced Component Configuration Model
 * can be taken into account when the Configuration Engine searches for a Solution.
 * ### Excluded
 * "Excluded" means that a considered Value of a Choice Attribute or a referenced Component Configuration Model
 * cannot be taken into account when the Configuration Engine searches for a Solution.
 */
declare enum PossibleDecisionState {
    Included = "Included",
    Excluded = "Excluded"
}

declare type ProblemDetails = (UtilRequiredKeys<RequestTimeout_2, "type" | "title" | "detail"> | UtilRequiredKeys<RequestFailure_2, "type" | "title" | "detail"> | UtilRequiredKeys<SerializationError_2, "type" | "title" | "detail"> | UtilRequiredKeys<InternalServerError, "type" | "title" | "detail"> | UtilRequiredKeys<MissingTenantIdClaim_2, "type" | "title" | "detail"> | UtilRequiredKeys<MissingSessionIdClaim_2, "type" | "title" | "detail"> | UtilRequiredKeys<TenantAccessForbidden_2, "type" | "title" | "detail"> | UtilRequiredKeys<SessionIdInvalid_2, "type" | "title" | "detail"> | UtilRequiredKeys<AuthenticationFailure_2, "type" | "title" | "detail"> | UtilRequiredKeys<SideLoadingForbidden_2, "type" | "title" | "detail"> | UtilRequiredKeys<SpecifiedDeploymentForbidden_2, "type" | "title" | "detail"> | UtilRequiredKeys<AttributeNotFound_2, "type" | "title" | "detail"> | UtilRequiredKeys<ChoiceAttributeNotFound_2, "type" | "title" | "detail"> | UtilRequiredKeys<ChoiceValueNotFound_2, "type" | "title" | "detail"> | UtilRequiredKeys<NumericAttributeNotFound_2, "type" | "title" | "detail"> | UtilRequiredKeys<BooleanAttributeNotFound_2, "type" | "title" | "detail"> | UtilRequiredKeys<ComponentAttributeNotFound_2, "type" | "title" | "detail"> | UtilRequiredKeys<NumericDecisionOutOfRange_2, "type" | "title" | "detail"> | UtilRequiredKeys<ConflictWithConsequence_2, "type" | "title" | "detail"> | UtilRequiredKeys<UsageRuleRestriction_2, "type" | "title" | "detail"> | UtilRequiredKeys<ConfigurationModelInvalid_2, "type" | "title" | "detail"> | UtilRequiredKeys<DecisionsToRespectInvalid_2, "type" | "title" | "detail"> | UtilRequiredKeys<SolutionNotFeasible_2, "type" | "title" | "detail"> | UtilRequiredKeys<SessionNotFound_2, "type" | "title" | "detail"> | UtilRequiredKeys<PutManyDecisionsConflict, "type" | "title" | "detail"> | UtilRequiredKeys<ConfigurationModelNotFound_2, "type" | "title" | "detail"> | UtilRequiredKeys<SolverInitializationFailure_2, "type" | "title" | "detail"> | UtilRequiredKeys<ConfigurationModelLoadFailure_2, "type" | "title" | "detail"> | UtilRequiredKeys<ConfigurationModelNotFeasible_2, "type" | "title" | "detail"> | UtilRequiredKeys<ConfigurationInitializationFailure_2, "type" | "title" | "detail"> | UtilRequiredKeys<SolverPoolInitializationFailure_2, "type" | "title" | "detail"> | UtilRequiredKeys<SetDecisionConflict_2, "type" | "title" | "detail"> | UtilRequiredKeys<SolveOperationTimeout_2, "type" | "title" | "detail"> | UtilRequiredKeys<ExplainConflict_2, "type" | "title" | "detail"> | UtilRequiredKeys<ExplainFailure_2, "type" | "title" | "detail"> | UtilRequiredKeys<SnapshotInvalid_2, "type" | "title" | "detail"> | UtilRequiredKeys<SnapshotNotFound_2, "type" | "title" | "detail"> | UtilRequiredKeys<AssignedChannelNotFound, "type" | "title" | "detail"> | UtilRequiredKeys<Unspecified, "type" | "title" | "detail">) & {
    type: string;
    title: string;
    detail: string;
};

/** Contains the resulting changes of the configuration session. */
declare interface PutDecisionResponse {
    /**
     * The Consequences are the result of an evaluation weather of a Configuration Model or of made
     * Decisions in conjunction with a Configuration Model.
     */
    consequences: Consequences;
    /**
     * Affected Decisions are those that were influenced by the Decision(s) given with the request.
     * The influence is a result of the Rule evaluation by the Configuration Engine.
     * The Decisions contained in the request are also returned.
     */
    affectedDecisions: Decisions;
}

declare interface PutManyDecisionsConflict {
    type: "PutManyDecisionsConflict";
    title: string;
    detail: string;
    constraintExplanations: ConstraintExplanation_2[];
    decisionExplanations: DecisionExplanation_2[];
}

/** Contains the resulting changes of the configuration session. */
declare interface PutManyDecisionsResponse {
    /**
     * The Consequences are the result of an evaluation weather of a Configuration Model or of made
     * Decisions in conjunction with a Configuration Model.
     */
    consequences: Consequences;
    /**
     * Affected Decisions are those that were influenced by the Decision(s) given with the request.
     * The influence is a result of the Rule evaluation by the Configuration Engine.
     * The Decisions contained in the request are also returned.
     */
    affectedDecisions: Decisions;
    /** Rejected Decisions are those from the request that could not be applied and were therefore rejected. */
    rejectedDecisions: Decisions;
}

declare type QueryParamsType = Record<string | number, any>;

declare type Range_2 = {
    readonly min: number;
    readonly max: number;
};
export { Range_2 as Range }

declare enum Reason {
    NotAvailable = "NotAvailable",
    StateNotPossible = "StateNotPossible"
}

declare interface RegularExpression {
    parameterKey: string;
    regex: string;
}

declare type ReplaceType<E extends {
    type: string;
}, T extends ConfiguratorErrorType> = Omit<E, "type"> & {
    readonly type: T;
};

export declare type RequestFailure = ReplaceType<Engine.RequestFailure, ConfiguratorErrorType.RequestFailure>;

declare interface RequestFailure_2 {
    type: "RequestFailure";
    title: string;
    detail: string;
    exception: string;
}

declare type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;

export declare type RequestTimeout = ReplaceType<Engine.RequestTimeout, ConfiguratorErrorType.RequestTimeout>;

declare interface RequestTimeout_2 {
    type: "RequestTimeout";
    title: string;
    detail: string;
}

declare type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;

declare interface RuleConstraint {
    type: "Rule";
    constraintId: GlobalConstraintId_2;
}

export declare type ScheduleTaskResult = {
    /**
     * The amount of tasks still waiting for execution.
     */
    readonly pendingTasks: number;
};

declare enum Selection_2 {
    Mandatory = "Mandatory",
    Optional = "Optional"
}
export { Selection_2 as Selection }

/**
 * There are two possibilities regarding the value assignment of Attributes of the type
 * Boolean, Numeric or Component:
 *
 * ### Mandatory
 * "Mandatory" means that an assignment of a Value must be done. The Value can be
 * - depending on the type of the Attribute - a numeric, a boolean or a reference
 * to a Component Configuration Model.
 *
 * ### Optional
 * "Optional" means that such an assignment can - but not must - be done.
 *
 * The value of the meta attribute "selection" represents the design decision of the modeler.
 * It can be used, for example, for the state display of a control.
 * Examples can be found in the product documentation.
 */
declare enum Selection_3 {
    Mandatory = "Mandatory",
    Optional = "Optional"
}

export declare type SerializationError = ReplaceType<Engine.SerializationError, ConfiguratorErrorType.SerializationError>;

declare interface SerializationError_2 {
    type: "SerializationError";
    title: string;
    detail: string;
    jsonException: string;
}

export declare type ServerError = {
    readonly type: ConfiguratorErrorType.ServerError;
};

export declare type ServerSideSessionInitialisationOptions = {
    /**
     * The API endpoint of your backend, which will be contacted to create the session.
     * @remarks You can modify and enrich the session context during the server-side session creation process.
     */
    readonly sessionCreateUrl: string;
};

export declare type SessionClosed = {
    readonly type: ConfiguratorErrorType.SessionClosed;
};

export declare type SessionContext = {
    /**
     * The base URL for the Headless Configuration Engine (HCE) API.
     * @default SPC production environment
     */
    readonly apiBaseUrl?: string;
    /**
     * Defines whether the session should be created client-side or server-side.
     * Use {@link ClientSideSessionInitialisationOptions} for client-side session creation with all parameters.
     * Use {@link ServerSideSessionInitialisationOptions} for server-side session creation, especially when dealing with security-sensitive parameters (e.g. access token).
     */
    readonly sessionInitialisationOptions: ClientSideSessionInitialisationOptions | ServerSideSessionInitialisationOptions;
    /**
     * Specifies the source of the configuration model.
     * Use {@link ConfigurationModelFromChannel} if you want to use a deployed configuration model.
     * Use {@link ConfigurationModelFromPackage} if you want to side-load a configuration model from the client.
     */
    readonly configurationModelSource: ConfigurationModelSource;
    /**
     * Defines which attributes should be respected when making a decision.
     */
    readonly attributeRelations?: AttributeRelations | null;
    /**
     * The parameter values used for the configuration model's usage rules.
     */
    readonly usageRuleParameters?: Record<string, string> | null;
    /**
     * Specifies which elements are allowed to be included in the result when explaining a circumstance.
     * This is usually a security-sensitive option, so it is recommended to use server-side session creation for this.
     */
    readonly allowedInExplain?: AllowedInExplain | null;
    /**
     * Defines which methods the optimistic decisions feature should be enabled for.
     * @default Optimistic decisions are enabled for `makeDecision`, `makeManyDecisions`, and `applySolution` by default.
     */
    readonly optimisticDecisionOptions?: OptimisticDecisionOptions | null;
    /**
     * Determines whether the source IDs of attributes should be provided.
     * @default false
     * @remarks When true, an additional API request will be made during session initialization to retrieve the source IDs.
     */
    readonly provideSourceId?: boolean | null;
};

export declare const sessionContextEq: EqT<SessionContext>;

export declare const SessionFactory: ISessionFactory;

export declare type SessionIdInvalid = ReplaceType<Engine.SessionIdInvalid, ConfiguratorErrorType.SessionIdInvalid>;

declare interface SessionIdInvalid_2 {
    type: "SessionIdInvalid";
    title: string;
    detail: string;
}

export declare type SessionNotFound = {
    readonly type: ConfiguratorErrorType.SessionNotFound;
};

declare interface SessionNotFound_2 {
    type: "SessionNotFound";
    title: string;
    detail: string;
    sessionId: GlobalSessionId;
}

/** Describes the automatic expiration of a session. */
declare interface SessionTimeout {
    /**
     * Indicates the absolute expiration of the session - when the session will expire at latest.
     * @format date-time
     */
    absolute: string;
    /**
     * Indicates what the sliding expiration of the session is in seconds. Meaning the session will expire if left untouched for the indicated amount of time.
     * @format int32
     */
    slidingInSeconds: number;
}

export declare type SetDecisionConflict = ReplaceType<Engine.SetDecisionConflict, ConfiguratorErrorType.SetDecisionConflict>;

declare interface SetDecisionConflict_2 {
    type: "SetDecisionConflict";
    title: string;
    detail: string;
}

export declare type SetManyResult = MakeManyDecisionsResult;

export declare type SideLoadingForbidden = ReplaceType<Engine.SideLoadingForbidden, ConfiguratorErrorType.SideLoadingForbidden>;

declare interface SideLoadingForbidden_2 {
    type: "SideLoadingForbidden";
    title: string;
    detail: string;
}

export declare type SnapshotInvalid = ReplaceType<Engine.SnapshotInvalid, ConfiguratorErrorType.SnapshotInvalid>;

declare interface SnapshotInvalid_2 {
    type: "SnapshotInvalid";
    title: string;
    detail: string;
    validationMessage: string;
    validationPath: string[];
}

export declare type SnapshotNotFound = ReplaceType<Engine.SnapshotNotFound, ConfiguratorErrorType.SnapshotNotFound>;

declare interface SnapshotNotFound_2 {
    type: "SnapshotNotFound";
    title: string;
    detail: string;
}

export declare type SolutionNotFeasible = ReplaceType<Engine.SolutionNotFeasible, ConfiguratorErrorType.SolutionNotFeasible>;

declare interface SolutionNotFeasible_2 {
    type: "SolutionNotFeasible";
    title: string;
    detail: string;
}

export declare type SolveOperationTimeout = ReplaceType<Engine.SolveOperationTimeout, ConfiguratorErrorType.SolveOperationTimeout>;

declare interface SolveOperationTimeout_2 {
    type: "SolveOperationTimeout";
    title: string;
    detail: string;
    timeout: string;
}

export declare type SolverInitializationFailure = ReplaceType<Engine.SolverInitializationFailure, ConfiguratorErrorType.SolverInitializationFailure>;

declare interface SolverInitializationFailure_2 {
    type: "SolverInitializationFailure";
    title: string;
    detail: string;
}

export declare type SolverPoolInitializationFailure = ReplaceType<Engine.SolverPoolInitializationFailure, ConfiguratorErrorType.SolverPoolInitializationFailure>;

declare interface SolverPoolInitializationFailure_2 {
    type: "SolverPoolInitializationFailure";
    title: string;
    detail: string;
}

export declare type SourceAttributeId = {
    readonly configurationModel: ConfigurationModelId;
    readonly localId: LocalAttributeId;
};

export declare type SpecifiedDeploymentForbidden = Omit<Engine.SpecifiedDeploymentForbidden, "type" | "channel"> & {
    readonly type: ConfiguratorErrorType.SpecifiedDeploymentForbidden;
    readonly channel: ChannelId;
};

declare interface SpecifiedDeploymentForbidden_2 {
    type: "SpecifiedDeploymentForbidden";
    title: string;
    detail: string;
    channel: string;
    deploymentName: string;
}

declare type StateStage<TState, TNext> = {
    state: (state: TState) => TNext;
};

export declare type StoredConfiguration = AType<typeof StoredConfiguration_>;

declare const StoredConfiguration_: M<    {}, Readonly<{
schemaVersion: number;
explicitDecisions: Array_2<Readonly<{
type: string;
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: number;
}> | Readonly<{
type: string;
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: boolean;
}> | Readonly<{
type: string;
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: string;
}>>;
}>, Readonly<{
schemaVersion: 1;
explicitDecisions: Array_2<Readonly<{
type: "Numeric";
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: number;
}> | Readonly<{
type: "Boolean";
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: boolean;
}> | Readonly<{
type: "Choice";
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
choiceValueId: string;
state: "Included" | "Excluded";
}> | Readonly<{
type: "Component";
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: "Included" | "Excluded";
}>>;
}>>;

export declare type StoredConfigurationInvalid = {
    readonly type: ConfiguratorErrorType.StoredConfigurationInvalid;
};

declare namespace StoredConfigurationV1 {
    export {
        GlobalAttributeId_3 as GlobalAttributeId,
        NumericDecision_2 as NumericDecision,
        BooleanDecision_2 as BooleanDecision,
        ChoiceDecision,
        ComponentDecision_2 as ComponentDecision,
        Decision_2 as Decision,
        StoredConfigurationV1_2 as StoredConfigurationV1
    }
}
export { StoredConfigurationV1 }

declare const StoredConfigurationV1_: M<    {}, Readonly<{
schemaVersion: number;
explicitDecisions: Array_2<Readonly<{
type: string;
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: number;
}> | Readonly<{
type: string;
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: boolean;
}> | Readonly<{
type: string;
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: string;
}>>;
}>, Readonly<{
schemaVersion: 1;
explicitDecisions: Array_2<Readonly<{
type: "Numeric";
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: number;
}> | Readonly<{
type: "Boolean";
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: boolean;
}> | Readonly<{
type: "Choice";
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
choiceValueId: string;
state: "Included" | "Excluded";
}> | Readonly<{
type: "Component";
attributeId: Readonly<{
localId: string;
componentPath: Array_2<string> | undefined;
sharedConfigurationModelId: string | undefined;
}>;
state: "Included" | "Excluded";
}>>;
}>>;

declare type StoredConfigurationV1_2 = AType<typeof StoredConfigurationV1_>;

export declare type Subscription = {
    readonly unsubscribe: () => void;
};

export declare type TaskCancelled = {
    readonly type: ConfiguratorErrorType.TaskCancelled;
};

export declare type TenantAccessForbidden = ReplaceType<Engine.TenantAccessForbidden, ConfiguratorErrorType.TenantAccessForbidden>;

declare interface TenantAccessForbidden_2 {
    type: "TenantAccessForbidden";
    title: string;
    detail: string;
}

declare interface Unspecified {
    type?: string | null;
    title?: string | null;
    /** @format int32 */
    status?: number | null;
    detail?: string | null;
    instance?: string | null;
    [key: string]: any;
}

declare interface UsageRule {
    usageRuleId: string;
    expressionGroups: ExpressionGroup[];
}

declare enum UsageRuleOperator {
    Equal = "Equal",
    NotEqual = "NotEqual",
    Greater = "Greater",
    GreaterEqual = "GreaterEqual",
    Less = "Less",
    LessEqual = "LessEqual"
}

export declare type UsageRuleRestriction = ReplaceType<Engine.UsageRuleRestriction, ConfiguratorErrorType.UsageRuleRestriction>;

declare interface UsageRuleRestriction_2 {
    type: "UsageRuleRestriction";
    title: string;
    detail: string;
}

declare interface UsageRules {
    modelUsageRule?: ModelUsageRule | null;
    attributeUsageRules?: AttributeUsageRule[] | null;
    choiceValueUsageRules?: ChoiceValueUsageRule[] | null;
    constraintUsageRules?: ConstraintUsageRule[] | null;
}

declare enum UsageRuleValueType {
    Date = "Date",
    String = "String",
    Numeric = "Numeric"
}

declare type UtilRequiredKeys<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;

declare interface WhyAttributeNotSatisfiedRequest {
    type: "Attribute";
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
}

declare interface WhyBooleanStateNotPossibleRequest {
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
    type: "Boolean";
    state: boolean;
}

declare interface WhyChoiceValueStateNotPossibleRequest {
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
    type: "ChoiceValue";
    choiceValueId: string;
    /**
     * A Decision is a decision about an Attribute. For each Value, it is stated explicitly or implicitly
     * whether it should be included in the search for a Solution by the Configuration Engine.
     * Before a Decision is made, there are two possible "Decision States": "Included" and "Excluded".
     * In case of a Choice Attribute, these are "Value-Decision States", i. e. Decision States regarding a Choice Value.
     * In case of a Component Attribute, these are "Model-Decision States", i. e. Decision States regarding a
     * Component Configuration Model.
     * ### Included
     * "Included" means that a Value of a Choice Attribute or a referenced Component Configuration Model
     * can be taken into account when the Configuration Engine searches for a Solution.
     * ### Excluded
     * "Excluded" means that a considered Value of a Choice Attribute or a referenced Component Configuration Model
     * cannot be taken into account when the Configuration Engine searches for a Solution.
     */
    state: PossibleDecisionState;
}

declare interface WhyComponentStateNotPossibleRequest {
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
    type: "Component";
    /**
     * A Decision is a decision about an Attribute. For each Value, it is stated explicitly or implicitly
     * whether it should be included in the search for a Solution by the Configuration Engine.
     * Before a Decision is made, there are two possible "Decision States": "Included" and "Excluded".
     * In case of a Choice Attribute, these are "Value-Decision States", i. e. Decision States regarding a Choice Value.
     * In case of a Component Attribute, these are "Model-Decision States", i. e. Decision States regarding a
     * Component Configuration Model.
     * ### Included
     * "Included" means that a Value of a Choice Attribute or a referenced Component Configuration Model
     * can be taken into account when the Configuration Engine searches for a Solution.
     * ### Excluded
     * "Excluded" means that a considered Value of a Choice Attribute or a referenced Component Configuration Model
     * cannot be taken into account when the Configuration Engine searches for a Solution.
     */
    state: PossibleDecisionState;
}

declare interface WhyConfigurationNotSatisfiedRequest {
    type: "Configuration";
}

export declare type WhyIsAttributeNotSatisfied = {
    question: ExplainQuestionType.whyIsNotSatisfied;
    subject: ExplainQuestionSubject.attribute;
    attributeId: GlobalAttributeId;
};

export declare type WhyIsBooleanStateNotPossible = {
    question: ExplainQuestionType.whyIsStateNotPossible;
    subject: ExplainQuestionSubject.boolean;
    attributeId: GlobalAttributeId;
    state: boolean;
};

export declare type WhyIsChoiceValueStateNotPossible = {
    question: ExplainQuestionType.whyIsStateNotPossible;
    subject: ExplainQuestionSubject.choiceValue;
    attributeId: GlobalAttributeId;
    choiceValueId: ChoiceValueId;
    state: ChoiceValueDecisionState;
};

export declare type WhyIsComponentStateNotPossible = {
    question: ExplainQuestionType.whyIsStateNotPossible;
    subject: ExplainQuestionSubject.component;
    attributeId: GlobalAttributeId;
    state: ComponentDecisionState;
};

export declare type WhyIsConfigurationNotSatisfied = {
    question: ExplainQuestionType.whyIsNotSatisfied;
    subject: ExplainQuestionSubject.configuration;
};

export declare type WhyIsNotSatisfied = WhyIsConfigurationNotSatisfied | WhyIsAttributeNotSatisfied;

export declare type WhyIsNumericStateNotPossible = {
    question: ExplainQuestionType.whyIsStateNotPossible;
    subject: ExplainQuestionSubject.numeric;
    attributeId: GlobalAttributeId;
    state: number;
};

export declare type WhyIsStateNotPossible = WhyIsChoiceValueStateNotPossible | WhyIsNumericStateNotPossible | WhyIsBooleanStateNotPossible | WhyIsComponentStateNotPossible;

declare type WhyNotSatisfiedRequest = (UtilRequiredKeys<WhyAttributeNotSatisfiedRequest, "type"> | UtilRequiredKeys<WhyConfigurationNotSatisfiedRequest, "type">) & {
    type: string;
};

declare interface WhyNumericStateNotPossibleRequest {
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
    type: "Numeric";
    /** @format decimal */
    state: number;
}

declare type WhyStateNotPossibleRequest = (UtilRequiredKeys<WhyBooleanStateNotPossibleRequest, "attributeId" | "type"> | UtilRequiredKeys<WhyNumericStateNotPossibleRequest, "attributeId" | "type"> | UtilRequiredKeys<WhyChoiceValueStateNotPossibleRequest, "attributeId" | "type"> | UtilRequiredKeys<WhyComponentStateNotPossibleRequest, "attributeId" | "type">) & {
    /**
     * The ability to nest Configuration Models and reuse them when modelling Components requires an Attribute identifier
     * that is unique across the Models. Therefore, an object with the corresponding properties for mapping
     * the identifier components is used.
     * The GlobalAttributeId is practically a resource path, which can also be called an "Attribute Path"
     * because it is the path to an Attribute.
     * shared component path localId
     * Details can be found in the API product documentation.
     */
    attributeId: GlobalAttributeId_2;
    type: string;
};

export { }
