open-agreements
Version:
Open-source legal template filling CLI and library
48 lines • 2.04 kB
TypeScript
import { z } from 'zod';
export declare const ReferenceFieldActionSchema: z.ZodUnion<readonly [z.ZodObject<{
target: z.ZodString;
strategy: z.ZodLiteral<"literalize">;
expected_matches: z.ZodNumber;
expected_target_count: z.ZodNumber;
literal: z.ZodString;
expected_cached_result: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
target: z.ZodString;
strategy: z.ZodLiteral<"literalize">;
expected_matches: z.ZodNumber;
expected_target_count: z.ZodNumber;
groups: z.ZodArray<z.ZodObject<{
expected_cached_result: z.ZodString;
literal: z.ZodString;
expected_matches: z.ZodNumber;
}, z.core.$strict>>;
}, z.core.$strict>]>;
export declare const ReferenceFieldsConfigSchema: z.ZodObject<{
version: z.ZodLiteral<1>;
actions: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
target: z.ZodString;
strategy: z.ZodLiteral<"literalize">;
expected_matches: z.ZodNumber;
expected_target_count: z.ZodNumber;
literal: z.ZodString;
expected_cached_result: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
target: z.ZodString;
strategy: z.ZodLiteral<"literalize">;
expected_matches: z.ZodNumber;
expected_target_count: z.ZodNumber;
groups: z.ZodArray<z.ZodObject<{
expected_cached_result: z.ZodString;
literal: z.ZodString;
expected_matches: z.ZodNumber;
}, z.core.$strict>>;
}, z.core.$strict>]>>;
}, z.core.$strict>;
export type ReferenceFieldsConfig = z.infer<typeof ReferenceFieldsConfigSchema>;
export declare function loadReferenceFieldsConfig(path: string): ReferenceFieldsConfig | undefined;
/**
* Structurally literalize declared REF fields. All assertions are evaluated
* before any mutation, so a stale recipe cannot partially rewrite a document.
*/
export declare function applyReferenceFieldActions(inputPath: string, outputPath: string, config: ReferenceFieldsConfig): void;
//# sourceMappingURL=reference-fields.d.ts.map