import { markInvariantsSatisfied as markOutboundShipmentInvariantsSatisfied, type OutboundShipment as OutboundShipmentAggregate, } from "../domain/outboundShipment"; import type { Item, StorageLocation } from "./moduleMocks"; // Item fixtures (from item-management query contract) export const baseActiveItem = { id: "item-1", sku: "SKU-001", name: "Active Widget", barcode: "BAR-001", unitId: "unit-ea", status: "ACTIVE", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies Item; export const baseInactiveItem = { ...baseActiveItem, id: "item-3", sku: "SKU-003", name: "Inactive Widget", barcode: "BAR-003", status: "INACTIVE", } as const satisfies Item; // StorageLocation fixtures (from inventory query contract) export const baseStorageLocation = { id: "location-1", name: "Main Shelf", code: "MAIN", siteId: "site-1", storageCondition: null, capacity: null, status: "ACTIVE", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies StorageLocation; export const baseInactiveLocation = { ...baseStorageLocation, id: "location-3", name: "Inactive Area", code: "OLD", status: "INACTIVE", } as const satisfies StorageLocation; // OutboundShipment aggregate fixtures export const baseOutboundShipment: OutboundShipmentAggregate = markOutboundShipmentInvariantsSatisfied({ id: "outbound-shipment-1", header: { status: "DRAFT", effectiveDate: new Date("2024-01-10T00:00:00.000Z"), postedAt: null, customFields: {}, }, lines: [ { id: "outbound-shipment-line-1", itemId: "item-1", quantity: "5", unitId: "unit-box", primaryQuantity: "10", primaryUnitId: "unit-ea", unitConversionRate: "2", storageLocationId: "location-1", stockType: "AVAILABLE", sourceDocumentType: "SALES_ORDER", sourceDocumentId: "so-1", sourceLineId: "so-line-1", customFields: {}, }, ], });