import { GenericCrudResult, CrudResult } from "../../../../fd-toolbox/types/crud/crud-result";
import { ResourceMeta } from "../../core/resource-meta";
import { CrudDeleteConfig } from "../meta-core/crud/crud-delete-config";
import { WithId } from "../../../../fd-toolbox-core/types/resource-with-id";
import { WithIdAndOptionalUserId } from "../../../../fd-toolbox/base-resource/with-optional-user-id-and-id";
import { PropertyRelationSyncInfo } from "../../crud/property-relation-sync-info";
import { CrudUpdateConfig, ResourceForUpdate } from "../meta-core/crud/crud-update-config";
/**
 * Creates a new resource using the given configuration.
 *
 * @template T - The type of the resource
 * @param crudUpdateConfig - Configuration object for creating the resource
 */
export declare function crudCreate<T extends ResourceForUpdate>(crudUpdateConfig: CrudUpdateConfig<T>): Promise<GenericCrudResult<T>>;
/**
 * Create or update resource. Automatically validates the resource and runs {@link runPreUpdateHandler}
 * and {@link runAfterUpdateCrudHandler} handlers
 *
 * @template T - The type of the resource
 * @param crudUpdateConfigProp - Configuration object containing update parameters.
 *
 * @returns A promise resolving to {@link GenericCrudResult<T>}.
 */
export declare function crudUpdate<T extends ResourceForUpdate>(crudUpdateConfigProp: CrudUpdateConfig<T>): Promise<GenericCrudResult<T>>;
export declare function validateAndUpdateResource(crudUpdateConfig: CrudUpdateConfig<WithId>, resourceMeta: ResourceMeta, crudServiceResult: GenericCrudResult<WithId>, modifiedResource: WithId, originalResource?: WithId): Promise<void>;
export declare function checkIsResourceExistsInDb(crudUpdateConfig: CrudUpdateConfig<WithId>, resourceMeta: ResourceMeta): Promise<void>;
export declare function updateValidResource(modifiedResource: WithId, crudUpdateConfig: CrudUpdateConfig<WithId>, crudServiceResult: GenericCrudResult<WithId>, resourceMeta: ResourceMeta, originalResource?: WithId): Promise<void>;
export declare function syncRelationsIfNeeded(resourceMeta: ResourceMeta, resource: WithId, crudServiceResult: GenericCrudResult<WithId>, propertyRelationSyncInfos: PropertyRelationSyncInfo[]): Promise<void>;
export declare function logWarningIfValidationResultFalse(crudServiceResult: GenericCrudResult<WithId>, resourceName: string, crudUpdateConfig: CrudUpdateConfig<WithId>): void;
/**
 * Delete resource. Automatically validates the resource and runs {@link PreDeleteCrudHandler}
 * and {@link AfterDeleteCrudHandler} handlers.
 *
 * @param crudDeleteConfig - Configuration object containing delete parameters.
 *
 * @returns A promise resolving to {@link GenericCrudResult<WithId>}.
 */
export declare function crudDelete(crudDeleteConfig: CrudDeleteConfig): Promise<CrudResult>;
export declare function trySetUserIdOnConfig(crudUpdateConfig: CrudUpdateConfig<WithIdAndOptionalUserId>): Promise<void>;
export declare function trySetUserIdOnDeleteConfig(crudDeleteConfig: CrudDeleteConfig): Promise<void>;
