@flowselections/floriday-voorraad 1.0.10 → 1.0.12

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