//#region src/errors.d.ts
declare class OrderValidationError extends Error {
  readonly field: string;
  readonly name = "OrderValidationError";
  readonly code: "ORDER_VALIDATION";
  readonly httpStatus: 400;
  constructor(field: string);
}
type OrderIntegrityDetail = 'lines' | 'total' | 'splits';
declare class OrderIntegrityError extends Error {
  readonly detail: OrderIntegrityDetail;
  readonly name = "OrderIntegrityError";
  readonly code: "ORDER_INTEGRITY";
  constructor(detail: OrderIntegrityDetail);
}
declare class OrderNotFoundError extends Error {
  readonly orderId: string;
  readonly name = "OrderNotFoundError";
  readonly code: "ORDER_NOT_FOUND";
  readonly httpStatus: 404;
  constructor(orderId: string);
}
declare class OrderNotChargeableError extends Error {
  readonly orderId: string;
  readonly name = "OrderNotChargeableError";
  readonly code: "ORDER_NOT_CHARGEABLE";
  readonly httpStatus: 409;
  constructor(orderId: string);
}
declare class OrderIdempotencyConflictError extends Error {
  readonly context: {
    idempotencyKey: string;
  };
  readonly name = "OrderIdempotencyConflictError";
  readonly code: "ORDER_IDEMPOTENCY_CONFLICT";
  readonly httpStatus: 409;
  constructor(context: {
    idempotencyKey: string;
  });
}
declare class OrderChargeConflictError extends Error {
  readonly context: {
    orderId: string;
    existingChargeRef: string;
    attemptedChargeRef: string;
  };
  readonly name = "OrderChargeConflictError";
  readonly code: "ORDER_CHARGE_CONFLICT";
  readonly httpStatus: 409;
  constructor(context: {
    orderId: string;
    existingChargeRef: string;
    attemptedChargeRef: string;
  });
}
declare class RefundExceedsPaidError extends Error {
  readonly context: {
    orderId: string;
    requested: bigint;
    alreadyRefunded: bigint;
    paid: bigint;
  };
  readonly name = "RefundExceedsPaidError";
  readonly code: "REFUND_EXCEEDS_PAID";
  readonly httpStatus: 422;
  constructor(context: {
    orderId: string;
    requested: bigint;
    alreadyRefunded: bigint;
    paid: bigint;
  });
}
type ImmutableField = 'orderId' | 'currency' | 'priceMode';
declare class ImmutableFieldError extends Error {
  readonly field: ImmutableField;
  readonly name = "ImmutableFieldError";
  readonly code: "IMMUTABLE_FIELD";
  constructor(field: ImmutableField);
}
declare class OrderMigrateError extends Error {
  readonly detail: string;
  readonly name = "OrderMigrateError";
  readonly code: "ORDER_MIGRATE";
  constructor(detail: string);
}
declare class ReturnTransitionError extends Error {
  readonly context: {
    from: string;
    command: string;
  };
  readonly name = "ReturnTransitionError";
  readonly code: "RETURN_TRANSITION";
  constructor(context: {
    from: string;
    command: string;
  });
}
declare function isOrderValidationError(e: unknown): e is OrderValidationError;
declare function isOrderIntegrityError(e: unknown): e is OrderIntegrityError;
declare function isOrderNotFoundError(e: unknown): e is OrderNotFoundError;
declare function isOrderNotChargeableError(e: unknown): e is OrderNotChargeableError;
declare function isOrderIdempotencyConflictError(e: unknown): e is OrderIdempotencyConflictError;
declare function isOrderChargeConflictError(e: unknown): e is OrderChargeConflictError;
declare function isRefundExceedsPaidError(e: unknown): e is RefundExceedsPaidError;
declare function isImmutableFieldError(e: unknown): e is ImmutableFieldError;
declare function isOrderMigrateError(e: unknown): e is OrderMigrateError;
declare function isReturnTransitionError(e: unknown): e is ReturnTransitionError;
//#endregion
//#region src/types.d.ts
type ProductKind = 'physical' | 'digital' | 'voucher';
type OrderStatus = 'pending' | 'charging' | 'paid' | 'fulfilled' | 'completed' | 'failed' | 'cancelled' | 'unfulfillable' | 'refunded' | 'partially_refunded';
declare const ORDER_STATUSES: readonly OrderStatus[];
declare function isOrderStatus(value: string): value is OrderStatus;
type PriceMode = 'inclusive' | 'exclusive';
type BuyerRef = {
  userId: string;
} | {
  guestEmail: string;
};
/** commerce-catalog has no Actor yet — plan shape for W3 reads/authz. */
type Actor = {
  userId?: string;
  vendorId?: string;
  isAdmin?: boolean;
};
type StepRecord = Record<string, unknown>;
interface OrderLine {
  id: string;
  orderId: string;
  variantId: string;
  kind: ProductKind;
  qty: number;
  unitPrice: bigint;
  lineTotal: bigint;
  vendorId: string | null;
}
interface VendorSplit {
  id: string;
  orderId: string;
  vendorId: string | null;
  amount: bigint;
  funder: 'platform' | 'vendor';
}
interface Order {
  id: string;
  buyerRef: BuyerRef;
  status: OrderStatus;
  currency: string;
  priceMode: PriceMode;
  subtotal: bigint;
  tax: bigint;
  discount: bigint;
  total: bigint;
  lines: OrderLine[];
  splits: VendorSplit[];
  fulfillmentState: {
    steps: Record<string, StepRecord>;
  };
}
interface NewOrderLine {
  variantId: string;
  kind: ProductKind;
  qty: number;
  unitPrice: bigint;
  lineTotal: bigint;
  currency: string;
  vendorId?: string | null;
}
interface NewVendorSplit {
  vendorId: string | null;
  amount: bigint;
  funder: 'platform' | 'vendor';
}
interface NewOrder {
  idempotencyKey: string;
  buyerRef: BuyerRef;
  currency: string;
  priceMode: PriceMode;
  subtotal: bigint;
  tax: bigint;
  discount: bigint;
  total: bigint;
  lines: NewOrderLine[];
  splits: NewVendorSplit[];
}
type Page<T> = {
  items: T[];
  nextCursor: string | null;
};
type OrderListFilter = {
  status?: OrderStatus;
  cursor?: string;
  limit?: number;
};
//#endregion
//#region src/schema.d.ts
declare const order: import("drizzle-orm/pg-core").PgTableWithColumns<{
  name: "order";
  schema: undefined;
  columns: {
    id: import("drizzle-orm/pg-core").PgColumn<{
      name: "id";
      tableName: "order";
      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;
    }, {}, {}>;
    buyerUserId: import("drizzle-orm/pg-core").PgColumn<{
      name: "buyer_user_id";
      tableName: "order";
      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;
    }, {}, {}>;
    buyerGuestEmail: import("drizzle-orm/pg-core").PgColumn<{
      name: "buyer_guest_email";
      tableName: "order";
      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: "order";
      dataType: "string";
      columnType: "PgText";
      data: OrderStatus;
      driverParam: string;
      notNull: true;
      hasDefault: true;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: [string, ...string[]];
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {
      $type: OrderStatus;
    }>;
    currency: import("drizzle-orm/pg-core").PgColumn<{
      name: "currency";
      tableName: "order";
      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;
    }, {}, {}>;
    priceMode: import("drizzle-orm/pg-core").PgColumn<{
      name: "price_mode";
      tableName: "order";
      dataType: "string";
      columnType: "PgText";
      data: PriceMode;
      driverParam: string;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: [string, ...string[]];
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {
      $type: PriceMode;
    }>;
    subtotal: import("drizzle-orm/pg-core").PgColumn<{
      name: "subtotal";
      tableName: "order";
      dataType: "bigint";
      columnType: "PgBigInt64";
      data: bigint;
      driverParam: string;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: undefined;
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
    tax: import("drizzle-orm/pg-core").PgColumn<{
      name: "tax";
      tableName: "order";
      dataType: "bigint";
      columnType: "PgBigInt64";
      data: bigint;
      driverParam: string;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: undefined;
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
    discount: import("drizzle-orm/pg-core").PgColumn<{
      name: "discount";
      tableName: "order";
      dataType: "bigint";
      columnType: "PgBigInt64";
      data: bigint;
      driverParam: string;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: undefined;
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
    total: import("drizzle-orm/pg-core").PgColumn<{
      name: "total";
      tableName: "order";
      dataType: "bigint";
      columnType: "PgBigInt64";
      data: bigint;
      driverParam: string;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: undefined;
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
    chargeRef: import("drizzle-orm/pg-core").PgColumn<{
      name: "charge_ref";
      tableName: "order";
      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;
    }, {}, {}>;
    failureReason: import("drizzle-orm/pg-core").PgColumn<{
      name: "failure_reason";
      tableName: "order";
      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;
    }, {}, {}>;
    idempotencyKey: import("drizzle-orm/pg-core").PgColumn<{
      name: "idempotency_key";
      tableName: "order";
      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;
    }, {}, {}>;
    requestHash: import("drizzle-orm/pg-core").PgColumn<{
      name: "request_hash";
      tableName: "order";
      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;
    }, {}, {}>;
    createdAt: import("drizzle-orm/pg-core").PgColumn<{
      name: "created_at";
      tableName: "order";
      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: "order";
      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;
    }, {}, {}>;
  };
  dialect: "pg";
}>;
declare const orderLine: import("drizzle-orm/pg-core").PgTableWithColumns<{
  name: "order_line";
  schema: undefined;
  columns: {
    id: import("drizzle-orm/pg-core").PgColumn<{
      name: "id";
      tableName: "order_line";
      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;
    }, {}, {}>;
    orderId: import("drizzle-orm/pg-core").PgColumn<{
      name: "order_id";
      tableName: "order_line";
      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;
    }, {}, {}>;
    variantId: import("drizzle-orm/pg-core").PgColumn<{
      name: "variant_id";
      tableName: "order_line";
      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;
    }, {}, {}>;
    kind: import("drizzle-orm/pg-core").PgColumn<{
      name: "kind";
      tableName: "order_line";
      dataType: "string";
      columnType: "PgText";
      data: ProductKind;
      driverParam: string;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: [string, ...string[]];
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {
      $type: ProductKind;
    }>;
    qty: import("drizzle-orm/pg-core").PgColumn<{
      name: "qty";
      tableName: "order_line";
      dataType: "number";
      columnType: "PgInteger";
      data: number;
      driverParam: string | number;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: undefined;
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
    unitPrice: import("drizzle-orm/pg-core").PgColumn<{
      name: "unit_price";
      tableName: "order_line";
      dataType: "bigint";
      columnType: "PgBigInt64";
      data: bigint;
      driverParam: string;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: undefined;
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
    lineTotal: import("drizzle-orm/pg-core").PgColumn<{
      name: "line_total";
      tableName: "order_line";
      dataType: "bigint";
      columnType: "PgBigInt64";
      data: bigint;
      driverParam: string;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: undefined;
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
    vendorId: import("drizzle-orm/pg-core").PgColumn<{
      name: "vendor_id";
      tableName: "order_line";
      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;
    }, {}, {}>;
    createdAt: import("drizzle-orm/pg-core").PgColumn<{
      name: "created_at";
      tableName: "order_line";
      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;
    }, {}, {}>;
  };
  dialect: "pg";
}>;
declare const vendorSplit: import("drizzle-orm/pg-core").PgTableWithColumns<{
  name: "vendor_split";
  schema: undefined;
  columns: {
    id: import("drizzle-orm/pg-core").PgColumn<{
      name: "id";
      tableName: "vendor_split";
      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;
    }, {}, {}>;
    orderId: import("drizzle-orm/pg-core").PgColumn<{
      name: "order_id";
      tableName: "vendor_split";
      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;
    }, {}, {}>;
    vendorId: import("drizzle-orm/pg-core").PgColumn<{
      name: "vendor_id";
      tableName: "vendor_split";
      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;
    }, {}, {}>;
    amount: import("drizzle-orm/pg-core").PgColumn<{
      name: "amount";
      tableName: "vendor_split";
      dataType: "bigint";
      columnType: "PgBigInt64";
      data: bigint;
      driverParam: string;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: undefined;
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
    funder: import("drizzle-orm/pg-core").PgColumn<{
      name: "funder";
      tableName: "vendor_split";
      dataType: "string";
      columnType: "PgText";
      data: "platform" | "vendor";
      driverParam: string;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: [string, ...string[]];
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {
      $type: "platform" | "vendor";
    }>;
    createdAt: import("drizzle-orm/pg-core").PgColumn<{
      name: "created_at";
      tableName: "vendor_split";
      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;
    }, {}, {}>;
  };
  dialect: "pg";
}>;
declare const orderStep: import("drizzle-orm/pg-core").PgTableWithColumns<{
  name: "order_step";
  schema: undefined;
  columns: {
    id: import("drizzle-orm/pg-core").PgColumn<{
      name: "id";
      tableName: "order_step";
      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;
    }, {}, {}>;
    orderId: import("drizzle-orm/pg-core").PgColumn<{
      name: "order_id";
      tableName: "order_step";
      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;
    }, {}, {}>;
    stepId: import("drizzle-orm/pg-core").PgColumn<{
      name: "step_id";
      tableName: "order_step";
      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;
    }, {}, {}>;
    result: import("drizzle-orm/pg-core").PgColumn<{
      name: "result";
      tableName: "order_step";
      dataType: "json";
      columnType: "PgJsonb";
      data: unknown;
      driverParam: unknown;
      notNull: true;
      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: "order_step";
      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;
    }, {}, {}>;
  };
  dialect: "pg";
}>;
declare const refundIntent: import("drizzle-orm/pg-core").PgTableWithColumns<{
  name: "refund_intent";
  schema: undefined;
  columns: {
    id: import("drizzle-orm/pg-core").PgColumn<{
      name: "id";
      tableName: "refund_intent";
      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;
    }, {}, {}>;
    orderId: import("drizzle-orm/pg-core").PgColumn<{
      name: "order_id";
      tableName: "refund_intent";
      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;
    }, {}, {}>;
    seq: import("drizzle-orm/pg-core").PgColumn<{
      name: "seq";
      tableName: "refund_intent";
      dataType: "number";
      columnType: "PgInteger";
      data: number;
      driverParam: string | number;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: undefined;
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
    amount: import("drizzle-orm/pg-core").PgColumn<{
      name: "amount";
      tableName: "refund_intent";
      dataType: "bigint";
      columnType: "PgBigInt64";
      data: bigint;
      driverParam: string;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: undefined;
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
    status: import("drizzle-orm/pg-core").PgColumn<{
      name: "status";
      tableName: "refund_intent";
      dataType: "string";
      columnType: "PgText";
      data: "pending" | "failed" | "executed";
      driverParam: string;
      notNull: true;
      hasDefault: true;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: [string, ...string[]];
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {
      $type: "pending" | "failed" | "executed";
    }>;
    refundKey: import("drizzle-orm/pg-core").PgColumn<{
      name: "refund_key";
      tableName: "refund_intent";
      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;
    }, {}, {}>;
    providerRef: import("drizzle-orm/pg-core").PgColumn<{
      name: "provider_ref";
      tableName: "refund_intent";
      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;
    }, {}, {}>;
    createdAt: import("drizzle-orm/pg-core").PgColumn<{
      name: "created_at";
      tableName: "refund_intent";
      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: "refund_intent";
      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;
    }, {}, {}>;
  };
  dialect: "pg";
}>;
declare const ordersSchema: {
  order: import("drizzle-orm/pg-core").PgTableWithColumns<{
    name: "order";
    schema: undefined;
    columns: {
      id: import("drizzle-orm/pg-core").PgColumn<{
        name: "id";
        tableName: "order";
        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;
      }, {}, {}>;
      buyerUserId: import("drizzle-orm/pg-core").PgColumn<{
        name: "buyer_user_id";
        tableName: "order";
        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;
      }, {}, {}>;
      buyerGuestEmail: import("drizzle-orm/pg-core").PgColumn<{
        name: "buyer_guest_email";
        tableName: "order";
        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: "order";
        dataType: "string";
        columnType: "PgText";
        data: OrderStatus;
        driverParam: string;
        notNull: true;
        hasDefault: true;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: [string, ...string[]];
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {
        $type: OrderStatus;
      }>;
      currency: import("drizzle-orm/pg-core").PgColumn<{
        name: "currency";
        tableName: "order";
        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;
      }, {}, {}>;
      priceMode: import("drizzle-orm/pg-core").PgColumn<{
        name: "price_mode";
        tableName: "order";
        dataType: "string";
        columnType: "PgText";
        data: PriceMode;
        driverParam: string;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: [string, ...string[]];
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {
        $type: PriceMode;
      }>;
      subtotal: import("drizzle-orm/pg-core").PgColumn<{
        name: "subtotal";
        tableName: "order";
        dataType: "bigint";
        columnType: "PgBigInt64";
        data: bigint;
        driverParam: string;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: undefined;
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
      tax: import("drizzle-orm/pg-core").PgColumn<{
        name: "tax";
        tableName: "order";
        dataType: "bigint";
        columnType: "PgBigInt64";
        data: bigint;
        driverParam: string;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: undefined;
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
      discount: import("drizzle-orm/pg-core").PgColumn<{
        name: "discount";
        tableName: "order";
        dataType: "bigint";
        columnType: "PgBigInt64";
        data: bigint;
        driverParam: string;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: undefined;
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
      total: import("drizzle-orm/pg-core").PgColumn<{
        name: "total";
        tableName: "order";
        dataType: "bigint";
        columnType: "PgBigInt64";
        data: bigint;
        driverParam: string;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: undefined;
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
      chargeRef: import("drizzle-orm/pg-core").PgColumn<{
        name: "charge_ref";
        tableName: "order";
        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;
      }, {}, {}>;
      failureReason: import("drizzle-orm/pg-core").PgColumn<{
        name: "failure_reason";
        tableName: "order";
        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;
      }, {}, {}>;
      idempotencyKey: import("drizzle-orm/pg-core").PgColumn<{
        name: "idempotency_key";
        tableName: "order";
        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;
      }, {}, {}>;
      requestHash: import("drizzle-orm/pg-core").PgColumn<{
        name: "request_hash";
        tableName: "order";
        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;
      }, {}, {}>;
      createdAt: import("drizzle-orm/pg-core").PgColumn<{
        name: "created_at";
        tableName: "order";
        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: "order";
        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;
      }, {}, {}>;
    };
    dialect: "pg";
  }>;
  orderLine: import("drizzle-orm/pg-core").PgTableWithColumns<{
    name: "order_line";
    schema: undefined;
    columns: {
      id: import("drizzle-orm/pg-core").PgColumn<{
        name: "id";
        tableName: "order_line";
        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;
      }, {}, {}>;
      orderId: import("drizzle-orm/pg-core").PgColumn<{
        name: "order_id";
        tableName: "order_line";
        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;
      }, {}, {}>;
      variantId: import("drizzle-orm/pg-core").PgColumn<{
        name: "variant_id";
        tableName: "order_line";
        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;
      }, {}, {}>;
      kind: import("drizzle-orm/pg-core").PgColumn<{
        name: "kind";
        tableName: "order_line";
        dataType: "string";
        columnType: "PgText";
        data: ProductKind;
        driverParam: string;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: [string, ...string[]];
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {
        $type: ProductKind;
      }>;
      qty: import("drizzle-orm/pg-core").PgColumn<{
        name: "qty";
        tableName: "order_line";
        dataType: "number";
        columnType: "PgInteger";
        data: number;
        driverParam: string | number;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: undefined;
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
      unitPrice: import("drizzle-orm/pg-core").PgColumn<{
        name: "unit_price";
        tableName: "order_line";
        dataType: "bigint";
        columnType: "PgBigInt64";
        data: bigint;
        driverParam: string;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: undefined;
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
      lineTotal: import("drizzle-orm/pg-core").PgColumn<{
        name: "line_total";
        tableName: "order_line";
        dataType: "bigint";
        columnType: "PgBigInt64";
        data: bigint;
        driverParam: string;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: undefined;
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
      vendorId: import("drizzle-orm/pg-core").PgColumn<{
        name: "vendor_id";
        tableName: "order_line";
        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;
      }, {}, {}>;
      createdAt: import("drizzle-orm/pg-core").PgColumn<{
        name: "created_at";
        tableName: "order_line";
        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;
      }, {}, {}>;
    };
    dialect: "pg";
  }>;
  vendorSplit: import("drizzle-orm/pg-core").PgTableWithColumns<{
    name: "vendor_split";
    schema: undefined;
    columns: {
      id: import("drizzle-orm/pg-core").PgColumn<{
        name: "id";
        tableName: "vendor_split";
        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;
      }, {}, {}>;
      orderId: import("drizzle-orm/pg-core").PgColumn<{
        name: "order_id";
        tableName: "vendor_split";
        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;
      }, {}, {}>;
      vendorId: import("drizzle-orm/pg-core").PgColumn<{
        name: "vendor_id";
        tableName: "vendor_split";
        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;
      }, {}, {}>;
      amount: import("drizzle-orm/pg-core").PgColumn<{
        name: "amount";
        tableName: "vendor_split";
        dataType: "bigint";
        columnType: "PgBigInt64";
        data: bigint;
        driverParam: string;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: undefined;
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
      funder: import("drizzle-orm/pg-core").PgColumn<{
        name: "funder";
        tableName: "vendor_split";
        dataType: "string";
        columnType: "PgText";
        data: "platform" | "vendor";
        driverParam: string;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: [string, ...string[]];
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {
        $type: "platform" | "vendor";
      }>;
      createdAt: import("drizzle-orm/pg-core").PgColumn<{
        name: "created_at";
        tableName: "vendor_split";
        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;
      }, {}, {}>;
    };
    dialect: "pg";
  }>;
  orderStep: import("drizzle-orm/pg-core").PgTableWithColumns<{
    name: "order_step";
    schema: undefined;
    columns: {
      id: import("drizzle-orm/pg-core").PgColumn<{
        name: "id";
        tableName: "order_step";
        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;
      }, {}, {}>;
      orderId: import("drizzle-orm/pg-core").PgColumn<{
        name: "order_id";
        tableName: "order_step";
        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;
      }, {}, {}>;
      stepId: import("drizzle-orm/pg-core").PgColumn<{
        name: "step_id";
        tableName: "order_step";
        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;
      }, {}, {}>;
      result: import("drizzle-orm/pg-core").PgColumn<{
        name: "result";
        tableName: "order_step";
        dataType: "json";
        columnType: "PgJsonb";
        data: unknown;
        driverParam: unknown;
        notNull: true;
        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: "order_step";
        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;
      }, {}, {}>;
    };
    dialect: "pg";
  }>;
  refundIntent: import("drizzle-orm/pg-core").PgTableWithColumns<{
    name: "refund_intent";
    schema: undefined;
    columns: {
      id: import("drizzle-orm/pg-core").PgColumn<{
        name: "id";
        tableName: "refund_intent";
        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;
      }, {}, {}>;
      orderId: import("drizzle-orm/pg-core").PgColumn<{
        name: "order_id";
        tableName: "refund_intent";
        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;
      }, {}, {}>;
      seq: import("drizzle-orm/pg-core").PgColumn<{
        name: "seq";
        tableName: "refund_intent";
        dataType: "number";
        columnType: "PgInteger";
        data: number;
        driverParam: string | number;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: undefined;
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
      amount: import("drizzle-orm/pg-core").PgColumn<{
        name: "amount";
        tableName: "refund_intent";
        dataType: "bigint";
        columnType: "PgBigInt64";
        data: bigint;
        driverParam: string;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: undefined;
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
      status: import("drizzle-orm/pg-core").PgColumn<{
        name: "status";
        tableName: "refund_intent";
        dataType: "string";
        columnType: "PgText";
        data: "pending" | "failed" | "executed";
        driverParam: string;
        notNull: true;
        hasDefault: true;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: [string, ...string[]];
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {
        $type: "pending" | "failed" | "executed";
      }>;
      refundKey: import("drizzle-orm/pg-core").PgColumn<{
        name: "refund_key";
        tableName: "refund_intent";
        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;
      }, {}, {}>;
      providerRef: import("drizzle-orm/pg-core").PgColumn<{
        name: "provider_ref";
        tableName: "refund_intent";
        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;
      }, {}, {}>;
      createdAt: import("drizzle-orm/pg-core").PgColumn<{
        name: "created_at";
        tableName: "refund_intent";
        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: "refund_intent";
        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;
      }, {}, {}>;
    };
    dialect: "pg";
  }>;
};
type OrdersSchema = typeof ordersSchema;
//#endregion
export { OrderMigrateError as A, isOrderMigrateError as B, isOrderStatus as C, OrderIdempotencyConflictError as D, OrderChargeConflictError as E, ReturnTransitionError as F, isReturnTransitionError as G, isOrderNotFoundError as H, isImmutableFieldError as I, isOrderChargeConflictError as L, OrderNotFoundError as M, OrderValidationError as N, OrderIntegrityDetail as O, RefundExceedsPaidError as P, isOrderIdempotencyConflictError as R, VendorSplit as S, ImmutableFieldError as T, isOrderValidationError as U, isOrderNotChargeableError as V, isRefundExceedsPaidError as W, OrderStatus as _, ordersSchema as a, ProductKind as b, Actor as c, NewOrderLine as d, NewVendorSplit as f, OrderListFilter as g, OrderLine as h, orderStep as i, OrderNotChargeableError as j, OrderIntegrityError as k, BuyerRef as l, Order as m, order as n, refundIntent as o, ORDER_STATUSES as p, orderLine as r, vendorSplit as s, OrdersSchema as t, NewOrder as u, Page as v, ImmutableField as w, StepRecord as x, PriceMode as y, isOrderIntegrityError as z };