Import finalized Olist production orders

This commit is contained in:
Cauê Faleiros
2026-08-12 10:57:18 -03:00
parent 42d64447d5
commit 6d3a1d6b1a
10 changed files with 494 additions and 7 deletions

View File

@@ -63,6 +63,7 @@ export interface ProductionOrderItem {
orderReference: string;
issueDate: string | null;
expectedDate: string | null;
completedDate: string | null;
productSku: string;
productDescription: string;
quantity: number;
@@ -256,6 +257,37 @@ export interface OlistStatus {
runs: OlistSyncRun[];
}
export interface ProductionOrderImportRun {
id: number;
filename: string;
status: 'running' | 'completed' | 'completed_with_errors' | 'failed';
totalRows: number;
imported: number;
updated: number;
skipped: number;
failed: number;
errorMessage: string;
startedAt: string;
completedAt: string | null;
}
export interface ProductionYieldRecommendation {
familyKey: 'BLCS' | 'BLOS' | 'BLMC' | 'BLPM';
sampleCount: number;
yieldSampleCount: number;
rollSampleCount: number;
avgYieldPiecesPerKg: number | null;
avgKgPerRoll: number | null;
recommendedUnitsPerRoll: number | null;
lastCompletedDate: string | null;
updatedAt: string;
}
export interface ProductionOrderImportData {
runs: ProductionOrderImportRun[];
recommendations: ProductionYieldRecommendation[];
}
export type CatalogProductPayload = {
type: CatalogProductType;
sku: string;