/** * 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 _ from 'lodash'; import type { FlowSurfaceNodeDefaults } from '../types'; type ApprovalFieldTreeParams = { wrapperUse: string; fieldUse: string; fieldPath: string; dataSourceKey: string; collectionName: string; associationPathName?: string; filterFormInit?: Record; wrapperProps?: Record; fieldProps?: Record; uid: string; innerUid: string; fieldDefaults?: { props?: Record; stepParams?: Record; }; }; type ApprovalActionDefaults = { props?: Record; stepParams?: Record; subModels?: Record; }; export declare function buildApprovalFieldTree(params: ApprovalFieldTreeParams): { wrapperUid: string; innerUid: string; model: { uid: string; use: string; props: Record; stepParams: Record; subModels: { field: { uid: string; use: string; props: Record; stepParams: Record & { fieldSettings: { init: _.Dictionary; }; fieldBinding: { use: string; }; }; }; }; }; }; export declare function buildApprovalBlockDefaults(use: string): FlowSurfaceNodeDefaults | null; export declare function buildApprovalActionDefaults(use: string): ApprovalActionDefaults | null; export declare function buildApprovalInitiatorSurfaceTree(options: { dataSourceKey: string; collectionName: string; pageUid?: string; tabUid?: string; gridUid?: string; }): { uid: string; async: boolean; subType: string; use: string; sortIndex: number; flowRegistry: {}; stepParams: { pageSettings: { general: { displayTitle: boolean; enableTabs: boolean; title: string; }; }; TriggerChildPageSettings: { init: { dataSourceKey: string; collectionName: string; }; }; }; subModels: { tabs: { uid: string; parentId: string; use: string; subKey: string; subType: string; sortIndex: number; flowRegistry: {}; stepParams: { pageTabSettings: { tab: { title: string; }; }; }; subModels: { grid: { uid: string; parentId: string; async: boolean; use: string; subKey: string; subType: string; sortIndex: number; flowRegistry: {}; filterManager: any[]; }; }; }[]; }; }; export declare function buildApprovalApproverSurfaceTree(options: { dataSourceKey: string; collectionName: string; pageUid?: string; tabUid?: string; gridUid?: string; }): { uid: string; async: boolean; subType: string; use: string; sortIndex: number; flowRegistry: {}; stepParams: { pageSettings: { general: { displayTitle: boolean; enableTabs: boolean; title: string; }; }; ApprovalChildPageSettings: { init: { dataSourceKey: string; collectionName: string; }; }; resourceSettings: { init: { dataSourceKey: string; collectionName: string; }; }; }; subModels: { tabs: { uid: string; parentId: string; use: string; subKey: string; subType: string; sortIndex: number; flowRegistry: {}; stepParams: { pageTabSettings: { tab: { title: string; }; }; }; subModels: { grid: { uid: string; parentId: string; async: boolean; use: string; subKey: string; subType: string; sortIndex: number; flowRegistry: {}; filterManager: any[]; }; }; }[]; }; }; export declare function buildApprovalTaskCardSurfaceTree(options: { detailsUse: 'ApplyTaskCardDetailsModel' | 'ApprovalTaskCardDetailsModel'; gridUse: 'ApplyTaskCardGridModel' | 'ApprovalTaskCardGridModel'; dataSourceKey: string; collectionName: string; detailsUid?: string; gridUid?: string; }): { uid: string; async: boolean; subType: string; use: "ApplyTaskCardDetailsModel" | "ApprovalTaskCardDetailsModel"; sortIndex: number; flowRegistry: {}; stepParams: { resourceSettings: { init: { dataSourceKey: string; collectionName: string; }; }; detailsSettings: { layout: { layout: string; }; }; }; subModels: { grid: { uid: string; parentId: string; use: "ApplyTaskCardGridModel" | "ApprovalTaskCardGridModel"; subKey: string; subType: string; sortIndex: number; flowRegistry: {}; }; }; }; export {};