import { OrderLine, Order } from '@platform-modules/commerce-orders';
import { TransactionalDatabase } from '@platform-modules/db';
import { C as CarrierAdapter, B as BuyLabelArgs, F as FulfillmentPorts, S as StorageAdapter } from './seams-DLXi9hfQ.js';
import { A as Address, L as Label, C as CarrierTrackResult, a as CarrierWebhookResult, F as FulfillmentNotification, b as FulfillmentDbSchema } from './schema-BKDZ5rS8.js';
import 'drizzle-orm/pg-core';

interface MemoryCarrierAdapterOptions {
    buyLabel?: (args: BuyLabelArgs) => Promise<Label>;
    track?: (trackingNumber: string) => Promise<CarrierTrackResult>;
    verifyWebhook?: (req: Request) => Promise<CarrierWebhookResult | null>;
}
interface MemoryCarrierAdapter extends CarrierAdapter {
    readonly buyLabelCallCount: number;
}
declare function createMemoryCarrierAdapter(options?: MemoryCarrierAdapterOptions): MemoryCarrierAdapter;
interface StoragePutRecord {
    key: string;
    body: Uint8Array | ArrayBuffer;
}
interface MemoryStorageAdapter extends StorageAdapter {
    readonly puts: StoragePutRecord[];
}
declare function createMemoryStorageAdapter(): MemoryStorageAdapter;
declare const DEFAULT_MEMORY_ADDRESS: Address;
interface MemoryFulfillmentPortsOptions {
    db: TransactionalDatabase<FulfillmentDbSchema>;
    storage?: StorageAdapter;
    notify?: (notification: FulfillmentNotification) => Promise<void>;
    resolveBlobKey?: (line: OrderLine) => Promise<string>;
    resolveShippingAddress?: (order: Order) => Promise<Address>;
    carriers?: FulfillmentPorts['carriers'];
}
interface MemoryFulfillmentPorts extends FulfillmentPorts {
    readonly notifications: FulfillmentNotification[];
}
declare function createMemoryFulfillmentPorts(options: MemoryFulfillmentPortsOptions): MemoryFulfillmentPorts;

export { DEFAULT_MEMORY_ADDRESS, type MemoryCarrierAdapter, type MemoryCarrierAdapterOptions, type MemoryFulfillmentPorts, type MemoryFulfillmentPortsOptions, type MemoryStorageAdapter, type StoragePutRecord, createMemoryCarrierAdapter, createMemoryFulfillmentPorts, createMemoryStorageAdapter };
