import { DbtProjectType, } from './projects';
export var RequestMethod;
(function (RequestMethod) {
    RequestMethod["CLI"] = "CLI";
    RequestMethod["CLI_CI"] = "CLI_CI";
    RequestMethod["WEB_APP"] = "WEB_APP";
    RequestMethod["SDK"] = "SDK";
    RequestMethod["HEADLESS_BROWSER"] = "HEADLESS_BROWSER";
    RequestMethod["UNKNOWN"] = "UNKNOWN";
    RequestMethod["BACKEND"] = "BACKEND";
})(RequestMethod || (RequestMethod = {}));
export const isRequestMethod = (value) => !!value && Object.values(RequestMethod).includes(value);
export const hasInviteCode = (data) => 'inviteCode' in data &&
    typeof data.inviteCode === 'string' &&
    data.inviteCode.length > 0;
export const isEmailOnlyUser = (data) => !('inviteCode' in data) &&
    !('password' in data) &&
    !('firstName' in data) &&
    !('lastName' in data);
export var LightdashMode;
(function (LightdashMode) {
    LightdashMode["DEFAULT"] = "default";
    LightdashMode["DEMO"] = "demo";
    LightdashMode["PR"] = "pr";
    LightdashMode["CLOUD_BETA"] = "cloud_beta";
    LightdashMode["DEV"] = "development";
})(LightdashMode || (LightdashMode = {}));
// Deploy Session Types
export var DeploySessionStatus;
(function (DeploySessionStatus) {
    DeploySessionStatus["UPLOADING"] = "uploading";
    DeploySessionStatus["FINALIZING"] = "finalizing";
    DeploySessionStatus["COMPLETED"] = "completed";
    DeploySessionStatus["FAILED"] = "failed";
})(DeploySessionStatus || (DeploySessionStatus = {}));
export var DBFieldTypes;
(function (DBFieldTypes) {
    DBFieldTypes["DIMENSION"] = "dimension";
    DBFieldTypes["METRIC"] = "metric";
})(DBFieldTypes || (DBFieldTypes = {}));
export const sensitiveDbtCredentialsFieldNames = [
    'personal_access_token',
    'api_key',
    'webhook_hmac_secret',
];
export const DbtProjectTypeLabels = {
    [DbtProjectType.DBT]: 'dbt local server',
    [DbtProjectType.DBT_CLOUD_IDE]: 'dbt cloud',
    [DbtProjectType.GITHUB]: 'Github',
    [DbtProjectType.GITLAB]: 'GitLab',
    [DbtProjectType.BITBUCKET]: 'BitBucket',
    [DbtProjectType.AZURE_DEVOPS]: 'Azure DevOps',
    [DbtProjectType.NONE]: 'CLI',
    [DbtProjectType.MANIFEST]: 'Manifest',
};
export var CreateProjectTableConfiguration;
(function (CreateProjectTableConfiguration) {
    CreateProjectTableConfiguration["PROD"] = "prod";
    CreateProjectTableConfiguration["ALL"] = "all";
})(CreateProjectTableConfiguration || (CreateProjectTableConfiguration = {}));
export const hasWarehouseCredentials = (createProject) => !!createProject.warehouseConnection &&
    Object.keys(createProject.warehouseConnection).length > 0;
export var TableSelectionType;
(function (TableSelectionType) {
    TableSelectionType["ALL"] = "ALL";
    TableSelectionType["WITH_TAGS"] = "WITH_TAGS";
    TableSelectionType["WITH_NAMES"] = "WITH_NAMES";
})(TableSelectionType || (TableSelectionType = {}));
export const isApiError = (error) => typeof error === 'object' &&
    error !== null &&
    'status' in error &&
    error.status === 'error';
//# sourceMappingURL=api.js.map