@flowselections/floriday-verkoop-module 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist-lib/components/floriday/FlorydaySyncHealthBanner.d.ts +9 -0
  2. package/dist-lib/components/floriday/FlorydaySyncHealthBanner.d.ts.map +1 -0
  3. package/dist-lib/components/floriday/FlorydaySyncHealthBanner.js +26 -0
  4. package/dist-lib/components/verkoop/CreateOrderPage.d.ts.map +1 -1
  5. package/dist-lib/components/verkoop/CreateOrderPage.js +6 -9
  6. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts.map +1 -1
  7. package/dist-lib/components/verkoop/VerkoopOrdersPage.js +2 -1
  8. package/dist-lib/integrations/supabase/auth-middleware.d.ts +2667 -169
  9. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  10. package/dist-lib/integrations/supabase/client.d.ts +2667 -169
  11. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  12. package/dist-lib/integrations/supabase/client.server.d.ts +2667 -169
  13. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  14. package/dist-lib/integrations/supabase/types.d.ts +2736 -155
  15. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  16. package/dist-lib/integrations/supabase/types.js +2 -0
  17. package/dist-lib/lib/floriday-gateway.server.d.ts +42 -0
  18. package/dist-lib/lib/floriday-gateway.server.d.ts.map +1 -0
  19. package/dist-lib/lib/floriday-gateway.server.js +222 -0
  20. package/dist-lib/lib/floriday-public.functions.d.ts +63971 -0
  21. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -0
  22. package/dist-lib/lib/floriday-public.functions.js +210 -0
  23. package/dist-lib/lib/floriday-sync.d.ts.map +1 -1
  24. package/dist-lib/lib/floriday-sync.js +18 -79
  25. package/dist-lib/lib/floriday-writes.functions.d.ts +45678 -0
  26. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -0
  27. package/dist-lib/lib/floriday-writes.functions.js +110 -0
  28. package/dist-lib/lib/salesorders.functions.d.ts +17178 -9683
  29. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  30. package/dist-lib/lib/salesorders.functions.js +44 -86
  31. package/dist-lib/lib/tradeitems.functions.d.ts +2667 -169
  32. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  33. package/dist-lib/lib/useSalesOrdersQuery.d.ts.map +1 -1
  34. package/dist-lib/lib/useSalesOrdersQuery.js +11 -25
  35. package/package.json +1 -1
@@ -7,6 +7,48 @@ export type Database = {
7
7
  };
