export interface ACPCheckoutSession {
    id: string;
    status: 'open' | 'completed' | 'cancelled' | 'expired';
    items: ACPLineItem[];
    totals: ACPTotals;
    fulfillment?: ACPFulfillment;
    fulfillmentOptions?: ACPFulfillmentOption[];
    paymentMethods?: ACPPaymentMethod[];
    customer?: ACPCustomer;
    metadata?: Record<string, unknown>;
    createdAt: string;
    updatedAt: string;
}
export interface ACPLineItem {
    id: string;
    skuId: string;
    name: string;
    description?: string;
    quantity: number;
    unitPrice: ACPMoney;
    totalPrice: ACPMoney;
    imageUrl?: string;
    productUrl?: string;
}
export interface ACPMoney {
    amount: number;
    currency: string;
}
export interface ACPTotals {
    subtotal: ACPMoney;
    tax?: ACPMoney;
    shipping?: ACPMoney;
    discount?: ACPMoney;
    total: ACPMoney;
}
export interface ACPFulfillment {
    type: 'shipping' | 'pickup' | 'digital';
    address?: ACPAddress;
    optionId?: string;
}
export interface ACPFulfillmentOption {
    id: string;
    name: string;
    description?: string;
    price: ACPMoney;
    estimatedDelivery?: string;
}
export interface ACPPaymentMethod {
    type: 'shared_payment_token' | 'card' | 'link' | string;
    id?: string;
}
export interface ACPCustomer {
    name?: string;
    email?: string;
    phone?: string;
}
export interface ACPAddress {
    name?: string;
    lineOne: string;
    lineTwo?: string;
    city: string;
    state?: string;
    country: string;
    postalCode: string;
}
export interface ACPOrderEvent {
    eventId: string;
    type: 'order.created' | 'order.updated' | 'order.shipped' | 'order.delivered' | 'order.cancelled';
    checkoutSessionId: string;
    orderId: string;
    timestamp: string;
    data: Record<string, unknown>;
}
export interface CommerceConfig {
    merchantBaseUrl: string;
    merchantName: string;
    bearerToken?: string;
    webhookUrl?: string;
    webhookSecret?: string;
    defaultCurrency?: string;
}
export interface CommerceDelegation {
    agentId: string;
    delegationId: string;
    scope: string[];
    spendLimit: number;
    spentAmount: number;
    currency: string;
    approvedMerchants?: string[];
    requireHumanApproval?: boolean;
    humanApprovalThreshold?: number;
}
export interface CommercePreflightResult {
    permitted: boolean;
    checks: CommercePreflightCheck[];
    delegation?: CommerceDelegation;
    warnings: string[];
    blockedReason?: string;
    existingReceiptId?: string;
}
export interface CommercePreflightCheck {
    check: string;
    passed: boolean;
    detail: string;
}
export interface CommerceActionReceipt {
    receiptId: string;
    version: string;
    timestamp: string;
    agentId: string;
    delegationId: string;
    action: {
        type: 'commerce:create_checkout' | 'commerce:update_checkout' | 'commerce:complete_checkout' | 'commerce:cancel_checkout';
        target: string;
        method: string;
        scopeUsed: string;
        spend: {
            amount: number;
            currency: string;
        };
    };
    checkout: {
        sessionId: string;
        merchantName: string;
        items: {
            skuId: string;
            name: string;
            quantity: number;
            unitPrice: number;
        }[];
        totalAmount: number;
        totalCurrency: string;
        status: string;
    };
    delegationChain: string[];
    beneficiary: string;
    valuesFloorVersion?: string;
    idempotencyKey?: string;
    signature: string;
}
export interface IdempotencyCheck {
    idempotencyKey: string;
    windowSeconds: number;
    action: 'reject' | 'return_existing';
}
export interface IdempotencyStore {
    check(key: string, windowSeconds: number): Promise<{
        duplicate: boolean;
        existingReceiptId?: string;
    }>;
    record(key: string, receiptId: string): Promise<void>;
}
export interface HumanApprovalRequest {
    requestId: string;
    agentId: string;
    merchantName: string;
    items: ACPLineItem[];
    totalAmount: ACPMoney;
    delegationId: string;
    reason: string;
    createdAt: string;
    expiresAt: string;
    status: 'pending' | 'approved' | 'denied';
}
//# sourceMappingURL=commerce.d.ts.map