/** * 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 { Plugin } from '@nocobase/server'; import _ from 'lodash'; import FlowModelRepository from '../repository'; import type { FlowSurfaceApplyBlueprintDocument } from './blueprint'; import { SurfaceLocator } from './locator'; import { type FlowSurfaceEventFlowRegistry } from './event-flow-normalizer'; import type { TemplateTranslate } from './template-display'; import type { FlowSurfaceActionLinkageRule, FlowSurfaceBlockLinkageRule, FlowSurfaceFieldLinkageRule, FlowSurfaceFieldValueRule, FlowSurfaceGetReactionMetaResult, FlowSurfaceGetReactionMetaValues, FlowSurfaceReactionWriteResult, FlowSurfaceReactionWriteValues } from './reaction/types'; import type { FlowSurfaceTemplateListPopupActionContext, FlowSurfaceTemplateListValues, FlowSurfaceTemplateRow } from './template-service-utils'; import type { FlowSurfaceApplyValues, FlowSurfaceActionScope, FlowSurfaceCatalogResponse, FlowSurfaceCatalogValues, FlowSurfaceComposeValues, FlowSurfaceConfigureValues, FlowSurfaceContextValues, FlowSurfaceDescribeValues, FlowSurfaceMutateValues } from './types'; import type { FlowSurfaceContextResponse, FlowSurfaceContextVarInfo } from './types'; type FlowSurfacePopupTemplateAliasSession = Map; type FlowSurfaceRequestRoles = readonly string[] | string; type FlowSurfaceReadOptions = { transaction?: any; currentRoles?: FlowSurfaceRequestRoles; }; type FlowSurfaceAddFieldResult = { uid?: string; parentUid?: string; subKey?: string; fieldUse?: string; type?: string; renderer?: string; defaultTargetUid?: string; associationPathName?: string; fieldPath?: string; wrapperUid?: string; fieldUid?: string; innerFieldUid?: string; popupPageUid?: string; popupTabUid?: string; popupGridUid?: string; }; type FlowSurfacePopupTemplateTreeCache = Map | any | null>; type FlowSurfaceApplyBlueprintResponse = { version: '1'; mode: FlowSurfaceApplyBlueprintDocument['mode']; target: Record; surface: any; }; export declare class FlowSurfacesService { private readonly plugin; constructor(plugin: Plugin); get db(): import("@nocobase/database").default; get repository(): FlowModelRepository; get locator(): SurfaceLocator; private get routeSync(); private get navigationTargets(); private getFlowTemplateRepository; private getFlowTemplateRepositorySafe; private getFlowTemplateUsageRepository; private getFlowTemplateUsageModel; private getFlowTemplateUsageRepositorySafe; private get contractGuard(); private get surfaceContext(); private get approvalRuntimeConfigService(); private get approvalBlueprintService(); private get hiddenPopupRuntime(); private normalizeFlowSurfaceModelOptionsPatch; private patchFlowSurfaceModelOptions; private setFlowModelNodeAsyncFlag; private loadEnabledPluginPackages; private resolveEnabledPluginPackages; private allocateRouteSortValue; private readRouteField; private readRouteOptions; private findMenuRouteById; private findMenuGroupRoutesByTitle; private routeParentIdMatches; private findMenuGroupRoutesByParentIdAndTitle; private findFlowPageRoutesByParentIdAndTitle; private assertMenuParentIsGroup; private assertMenuRouteBindable; private assertMenuRouteUpdatable; private assertMenuParentNotSelfOrDescendant; private buildMenuResult; private hasDesktopRouteUiLayoutsRelation; private normalizeDesktopRouteRelationId; private readDesktopRouteUiLayoutUids; private resolveDefaultDesktopRouteUiLayoutUids; private findDesktopRouteUiLayoutByUid; private getDesktopRouteUiLayoutTypeByUid; private isMobileDesktopRouteUiLayoutUid; private resolveInheritedDesktopRouteUiLayoutUids; private normalizeExplicitDesktopRouteLayoutUid; private normalizeDesktopRouteLayoutUidFilter; private resolveDesktopRouteLayoutUidFilter; private assertNavigationTargetIsExclusive; private readDesktopRouteScope; private resolveRequestedDesktopRouteScope; private resolveExistingDesktopRouteScope; private attachDesktopRouteScopeToRouteAndChildren; private assertEnabledDesktopRouteUiLayoutUid; private assertDesktopRouteBelongsToUiLayout; private setDesktopRouteUiLayouts; private attachDesktopRouteUiLayoutsToRouteAndChildren; private ensureDesktopRouteUiLayouts; private isValidMenuIconName; private assertVisibleNavigationIcon; private assertVisibleNavigationRouteIconUpdate; private createFlowMenuGroup; private createFlowMenuItem; private sanitizePublicCreateMenuValues; private loadRouteBackedPageStructure; private isBindableMenuRoutePendingInitialization; private isRouteBackedPageInitialized; private filterCatalogActionsForExistingApprovalSingletons; catalog(input: FlowSurfaceCatalogValues, options?: { transaction?: any; enabledPackages?: ReadonlySet; }): Promise; private analyzeCatalogTarget; private projectCatalogNode; private patchResolvedNodeConfigureOptions; private buildRelationFieldTypeCandidates; private collectRelationNestedFieldPaths; private collectRelationFieldPaths; private collectRelationSelectorFieldPaths; private projectCatalogItem; private buildCatalogBlockItem; private isCollectionBlockUse; private isPopupFieldHostUse; private formatPopupSupportedBindings; private isCatalogBlockVisibleForPopupProfile; private getPopupCollectionBlockScenes; private isPopupCollectionBlockSceneUnsupported; private supportsPopupAssociatedRecordsBinding; private isPopupCollectionBlockVisibleForScene; private resolveFieldAssociationContextFromBinding; private resolvePopupHostFieldAssociationContext; private normalizePopupScene; private resolvePopupScene; private resolvePopupHostProfileContext; private popupHostUsesDefaultRecordContext; private buildPopupBlockResourceBindings; private listPopupAssociatedRecordFields; private resolvePopupBlockProfile; private buildAuthoringContextFromPopupProfile; private buildTargetAuthoringContext; private resolvePopupCurrentRecordResourceFilterByTk; private resolveLocalActionPopupOpenViewFilterByTk; private resolvePopupAssociationFields; private findPopupHostNode; private getBlockKeyByUse; private describePopupKind; private normalizeResourceInput; private assertRequiredBlockResourceInit; private describeComposeBlock; private resolvePopupCollectionBlockResourceInit; private shouldUseLegacyAssociationPopupCurrentRecordBinding; private shouldNormalizeLegacyAssociationPopupRecordBlockResource; private compilePopupSemanticResourceInit; private assertPopupRawResourceInit; private validatePopupRawResourceInit; private getCollectionFilterTargetKey; private normalizeFlowContextTemplateValue; private isSameConfiguredFlowContextValue; private isPopupCurrentRecordFilterByTkMatch; private isPopupAssociatedRecordsSourceIdMatch; private classifyPopupRawResourceInit; private resolvePopupAssociationField; private buildAssociatedRecordsResourceInit; context(values: FlowSurfaceContextValues, options?: { transaction?: any; }): Promise; private extractReactionCanonicalRules; private buildReactionFieldPathMaps; private extractReactionFieldPaths; private requireReactionFieldUid; private buildReactionRuleNormalizers; private buildReactionFingerprintForSlot; private assertReactionFingerprint; private resolveReactionRequest; private persistReactionSlot; private buildLinkageWriteResult; private getLiveLinkageCapability; private getLiveFieldValueCapability; getReactionMeta(values: FlowSurfaceGetReactionMetaValues, options?: { transaction?: any; }): Promise; setFieldValueRules(values: FlowSurfaceReactionWriteValues, options?: { transaction?: any; }): Promise; setBlockLinkageRules(values: FlowSurfaceReactionWriteValues, options?: { transaction?: any; }): Promise>; setFieldLinkageRules(values: FlowSurfaceReactionWriteValues, options?: { transaction?: any; }): Promise>; setActionLinkageRules(values: FlowSurfaceReactionWriteValues, options?: { transaction?: any; }): Promise>; private buildStableFingerprintString; private buildSurfaceFingerprint; private getDeclaredKeyFromNode; private stripInternalSurfaceMetaFromNodeTree; private buildSurfaceReadPayload; private buildSurfaceContextFingerprint; get(input: Record, options?: FlowSurfaceReadOptions): Promise>; exportBlueprint(input: Record, options?: FlowSurfaceReadOptions): Promise<{ document: FlowSurfaceApplyBlueprintDocument; source: { target: { pageSchemaUid: string; }; pageTitle?: string; }; warnings: string[]; unsupported: import("./blueprint/export-document").FlowSurfaceExportBlueprintUnsupportedItem[]; }>; private getDeclaredKeyPersistenceDeps; private patchDeclaredKeyModel; private persistCreatedKeysForAction; private buildPlanningRuntimeDeps; describeSurface(values: FlowSurfaceDescribeValues, options?: { transaction?: any; }): Promise; private dispatchPlanOnlyAction; private resolveApplyBlueprintReplaceTargetInfo; private resolveApplyBlueprintCreateNavigationGroup; private normalizeApplyBlueprintCreateMobileNavigation; private assertApplyBlueprintCreateNavigationTarget; private resolveApplyBlueprintCreatePageIdentity; private prepareApplyBlueprintRequest; private prevalidateApplyBlueprintChartAssets; private composeChartBlockHasInlineConfig; private prepareComposeChartAssetNestedPopupBlocks; private prepareComposeChartAssetBlockList; private prepareComposeChartAssetSettings; private getApplyBlueprintKanbanBlockResourceObject; private normalizeApplyBlueprintKanbanResourceText; private getApplyBlueprintKanbanBlockBinding; private getApplyBlueprintKanbanBlockDataSourceKey; private getApplyBlueprintKanbanBlockDirectCollectionName; private getApplyBlueprintKanbanFieldPopupAssociationPath; private getApplyBlueprintKanbanBlockAssociationField; private resolveApplyBlueprintKanbanAssociationFieldFromPath; private resolveApplyBlueprintKanbanAssociationResourceContext; private resolveApplyBlueprintKanbanBlockResourceContext; private resolveApplyBlueprintKanbanFieldPopupResourceContext; private getApplyBlueprintKanbanSortFieldName; private createApplyBlueprintKanbanSortField; private prepareApplyBlueprintKanbanBlocks; private prepareApplyBlueprintKanbanBlockList; private prepareApplyBlueprintKanbanPopupBlocks; private prepareApplyBlueprintKanbanBlockTree; private canCreateApplyBlueprintKanbanSortField; private prepareApplyBlueprintKanbanBlock; private cleanupApplyBlueprintKanbanSortFields; private bindTransactionRollbackEmitter; applyBlueprint(values: Record, options?: { transaction?: any; currentRoles?: FlowSurfaceRequestRoles; }): Promise; private applyBlueprintMutationWithoutExternalTransaction; private assertApplyBlueprintAuthoringPayload; private applyBlueprintWithTransaction; private buildApplyBlueprintResponse; private findApprovalSurfaceRootForNode; private syncApprovalRuntimeConfigForSurfaceRoot; private syncApprovalRuntimeConfigForNode; private assertApprovalActionSingleton; applyApprovalBlueprint(values: Record, options?: { transaction?: any; }): Promise<{ version: string; mode: "replace"; surfaceType: "initiator" | "approver" | "taskCard"; target: _.Dictionary; binding: { resourceName: "workflows" | "flow_nodes"; filterByTk: string | number; configPath: string; }; surface: any; }>; private resolveTemplateResourceInfo; private resolveBlockTemplateExpectedResourceInfo; private getTemplateResourceCompatibilityDisabledReason; private getPopupTemplateAssociationMatchMode; private getPopupTryTemplateResourceDisabledReason; private getFieldsTemplateDisabledReason; private assertFieldsTemplateCompatibility; private loadTemplateListTargetContext; private inferTemplateListCurrentRecordCapability; private normalizeOptionalTemplateListActionType; private normalizeOptionalTemplateListActionScope; private assertTemplateListPopupActionScopeSupported; private resolveTemplateListPopupActionItem; private resolveTemplateListPopupActionContext; private getBlockTemplateDisabledReason; private assertBlockTemplateCompatibility; private getPopupTryTemplateDisabledReason; private withPopupTryTemplateAvailability; private getPopupTemplateDisabledReason; private getTemplateListDisabledReason; private withTemplateAvailability; private assertPopupTemplateCompatibility; private normalizeOptionalFlowTemplateType; private withFlowTemplateUsageCounts; listTemplates(values?: FlowSurfaceTemplateListValues, options?: { transaction?: any; t?: TemplateTranslate; }): Promise<{ rows: FlowSurfaceTemplateRow[]; count: number; page: number; pageSize: number; totalPage: number; }>; getTemplate(values: Record, options?: { transaction?: any; t?: TemplateTranslate; }): Promise; private inferSaveTemplateTarget; private createFlowTemplateReferenceBlockModel; private buildPopupTemplateReferenceOpenView; private shouldHydrateDetachedPopupTemplateBlockResourceContext; private resolveDetachedPopupTemplateBlockCurrentRecordFilterByTk; private collectDetachedPopupTemplateBlockResourceContextPatches; private hydrateDetachedPopupTemplateBlockResourceContext; private hydrateDetachedPopupTemplateSourceContext; private clearFlowTemplateUsagesByModelUids; private clearFlowTemplateUsagesForNodeTree; private syncFlowTemplateUsagesForNodeTree; private syncFlowTemplateUsagesForNodeTreeExcluding; private clearFlowTemplateUsagesForNodeTreeTemplate; private clearFlowTemplateUsagesForRouteSchemaUid; private syncTemplateMetaToReferencedModels; private resolveFlowModelAttachPosition; private repositionFlowModelInParent; private convertBlockSourceToTemplateReference; private convertPopupSourceToTemplateReference; private loadPopupSourceTemplateTreeInfo; private tryReuseExistingPopupTemplateForSave; saveTemplate(values: Record, options?: { transaction?: any; popupTemplateTreeCache?: FlowSurfacePopupTemplateTreeCache; reuseExistingPopupTemplate?: boolean; }): Promise; updateTemplate(values: Record, options?: { transaction?: any; }): Promise; destroyTemplate(values: Record, options?: { transaction?: any; }): Promise<{ uid: string; }>; private resolveTemplateCopySource; private duplicateDetachedFlowModelTree; private cloneFlowModelTree; convertTemplateToCopy(values: Record, options?: { transaction?: any; }): Promise<{ uid: any; type: string; popupUid: string; } | { gridUid: string; uid: string; type: string; popupUid?: undefined; } | { uid: any; type: string; popupUid?: undefined; }>; private buildPopupSurfaceSummaryFromHost; private decorateTemplateReadbackTree; compose(values: FlowSurfaceComposeValues, options?: { transaction?: any; currentRoles?: FlowSurfaceRequestRoles; enabledPackages?: ReadonlySet; popupTemplateAliasSession?: FlowSurfacePopupTemplateAliasSession; popupTemplateTreeCache?: FlowSurfacePopupTemplateTreeCache; skipGeneratedLayoutSingleColumnErrors?: boolean; }): Promise; configure(values: FlowSurfaceConfigureValues, options?: { transaction?: any; currentRoles?: FlowSurfaceRequestRoles; popupTemplateTreeCache?: FlowSurfacePopupTemplateTreeCache; skipConfigureGeneratedDefaultPopup?: boolean; }): Promise<_.Dictionary | { uid: any; updated?: undefined; } | { uid: any; updated: string[]; }>; listNavigationTargets(_values?: Record, options?: { transaction?: any; currentRoles?: FlowSurfaceRequestRoles; }): Promise; createMenu(values: Record, options?: { transaction?: any; currentRoles?: FlowSurfaceRequestRoles; }): Promise<{ routeId: any; type: any; parentMenuRouteId: any; }>; updateMenu(values: Record, options?: { transaction?: any; currentRoles?: FlowSurfaceRequestRoles; }): Promise<{ routeId: any; type: any; parentMenuRouteId: any; }>; private initializeFlowPageForRoute; createPage(values: Record, options?: { transaction?: any; currentRoles?: FlowSurfaceRequestRoles; }): Promise; destroyPage(values: Record, options?: { transaction?: any; }): Promise<{ uid: string; }>; addTab(values: Record, options?: { transaction?: any; }): Promise<{ pageUid: string; tabSchemaUid: any; tabRouteId: any; tabSchemaName: any; gridUid: any; }>; updateTab(values: Record, options?: { transaction?: any; }): Promise<{ uid: string; routeId: any; title: any; icon: any; }>; moveTab(values: Record, options?: { transaction?: any; }): Promise<{ sourceUid: string; targetUid: string; position: string; }>; removeTab(values: Record, options?: { transaction?: any; }): Promise<{ uid: string; }>; addPopupTab(values: Record, options?: { transaction?: any; }): Promise<{ popupPageUid: any; popupTabUid: string; popupGridUid: string; }>; updatePopupTab(values: Record, options?: { transaction?: any; }): Promise<_.Dictionary>; movePopupTab(values: Record, options?: { transaction?: any; }): Promise<{ sourceUid: string; targetUid: string; position: string; }>; removePopupTab(values: Record, options?: { transaction?: any; }): Promise<{ uid: any; }>; private buildFlowTemplateReferenceBlockTree; private patchCopiedTemplateGridFromRoot; private buildBlockCreateResult; private appendAddedBlockLayout; private applyTemplateFieldsToBlock; private addBlockFromFieldsTemplate; private addBlockFromTemplate; private addFieldFromTemplate; private normalizeDefaultActionSettings; private normalizeDefaultFilterActionSettings; private backfillBlockDefaultFilterIntoDefaultActionSettings; private normalizeEffectivePublicDataSurfaceDefaultFilter; private getDefaultFilterCollectionFromResourceInput; private getFieldGridCollectionFromResourceInput; private getDefaultFilterRequiredFieldCountFromResourceInput; private buildDefaultFilterFromResourceInput; private buildDefaultFilterFromDataBlockUid; addBlock(values: Record, options?: { transaction?: any; deferAutoLayout?: boolean; enabledPackages?: ReadonlySet; skipDefaultBlockActions?: boolean; preserveSingleScopeDataBlockTitle?: boolean; skipAuthoringValidation?: boolean; explicitFields?: boolean; popupTemplateTreeCache?: FlowSurfacePopupTemplateTreeCache; }): any; addField(values: Record, options?: { transaction?: any; enabledPackages?: ReadonlySet; popupTemplateAliasSession?: FlowSurfacePopupTemplateAliasSession; popupTemplateTreeCache?: FlowSurfacePopupTemplateTreeCache; }): Promise; addAction(values: Record, options?: { transaction?: any; currentRoles?: FlowSurfaceRequestRoles; enabledPackages?: ReadonlySet; autoCompleteDefaultPopup?: boolean; popupTemplateAliasSession?: FlowSurfacePopupTemplateAliasSession; popupTemplateTreeCache?: FlowSurfacePopupTemplateTreeCache; }): Promise<{ uid: any; parentUid: any; subKey: string; scope: FlowSurfaceActionScope; }>; addRecordAction(values: Record, options?: { transaction?: any; currentRoles?: FlowSurfaceRequestRoles; enabledPackages?: ReadonlySet; autoCompleteDefaultPopup?: boolean; popupTemplateAliasSession?: FlowSurfacePopupTemplateAliasSession; popupTemplateTreeCache?: FlowSurfacePopupTemplateTreeCache; }): Promise<{ uid: any; parentUid: any; subKey: string; scope: FlowSurfaceActionScope; }>; addBlocks(values: Record): Promise<{ [x: string]: number | Record[]; successCount: number; errorCount: number; }>; addFields(values: Record): Promise<{ [x: string]: number | Record[]; successCount: number; errorCount: number; }>; addActions(values: Record, options?: { currentRoles?: FlowSurfaceRequestRoles; }): Promise<{ [x: string]: number | Record[]; successCount: number; errorCount: number; }>; addRecordActions(values: Record, options?: { currentRoles?: FlowSurfaceRequestRoles; }): Promise<{ [x: string]: number | Record[]; successCount: number; errorCount: number; }>; private createPopupTemplateAliasSession; private normalizePopupTemplateAliasName; private readInlinePopupTemplateLocalAlias; private readInlinePopupSaveAsTemplateLocalAlias; private assertInlinePopupTemplateAliasesSupported; private assertInlinePopupTemplateAliasesSupportedInBlocks; private prepareInlinePopupTemplateAliases; private registerInlinePopupTemplateAlias; private validatePopupTemplateAliasesInBlocks; private validatePopupTemplateAliasesForItemPopup; private validateComposePopupTemplateAliases; private validateApplyBlueprintPopupTemplateAliases; private normalizeInlineSettings; private normalizeSingleScopeDataBlockTitleSettings; private shouldEnableCreatedAtDefaultSorting; private normalizeBlockSortingInput; private normalizeMapSortingInput; private normalizeInlinePopup; private getInlinePopupComposeMode; private getInlinePopupDisplayOpenView; private normalizeInlinePopupOpenViewContext; private getInlinePopupRelationOpenViewContext; private mergePopupRelationOpenViewContext; private getRelationOpenViewContextFromOpenView; private applyInlinePopupContextToTargetContext; private mergeInlinePopupDisplayOpenView; private buildPopupDefaultsMetadata; private buildDefaultsFromPopupMetadata; private stripPopupDefaultsMetadata; private attachPopupDefaultsMetadata; private isGeneratedDefaultPopupActionType; private attachComposeActionPopupDefaults; private attachComposeFieldPopupDefaults; private attachHiddenPopupDefaultsToBlockSettings; private stripHiddenPopupDefaultsFromBlockSettings; private buildConfigureGeneratedDefaultPopup; private normalizePopupSaveAsTemplate; private hasInlinePopupSaveAsTemplateSource; private assertInlinePopupSaveAsTemplateSource; private clearPopupSurfaceKeys; private buildLegacyAutoGeneratedPopupTemplateMetadata; private getUsableExplicitTitle; private getExplicitCollectionTitle; private getExplicitFieldTitle; private getMainCollectionForTemplateMetadata; private resolveCompiledCollectionTemplateLabel; private resolveCompiledFieldTemplateLabel; private formatAutoGeneratedPopupTemplateMetadata; private formatAutoGeneratedActionPopupTemplateMetadata; private resolveFieldBindingContext; private resolveAutoGeneratedFieldPopupTemplateMetadata; private shouldAutoSaveDefaultActionPopupTemplate; private shouldAutoSaveDefaultFieldPopupTemplate; private resolveDefaultActionPopupSemanticUse; private getDefaultActionPopupConfigForNode; private isDefaultActionPopupUseForNode; private shouldImplicitlyTemplateDefaultActionPopup; private buildImplicitTemplateDefaultActionPopup; private resolveAutoGeneratedActionPopupTemplateMetadata; private savePopupAsTemplate; private normalizeOptionalPopupTitle; private resolveDefaultActionPopupTemplateOpenViewTitle; private buildInlinePopupTemplateOpenView; private peekInlineFieldSettingsOpenView; private isInlineFieldClickToOpenEnabled; private assertOpenViewUidTarget; private normalizeFlowTemplateMode; private normalizeFlowTemplateUsage; private normalizeFlowTemplateReference; private normalizeOptionalPopupTryTemplate; private normalizePopupDefaultType; private getDefaultFlowTemplateSort; private getPopupTryTemplateExpectedAssociationName; private getPopupTryTemplatePriority; private shouldAllowGenericPopupTryTemplateAssociation; private hasNestedInlinePopupContent; private shouldRequirePopupTryTemplateExplicitNameMatch; private doesPopupTemplateMatchRequestedSaveAsTemplate; private getExpectedBlueprintAssociationDefaultPopupTemplateName; private getPopupMetadataProfileFromTargetContext; private getPopupMetadataProfileFromResourceInit; private getRequestedPopupDefaultType; private getPopupTryTemplateAllowedDefaultTypes; private inferPopupDefaultTypeFromTemplateTree; private resolvePopupTemplateTreePage; private getPopupTemplateTreeBlocks; private loadPopupTemplateTree; private normalizePopupTemplateSignatureValue; private buildPopupTemplateTreeSemanticSignature; private readPopupTemplateTreeInfo; private loadPopupTemplateTreeInfo; private resolvePopupBlockTypeUse; private getRequestedPopupBlockUseList; private getPopupTemplateRequestedBlockUsePriority; private selectPopupTemplateForTargetContext; private tryResolvePopupTemplateForTargetContext; private tryResolvePopupTemplateForHost; private tryResolveExistingDefaultActionPopupTemplate; private getFlowTemplateOrThrow; private shouldUseRuntimeRecordFilterByTkForOpenView; private resolveOpenViewFilterTargetKey; private resolvePopupHostCurrentRecordFilterTargetKey; private resolveOpenViewRuntimeRecordFilterTargetKey; private shouldOmitRuntimeRecordFilterByTk; private buildPopupTemplateOpenView; private isReferencedPopupTemplateOpenView; private isPopupTemplateReferenceOpenViewState; private isEditableDefaultActionPopupTemplateReference; private resolveExternalPopupHostUid; private resolveDetachedPopupCopyUid; private cleanupLocalPopupSurfaceForHost; private reconcilePopupOpenViewTransition; private normalizeOpenView; private isTryTemplateOnlyOpenViewRequest; private resolveRecordContextPopupActionContextForHost; private unsetPayloadPathAndPruneEmptyParents; private isExternalPopupOpenView; private loadFieldHostNodes; private resolveFieldOpenViewContext; private applyFieldOpenViewContext; private buildDefaultFieldOpenView; private applyInlineFieldPopupDisplayOpenView; private applyInlineActionPopupDisplayOpenView; private ensureLocalFieldPopupSurface; private applyInlineNodeSettings; private resolveComposeBlockSettings; private resolveComposeActionSettings; private applyInlineFieldPopup; private applyInlineFieldSettings; private applyInlineStandaloneFieldSettings; private getActionButtonTitle; private isSemanticallyEmptyInlinePopup; private isEmptyInlinePopupPayload; private isInlineFieldPopupDefaultShell; private shouldAutoCompleteDefaultFieldPopup; private isInlineFieldPopupBlockMissingResource; private buildRelationFieldPopupCurrentRecordResource; private materializeInlineRelationFieldPopupBlocks; private getApplyBlueprintPopupDefaultsMetadata; private getApplyBlueprintDefaultFieldGroups; private getApplyBlueprintDefaultFormBehavior; private getDefaultFormBehaviorFieldSettings; private getDefaultPopupFieldPath; private applyDefaultFormBehaviorToField; private applyDefaultFormBehaviorToFields; private pickDefaultPopupFields; private getDefaultFieldGroupRelationTitleFieldOverride; private hasUsableDefaultFieldGroupRelationTitleFieldOverride; private resolveApplyBlueprintDefaultPopupMetadata; private resolveApplyBlueprintAssociationDefaultContext; private resolveGeneratedDefaultFieldPopupName; private resolveGeneratedDefaultFieldPopupMetadata; private buildDefaultFieldPopupFields; private buildDefaultFieldPopupBlocks; private syncDefaultFieldPopupOpenViewTitle; private autoSaveDefaultFieldPopupAsTemplate; private autoSaveDefaultActionPopupAsTemplate; private shouldAutoCompleteDefaultActionPopup; private resolveGeneratedDefaultActionPopupName; private resolveGeneratedDefaultActionPopupMetadata; private resolveGeneratedAssociationDefaultActionPopupMetadata; private buildDefaultActionPopupFields; private buildDefaultActionPopupNamespace; private buildDefaultActionPopupKeyMap; private remapDefaultActionPopupField; private remapDefaultActionPopupBlocks; private decorateDefaultActionPopupAssociationField; private decorateDefaultActionPopupAssociationFieldObject; private decorateDefaultActionPopupAssociationBlocks; private remapDefaultActionPopupLayout; private buildDefaultActionPopupBlocks; private buildDefaultActionPopupComposeValues; private resolveDefaultActionPopupSurfaceState; private resolveDefaultFieldPopupSurfaceState; private shouldResetDefaultActionPopupFormLinkageRules; private resetDefaultActionPopupFormLinkageRules; private extractDefaultPopupLinkageConditionPaths; private extractDefaultPopupLinkageActionFieldPaths; private isDefaultPopupFormBehaviorLinkageRuleApplicable; private filterDefaultPopupFormBehaviorLinkageRules; private applyDefaultPopupFormBehaviorLinkageRules; private resolvePopupTabTitle; private syncDefaultActionPopupTabTitle; private syncDefaultActionPopupTabTitleForHost; private syncDefaultActionPopupCopiedTemplateTabTitle; private syncDefaultActionPopupOpenViewTitle; private hydrateLocalActionPopupCurrentRecordContext; private applyDefaultActionPopupContent; private applyInlineActionPopup; updateSettings(values: Record, options?: { transaction?: any; currentRoles?: FlowSurfaceRequestRoles; replaceChartCardSettings?: boolean; replacePopupStepParamSubtrees?: boolean; openViewActionName?: string; popupTemplateHostUid?: string; popupActionContext?: FlowSurfaceTemplateListPopupActionContext; popupTemplateTreeCache?: FlowSurfacePopupTemplateTreeCache; skipHiddenPopupHostEnsure?: boolean; enabledPackages?: ReadonlySet; allowAIEmployeeInternalProps?: boolean; replaceRecordHistorySettings?: boolean; }): Promise<{ uid: any; updated?: undefined; } | { uid: any; updated: string[]; }>; private normalizeLegacyDataScopeFilterWrapperForUpdateSettings; private assertRecordHistoryRecordIdWriteAllowed; private syncCalendarPopupPropsForUpdateSettings; private replaceExplicitPopupStepParamSubtreesForUpdateSettings; private replaceRecordHistorySettingsForUpdateSettings; private normalizePopupStepParamReplacementForUpdateSettings; private stripPopupPropsFromPayload; private syncDefaultSortingForUpdateSettings; private syncKanbanPopupPropsForUpdateSettings; private syncFilterActionSettingsForUpdateSettings; private resolveFilterActionDefaultFilterRequiredFieldCount; private syncMirroredStepParamsForUpdateSettings; private syncActionButtonSettingsForUpdateSettings; private supportsActionButtonSettingsSync; private pickRequestedActionButtonSettings; private syncCreatedFieldWrapperTitleFieldStepParams; private syncUpdateActionAssignedValuesForUpdateSettings; private syncActionTriggerWorkflowsForUpdateSettings; private syncUpdateActionAssignFormItems; private ensureUpdateActionAssignForm; private ensureUpdateActionAssignFormGrid; private buildUpdateActionAssignFormItemTree; private resolveUpdateActionAssignFormFieldUse; private normalizeCanonicalBlockHeaderWriteForUpdateSettings; private syncCanonicalBlockHeaderForUpdateSettings; private stripLegacyBlockHeaderChromeForUpdateSettings; private normalizeOpenViewForUpdateSettings; private syncChartConfigureForUpdateSettings; private validateBuilderChartFieldsForUpdateSettings; private validateChartConfigureForUpdateSettings; private normalizeChartSelectionFieldPath; private validateBuilderChartFieldsForRuntime; private resolveBuilderChartAssociationSubfieldSuggestion; private validateChartConfigureForRuntime; private stripChartSqlForInspection; private normalizeReadOnlyChartSql; private buildChartSqlPreviewQuery; private buildChartSqlPreviewMetadataQuery; private runChartSqlPreviewRaw; private extractSqlChartPreviewAliases; private inferSqlChartOutputType; private mergeChartHintLists; private resolveSqlChartPreview; private syncChartCardRuntimeStepParamsForUpdateSettings; private stripLegacyChartCardChromeForUpdateSettings; getEventFlowMeta(values: Record, options?: { transaction?: any; }): Promise<{ target: { uid: string; kind: import("./types").FlowSurfaceContainerKind; use: any; }; flowRegistry: FlowSurfaceEventFlowRegistry; events: { direct: string[]; object: string[]; }; phases: { supported: string[]; defaultAdd: string; }; eventBindings: { [k: string]: { stepKeys: string[] | "*"; }; }; stepActions: { use: string; defaultParamsSchema: { type: string; properties: { code: { type: string; }; }; required: string[]; additionalProperties: boolean; }; }[]; vars: Record; fingerprint: string; writeCapabilities: { defaultAddPhase: string; fineGrainedActions: string[]; fullReplaceAction: string; }; }>; addEventFlow(values: Record, options?: { transaction?: any; }): Promise<{ flowRegistry: Record; fingerprint: string; flow?: any; uid: any; key: string; }>; setEventFlow(values: Record, options?: { transaction?: any; }): Promise<{ flowRegistry: Record; fingerprint: string; flow?: any; uid: any; key: string; }>; removeEventFlow(values: Record, options?: { transaction?: any; }): Promise<{ flowRegistry: Record; fingerprint: string; flow?: any; uid: any; key: string; }>; setEventFlows(values: Record, options?: { transaction?: any; }): Promise<{ uid: string; flowRegistry: any; fingerprint: string; }>; private resolveEventFlowTarget; private getEventFlowRegistry; private normalizeEventFlowRegistry; private buildEventFlowFingerprint; private assertEventFlowFingerprint; private normalizeEventFlowKey; private normalizeEventFlowPhase; private normalizeAddEventFlowPhase; private normalizeAddEventFlowInput; private normalizeEventFlowObject; private persistEventFlowRegistry; private buildEventFlowWriteResult; private buildFlowRegistryRunJsAuthoringContext; private assertFlowRegistryRunJsAuthoringPayload; private buildEventFlowBindingMeta; private buildEventFlowStepActionsMeta; setLayout(values: Record, options?: { transaction?: any; }): Promise<{ uid: any; rows: any; sizes: any; rowOrder: any; }>; moveNode(values: Record, options?: { transaction?: any; }): Promise<{ sourceUid: string; targetUid: string; position: string; }>; removeNode(values: Record, options?: { transaction?: any; }): Promise<{ uid: string; }>; mutate(values: FlowSurfaceMutateValues, options?: { transaction?: any; }): Promise<{ results: { opId?: string; result: any; }[]; clientKeyToUid: Record; }>; apply(values: FlowSurfaceApplyValues, options?: { transaction?: any; }): Promise<{ clientKeyToUid: { [x: string]: string; }; results: { opId?: string; result: any; }[]; }>; transaction(callback: (transaction: any) => Promise): Promise; private dispatchOp; private assertApplyMode; private assertComposeMode; private assertMutateAtomicFlag; private normalizeWriteTarget; private parseCalendarPopupActionTargetUid; private parseKanbanPopupActionTargetUid; private prepareWriteTarget; private normalizeRootUidValue; private assertRouteBackedPageUidTarget; private assertRouteBackedTabUidTarget; private assertPopupPageUidTarget; private assertPopupTabUidTarget; private normalizeRemoveNodeTarget; private assertRemoveNodeResolvedTarget; private normalizeGetTarget; private normalizeExportBlueprintRequest; private normalizeExportBlueprintUnsupportedPolicy; private normalizeExportBlueprintLocatorValue; private readRouteString; private resolveExportBlueprintPageSchemaUid; private assertExportBlueprintRootTarget; private normalizeContextPath; private normalizeContextMaxDepth; private buildReadTargetSummary; private tryResolveActionCatalogItem; private resolveAddActionCatalogItem; private resolveAddRecordActionCatalogItem; private resolveComposeBlockActionCatalogItem; private resolveComposeRecordActionCatalogItem; private isAddChildCatalogItem; private resolveTreeChildrenField; private resolveTreeChildrenAssociationName; private isTreeCollection; private isTreeTableEnabled; private resolveTreeTableCreationContext; private isTreeTableViewRecordAction; private isUnreadableTreeTableTitleFieldName; private isDirectTreeTableTitleFieldName; private isUsableTreeTableTitleField; private resolveTreeTableDirectField; private pushTreeTableTitleFieldNameCandidate; private resolveTreeTableTitleFieldNames; private isRecoverableTreeTableTitleFieldError; private getTableColumns; private findTableFieldColumn; private getTableActionsColumn; private buildTreeTableTitlePopup; private ensureTreeTableTitleFieldClickDefaults; private ensureTreeTableTitleFieldColumn; private getFirstUsableExistingTreeTableTitleColumn; private removeTreeTableViewRecordActions; private ensureTreeTableAddChildRecordAction; private reorderTreeTableTitleAndActionsColumns; private findPreviousComposeFieldResultForColumn; private buildComposeFieldResultFromTableColumn; private buildComposeRecordActionResultFromNode; private refreshComposeTreeTableBlockResult; private applyTreeTableCreatedBlockDefaults; private resolveAddChildOwnerNode; private resolveAddChildOwnerResourceContext; private resolveOwnerCollectionForAddChild; private resolveAddChildResourceInitForOwnerNode; private normalizeAddChildOpenViewForAction; private canUseAddChildOnOwnerNode; private assertAddChildSupportedForOwnerNode; private filterTargetRecordActions; private inspectRecordActionContainer; private materializeRecordActionContainer; private runBatchCreate; private buildInjectedComposeDefaultActionSpec; private backfillComposeActionPayloadDefaultFilter; private normalizeComposeFieldsLayout; private normalizeComposeFieldsLayoutCell; private buildAutoComposeFieldsLayout; private normalizeComposeFieldGroups; private applyDefaultActionsForCreatedBlock; private hasActionWithPublicType; private ensureTableDefaultActionIntegrity; private collectNodeTreeDescendants; private ensureSurfaceTableDefaultActionIntegrity; private resolveReusableSingletonAction; private normalizeComposeBlock; private normalizeComposeBlocks; private resolveComposeActionContainerUid; private resolveComposeFieldContainerUid; private resolveComposeRecordActionContainerUid; private validateComposeActionGroups; private buildComposeLayoutPayload; private buildAppendGridLayoutPayload; private readGridLayout; private isGridLayoutValid; private hasMaterialGridLayout; private appendRowsToLayout; private collectComposeActionKeys; private collectPopupSurfaceKeys; private removeNodeTreeWithBindings; private cleanupNodeBindings; private configurePage; private configureTab; private configureTableBlock; private configureCalendarBlock; private configureTreeBlock; private configureKanbanBlock; private configureFormBlock; private configureDetailsBlock; private configureFilterFormBlock; private configureListBlock; private configureGridCardBlock; private configureMarkdownBlock; private configureIframeBlock; private configureChartBlock; private stripBasicSqlVisualWhenPreviewUnavailable; private configureActionPanelBlock; private configureMapBlock; private normalizeBlockResourceForValidation; private isCommentTemplateCollection; private isCommentsAssociationField; private getRecordHistoryDeclaredFilterTargetKey; private collectionHasConcreteField; private assertInitialBlockResourceCompatible; private assertInitialBlockSettingsCompatible; private assertCommentsBlockResourceCompatible; private assertRecordHistoryBlockResourceCompatible; private normalizeRecordHistoryBlockCreateState; private normalizeConfigureCollectionBlockResource; private assertCommentsSettingValues; private assertRecordHistorySettingValues; private configureCommentsBlock; private configureRecordHistoryBlock; private configureJSBlock; private configureActionColumn; private configureJSColumn; private configureJSItem; private configureDividerItem; private configureFieldWrapper; private configureFieldNode; private normalizeFilterActionDefaultFilterValue; private normalizeActionAssignValues; private normalizeActionTriggerWorkflows; private isAIEmployeeActionUse; private stableSerializeAIEmployeeValue; private buildAIEmployeeActionDedupIdentity; private normalizeAIEmployeeWorkContextForDedupIdentity; private normalizeAIEmployeeActionWorkContextForDedupIdentity; private normalizeAIEmployeeDefaultActionWorkContextForSelfUid; private normalizeAIEmployeeTaskWorkContextForDedupIdentity; private normalizeAIEmployeeTasksForDedupIdentity; private assertNoDuplicateAIEmployeeAction; private assertNoDuplicateAIEmployeeActionForUpdateSettings; private hasAIEmployeePublicSettings; private assertOnlyAIEmployeePublicSettings; private aiEmployeeNestedRepairHint; private assertOnlyAIEmployeeNestedPublicSettings; private assertNoAIEmployeeInternalPropSettings; private readAIEmployeePersistedTasks; private normalizeAIEmployeeLegacyInheritedTaskWorkContext; private buildAIEmployeeTaskStepParams; private mergeAIEmployeeActionSettingsPayload; private syncAIEmployeeTaskStepParamsForUpdateSettings; private assertAIEmployeePluginEnabled; private readRecordPlainObject; private readRecordField; private normalizeFlowSurfaceRequestRoles; private assertRequestRolesCanUseAIEmployeeUsername; private assertVisibleAIEmployeeUsername; private normalizeAIEmployeeUsername; private assertAIEmployeeWorkContextType; private normalizeAIEmployeeWorkContext; private normalizeAIEmployeeEffectiveActionWorkContext; private normalizeAIEmployeeTaskModel; private normalizeAIEmployeeSkillSettings; private collectAIEmployeePromptVariables; private hasAIEmployeePromptVariables; private collectAIEmployeeContextPathEntries; private isAIEmployeeContextInfoPathAllowed; private canResolveAIEmployeeContextPath; private isAIEmployeeContextPathAllowed; private extractAIEmployeePromptContextPath; private buildAIEmployeePromptVariableHint; private throwAIEmployeePromptVariableInvalid; private assertAIEmployeePromptVariablesAllowed; private assertAIEmployeeTaskPromptVariablesAllowed; private appendAIEmployeeCurrentRecordPromptVariable; private resolveAIEmployeePromptActionTargetUid; private buildAIEmployeePromptValidationContext; private appendAIEmployeeCurrentRecordPromptVariableToTasks; private assertAIEmployeeStepParamTaskPromptVariablesAllowedForUpdateSettings; private normalizeAIEmployeeStepParamTasksForUpdateSettings; private normalizeAIEmployeeTaskMessage; private normalizeAIEmployeeTaskPatch; private normalizeAIEmployeeTasks; private withAIEmployeeTaskDefaultWorkContext; private shouldMaterializeAIEmployeeTaskDefaultWorkContext; private rebaseAIEmployeeInheritedTaskWorkContext; private normalizeAIEmployeeActionSettingsReferences; private normalizeAIEmployeeActionPublicSettings; private resolveAIEmployeeActionSelfUid; private resolveAIEmployeeActionSelfUidFromParentNode; private configureActionNode; private normalizeActionPanelActionChanges; private buildFieldCatalog; private getFieldMenuCatalogMode; private resolveRegisteredFieldBinding; private isCollectionTitleField; private resolveAssociationLeafDisplaySemantics; private buildFieldMenuDirectCandidates; private collectFieldMenuAssociationLeafCandidates; private buildFieldMenuCandidates; private findFieldMenuCandidate; private buildCatalogItemOptionalFields; private buildFieldCatalogEntriesForResource; private buildLegacyFieldCatalogEntriesForResource; private findOwningBlockGrid; private assertNoTreeConnectFieldsFlowRegistry; private normalizeTreeConnectFields; private getDataBlockResourceInit; private getTreeSelectedKeyFieldPath; private normalizeTreeConnectFilterPaths; private resolveTreeConnectComparableField; private normalizeTreeConnectValueKind; private persistTreeConnectFields; private isFilterFormFieldPathAvailableForResource; private persistFilterFormConnectConfig; private removeFilterSourceBindings; private removeFilterTargetBindings; private collectChartBlockUidsFromTree; private removeFlowSqlBindingsForChartUids; private removeFlowSqlBindingsForNodeTree; private persistChartSqlBinding; private syncChartDataBindingsForNode; private syncFilterFormConnectConfigForNode; private syncFieldBindingSettingsForNode; private buildFilterFormTargetPaths; private getEditableDomains; private resolveContextSemantic; private resolveRecordActionContextOwner; private loadContextAncestorChain; private resolveCollectionFromInit; private buildChartContextSemantic; private resolveChartQueryOutputType; private resolveContextOwnerCollection; private resolveItemContextCollection; private resolvePopupHostOpenView; private popupHostHasLocalContent; private shouldAutoBindPopupTemplate; private patchPopupOpenViewIfChanged; private buildPopupOpenViewWithTemplate; private completePopupHostDefaultContent; private ensurePopupHostDefaultContent; private resolvePopupSourceRecordCollectionName; private resolvePopupContextLevel; private getCollection; private normalizeKanbanFieldNameInput; private getKanbanCollectionFilterTargetKey; private isKanbanMultipleGroupField; private isKanbanAssociationGroupField; private isKanbanGroupField; private getKanbanGroupFieldCandidates; private getKanbanDefaultGroupFieldName; private getKanbanGroupField; private getKanbanCollectionOrThrow; private assertKanbanCollectionCompatible; private getKanbanRelationTargetCollection; private getKanbanRelationFieldCandidateNames; private getKanbanDefaultRelationTitleFieldName; private assertKanbanRelationFieldBinding; private getKanbanGroupFieldSortScopeKeys; private getKanbanCompatibleSortFieldNames; private resolveKanbanCompatibleSortFieldName; private normalizeKanbanGroupOptions; private buildKanbanInlineGroupOptions; private mergeKanbanInlineGroupOptions; private normalizeKanbanPopupSettings; private getKanbanPopupActionUid; private getKanbanBlockResourceInit; private buildKanbanInitialStepParams; private buildKanbanInitialItemProps; private buildKanbanInitialItemStepParams; private getKanbanPopupStoredSettings; private mergeKanbanPopupSettings; private stripKanbanPopupTargetSettingsForResourceChange; private buildKanbanPopupOpenView; private normalizeKanbanPopupConfigureValue; private buildKanbanInitialBlockProps; private normalizeCalendarFieldPathInput; private isCalendarDateField; private isCalendarTitleField; private isCalendarColorField; private getCalendarPluginFieldCapabilities; private getCalendarTitleFieldInterfaces; private getCalendarColorFieldInterfaces; private getCalendarDateFieldTypes; private getCalendarTitleFallbackFieldName; private isCalendarTitleFallbackField; private getCalendarDateFields; private resolveCalendarDefaultFieldNames; private getCalendarCollectionOrThrow; private assertCalendarCollectionCompatible; private assertCalendarFieldBinding; private normalizeCalendarFieldNamesForCollection; private normalizeCalendarPopupSettings; private getCalendarBlockResourceInit; private getCalendarPopupStoredSettings; private getCalendarPopupPropKey; private buildCalendarInitialStepParams; private buildCalendarPopupOpenView; private mergeCalendarPopupSettings; private stripCalendarPopupTargetSettingsForResourceChange; private normalizeCalendarPopupConfigureValue; private normalizeCalendarInlineSettingsForConfigure; private omitHiddenPopupSettingsForConfigure; private resolveCalendarInitialPopupOverride; private resolveKanbanInitialPopupOverride; private buildCalendarInitialBlockProps; private ensureCalendarBlockPopupHosts; private projectCalendarBlockPopupHostsInTree; private replaceKanbanStoredPopupSettings; private ensureKanbanBlockPopupHosts; private projectKanbanBlockPopupHostsInTree; private resolveManagedPopupTargetUidForHiddenPopupBackfill; private ensureHiddenPopupBlockHostsInManagedPopupTarget; private ensureHiddenPopupBlockHostsInTree; private getCalendarSettingValue; private validateCalendarSettingValues; private validateCalendarBlockState; private validateKanbanBlockState; private resolveFieldDefinition; private resolveRelationTitleFieldErrorOptionsForNode; private getAssociationDefaultTitleFieldName; private tryGetAssociationDefaultTitleFieldName; private getAssociationTitleFieldTargetCollection; private buildAssociationTitleFieldUnavailableMessage; private resolveTitleFieldSyncDecision; private resolvePreferredFieldForCapability; private supportsFieldTitleFieldProp; private normalizeFieldPropsForUse; private ensureGridChild; private ensureTableActionsColumn; private ensurePopupSurface; private ensureFlowRoutePageSchemaShell; private removeFlowRoutePageSchemaShell; private normalizeDisplayFieldBinding; private collectionFieldHasRequiredValidation; private buildRequiredCollectionFieldFormWrapperDefaults; private getCollectionFieldOrBadRequest; private buildRelationTargetFieldInit; private buildRelationTargetTableColumnNode; private buildRelationTargetGridItemNode; private replaceFieldSubModelArray; private buildPopupSubTableActionsColumnNode; private ensureFieldGridSubModel; private applyResolvedRelationFieldType; private applyRecordPickerFieldTypeSettings; private ensureRelationSelectorGridTable; private buildExactFieldSettingsInitPayload; private patchFieldSettingsInitExact; private inferFieldComponentFlowDomain; private resolveFieldComponentFieldSource; private assertSupportedFieldComponentUse; private syncFieldTypeStepParams; private rebuildFieldSubModelOnServer; private parseFieldPath; private loadResolvedNode; private normalizePopupTreeShape; } export {};