import { IApiSuccess, IVueComponents, IDataTableQuery } from '../../../_common';
import { ITenantAttributeLanguage } from './DataHub/Languages';
import { ITenantAttributeScope } from './DataHub/Scopes';
import { ITenantAttributeGroup } from './DataHub/Groups';
import { ITenantEntityType } from './DataHub/AttributeSets';
import { ITenantVariantSet } from './DataHub/VariantToVariant';
import { ITenantAttribute, IDataTypeInstance, ICacheEntitiesAttributeInSetCache } from './DataHub/Attributes';
import { CHANGE_TRACKING_MODE } from './DataHub/ETLAttributeMaps';

export type ITranslatable = Record<string, string>;
export interface IDataTableQueryWithSerializeOptionals extends IDataTableQuery {
    serializeOptionals?: string[];
}
export interface IBase {
    created: string;
    createdBy: number;
    createdByUsername?: string;
    id: number;
    modified: string;
    modifiedBy: number;
    modifiedByUsername?: string;
}
export interface IBaseEntity extends IBase {
    active: boolean;
    description: string;
    entityId: number;
    /** unique identifier */
    key: string;
    name: string;
    /** if true can only be modified by ownerPlugin */
    readOnly: boolean;
}
/** Actindo.Modules.Actindo.DataHub.DataTypes.AttributeConfigurationAbstract */
export interface IDataTypesAttributeConfigurationAbstract {
    id?: number;
    readOnly?: boolean;
    alternativeConfiguration?: {
        params: Record<string, string>;
        url: string;
    };
}
export interface IDeleteResponse extends IApiSuccess {
    failedIds: number[];
    successIds: number[];
    notFoundIds: number[];
}
export interface IListOfLanguagesScopesAndFields extends IApiSuccess {
    languages: ITenantAttributeLanguage[];
    scopes: ITenantAttributeScope[];
    attributes: ICacheEntitiesAttributeInSetCache[];
}
/** Actindo.Modules.Actindo.DataHub.Response.Container.EntityContainer */
export interface IEntityContainer {
    scopes: ITenantAttributeScope[];
    attributes: ITenantAttribute[];
    languages: ITenantAttributeLanguage[];
    groups: ITenantAttributeGroup[];
    variantAttribute: IAttributeAccessInterface;
    completeness: ITenantAttribute;
}
/** Actindo.Modules.Actindo.DataHub.Response.Entity.DependencyContainer */
export interface IEntityDependencyContainer {
    id: number;
    dependentEntityType: ITenantEntityType;
    dependentEntityId: number;
    changeTracking: CHANGE_TRACKING_MODE;
    dependentFriendlyIdentifier: string;
}
/** Actindo.Modules.Actindo.DataHub.Request.Container.EntityDataType.DefaultFilterPropertiesContainer */
export interface IDefaultFilterPropertiesContainer {
    inputType: string;
    items: object;
}
/** Actindo.Modules.Actindo.DataHub.Request.Container.EntityDataType.RenderContainer */
export interface IRenderContainer {
    importPath: string;
    component: string;
    properties: object;
}
/** Actindo.Modules.Actindo.DataHub.Request.Container.EntityDataType.FilterOperatorObject */
export interface IFilterOperatorObject {
    defaultFilterProperties: IDefaultFilterPropertiesContainer;
    customRender: IRenderContainer;
    scopeId: number;
    languageId: number;
}
/** Actindo.Modules.Actindo.DataHub.Request.Container.EntityDataType.CustomFilterContainer */
export interface ICustomFilterContainer {
    importPath: string;
    component: string;
    properties: object;
    operators: IFilterOperatorObject[];
}
/** Actindo.Modules.Actindo.DataHub.Request.Container.EntityDataType.ColumnDefinitionContainer */
export interface IColumnDefinitionContainer {
    attributeId: number;
    columnType: string;
    field: string;
    label: string;
    optional: boolean;
    hidden: boolean;
    filterable: boolean;
    sortable: boolean;
    customFilter: ICustomFilterContainer;
    defaultFilterProperties: IDefaultFilterPropertiesContainer;
    customRender: IRenderContainer;
    scopeId: number;
    languageId: number;
    vueComponents?: IVueComponents;
}
/** Actindo.Modules.Actindo.DataHub.Request.Container.AttributeGroupTree.CreateAttributeGroupRequestObject */
export interface ITreeCreate<T extends object = object> {
    name: string;
    parent_id: number;
    sortOrder: number;
    active: boolean;
    key: string;
    children?: ITreeCreate<T>[];
}
/** Actindo.Modules.Actindo.DataHub.Request.Container.AttributeGroupTree.UpdateAttributeGroupRequestObject */
export interface ITreeUpdate {
    id: number;
    name: string;
    parent_id: number;
    active: boolean;
    sortOrder: number;
}
export interface ITreeDelete {
    id: number;
}
export interface ISaveTreeRequest<T extends object = object> {
    created?: ITreeCreate<T>[];
    modified?: ITreeUpdate[];
    deleted?: ITreeDelete[];
}
/** Actindo.Modules.Actindo.DataHub.Interfaces.AttributeAccessInterface */
export interface IAttributeAccessInterface<T extends IDataTypesAttributeConfigurationAbstract = IDataTypesAttributeConfigurationAbstract> extends IBaseEntity {
    dataType: string;
    multilanguage: boolean;
    scopable: boolean;
    groupId: number;
    groupOrder: number;
    configuration: T;
    dataTypeFriendlyName: string;
    dataTypeInstance: IDataTypeInstance<T>;
    configText: string;
    attribute: ITenantAttribute<T>;
    group: ITenantAttributeGroup;
}
/** Actindo.Modules.Actindo.DataHub.DataHubAwareEntityInterface */
export type IDataHubAwareEntityInterface = object;
export interface IDatahubVariantSetAbstract extends ITenantVariantSet {
    id: number;
    copyChangeableAttributeValuesOnChildCreation: boolean;
}
export interface IDatahubCreateVariantSet {
    underlyingAttributeSetId: number;
    definingAttributeIds: number[];
    formulas: {
        sku?: string;
    };
}
