/** * 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 { ResourcerContext } from '@nocobase/resourcer'; import { type AnalyzedTemplate, type ResolvePathPolicy } from '../template/variable-expression'; import { JSONValue } from '../template/resolver'; import { type RecordBindingPlan } from './record-bindings'; export type ResolveBatchItem = { id?: string | number; template: JSONValue; contextParams?: Record; }; export type AnalyzedResolveBatchItem = ResolveBatchItem & { analysis: AnalyzedTemplate; bindingPlan: RecordBindingPlan; policy: ResolvePathPolicy; }; export declare function resolveVariablesTemplate(ctx: ResourcerContext, template: JSONValue, contextParams?: Record): Promise; export declare function isLegacyVariableTemplateSafe(template: JSONValue): boolean; export declare function resolveFlowModelVariablesTemplate(ctx: ResourcerContext, options: { contractRd?: string | number; contextParams?: Record; rd?: string | number; template: JSONValue; }): Promise; export declare function resolveAnalyzedVariablesTemplate(ctx: ResourcerContext, analysis: AnalyzedTemplate, policy: ResolvePathPolicy, bindingPlan: RecordBindingPlan): Promise; export declare function resolveVariablesBatch(ctx: ResourcerContext, items: ResolveBatchItem[]): Promise<{ id?: string | number; data: unknown; }[]>; export declare function resolveAnalyzedVariablesBatch(ctx: ResourcerContext, items: AnalyzedResolveBatchItem[]): Promise<{ id?: string | number; data: unknown; }[]>;