@flowselections/floriday-voorraad 1.0.9 → 1.0.11

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.
@@ -475,6 +475,276 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
475
475
  };
476
476
  Relationships: [];
477
477
  };
478
+ dashboard_ai_conversations: {
479
+ Row: {
480
+ created_at: string;
481
+ id: string;
482
+ messages: import("./types").Json;
483
+ page_id: string | null;
484
+ title: string | null;
485
+ updated_at: string;
486
+ user_id: string;
487
+ };
488
+ Insert: {
489
+ created_at?: string;
490
+ id?: string;
491
+ messages?: import("./types").Json;
492
+ page_id?: string | null;
493
+ title?: string | null;
494
+ updated_at?: string;
495
+ user_id: string;
496
+ };
497
+ Update: {
498
+ created_at?: string;
499
+ id?: string;
500
+ messages?: import("./types").Json;
501
+ page_id?: string | null;
502
+ title?: string | null;
503
+ updated_at?: string;
504
+ user_id?: string;
505
+ };
506
+ Relationships: [{
507
+ foreignKeyName: "dashboard_ai_conversations_page_id_fkey";
508
+ columns: ["page_id"];
509
+ isOneToOne: false;
510
+ referencedRelation: "dashboard_pages";
511
+ referencedColumns: ["id"];
512
+ }];
513
+ };
514
+ dashboard_alert_events: {
515
+ Row: {
516
+ acknowledged: boolean;
517
+ block_id: string;
518
+ created_at: string;
519
+ id: string;
520
+ message: string | null;
521
+ page_id: string;
522
+ severity: string;
523
+ threshold: number | null;
524
+ user_id: string;
525
+ value: number | null;
526
+ };
527
+ Insert: {
528
+ acknowledged?: boolean;
529
+ block_id: string;
530
+ created_at?: string;
531
+ id?: string;
532
+ message?: string | null;
533
+ page_id: string;
534
+ severity?: string;
535
+ threshold?: number | null;
536
+ user_id: string;
537
+ value?: number | null;
538
+ };
539
+ Update: {
540
+ acknowledged?: boolean;
541
+ block_id?: string;
542
+ created_at?: string;
543
+ id?: string;
544
+ message?: string | null;
545
+ page_id?: string;
546
+ severity?: string;
547
+ threshold?: number | null;
548
+ user_id?: string;
549
+ value?: number | null;
550
+ };
551
+ Relationships: [{
552
+ foreignKeyName: "dashboard_alert_events_block_id_fkey";
553
+ columns: ["block_id"];
554
+ isOneToOne: false;
555
+ referencedRelation: "dashboard_blocks";
556
+ referencedColumns: ["id"];
557
+ }, {
558
+ foreignKeyName: "dashboard_alert_events_page_id_fkey";
559
+ columns: ["page_id"];
560
+ isOneToOne: false;
561
+ referencedRelation: "dashboard_pages";
562
+ referencedColumns: ["id"];
563
+ }];
564
+ };
565
+ dashboard_block_templates: {
566
+ Row: {
567
+ config: import("./types").Json;
568
+ created_at: string;
569
+ description: string | null;
570
+ id: string;
571
+ is_public: boolean;
572
+ name: string;
573
+ type: string;
574
+ updated_at: string;
575
+ user_id: string;
576
+ };
577
+ Insert: {
578
+ config?: import("./types").Json;
579
+ created_at?: string;
580
+ description?: string | null;
581
+ id?: string;
582
+ is_public?: boolean;
583
+ name: string;
584
+ type: string;
585
+ updated_at?: string;
586
+ user_id: string;
587
+ };
588
+ Update: {
589
+ config?: import("./types").Json;
590
+ created_at?: string;
591
+ description?: string | null;
592
+ id?: string;
593
+ is_public?: boolean;
594
+ name?: string;
595
+ type?: string;
596
+ updated_at?: string;
597
+ user_id?: string;
598
+ };
599
+ Relationships: [];
600
+ };
601
+ dashboard_blocks: {
602
+ Row: {
603
+ config: import("./types").Json;
604
+ created_at: string;
605
+ filters: import("./types").Json;
606
+ id: string;
607
+ layout: import("./types").Json;
608
+ page_id: string;
609
+ permissions: import("./types").Json;
610
+ sort_order: number;
611
+ title: string;
612
+ type: string;
613
+ updated_at: string;
614
+ };
615
+ Insert: {
616
+ config?: import("./types").Json;
617
+ created_at?: string;
618
+ filters?: import("./types").Json;
619
+ id?: string;
620
+ layout?: import("./types").Json;
621
+ page_id: string;
622
+ permissions?: import("./types").Json;
623
+ sort_order?: number;
624
+ title: string;
625
+ type: string;
626
+ updated_at?: string;
627
+ };
628
+ Update: {
629
+ config?: import("./types").Json;
630
+ created_at?: string;
631
+ filters?: import("./types").Json;
632
+ id?: string;
633
+ layout?: import("./types").Json;
634
+ page_id?: string;
635
+ permissions?: import("./types").Json;
636
+ sort_order?: number;
637
+ title?: string;
638
+ type?: string;
639
+ updated_at?: string;
640
+ };
641
+ Relationships: [{
642
+ foreignKeyName: "dashboard_blocks_page_id_fkey";
643
+ columns: ["page_id"];
644
+ isOneToOne: false;
645
+ referencedRelation: "dashboard_pages";
646
+ referencedColumns: ["id"];
647
+ }];
648
+ };
649
+ dashboard_daily_reports: {
650
+ Row: {
651
+ created_at: string;
652
+ highlights: import("./types").Json | null;
653
+ id: string;
654
+ page_id: string;
655
+ summary: string;
656
+ user_id: string;
657
+ };
658
+ Insert: {
659
+ created_at?: string;
660
+ highlights?: import("./types").Json | null;
661
+ id?: string;
662
+ page_id: string;
663
+ summary: string;
664
+ user_id: string;
665
+ };
666
+ Update: {
667
+ created_at?: string;
668
+ highlights?: import("./types").Json | null;
669
+ id?: string;
670
+ page_id?: string;
671
+ summary?: string;
672
+ user_id?: string;
673
+ };
674
+ Relationships: [{
675
+ foreignKeyName: "dashboard_daily_reports_page_id_fkey";
676
+ columns: ["page_id"];
677
+ isOneToOne: false;
678
+ referencedRelation: "dashboard_pages";
679
+ referencedColumns: ["id"];
680
+ }];
681
+ };
682
+ dashboard_pages: {
683
+ Row: {
684
+ created_at: string;
685
+ icon: string | null;
686
+ id: string;
687
+ is_default: boolean;
688
+ name: string;
689
+ shared_with: string[];
690
+ sort_order: number;
691
+ updated_at: string;
692
+ user_id: string;
693
+ };
694
+ Insert: {
695
+ created_at?: string;
696
+ icon?: string | null;
697
+ id?: string;
698
+ is_default?: boolean;
699
+ name: string;
700
+ shared_with?: string[];
701
+ sort_order?: number;
702
+ updated_at?: string;
703
+ user_id: string;
704
+ };
705
+ Update: {
706
+ created_at?: string;
707
+ icon?: string | null;
708
+ id?: string;
709
+ is_default?: boolean;
710
+ name?: string;
711
+ shared_with?: string[];
712
+ sort_order?: number;
713
+ updated_at?: string;
714
+ user_id?: string;
715
+ };
716
+ Relationships: [];
717
+ };
718
+ dashboard_saved_queries: {
719
+ Row: {
720
+ created_at: string;
721
+ description: string | null;
722
+ id: string;
723
+ name: string;
724
+ query_spec: import("./types").Json;
725
+ updated_at: string;
726
+ user_id: string;
727
+ };
728
+ Insert: {
729
+ created_at?: string;
730
+ description?: string | null;
731
+ id?: string;
732
+ name: string;
733
+ query_spec: import("./types").Json;
734
+ updated_at?: string;
735
+ user_id: string;
736
+ };
737
+ Update: {
738
+ created_at?: string;
739
+ description?: string | null;
740
+ id?: string;
741
+ name?: string;
742
+ query_spec?: import("./types").Json;
743
+ updated_at?: string;
744
+ user_id?: string;
745
+ };
746
+ Relationships: [];
747
+ };
478
748
  exact_connections: {
479
749
  Row: {
480
750
  access_token_encrypted: string;
@@ -485,6 +755,9 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
485
755
  environment: Database["public"]["Enums"]["exact_env"];
486
756
  expires_at: string;
487
757
  id: string;
758
+ last_error: string | null;
759
+ last_refreshed_at: string | null;
760
+ last_tested_at: string | null;
488
761
  refresh_token_encrypted: string;
489
762
  status: string;
490
763
  updated_at: string;
@@ -498,6 +771,9 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
498
771
  environment: Database["public"]["Enums"]["exact_env"];
499
772
  expires_at: string;
500
773
  id?: string;
774
+ last_error?: string | null;
775
+ last_refreshed_at?: string | null;
776
+ last_tested_at?: string | null;
501
777
  refresh_token_encrypted: string;
502
778
  status?: string;
503
779
  updated_at?: string;
@@ -511,6 +787,9 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
511
787
  environment?: Database["public"]["Enums"]["exact_env"];
512
788
  expires_at?: string;
513
789
  id?: string;
790
+ last_error?: string | null;
791
+ last_refreshed_at?: string | null;
792
+ last_tested_at?: string | null;
514
793
  refresh_token_encrypted?: string;
515
794
  status?: string;
516
795
  updated_at?: string;
@@ -533,7 +812,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
533
812
  created_at?: string;
534
813
  environment: Database["public"]["Enums"]["exact_env"];
535
814
  id?: string;
536
- redirect_uri: string;
815
+ redirect_uri?: string;
537
816
  updated_at?: string;
538
817
  };
539
818
  Update: {
@@ -705,220 +984,910 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
705
984
  updated_at: string;
706
985
  };
707
986
  Insert: {
708
- access_token?: string | null;
709
- api_key: string;
710
- client_id: string;
711
- client_secret: string;
987
+ access_token?: string | null;
988
+ api_key: string;
989
+ client_id: string;
990
+ client_secret: string;
991
+ created_at?: string;
992
+ customers_endpoint?: string | null;
993
+ environment: string;
994
+ gln_code?: string | null;
995
+ id?: string;
996
+ is_active?: boolean;
997
+ label?: string;
998
+ organization_name?: string | null;
999
+ preferred_warehouse_id?: string | null;
1000
+ preferred_warehouse_name?: string | null;
1001
+ token_expires_at?: string | null;
1002
+ updated_at?: string;
1003
+ };
1004
+ Update: {
1005
+ access_token?: string | null;
1006
+ api_key?: string;
1007
+ client_id?: string;
1008
+ client_secret?: string;
1009
+ created_at?: string;
1010
+ customers_endpoint?: string | null;
1011
+ environment?: string;
1012
+ gln_code?: string | null;
1013
+ id?: string;
1014
+ is_active?: boolean;
1015
+ label?: string;
1016
+ organization_name?: string | null;
1017
+ preferred_warehouse_id?: string | null;
1018
+ preferred_warehouse_name?: string | null;
1019
+ token_expires_at?: string | null;
1020
+ updated_at?: string;
1021
+ };
1022
+ Relationships: [];
1023
+ };
1024
+ floriday_customers_cache: {
1025
+ Row: {
1026
+ connection_id: string | null;
1027
+ data: import("./types").Json;
1028
+ fetched_at: string;
1029
+ organization_id: string;
1030
+ };
1031
+ Insert: {
1032
+ connection_id?: string | null;
1033
+ data?: import("./types").Json;
1034
+ fetched_at?: string;
1035
+ organization_id: string;
1036
+ };
1037
+ Update: {
1038
+ connection_id?: string | null;
1039
+ data?: import("./types").Json;
1040
+ fetched_at?: string;
1041
+ organization_id?: string;
1042
+ };
1043
+ Relationships: [{
1044
+ foreignKeyName: "floriday_customers_cache_connection_id_fkey";
1045
+ columns: ["connection_id"];
1046
+ isOneToOne: false;
1047
+ referencedRelation: "floriday_connections";
1048
+ referencedColumns: ["id"];
1049
+ }];
1050
+ };
1051
+ floriday_network_cache: {
1052
+ Row: {
1053
+ city: string | null;
1054
+ connection_id: string;
1055
+ country: string | null;
1056
+ data: import("./types").Json;
1057
+ fetched_at: string;
1058
+ gln: string | null;
1059
+ organization_id: string;
1060
+ organization_name: string | null;
1061
+ };
1062
+ Insert: {
1063
+ city?: string | null;
1064
+ connection_id: string;
1065
+ country?: string | null;
1066
+ data?: import("./types").Json;
1067
+ fetched_at?: string;
1068
+ gln?: string | null;
1069
+ organization_id: string;
1070
+ organization_name?: string | null;
1071
+ };
1072
+ Update: {
1073
+ city?: string | null;
1074
+ connection_id?: string;
1075
+ country?: string | null;
1076
+ data?: import("./types").Json;
1077
+ fetched_at?: string;
1078
+ gln?: string | null;
1079
+ organization_id?: string;
1080
+ organization_name?: string | null;
1081
+ };
1082
+ Relationships: [];
1083
+ };
1084
+ floriday_network_sync_state: {
1085
+ Row: {
1086
+ connection_id: string;
1087
+ last_error: string | null;
1088
+ last_sequence_number: number;
1089
+ last_synced_at: string | null;
1090
+ updated_at: string;
1091
+ };
1092
+ Insert: {
1093
+ connection_id: string;
1094
+ last_error?: string | null;
1095
+ last_sequence_number?: number;
1096
+ last_synced_at?: string | null;
1097
+ updated_at?: string;
1098
+ };
1099
+ Update: {
1100
+ connection_id?: string;
1101
+ last_error?: string | null;
1102
+ last_sequence_number?: number;
1103
+ last_synced_at?: string | null;
1104
+ updated_at?: string;
1105
+ };
1106
+ Relationships: [];
1107
+ };
1108
+ floriday_settings: {
1109
+ Row: {
1110
+ active_environment: string;
1111
+ id: number;
1112
+ updated_at: string;
1113
+ };
1114
+ Insert: {
1115
+ active_environment?: string;
1116
+ id?: number;
1117
+ updated_at?: string;
1118
+ };
1119
+ Update: {
1120
+ active_environment?: string;
1121
+ id?: number;
1122
+ updated_at?: string;
1123
+ };
1124
+ Relationships: [];
1125
+ };
1126
+ inventory_settings: {
1127
+ Row: {
1128
+ created_at: string;
1129
+ hierarchy_levels: string[];
1130
+ id: string;
1131
+ updated_at: string;
1132
+ visible_columns: string[];
1133
+ };
1134
+ Insert: {
1135
+ created_at?: string;
1136
+ hierarchy_levels?: string[];
1137
+ id?: string;
1138
+ updated_at?: string;
1139
+ visible_columns?: string[];
1140
+ };
1141
+ Update: {
1142
+ created_at?: string;
1143
+ hierarchy_levels?: string[];
1144
+ id?: string;
1145
+ updated_at?: string;
1146
+ visible_columns?: string[];
1147
+ };
1148
+ Relationships: [];
1149
+ };
1150
+ locations: {
1151
+ Row: {
1152
+ created_at: string;
1153
+ id: string;
1154
+ name: string;
1155
+ sort_order: number;
1156
+ updated_at: string;
1157
+ };
1158
+ Insert: {
1159
+ created_at?: string;
1160
+ id?: string;
1161
+ name: string;
1162
+ sort_order?: number;
1163
+ updated_at?: string;
1164
+ };
1165
+ Update: {
1166
+ created_at?: string;
1167
+ id?: string;
1168
+ name?: string;
1169
+ sort_order?: number;
1170
+ updated_at?: string;
1171
+ };
1172
+ Relationships: [];
1173
+ };
1174
+ mailbox_messages: {
1175
+ Row: {
1176
+ body_html: string | null;
1177
+ body_text: string | null;
1178
+ created_at: string;
1179
+ error_message: string | null;
1180
+ from_email: string | null;
1181
+ from_name: string | null;
1182
+ id: string;
1183
+ message_id: string | null;
1184
+ raw_size: number | null;
1185
+ received_at: string | null;
1186
+ status: string;
1187
+ subject: string | null;
1188
+ uid: number;
1189
+ updated_at: string;
1190
+ };
1191
+ Insert: {
1192
+ body_html?: string | null;
1193
+ body_text?: string | null;
1194
+ created_at?: string;
1195
+ error_message?: string | null;
1196
+ from_email?: string | null;
1197
+ from_name?: string | null;
1198
+ id?: string;
1199
+ message_id?: string | null;
1200
+ raw_size?: number | null;
1201
+ received_at?: string | null;
1202
+ status?: string;
1203
+ subject?: string | null;
1204
+ uid: number;
1205
+ updated_at?: string;
1206
+ };
1207
+ Update: {
1208
+ body_html?: string | null;
1209
+ body_text?: string | null;
1210
+ created_at?: string;
1211
+ error_message?: string | null;
1212
+ from_email?: string | null;
1213
+ from_name?: string | null;
1214
+ id?: string;
1215
+ message_id?: string | null;
1216
+ raw_size?: number | null;
1217
+ received_at?: string | null;
1218
+ status?: string;
1219
+ subject?: string | null;
1220
+ uid?: number;
1221
+ updated_at?: string;
1222
+ };
1223
+ Relationships: [];
1224
+ };
1225
+ mailbox_order_proposals: {
1226
+ Row: {
1227
+ confidence: number | null;
1228
+ created_at: string;
1229
+ created_order_id: string | null;
1230
+ delivery_date: string | null;
1231
+ id: string;
1232
+ matched_customer_id: string | null;
1233
+ message_id: string;
1234
+ notes: string | null;
1235
+ parsed_payload: import("./types").Json | null;
1236
+ reviewed_at: string | null;
1237
+ reviewed_by: string | null;
1238
+ status: string;
1239
+ updated_at: string;
1240
+ };
1241
+ Insert: {
1242
+ confidence?: number | null;
1243
+ created_at?: string;
1244
+ created_order_id?: string | null;
1245
+ delivery_date?: string | null;
1246
+ id?: string;
1247
+ matched_customer_id?: string | null;
1248
+ message_id: string;
1249
+ notes?: string | null;
1250
+ parsed_payload?: import("./types").Json | null;
1251
+ reviewed_at?: string | null;
1252
+ reviewed_by?: string | null;
1253
+ status?: string;
1254
+ updated_at?: string;
1255
+ };
1256
+ Update: {
1257
+ confidence?: number | null;
1258
+ created_at?: string;
1259
+ created_order_id?: string | null;
1260
+ delivery_date?: string | null;
1261
+ id?: string;
1262
+ matched_customer_id?: string | null;
1263
+ message_id?: string;
1264
+ notes?: string | null;
1265
+ parsed_payload?: import("./types").Json | null;
1266
+ reviewed_at?: string | null;
1267
+ reviewed_by?: string | null;
1268
+ status?: string;
1269
+ updated_at?: string;
1270
+ };
1271
+ Relationships: [{
1272
+ foreignKeyName: "mailbox_order_proposals_created_order_id_fkey";
1273
+ columns: ["created_order_id"];
1274
+ isOneToOne: false;
1275
+ referencedRelation: "orders";
1276
+ referencedColumns: ["id"];
1277
+ }, {
1278
+ foreignKeyName: "mailbox_order_proposals_matched_customer_id_fkey";
1279
+ columns: ["matched_customer_id"];
1280
+ isOneToOne: false;
1281
+ referencedRelation: "customers";
1282
+ referencedColumns: ["id"];
1283
+ }, {
1284
+ foreignKeyName: "mailbox_order_proposals_message_id_fkey";
1285
+ columns: ["message_id"];
1286
+ isOneToOne: false;
1287
+ referencedRelation: "mailbox_messages";
1288
+ referencedColumns: ["id"];
1289
+ }];
1290
+ };
1291
+ mailbox_order_template_fields: {
1292
+ Row: {
1293
+ ai_enabled: boolean;
1294
+ ai_hint: string | null;
1295
+ created_at: string;
1296
+ default_value: import("./types").Json | null;
1297
+ field_type: string;
1298
+ id: string;
1299
+ key: string;
1300
+ label: string;
1301
+ options: import("./types").Json | null;
1302
+ required: boolean;
1303
+ sort_order: number;
1304
+ source: string;
1305
+ source_table: string | null;
1306
+ updated_at: string;
1307
+ visible: boolean;
1308
+ };
1309
+ Insert: {
1310
+ ai_enabled?: boolean;
1311
+ ai_hint?: string | null;
1312
+ created_at?: string;
1313
+ default_value?: import("./types").Json | null;
1314
+ field_type: string;
1315
+ id?: string;
1316
+ key: string;
1317
+ label: string;
1318
+ options?: import("./types").Json | null;
1319
+ required?: boolean;
1320
+ sort_order?: number;
1321
+ source?: string;
1322
+ source_table?: string | null;
1323
+ updated_at?: string;
1324
+ visible?: boolean;
1325
+ };
1326
+ Update: {
1327
+ ai_enabled?: boolean;
1328
+ ai_hint?: string | null;
1329
+ created_at?: string;
1330
+ default_value?: import("./types").Json | null;
1331
+ field_type?: string;
1332
+ id?: string;
1333
+ key?: string;
1334
+ label?: string;
1335
+ options?: import("./types").Json | null;
1336
+ required?: boolean;
1337
+ sort_order?: number;
1338
+ source?: string;
1339
+ source_table?: string | null;
1340
+ updated_at?: string;
1341
+ visible?: boolean;
1342
+ };
1343
+ Relationships: [];
1344
+ };
1345
+ mailbox_proposal_field_values: {
1346
+ Row: {
1347
+ ai_confidence: number | null;
1348
+ ai_filled: boolean;
1349
+ created_at: string;
1350
+ field_key: string;
1351
+ id: string;
1352
+ needs_review: boolean;
1353
+ proposal_id: string;
1354
+ updated_at: string;
1355
+ value: import("./types").Json | null;
1356
+ };
1357
+ Insert: {
1358
+ ai_confidence?: number | null;
1359
+ ai_filled?: boolean;
1360
+ created_at?: string;
1361
+ field_key: string;
1362
+ id?: string;
1363
+ needs_review?: boolean;
1364
+ proposal_id: string;
1365
+ updated_at?: string;
1366
+ value?: import("./types").Json | null;
1367
+ };
1368
+ Update: {
1369
+ ai_confidence?: number | null;
1370
+ ai_filled?: boolean;
1371
+ created_at?: string;
1372
+ field_key?: string;
1373
+ id?: string;
1374
+ needs_review?: boolean;
1375
+ proposal_id?: string;
1376
+ updated_at?: string;
1377
+ value?: import("./types").Json | null;
1378
+ };
1379
+ Relationships: [{
1380
+ foreignKeyName: "mailbox_proposal_field_values_proposal_id_fkey";
1381
+ columns: ["proposal_id"];
1382
+ isOneToOne: false;
1383
+ referencedRelation: "mailbox_order_proposals";
1384
+ referencedColumns: ["id"];
1385
+ }];
1386
+ };
1387
+ mailbox_proposal_lines: {
1388
+ Row: {
1389
+ created_at: string;
1390
+ id: string;
1391
+ match_confidence: number | null;
1392
+ product_id: string | null;
1393
+ proposal_id: string;
1394
+ quantity: number | null;
1395
+ raw_product_text: string | null;
1396
+ sort_order: number;
1397
+ unit: string | null;
1398
+ updated_at: string;
1399
+ };
1400
+ Insert: {
1401
+ created_at?: string;
1402
+ id?: string;
1403
+ match_confidence?: number | null;
1404
+ product_id?: string | null;
1405
+ proposal_id: string;
1406
+ quantity?: number | null;
1407
+ raw_product_text?: string | null;
1408
+ sort_order?: number;
1409
+ unit?: string | null;
1410
+ updated_at?: string;
1411
+ };
1412
+ Update: {
1413
+ created_at?: string;
1414
+ id?: string;
1415
+ match_confidence?: number | null;
1416
+ product_id?: string | null;
1417
+ proposal_id?: string;
1418
+ quantity?: number | null;
1419
+ raw_product_text?: string | null;
1420
+ sort_order?: number;
1421
+ unit?: string | null;
1422
+ updated_at?: string;
1423
+ };
1424
+ Relationships: [{
1425
+ foreignKeyName: "mailbox_proposal_lines_product_id_fkey";
1426
+ columns: ["product_id"];
1427
+ isOneToOne: false;
1428
+ referencedRelation: "products";
1429
+ referencedColumns: ["id"];
1430
+ }, {
1431
+ foreignKeyName: "mailbox_proposal_lines_proposal_id_fkey";
1432
+ columns: ["proposal_id"];
1433
+ isOneToOne: false;
1434
+ referencedRelation: "mailbox_order_proposals";
1435
+ referencedColumns: ["id"];
1436
+ }];
1437
+ };
1438
+ mailbox_settings: {
1439
+ Row: {
1440
+ created_at: string;
1441
+ folder: string;
1442
+ id: string;
1443
+ imap_host: string;
1444
+ imap_port: number;
1445
+ imap_use_tls: boolean;
1446
+ imap_username: string;
1447
+ last_error: string | null;
1448
+ last_polled_at: string | null;
1449
+ last_uid_seen: number;
1450
+ polling_enabled: boolean;
1451
+ singleton: boolean;
1452
+ updated_at: string;
1453
+ };
1454
+ Insert: {
1455
+ created_at?: string;
1456
+ folder?: string;
1457
+ id?: string;
1458
+ imap_host?: string;
1459
+ imap_port?: number;
1460
+ imap_use_tls?: boolean;
1461
+ imap_username?: string;
1462
+ last_error?: string | null;
1463
+ last_polled_at?: string | null;
1464
+ last_uid_seen?: number;
1465
+ polling_enabled?: boolean;
1466
+ singleton?: boolean;
1467
+ updated_at?: string;
1468
+ };
1469
+ Update: {
1470
+ created_at?: string;
1471
+ folder?: string;
1472
+ id?: string;
1473
+ imap_host?: string;
1474
+ imap_port?: number;
1475
+ imap_use_tls?: boolean;
1476
+ imap_username?: string;
1477
+ last_error?: string | null;
1478
+ last_polled_at?: string | null;
1479
+ last_uid_seen?: number;
1480
+ polling_enabled?: boolean;
1481
+ singleton?: boolean;
1482
+ updated_at?: string;
1483
+ };
1484
+ Relationships: [];
1485
+ };
1486
+ notifications: {
1487
+ Row: {
1488
+ created_at: string;
1489
+ id: string;
1490
+ message: string | null;
1491
+ read: boolean;
1492
+ title: string;
1493
+ updated_at: string;
1494
+ user_id: string;
1495
+ };
1496
+ Insert: {
712
1497
  created_at?: string;
713
- customers_endpoint?: string | null;
714
- environment: string;
715
- gln_code?: string | null;
716
1498
  id?: string;
717
- is_active?: boolean;
718
- label?: string;
719
- organization_name?: string | null;
720
- preferred_warehouse_id?: string | null;
721
- preferred_warehouse_name?: string | null;
722
- token_expires_at?: string | null;
1499
+ message?: string | null;
1500
+ read?: boolean;
1501
+ title: string;
723
1502
  updated_at?: string;
1503
+ user_id: string;
724
1504
  };
725
1505
  Update: {
726
- access_token?: string | null;
727
- api_key?: string;
728
- client_id?: string;
729
- client_secret?: string;
730
1506
  created_at?: string;
731
- customers_endpoint?: string | null;
732
- environment?: string;
733
- gln_code?: string | null;
734
1507
  id?: string;
735
- is_active?: boolean;
736
- label?: string;
737
- organization_name?: string | null;
738
- preferred_warehouse_id?: string | null;
739
- preferred_warehouse_name?: string | null;
740
- token_expires_at?: string | null;
1508
+ message?: string | null;
1509
+ read?: boolean;
1510
+ title?: string;
741
1511
  updated_at?: string;
1512
+ user_id?: string;
742
1513
  };
743
1514
  Relationships: [];
744
1515
  };
