UNPKG

open-agreements

Version:

Open-source legal template filling CLI and library

146 lines • 5.85 kB
import { z } from 'zod'; import { type ClosingChecklist } from './schemas.js'; export declare const ChecklistStateSchema: z.ZodObject<{ checklist_id: z.ZodString; revision: z.ZodNumber; checklist: z.ZodObject<{ deal_name: z.ZodString; updated_at: z.ZodString; documents: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{ document_id: z.ZodString; title: z.ZodString; primary_link: z.ZodOptional<z.ZodString>; labels: z.ZodDefault<z.ZodArray<z.ZodString>>; }, z.core.$strip>>>; checklist_entries: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{ entry_id: z.ZodString; document_id: z.ZodOptional<z.ZodString>; stage: z.ZodEnum<{ PRE_SIGNING: "PRE_SIGNING"; SIGNING: "SIGNING"; CLOSING: "CLOSING"; POST_CLOSING: "POST_CLOSING"; }>; sort_key: z.ZodOptional<z.ZodString>; title: z.ZodString; status: z.ZodEnum<{ NOT_STARTED: "NOT_STARTED"; DRAFT: "DRAFT"; CIRCULATED: "CIRCULATED"; FORM_FINAL: "FORM_FINAL"; PARTIALLY_SIGNED: "PARTIALLY_SIGNED"; FULLY_EXECUTED: "FULLY_EXECUTED"; DELIVERED: "DELIVERED"; FILED_OR_RECORDED: "FILED_OR_RECORDED"; }>; parent_entry_id: z.ZodOptional<z.ZodString>; responsible_party: z.ZodOptional<z.ZodObject<{ organization: z.ZodOptional<z.ZodString>; individual_name: z.ZodOptional<z.ZodString>; role: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; citations: z.ZodDefault<z.ZodArray<z.ZodObject<{ ref: z.ZodOptional<z.ZodString>; text: z.ZodOptional<z.ZodString>; link: z.ZodOptional<z.ZodString>; filepath: z.ZodOptional<z.ZodString>; }, z.core.$strip>>>; signatories: z.ZodDefault<z.ZodArray<z.ZodObject<{ party: z.ZodString; name: z.ZodOptional<z.ZodString>; title: z.ZodOptional<z.ZodString>; status: z.ZodEnum<{ PENDING: "PENDING"; RECEIVED: "RECEIVED"; N_A: "N_A"; }>; signature_artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{ uri: z.ZodOptional<z.ZodString>; path: z.ZodOptional<z.ZodString>; received_at: z.ZodOptional<z.ZodString>; }, z.core.$strip>>>; }, z.core.$strip>>>; }, z.core.$strip>>>; action_items: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{ action_id: z.ZodString; description: z.ZodString; status: z.ZodEnum<{ NOT_STARTED: "NOT_STARTED"; IN_PROGRESS: "IN_PROGRESS"; COMPLETED: "COMPLETED"; ON_HOLD: "ON_HOLD"; }>; assigned_to: z.ZodOptional<z.ZodObject<{ organization: z.ZodOptional<z.ZodString>; individual_name: z.ZodOptional<z.ZodString>; role: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; due_date: z.ZodOptional<z.ZodString>; related_document_ids: z.ZodDefault<z.ZodArray<z.ZodString>>; citations: z.ZodDefault<z.ZodArray<z.ZodObject<{ ref: z.ZodOptional<z.ZodString>; text: z.ZodOptional<z.ZodString>; link: z.ZodOptional<z.ZodString>; filepath: z.ZodOptional<z.ZodString>; }, z.core.$strip>>>; }, z.core.$strip>>>; issues: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{ issue_id: z.ZodString; title: z.ZodString; summary: z.ZodOptional<z.ZodString>; status: z.ZodEnum<{ OPEN: "OPEN"; CLOSED: "CLOSED"; }>; related_document_ids: z.ZodDefault<z.ZodArray<z.ZodString>>; citations: z.ZodDefault<z.ZodArray<z.ZodObject<{ ref: z.ZodOptional<z.ZodString>; text: z.ZodOptional<z.ZodString>; link: z.ZodOptional<z.ZodString>; filepath: z.ZodOptional<z.ZodString>; }, z.core.$strip>>>; }, z.core.$strip>>>; }, z.core.$strip>; }, z.core.$strip>; export type ChecklistState = z.infer<typeof ChecklistStateSchema>; export interface ChecklistMeta { deal_name: string; created_at: string; uuid: string; } export interface ChecklistSummary extends ChecklistMeta { revision: number; updated_at: string; } export interface HistoryRecord { patch_id: string; applied_at: string; revision_before: number; revision_after: number; operation_count: number; } export declare function createChecklist(dealName: string, initialData?: ClosingChecklist, opts?: { root?: string; }): { uuid: string; dir: string; }; export declare function listChecklists(opts?: { root?: string; }): ChecklistSummary[]; export declare function resolveChecklist(nameOrId: string, opts?: { root?: string; }): string | null; export declare function getChecklistState(uuid: string, opts?: { root?: string; }): ChecklistState; export declare function saveChecklistState(uuid: string, state: ChecklistState, opts?: { root?: string; }): void; export declare function appendHistory(uuid: string, record: HistoryRecord, opts?: { root?: string; }): Promise<void>; export declare function getHistory(uuid: string, opts?: { root?: string; }): HistoryRecord[]; //# sourceMappingURL=state-manager.d.ts.map