"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module iModels
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.SchemaState = exports.ProfileOptions = exports.DomainOptions = exports.SyncMode = exports.BriefcaseIdValue = void 0;
/** Values of [[BriefcaseId]] that have special meaning.
 * @public
 * @extensions
 */
var BriefcaseIdValue;
(function (BriefcaseIdValue) {
    /** Indicates an invalid/illegal BriefcaseId */
    BriefcaseIdValue[BriefcaseIdValue["Illegal"] = 4294967295] = "Illegal";
    /** BriefcaseIds must be less than this value */
    BriefcaseIdValue[BriefcaseIdValue["Max"] = 16777216] = "Max";
    /** All valid iModelHub issued BriefcaseIds will be equal or higher than this */
    BriefcaseIdValue[BriefcaseIdValue["FirstValid"] = 2] = "FirstValid";
    /** All valid iModelHub issued BriefcaseIds will be equal or lower than this */
    BriefcaseIdValue[BriefcaseIdValue["LastValid"] = 16777205] = "LastValid";
    /**
     * The briefcase has not been assigned a unique Id by iModelHub. Only briefcases that have been assigned a unique BriefcaseId may create changesets,
     * because BriefcaseId is used to create unique ElementIds for new elements.
     *
     * The `Unassigned` briefcaseId is used for several purposes:
     *  - **Snapshots**. Snapshot files are immutable copies of an iModel for archival or data exchange purposes. They can neither generate nor accept new changesets.
     *  - **Checkpoints**. Checkpoints are Snapshots that represent a specific version on an iModel's timeline.
     *  - **PullOnly**. A local briefcase file that may be used to "slide" along a timeline by applying incoming changesets.
     * They are always opened readonly except to apply changesets.
     *  - **Standalone**. Standalone iModels are local files that are not connected to iModelHub, and therefore cannot accept or create changesets.
     */
    BriefcaseIdValue[BriefcaseIdValue["Unassigned"] = 0] = "Unassigned";
})(BriefcaseIdValue || (exports.BriefcaseIdValue = BriefcaseIdValue = {}));
/** Whether a briefcase is editable or may only accept incoming changesets from iModelHub
 * @public
 * @extensions
 */
var SyncMode;
(function (SyncMode) {
    /** Use a fixed version (i.e. a checkpoint). See [CheckpointManager]($backend) for preferred approach to using checkpoint files. */
    SyncMode[SyncMode["FixedVersion"] = 1] = "FixedVersion";
    /** A briefcase that can be edited. A unique briefcaseId must be assigned by iModelHub. */
    SyncMode[SyncMode["PullAndPush"] = 2] = "PullAndPush";
    /** use [BriefcaseIdValue.Unassigned](%backend). This makes a briefcase that can accept changesets from iModelHub but can never create changesets. */
    SyncMode[SyncMode["PullOnly"] = 3] = "PullOnly";
})(SyncMode || (exports.SyncMode = SyncMode = {}));
/** Option to control the validation and upgrade of domain schemas in the Db
 * @beta
 */
var DomainOptions;
(function (DomainOptions) {
    /** Domain schemas will be validated for any required upgrades. Any errors will be reported back, and cause the application to fail opening the Db */
    DomainOptions[DomainOptions["CheckRequiredUpgrades"] = 0] = "CheckRequiredUpgrades";
    /** Domain schemas will be validated for any required or optional upgrades. Any errors will be reported back, and cause the application to fail opening the Db */
    DomainOptions[DomainOptions["CheckRecommendedUpgrades"] = 1] = "CheckRecommendedUpgrades";
    /** Domain schemas will be upgraded if necessary. However, only compatible schema upgrades will be allowed - these are typically additions of classes, properties, and changes to custom attributes */
    DomainOptions[DomainOptions["Upgrade"] = 2] = "Upgrade";
    /** Domain schemas will neither be validated nor be upgraded. Used only internally */
    DomainOptions[DomainOptions["SkipCheck"] = 3] = "SkipCheck";
})(DomainOptions || (exports.DomainOptions = DomainOptions = {}));
/** Options that control whether a profile upgrade should be performed when opening a Db
 * @beta
 */
var ProfileOptions;
(function (ProfileOptions) {
    /** No profile upgrade will be performed. If a profile upgrade was required, opening the file will fail */
    ProfileOptions[ProfileOptions["None"] = 0] = "None";
    /** Profile upgrade will be performed if necessary */
    ProfileOptions[ProfileOptions["Upgrade"] = 1] = "Upgrade";
})(ProfileOptions || (exports.ProfileOptions = ProfileOptions = {}));
/**
 * The state of the schemas in the Db compared with what the current version of the software expects
 * Note: The state may vary depending on whether the Db is to be opened ReadOnly or ReadWrite.
 * @public
 */
var SchemaState;
(function (SchemaState) {
    /** The schemas in the Db are up-to-date, and do not need to be upgraded before opening it with the current version of the software */
    SchemaState[SchemaState["UpToDate"] = 0] = "UpToDate";
    /** It's required that the schemas in the Db be upgraded before it can be opened with the current version of the software.
     * This may happen in read-write scenarios where the application requires a newer version of the schemas to be in place before
     * it can write data based on that new schema.
     */
    SchemaState[SchemaState["UpgradeRequired"] = 1] = "UpgradeRequired";
    /** It's recommended, but not necessary that the schemas in the Db be upgraded before opening it with the current version of the software */
    SchemaState[SchemaState["UpgradeRecommended"] = 2] = "UpgradeRecommended";
    /** The schemas in the Db are too old to be opened by the current version of the software. Upgrade using the API is not possible. */
    SchemaState[SchemaState["TooOld"] = 3] = "TooOld";
    /** The schemas in the Db are too new to be opened by the current version of the software */
    SchemaState[SchemaState["TooNew"] = 4] = "TooNew";
})(SchemaState || (exports.SchemaState = SchemaState = {}));
//# sourceMappingURL=BriefcaseTypes.js.map