Add Olist sync logs and stop control
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 47s

This commit is contained in:
Cauê Faleiros
2026-08-10 14:25:38 -03:00
parent 944f3a58d0
commit f836319041
6 changed files with 393 additions and 39 deletions

View File

@@ -208,9 +208,10 @@ export interface OlistSyncRun {
id: number;
trigger: 'manual' | 'scheduled';
mode: 'full' | 'incremental';
status: 'running' | 'completed' | 'failed';
status: 'running' | 'completed' | 'failed' | 'cancelled';
startedAt: string;
completedAt: string | null;
cancelRequestedAt: string | null;
productsScanned: number;
manufacturedProducts: number;
imported: number;
@@ -222,6 +223,24 @@ export interface OlistSyncRun {
details: Array<{ productId?: number; sku?: string; error?: string }>;
}
export interface OlistSyncEvent {
id: number;
level: 'info' | 'error';
eventType: string;
message: string;
productId: string | null;
sku: string;
productDescription: string;
metadata: Record<string, number | string>;
createdAt: string;
}
export interface OlistRunDetails {
run: OlistSyncRun;
events: { items: OlistSyncEvent[]; total: number; page: number; pageSize: number };
affectedProducts: { items: OlistSyncEvent[]; total: number; page: number; pageSize: number };
}
export interface OlistStatus {
configured: boolean;
connected: boolean;