745
- floriday_customers_cache: {
1516
+ offer_campaign_product_tiers: {
746
1517
  Row: {
747
- connection_id: string | null;
748
- data: import("./types").Json;
749
- fetched_at: string;
750
- organization_id: string;
1518
+ campaign_product_id: string;
1519
+ created_at: string;
1520
+ id: string;
1521
+ min_crates: number;
1522
+ price_per_crate: number;
1523
+ sort_order: number;
751
1524
  };
752
1525
  Insert: {
753
- connection_id?: string | null;
754
- data?: import("./types").Json;
755
- fetched_at?: string;
756
- organization_id: string;
1526
+ campaign_product_id: string;
1527
+ created_at?: string;
1528
+ id?: string;
1529
+ min_crates?: number;
1530
+ price_per_crate?: number;
1531
+ sort_order?: number;
757
1532
  };
758
1533
  Update: {
759
- connection_id?: string | null;
760
- data?: import("./types").Json;
761
- fetched_at?: string;
762
- organization_id?: string;
1534
+ campaign_product_id?: string;
1535
+ created_at?: string;
1536
+ id?: string;
1537
+ min_crates?: number;
1538
+ price_per_crate?: number;
1539
+ sort_order?: number;
763
1540
  };
764
1541
  Relationships: [{
765
- foreignKeyName: "floriday_customers_cache_connection_id_fkey";
766
- columns: ["connection_id"];
1542
+ foreignKeyName: "offer_campaign_product_tiers_campaign_product_id_fkey";
1543
+ columns: ["campaign_product_id"];
767
1544
  isOneToOne: false;
768
- referencedRelation: "floriday_connections";
1545
+ referencedRelation: "offer_campaign_products";
769
1546
  referencedColumns: ["id"];
770
1547
  }];
771
1548
  };
772
- floriday_network_cache: {
1549
+ offer_campaign_products: {
773
1550
  Row: {
774
- city: string | null;
775
- connection_id: string;
776
- country: string | null;
777
- data: import("./types").Json;
778
- fetched_at: string;
779
- gln: string | null;
780
- organization_id: string;
781
- organization_name: string | null;
1551
+ available_stock: number;
1552
+ barcode: string | null;
1553
+ belading: string | null;
1554
+ campaign_id: string;
1555
+ crate_price: number | null;
1556
+ created_at: string;
1557
+ description: string | null;
1558
+ discount_price: number;
1559
+ id: string;
1560
+ image_url: string | null;
1561
+ normal_price: number;
1562
+ plants_per_crate: number | null;
1563
+ product_id: string | null;
1564
+ product_name: string;
1565
+ sort_order: number;
1566
+ sticker_available: boolean;
1567
+ sticker_cost: number | null;
782
1568
  };
783
1569
  Insert: {
784
- city?: string | null;
785
- connection_id: string;
786
- country?: string | null;
787
- data?: import("./types").Json;
788
- fetched_at?: string;
789
- gln?: string | null;
790
- organization_id: string;
791
- organization_name?: string | null;
1570
+ available_stock?: number;
1571
+ barcode?: string | null;
1572
+ belading?: string | null;
1573
+ campaign_id: string;
1574
+ crate_price?: number | null;
1575
+ created_at?: string;
1576
+ description?: string | null;
1577
+ discount_price?: number;
1578
+ id?: string;
1579
+ image_url?: string | null;
1580
+ normal_price?: number;
1581
+ plants_per_crate?: number | null;
1582
+ product_id?: string | null;
1583
+ product_name: string;
1584
+ sort_order?: number;
1585
+ sticker_available?: boolean;
1586
+ sticker_cost?: number | null;
792
1587
  };
793
1588
  Update: {
794
- city?: string | null;
795
- connection_id?: string;
796
- country?: string | null;
797
- data?: import("./types").Json;
798
- fetched_at?: string;
799
- gln?: string | null;
800
- organization_id?: string;
801
- organization_name?: string | null;
1589
+ available_stock?: number;
1590
+ barcode?: string | null;
1591
+ belading?: string | null;
1592
+ campaign_id?: string;
1593
+ crate_price?: number | null;
1594
+ created_at?: string;
1595
+ description?: string | null;
1596
+ discount_price?: number;
1597
+ id?: string;
1598
+ image_url?: string | null;
1599
+ normal_price?: number;
1600
+ plants_per_crate?: number | null;
1601
+ product_id?: string | null;
1602
+ product_name?: string;
1603
+ sort_order?: number;
1604
+ sticker_available?: boolean;
1605
+ sticker_cost?: number | null;
802
1606
  };
803
- Relationships: [];
1607
+ Relationships: [{
1608
+ foreignKeyName: "offer_campaign_products_campaign_id_fkey";
1609
+ columns: ["campaign_id"];
1610
+ isOneToOne: false;
1611
+ referencedRelation: "offer_campaigns";
1612
+ referencedColumns: ["id"];
1613
+ }, {
1614
+ foreignKeyName: "offer_campaign_products_product_id_fkey";
1615
+ columns: ["product_id"];
1616
+ isOneToOne: false;
1617
+ referencedRelation: "products";
1618
+ referencedColumns: ["id"];
1619
+ }];
804
1620
  };
805
- floriday_network_sync_state: {
1621
+ offer_campaigns: {
806
1622
  Row: {
807
- connection_id: string;
808
- last_error: string | null;
809
- last_sequence_number: number;
810
- last_synced_at: string | null;
1623
+ created_at: string;
1624
+ created_by: string | null;
1625
+ from_email: string;
1626
+ from_name: string;
1627
+ id: string;
1628
+ intro_message: string | null;
1629
+ name: string;
1630
+ scheduled_at: string | null;
1631
+ sent_at: string | null;
1632
+ status: string;
1633
+ subject: string;
811
1634
  updated_at: string;
812
1635
  };
813
1636
  Insert: {
814
- connection_id: string;
815
- last_error?: string | null;
816
- last_sequence_number?: number;
817
- last_synced_at?: string | null;
1637
+ created_at?: string;
1638
+ created_by?: string | null;
1639
+ from_email: string;
1640
+ from_name: string;
1641
+ id?: string;
1642
+ intro_message?: string | null;
1643
+ name: string;
1644
+ scheduled_at?: string | null;
1645
+ sent_at?: string | null;
1646
+ status?: string;
1647
+ subject: string;
818
1648
  updated_at?: string;
819
1649
  };
820
1650
  Update: {
821
- connection_id?: string;
822
- last_error?: string | null;
823
- last_sequence_number?: number;
824
- last_synced_at?: string | null;
1651
+ created_at?: string;
1652
+ created_by?: string | null;
1653
+ from_email?: string;
1654
+ from_name?: string;
1655
+ id?: string;
1656
+ intro_message?: string | null;
1657
+ name?: string;
1658
+ scheduled_at?: string | null;
1659
+ sent_at?: string | null;
1660
+ status?: string;
1661
+ subject?: string;
825
1662
  updated_at?: string;
826
1663
  };
827
1664
  Relationships: [];
828
1665
  };
829
- floriday_settings: {
1666
+ offer_events: {
830
1667
  Row: {
831
- active_environment: string;
832
- id: number;
833
- updated_at: string;
1668
+ campaign_id: string;
1669
+ created_at: string;
1670
+ event_type: string;
1671
+ id: string;
1672
+ metadata: import("./types").Json;
1673
+ recipient_id: string;
834
1674
  };
835
1675
  Insert: {
836
- active_environment?: string;
837
- id?: number;
838
- updated_at?: string;
1676
+ campaign_id: string;
1677
+ created_at?: string;
1678
+ event_type: string;
1679
+ id?: string;
1680
+ metadata?: import("./types").Json;
1681
+ recipient_id: string;
839
1682
  };
840
1683
  Update: {
841
- active_environment?: string;
842
- id?: number;
843
- updated_at?: string;
1684
+ campaign_id?: string;
1685
+ created_at?: string;
1686
+ event_type?: string;
1687
+ id?: string;
1688
+ metadata?: import("./types").Json;
1689
+ recipient_id?: string;
844
1690
  };
845
- Relationships: [];
1691
+ Relationships: [{
1692
+ foreignKeyName: "offer_events_campaign_id_fkey";
1693
+ columns: ["campaign_id"];
1694
+ isOneToOne: false;
1695
+ referencedRelation: "offer_campaigns";
1696
+ referencedColumns: ["id"];
1697
+ }, {
1698
+ foreignKeyName: "offer_events_recipient_id_fkey";
1699
+ columns: ["recipient_id"];
1700
+ isOneToOne: false;
1701
+ referencedRelation: "offer_recipients";
1702
+ referencedColumns: ["id"];
1703
+ }];
846
1704
  };
847
- inventory_settings: {
1705
+ offer_orders: {
848
1706
  Row: {
1707
+ campaign_id: string;
849
1708
  created_at: string;
850
- hierarchy_levels: string[];
1709
+ customer_email: string;
1710
+ customer_id: string | null;
1711
+ customer_name: string;
1712
+ customer_phone: string | null;
851
1713
  id: string;
852
- updated_at: string;
853
- visible_columns: string[];
1714
+ items: import("./types").Json;
1715
+ notes: string | null;
1716
+ recipient_id: string;
1717
+ total_amount: number;
854
1718
  };
855
1719
  Insert: {
1720
+ campaign_id: string;
856
1721
  created_at?: string;
857
- hierarchy_levels?: string[];
1722
+ customer_email: string;
1723
+ customer_id?: string | null;
1724
+ customer_name: string;
1725
+ customer_phone?: string | null;
858
1726
  id?: string;
859
- updated_at?: string;
860
- visible_columns?: string[];
1727
+ items?: import("./types").Json;
1728
+ notes?: string | null;
1729
+ recipient_id: string;
1730
+ total_amount?: number;
861
1731
  };
862
1732
  Update: {
1733
+ campaign_id?: string;
863
1734
  created_at?: string;
864
- hierarchy_levels?: string[];
1735
+ customer_email?: string;
1736
+ customer_id?: string | null;
1737
+ customer_name?: string;
1738
+ customer_phone?: string | null;
865
1739
  id?: string;
866
- updated_at?: string;
867
- visible_columns?: string[];
1740
+ items?: import("./types").Json;
1741
+ notes?: string | null;
1742
+ recipient_id?: string;
1743
+ total_amount?: number;
868
1744
  };
869
- Relationships: [];
1745
+ Relationships: [{
1746
+ foreignKeyName: "offer_orders_campaign_id_fkey";
1747
+ columns: ["campaign_id"];
1748
+ isOneToOne: false;
1749
+ referencedRelation: "offer_campaigns";
1750
+ referencedColumns: ["id"];
1751
+ }, {
1752
+ foreignKeyName: "offer_orders_customer_id_fkey";
1753
+ columns: ["customer_id"];
1754
+ isOneToOne: false;
1755
+ referencedRelation: "customers";
1756
+ referencedColumns: ["id"];
1757
+ }, {
1758
+ foreignKeyName: "offer_orders_recipient_id_fkey";
1759
+ columns: ["recipient_id"];
1760
+ isOneToOne: false;
1761
+ referencedRelation: "offer_recipients";
1762
+ referencedColumns: ["id"];
1763
+ }];
870
1764
  };
871
- locations: {
1765
+ offer_recipients: {
872
1766
  Row: {
1767
+ campaign_id: string;
1768
+ clicked_at: string | null;
1769
+ contact_id: string | null;
873
1770
  created_at: string;
1771
+ customer_id: string | null;
874
1772
  id: string;
875
- name: string;
876
- sort_order: number;
877
- updated_at: string;
1773
+ link_code: string;
1774
+ opened_at: string | null;
1775
+ ordered_at: string | null;
1776
+ recipient_email: string;
1777
+ recipient_name: string;
1778
+ sent_at: string | null;
878
1779
  };
879
1780
  Insert: {
1781
+ campaign_id: string;
1782
+ clicked_at?: string | null;
1783
+ contact_id?: string | null;
880
1784
  created_at?: string;
1785
+ customer_id?: string | null;
881
1786
  id?: string;
882
- name: string;
883
- sort_order?: number;
884
- updated_at?: string;
1787
+ link_code?: string;
1788
+ opened_at?: string | null;
1789
+ ordered_at?: string | null;
1790
+ recipient_email: string;
1791
+ recipient_name: string;
1792
+ sent_at?: string | null;
885
1793
  };
886
1794
  Update: {
1795
+ campaign_id?: string;
1796
+ clicked_at?: string | null;
1797
+ contact_id?: string | null;
887
1798
  created_at?: string;
1799
+ customer_id?: string | null;
888
1800
  id?: string;
889
- name?: string;
890
- sort_order?: number;
891
- updated_at?: string;
1801
+ link_code?: string;
1802
+ opened_at?: string | null;
1803
+ ordered_at?: string | null;
1804
+ recipient_email?: string;
1805
+ recipient_name?: string;
1806
+ sent_at?: string | null;
892
1807
  };
893
- Relationships: [];
1808
+ Relationships: [{
1809
+ foreignKeyName: "offer_recipients_campaign_id_fkey";
1810
+ columns: ["campaign_id"];
1811
+ isOneToOne: false;
1812
+ referencedRelation: "offer_campaigns";
1813
+ referencedColumns: ["id"];
1814
+ }, {
1815
+ foreignKeyName: "offer_recipients_contact_id_fkey";
1816
+ columns: ["contact_id"];
1817
+ isOneToOne: false;
1818
+ referencedRelation: "customer_contacts";
1819
+ referencedColumns: ["id"];
1820
+ }, {
1821
+ foreignKeyName: "offer_recipients_customer_id_fkey";
1822
+ columns: ["customer_id"];
1823
+ isOneToOne: false;
1824
+ referencedRelation: "customers";
1825
+ referencedColumns: ["id"];
1826
+ }];
894
1827
  };
895
- notifications: {
1828
+ offer_settings: {
896
1829
  Row: {
1830
+ button_color: string;
897
1831
  created_at: string;
1832
+ default_countries: string[];
1833
+ default_customer_classes: string[];
1834
+ default_intro: string;
1835
+ default_sticker_cost: number;
1836
+ default_subject: string;
1837
+ discount_display: string;
1838
+ excluded_contact_ids: string[];
1839
+ excluded_customer_ids: string[];
1840
+ from_email: string;
1841
+ from_name: string;
898
1842
  id: string;
899
- message: string | null;
900
- read: boolean;
901
- title: string;
1843
+ logo_url: string | null;
1844
+ primary_color: string;
1845
+ show_customer_classes: boolean;
1846
+ singleton: boolean;
1847
+ tracking_enabled: boolean;
902
1848
  updated_at: string;
903
- user_id: string;
904
1849
  };
905
1850
  Insert: {
1851
+ button_color?: string;
906
1852
  created_at?: string;
1853
+ default_countries?: string[];
1854
+ default_customer_classes?: string[];
1855
+ default_intro?: string;
1856
+ default_sticker_cost?: number;
1857
+ default_subject?: string;
1858
+ discount_display?: string;
1859
+ excluded_contact_ids?: string[];
1860
+ excluded_customer_ids?: string[];
1861
+ from_email?: string;
1862
+ from_name?: string;
907
1863
  id?: string;
908
- message?: string | null;
909
- read?: boolean;
910
- title: string;
1864
+ logo_url?: string | null;
1865
+ primary_color?: string;
1866
+ show_customer_classes?: boolean;
1867
+ singleton?: boolean;
1868
+ tracking_enabled?: boolean;
911
1869
  updated_at?: string;
912
- user_id: string;
913
1870
  };
914
1871
  Update: {
1872
+ button_color?: string;
915
1873
  created_at?: string;
1874
+ default_countries?: string[];
1875
+ default_customer_classes?: string[];
1876
+ default_intro?: string;
1877
+ default_sticker_cost?: number;
1878
+ default_subject?: string;
1879
+ discount_display?: string;
1880
+ excluded_contact_ids?: string[];
1881
+ excluded_customer_ids?: string[];
1882
+ from_email?: string;
1883
+ from_name?: string;
916
1884
  id?: string;
917
- message?: string | null;
918
- read?: boolean;
919
- title?: string;
1885
+ logo_url?: string | null;
1886
+ primary_color?: string;
1887
+ show_customer_classes?: boolean;
1888
+ singleton?: boolean;
1889
+ tracking_enabled?: boolean;
920
1890
  updated_at?: string;
921
- user_id?: string;
922
1891
  };
923
1892
  Relationships: [];
924
1893
  };
@@ -1513,6 +2482,32 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
1513
2482
  };
1514
2483
  Views: { [_ in never]: never; };
1515
2484
  Functions: {
2485
+ dashboard_list_public_schema: {
2486
+ Args: never;
2487
+ Returns: {
2488
+ column_name: string;
2489
+ data_type: string;
2490
+ table_name: string;
2491
+ }[];
2492
+ };
2493
+ exact_decrypt: {
2494
+ Args: {
2495
+ cipher: string;
2496
+ };
2497
+ Returns: string;
2498
+ };
2499
+ exact_encrypt: {
2500
+ Args: {
2501
+ plain: string;
2502
+ };
2503
+ Returns: string;
2504
+ };
2505
+ get_offer_by_link_code: {
2506
+ Args: {
2507
+ p_code: string;
2508
+ };
2509
+ Returns: import("./types").Json;
2510
+ };
1516
2511
  has_role: {
1517
2512
  Args: {
1518
2513
  _role: Database["public"]["Enums"]["app_role"];