/** * This file is part of the NocoBase (R) project. * Copyright (c) 2020-2024 NocoBase Co., Ltd. * Authors: NocoBase Team. * * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. * For more information, please refer to: https://www.nocobase.com/agreement. */ import type { FlowSurfaceErrorItemInput } from './errors'; export type FlowSurfaceAuthoringWriteAction = 'applyBlueprint' | 'compose' | 'addBlock' | 'addBlocks' | 'configure'; export interface FlowSurfaceAuthoringValidationContext { authoringActionName?: FlowSurfaceAuthoringWriteAction; applyBlueprintScriptAssets?: Record; getCollection?: (dataSourceKey: string, collectionName: string) => any; getDefaultFieldGroups?: (dataSourceKey: string, collectionName: string) => any; findMenuGroupRoutesByTitle?: (title: string, transaction?: any, layoutUid?: string | string[], portalUid?: string) => Promise; getUiLayoutTypeByUid?: (layoutUid: string, transaction?: any) => Promise; getPortalLayoutTypeByUid?: (portalUid: string, transaction?: any) => Promise; transaction?: any; hostBlockType?: string; hostCollectionName?: string; hostDataSourceKey?: string; currentCollectionName?: string; currentDataSourceKey?: string; isPopupSurface?: boolean; popupScene?: string; popupHasCurrentRecord?: boolean; enabledPackages?: ReadonlySet; currentNode?: any; skipGeneratedPopupDefaultFieldGroups?: boolean; skipGeneratedLayoutSingleColumnErrors?: boolean; findModelById?: (uid: string, options?: { transaction?: any; includeAsyncNode?: boolean; }) => Promise; findOwningBlockGrid?: (uid: string, transaction?: any) => Promise; } export declare function assertFlowSurfaceAuthoringPayload(actionName: FlowSurfaceAuthoringWriteAction, values: any, context?: FlowSurfaceAuthoringValidationContext): Promise; export declare function collectFlowSurfaceAuthoringErrors(actionName: FlowSurfaceAuthoringWriteAction, values: any, context?: FlowSurfaceAuthoringValidationContext): Promise;