export type ExternalFileToSign = { organizationId: string; attribute?: string; fileName: string; contentType: string; }; export interface PresignedUrlData { elementType: string; elementHash: string; folderPath?: string; files: ExternalFileToSign[]; } export type IShopOrderPartBreakdown = { CONTRACT: string; ORDER_NO: string; PART_NO: string; MATERIAL_DESCRIPTION: string; SINGLE_PART_DESCRIPTION: string | null; MATERIAL_OP_DESCRIPTION: string | null; SINGLE_PART_QUANTITY: number | null; HEAT_NUMBER: string | null; HEAT_NUMBER_MATERIAL_HISTORY: string | null; QTY_REQUIRED: number | null; ATTRIBUTE_SUMMARY: string | null; BR_MATERIAL_LIST: string | null; RELATED_SHOP_ORDERS: string | null; }; export interface GetOperationsByShopOrder { contract: string; shopOrder: string; } export interface GetOperationsByOSMStatus { status: 'To Do' | 'Future'; contract: string; /** Max rows per page. Defaults to 25 server-side. Max 500. */ limit?: number; /** Skip N rows before returning (0-indexed). Defaults to 0. */ offset?: number; } export type OperationsQueryParams = GetOperationsByShopOrder | GetOperationsByOSMStatus; export type IOperation = { IMI_CONTRACT: string; IMI_REQ_NOTES: string | null; IMI_REQUISITION_NO: string | null; IMI_QUANTITY: number | null; IMI_SUPPLIER_ID: string | null; IMI_SUPPLIER_NAME: string | null; IMI_BUYER_CODE: string | null; IMI_BUYER: string | null; IMI_PRICE: number | null; IMI_PRICE_TOTAL: number | null; IMI_CURRENCY: string | null; IMI_WANTED_RECEIPT_DATE: string | null; IMI_WANTED_DELIVERY_DATE: string | null; IMI_PROJECT_ID: string | null; IMI_PROJECT_NAME: string | null; IMI_MANAGER_NAME: string | null; IMI_CREATED_DATE: string | null; IMI_SHOP_ORDER_NO: string; IMI_OPERATION_NO: number; IMI_OPERATION_ID: number; IMI_OP_START_DATE: string | null; IMI_OP_FINISH_DATE: string | null; IMI_OPERATION_STATE: string; IMI_WORK_CENTER_NO: string; IMI_WORK_CENTER_DESCRIPTION: string; NOTES: string; IMI_REMAINING_MFG_HOURS: number; IMI_PART_NO: string; IMI_ROUTING_REVISION: string; IMI_ROUTING_ALTERNATE: string; IMI_ROUTING_TYPE: string; IMI_OP10_FINISH_DATE: string | null; IMI_OP10_NOTES: string | null; /** Populated on status-branch calls: executable quantity per DBA rules. */ IMI_EXECUTABLE_QTY?: number | null; IMI_PREVIOUS_EXECUTABLE_QTY?: number | null; }; export interface RoutingAlternatesQueryParams { contract: string; partNo: string; routingRevision?: string; bomType?: string; alternativeNo?: string; } export type IRoutingAlternate = { IMI_CONTRACT: string; IMI_PART_NO: string; IMI_ROUTING_REVISION: string; IMI_ROUTING_TYPE: string; IMI_ROUTING_ALTERNATE: string; IMI_ROUTING_STATE: string; IMI_ALTERNATIVE_DESCRIPTION: string | null; }; export type IHandlingUnit = { SHIPMENT_ID: string; HANDLING_UNIT: string; MANUAL_GROSS_WEIGHT: number; BOX: string; LOCATION: string; WIDTH: number; HEIGHT: number; DEPTH: number; SHIPMENT_LINE: string; }; export type CustomerOrderLineByShopOrderParams = { shopOrder: string; }; export type CustomerOrderLineByProjectIdParams = { projectId: string; }; export type CustomerOrderLineQueryParams = CustomerOrderLineByShopOrderParams | CustomerOrderLineByProjectIdParams; export type ICustomerOrderLine = { ORDER_NO: string; PROJECT_ID: string; PART_NO: string; PROJECT_NAME: string; CUSTOMER_NAME: string; SERIAL_NO: string; PURCHASE_ORDER_NO: string; BUY_QTY_DUE: number; CATALOG_DESC: string; CATALOG_NO: string; LINE_NO: string; DATE_ENTERED: string; ACTIVITY_SEQ: number; }; export type IShipmentLineTable = { project_id: string; manager: string; shipment_id: number; shipment_line_no: number; handling_unit_id: number; col: string; source_part_no: string; source_part_description: string; quantity: number; source_ref1: string; source_unit_meas: string; customs_stat_no: string; }; export type IShipment = { SHIPMENT_ID: number; RECEIVER_ADDRESS_NAME: string | null; RECEIVER_ADDRESS1: string; RECEIVER_ADDRESS2: string | null; RECEIVER_ADDRESS3: string | null; RECEIVER_ADDRESS4: string | null; RECEIVER_ADDRESS5: string | null; RECEIVER_ADDRESS6: string | null; RECEIVER_ZIP_CODE: string; RECEIVER_CITY: string; RECEIVER_STATE: string; RECEIVER_COUNTY: string | null; COUNTRY_CODE: string; COUNTRY: string; ADJUSTED_NET_WEIGHT: number; DELIVERY_TERMS: string; PLANNED_SHIP_DATE: string; PLANNED_DELIVERY_DATE: string; }; export type IMaterialItem = { IMI_LINE_NO: number; IMI_PART_NO: string; IMI_MATERIAL_DESCRIPTION: string; IMI_MATERIAL_QTY: number; IMI_MATERIAL_STATE: string; IMI_MATERIAL_LOT_BATCH: string | null; IMI_MATERIAL_HEAT: string | null; IMI_MATERIAL_RESERVED: number; IMI_MATERIAL_NO: string | null; IMI_MATERIAL_ISSUED: number; }; export interface OSMMaterialsQueryParams { contract: string; shopOrderNos: string[]; } export type IOSMMaterial = { ORDER_NO: string; OPERATION_NO: string; LINE: number; COMPONENT_PART: string; COMPONENT_DESCRIPTION: string; UNIT_QTY: number; TOTAL_QTY: number; }; export type IToolItem = { IMI_OPERATION_NO: number; IMI_TOOL_ID: string; IMI_TOOL_DESCRIPTION: string; IMI_TOOL_QTY: number; IMI_TOOL_NOTE: string | null; }; export type IShopOrder = { IMI_CONTRACT: string; IMI_SHOP_ORDER_NO: string; IMI_RELEASE_NO: string; IMI_SEQUENCE_NO: string; IMI_SHOP_ORDER_TYPE: string; IMI_ROUTING_REVISION: string | null; IMI_ROUTING_ALTERNATE: string | null; IMI_PART_NO: string; IMI_PART_DESCRIPTION: string; IMI_LOT_SIZE: number; IMI_SHOP_ORDER_STATE: string; IMI_DRAWING_REVISION: string | null; IMI_PROJECT_ID: string; IMI_SUB_PROJECT_DESCRIPTION: string | null; IMI_ACTIVITY_DESCRIPTION: string | null; IMI_MANAGER_NAME: string | null; IMI_SUB_PROJECT_ID: string | null; IMI_PROJECT_NAME: string; IMI_EXT_URL: string | null; IMI_PROJECT_TYPE: 'AFM' | 'NC'; IMI_SO_START_DATE: string; IMI_MATERIAL_TABLE: string; IMI_TOOL_TABLE: string; }; export type IShipmentLine = { CUSTOMER: string; CUSTOMER_PO: string; PROJECT_ID: string; PROJECT_MANAGER: string; PART_NO: string; POSITION: string; DESCRIPTION: string; QTY: number; SHOP_ORDER: string | null; LOT_BATCH: string | null; MATERIAL_ATTRIBUTES_RAW: string | null; MATERIAL_ATTRIBUTES: string | null; }; export type IPurchaseOrderLine = { ORDER_NO: string; LINE_NO: string; RELEASE_NO: string; REQUISITION_NO: string | null; SO_RELEASE_NO: string | null; SO_SEQUENCE_NO: string | null; DEMAND_ORDER_NO: string | null; DEMAND_OPERATION_NO: string | null; PART_NO: string | null; PART_NAME: string | null; PROJECT_ID: string | null; VENDOR_NO: string; PO_SUPPLIER_NAME: string; POL_STATE: string; PROMISED_DD: string | null; WANTED_DD: string | null; ARRIVAL_DATE: string | null; BUYER_NAME: string | null; }; export type DocumentQueryParams = { docNo: string; docSheet: string; docRev: string; docType: string; }; export type IDocumentInfo = { PATH: string; FILE_NAME: string; }; export type SupplierByIdQueryParams = { supplierId: string; }; export type SupplierByPOQueryParams = { purchaseOrderId: string; contract: string; }; export type SupplierQueryParams = SupplierByIdQueryParams | SupplierByPOQueryParams; export type ISupplierInfo = { SUPPLIER_ID: string; ADDRESS_ID: string; NAME: string; ADDRESS: string | null; EAN_LOCATION: string | null; DOCUMENT_ADDRESS: string | null; ADDRESS1: string | null; ADDRESS2: string | null; ADDRESS3: string | null; ADDRESS4: string | null; ADDRESS5: string | null; ADDRESS6: string | null; ZIP_CODE: string | null; CITY: string | null; COUNTRY: string | null; STATE: string | null; PERSON_ID: string | null; CONTACT_NAME: string | null; PHONE: string | null; MOBILE: string | null; EMAIL: string | null; }; export type IPurchaseOrder = ISupplierInfo & { PURCHASE_ORDER_ID: string; }; export interface IRequisitionStatus { STATE: string; OBJSTATE: string; REQUISITION_NO: string; ORDER_NO: string | null; } export interface JobsOutputResponse { recordsets: T[][]; recordset: T[]; output: Record; rowsAffected: number[]; } export interface CreatedJobStatus { ID: number; } export type JobStatus = CreatedJobStatus & { JobGUID: string; InputParameterType: string; InputParameterValue: string; IsProcessed: boolean; SucceededWithoutError: boolean; TimeCreated: Date; TimeProcessingStarted: Date; TimeProcessingFinished: Date; }; export type JobOutput = { JOB_ID: number; JOB_GUID: string; } & CreatedJobStatus & Record; export interface PresignedUrlItem { url: string; documentId: string; } export interface PresignedUrlResponse { files: PresignedUrlItem[]; } export type SmbFileNode = { type: 'file'; name: string; path: string; size?: number; modifiedAt?: string; }; export type SmbFolderNode = { type: 'folder'; name: string; path: string; children: (SmbFolderNode | SmbFileNode)[]; };