fix: resolve vendor data upload error by implementing client-side parsing and sequential batching

This commit is contained in:
Christian Vidal Wolf
2026-02-20 13:32:26 +01:00
parent a8258398f7
commit 85c789bf52
5 changed files with 162 additions and 65 deletions
+1 -19
View File
@@ -1,5 +1,6 @@
import { createClient, SupabaseClient } from '@supabase/supabase-js';
import { VendorDailyRow } from '../types';
const supabaseUrl = process.env.SUPABASE_URL || '';
const supabaseAnonKey = process.env.SUPABASE_ANON_KEY || '';
@@ -16,25 +17,6 @@ const getClient = (): SupabaseClient => {
return _client;
};
export interface VendorDailyRow {
id?: number;
date: string;
market: string;
asin: string;
product_title: string | null;
tags: string | null;
bsr_top_rank: number | null;
bsr_top_category: string | null;
bsr_detail_rank: number | null;
bsr_detail_category: string | null;
avg_rating: number | null;
num_reviews: number | null;
buybox_owner: string | null;
buybox_price: number | null;
amazon_has_buybox: boolean | null;
glance_views: number | null;
}
export interface VendorFilters {
markets?: string[];
tags?: string[];