import type { Db } from "@paperclipai/db";
import { approvals } from "@paperclipai/db";
export declare function approvalService(db: Db): {
    list: (companyId: string, status?: string) => Omit<import("drizzle-orm/pg-core").PgSelectBase<"approvals", {
        id: import("drizzle-orm/pg-core").PgColumn<{
            name: "id";
            tableName: "approvals";
            dataType: "string";
            columnType: "PgUUID";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: true;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        companyId: import("drizzle-orm/pg-core").PgColumn<{
            name: "company_id";
            tableName: "approvals";
            dataType: "string";
            columnType: "PgUUID";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        type: import("drizzle-orm/pg-core").PgColumn<{
            name: "type";
            tableName: "approvals";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        requestedByAgentId: import("drizzle-orm/pg-core").PgColumn<{
            name: "requested_by_agent_id";
            tableName: "approvals";
            dataType: "string";
            columnType: "PgUUID";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        requestedByUserId: import("drizzle-orm/pg-core").PgColumn<{
            name: "requested_by_user_id";
            tableName: "approvals";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        status: import("drizzle-orm/pg-core").PgColumn<{
            name: "status";
            tableName: "approvals";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        payload: import("drizzle-orm/pg-core").PgColumn<{
            name: "payload";
            tableName: "approvals";
            dataType: "json";
            columnType: "PgJsonb";
            data: Record<string, unknown>;
            driverParam: unknown;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            $type: Record<string, unknown>;
        }>;
        decisionNote: import("drizzle-orm/pg-core").PgColumn<{
            name: "decision_note";
            tableName: "approvals";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        decidedByUserId: import("drizzle-orm/pg-core").PgColumn<{
            name: "decided_by_user_id";
            tableName: "approvals";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        decidedAt: import("drizzle-orm/pg-core").PgColumn<{
            name: "decided_at";
            tableName: "approvals";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        createdAt: import("drizzle-orm/pg-core").PgColumn<{
            name: "created_at";
            tableName: "approvals";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        updatedAt: import("drizzle-orm/pg-core").PgColumn<{
            name: "updated_at";
            tableName: "approvals";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
    }, "single", Record<"approvals", "not-null">, false, "where", {
        id: string;
        companyId: string;
        type: string;
        requestedByAgentId: string | null;
        requestedByUserId: string | null;
        status: string;
        payload: Record<string, unknown>;
        decisionNote: string | null;
        decidedByUserId: string | null;
        decidedAt: Date | null;
        createdAt: Date;
        updatedAt: Date;
    }[], {
        id: import("drizzle-orm/pg-core").PgColumn<{
            name: "id";
            tableName: "approvals";
            dataType: "string";
            columnType: "PgUUID";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: true;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        companyId: import("drizzle-orm/pg-core").PgColumn<{
            name: "company_id";
            tableName: "approvals";
            dataType: "string";
            columnType: "PgUUID";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        type: import("drizzle-orm/pg-core").PgColumn<{
            name: "type";
            tableName: "approvals";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        requestedByAgentId: import("drizzle-orm/pg-core").PgColumn<{
            name: "requested_by_agent_id";
            tableName: "approvals";
            dataType: "string";
            columnType: "PgUUID";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        requestedByUserId: import("drizzle-orm/pg-core").PgColumn<{
            name: "requested_by_user_id";
            tableName: "approvals";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        status: import("drizzle-orm/pg-core").PgColumn<{
            name: "status";
            tableName: "approvals";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        payload: import("drizzle-orm/pg-core").PgColumn<{
            name: "payload";
            tableName: "approvals";
            dataType: "json";
            columnType: "PgJsonb";
            data: Record<string, unknown>;
            driverParam: unknown;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            $type: Record<string, unknown>;
        }>;
        decisionNote: import("drizzle-orm/pg-core").PgColumn<{
            name: "decision_note";
            tableName: "approvals";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        decidedByUserId: import("drizzle-orm/pg-core").PgColumn<{
            name: "decided_by_user_id";
            tableName: "approvals";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        decidedAt: import("drizzle-orm/pg-core").PgColumn<{
            name: "decided_at";
            tableName: "approvals";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        createdAt: import("drizzle-orm/pg-core").PgColumn<{
            name: "created_at";
            tableName: "approvals";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        updatedAt: import("drizzle-orm/pg-core").PgColumn<{
            name: "updated_at";
            tableName: "approvals";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
    }>, "where">;
    getById: (id: string) => Promise<{
        id: string;
        companyId: string;
        type: string;
        requestedByAgentId: string | null;
        requestedByUserId: string | null;
        status: string;
        payload: Record<string, unknown>;
        decisionNote: string | null;
        decidedByUserId: string | null;
        decidedAt: Date | null;
        createdAt: Date;
        updatedAt: Date;
    }>;
    create: (companyId: string, data: Omit<typeof approvals.$inferInsert, "companyId">) => Promise<{
        id: string;
        status: string;
        createdAt: Date;
        updatedAt: Date;
        companyId: string;
        type: string;
        decisionNote: string | null;
        payload: Record<string, unknown>;
        requestedByAgentId: string | null;
        requestedByUserId: string | null;
        decidedByUserId: string | null;
        decidedAt: Date | null;
    }>;
    approve: (id: string, decidedByUserId: string, decisionNote?: string | null) => Promise<{
        approval: {
            id: string;
            status: string;
            createdAt: Date;
            updatedAt: Date;
            companyId: string;
            type: string;
            decisionNote: string | null;
            payload: Record<string, unknown>;
            requestedByAgentId: string | null;
            requestedByUserId: string | null;
            decidedByUserId: string | null;
            decidedAt: Date | null;
        };
        applied: boolean;
    }>;
    reject: (id: string, decidedByUserId: string, decisionNote?: string | null) => Promise<{
        approval: {
            id: string;
            status: string;
            createdAt: Date;
            updatedAt: Date;
            companyId: string;
            type: string;
            decisionNote: string | null;
            payload: Record<string, unknown>;
            requestedByAgentId: string | null;
            requestedByUserId: string | null;
            decidedByUserId: string | null;
            decidedAt: Date | null;
        };
        applied: boolean;
    }>;
    requestRevision: (id: string, decidedByUserId: string, decisionNote?: string | null) => Promise<{
        id: string;
        companyId: string;
        type: string;
        requestedByAgentId: string | null;
        requestedByUserId: string | null;
        status: string;
        payload: Record<string, unknown>;
        decisionNote: string | null;
        decidedByUserId: string | null;
        decidedAt: Date | null;
        createdAt: Date;
        updatedAt: Date;
    }>;
    resubmit: (id: string, payload?: Record<string, unknown>) => Promise<{
        id: string;
        companyId: string;
        type: string;
        requestedByAgentId: string | null;
        requestedByUserId: string | null;
        status: string;
        payload: Record<string, unknown>;
        decisionNote: string | null;
        decidedByUserId: string | null;
        decidedAt: Date | null;
        createdAt: Date;
        updatedAt: Date;
    }>;
    listComments: (approvalId: string) => Promise<{
        id: string;
        companyId: string;
        approvalId: string;
        authorAgentId: string | null;
        authorUserId: string | null;
        body: string;
        createdAt: Date;
        updatedAt: Date;
    }[]>;
    addComment: (approvalId: string, body: string, actor: {
        agentId?: string;
        userId?: string;
    }) => Promise<{
        id: string;
        createdAt: Date;
        updatedAt: Date;
        companyId: string;
        body: string;
        approvalId: string;
        authorUserId: string | null;
        authorAgentId: string | null;
    }>;
};
//# sourceMappingURL=approvals.d.ts.map