import { AppContext, UserPayload } from '../types.js';
import { BaseEntity, CompositeKey, Metadata, UserInfo } from '@memberjunction/core';
import { CompositeKeyInputType, CompositeKeyOutputType } from '../generic/KeyInputOutputTypes.js';
export declare enum SyncDataActionType {
    Create = "Create",
    Update = "Update",
    CreateOrUpdate = "CreateOrUpdate",
    Delete = "Delete",
    DeleteWithFilter = "DeleteWithFilter"
}
export declare class ActionItemInputType {
    EntityName: string;
    PrimaryKey?: CompositeKeyInputType;
    AlternateKey?: CompositeKeyInputType;
    Type: SyncDataActionType;
    RecordJSON?: string;
    DeleteFilter?: string;
}
export declare class ActionItemOutputType {
    Success: boolean;
    ErrorMessage: string;
    EntityName: string;
    PrimaryKey?: CompositeKeyOutputType;
    AlternateKey?: CompositeKeyOutputType;
    Type: SyncDataActionType;
    RecordJSON?: string;
    DeleteFilter?: string;
}
export declare class SyncDataResultType {
    Success: boolean;
    Results: ActionItemOutputType[];
}
export declare class SyncDataResolver {
    SyncData(items: ActionItemInputType[], context: AppContext): Promise<{
        Success: boolean;
        Results: ActionItemOutputType[];
    }>;
    protected GetLowercaseMetadataEntitiesList(user: UserInfo, forceRefresh?: boolean): Promise<string[]>;
    protected DoSyncItemsAffectMetadata(user: UserInfo, items: ActionItemInputType[]): Promise<boolean>;
    protected SyncSingleItem(item: ActionItemInputType, context: AppContext, md: Metadata, userPayload: UserPayload): Promise<ActionItemOutputType>;
    protected SyncSingleItemDeleteWithFilter(entityName: string, filter: string, result: ActionItemOutputType, user: UserInfo, userPayload: UserPayload): Promise<void>;
    protected LoadFromAlternateKey(entityName: string, alternateKey: CompositeKey, user: UserInfo): Promise<BaseEntity>;
    protected SyncSingleItemCreateOrUpdate(entityObject: BaseEntity, pk: CompositeKey, ak: CompositeKey, fieldValues: any, result: ActionItemOutputType, userPayload: UserPayload): Promise<void>;
    protected SyncSingleItemDelete(entityObject: BaseEntity, pk: CompositeKey, ak: CompositeKey, result: ActionItemOutputType, userPayload: UserPayload): Promise<void>;
    protected SyncSingleItemCreate(entityObject: BaseEntity, fieldValues: any, result: ActionItemOutputType, userPayload: UserPayload): Promise<void>;
    protected SyncSingleItemUpdate(entityObject: BaseEntity, pk: CompositeKey, ak: CompositeKey, fieldValues: any, result: ActionItemOutputType, userPayload: UserPayload): Promise<void>;
    protected InnerSyncSingleItemUpdate(entityObject: BaseEntity, fieldValues: any, result: ActionItemOutputType, userPayload: UserPayload): Promise<void>;
}
//# sourceMappingURL=SyncDataResolver.d.ts.map