import { d as Address, g as FulfillmentNotification, m as CarrierWebhookResult, p as CarrierTrackResult, t as FulfillmentDbSchema, y as Label } from "./schema-CIDxLCgB.js";
import { Order, OrderLine } from "@platform-modules/commerce-orders";
import { TransactionalDatabase } from "@platform-modules/db";
//#region src/seams.d.ts
interface StorageAdapter {
  put(key: string, body: Uint8Array | ArrayBuffer): Promise<void>;
  signedUrl(key: string, ttlSeconds: number): Promise<{
    url: string;
    expiresAt?: Date;
  }>;
}
interface CarrierCapabilities {
  webhooks: boolean;
  tracking: boolean;
}
interface BuyLabelArgs {
  shipmentId: string;
  address: Address;
  idempotencyKey: string;
}
interface CarrierAdapter {
  kind: string;
  capabilities: CarrierCapabilities;
  buyLabel(args: BuyLabelArgs): Promise<Label>;
  track(trackingNumber: string): Promise<CarrierTrackResult>;
  verifyWebhook(req: Request): Promise<CarrierWebhookResult | null>;
}
interface FulfillmentPorts {
  db: TransactionalDatabase<FulfillmentDbSchema>;
  storage: StorageAdapter;
  notify(notification: FulfillmentNotification): Promise<void>;
  resolveBlobKey(line: OrderLine): Promise<string>;
  resolveShippingAddress(order: Order): Promise<Address>;
  carriers?(kind: string): CarrierAdapter | undefined;
}
//#endregion
export { StorageAdapter as a, FulfillmentPorts as i, CarrierAdapter as n, CarrierCapabilities as r, BuyLabelArgs as t };