8
8
  public: {
9
9
  Tables: {
10
+ afhandeling_settings: {
11
+ Row: {
12
+ created_at: string;
13
+ id: string;
14
+ max_workdays_earlier_pick: number;
15
+ pick_days_before_transport: number;
16
+ pick_distribution_enabled: boolean;
17
+ signup_mail_enabled: boolean;
18
+ signup_mail_lead_minutes: number;
19
+ signup_mail_purpose: string;
20
+ transport_register_days_before: number;
21
+ updated_at: string;
22
+ user_id: string;
23
+ };
24
+ Insert: {
25
+ created_at?: string;
26
+ id?: string;
27
+ max_workdays_earlier_pick?: number;
28
+ pick_days_before_transport?: number;
29
+ pick_distribution_enabled?: boolean;
30
+ signup_mail_enabled?: boolean;
31
+ signup_mail_lead_minutes?: number;
32
+ signup_mail_purpose?: string;
33
+ transport_register_days_before?: number;
34
+ updated_at?: string;
35
+ user_id: string;
36
+ };
37
+ Update: {
38
+ created_at?: string;
39
+ id?: string;
40
+ max_workdays_earlier_pick?: number;
41
+ pick_days_before_transport?: number;
42
+ pick_distribution_enabled?: boolean;
43
+ signup_mail_enabled?: boolean;
44
+ signup_mail_lead_minutes?: number;
45
+ signup_mail_purpose?: string;
46
+ transport_register_days_before?: number;
47
+ updated_at?: string;
48
+ user_id?: string;
49
+ };
50
+ Relationships: [];
51
+ };
10
52
  agenda_connections: {
11
53
  Row: {
12
54
  account_email: string | null;
@@ -416,6 +458,53 @@ export type Database = {
416
458
  }
417
459
  ];
418
460
  };
461
+ carrier_signup_dispatches: {
462
+ Row: {
463
+ carrier_id: string;
464
+ cart_count: number;
465
+ created_at: string;
466
+ id: string;
467
+ order_count: number;
468
+ outbox_id: string | null;
469
+ pickup_date: string;
470
+ pickup_moment_key: string;
471
+ sent_at: string;
472
+ signup_deadline: string;
473
+ };
474
+ Insert: {
475
+ carrier_id: string;
476
+ cart_count?: number;
477
+ created_at?: string;
478
+ id?: string;
479
+ order_count?: number;
480
+ outbox_id?: string | null;
481
+ pickup_date: string;
482
+ pickup_moment_key: string;
483
+ sent_at?: string;
484
+ signup_deadline: string;
485
+ };
486
+ Update: {
487
+ carrier_id?: string;
488
+ cart_count?: number;
489
+ created_at?: string;
490
+ id?: string;
491
+ order_count?: number;
492
+ outbox_id?: string | null;
493
+ pickup_date?: string;
494
+ pickup_moment_key?: string;
495
+ sent_at?: string;
496
+ signup_deadline?: string;
497
+ };
498
+ Relationships: [
499
+ {
500
+ foreignKeyName: "carrier_signup_dispatches_carrier_id_fkey";
501
+ columns: ["carrier_id"];
502
+ isOneToOne: false;
503
+ referencedRelation: "carriers";
504
+ referencedColumns: ["id"];
505
+ }
506
+ ];
507
+ };
419
508
  carriers: {
420
509
  Row: {
421
510
  address: string | null;
@@ -424,11 +513,18 @@ export type Database = {
424
513
  delivery_days: number | null;
425
514
  email: string | null;
426
515
  id: string;
516
+ is_default: boolean;
427
517
  name: string;
428
518
  notes: string | null;
429
519
  phone: string | null;
520
+ pickup_moments: Json;
521
+ service_cities: string[];
522
+ service_countries: string[];
523
+ service_provinces: string[];
524
+ signup_days_before_delivery: number;
430
525
  signup_time_1: string | null;
431
526
  signup_time_2: string | null;
527
+ sort_order: number;
432
528
  updated_at: string;
433
529
  user_id: string;
434
530
  };
@@ -439,11 +535,18 @@ export type Database = {
439
535
  delivery_days?: number | null;
440
536
  email?: string | null;
441
537
  id?: string;
538
+ is_default?: boolean;
442
539
  name: string;
443
540
  notes?: string | null;
444
541
  phone?: string | null;
542
+ pickup_moments?: Json;
543
+ service_cities?: string[];
544
+ service_countries?: string[];
545
+ service_provinces?: string[];
546
+ signup_days_before_delivery?: number;
445
547
  signup_time_1?: string | null;
446
548
  signup_time_2?: string | null;
549
+ sort_order?: number;
447
550
  updated_at?: string;
448
551
  user_id: string;
449
552
  };
@@ -454,16 +557,62 @@ export type Database = {
454
557
  delivery_days?: number | null;
455
558
  email?: string | null;
456
559
  id?: string;
560
+ is_default?: boolean;
457
561
  name?: string;
458
562
  notes?: string | null;
459
563
  phone?: string | null;
564
+ pickup_moments?: Json;
565
+ service_cities?: string[];
566
+ service_countries?: string[];
567
+ service_provinces?: string[];
568
+ signup_days_before_delivery?: number;
460
569
  signup_time_1?: string | null;
461
570
  signup_time_2?: string | null;
571
+ sort_order?: number;
462
572
  updated_at?: string;
463
573
  user_id?: string;
464
574
  };
465
575
  Relationships: [];
466
576
  };
577
+ cart_pick_overrides: {
578
+ Row: {
579
+ cart_index: number;
580
+ created_at: string;
581
+ id: string;
582
+ moved_from_date: string | null;
583
+ notes: string | null;
584
+ order_id: string;
585
+ order_source: string;
586
+ pick_date: string;
587
+ status: string;
588
+ updated_at: string;
589
+ };
590
+ Insert: {
591
+ cart_index: number;
592
+ created_at?: string;
593
+ id?: string;
594
+ moved_from_date?: string | null;
595
+ notes?: string | null;
596
+ order_id: string;
597
+ order_source: string;
598
+ pick_date: string;
599
+ status?: string;
600
+ updated_at?: string;
601
+ };
602
+ Update: {
603
+ cart_index?: number;
604
+ created_at?: string;
605
+ id?: string;
606
+ moved_from_date?: string | null;
607
+ notes?: string | null;
608
+ order_id?: string;
609
+ order_source?: string;
610
+ pick_date?: string;
611
+ status?: string;
612
+ updated_at?: string;
613
+ };
614
+ Relationships: [];
615
+ };
467
616
  collections: {
468
617
  Row: {
469
618
  created_at: string;
@@ -579,50 +728,75 @@ export type Database = {
579
728
  customer_delivery_locations: {
580
729
  Row: {
581
730
  address_line: string | null;
731
+ carrier_assignment_source: string;
732
+ carrier_id: string | null;
582
733
  city: string | null;
583
734
  country: string | null;
584
735
  created_at: string;
585
736
  customer_id: string;
586
737
  floriday_location_id: string | null;
587
738
  gln: string | null;
739
+ house_number: string | null;
588
740
  id: string;
589
741
  is_primary: boolean;
590
742
  name: string | null;
591
743
  postal_code: string | null;
744
+ province: string | null;
592
745
  raw: Json | null;
746
+ self_pickup: boolean;
747
+ street: string | null;
593
748
  updated_at: string;
594
749
  };
595
750
  Insert: {
596
751
  address_line?: string | null;
752
+ carrier_assignment_source?: string;
753
+ carrier_id?: string | null;
597
754
  city?: string | null;
598
755
  country?: string | null;
599
756
  created_at?: string;
600
757
  customer_id: string;
601
758
  floriday_location_id?: string | null;
602
759
  gln?: string | null;
760
+ house_number?: string | null;
603
761
  id?: string;
604
762
  is_primary?: boolean;
605
763
  name?: string | null;
606
764
  postal_code?: string | null;
765
+ province?: string | null;
607
766
  raw?: Json | null;
767
+ self_pickup?: boolean;
768
+ street?: string | null;
608
769
  updated_at?: string;
609
770
  };
610
771
  Update: {
611
772
  address_line?: string | null;
773
+ carrier_assignment_source?: string;
774
+ carrier_id?: string | null;
612
775
  city?: string | null;
613
776
  country?: string | null;
614
777
  created_at?: string;
615
778
  customer_id?: string;
616
779
  floriday_location_id?: string | null;
617
780
  gln?: string | null;
781
+ house_number?: string | null;
618
782
  id?: string;
619
783
  is_primary?: boolean;
620
784
  name?: string | null;
621
785
  postal_code?: string | null;
786
+ province?: string | null;
622
787
  raw?: Json | null;
788
+ self_pickup?: boolean;
789
+ street?: string | null;
623
790
  updated_at?: string;
624
791
  };
625
792
  Relationships: [
793
+ {
794
+ foreignKeyName: "customer_delivery_locations_carrier_id_fkey";
795
+ columns: ["carrier_id"];
796
+ isOneToOne: false;
797
+ referencedRelation: "carriers";
798
+ referencedColumns: ["id"];
799
+ },
626
800
  {
627
801
  foreignKeyName: "customer_delivery_locations_customer_id_fkey";
628
802
  columns: ["customer_id"];
@@ -1450,18 +1624,21 @@ export type Database = {
1450
1624
  };
1451
1625
  email_auth_purpose_settings: {
1452
1626
  Row: {
1627
+ default_cc: string[];
1453
1628
  purpose: string;
1454
1629
  reply_to: string | null;
1455
1630
  updated_at: string;
1456
1631
  updated_by: string | null;
1457
1632
  };
1458
1633
  Insert: {
1634
+ default_cc?: string[];
1459
1635
  purpose: string;
1460
1636
  reply_to?: string | null;
1461
1637
  updated_at?: string;
1462
1638
  updated_by?: string | null;
1463
1639
  };
1464
1640
  Update: {
1641
+ default_cc?: string[];
1465
1642
  purpose?: string;
1466
1643
  reply_to?: string | null;
1467
1644
  updated_at?: string;
@@ -2257,6 +2434,53 @@ export type Database = {
2257
2434
  }
2258
2435
  ];
2259
2436
  };
2437
+ exact_push_queue: {
2438
+ Row: {
2439
+ attempts: number;
2440
+ connection_id: string;
2441
+ created_at: string;
2442
+ external_id: string | null;
2443
+ id: string;
2444
+ idempotency_hash: string;
2445
+ last_error: string | null;
2446
+ payload: Json;
2447
+ status: Database["public"]["Enums"]["exact_push_status"];
2448
+ updated_at: string;
2449
+ };
2450
+ Insert: {
2451
+ attempts?: number;
2452
+ connection_id: string;
2453
+ created_at?: string;
2454
+ external_id?: string | null;
2455
+ id?: string;
2456
+ idempotency_hash: string;
2457
+ last_error?: string | null;
2458
+ payload: Json;
2459
+ status?: Database["public"]["Enums"]["exact_push_status"];
2460
+ updated_at?: string;
2461
+ };
2462
+ Update: {
2463
+ attempts?: number;
2464
+ connection_id?: string;
2465
+ created_at?: string;
2466
+ external_id?: string | null;
2467
+ id?: string;
2468
+ idempotency_hash?: string;
2469
+ last_error?: string | null;
2470
+ payload?: Json;
2471
+ status?: Database["public"]["Enums"]["exact_push_status"];
2472
+ updated_at?: string;
2473
+ };
2474
+ Relationships: [
2475
+ {
2476
+ foreignKeyName: "exact_push_queue_connection_id_fkey";
2477
+ columns: ["connection_id"];
2478
+ isOneToOne: false;
2479
+ referencedRelation: "exact_connections";
2480
+ referencedColumns: ["id"];
2481
+ }
2482
+ ];
2483
+ };
2260
2484
  exact_refresh_locks: {
2261
2485
  Row: {
2262
2486
  environment: Database["public"]["Enums"]["exact_env"];
@@ -2319,6 +2543,8 @@ export type Database = {
2319
2543
  connection_id: string;
2320
2544
  last_error: string | null;
2321
2545
  last_modified_cursor: string | null;
2546
+ last_modified_cursor_customers: string | null;
2547
+ last_modified_cursor_invoices: string | null;
2322
2548
  last_synced_at: string | null;
2323
2549
  status: string;
2324
2550
  updated_at: string;
@@ -2327,6 +2553,8 @@ export type Database = {
2327
2553
  connection_id: string;
2328
2554
  last_error?: string | null;
2329
2555
  last_modified_cursor?: string | null;
2556
+ last_modified_cursor_customers?: string | null;
2557
+ last_modified_cursor_invoices?: string | null;
2330
2558
  last_synced_at?: string | null;
2331
2559
  status?: string;
2332
2560
  updated_at?: string;
@@ -2335,6 +2563,8 @@ export type Database = {
2335
2563
  connection_id?: string;
2336
2564
  last_error?: string | null;
2337
2565
  last_modified_cursor?: string | null;
2566
+ last_modified_cursor_customers?: string | null;
2567
+ last_modified_cursor_invoices?: string | null;
2338
2568
  last_synced_at?: string | null;
2339
2569
  status?: string;
2340
2570
  updated_at?: string;
@@ -2377,6 +2607,54 @@ export type Database = {
2377
2607
  };
2378
2608
  Relationships: [];
2379
2609
  };
2610
+ external_invoice_providers: {
2611
+ Row: {
2612
+ color: string | null;
2613
+ created_at: string;
2614
+ hmac_secret_name: string | null;
2615
+ icon: string | null;
2616
+ is_enabled: boolean;
2617
+ label: string;
2618
+ last_synced_at: string | null;
2619
+ provider: string;
2620
+ push_endpoint: string | null;
2621
+ sort_order: number;
2622
+ status_endpoint: string | null;
2623
+ sync_endpoint: string | null;
2624
+ updated_at: string;
2625
+ };
2626
+ Insert: {
2627
+ color?: string | null;
2628
+ created_at?: string;
2629
+ hmac_secret_name?: string | null;
2630
+ icon?: string | null;
2631
+ is_enabled?: boolean;
2632
+ label: string;
2633
+ last_synced_at?: string | null;
2634
+ provider: string;
2635
+ push_endpoint?: string | null;
2636
+ sort_order?: number;
2637
+ status_endpoint?: string | null;
2638
+ sync_endpoint?: string | null;
2639
+ updated_at?: string;
2640
+ };
2641
+ Update: {
2642
+ color?: string | null;
2643
+ created_at?: string;
2644
+ hmac_secret_name?: string | null;
2645
+ icon?: string | null;
2646
+ is_enabled?: boolean;
2647
+ label?: string;
2648
+ last_synced_at?: string | null;
2649
+ provider?: string;
2650
+ push_endpoint?: string | null;
2651
+ sort_order?: number;
2652
+ status_endpoint?: string | null;
2653
+ sync_endpoint?: string | null;
2654
+ updated_at?: string;
2655
+ };
2656
+ Relationships: [];
2657
+ };
2380
2658
  extra_categories: {
2381
2659
  Row: {
2382
2660
  created_at: string;
@@ -2401,6 +2679,33 @@ export type Database = {
2401
2679
  };
2402
2680
  Relationships: [];
2403
2681
  };
2682
+ extra_pricing_types: {
2683
+ Row: {
2684
+ code: string;
2685
+ created_at: string;
2686
+ id: string;
2687
+ label: string;
2688
+ sort_order: number;
2689
+ updated_at: string;
2690
+ };
2691
+ Insert: {
2692
+ code: string;
2693
+ created_at?: string;
2694
+ id?: string;
2695
+ label: string;
2696
+ sort_order?: number;
2697
+ updated_at?: string;
2698
+ };
2699
+ Update: {
2700
+ code?: string;
2701
+ created_at?: string;
2702
+ id?: string;
2703
+ label?: string;
2704
+ sort_order?: number;
2705
+ updated_at?: string;
2706
+ };
2707
+ Relationships: [];
2708
+ };
2404
2709
  extras: {
2405
2710
  Row: {
2406
2711
  category: string;
@@ -2524,43 +2829,37 @@ export type Database = {
2524
2829
  };
2525
2830
  Relationships: [];
2526
2831
  };
2527
- floriday_carriers_cache: {
2832
+ floriday_additional_services_cache: {
2528
2833
  Row: {
2529
- connection_id: string | null;
2530
- created_at: string;
2834
+ connection_id: string;
2531
2835
  data: Json;
2532
2836
  fetched_at: string;
2533
- gln_code: string | null;
2534
- id: string;
2535
- name: string | null;
2536
- organization_id: string;
2837
+ floriday_id: string;
2838
+ is_deleted: boolean;
2839
+ sequence_number: number;
2537
2840
  updated_at: string;
2538
2841
  };
2539
2842
  Insert: {
2540
- connection_id?: string | null;
2541
- created_at?: string;
2843
+ connection_id: string;
2542
2844
  data: Json;
2543
2845
  fetched_at?: string;
2544
- gln_code?: string | null;
2545
- id?: string;
2546
- name?: string | null;
2547
- organization_id: string;
2846
+ floriday_id: string;
2847
+ is_deleted?: boolean;
2848
+ sequence_number?: number;
2548
2849
  updated_at?: string;
2549
2850
  };
2550
2851
  Update: {
2551
- connection_id?: string | null;
2552
- created_at?: string;
2852
+ connection_id?: string;
2553
2853
  data?: Json;
2554
2854
  fetched_at?: string;
2555
- gln_code?: string | null;
2556
- id?: string;
2557
- name?: string | null;
2558
- organization_id?: string;
2855
+ floriday_id?: string;
2856
+ is_deleted?: boolean;
2857
+ sequence_number?: number;
2559
2858
  updated_at?: string;
2560
2859
  };
2561
2860
  Relationships: [
2562
2861
  {
2563
- foreignKeyName: "floriday_carriers_cache_connection_id_fkey";
2862
+ foreignKeyName: "floriday_additional_services_cache_connection_id_fkey";
2564
2863
  columns: ["connection_id"];
2565
2864
  isOneToOne: false;
2566
2865
  referencedRelation: "floriday_connections";
@@ -2568,100 +2867,1185 @@ export type Database = {
2568
2867
  }
2569
2868
  ];
2570
2869
  };
2571
- floriday_connections: {
2870
+ floriday_agreement_calloffs_cache: {
2572
2871
  Row: {
2573
- access_token: string | null;
2574
- api_key: string;
2575
- client_id: string;
2576
- client_secret: string;
2577
- created_at: string;
2578
- customers_endpoint: string | null;
2579
- environment: string;
2580
- gln_code: string | null;
2872
+ agreement_id: string | null;
2873
+ connection_id: string;
2874
+ data: Json;
2875
+ delivery_date: string | null;
2876
+ fetched_at: string;
2877
+ floriday_id: string;
2581
2878
  id: string;
2582
- is_active: boolean;
2583
- label: string;
2584
- organization_name: string | null;
2585
- preferred_warehouse_id: string | null;
2586
- preferred_warehouse_name: string | null;
2587
- token_expires_at: string | null;
2879
+ is_deleted: boolean;
2880
+ sequence_number: number;
2881
+ status: string | null;
2588
2882
  updated_at: string;
2589
2883
  };
2590
2884
  Insert: {
2591
- access_token?: string | null;
2592
- api_key: string;
2593
- client_id: string;
2594
- client_secret: string;
2595
- created_at?: string;
2596
- customers_endpoint?: string | null;
2597
- environment: string;
2598
- gln_code?: string | null;
2885
+ agreement_id?: string | null;
2886
+ connection_id: string;
2887
+ data?: Json;
2888
+ delivery_date?: string | null;
2889
+ fetched_at?: string;
2890
+ floriday_id: string;
2599
2891
  id?: string;
2600
- is_active?: boolean;
2601
- label?: string;
2602
- organization_name?: string | null;
2603
- preferred_warehouse_id?: string | null;
2604
- preferred_warehouse_name?: string | null;
2605
- token_expires_at?: string | null;
2892
+ is_deleted?: boolean;
2893
+ sequence_number?: number;
2894
+ status?: string | null;
2606
2895
  updated_at?: string;
2607
2896
  };
2608
2897
  Update: {
2609
- access_token?: string | null;
2610
- api_key?: string;
2611
- client_id?: string;
2612
- client_secret?: string;
2613
- created_at?: string;
2614
- customers_endpoint?: string | null;
2615
- environment?: string;
2616
- gln_code?: string | null;
2898
+ agreement_id?: string | null;
2899
+ connection_id?: string;
2900
+ data?: Json;
2901
+ delivery_date?: string | null;
2902
+ fetched_at?: string;
2903
+ floriday_id?: string;
2617
2904
  id?: string;
2618
- is_active?: boolean;
2619
- label?: string;
2620
- organization_name?: string | null;
2621
- preferred_warehouse_id?: string | null;
2622
- preferred_warehouse_name?: string | null;
2623
- token_expires_at?: string | null;
2905
+ is_deleted?: boolean;
2906
+ sequence_number?: number;
2907
+ status?: string | null;
2624
2908
  updated_at?: string;
2625
2909
  };
2626
- Relationships: [];
2910
+ Relationships: [
2911
+ {
2912
+ foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
2913
+ columns: ["connection_id"];
2914
+ isOneToOne: false;
2915
+ referencedRelation: "floriday_connections";
2916
+ referencedColumns: ["id"];
2917
+ }
2918
+ ];
2627
2919
  };
2628
- floriday_connections_cache: {
2920
+ floriday_agreements_cache: {
2629
2921
  Row: {
2630
2922
  buyer_organization_id: string | null;
2631
- buyer_organization_name: string | null;
2632
2923
  connection_id: string;
2633
2924
  data: Json;
2634
- floriday_connection_id: string;
2925
+ fetched_at: string;
2926
+ floriday_id: string;
2927
+ id: string;
2635
2928
  is_deleted: boolean;
2636
2929
  sequence_number: number;
2637
2930
  status: string | null;
2638
- synced_at: string;
2931
+ updated_at: string;
2932
+ valid_from: string | null;
2933
+ valid_until: string | null;
2639
2934
  };
2640
2935
  Insert: {
2641
2936
  buyer_organization_id?: string | null;
2642
- buyer_organization_name?: string | null;
2937
+ connection_id: string;
2938
+ data?: Json;
2939
+ fetched_at?: string;
2940
+ floriday_id: string;
2941
+ id?: string;
2942
+ is_deleted?: boolean;
2943
+ sequence_number?: number;
2944
+ status?: string | null;
2945
+ updated_at?: string;
2946
+ valid_from?: string | null;
2947
+ valid_until?: string | null;
2948
+ };
2949
+ Update: {
2950
+ buyer_organization_id?: string | null;
2951
+ connection_id?: string;
2952
+ data?: Json;
2953
+ fetched_at?: string;
2954
+ floriday_id?: string;
2955
+ id?: string;
2956
+ is_deleted?: boolean;
2957
+ sequence_number?: number;
2958
+ status?: string | null;
2959
+ updated_at?: string;
2960
+ valid_from?: string | null;
2961
+ valid_until?: string | null;
2962
+ };
2963
+ Relationships: [
2964
+ {
2965
+ foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
2966
+ columns: ["connection_id"];
2967
+ isOneToOne: false;
2968
+ referencedRelation: "floriday_connections";
2969
+ referencedColumns: ["id"];
2970
+ }
2971
+ ];
2972
+ };
2973
+ floriday_auction_letters_cache: {
2974
+ Row: {
2975
+ auction_letter_code: string;
2976
+ clock_supply_id: string;
2977
+ connection_id: string;
2978
+ content_type: string;
2979
+ fetched_at: string;
2980
+ id: string;
2981
+ storage_path: string;
2982
+ };
2983
+ Insert: {
2984
+ auction_letter_code: string;
2985
+ clock_supply_id: string;
2986
+ connection_id: string;
2987
+ content_type?: string;
2988
+ fetched_at?: string;
2989
+ id?: string;
2990
+ storage_path: string;
2991
+ };
2992
+ Update: {
2993
+ auction_letter_code?: string;
2994
+ clock_supply_id?: string;
2995
+ connection_id?: string;
2996
+ content_type?: string;
2997
+ fetched_at?: string;
2998
+ id?: string;
2999
+ storage_path?: string;
3000
+ };
3001
+ Relationships: [
3002
+ {
3003
+ foreignKeyName: "floriday_auction_letters_cache_connection_id_fkey";
3004
+ columns: ["connection_id"];
3005
+ isOneToOne: false;
3006
+ referencedRelation: "floriday_connections";
3007
+ referencedColumns: ["id"];
3008
+ }
3009
+ ];
3010
+ };
3011
+ floriday_base_items_cache: {
3012
+ Row: {
2643
3013
  connection_id: string;
2644
3014
  data: Json;
2645
- floriday_connection_id: string;
3015
+ fetched_at: string;
3016
+ floriday_id: string;
3017
+ is_deleted: boolean;
3018
+ sequence_number: number;
3019
+ updated_at: string;
3020
+ };
3021
+ Insert: {
3022
+ connection_id: string;
3023
+ data: Json;
3024
+ fetched_at?: string;
3025
+ floriday_id: string;
3026
+ is_deleted?: boolean;
3027
+ sequence_number?: number;
3028
+ updated_at?: string;
3029
+ };
3030
+ Update: {
3031
+ connection_id?: string;
3032
+ data?: Json;
3033
+ fetched_at?: string;
3034
+ floriday_id?: string;
3035
+ is_deleted?: boolean;
3036
+ sequence_number?: number;
3037
+ updated_at?: string;
3038
+ };
3039
+ Relationships: [
3040
+ {
3041
+ foreignKeyName: "floriday_base_items_cache_connection_id_fkey";
3042
+ columns: ["connection_id"];
3043
+ isOneToOne: false;
3044
+ referencedRelation: "floriday_connections";
3045
+ referencedColumns: ["id"];
3046
+ }
3047
+ ];
3048
+ };
3049
+ floriday_blanket_orders_cache: {
3050
+ Row: {
3051
+ connection_id: string;
3052
+ contract_id: string | null;
3053
+ created_at: string;
3054
+ data: Json;
3055
+ fetched_at: string;
3056
+ floriday_id: string;
3057
+ id: string;
3058
+ is_deleted: boolean;
3059
+ sequence_number: number;
3060
+ updated_at: string;
3061
+ };
3062
+ Insert: {
3063
+ connection_id: string;
3064
+ contract_id?: string | null;
3065
+ created_at?: string;
3066
+ data: Json;
3067
+ fetched_at?: string;
3068
+ floriday_id: string;
3069
+ id?: string;
3070
+ is_deleted?: boolean;
3071
+ sequence_number?: number;
3072
+ updated_at?: string;
3073
+ };
3074
+ Update: {
3075
+ connection_id?: string;
3076
+ contract_id?: string | null;
3077
+ created_at?: string;
3078
+ data?: Json;
3079
+ fetched_at?: string;
3080
+ floriday_id?: string;
3081
+ id?: string;
2646
3082
  is_deleted?: boolean;
3083
+ sequence_number?: number;
3084
+ updated_at?: string;
3085
+ };
3086
+ Relationships: [
3087
+ {
3088
+ foreignKeyName: "floriday_blanket_orders_cache_connection_id_fkey";
3089
+ columns: ["connection_id"];
3090
+ isOneToOne: false;
3091
+ referencedRelation: "floriday_connections";
3092
+ referencedColumns: ["id"];
3093
+ }
3094
+ ];
3095
+ };
3096
+ floriday_carriers_cache: {
3097
+ Row: {
3098
+ connection_id: string | null;
3099
+ created_at: string;
3100
+ data: Json;
3101
+ fetched_at: string;
3102
+ gln_code: string | null;
3103
+ id: string;
3104
+ name: string | null;
3105
+ organization_id: string;
3106
+ updated_at: string;
3107
+ };
3108
+ Insert: {
3109
+ connection_id?: string | null;
3110
+ created_at?: string;
3111
+ data: Json;
3112
+ fetched_at?: string;
3113
+ gln_code?: string | null;
3114
+ id?: string;
3115
+ name?: string | null;
3116
+ organization_id: string;
3117
+ updated_at?: string;
3118
+ };
3119
+ Update: {
3120
+ connection_id?: string | null;
3121
+ created_at?: string;
3122
+ data?: Json;
3123
+ fetched_at?: string;
3124
+ gln_code?: string | null;
3125
+ id?: string;
3126
+ name?: string | null;
3127
+ organization_id?: string;
3128
+ updated_at?: string;
3129
+ };
3130
+ Relationships: [
3131
+ {
3132
+ foreignKeyName: "floriday_carriers_cache_connection_id_fkey";
3133
+ columns: ["connection_id"];
3134
+ isOneToOne: false;
3135
+ referencedRelation: "floriday_connections";
3136
+ referencedColumns: ["id"];
3137
+ }
3138
+ ];
3139
+ };
3140
+ floriday_clock_presales_cache: {
3141
+ Row: {
3142
+ buyer_organization_id: string | null;
3143
+ clock_supply_id: string | null;
3144
+ connection_id: string;
3145
+ data: Json;
3146
+ fetched_at: string;
3147
+ floriday_id: string;
3148
+ id: string;
3149
+ is_deleted: boolean;
2647
3150
  sequence_number: number;
2648
- status?: string | null;
2649
- synced_at?: string;
3151
+ updated_at: string;
3152
+ };
3153
+ Insert: {
3154
+ buyer_organization_id?: string | null;
3155
+ clock_supply_id?: string | null;
3156
+ connection_id: string;
3157
+ data?: Json;
3158
+ fetched_at?: string;
3159
+ floriday_id: string;
3160
+ id?: string;
3161
+ is_deleted?: boolean;
3162
+ sequence_number?: number;
3163
+ updated_at?: string;
2650
3164
  };
2651
3165
  Update: {
2652
3166
  buyer_organization_id?: string | null;
2653
- buyer_organization_name?: string | null;
3167
+ clock_supply_id?: string | null;
3168
+ connection_id?: string;
3169
+ data?: Json;
3170
+ fetched_at?: string;
3171
+ floriday_id?: string;
3172
+ id?: string;
3173
+ is_deleted?: boolean;
3174
+ sequence_number?: number;
3175
+ updated_at?: string;
3176
+ };
3177
+ Relationships: [
3178
+ {
3179
+ foreignKeyName: "floriday_clock_presales_cache_connection_id_fkey";
3180
+ columns: ["connection_id"];
3181
+ isOneToOne: false;
3182
+ referencedRelation: "floriday_connections";
3183
+ referencedColumns: ["id"];
3184
+ }
3185
+ ];
3186
+ };
3187
+ floriday_clock_supplies_cache: {
3188
+ Row: {
3189
+ auction_date: string | null;
3190
+ connection_id: string;
3191
+ data: Json;
3192
+ fetched_at: string;
3193
+ floriday_id: string;
3194
+ id: string;
3195
+ is_deleted: boolean;
3196
+ sequence_number: number;
3197
+ status: string | null;
3198
+ trade_item_id: string | null;
3199
+ updated_at: string;
3200
+ };
3201
+ Insert: {
3202
+ auction_date?: string | null;
3203
+ connection_id: string;
3204
+ data?: Json;
3205
+ fetched_at?: string;
3206
+ floriday_id: string;
3207
+ id?: string;
3208
+ is_deleted?: boolean;
3209
+ sequence_number?: number;
3210
+ status?: string | null;
3211
+ trade_item_id?: string | null;
3212
+ updated_at?: string;
3213
+ };
3214
+ Update: {
3215
+ auction_date?: string | null;
3216
+ connection_id?: string;
3217
+ data?: Json;
3218
+ fetched_at?: string;
3219
+ floriday_id?: string;
3220
+ id?: string;
3221
+ is_deleted?: boolean;
3222
+ sequence_number?: number;
3223
+ status?: string | null;
3224
+ trade_item_id?: string | null;
3225
+ updated_at?: string;
3226
+ };
3227
+ Relationships: [
3228
+ {
3229
+ foreignKeyName: "floriday_clock_supplies_cache_connection_id_fkey";
3230
+ columns: ["connection_id"];
3231
+ isOneToOne: false;
3232
+ referencedRelation: "floriday_connections";
3233
+ referencedColumns: ["id"];
3234
+ }
3235
+ ];
3236
+ };
3237
+ floriday_code_lists_cache: {
3238
+ Row: {
3239
+ code: string;
3240
+ environment: string;
3241
+ label: string | null;
3242
+ list_name: string;
3243
+ payload: Json | null;
3244
+ updated_at: string;
3245
+ };
3246
+ Insert: {
3247
+ code: string;
3248
+ environment: string;
3249
+ label?: string | null;
3250
+ list_name: string;
3251
+ payload?: Json | null;
3252
+ updated_at?: string;
3253
+ };
3254
+ Update: {
3255
+ code?: string;
3256
+ environment?: string;
3257
+ label?: string | null;
3258
+ list_name?: string;
3259
+ payload?: Json | null;
3260
+ updated_at?: string;
3261
+ };
3262
+ Relationships: [];
3263
+ };
3264
+ floriday_collections_cache: {
3265
+ Row: {
3266
+ connection_id: string;
3267
+ data: Json;
3268
+ fetched_at: string;
3269
+ floriday_id: string;
3270
+ is_deleted: boolean;
3271
+ sequence_number: number;
3272
+ updated_at: string;
3273
+ };
3274
+ Insert: {
3275
+ connection_id: string;
3276
+ data: Json;
3277
+ fetched_at?: string;
3278
+ floriday_id: string;
3279
+ is_deleted?: boolean;
3280
+ sequence_number?: number;
3281
+ updated_at?: string;
3282
+ };
3283
+ Update: {
3284
+ connection_id?: string;
3285
+ data?: Json;
3286
+ fetched_at?: string;
3287
+ floriday_id?: string;
3288
+ is_deleted?: boolean;
3289
+ sequence_number?: number;
3290
+ updated_at?: string;
3291
+ };
3292
+ Relationships: [
3293
+ {
3294
+ foreignKeyName: "floriday_collections_cache_connection_id_fkey";
3295
+ columns: ["connection_id"];
3296
+ isOneToOne: false;
3297
+ referencedRelation: "floriday_connections";
3298
+ referencedColumns: ["id"];
3299
+ }
3300
+ ];
3301
+ };
3302
+ floriday_commercial_service_types_cache: {
3303
+ Row: {
3304
+ connection_id: string;
3305
+ data: Json;
3306
+ fetched_at: string;
3307
+ floriday_id: string;
3308
+ is_deleted: boolean;
3309
+ sequence_number: number;
3310
+ updated_at: string;
3311
+ };
3312
+ Insert: {
3313
+ connection_id: string;
3314
+ data: Json;
3315
+ fetched_at?: string;
3316
+ floriday_id: string;
3317
+ is_deleted?: boolean;
3318
+ sequence_number?: number;
3319
+ updated_at?: string;
3320
+ };
3321
+ Update: {
3322
+ connection_id?: string;
3323
+ data?: Json;
3324
+ fetched_at?: string;
3325
+ floriday_id?: string;
3326
+ is_deleted?: boolean;
3327
+ sequence_number?: number;
3328
+ updated_at?: string;
3329
+ };
3330
+ Relationships: [
3331
+ {
3332
+ foreignKeyName: "floriday_commercial_service_types_cache_connection_id_fkey";
3333
+ columns: ["connection_id"];
3334
+ isOneToOne: false;
3335
+ referencedRelation: "floriday_connections";
3336
+ referencedColumns: ["id"];
3337
+ }
3338
+ ];
3339
+ };
3340
+ floriday_connections: {
3341
+ Row: {
3342
+ access_token: string | null;
3343
+ api_key: string;
3344
+ client_id: string;
3345
+ client_secret: string;
3346
+ created_at: string;
3347
+ customers_endpoint: string | null;
3348
+ environment: string;
3349
+ gln_code: string | null;
3350
+ id: string;
3351
+ is_active: boolean;
3352
+ label: string;
3353
+ organization_name: string | null;
3354
+ preferred_warehouse_id: string | null;
3355
+ preferred_warehouse_name: string | null;
3356
+ token_expires_at: string | null;
3357
+ updated_at: string;
3358
+ };
3359
+ Insert: {
3360
+ access_token?: string | null;
3361
+ api_key: string;
3362
+ client_id: string;
3363
+ client_secret: string;
3364
+ created_at?: string;
3365
+ customers_endpoint?: string | null;
3366
+ environment: string;
3367
+ gln_code?: string | null;
3368
+ id?: string;
3369
+ is_active?: boolean;
3370
+ label?: string;
3371
+ organization_name?: string | null;
3372
+ preferred_warehouse_id?: string | null;
3373
+ preferred_warehouse_name?: string | null;
3374
+ token_expires_at?: string | null;
3375
+ updated_at?: string;
3376
+ };
3377
+ Update: {
3378
+ access_token?: string | null;
3379
+ api_key?: string;
3380
+ client_id?: string;
3381
+ client_secret?: string;
3382
+ created_at?: string;
3383
+ customers_endpoint?: string | null;
3384
+ environment?: string;
3385
+ gln_code?: string | null;
3386
+ id?: string;
3387
+ is_active?: boolean;
3388
+ label?: string;
3389
+ organization_name?: string | null;
3390
+ preferred_warehouse_id?: string | null;
3391
+ preferred_warehouse_name?: string | null;
3392
+ token_expires_at?: string | null;
3393
+ updated_at?: string;
3394
+ };
3395
+ Relationships: [];
3396
+ };
3397
+ floriday_connections_cache: {
3398
+ Row: {
3399
+ buyer_organization_id: string | null;
3400
+ buyer_organization_name: string | null;
3401
+ connection_id: string;
3402
+ data: Json;
3403
+ floriday_connection_id: string;
3404
+ is_deleted: boolean;
3405
+ sequence_number: number;
3406
+ status: string | null;
3407
+ synced_at: string;
3408
+ };
3409
+ Insert: {
3410
+ buyer_organization_id?: string | null;
3411
+ buyer_organization_name?: string | null;
3412
+ connection_id: string;
3413
+ data: Json;
3414
+ floriday_connection_id: string;
3415
+ is_deleted?: boolean;
3416
+ sequence_number: number;
3417
+ status?: string | null;
3418
+ synced_at?: string;
3419
+ };
3420
+ Update: {
3421
+ buyer_organization_id?: string | null;
3422
+ buyer_organization_name?: string | null;
3423
+ connection_id?: string;
3424
+ data?: Json;
3425
+ floriday_connection_id?: string;
3426
+ is_deleted?: boolean;
3427
+ sequence_number?: number;
3428
+ status?: string | null;
3429
+ synced_at?: string;
3430
+ };
3431
+ Relationships: [
3432
+ {
3433
+ foreignKeyName: "floriday_connections_cache_connection_id_fkey";
3434
+ columns: ["connection_id"];
3435
+ isOneToOne: false;
3436
+ referencedRelation: "floriday_connections";
3437
+ referencedColumns: ["id"];
3438
+ }
3439
+ ];
3440
+ };
3441
+ floriday_contract_trade_item_groups_cache: {
3442
+ Row: {
3443
+ connection_id: string;
3444
+ data: Json;
3445
+ fetched_at: string;
3446
+ floriday_id: string;
3447
+ is_deleted: boolean;
3448
+ sequence_number: number;
3449
+ updated_at: string;
3450
+ };
3451
+ Insert: {
3452
+ connection_id: string;
3453
+ data: Json;
3454
+ fetched_at?: string;
3455
+ floriday_id: string;
3456
+ is_deleted?: boolean;
3457
+ sequence_number?: number;
3458
+ updated_at?: string;
3459
+ };
3460
+ Update: {
3461
+ connection_id?: string;
3462
+ data?: Json;
3463
+ fetched_at?: string;
3464
+ floriday_id?: string;
3465
+ is_deleted?: boolean;
3466
+ sequence_number?: number;
3467
+ updated_at?: string;
3468
+ };
3469
+ Relationships: [
3470
+ {
3471
+ foreignKeyName: "floriday_contract_trade_item_groups_cache_connection_id_fkey";
3472
+ columns: ["connection_id"];
3473
+ isOneToOne: false;
3474
+ referencedRelation: "floriday_connections";
3475
+ referencedColumns: ["id"];
3476
+ }
3477
+ ];
3478
+ };
3479
+ floriday_contracts_cache: {
3480
+ Row: {
3481
+ connection_id: string;
3482
+ created_at: string;
3483
+ data: Json;
3484
+ fetched_at: string;
3485
+ floriday_id: string;
3486
+ id: string;
3487
+ is_deleted: boolean;
3488
+ sequence_number: number;
3489
+ updated_at: string;
3490
+ };
3491
+ Insert: {
3492
+ connection_id: string;
3493
+ created_at?: string;
3494
+ data: Json;
3495
+ fetched_at?: string;
3496
+ floriday_id: string;
3497
+ id?: string;
3498
+ is_deleted?: boolean;
3499
+ sequence_number?: number;
3500
+ updated_at?: string;
3501
+ };
3502
+ Update: {
3503
+ connection_id?: string;
3504
+ created_at?: string;
3505
+ data?: Json;
3506
+ fetched_at?: string;
3507
+ floriday_id?: string;
3508
+ id?: string;
3509
+ is_deleted?: boolean;
3510
+ sequence_number?: number;
3511
+ updated_at?: string;
3512
+ };
3513
+ Relationships: [
3514
+ {
3515
+ foreignKeyName: "floriday_contracts_cache_connection_id_fkey";
3516
+ columns: ["connection_id"];
3517
+ isOneToOne: false;
3518
+ referencedRelation: "floriday_connections";
3519
+ referencedColumns: ["id"];
3520
+ }
3521
+ ];
3522
+ };
3523
+ floriday_customer_sticker_pdfs_cache: {
3524
+ Row: {
3525
+ byte_size: number | null;
3526
+ connection_id: string;
3527
+ content_type: string;
3528
+ created_at: string;
3529
+ fetched_at: string;
3530
+ id: string;
3531
+ sticker_id: string;
3532
+ storage_path: string;
3533
+ };
3534
+ Insert: {
3535
+ byte_size?: number | null;
3536
+ connection_id: string;
3537
+ content_type?: string;
3538
+ created_at?: string;
3539
+ fetched_at?: string;
3540
+ id?: string;
3541
+ sticker_id: string;
3542
+ storage_path: string;
3543
+ };
3544
+ Update: {
3545
+ byte_size?: number | null;
3546
+ connection_id?: string;
3547
+ content_type?: string;
3548
+ created_at?: string;
3549
+ fetched_at?: string;
3550
+ id?: string;
3551
+ sticker_id?: string;
3552
+ storage_path?: string;
3553
+ };
3554
+ Relationships: [
3555
+ {
3556
+ foreignKeyName: "floriday_customer_sticker_pdfs_cache_connection_id_fkey";
3557
+ columns: ["connection_id"];
3558
+ isOneToOne: false;
3559
+ referencedRelation: "floriday_connections";
3560
+ referencedColumns: ["id"];
3561
+ }
3562
+ ];
3563
+ };
3564
+ floriday_customer_stickers_cache: {
3565
+ Row: {
3566
+ connection_id: string;
3567
+ created_at: string;
3568
+ data: Json;
3569
+ fetched_at: string;
3570
+ floriday_id: string;
3571
+ id: string;
3572
+ is_deleted: boolean;
3573
+ quantity: number | null;
3574
+ sales_order_id: string | null;
3575
+ sequence_number: number;
3576
+ status: string | null;
3577
+ trade_item_id: string | null;
3578
+ updated_at: string;
3579
+ };
3580
+ Insert: {
3581
+ connection_id: string;
3582
+ created_at?: string;
3583
+ data?: Json;
3584
+ fetched_at?: string;
3585
+ floriday_id: string;
3586
+ id?: string;
3587
+ is_deleted?: boolean;
3588
+ quantity?: number | null;
3589
+ sales_order_id?: string | null;
3590
+ sequence_number?: number;
3591
+ status?: string | null;
3592
+ trade_item_id?: string | null;
3593
+ updated_at?: string;
3594
+ };
3595
+ Update: {
3596
+ connection_id?: string;
3597
+ created_at?: string;
3598
+ data?: Json;
3599
+ fetched_at?: string;
3600
+ floriday_id?: string;
3601
+ id?: string;
3602
+ is_deleted?: boolean;
3603
+ quantity?: number | null;
3604
+ sales_order_id?: string | null;
3605
+ sequence_number?: number;
3606
+ status?: string | null;
3607
+ trade_item_id?: string | null;
3608
+ updated_at?: string;
3609
+ };
3610
+ Relationships: [
3611
+ {
3612
+ foreignKeyName: "floriday_customer_stickers_cache_connection_id_fkey";
3613
+ columns: ["connection_id"];
3614
+ isOneToOne: false;
3615
+ referencedRelation: "floriday_connections";
3616
+ referencedColumns: ["id"];
3617
+ }
3618
+ ];
3619
+ };
3620
+ floriday_customers_cache: {
3621
+ Row: {
3622
+ connection_id: string | null;
3623
+ data: Json;
3624
+ fetched_at: string;
3625
+ gln_code: string | null;
3626
+ is_deleted: boolean;
3627
+ name: string | null;
3628
+ organization_id: string;
3629
+ sequence_number: number | null;
3630
+ };
3631
+ Insert: {
3632
+ connection_id?: string | null;
3633
+ data?: Json;
3634
+ fetched_at?: string;
3635
+ gln_code?: string | null;
3636
+ is_deleted?: boolean;
3637
+ name?: string | null;
3638
+ organization_id: string;
3639
+ sequence_number?: number | null;
3640
+ };
3641
+ Update: {
3642
+ connection_id?: string | null;
3643
+ data?: Json;
3644
+ fetched_at?: string;
3645
+ gln_code?: string | null;
3646
+ is_deleted?: boolean;
3647
+ name?: string | null;
3648
+ organization_id?: string;
3649
+ sequence_number?: number | null;
3650
+ };
3651
+ Relationships: [
3652
+ {
3653
+ foreignKeyName: "floriday_customers_cache_connection_id_fkey";
3654
+ columns: ["connection_id"];
3655
+ isOneToOne: false;
3656
+ referencedRelation: "floriday_connections";
3657
+ referencedColumns: ["id"];
3658
+ }
3659
+ ];
3660
+ };
3661
+ floriday_delivery_condition_sets_cache: {
3662
+ Row: {
3663
+ connection_id: string;
3664
+ data: Json;
3665
+ fetched_at: string;
3666
+ floriday_id: string;
3667
+ is_deleted: boolean;
3668
+ sequence_number: number;
3669
+ updated_at: string;
3670
+ };
3671
+ Insert: {
3672
+ connection_id: string;
3673
+ data: Json;
3674
+ fetched_at?: string;
3675
+ floriday_id: string;
3676
+ is_deleted?: boolean;
3677
+ sequence_number?: number;
3678
+ updated_at?: string;
3679
+ };
3680
+ Update: {
3681
+ connection_id?: string;
3682
+ data?: Json;
3683
+ fetched_at?: string;
3684
+ floriday_id?: string;
3685
+ is_deleted?: boolean;
3686
+ sequence_number?: number;
3687
+ updated_at?: string;
3688
+ };
3689
+ Relationships: [
3690
+ {
3691
+ foreignKeyName: "floriday_delivery_condition_sets_cache_connection_id_fkey";
3692
+ columns: ["connection_id"];
3693
+ isOneToOne: false;
3694
+ referencedRelation: "floriday_connections";
3695
+ referencedColumns: ["id"];
3696
+ }
3697
+ ];
3698
+ };
3699
+ floriday_delivery_locations_cache: {
3700
+ Row: {
3701
+ connection_id: string;
3702
+ data: Json;
3703
+ fetched_at: string;
3704
+ floriday_id: string;
3705
+ gln_code: string | null;
3706
+ id: string;
3707
+ is_deleted: boolean;
3708
+ name: string | null;
3709
+ organization_id: string | null;
3710
+ updated_at: string;
3711
+ };
3712
+ Insert: {
3713
+ connection_id: string;
3714
+ data?: Json;
3715
+ fetched_at?: string;
3716
+ floriday_id: string;
3717
+ gln_code?: string | null;
3718
+ id?: string;
3719
+ is_deleted?: boolean;
3720
+ name?: string | null;
3721
+ organization_id?: string | null;
3722
+ updated_at?: string;
3723
+ };
3724
+ Update: {
3725
+ connection_id?: string;
3726
+ data?: Json;
3727
+ fetched_at?: string;
3728
+ floriday_id?: string;
3729
+ gln_code?: string | null;
3730
+ id?: string;
3731
+ is_deleted?: boolean;
3732
+ name?: string | null;
3733
+ organization_id?: string | null;
3734
+ updated_at?: string;
3735
+ };
3736
+ Relationships: [
3737
+ {
3738
+ foreignKeyName: "floriday_delivery_locations_cache_connection_id_fkey";
3739
+ columns: ["connection_id"];
3740
+ isOneToOne: false;
3741
+ referencedRelation: "floriday_connections";
3742
+ referencedColumns: ["id"];
3743
+ }
3744
+ ];
3745
+ };
3746
+ floriday_delivery_orders_cache: {
3747
+ Row: {
3748
+ auction_date: string | null;
3749
+ connection_id: string;
3750
+ data: Json;
3751
+ destination_warehouse_id: string | null;
3752
+ fetched_at: string;
3753
+ floriday_id: string;
3754
+ id: string;
3755
+ is_deleted: boolean;
3756
+ sequence_number: number;
3757
+ status: string | null;
3758
+ trade_item_id: string | null;
3759
+ updated_at: string;
3760
+ };
3761
+ Insert: {
3762
+ auction_date?: string | null;
3763
+ connection_id: string;
3764
+ data?: Json;
3765
+ destination_warehouse_id?: string | null;
3766
+ fetched_at?: string;
3767
+ floriday_id: string;
3768
+ id?: string;
3769
+ is_deleted?: boolean;
3770
+ sequence_number?: number;
3771
+ status?: string | null;
3772
+ trade_item_id?: string | null;
3773
+ updated_at?: string;
3774
+ };
3775
+ Update: {
3776
+ auction_date?: string | null;
3777
+ connection_id?: string;
3778
+ data?: Json;
3779
+ destination_warehouse_id?: string | null;
3780
+ fetched_at?: string;
3781
+ floriday_id?: string;
3782
+ id?: string;
3783
+ is_deleted?: boolean;
3784
+ sequence_number?: number;
3785
+ status?: string | null;
3786
+ trade_item_id?: string | null;
3787
+ updated_at?: string;
3788
+ };
3789
+ Relationships: [
3790
+ {
3791
+ foreignKeyName: "floriday_delivery_orders_cache_connection_id_fkey";
3792
+ columns: ["connection_id"];
3793
+ isOneToOne: false;
3794
+ referencedRelation: "floriday_connections";
3795
+ referencedColumns: ["id"];
3796
+ }
3797
+ ];
3798
+ };
3799
+ floriday_fulfillment_orders_cache: {
3800
+ Row: {
3801
+ auction_date: string | null;
3802
+ connection_id: string;
3803
+ data: Json;
3804
+ delivery_order_id: string | null;
3805
+ despatch_warehouse_id: string | null;
3806
+ destination_warehouse_id: string | null;
3807
+ fetched_at: string;
3808
+ floriday_id: string;
3809
+ id: string;
3810
+ is_deleted: boolean | null;
3811
+ latest_delivery_at: string | null;
3812
+ load_carrier_type: string | null;
3813
+ one_label_only: boolean | null;
3814
+ sequence_number: number;
3815
+ status: string | null;
3816
+ };
3817
+ Insert: {
3818
+ auction_date?: string | null;
3819
+ connection_id: string;
3820
+ data: Json;
3821
+ delivery_order_id?: string | null;
3822
+ despatch_warehouse_id?: string | null;
3823
+ destination_warehouse_id?: string | null;
3824
+ fetched_at?: string;
3825
+ floriday_id: string;
3826
+ id?: string;
3827
+ is_deleted?: boolean | null;
3828
+ latest_delivery_at?: string | null;
3829
+ load_carrier_type?: string | null;
3830
+ one_label_only?: boolean | null;
3831
+ sequence_number?: number;
3832
+ status?: string | null;
3833
+ };
3834
+ Update: {
3835
+ auction_date?: string | null;
3836
+ connection_id?: string;
3837
+ data?: Json;
3838
+ delivery_order_id?: string | null;
3839
+ despatch_warehouse_id?: string | null;
3840
+ destination_warehouse_id?: string | null;
3841
+ fetched_at?: string;
3842
+ floriday_id?: string;
3843
+ id?: string;
3844
+ is_deleted?: boolean | null;
3845
+ latest_delivery_at?: string | null;
3846
+ load_carrier_type?: string | null;
3847
+ one_label_only?: boolean | null;
3848
+ sequence_number?: number;
3849
+ status?: string | null;
3850
+ };
3851
+ Relationships: [
3852
+ {
3853
+ foreignKeyName: "floriday_fulfillment_orders_cache_connection_id_fkey";
3854
+ columns: ["connection_id"];
3855
+ isOneToOne: false;
3856
+ referencedRelation: "floriday_connections";
3857
+ referencedColumns: ["id"];
3858
+ }
3859
+ ];
3860
+ };
3861
+ floriday_invoices_cache: {
3862
+ Row: {
3863
+ buyer_organization_id: string | null;
3864
+ connection_id: string;
3865
+ currency: string | null;
3866
+ data: Json;
3867
+ fetched_at: string;
3868
+ floriday_id: string;
3869
+ id: string;
3870
+ invoice_date: string | null;
3871
+ invoice_number: string | null;
3872
+ is_deleted: boolean;
3873
+ sequence_number: number;
3874
+ total_amount: number | null;
3875
+ updated_at: string;
3876
+ };
3877
+ Insert: {
3878
+ buyer_organization_id?: string | null;
3879
+ connection_id: string;
3880
+ currency?: string | null;
3881
+ data?: Json;
3882
+ fetched_at?: string;
3883
+ floriday_id: string;
3884
+ id?: string;
3885
+ invoice_date?: string | null;
3886
+ invoice_number?: string | null;
3887
+ is_deleted?: boolean;
3888
+ sequence_number?: number;
3889
+ total_amount?: number | null;
3890
+ updated_at?: string;
3891
+ };
3892
+ Update: {
3893
+ buyer_organization_id?: string | null;
3894
+ connection_id?: string;
3895
+ currency?: string | null;
3896
+ data?: Json;
3897
+ fetched_at?: string;
3898
+ floriday_id?: string;
3899
+ id?: string;
3900
+ invoice_date?: string | null;
3901
+ invoice_number?: string | null;
3902
+ is_deleted?: boolean;
3903
+ sequence_number?: number;
3904
+ total_amount?: number | null;
3905
+ updated_at?: string;
3906
+ };
3907
+ Relationships: [
3908
+ {
3909
+ foreignKeyName: "floriday_invoices_cache_connection_id_fkey";
3910
+ columns: ["connection_id"];
3911
+ isOneToOne: false;
3912
+ referencedRelation: "floriday_connections";
3913
+ referencedColumns: ["id"];
3914
+ }
3915
+ ];
3916
+ };
3917
+ floriday_logistic_labels_cache: {
3918
+ Row: {
3919
+ byte_size: number | null;
3920
+ connection_id: string;
3921
+ content_type: string;
3922
+ fetched_at: string;
3923
+ fulfillment_order_id: string;
3924
+ id: string;
3925
+ logistic_label_code: string;
3926
+ storage_path: string;
3927
+ };
3928
+ Insert: {
3929
+ byte_size?: number | null;
3930
+ connection_id: string;
3931
+ content_type?: string;
3932
+ fetched_at?: string;
3933
+ fulfillment_order_id: string;
3934
+ id?: string;
3935
+ logistic_label_code: string;
3936
+ storage_path: string;
3937
+ };
3938
+ Update: {
3939
+ byte_size?: number | null;
3940
+ connection_id?: string;
3941
+ content_type?: string;
3942
+ fetched_at?: string;
3943
+ fulfillment_order_id?: string;
3944
+ id?: string;
3945
+ logistic_label_code?: string;
3946
+ storage_path?: string;
3947
+ };
3948
+ Relationships: [
3949
+ {
3950
+ foreignKeyName: "floriday_logistic_labels_cache_connection_id_fkey";
3951
+ columns: ["connection_id"];
3952
+ isOneToOne: false;
3953
+ referencedRelation: "floriday_connections";
3954
+ referencedColumns: ["id"];
3955
+ }
3956
+ ];
3957
+ };
3958
+ floriday_network_cache: {
3959
+ Row: {
3960
+ city: string | null;
3961
+ connection_id: string;
3962
+ country: string | null;
3963
+ data: Json;
3964
+ fetched_at: string;
3965
+ gln: string | null;
3966
+ organization_id: string;
3967
+ organization_name: string | null;
3968
+ };
3969
+ Insert: {
3970
+ city?: string | null;
3971
+ connection_id: string;
3972
+ country?: string | null;
3973
+ data?: Json;
3974
+ fetched_at?: string;
3975
+ gln?: string | null;
3976
+ organization_id: string;
3977
+ organization_name?: string | null;
3978
+ };
3979
+ Update: {
3980
+ city?: string | null;
3981
+ connection_id?: string;
3982
+ country?: string | null;
3983
+ data?: Json;
3984
+ fetched_at?: string;
3985
+ gln?: string | null;
3986
+ organization_id?: string;
3987
+ organization_name?: string | null;
3988
+ };
3989
+ Relationships: [];
3990
+ };
3991
+ floriday_network_sync_state: {
3992
+ Row: {
3993
+ connection_id: string;
3994
+ last_error: string | null;
3995
+ last_sequence_number: number;
3996
+ last_synced_at: string | null;
3997
+ updated_at: string;
3998
+ };
3999
+ Insert: {
4000
+ connection_id: string;
4001
+ last_error?: string | null;
4002
+ last_sequence_number?: number;
4003
+ last_synced_at?: string | null;
4004
+ updated_at?: string;
4005
+ };
4006
+ Update: {
4007
+ connection_id?: string;
4008
+ last_error?: string | null;
4009
+ last_sequence_number?: number;
4010
+ last_synced_at?: string | null;
4011
+ updated_at?: string;
4012
+ };
4013
+ Relationships: [];
4014
+ };
4015
+ floriday_packings_cache: {
4016
+ Row: {
4017
+ connection_id: string;
4018
+ data: Json;
4019
+ fetched_at: string;
4020
+ floriday_id: string;
4021
+ id: string;
4022
+ is_deleted: boolean;
4023
+ sequence_number: number;
4024
+ updated_at: string;
4025
+ };
4026
+ Insert: {
4027
+ connection_id: string;
4028
+ data?: Json;
4029
+ fetched_at?: string;
4030
+ floriday_id: string;
4031
+ id?: string;
4032
+ is_deleted?: boolean;
4033
+ sequence_number?: number;
4034
+ updated_at?: string;
4035
+ };
4036
+ Update: {
2654
4037
  connection_id?: string;
2655
4038
  data?: Json;
2656
- floriday_connection_id?: string;
4039
+ fetched_at?: string;
4040
+ floriday_id?: string;
4041
+ id?: string;
2657
4042
  is_deleted?: boolean;
2658
4043
  sequence_number?: number;
2659
- status?: string | null;
2660
- synced_at?: string;
4044
+ updated_at?: string;
2661
4045
  };
2662
4046
  Relationships: [
2663
4047
  {
2664
- foreignKeyName: "floriday_connections_cache_connection_id_fkey";
4048
+ foreignKeyName: "floriday_packings_cache_connection_id_fkey";
2665
4049
  columns: ["connection_id"];
2666
4050
  isOneToOne: false;
2667
4051
  referencedRelation: "floriday_connections";
@@ -2669,28 +4053,37 @@ export type Database = {
2669
4053
  }
2670
4054
  ];
2671
4055
  };
2672
- floriday_customers_cache: {
4056
+ floriday_price_groups_cache: {
2673
4057
  Row: {
2674
- connection_id: string | null;
4058
+ connection_id: string;
2675
4059
  data: Json;
2676
4060
  fetched_at: string;
2677
- organization_id: string;
4061
+ floriday_id: string;
4062
+ is_deleted: boolean;
4063
+ sequence_number: number;
4064
+ updated_at: string;
2678
4065
  };
2679
4066
  Insert: {
2680
- connection_id?: string | null;
2681
- data?: Json;
4067
+ connection_id: string;
4068
+ data: Json;
2682
4069
  fetched_at?: string;
2683
- organization_id: string;
4070
+ floriday_id: string;
4071
+ is_deleted?: boolean;
4072
+ sequence_number?: number;
4073
+ updated_at?: string;
2684
4074
  };
2685
4075
  Update: {
2686
- connection_id?: string | null;
4076
+ connection_id?: string;
2687
4077
  data?: Json;
2688
4078
  fetched_at?: string;
2689
- organization_id?: string;
4079
+ floriday_id?: string;
4080
+ is_deleted?: boolean;
4081
+ sequence_number?: number;
4082
+ updated_at?: string;
2690
4083
  };
2691
4084
  Relationships: [
2692
4085
  {
2693
- foreignKeyName: "floriday_customers_cache_connection_id_fkey";
4086
+ foreignKeyName: "floriday_price_groups_cache_connection_id_fkey";
2694
4087
  columns: ["connection_id"];
2695
4088
  isOneToOne: false;
2696
4089
  referencedRelation: "floriday_connections";
@@ -2698,62 +4091,70 @@ export type Database = {
2698
4091
  }
2699
4092
  ];
2700
4093
  };
2701
- floriday_network_cache: {
4094
+ floriday_resource_schemas: {
2702
4095
  Row: {
2703
- city: string | null;
2704
- connection_id: string;
2705
- country: string | null;
2706
- data: Json;
4096
+ enums: Json;
2707
4097
  fetched_at: string;
2708
- gln: string | null;
2709
- organization_id: string;
2710
- organization_name: string | null;
4098
+ resource: string;
4099
+ schema: Json;
4100
+ source_url: string | null;
4101
+ version: string;
2711
4102
  };
2712
4103
  Insert: {
2713
- city?: string | null;
2714
- connection_id: string;
2715
- country?: string | null;
2716
- data?: Json;
4104
+ enums?: Json;
2717
4105
  fetched_at?: string;
2718
- gln?: string | null;
2719
- organization_id: string;
2720
- organization_name?: string | null;
4106
+ resource: string;
4107
+ schema: Json;
4108
+ source_url?: string | null;
4109
+ version: string;
2721
4110
  };
2722
4111
  Update: {
2723
- city?: string | null;
2724
- connection_id?: string;
2725
- country?: string | null;
2726
- data?: Json;
4112
+ enums?: Json;
2727
4113
  fetched_at?: string;
2728
- gln?: string | null;
2729
- organization_id?: string;
2730
- organization_name?: string | null;
4114
+ resource?: string;
4115
+ schema?: Json;
4116
+ source_url?: string | null;
4117
+ version?: string;
2731
4118
  };
2732
4119
  Relationships: [];
2733
4120
  };
2734
- floriday_network_sync_state: {
4121
+ floriday_sales_strategies_cache: {
2735
4122
  Row: {
2736
4123
  connection_id: string;
2737
- last_error: string | null;
2738
- last_sequence_number: number;
2739
- last_synced_at: string | null;
4124
+ data: Json;
4125
+ fetched_at: string;
4126
+ floriday_id: string;
4127
+ is_deleted: boolean;
4128
+ sequence_number: number;
2740
4129
  updated_at: string;
2741
4130
  };
2742
4131
  Insert: {
2743
4132
  connection_id: string;
2744
- last_error?: string | null;
2745
- last_sequence_number?: number;
2746
- last_synced_at?: string | null;
4133
+ data: Json;
4134
+ fetched_at?: string;
4135
+ floriday_id: string;
4136
+ is_deleted?: boolean;
4137
+ sequence_number?: number;
2747
4138
  updated_at?: string;
2748
4139
  };
2749
4140
  Update: {
2750
4141
  connection_id?: string;
2751
- last_error?: string | null;
2752
- last_sequence_number?: number;
2753
- last_synced_at?: string | null;
4142
+ data?: Json;
4143
+ fetched_at?: string;
4144
+ floriday_id?: string;
4145
+ is_deleted?: boolean;
4146
+ sequence_number?: number;
2754
4147
  updated_at?: string;
2755
4148
  };
2756
- Relationships: [];
4149
+ Relationships: [
4150
+ {
4151
+ foreignKeyName: "floriday_sales_strategies_cache_connection_id_fkey";
4152
+ columns: ["connection_id"];
4153
+ isOneToOne: false;
4154
+ referencedRelation: "floriday_connections";
4155
+ referencedColumns: ["id"];
4156
+ }
4157
+ ];
2757
4158
  };
2758
4159
  floriday_salesorders_cache: {
2759
4160
  Row: {
@@ -2822,7 +4223,9 @@ export type Database = {
2822
4223
  connection_id: string;
2823
4224
  entity_type: string;
2824
4225
  last_error: string | null;
4226
+ last_items_processed: number | null;
2825
4227
  last_sequence_number: number;
4228
+ last_success_at: string | null;
2826
4229
  last_synced_at: string | null;
2827
4230
  updated_at: string;
2828
4231
  };
@@ -2830,7 +4233,9 @@ export type Database = {
2830
4233
  connection_id: string;
2831
4234
  entity_type: string;
2832
4235
  last_error?: string | null;
4236
+ last_items_processed?: number | null;
2833
4237
  last_sequence_number?: number;
4238
+ last_success_at?: string | null;
2834
4239
  last_synced_at?: string | null;
2835
4240
  updated_at?: string;
2836
4241
  };
@@ -2838,7 +4243,9 @@ export type Database = {
2838
4243
  connection_id?: string;
2839
4244
  entity_type?: string;
2840
4245
  last_error?: string | null;
4246
+ last_items_processed?: number | null;
2841
4247
  last_sequence_number?: number;
4248
+ last_success_at?: string | null;
2842
4249
  last_synced_at?: string | null;
2843
4250
  updated_at?: string;
2844
4251
  };
@@ -2890,6 +4297,47 @@ export type Database = {
2890
4297
  }
2891
4298
  ];
2892
4299
  };
4300
+ floriday_trade_item_classifications_cache: {
4301
+ Row: {
4302
+ connection_id: string;
4303
+ data: Json;
4304
+ fetched_at: string;
4305
+ floriday_id: string;
4306
+ id: string;
4307
+ is_deleted: boolean;
4308
+ sequence_number: number;
4309
+ updated_at: string;
4310
+ };
4311
+ Insert: {
4312
+ connection_id: string;
4313
+ data: Json;
4314
+ fetched_at?: string;
4315
+ floriday_id: string;
4316
+ id?: string;
4317
+ is_deleted?: boolean;
4318
+ sequence_number?: number;
4319
+ updated_at?: string;
4320
+ };
4321
+ Update: {
4322
+ connection_id?: string;
4323
+ data?: Json;
4324
+ fetched_at?: string;
4325
+ floriday_id?: string;
4326
+ id?: string;
4327
+ is_deleted?: boolean;
4328
+ sequence_number?: number;
4329
+ updated_at?: string;
4330
+ };
4331
+ Relationships: [
4332
+ {
4333
+ foreignKeyName: "floriday_trade_item_classifications_cache_connection_id_fkey";
4334
+ columns: ["connection_id"];
4335
+ isOneToOne: false;
4336
+ referencedRelation: "floriday_connections";
4337
+ referencedColumns: ["id"];
4338
+ }
4339
+ ];
4340
+ };
2893
4341
  floriday_trade_items_cache: {
2894
4342
  Row: {
2895
4343
  connection_id: string;
@@ -2908,16 +4356,175 @@ export type Database = {
2908
4356
  sequence_number?: number;
2909
4357
  };
2910
4358
  Update: {
2911
- connection_id?: string;
2912
- data?: Json;
2913
- fetched_at?: string;
2914
- floriday_id?: string;
2915
- is_deleted?: boolean;
2916
- sequence_number?: number;
4359
+ connection_id?: string;
4360
+ data?: Json;
4361
+ fetched_at?: string;
4362
+ floriday_id?: string;
4363
+ is_deleted?: boolean;
4364
+ sequence_number?: number;
4365
+ };
4366
+ Relationships: [
4367
+ {
4368
+ foreignKeyName: "floriday_trade_items_cache_connection_id_fkey";
4369
+ columns: ["connection_id"];
4370
+ isOneToOne: false;
4371
+ referencedRelation: "floriday_connections";
4372
+ referencedColumns: ["id"];
4373
+ }
4374
+ ];
4375
+ };
4376
+ floriday_trips_cache: {
4377
+ Row: {
4378
+ carrier_organization_id: string | null;
4379
+ connection_id: string;
4380
+ data: Json;
4381
+ fetched_at: string;
4382
+ floriday_id: string;
4383
+ id: string;
4384
+ is_deleted: boolean;
4385
+ sequence_number: number;
4386
+ status: string | null;
4387
+ trip_date: string | null;
4388
+ updated_at: string;
4389
+ };
4390
+ Insert: {
4391
+ carrier_organization_id?: string | null;
4392
+ connection_id: string;
4393
+ data?: Json;
4394
+ fetched_at?: string;
4395
+ floriday_id: string;
4396
+ id?: string;
4397
+ is_deleted?: boolean;
4398
+ sequence_number?: number;
4399
+ status?: string | null;
4400
+ trip_date?: string | null;
4401
+ updated_at?: string;
4402
+ };
4403
+ Update: {
4404
+ carrier_organization_id?: string | null;
4405
+ connection_id?: string;
4406
+ data?: Json;
4407
+ fetched_at?: string;
4408
+ floriday_id?: string;
4409
+ id?: string;
4410
+ is_deleted?: boolean;
4411
+ sequence_number?: number;
4412
+ status?: string | null;
4413
+ trip_date?: string | null;
4414
+ updated_at?: string;
4415
+ };
4416
+ Relationships: [
4417
+ {
4418
+ foreignKeyName: "floriday_trips_cache_connection_id_fkey";
4419
+ columns: ["connection_id"];
4420
+ isOneToOne: false;
4421
+ referencedRelation: "floriday_connections";
4422
+ referencedColumns: ["id"];
4423
+ }
4424
+ ];
4425
+ };
4426
+ floriday_warehouses_cache: {
4427
+ Row: {
4428
+ connection_id: string;
4429
+ data: Json;
4430
+ fetched_at: string;
4431
+ floriday_id: string;
4432
+ gln_code: string | null;
4433
+ id: string;
4434
+ is_default: boolean;
4435
+ is_deleted: boolean;
4436
+ name: string | null;
4437
+ updated_at: string;
4438
+ };
4439
+ Insert: {
4440
+ connection_id: string;
4441
+ data?: Json;
4442
+ fetched_at?: string;
4443
+ floriday_id: string;
4444
+ gln_code?: string | null;
4445
+ id?: string;
4446
+ is_default?: boolean;
4447
+ is_deleted?: boolean;
4448
+ name?: string | null;
4449
+ updated_at?: string;
4450
+ };
4451
+ Update: {
4452
+ connection_id?: string;
4453
+ data?: Json;
4454
+ fetched_at?: string;
4455
+ floriday_id?: string;
4456
+ gln_code?: string | null;
4457
+ id?: string;
4458
+ is_default?: boolean;
4459
+ is_deleted?: boolean;
4460
+ name?: string | null;
4461
+ updated_at?: string;
4462
+ };
4463
+ Relationships: [
4464
+ {
4465
+ foreignKeyName: "floriday_warehouses_cache_connection_id_fkey";
4466
+ columns: ["connection_id"];
4467
+ isOneToOne: false;
4468
+ referencedRelation: "floriday_connections";
4469
+ referencedColumns: ["id"];
4470
+ }
4471
+ ];
4472
+ };
4473
+ floriday_write_log: {
4474
+ Row: {
4475
+ action: string;
4476
+ caller: string;
4477
+ connection_id: string | null;
4478
+ created_at: string;
4479
+ error: string | null;
4480
+ floriday_id: string | null;
4481
+ http_status: number | null;
4482
+ id: string;
4483
+ idempotency_key: string | null;
4484
+ module: string | null;
4485
+ ok: boolean;
4486
+ request: Json | null;
4487
+ resource: string;
4488
+ response: Json | null;
4489
+ user_id: string | null;
4490
+ };
4491
+ Insert: {
4492
+ action: string;
4493
+ caller?: string;
4494
+ connection_id?: string | null;
4495
+ created_at?: string;
4496
+ error?: string | null;
4497
+ floriday_id?: string | null;
4498
+ http_status?: number | null;
4499
+ id?: string;
4500
+ idempotency_key?: string | null;
4501
+ module?: string | null;
4502
+ ok: boolean;
4503
+ request?: Json | null;
4504
+ resource: string;
4505
+ response?: Json | null;
4506
+ user_id?: string | null;
4507
+ };
4508
+ Update: {
4509
+ action?: string;
4510
+ caller?: string;
4511
+ connection_id?: string | null;
4512
+ created_at?: string;
4513
+ error?: string | null;
4514
+ floriday_id?: string | null;
4515
+ http_status?: number | null;
4516
+ id?: string;
4517
+ idempotency_key?: string | null;
4518
+ module?: string | null;
4519
+ ok?: boolean;
4520
+ request?: Json | null;
4521
+ resource?: string;
4522
+ response?: Json | null;
4523
+ user_id?: string | null;
2917
4524
  };
2918
4525
  Relationships: [
2919
4526
  {
2920
- foreignKeyName: "floriday_trade_items_cache_connection_id_fkey";
4527
+ foreignKeyName: "floriday_write_log_connection_id_fkey";
2921
4528
  columns: ["connection_id"];
2922
4529
  isOneToOne: false;
2923
4530
  referencedRelation: "floriday_connections";
@@ -3104,6 +4711,59 @@ export type Database = {
3104
4711
  };
3105
4712
  Relationships: [];
3106
4713
  };
4714
+ invoice_push_log: {
4715
+ Row: {
4716
+ connection_id: string | null;
4717
+ created_at: string;
4718
+ created_by: string;
4719
+ customer_id: string | null;
4720
+ id: string;
4721
+ last_error: string | null;
4722
+ last_polled_at: string | null;
4723
+ payload: Json;
4724
+ provider_id: string;
4725
+ queue_id: string | null;
4726
+ status: string;
4727
+ updated_at: string;
4728
+ };
4729
+ Insert: {
4730
+ connection_id?: string | null;
4731
+ created_at?: string;
4732
+ created_by?: string;
4733
+ customer_id?: string | null;
4734
+ id?: string;
4735
+ last_error?: string | null;
4736
+ last_polled_at?: string | null;
4737
+ payload?: Json;
4738
+ provider_id: string;
4739
+ queue_id?: string | null;
4740
+ status?: string;
4741
+ updated_at?: string;
4742
+ };
4743
+ Update: {
4744
+ connection_id?: string | null;
4745
+ created_at?: string;
4746
+ created_by?: string;
4747
+ customer_id?: string | null;
4748
+ id?: string;
4749
+ last_error?: string | null;
4750
+ last_polled_at?: string | null;
4751
+ payload?: Json;
4752
+ provider_id?: string;
4753
+ queue_id?: string | null;
4754
+ status?: string;
4755
+ updated_at?: string;
4756
+ };
4757
+ Relationships: [
4758
+ {
4759
+ foreignKeyName: "invoice_push_log_provider_id_fkey";
4760
+ columns: ["provider_id"];
4761
+ isOneToOne: false;
4762
+ referencedRelation: "external_invoice_providers";
4763
+ referencedColumns: ["provider"];
4764
+ }
4765
+ ];
4766
+ };
3107
4767
  invoice_run_items: {
3108
4768
  Row: {
3109
4769
  booking_id: string | null;
@@ -3231,6 +4891,7 @@ export type Database = {
3231
4891
  Row: {
3232
4892
  body_html: string | null;
3233
4893
  body_text: string | null;
4894
+ connection_id: string | null;
3234
4895
  created_at: string;
3235
4896
  error_message: string | null;
3236
4897
  external_id: string | null;
@@ -3249,6 +4910,7 @@ export type Database = {
3249
4910
  Insert: {
3250
4911
  body_html?: string | null;
3251
4912
  body_text?: string | null;
4913
+ connection_id?: string | null;
3252
4914
  created_at?: string;
3253
4915
  error_message?: string | null;
3254
4916
  external_id?: string | null;
@@ -3267,6 +4929,7 @@ export type Database = {
3267
4929
  Update: {
3268
4930
  body_html?: string | null;
3269
4931
  body_text?: string | null;
4932
+ connection_id?: string | null;
3270
4933
  created_at?: string;
3271
4934
  error_message?: string | null;
3272
4935
  external_id?: string | null;
@@ -3283,6 +4946,20 @@ export type Database = {
3283
4946
  updated_at?: string;
3284
4947
  };
3285
4948
  Relationships: [
4949
+ {
4950
+ foreignKeyName: "mailbox_messages_connection_id_fkey";
4951
+ columns: ["connection_id"];
4952
+ isOneToOne: false;
4953
+ referencedRelation: "email_auth_connections";
4954
+ referencedColumns: ["id"];
4955
+ },
4956
+ {
4957
+ foreignKeyName: "mailbox_messages_connection_id_fkey";
4958
+ columns: ["connection_id"];
4959
+ isOneToOne: false;
4960
+ referencedRelation: "email_auth_connections_safe";
4961
+ referencedColumns: ["id"];
4962
+ },
3286
4963
  {
3287
4964
  foreignKeyName: "mailbox_messages_profile_id_fkey";
3288
4965
  columns: ["profile_id"];
@@ -3577,6 +5254,7 @@ export type Database = {
3577
5254
  role: string;
3578
5255
  tenant_id: string;
3579
5256
  updated_at: string;
5257
+ user_id: string | null;
3580
5258
  };
3581
5259
  Insert: {
3582
5260
  avatar_url?: string | null;
@@ -3592,6 +5270,7 @@ export type Database = {
3592
5270
  role?: string;
3593
5271
  tenant_id: string;
3594
5272
  updated_at?: string;
5273
+ user_id?: string | null;
3595
5274
  };
3596
5275
  Update: {
3597
5276
  avatar_url?: string | null;
@@ -3607,6 +5286,7 @@ export type Database = {
3607
5286
  role?: string;
3608
5287
  tenant_id?: string;
3609
5288
  updated_at?: string;
5289
+ user_id?: string | null;
3610
5290
  };
3611
5291
  Relationships: [
3612
5292
  {
@@ -3748,13 +5428,6 @@ export type Database = {
3748
5428
  isOneToOne: false;
3749
5429
  referencedRelation: "offer_campaigns";
3750
5430
  referencedColumns: ["id"];
3751
- },
3752
- {
3753
- foreignKeyName: "offer_campaign_products_product_id_fkey";
3754
- columns: ["product_id"];
3755
- isOneToOne: false;
3756
- referencedRelation: "products";
3757
- referencedColumns: ["id"];
3758
5431
  }
3759
5432
  ];
3760
5433
  };
@@ -4042,6 +5715,105 @@ export type Database = {
4042
5715
  };
4043
5716
  Relationships: [];
4044
5717
  };
5718
+ order_cart_items: {
5719
+ Row: {
5720
+ cart_id: string;
5721
+ crates: number;
5722
+ crates_per_layer: number;
5723
+ created_at: string;
5724
+ id: string;
5725
+ order_item_id: string | null;
5726
+ plants_per_crate: number;
5727
+ product_id: string | null;
5728
+ product_name: string;
5729
+ };
5730
+ Insert: {
5731
+ cart_id: string;
5732
+ crates: number;
5733
+ crates_per_layer?: number;
5734
+ created_at?: string;
5735
+ id?: string;
5736
+ order_item_id?: string | null;
5737
+ plants_per_crate?: number;
5738
+ product_id?: string | null;
5739
+ product_name: string;
5740
+ };
5741
+ Update: {
5742
+ cart_id?: string;
5743
+ crates?: number;
5744
+ crates_per_layer?: number;
5745
+ created_at?: string;
5746
+ id?: string;
5747
+ order_item_id?: string | null;
5748
+ plants_per_crate?: number;
5749
+ product_id?: string | null;
5750
+ product_name?: string;
5751
+ };
5752
+ Relationships: [
5753
+ {
5754
+ foreignKeyName: "order_cart_items_cart_id_fkey";
5755
+ columns: ["cart_id"];
5756
+ isOneToOne: false;
5757
+ referencedRelation: "order_carts";
5758
+ referencedColumns: ["id"];
5759
+ },
5760
+ {
5761
+ foreignKeyName: "order_cart_items_order_item_id_fkey";
5762
+ columns: ["order_item_id"];
5763
+ isOneToOne: false;
5764
+ referencedRelation: "order_items";
5765
+ referencedColumns: ["id"];
5766
+ },
5767
+ {
5768
+ foreignKeyName: "order_cart_items_product_id_fkey";
5769
+ columns: ["product_id"];
5770
+ isOneToOne: false;
5771
+ referencedRelation: "products";
5772
+ referencedColumns: ["id"];
5773
+ }
5774
+ ];
5775
+ };
5776
+ order_carts: {
5777
+ Row: {
5778
+ cart_number: number;
5779
+ created_at: string;
5780
+ id: string;
5781
+ is_auto: boolean;
5782
+ is_complete: boolean;
5783
+ notes: string | null;
5784
+ order_id: string;
5785
+ updated_at: string;
5786
+ };
5787
+ Insert: {
5788
+ cart_number: number;
5789
+ created_at?: string;
5790
+ id?: string;
5791
+ is_auto?: boolean;
5792
+ is_complete?: boolean;
5793
+ notes?: string | null;
5794
+ order_id: string;
5795
+ updated_at?: string;
5796
+ };
5797
+ Update: {
5798
+ cart_number?: number;
5799
+ created_at?: string;
5800
+ id?: string;
5801
+ is_auto?: boolean;
5802
+ is_complete?: boolean;
5803
+ notes?: string | null;
5804
+ order_id?: string;
5805
+ updated_at?: string;
5806
+ };
5807
+ Relationships: [
5808
+ {
5809
+ foreignKeyName: "order_carts_order_id_fkey";
5810
+ columns: ["order_id"];
5811
+ isOneToOne: false;
5812
+ referencedRelation: "orders";
5813
+ referencedColumns: ["id"];
5814
+ }
5815
+ ];
5816
+ };
4045
5817
  order_field_options: {
4046
5818
  Row: {
4047
5819
  created_at: string;
@@ -4250,6 +6022,36 @@ export type Database = {
4250
6022
  };
4251
6023
  Relationships: [];
4252
6024
  };
6025
+ pickstation_print_log: {
6026
+ Row: {
6027
+ customer_name: string | null;
6028
+ documents: string[];
6029
+ id: string;
6030
+ ip_address: string | null;
6031
+ order_id: string;
6032
+ order_number: string | null;
6033
+ printed_at: string;
6034
+ };
6035
+ Insert: {
6036
+ customer_name?: string | null;
6037
+ documents?: string[];
6038
+ id?: string;
6039
+ ip_address?: string | null;
6040
+ order_id: string;
6041
+ order_number?: string | null;
6042
+ printed_at?: string;
6043
+ };
6044
+ Update: {
6045
+ customer_name?: string | null;
6046
+ documents?: string[];
6047
+ id?: string;
6048
+ ip_address?: string | null;
6049
+ order_id?: string;
6050
+ order_number?: string | null;
6051
+ printed_at?: string;
6052
+ };
6053
+ Relationships: [];
6054
+ };
4253
6055
  pipeline_settings: {
4254
6056
  Row: {
4255
6057
  created_at: string;
@@ -4412,13 +6214,16 @@ export type Database = {
4412
6214
  Row: {
4413
6215
  barcode: string | null;
4414
6216
  batch: string;
6217
+ crates_per_layer: number;
4415
6218
  created_at: string;
4416
6219
  custom_fields: Json;
4417
6220
  id: string;
4418
6221
  image_url: string | null;
4419
6222
  incoming_quantity: number;
6223
+ layers_per_cart: number;
4420
6224
  location: string;
4421
6225
  min_quantity: number;
6226
+ plants_per_crate: number;
4422
6227
  product: string;
4423
6228
  product_type: string;
4424
6229
  purchase_price: number | null;
@@ -4431,13 +6236,16 @@ export type Database = {
4431
6236
  Insert: {
4432
6237
  barcode?: string | null;
4433
6238
  batch: string;
6239
+ crates_per_layer?: number;
4434
6240
  created_at?: string;
4435
6241
  custom_fields?: Json;
4436
6242
  id?: string;
4437
6243
  image_url?: string | null;
4438
6244
  incoming_quantity?: number;
6245
+ layers_per_cart?: number;
4439
6246
  location: string;
4440
6247
  min_quantity?: number;
6248
+ plants_per_crate?: number;
4441
6249
  product: string;
4442
6250
  product_type?: string;
4443
6251
  purchase_price?: number | null;
@@ -4450,13 +6258,16 @@ export type Database = {
4450
6258
  Update: {
4451
6259
  barcode?: string | null;
4452
6260
  batch?: string;
6261
+ crates_per_layer?: number;
4453
6262
  created_at?: string;
4454
6263
  custom_fields?: Json;
4455
6264
  id?: string;
4456
6265
  image_url?: string | null;
4457
6266
  incoming_quantity?: number;
6267
+ layers_per_cart?: number;
4458
6268
  location?: string;
4459
6269
  min_quantity?: number;
6270
+ plants_per_crate?: number;
4460
6271
  product?: string;
4461
6272
  product_type?: string;
4462
6273
  purchase_price?: number | null;
@@ -5432,6 +7243,147 @@ export type Database = {
5432
7243
  };
5433
7244
  Relationships: [];
5434
7245
  };
7246
+ time_entries: {
7247
+ Row: {
7248
+ created_at: string;
7249
+ employee_id: string;
7250
+ entry_date: string;
7251
+ hours: number;
7252
+ id: string;
7253
+ notes: string | null;
7254
+ overtime: number;
7255
+ undertime: number;
7256
+ updated_at: string;
7257
+ };
7258
+ Insert: {
7259
+ created_at?: string;
7260
+ employee_id: string;
7261
+ entry_date: string;
7262
+ hours?: number;
7263
+ id?: string;
7264
+ notes?: string | null;
7265
+ overtime?: number;
7266
+ undertime?: number;
7267
+ updated_at?: string;
7268
+ };
7269
+ Update: {
7270
+ created_at?: string;
7271
+ employee_id?: string;
7272
+ entry_date?: string;
7273
+ hours?: number;
7274
+ id?: string;
7275
+ notes?: string | null;
7276
+ overtime?: number;
7277
+ undertime?: number;
7278
+ updated_at?: string;
7279
+ };
7280
+ Relationships: [
7281
+ {
7282
+ foreignKeyName: "time_entries_employee_id_fkey";
7283
+ columns: ["employee_id"];
7284
+ isOneToOne: false;
7285
+ referencedRelation: "monteurs";
7286
+ referencedColumns: ["id"];
7287
+ }
7288
+ ];
7289
+ };
7290
+ time_logs: {
7291
+ Row: {
7292
+ created_at: string;
7293
+ employee_id: string;
7294
+ end_time: string | null;
7295
+ id: string;
7296
+ notes: string | null;
7297
+ overtime_hours: number;
7298
+ overtime_type: string | null;
7299
+ regular_hours: number;
7300
+ start_time: string;
7301
+ travel_cost: number | null;
7302
+ travel_distance_km: number | null;
7303
+ type: string;
7304
+ updated_at: string;
7305
+ };
7306
+ Insert: {
7307
+ created_at?: string;
7308
+ employee_id: string;
7309
+ end_time?: string | null;
7310
+ id?: string;
7311
+ notes?: string | null;
7312
+ overtime_hours?: number;
7313
+ overtime_type?: string | null;
7314
+ regular_hours?: number;
7315
+ start_time?: string;
7316
+ travel_cost?: number | null;
7317
+ travel_distance_km?: number | null;
7318
+ type: string;
7319
+ updated_at?: string;
7320
+ };
7321
+ Update: {
7322
+ created_at?: string;
7323
+ employee_id?: string;
7324
+ end_time?: string | null;
7325
+ id?: string;
7326
+ notes?: string | null;
7327
+ overtime_hours?: number;
7328
+ overtime_type?: string | null;
7329
+ regular_hours?: number;
7330
+ start_time?: string;
7331
+ travel_cost?: number | null;
7332
+ travel_distance_km?: number | null;
7333
+ type?: string;
7334
+ updated_at?: string;
7335
+ };
7336
+ Relationships: [
7337
+ {
7338
+ foreignKeyName: "time_logs_employee_id_fkey";
7339
+ columns: ["employee_id"];
7340
+ isOneToOne: false;
7341
+ referencedRelation: "monteurs";
7342
+ referencedColumns: ["id"];
7343
+ }
7344
+ ];
7345
+ };
7346
+ time_off_entries: {
7347
+ Row: {
7348
+ created_at: string;
7349
+ employee_id: string;
7350
+ entry_date: string;
7351
+ hours: number;
7352
+ id: string;
7353
+ notes: string | null;
7354
+ type: string;
7355
+ updated_at: string;
7356
+ };
7357
+ Insert: {
7358
+ created_at?: string;
7359
+ employee_id: string;
7360
+ entry_date: string;
7361
+ hours?: number;
7362
+ id?: string;
7363
+ notes?: string | null;
7364
+ type: string;
7365
+ updated_at?: string;
7366
+ };
7367
+ Update: {
7368
+ created_at?: string;
7369
+ employee_id?: string;
7370
+ entry_date?: string;
7371
+ hours?: number;
7372
+ id?: string;
7373
+ notes?: string | null;
7374
+ type?: string;
7375
+ updated_at?: string;
7376
+ };
7377
+ Relationships: [
7378
+ {
7379
+ foreignKeyName: "time_off_entries_employee_id_fkey";
7380
+ columns: ["employee_id"];
7381
+ isOneToOne: false;
7382
+ referencedRelation: "monteurs";
7383
+ referencedColumns: ["id"];
7384
+ }
7385
+ ];
7386
+ };
5435
7387
  trade_item_drafts: {
5436
7388
  Row: {
5437
7389
  connection_id: string | null;
@@ -5733,9 +7685,11 @@ export type Database = {
5733
7685
  fetched_at: string;
5734
7686
  invoice_number: string;
5735
7687
  line_number: number;
7688
+ line_total: number | null;
5736
7689
  quantity: number | null;
5737
7690
  unit_price: number | null;
5738
7691
  vat_code: string | null;
7692
+ vat_rate: number | null;
5739
7693
  };
5740
7694
  Insert: {
5741
7695
  article_code?: string | null;
@@ -5745,9 +7699,11 @@ export type Database = {
5745
7699
  fetched_at?: string;
5746
7700
  invoice_number: string;
5747
7701
  line_number: number;
7702
+ line_total?: number | null;
5748
7703
  quantity?: number | null;
5749
7704
  unit_price?: number | null;
5750
7705
  vat_code?: string | null;
7706
+ vat_rate?: number | null;
5751
7707
  };
5752
7708
  Update: {
5753
7709
  article_code?: string | null;
@@ -5757,9 +7713,11 @@ export type Database = {
5757
7713
  fetched_at?: string;
5758
7714
  invoice_number?: string;
5759
7715
  line_number?: number;
7716
+ line_total?: number | null;
5760
7717
  quantity?: number | null;
5761
7718
  unit_price?: number | null;
5762
7719
  vat_code?: string | null;
7720
+ vat_rate?: number | null;
5763
7721
  };
5764
7722
  Relationships: [
5765
7723
  {
@@ -5938,9 +7896,12 @@ export type Database = {
5938
7896
  invoice_date: string | null;
5939
7897
  invoice_number: string;
5940
7898
  modified_at: string | null;
7899
+ outstanding_amount: number | null;
5941
7900
  status: string | null;
7901
+ status_label: string | null;
5942
7902
  total_excl: number | null;
5943
7903
  total_incl: number | null;
7904
+ vat_amount: number | null;
5944
7905
  };
5945
7906
  Insert: {
5946
7907
  connection_id: string;
@@ -5952,9 +7913,12 @@ export type Database = {
5952
7913
  invoice_date?: string | null;
5953
7914
  invoice_number: string;
5954
7915
  modified_at?: string | null;
7916
+ outstanding_amount?: number | null;
5955
7917
  status?: string | null;
7918
+ status_label?: string | null;
5956
7919
  total_excl?: number | null;
5957
7920
  total_incl?: number | null;
7921
+ vat_amount?: number | null;
5958
7922
  };
5959
7923
  Update: {
5960
7924
  connection_id?: string;
@@ -5966,9 +7930,12 @@ export type Database = {
5966
7930
  invoice_date?: string | null;
5967
7931
  invoice_number?: string;
5968
7932
  modified_at?: string | null;
7933
+ outstanding_amount?: number | null;
5969
7934
  status?: string | null;
7935
+ status_label?: string | null;
5970
7936
  total_excl?: number | null;
5971
7937
  total_incl?: number | null;
7938
+ vat_amount?: number | null;
5972
7939
  };
5973
7940
  Relationships: [
5974
7941
  {
@@ -6004,6 +7971,59 @@ export type Database = {
6004
7971
  };
6005
7972
  Relationships: [];
6006
7973
  };
7974
+ twinfield_push_queue: {
7975
+ Row: {
7976
+ attempts: number;
7977
+ connection_id: string;
7978
+ created_at: string;
7979
+ external_id: string | null;
7980
+ id: string;
7981
+ idempotency_key: string;
7982
+ last_error: string | null;
7983
+ next_attempt_at: string;
7984
+ office_code: string;
7985
+ payload: Json;
7986
+ status: string;
7987
+ updated_at: string;
7988
+ };
7989
+ Insert: {
7990
+ attempts?: number;
7991
+ connection_id: string;
7992
+ created_at?: string;
7993
+ external_id?: string | null;
7994
+ id?: string;
7995
+ idempotency_key: string;
7996
+ last_error?: string | null;
7997
+ next_attempt_at?: string;
7998
+ office_code: string;
7999
+ payload: Json;
8000
+ status?: string;
8001
+ updated_at?: string;
8002
+ };
8003
+ Update: {
8004
+ attempts?: number;
8005
+ connection_id?: string;
8006
+ created_at?: string;
8007
+ external_id?: string | null;
8008
+ id?: string;
8009
+ idempotency_key?: string;
8010
+ last_error?: string | null;
8011
+ next_attempt_at?: string;
8012
+ office_code?: string;
8013
+ payload?: Json;
8014
+ status?: string;
8015
+ updated_at?: string;
8016
+ };
8017
+ Relationships: [
8018
+ {
8019
+ foreignKeyName: "twinfield_push_queue_connection_id_fkey";
8020
+ columns: ["connection_id"];
8021
+ isOneToOne: false;
8022
+ referencedRelation: "twinfield_connections";
8023
+ referencedColumns: ["id"];
8024
+ }
8025
+ ];
8026
+ };
6007
8027
  twinfield_settings: {
6008
8028
  Row: {
6009
8029
  active_environment: string;
@@ -6121,6 +8141,51 @@ export type Database = {
6121
8141
  }
6122
8142
  ];
6123
8143
  };
8144
+ voorraad_publish_attempts: {
8145
+ Row: {
8146
+ action: string;
8147
+ connection_id: string | null;
8148
+ created_at: string;
8149
+ error: string | null;
8150
+ gateway_attempt_id: string | null;
8151
+ gateway_status: number | null;
8152
+ id: string;
8153
+ intent: string;
8154
+ ok: boolean;
8155
+ request_summary: Json | null;
8156
+ trade_item_id: string | null;
8157
+ user_id: string;
8158
+ };
8159
+ Insert: {
8160
+ action: string;
8161
+ connection_id?: string | null;
8162
+ created_at?: string;
8163
+ error?: string | null;
8164
+ gateway_attempt_id?: string | null;
8165
+ gateway_status?: number | null;
8166
+ id?: string;
8167
+ intent: string;
8168
+ ok: boolean;
8169
+ request_summary?: Json | null;
8170
+ trade_item_id?: string | null;
8171
+ user_id: string;
8172
+ };
8173
+ Update: {
8174
+ action?: string;
8175
+ connection_id?: string | null;
8176
+ created_at?: string;
8177
+ error?: string | null;
8178
+ gateway_attempt_id?: string | null;
8179
+ gateway_status?: number | null;
8180
+ id?: string;
8181
+ intent?: string;
8182
+ ok?: boolean;
8183
+ request_summary?: Json | null;
8184
+ trade_item_id?: string | null;
8185
+ user_id?: string;
8186
+ };
8187
+ Relationships: [];
8188
+ };
6124
8189
  work_order_monteurs: {
6125
8190
  Row: {
6126
8191
  created_at: string;
@@ -6438,6 +8503,134 @@ export type Database = {
6438
8503
  };
6439
8504
  Relationships: [];
6440
8505
  };
8506
+ external_invoices_grouped: {
8507
+ Row: {
8508
+ currency: string | null;
8509
+ customer_external_id: string | null;
8510
+ customer_name: string | null;
8511
+ customer_vat: string | null;
8512
+ due_at: string | null;
8513
+ group_key: string | null;
8514
+ invoice_number: string | null;
8515
+ is_merged: boolean | null;
8516
+ issued_at: string | null;
8517
+ modified_at: string | null;
8518
+ open_amount: number | null;
8519
+ paid_at: string | null;
8520
+ providers: string[] | null;
8521
+ source_count: number | null;
8522
+ sources: Json | null;
8523
+ status: string | null;
8524
+ total_excl: number | null;
8525
+ total_incl: number | null;
8526
+ total_vat: number | null;
8527
+ };
8528
+ Relationships: [];
8529
+ };
8530
+ external_invoices_unified: {
8531
+ Row: {
8532
+ connection_id: string | null;
8533
+ currency: string | null;
8534
+ customer_external_id: string | null;
8535
+ customer_name: string | null;
8536
+ customer_vat: string | null;
8537
+ due_at: string | null;
8538
+ external_id: string | null;
8539
+ invoice_number: string | null;
8540
+ issued_at: string | null;
8541
+ open_amount: number | null;
8542
+ owner_user_id: string | null;
8543
+ paid_at: string | null;
8544
+ raw: Json | null;
8545
+ source: string | null;
8546
+ status: string | null;
8547
+ synced_at: string | null;
8548
+ total_excl: number | null;
8549
+ total_incl: number | null;
8550
+ total_vat: number | null;
8551
+ };
8552
+ Relationships: [];
8553
+ };
8554
+ v_external_customers_exact: {
8555
+ Row: {
8556
+ account_number: string | null;
8557
+ city: string | null;
8558
+ coc_number: string | null;
8559
+ company_name: string | null;
8560
+ connection_id: string | null;
8561
+ country: string | null;
8562
+ currency: string | null;
8563
+ email: string | null;
8564
+ external_id: string | null;
8565
+ is_sales: boolean | null;
8566
+ is_supplier: boolean | null;
8567
+ language: string | null;
8568
+ modified_at: string | null;
8569
+ phone: string | null;
8570
+ postal_code: string | null;
8571
+ raw: Json | null;
8572
+ source: string | null;
8573
+ street: string | null;
8574
+ synced_at: string | null;
8575
+ vat_number: string | null;
8576
+ website: string | null;
8577
+ };
8578
+ Insert: {
8579
+ account_number?: string | null;
8580
+ city?: string | null;
8581
+ coc_number?: string | null;
8582
+ company_name?: string | null;
8583
+ connection_id?: string | null;
8584
+ country?: string | null;
8585
+ currency?: string | null;
8586
+ email?: string | null;
8587
+ external_id?: string | null;
8588
+ is_sales?: boolean | null;
8589
+ is_supplier?: boolean | null;
8590
+ language?: string | null;
8591
+ modified_at?: string | null;
8592
+ phone?: string | null;
8593
+ postal_code?: string | null;
8594
+ raw?: Json | null;
8595
+ source?: never;
8596
+ street?: string | null;
8597
+ synced_at?: string | null;
8598
+ vat_number?: string | null;
8599
+ website?: string | null;
8600
+ };
8601
+ Update: {
8602
+ account_number?: string | null;
8603
+ city?: string | null;
8604
+ coc_number?: string | null;
8605
+ company_name?: string | null;
8606
+ connection_id?: string | null;
8607
+ country?: string | null;
8608
+ currency?: string | null;
8609
+ email?: string | null;
8610
+ external_id?: string | null;
8611
+ is_sales?: boolean | null;
8612
+ is_supplier?: boolean | null;
8613
+ language?: string | null;
8614
+ modified_at?: string | null;
8615
+ phone?: string | null;
8616
+ postal_code?: string | null;
8617
+ raw?: Json | null;
8618
+ source?: never;
8619
+ street?: string | null;
8620
+ synced_at?: string | null;
8621
+ vat_number?: string | null;
8622
+ website?: string | null;
8623
+ };
8624
+ Relationships: [
8625
+ {
8626
+ foreignKeyName: "exact_customers_cache_connection_id_fkey";
8627
+ columns: ["connection_id"];
8628
+ isOneToOne: false;
8629
+ referencedRelation: "exact_connections";
8630
+ referencedColumns: ["id"];
8631
+ }
8632
+ ];
8633
+ };
6441
8634
  v_external_customers_floriday: {
6442
8635
  Row: {
6443
8636
  city: string | null;
@@ -6473,34 +8666,137 @@ export type Database = {
6473
8666
  }
6474
8667
  ];
6475
8668
  };
6476
- v_external_customers_twinfield: {
8669
+ v_external_customers_twinfield: {
8670
+ Row: {
8671
+ city: string | null;
8672
+ commercial_name: string | null;
8673
+ company_name: string | null;
8674
+ connection_id: string | null;
8675
+ contact_person: string | null;
8676
+ country: string | null;
8677
+ email: string | null;
8678
+ external_id: string | null;
8679
+ fetched_at: string | null;
8680
+ gln: string | null;
8681
+ house_number: string | null;
8682
+ is_active: boolean | null;
8683
+ is_deleted: boolean | null;
8684
+ logo_url: string | null;
8685
+ phone: string | null;
8686
+ postal_code: string | null;
8687
+ provider: string | null;
8688
+ raw: Json | null;
8689
+ status: string | null;
8690
+ street: string | null;
8691
+ vat_number: string | null;
8692
+ website: string | null;
8693
+ };
8694
+ Relationships: [
8695
+ {
8696
+ foreignKeyName: "twinfield_customers_cache_connection_id_fkey";
8697
+ columns: ["connection_id"];
8698
+ isOneToOne: false;
8699
+ referencedRelation: "twinfield_connections";
8700
+ referencedColumns: ["id"];
8701
+ }
8702
+ ];
8703
+ };
8704
+ v_external_invoices_exact: {
8705
+ Row: {
8706
+ connection_id: string | null;
8707
+ currency: string | null;
8708
+ customer_external_id: string | null;
8709
+ customer_name: string | null;
8710
+ customer_vat: string | null;
8711
+ due_at: string | null;
8712
+ external_id: string | null;
8713
+ invoice_number: string | null;
8714
+ issued_at: string | null;
8715
+ open_amount: number | null;
8716
+ paid_at: string | null;
8717
+ raw: Json | null;
8718
+ source: string | null;
8719
+ status: string | null;
8720
+ synced_at: string | null;
8721
+ total_excl: number | null;
8722
+ total_incl: number | null;
8723
+ total_vat: number | null;
8724
+ };
8725
+ Insert: {
8726
+ connection_id?: string | null;
8727
+ currency?: never;
8728
+ customer_external_id?: string | null;
8729
+ customer_name?: string | null;
8730
+ customer_vat?: never;
8731
+ due_at?: string | null;
8732
+ external_id?: string | null;
8733
+ invoice_number?: string | null;
8734
+ issued_at?: string | null;
8735
+ open_amount?: number | null;
8736
+ paid_at?: string | null;
8737
+ raw?: Json | null;
8738
+ source?: never;
8739
+ status?: string | null;
8740
+ synced_at?: string | null;
8741
+ total_excl?: number | null;
8742
+ total_incl?: number | null;
8743
+ total_vat?: number | null;
8744
+ };
8745
+ Update: {
8746
+ connection_id?: string | null;
8747
+ currency?: never;
8748
+ customer_external_id?: string | null;
8749
+ customer_name?: string | null;
8750
+ customer_vat?: never;
8751
+ due_at?: string | null;
8752
+ external_id?: string | null;
8753
+ invoice_number?: string | null;
8754
+ issued_at?: string | null;
8755
+ open_amount?: number | null;
8756
+ paid_at?: string | null;
8757
+ raw?: Json | null;
8758
+ source?: never;
8759
+ status?: string | null;
8760
+ synced_at?: string | null;
8761
+ total_excl?: number | null;
8762
+ total_incl?: number | null;
8763
+ total_vat?: number | null;
8764
+ };
8765
+ Relationships: [
8766
+ {
8767
+ foreignKeyName: "exact_invoices_cache_connection_id_fkey";
8768
+ columns: ["connection_id"];
8769
+ isOneToOne: false;
8770
+ referencedRelation: "exact_connections";
8771
+ referencedColumns: ["id"];
8772
+ }
8773
+ ];
8774
+ };
8775
+ v_external_invoices_twinfield: {
6477
8776
  Row: {
6478
- city: string | null;
6479
- commercial_name: string | null;
6480
- company_name: string | null;
6481
8777
  connection_id: string | null;
6482
- contact_person: string | null;
6483
- country: string | null;
6484
- email: string | null;
8778
+ currency: string | null;
8779
+ customer_external_id: string | null;
8780
+ customer_name: string | null;
8781
+ customer_vat: string | null;
8782
+ due_at: string | null;
6485
8783
  external_id: string | null;
6486
- fetched_at: string | null;
6487
- gln: string | null;
6488
- house_number: string | null;
6489
- is_active: boolean | null;
6490
- is_deleted: boolean | null;
6491
- logo_url: string | null;
6492
- phone: string | null;
6493
- postal_code: string | null;
6494
- provider: string | null;
8784
+ invoice_number: string | null;
8785
+ issued_at: string | null;
8786
+ open_amount: number | null;
8787
+ owner_user_id: string | null;
8788
+ paid_at: string | null;
6495
8789
  raw: Json | null;
8790
+ source: string | null;
6496
8791
  status: string | null;
6497
- street: string | null;
6498
- vat_number: string | null;
6499
- website: string | null;
8792
+ synced_at: string | null;
8793
+ total_excl: number | null;
8794
+ total_incl: number | null;
8795
+ total_vat: number | null;
6500
8796
  };
6501
8797
  Relationships: [
6502
8798
  {
6503
- foreignKeyName: "twinfield_customers_cache_connection_id_fkey";
8799
+ foreignKeyName: "twinfield_invoices_cache_v2_connection_id_fkey";
6504
8800
  columns: ["connection_id"];
6505
8801
  isOneToOne: false;
6506
8802
  referencedRelation: "twinfield_connections";
@@ -6510,6 +8806,30 @@ export type Database = {
6510
8806
  };
6511
8807
  };
6512
8808
  Functions: {
8809
+ _floriday_schedule_job: {
8810
+ Args: {
8811
+ p_apikey: string;
8812
+ p_jobname: string;
8813
+ p_schedule: string;
8814
+ p_timeout_ms: number;
8815
+ p_url: string;
8816
+ };
8817
+ Returns: number;
8818
+ };
8819
+ call_exact_route: {
8820
+ Args: {
8821
+ path: string;
8822
+ };
8823
+ Returns: number;
8824
+ };
8825
+ cleanup_old_bookings: {
8826
+ Args: never;
8827
+ Returns: number;
8828
+ };
8829
+ current_monteur_id: {
8830
+ Args: never;
8831
+ Returns: string;
8832
+ };
6513
8833
  dashboard_list_public_schema: {
6514
8834
  Args: never;
6515
8835
  Returns: {
@@ -6614,6 +8934,32 @@ export type Database = {
6614
8934
  office_code: string;
6615
8935
  }[];
6616
8936
  };
8937
+ get_floriday_agreements_active: {
8938
+ Args: {
8939
+ p_on_date?: string;
8940
+ };
8941
+ Returns: {
8942
+ buyer_organization_id: string;
8943
+ data: Json;
8944
+ floriday_id: string;
8945
+ status: string;
8946
+ valid_from: string;
8947
+ valid_until: string;
8948
+ }[];
8949
+ };
8950
+ get_floriday_clock_supplies_window: {
8951
+ Args: {
8952
+ p_from: string;
8953
+ p_to: string;
8954
+ };
8955
+ Returns: {
8956
+ auction_date: string;
8957
+ data: Json;
8958
+ floriday_id: string;
8959
+ status: string;
8960
+ trade_item_id: string;
8961
+ }[];
8962
+ };
6617
8963
  get_floriday_cron_jobs: {
6618
8964
  Args: never;
6619
8965
  Returns: {
@@ -6623,6 +8969,56 @@ export type Database = {
6623
8969
  url: string;
6624
8970
  }[];
6625
8971
  };
8972
+ get_floriday_delivery_locations: {
8973
+ Args: {
8974
+ p_organization_id: string;
8975
+ };
8976
+ Returns: {
8977
+ data: Json;
8978
+ floriday_id: string;
8979
+ gln_code: string;
8980
+ name: string;
8981
+ }[];
8982
+ };
8983
+ get_floriday_fulfillment_orders_window: {
8984
+ Args: {
8985
+ p_from: string;
8986
+ p_to: string;
8987
+ };
8988
+ Returns: {
8989
+ auction_date: string;
8990
+ data: Json;
8991
+ delivery_order_id: string;
8992
+ destination_warehouse_id: string;
8993
+ floriday_id: string;
8994
+ status: string;
8995
+ }[];
8996
+ };
8997
+ get_floriday_sales_orders_window: {
8998
+ Args: {
8999
+ p_from: string;
9000
+ p_to: string;
9001
+ };
9002
+ Returns: {
9003
+ buyer_organization_id: string;
9004
+ data: Json;
9005
+ floriday_id: string;
9006
+ status: string;
9007
+ updated_at: string;
9008
+ }[];
9009
+ };
9010
+ get_floriday_sync_health: {
9011
+ Args: never;
9012
+ Returns: {
9013
+ entity_type: string;
9014
+ last_error: string;
9015
+ last_items_processed: number;
9016
+ last_sequence_number: number;
9017
+ last_success_at: string;
9018
+ last_synced_at: string;
9019
+ minutes_since_success: number;
9020
+ }[];
9021
+ };
6626
9022
  get_offer_by_link_code: {
6627
9023
  Args: {
6628
9024
  p_code: string;
@@ -6688,6 +9084,48 @@ export type Database = {
6688
9084
  };
6689
9085
  Returns: string;
6690
9086
  };
9087
+ reset_floriday_sync_cursor: {
9088
+ Args: {
9089
+ p_connection_id: string;
9090
+ p_entity_type: string;
9091
+ };
9092
+ Returns: undefined;
9093
+ };
9094
+ schedule_floriday_additional_services_sync: {
9095
+ Args: {
9096
+ p_apikey: string;
9097
+ p_url: string;
9098
+ };
9099
+ Returns: number;
9100
+ };
9101
+ schedule_floriday_agreement_calloffs_sync: {
9102
+ Args: {
9103
+ p_apikey: string;
9104
+ p_url: string;
9105
+ };
9106
+ Returns: number;
9107
+ };
9108
+ schedule_floriday_agreements_sync: {
9109
+ Args: {
9110
+ p_apikey: string;
9111
+ p_url: string;
9112
+ };
9113
+ Returns: number;
9114
+ };
9115
+ schedule_floriday_base_items_sync: {
9116
+ Args: {
9117
+ p_apikey: string;
9118
+ p_url: string;
9119
+ };
9120
+ Returns: number;
9121
+ };
9122
+ schedule_floriday_blanket_orders_sync: {
9123
+ Args: {
9124
+ p_apikey: string;
9125
+ p_url: string;
9126
+ };
9127
+ Returns: number;
9128
+ };
6691
9129
  schedule_floriday_carriers_sync: {
6692
9130
  Args: {
6693
9131
  p_apikey: string;
@@ -6695,6 +9133,34 @@ export type Database = {
6695
9133
  };
6696
9134
  Returns: number;
6697
9135
  };
9136
+ schedule_floriday_clock_presales_sync: {
9137
+ Args: {
9138
+ p_apikey: string;
9139
+ p_url: string;
9140
+ };
9141
+ Returns: number;
9142
+ };
9143
+ schedule_floriday_clock_supplies_sync: {
9144
+ Args: {
9145
+ p_apikey: string;
9146
+ p_url: string;
9147
+ };
9148
+ Returns: number;
9149
+ };
9150
+ schedule_floriday_collections_sync: {
9151
+ Args: {
9152
+ p_apikey: string;
9153
+ p_url: string;
9154
+ };
9155
+ Returns: number;
9156
+ };
9157
+ schedule_floriday_commercial_service_types_sync: {
9158
+ Args: {
9159
+ p_apikey: string;
9160
+ p_url: string;
9161
+ };
9162
+ Returns: number;
9163
+ };
6698
9164
  schedule_floriday_connections_sync: {
6699
9165
  Args: {
6700
9166
  p_apikey: string;
@@ -6702,6 +9168,20 @@ export type Database = {
6702
9168
  };
6703
9169
  Returns: number;
6704
9170
  };
9171
+ schedule_floriday_contract_trade_item_groups_sync: {
9172
+ Args: {
9173
+ p_apikey: string;
9174
+ p_url: string;
9175
+ };
9176
+ Returns: number;
9177
+ };
9178
+ schedule_floriday_contracts_sync: {
9179
+ Args: {
9180
+ p_apikey: string;
9181
+ p_url: string;
9182
+ };
9183
+ Returns: number;
9184
+ };
6705
9185
  schedule_floriday_customer_organizations_sync: {
6706
9186
  Args: {
6707
9187
  p_apikey: string;
@@ -6709,6 +9189,48 @@ export type Database = {
6709
9189
  };
6710
9190
  Returns: number;
6711
9191
  };
9192
+ schedule_floriday_customer_stickers_sync: {
9193
+ Args: {
9194
+ p_apikey: string;
9195
+ p_url: string;
9196
+ };
9197
+ Returns: number;
9198
+ };
9199
+ schedule_floriday_delivery_condition_sets_sync: {
9200
+ Args: {
9201
+ p_apikey: string;
9202
+ p_url: string;
9203
+ };
9204
+ Returns: number;
9205
+ };
9206
+ schedule_floriday_delivery_locations_sync: {
9207
+ Args: {
9208
+ p_apikey: string;
9209
+ p_url: string;
9210
+ };
9211
+ Returns: number;
9212
+ };
9213
+ schedule_floriday_delivery_orders_sync: {
9214
+ Args: {
9215
+ p_apikey: string;
9216
+ p_url: string;
9217
+ };
9218
+ Returns: number;
9219
+ };
9220
+ schedule_floriday_fulfillment_orders_sync: {
9221
+ Args: {
9222
+ p_apikey: string;
9223
+ p_url: string;
9224
+ };
9225
+ Returns: number;
9226
+ };
9227
+ schedule_floriday_invoices_sync: {
9228
+ Args: {
9229
+ p_apikey: string;
9230
+ p_url: string;
9231
+ };
9232
+ Returns: number;
9233
+ };
6712
9234
  schedule_floriday_network_sync: {
6713
9235
  Args: {
6714
9236
  p_apikey: string;
@@ -6716,6 +9238,34 @@ export type Database = {
6716
9238
  };
6717
9239
  Returns: number;
6718
9240
  };
9241
+ schedule_floriday_packings_sync: {
9242
+ Args: {
9243
+ p_apikey: string;
9244
+ p_url: string;
9245
+ };
9246
+ Returns: number;
9247
+ };
9248
+ schedule_floriday_price_groups_sync: {
9249
+ Args: {
9250
+ p_apikey: string;
9251
+ p_url: string;
9252
+ };
9253
+ Returns: number;
9254
+ };
9255
+ schedule_floriday_reference_data_refresh: {
9256
+ Args: {
9257
+ p_apikey: string;
9258
+ p_url: string;
9259
+ };
9260
+ Returns: number;
9261
+ };
9262
+ schedule_floriday_sales_strategies_sync: {
9263
+ Args: {
9264
+ p_apikey: string;
9265
+ p_url: string;
9266
+ };
9267
+ Returns: number;
9268
+ };
6719
9269
  schedule_floriday_salesorders_sync: {
6720
9270
  Args: {
6721
9271
  p_apikey: string;
@@ -6730,6 +9280,13 @@ export type Database = {
6730
9280
  };
6731
9281
  Returns: number;
6732
9282
  };
9283
+ schedule_floriday_trade_item_classifications_sync: {
9284
+ Args: {
9285
+ p_apikey: string;
9286
+ p_url: string;
9287
+ };
9288
+ Returns: number;
9289
+ };
6733
9290
  schedule_floriday_trade_items_sync: {
6734
9291
  Args: {
6735
9292
  p_apikey: string;
@@ -6737,6 +9294,20 @@ export type Database = {
6737
9294
  };
6738
9295
  Returns: number;
6739
9296
  };
9297
+ schedule_floriday_trips_sync: {
9298
+ Args: {
9299
+ p_apikey: string;
9300
+ p_url: string;
9301
+ };
9302
+ Returns: number;
9303
+ };
9304
+ schedule_floriday_warehouses_sync: {
9305
+ Args: {
9306
+ p_apikey: string;
9307
+ p_url: string;
9308
+ };
9309
+ Returns: number;
9310
+ };
6740
9311
  schedule_twinfield_customers_sync: {
6741
9312
  Args: {
6742
9313
  p_apikey: string;
@@ -6765,6 +9336,14 @@ export type Database = {
6765
9336
  };
6766
9337
  Returns: number;
6767
9338
  };
9339
+ schedule_twinfield_push_queue_flush: {
9340
+ Args: {
9341
+ p_apikey: string;
9342
+ p_cron_secret?: string;
9343
+ p_url: string;
9344
+ };
9345
+ Returns: number;
9346
+ };
6768
9347
  schedule_twinfield_token_refresh: {
6769
9348
  Args: {
6770
9349
  p_apikey: string;
@@ -6803,8 +9382,9 @@ export type Database = {
6803
9382
  };
6804
9383
  };
6805
9384
  Enums: {
6806
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
9385
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
6807
9386
  exact_env: "staging" | "live";
9387
+ exact_push_status: "pending" | "sent" | "error";
6808
9388
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
6809
9389
  };
6810
9390
  CompositeTypes: {
@@ -6864,8 +9444,9 @@ export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof Defaul
6864
9444
  export declare const Constants: {
6865
9445
  readonly public: {
6866
9446
  readonly Enums: {
6867
- readonly app_role: readonly ["admin", "manager", "warehouse", "sales", "developer", "receptie"];
9447
+ readonly app_role: readonly ["admin", "manager", "warehouse", "sales", "developer", "receptie", "monteur"];
6868
9448
  readonly exact_env: readonly ["staging", "live"];
9449
+ readonly exact_push_status: readonly ["pending", "sent", "error"];
6869
9450
  readonly quote_status: readonly ["concept", "verzonden", "bekeken", "in_behandeling", "geaccepteerd", "afgewezen", "verlopen", "gearchiveerd"];
6870
9451
  };
6871
9452
  };