@flowselections/mailbox-orders 1.0.1

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 (69) hide show
  1. package/dist-lib/_core-safelist.d.ts +2 -0
  2. package/dist-lib/_core-safelist.d.ts.map +1 -0
  3. package/dist-lib/_core-safelist.js +15 -0
  4. package/dist-lib/components/MailboxInboxPage.d.ts +2 -0
  5. package/dist-lib/components/MailboxInboxPage.d.ts.map +1 -0
  6. package/dist-lib/components/MailboxInboxPage.js +61 -0
  7. package/dist-lib/components/MailboxProcessedPage.d.ts +2 -0
  8. package/dist-lib/components/MailboxProcessedPage.d.ts.map +1 -0
  9. package/dist-lib/components/MailboxProcessedPage.js +21 -0
  10. package/dist-lib/components/MailboxProposalsPage.d.ts +2 -0
  11. package/dist-lib/components/MailboxProposalsPage.d.ts.map +1 -0
  12. package/dist-lib/components/MailboxProposalsPage.js +198 -0
  13. package/dist-lib/components/SearchableSelect.d.ts +18 -0
  14. package/dist-lib/components/SearchableSelect.d.ts.map +1 -0
  15. package/dist-lib/components/SearchableSelect.js +20 -0
  16. package/dist-lib/components/settings/ImapAccountsCard.d.ts +2 -0
  17. package/dist-lib/components/settings/ImapAccountsCard.d.ts.map +1 -0
  18. package/dist-lib/components/settings/ImapAccountsCard.js +136 -0
  19. package/dist-lib/components/settings/ImapProfilesCard.d.ts +2 -0
  20. package/dist-lib/components/settings/ImapProfilesCard.d.ts.map +1 -0
  21. package/dist-lib/components/settings/ImapProfilesCard.js +101 -0
  22. package/dist-lib/components/settings/MailboxOrderTemplateCard.d.ts +2 -0
  23. package/dist-lib/components/settings/MailboxOrderTemplateCard.d.ts.map +1 -0
  24. package/dist-lib/components/settings/MailboxOrderTemplateCard.js +98 -0
  25. package/dist-lib/components/settings/MailboxSettingsCard.d.ts +2 -0
  26. package/dist-lib/components/settings/MailboxSettingsCard.d.ts.map +1 -0
  27. package/dist-lib/components/settings/MailboxSettingsCard.js +85 -0
  28. package/dist-lib/index.d.ts +12 -0
  29. package/dist-lib/index.d.ts.map +1 -0
  30. package/dist-lib/index.js +34 -0
  31. package/dist-lib/integrations/supabase/auth-attacher.d.ts +2 -0
  32. package/dist-lib/integrations/supabase/auth-attacher.d.ts.map +1 -0
  33. package/dist-lib/integrations/supabase/auth-attacher.js +15 -0
  34. package/dist-lib/integrations/supabase/auth-middleware.d.ts +2978 -0
  35. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -0
  36. package/dist-lib/integrations/supabase/auth-middleware.js +52 -0
  37. package/dist-lib/integrations/supabase/client.d.ts +2974 -0
  38. package/dist-lib/integrations/supabase/client.d.ts.map +1 -0
  39. package/dist-lib/integrations/supabase/client.js +13 -0
  40. package/dist-lib/integrations/supabase/client.server.d.ts +2974 -0
  41. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -0
  42. package/dist-lib/integrations/supabase/client.server.js +30 -0
  43. package/dist-lib/integrations/supabase/types.d.ts +3119 -0
  44. package/dist-lib/integrations/supabase/types.d.ts.map +1 -0
  45. package/dist-lib/integrations/supabase/types.js +8 -0
  46. package/dist-lib/lib/imap.functions.d.ts +32852 -0
  47. package/dist-lib/lib/imap.functions.d.ts.map +1 -0
  48. package/dist-lib/lib/imap.functions.js +235 -0
  49. package/dist-lib/lib/mailbox-ai.server.d.ts +32 -0
  50. package/dist-lib/lib/mailbox-ai.server.d.ts.map +1 -0
  51. package/dist-lib/lib/mailbox-ai.server.js +107 -0
  52. package/dist-lib/lib/mailbox-auto.server.d.ts +9 -0
  53. package/dist-lib/lib/mailbox-auto.server.d.ts.map +1 -0
  54. package/dist-lib/lib/mailbox-auto.server.js +198 -0
  55. package/dist-lib/lib/mailbox-template.functions.d.ts +17913 -0
  56. package/dist-lib/lib/mailbox-template.functions.d.ts.map +1 -0
  57. package/dist-lib/lib/mailbox-template.functions.js +106 -0
  58. package/dist-lib/lib/mailbox.functions.d.ts +32888 -0
  59. package/dist-lib/lib/mailbox.functions.d.ts.map +1 -0
  60. package/dist-lib/lib/mailbox.functions.js +334 -0
  61. package/dist-lib/lib/utils.d.ts +3 -0
  62. package/dist-lib/lib/utils.d.ts.map +1 -0
  63. package/dist-lib/lib/utils.js +5 -0
  64. package/dist-lib/lib/validationSchemas.d.ts +15 -0
  65. package/dist-lib/lib/validationSchemas.d.ts.map +1 -0
  66. package/dist-lib/lib/validationSchemas.js +25 -0
  67. package/dist-lib/styles.css +1 -0
  68. package/package.json +96 -0
  69. package/public/flowselections-assets/template-module/README.md +15 -0
@@ -0,0 +1,3119 @@
1
+ export type Json = string | number | boolean | null | {
2
+ [key: string]: Json | undefined;
3
+ } | Json[];
4
+ export type Database = {
5
+ __InternalSupabase: {
6
+ PostgrestVersion: "14.5";
7
+ };
8
+ public: {
9
+ Tables: {
10
+ agenda_connections: {
11
+ Row: {
12
+ account_email: string | null;
13
+ created_at: string;
14
+ id: string;
15
+ last_synced_at: string | null;
16
+ provider: string;
17
+ selected_calendars: Json;
18
+ status: string;
19
+ sync_mode: string;
20
+ updated_at: string;
21
+ user_id: string;
22
+ };
23
+ Insert: {
24
+ account_email?: string | null;
25
+ created_at?: string;
26
+ id?: string;
27
+ last_synced_at?: string | null;
28
+ provider: string;
29
+ selected_calendars?: Json;
30
+ status?: string;
31
+ sync_mode?: string;
32
+ updated_at?: string;
33
+ user_id: string;
34
+ };
35
+ Update: {
36
+ account_email?: string | null;
37
+ created_at?: string;
38
+ id?: string;
39
+ last_synced_at?: string | null;
40
+ provider?: string;
41
+ selected_calendars?: Json;
42
+ status?: string;
43
+ sync_mode?: string;
44
+ updated_at?: string;
45
+ user_id?: string;
46
+ };
47
+ Relationships: [];
48
+ };
49
+ agenda_events: {
50
+ Row: {
51
+ all_day: boolean;
52
+ calendar_id: string;
53
+ category: string | null;
54
+ color: string;
55
+ created_at: string;
56
+ description: string | null;
57
+ end_at: string;
58
+ external_id: string | null;
59
+ external_provider: string | null;
60
+ id: string;
61
+ linked_data: Json;
62
+ location: string | null;
63
+ notes: string | null;
64
+ recurrence: string | null;
65
+ reminders: Json;
66
+ source_id: string | null;
67
+ source_module: string;
68
+ source_type: string | null;
69
+ start_at: string;
70
+ status: string;
71
+ title: string;
72
+ updated_at: string;
73
+ user_id: string;
74
+ };
75
+ Insert: {
76
+ all_day?: boolean;
77
+ calendar_id?: string;
78
+ category?: string | null;
79
+ color?: string;
80
+ created_at?: string;
81
+ description?: string | null;
82
+ end_at: string;
83
+ external_id?: string | null;
84
+ external_provider?: string | null;
85
+ id?: string;
86
+ linked_data?: Json;
87
+ location?: string | null;
88
+ notes?: string | null;
89
+ recurrence?: string | null;
90
+ reminders?: Json;
91
+ source_id?: string | null;
92
+ source_module?: string;
93
+ source_type?: string | null;
94
+ start_at: string;
95
+ status?: string;
96
+ title: string;
97
+ updated_at?: string;
98
+ user_id: string;
99
+ };
100
+ Update: {
101
+ all_day?: boolean;
102
+ calendar_id?: string;
103
+ category?: string | null;
104
+ color?: string;
105
+ created_at?: string;
106
+ description?: string | null;
107
+ end_at?: string;
108
+ external_id?: string | null;
109
+ external_provider?: string | null;
110
+ id?: string;
111
+ linked_data?: Json;
112
+ location?: string | null;
113
+ notes?: string | null;
114
+ recurrence?: string | null;
115
+ reminders?: Json;
116
+ source_id?: string | null;
117
+ source_module?: string;
118
+ source_type?: string | null;
119
+ start_at?: string;
120
+ status?: string;
121
+ title?: string;
122
+ updated_at?: string;
123
+ user_id?: string;
124
+ };
125
+ Relationships: [];
126
+ };
127
+ agenda_settings: {
128
+ Row: {
129
+ color_map: Json;
130
+ created_at: string;
131
+ default_calendar_id: string;
132
+ default_view: string;
133
+ settings: Json;
134
+ updated_at: string;
135
+ user_id: string;
136
+ };
137
+ Insert: {
138
+ color_map?: Json;
139
+ created_at?: string;
140
+ default_calendar_id?: string;
141
+ default_view?: string;
142
+ settings?: Json;
143
+ updated_at?: string;
144
+ user_id: string;
145
+ };
146
+ Update: {
147
+ color_map?: Json;
148
+ created_at?: string;
149
+ default_calendar_id?: string;
150
+ default_view?: string;
151
+ settings?: Json;
152
+ updated_at?: string;
153
+ user_id?: string;
154
+ };
155
+ Relationships: [];
156
+ };
157
+ bugs: {
158
+ Row: {
159
+ attachment_url: string | null;
160
+ created_at: string;
161
+ description: string;
162
+ id: string;
163
+ priority: string;
164
+ status: string;
165
+ title: string;
166
+ updated_at: string;
167
+ user_id: string;
168
+ };
169
+ Insert: {
170
+ attachment_url?: string | null;
171
+ created_at?: string;
172
+ description: string;
173
+ id?: string;
174
+ priority?: string;
175
+ status?: string;
176
+ title: string;
177
+ updated_at?: string;
178
+ user_id: string;
179
+ };
180
+ Update: {
181
+ attachment_url?: string | null;
182
+ created_at?: string;
183
+ description?: string;
184
+ id?: string;
185
+ priority?: string;
186
+ status?: string;
187
+ title?: string;
188
+ updated_at?: string;
189
+ user_id?: string;
190
+ };
191
+ Relationships: [];
192
+ };
193
+ collections: {
194
+ Row: {
195
+ created_at: string;
196
+ created_by: string | null;
197
+ id: string;
198
+ name: string;
199
+ updated_at: string;
200
+ };
201
+ Insert: {
202
+ created_at?: string;
203
+ created_by?: string | null;
204
+ id?: string;
205
+ name: string;
206
+ updated_at?: string;
207
+ };
208
+ Update: {
209
+ created_at?: string;
210
+ created_by?: string | null;
211
+ id?: string;
212
+ name?: string;
213
+ updated_at?: string;
214
+ };
215
+ Relationships: [];
216
+ };
217
+ customer_audit_log: {
218
+ Row: {
219
+ action: string;
220
+ changes: Json;
221
+ created_at: string;
222
+ customer_id: string;
223
+ id: string;
224
+ user_id: string | null;
225
+ };
226
+ Insert: {
227
+ action: string;
228
+ changes?: Json;
229
+ created_at?: string;
230
+ customer_id: string;
231
+ id?: string;
232
+ user_id?: string | null;
233
+ };
234
+ Update: {
235
+ action?: string;
236
+ changes?: Json;
237
+ created_at?: string;
238
+ customer_id?: string;
239
+ id?: string;
240
+ user_id?: string | null;
241
+ };
242
+ Relationships: [
243
+ {
244
+ foreignKeyName: "customer_audit_log_customer_id_fkey";
245
+ columns: ["customer_id"];
246
+ isOneToOne: false;
247
+ referencedRelation: "customers";
248
+ referencedColumns: ["id"];
249
+ }
250
+ ];
251
+ };
252
+ customer_contacts: {
253
+ Row: {
254
+ created_at: string;
255
+ customer_id: string;
256
+ email: string | null;
257
+ floriday_contact_id: string | null;
258
+ full_name: string;
259
+ id: string;
260
+ is_active: boolean;
261
+ job_title: string | null;
262
+ phone: string | null;
263
+ photo_url: string | null;
264
+ raw: Json | null;
265
+ updated_at: string;
266
+ };
267
+ Insert: {
268
+ created_at?: string;
269
+ customer_id: string;
270
+ email?: string | null;
271
+ floriday_contact_id?: string | null;
272
+ full_name: string;
273
+ id?: string;
274
+ is_active?: boolean;
275
+ job_title?: string | null;
276
+ phone?: string | null;
277
+ photo_url?: string | null;
278
+ raw?: Json | null;
279
+ updated_at?: string;
280
+ };
281
+ Update: {
282
+ created_at?: string;
283
+ customer_id?: string;
284
+ email?: string | null;
285
+ floriday_contact_id?: string | null;
286
+ full_name?: string;
287
+ id?: string;
288
+ is_active?: boolean;
289
+ job_title?: string | null;
290
+ phone?: string | null;
291
+ photo_url?: string | null;
292
+ raw?: Json | null;
293
+ updated_at?: string;
294
+ };
295
+ Relationships: [
296
+ {
297
+ foreignKeyName: "customer_contacts_customer_id_fkey";
298
+ columns: ["customer_id"];
299
+ isOneToOne: false;
300
+ referencedRelation: "customers";
301
+ referencedColumns: ["id"];
302
+ }
303
+ ];
304
+ };
305
+ customer_delivery_locations: {
306
+ Row: {
307
+ address_line: string | null;
308
+ city: string | null;
309
+ country: string | null;
310
+ created_at: string;
311
+ customer_id: string;
312
+ floriday_location_id: string | null;
313
+ gln: string | null;
314
+ id: string;
315
+ is_primary: boolean;
316
+ name: string | null;
317
+ postal_code: string | null;
318
+ raw: Json | null;
319
+ updated_at: string;
320
+ };
321
+ Insert: {
322
+ address_line?: string | null;
323
+ city?: string | null;
324
+ country?: string | null;
325
+ created_at?: string;
326
+ customer_id: string;
327
+ floriday_location_id?: string | null;
328
+ gln?: string | null;
329
+ id?: string;
330
+ is_primary?: boolean;
331
+ name?: string | null;
332
+ postal_code?: string | null;
333
+ raw?: Json | null;
334
+ updated_at?: string;
335
+ };
336
+ Update: {
337
+ address_line?: string | null;
338
+ city?: string | null;
339
+ country?: string | null;
340
+ created_at?: string;
341
+ customer_id?: string;
342
+ floriday_location_id?: string | null;
343
+ gln?: string | null;
344
+ id?: string;
345
+ is_primary?: boolean;
346
+ name?: string | null;
347
+ postal_code?: string | null;
348
+ raw?: Json | null;
349
+ updated_at?: string;
350
+ };
351
+ Relationships: [
352
+ {
353
+ foreignKeyName: "customer_delivery_locations_customer_id_fkey";
354
+ columns: ["customer_id"];
355
+ isOneToOne: false;
356
+ referencedRelation: "customers";
357
+ referencedColumns: ["id"];
358
+ }
359
+ ];
360
+ };
361
+ customer_field_options: {
362
+ Row: {
363
+ created_at: string;
364
+ field_setting_id: string;
365
+ id: string;
366
+ label: string;
367
+ sort_order: number;
368
+ };
369
+ Insert: {
370
+ created_at?: string;
371
+ field_setting_id: string;
372
+ id?: string;
373
+ label: string;
374
+ sort_order?: number;
375
+ };
376
+ Update: {
377
+ created_at?: string;
378
+ field_setting_id?: string;
379
+ id?: string;
380
+ label?: string;
381
+ sort_order?: number;
382
+ };
383
+ Relationships: [
384
+ {
385
+ foreignKeyName: "customer_field_options_field_setting_id_fkey";
386
+ columns: ["field_setting_id"];
387
+ isOneToOne: false;
388
+ referencedRelation: "customer_field_settings";
389
+ referencedColumns: ["id"];
390
+ }
391
+ ];
392
+ };
393
+ customer_field_settings: {
394
+ Row: {
395
+ created_at: string;
396
+ field_key: string;
397
+ field_label: string;
398
+ field_type: string;
399
+ id: string;
400
+ is_custom: boolean;
401
+ sort_order: number;
402
+ updated_at: string;
403
+ };
404
+ Insert: {
405
+ created_at?: string;
406
+ field_key: string;
407
+ field_label: string;
408
+ field_type?: string;
409
+ id?: string;
410
+ is_custom?: boolean;
411
+ sort_order?: number;
412
+ updated_at?: string;
413
+ };
414
+ Update: {
415
+ created_at?: string;
416
+ field_key?: string;
417
+ field_label?: string;
418
+ field_type?: string;
419
+ id?: string;
420
+ is_custom?: boolean;
421
+ sort_order?: number;
422
+ updated_at?: string;
423
+ };
424
+ Relationships: [];
425
+ };
426
+ customer_selected_assortment: {
427
+ Row: {
428
+ article_number: string | null;
429
+ created_at: string;
430
+ customer_id: string;
431
+ floriday_item_id: string | null;
432
+ id: string;
433
+ price: number | null;
434
+ product_group: string | null;
435
+ product_name: string;
436
+ raw: Json | null;
437
+ unit: string | null;
438
+ updated_at: string;
439
+ };
440
+ Insert: {
441
+ article_number?: string | null;
442
+ created_at?: string;
443
+ customer_id: string;
444
+ floriday_item_id?: string | null;
445
+ id?: string;
446
+ price?: number | null;
447
+ product_group?: string | null;
448
+ product_name: string;
449
+ raw?: Json | null;
450
+ unit?: string | null;
451
+ updated_at?: string;
452
+ };
453
+ Update: {
454
+ article_number?: string | null;
455
+ created_at?: string;
456
+ customer_id?: string;
457
+ floriday_item_id?: string | null;
458
+ id?: string;
459
+ price?: number | null;
460
+ product_group?: string | null;
461
+ product_name?: string;
462
+ raw?: Json | null;
463
+ unit?: string | null;
464
+ updated_at?: string;
465
+ };
466
+ Relationships: [
467
+ {
468
+ foreignKeyName: "customer_selected_assortment_customer_id_fkey";
469
+ columns: ["customer_id"];
470
+ isOneToOne: false;
471
+ referencedRelation: "customers";
472
+ referencedColumns: ["id"];
473
+ }
474
+ ];
475
+ };
476
+ customer_trade_settings: {
477
+ Row: {
478
+ category: string;
479
+ created_at: string;
480
+ customer_id: string;
481
+ id: string;
482
+ is_active: boolean;
483
+ raw: Json | null;
484
+ setting_key: string;
485
+ setting_label: string;
486
+ updated_at: string;
487
+ };
488
+ Insert: {
489
+ category?: string;
490
+ created_at?: string;
491
+ customer_id: string;
492
+ id?: string;
493
+ is_active?: boolean;
494
+ raw?: Json | null;
495
+ setting_key: string;
496
+ setting_label: string;
497
+ updated_at?: string;
498
+ };
499
+ Update: {
500
+ category?: string;
501
+ created_at?: string;
502
+ customer_id?: string;
503
+ id?: string;
504
+ is_active?: boolean;
505
+ raw?: Json | null;
506
+ setting_key?: string;
507
+ setting_label?: string;
508
+ updated_at?: string;
509
+ };
510
+ Relationships: [
511
+ {
512
+ foreignKeyName: "customer_trade_settings_customer_id_fkey";
513
+ columns: ["customer_id"];
514
+ isOneToOne: false;
515
+ referencedRelation: "customers";
516
+ referencedColumns: ["id"];
517
+ }
518
+ ];
519
+ };
520
+ customers: {
521
+ Row: {
522
+ address: string | null;
523
+ bio: string | null;
524
+ city: string | null;
525
+ commercial_name: string | null;
526
+ company_name: string;
527
+ connection_status: string;
528
+ contact_person: string | null;
529
+ country: string | null;
530
+ created_at: string;
531
+ custom_fields: Json;
532
+ customer_class: string | null;
533
+ email: string | null;
534
+ external_id: string | null;
535
+ floriday_connection_id: string | null;
536
+ floriday_organization_id: string | null;
537
+ floriday_raw: Json | null;
538
+ gln: string | null;
539
+ house_number: string | null;
540
+ id: string;
541
+ is_active: boolean;
542
+ last_synced_at: string | null;
543
+ logo_url: string | null;
544
+ markets: string[];
545
+ notes: string | null;
546
+ organization_type: string | null;
547
+ payment_methods: string[];
548
+ phone: string | null;
549
+ postal_code: string | null;
550
+ product_groups: string[];
551
+ segments: string[];
552
+ source: string;
553
+ street: string | null;
554
+ sync_error: string | null;
555
+ sync_status: string;
556
+ trade_forms: string[];
557
+ updated_at: string;
558
+ vat_number: string | null;
559
+ website: string | null;
560
+ };
561
+ Insert: {
562
+ address?: string | null;
563
+ bio?: string | null;
564
+ city?: string | null;
565
+ commercial_name?: string | null;
566
+ company_name: string;
567
+ connection_status?: string;
568
+ contact_person?: string | null;
569
+ country?: string | null;
570
+ created_at?: string;
571
+ custom_fields?: Json;
572
+ customer_class?: string | null;
573
+ email?: string | null;
574
+ external_id?: string | null;
575
+ floriday_connection_id?: string | null;
576
+ floriday_organization_id?: string | null;
577
+ floriday_raw?: Json | null;
578
+ gln?: string | null;
579
+ house_number?: string | null;
580
+ id?: string;
581
+ is_active?: boolean;
582
+ last_synced_at?: string | null;
583
+ logo_url?: string | null;
584
+ markets?: string[];
585
+ notes?: string | null;
586
+ organization_type?: string | null;
587
+ payment_methods?: string[];
588
+ phone?: string | null;
589
+ postal_code?: string | null;
590
+ product_groups?: string[];
591
+ segments?: string[];
592
+ source?: string;
593
+ street?: string | null;
594
+ sync_error?: string | null;
595
+ sync_status?: string;
596
+ trade_forms?: string[];
597
+ updated_at?: string;
598
+ vat_number?: string | null;
599
+ website?: string | null;
600
+ };
601
+ Update: {
602
+ address?: string | null;
603
+ bio?: string | null;
604
+ city?: string | null;
605
+ commercial_name?: string | null;
606
+ company_name?: string;
607
+ connection_status?: string;
608
+ contact_person?: string | null;
609
+ country?: string | null;
610
+ created_at?: string;
611
+ custom_fields?: Json;
612
+ customer_class?: string | null;
613
+ email?: string | null;
614
+ external_id?: string | null;
615
+ floriday_connection_id?: string | null;
616
+ floriday_organization_id?: string | null;
617
+ floriday_raw?: Json | null;
618
+ gln?: string | null;
619
+ house_number?: string | null;
620
+ id?: string;
621
+ is_active?: boolean;
622
+ last_synced_at?: string | null;
623
+ logo_url?: string | null;
624
+ markets?: string[];
625
+ notes?: string | null;
626
+ organization_type?: string | null;
627
+ payment_methods?: string[];
628
+ phone?: string | null;
629
+ postal_code?: string | null;
630
+ product_groups?: string[];
631
+ segments?: string[];
632
+ source?: string;
633
+ street?: string | null;
634
+ sync_error?: string | null;
635
+ sync_status?: string;
636
+ trade_forms?: string[];
637
+ updated_at?: string;
638
+ vat_number?: string | null;
639
+ website?: string | null;
640
+ };
641
+ Relationships: [];
642
+ };
643
+ dashboard_ai_conversations: {
644
+ Row: {
645
+ created_at: string;
646
+ id: string;
647
+ messages: Json;
648
+ page_id: string | null;
649
+ title: string | null;
650
+ updated_at: string;
651
+ user_id: string;
652
+ };
653
+ Insert: {
654
+ created_at?: string;
655
+ id?: string;
656
+ messages?: Json;
657
+ page_id?: string | null;
658
+ title?: string | null;
659
+ updated_at?: string;
660
+ user_id: string;
661
+ };
662
+ Update: {
663
+ created_at?: string;
664
+ id?: string;
665
+ messages?: Json;
666
+ page_id?: string | null;
667
+ title?: string | null;
668
+ updated_at?: string;
669
+ user_id?: string;
670
+ };
671
+ Relationships: [
672
+ {
673
+ foreignKeyName: "dashboard_ai_conversations_page_id_fkey";
674
+ columns: ["page_id"];
675
+ isOneToOne: false;
676
+ referencedRelation: "dashboard_pages";
677
+ referencedColumns: ["id"];
678
+ }
679
+ ];
680
+ };
681
+ dashboard_alert_events: {
682
+ Row: {
683
+ acknowledged: boolean;
684
+ block_id: string;
685
+ created_at: string;
686
+ id: string;
687
+ message: string | null;
688
+ page_id: string;
689
+ severity: string;
690
+ threshold: number | null;
691
+ user_id: string;
692
+ value: number | null;
693
+ };
694
+ Insert: {
695
+ acknowledged?: boolean;
696
+ block_id: string;
697
+ created_at?: string;
698
+ id?: string;
699
+ message?: string | null;
700
+ page_id: string;
701
+ severity?: string;
702
+ threshold?: number | null;
703
+ user_id: string;
704
+ value?: number | null;
705
+ };
706
+ Update: {
707
+ acknowledged?: boolean;
708
+ block_id?: string;
709
+ created_at?: string;
710
+ id?: string;
711
+ message?: string | null;
712
+ page_id?: string;
713
+ severity?: string;
714
+ threshold?: number | null;
715
+ user_id?: string;
716
+ value?: number | null;
717
+ };
718
+ Relationships: [
719
+ {
720
+ foreignKeyName: "dashboard_alert_events_block_id_fkey";
721
+ columns: ["block_id"];
722
+ isOneToOne: false;
723
+ referencedRelation: "dashboard_blocks";
724
+ referencedColumns: ["id"];
725
+ },
726
+ {
727
+ foreignKeyName: "dashboard_alert_events_page_id_fkey";
728
+ columns: ["page_id"];
729
+ isOneToOne: false;
730
+ referencedRelation: "dashboard_pages";
731
+ referencedColumns: ["id"];
732
+ }
733
+ ];
734
+ };
735
+ dashboard_block_templates: {
736
+ Row: {
737
+ config: Json;
738
+ created_at: string;
739
+ description: string | null;
740
+ id: string;
741
+ is_public: boolean;
742
+ name: string;
743
+ type: string;
744
+ updated_at: string;
745
+ user_id: string;
746
+ };
747
+ Insert: {
748
+ config?: Json;
749
+ created_at?: string;
750
+ description?: string | null;
751
+ id?: string;
752
+ is_public?: boolean;
753
+ name: string;
754
+ type: string;
755
+ updated_at?: string;
756
+ user_id: string;
757
+ };
758
+ Update: {
759
+ config?: Json;
760
+ created_at?: string;
761
+ description?: string | null;
762
+ id?: string;
763
+ is_public?: boolean;
764
+ name?: string;
765
+ type?: string;
766
+ updated_at?: string;
767
+ user_id?: string;
768
+ };
769
+ Relationships: [];
770
+ };
771
+ dashboard_blocks: {
772
+ Row: {
773
+ config: Json;
774
+ created_at: string;
775
+ filters: Json;
776
+ id: string;
777
+ layout: Json;
778
+ page_id: string;
779
+ permissions: Json;
780
+ sort_order: number;
781
+ title: string;
782
+ type: string;
783
+ updated_at: string;
784
+ };
785
+ Insert: {
786
+ config?: Json;
787
+ created_at?: string;
788
+ filters?: Json;
789
+ id?: string;
790
+ layout?: Json;
791
+ page_id: string;
792
+ permissions?: Json;
793
+ sort_order?: number;
794
+ title: string;
795
+ type: string;
796
+ updated_at?: string;
797
+ };
798
+ Update: {
799
+ config?: Json;
800
+ created_at?: string;
801
+ filters?: Json;
802
+ id?: string;
803
+ layout?: Json;
804
+ page_id?: string;
805
+ permissions?: Json;
806
+ sort_order?: number;
807
+ title?: string;
808
+ type?: string;
809
+ updated_at?: string;
810
+ };
811
+ Relationships: [
812
+ {
813
+ foreignKeyName: "dashboard_blocks_page_id_fkey";
814
+ columns: ["page_id"];
815
+ isOneToOne: false;
816
+ referencedRelation: "dashboard_pages";
817
+ referencedColumns: ["id"];
818
+ }
819
+ ];
820
+ };
821
+ dashboard_daily_reports: {
822
+ Row: {
823
+ created_at: string;
824
+ highlights: Json | null;
825
+ id: string;
826
+ page_id: string;
827
+ summary: string;
828
+ user_id: string;
829
+ };
830
+ Insert: {
831
+ created_at?: string;
832
+ highlights?: Json | null;
833
+ id?: string;
834
+ page_id: string;
835
+ summary: string;
836
+ user_id: string;
837
+ };
838
+ Update: {
839
+ created_at?: string;
840
+ highlights?: Json | null;
841
+ id?: string;
842
+ page_id?: string;
843
+ summary?: string;
844
+ user_id?: string;
845
+ };
846
+ Relationships: [
847
+ {
848
+ foreignKeyName: "dashboard_daily_reports_page_id_fkey";
849
+ columns: ["page_id"];
850
+ isOneToOne: false;
851
+ referencedRelation: "dashboard_pages";
852
+ referencedColumns: ["id"];
853
+ }
854
+ ];
855
+ };
856
+ dashboard_pages: {
857
+ Row: {
858
+ created_at: string;
859
+ icon: string | null;
860
+ id: string;
861
+ is_default: boolean;
862
+ name: string;
863
+ shared_with: string[];
864
+ sort_order: number;
865
+ updated_at: string;
866
+ user_id: string;
867
+ };
868
+ Insert: {
869
+ created_at?: string;
870
+ icon?: string | null;
871
+ id?: string;
872
+ is_default?: boolean;
873
+ name: string;
874
+ shared_with?: string[];
875
+ sort_order?: number;
876
+ updated_at?: string;
877
+ user_id: string;
878
+ };
879
+ Update: {
880
+ created_at?: string;
881
+ icon?: string | null;
882
+ id?: string;
883
+ is_default?: boolean;
884
+ name?: string;
885
+ shared_with?: string[];
886
+ sort_order?: number;
887
+ updated_at?: string;
888
+ user_id?: string;
889
+ };
890
+ Relationships: [];
891
+ };
892
+ dashboard_saved_queries: {
893
+ Row: {
894
+ created_at: string;
895
+ description: string | null;
896
+ id: string;
897
+ name: string;
898
+ query_spec: Json;
899
+ updated_at: string;
900
+ user_id: string;
901
+ };
902
+ Insert: {
903
+ created_at?: string;
904
+ description?: string | null;
905
+ id?: string;
906
+ name: string;
907
+ query_spec: Json;
908
+ updated_at?: string;
909
+ user_id: string;
910
+ };
911
+ Update: {
912
+ created_at?: string;
913
+ description?: string | null;
914
+ id?: string;
915
+ name?: string;
916
+ query_spec?: Json;
917
+ updated_at?: string;
918
+ user_id?: string;
919
+ };
920
+ Relationships: [];
921
+ };
922
+ exact_connections: {
923
+ Row: {
924
+ access_token_encrypted: string;
925
+ company_name: string | null;
926
+ connected_at: string;
927
+ connected_by: string | null;
928
+ division_code: number | null;
929
+ environment: Database["public"]["Enums"]["exact_env"];
930
+ expires_at: string;
931
+ id: string;
932
+ last_error: string | null;
933
+ last_refreshed_at: string | null;
934
+ last_tested_at: string | null;
935
+ refresh_token_encrypted: string;
936
+ status: string;
937
+ updated_at: string;
938
+ };
939
+ Insert: {
940
+ access_token_encrypted: string;
941
+ company_name?: string | null;
942
+ connected_at?: string;
943
+ connected_by?: string | null;
944
+ division_code?: number | null;
945
+ environment: Database["public"]["Enums"]["exact_env"];
946
+ expires_at: string;
947
+ id?: string;
948
+ last_error?: string | null;
949
+ last_refreshed_at?: string | null;
950
+ last_tested_at?: string | null;
951
+ refresh_token_encrypted: string;
952
+ status?: string;
953
+ updated_at?: string;
954
+ };
955
+ Update: {
956
+ access_token_encrypted?: string;
957
+ company_name?: string | null;
958
+ connected_at?: string;
959
+ connected_by?: string | null;
960
+ division_code?: number | null;
961
+ environment?: Database["public"]["Enums"]["exact_env"];
962
+ expires_at?: string;
963
+ id?: string;
964
+ last_error?: string | null;
965
+ last_refreshed_at?: string | null;
966
+ last_tested_at?: string | null;
967
+ refresh_token_encrypted?: string;
968
+ status?: string;
969
+ updated_at?: string;
970
+ };
971
+ Relationships: [];
972
+ };
973
+ exact_credentials: {
974
+ Row: {
975
+ client_id: string;
976
+ client_secret_encrypted: string;
977
+ created_at: string;
978
+ environment: Database["public"]["Enums"]["exact_env"];
979
+ id: string;
980
+ redirect_uri: string;
981
+ updated_at: string;
982
+ };
983
+ Insert: {
984
+ client_id: string;
985
+ client_secret_encrypted: string;
986
+ created_at?: string;
987
+ environment: Database["public"]["Enums"]["exact_env"];
988
+ id?: string;
989
+ redirect_uri?: string;
990
+ updated_at?: string;
991
+ };
992
+ Update: {
993
+ client_id?: string;
994
+ client_secret_encrypted?: string;
995
+ created_at?: string;
996
+ environment?: Database["public"]["Enums"]["exact_env"];
997
+ id?: string;
998
+ redirect_uri?: string;
999
+ updated_at?: string;
1000
+ };
1001
+ Relationships: [];
1002
+ };
1003
+ exact_customers_cache: {
1004
+ Row: {
1005
+ connection_id: string;
1006
+ data: Json;
1007
+ exact_id: string;
1008
+ fetched_at: string;
1009
+ };
1010
+ Insert: {
1011
+ connection_id: string;
1012
+ data?: Json;
1013
+ exact_id: string;
1014
+ fetched_at?: string;
1015
+ };
1016
+ Update: {
1017
+ connection_id?: string;
1018
+ data?: Json;
1019
+ exact_id?: string;
1020
+ fetched_at?: string;
1021
+ };
1022
+ Relationships: [];
1023
+ };
1024
+ exact_sync_state: {
1025
+ Row: {
1026
+ connection_id: string;
1027
+ last_error: string | null;
1028
+ last_modified_cursor: string | null;
1029
+ last_synced_at: string | null;
1030
+ status: string;
1031
+ updated_at: string;
1032
+ };
1033
+ Insert: {
1034
+ connection_id: string;
1035
+ last_error?: string | null;
1036
+ last_modified_cursor?: string | null;
1037
+ last_synced_at?: string | null;
1038
+ status?: string;
1039
+ updated_at?: string;
1040
+ };
1041
+ Update: {
1042
+ connection_id?: string;
1043
+ last_error?: string | null;
1044
+ last_modified_cursor?: string | null;
1045
+ last_synced_at?: string | null;
1046
+ status?: string;
1047
+ updated_at?: string;
1048
+ };
1049
+ Relationships: [];
1050
+ };
1051
+ floricode_connection_settings: {
1052
+ Row: {
1053
+ catalog_key: string | null;
1054
+ catalog_url: string;
1055
+ created_at: string;
1056
+ id: number;
1057
+ last_meta: Json | null;
1058
+ last_test_at: string | null;
1059
+ last_test_error: string | null;
1060
+ last_test_ok: boolean | null;
1061
+ updated_at: string;
1062
+ };
1063
+ Insert: {
1064
+ catalog_key?: string | null;
1065
+ catalog_url?: string;
1066
+ created_at?: string;
1067
+ id?: number;
1068
+ last_meta?: Json | null;
1069
+ last_test_at?: string | null;
1070
+ last_test_error?: string | null;
1071
+ last_test_ok?: boolean | null;
1072
+ updated_at?: string;
1073
+ };
1074
+ Update: {
1075
+ catalog_key?: string | null;
1076
+ catalog_url?: string;
1077
+ created_at?: string;
1078
+ id?: number;
1079
+ last_meta?: Json | null;
1080
+ last_test_at?: string | null;
1081
+ last_test_error?: string | null;
1082
+ last_test_ok?: boolean | null;
1083
+ updated_at?: string;
1084
+ };
1085
+ Relationships: [];
1086
+ };
1087
+ floricode_records: {
1088
+ Row: {
1089
+ change_date_time: string | null;
1090
+ data: Json;
1091
+ last_synced_at: string;
1092
+ record_id: string;
1093
+ resource: string;
1094
+ };
1095
+ Insert: {
1096
+ change_date_time?: string | null;
1097
+ data?: Json;
1098
+ last_synced_at?: string;
1099
+ record_id: string;
1100
+ resource: string;
1101
+ };
1102
+ Update: {
1103
+ change_date_time?: string | null;
1104
+ data?: Json;
1105
+ last_synced_at?: string;
1106
+ record_id?: string;
1107
+ resource?: string;
1108
+ };
1109
+ Relationships: [];
1110
+ };
1111
+ floricode_sync_state: {
1112
+ Row: {
1113
+ error_message: string | null;
1114
+ last_change_date_time: string | null;
1115
+ last_sequence_number: number;
1116
+ last_sync_at: string | null;
1117
+ resource: string;
1118
+ status: string;
1119
+ updated_at: string;
1120
+ };
1121
+ Insert: {
1122
+ error_message?: string | null;
1123
+ last_change_date_time?: string | null;
1124
+ last_sequence_number?: number;
1125
+ last_sync_at?: string | null;
1126
+ resource: string;
1127
+ status?: string;
1128
+ updated_at?: string;
1129
+ };
1130
+ Update: {
1131
+ error_message?: string | null;
1132
+ last_change_date_time?: string | null;
1133
+ last_sequence_number?: number;
1134
+ last_sync_at?: string | null;
1135
+ resource?: string;
1136
+ status?: string;
1137
+ updated_at?: string;
1138
+ };
1139
+ Relationships: [];
1140
+ };
1141
+ floriday_connections: {
1142
+ Row: {
1143
+ access_token: string | null;
1144
+ api_key: string;
1145
+ client_id: string;
1146
+ client_secret: string;
1147
+ created_at: string;
1148
+ customers_endpoint: string | null;
1149
+ environment: string;
1150
+ gln_code: string | null;
1151
+ id: string;
1152
+ is_active: boolean;
1153
+ label: string;
1154
+ organization_name: string | null;
1155
+ preferred_warehouse_id: string | null;
1156
+ preferred_warehouse_name: string | null;
1157
+ token_expires_at: string | null;
1158
+ updated_at: string;
1159
+ };
1160
+ Insert: {
1161
+ access_token?: string | null;
1162
+ api_key: string;
1163
+ client_id: string;
1164
+ client_secret: string;
1165
+ created_at?: string;
1166
+ customers_endpoint?: string | null;
1167
+ environment: string;
1168
+ gln_code?: string | null;
1169
+ id?: string;
1170
+ is_active?: boolean;
1171
+ label?: string;
1172
+ organization_name?: string | null;
1173
+ preferred_warehouse_id?: string | null;
1174
+ preferred_warehouse_name?: string | null;
1175
+ token_expires_at?: string | null;
1176
+ updated_at?: string;
1177
+ };
1178
+ Update: {
1179
+ access_token?: string | null;
1180
+ api_key?: string;
1181
+ client_id?: string;
1182
+ client_secret?: string;
1183
+ created_at?: string;
1184
+ customers_endpoint?: string | null;
1185
+ environment?: string;
1186
+ gln_code?: string | null;
1187
+ id?: string;
1188
+ is_active?: boolean;
1189
+ label?: string;
1190
+ organization_name?: string | null;
1191
+ preferred_warehouse_id?: string | null;
1192
+ preferred_warehouse_name?: string | null;
1193
+ token_expires_at?: string | null;
1194
+ updated_at?: string;
1195
+ };
1196
+ Relationships: [];
1197
+ };
1198
+ floriday_customers_cache: {
1199
+ Row: {
1200
+ connection_id: string | null;
1201
+ data: Json;
1202
+ fetched_at: string;
1203
+ organization_id: string;
1204
+ };
1205
+ Insert: {
1206
+ connection_id?: string | null;
1207
+ data?: Json;
1208
+ fetched_at?: string;
1209
+ organization_id: string;
1210
+ };
1211
+ Update: {
1212
+ connection_id?: string | null;
1213
+ data?: Json;
1214
+ fetched_at?: string;
1215
+ organization_id?: string;
1216
+ };
1217
+ Relationships: [
1218
+ {
1219
+ foreignKeyName: "floriday_customers_cache_connection_id_fkey";
1220
+ columns: ["connection_id"];
1221
+ isOneToOne: false;
1222
+ referencedRelation: "floriday_connections";
1223
+ referencedColumns: ["id"];
1224
+ }
1225
+ ];
1226
+ };
1227
+ floriday_network_cache: {
1228
+ Row: {
1229
+ city: string | null;
1230
+ connection_id: string;
1231
+ country: string | null;
1232
+ data: Json;
1233
+ fetched_at: string;
1234
+ gln: string | null;
1235
+ organization_id: string;
1236
+ organization_name: string | null;
1237
+ };
1238
+ Insert: {
1239
+ city?: string | null;
1240
+ connection_id: string;
1241
+ country?: string | null;
1242
+ data?: Json;
1243
+ fetched_at?: string;
1244
+ gln?: string | null;
1245
+ organization_id: string;
1246
+ organization_name?: string | null;
1247
+ };
1248
+ Update: {
1249
+ city?: string | null;
1250
+ connection_id?: string;
1251
+ country?: string | null;
1252
+ data?: Json;
1253
+ fetched_at?: string;
1254
+ gln?: string | null;
1255
+ organization_id?: string;
1256
+ organization_name?: string | null;
1257
+ };
1258
+ Relationships: [];
1259
+ };
1260
+ floriday_network_sync_state: {
1261
+ Row: {
1262
+ connection_id: string;
1263
+ last_error: string | null;
1264
+ last_sequence_number: number;
1265
+ last_synced_at: string | null;
1266
+ updated_at: string;
1267
+ };
1268
+ Insert: {
1269
+ connection_id: string;
1270
+ last_error?: string | null;
1271
+ last_sequence_number?: number;
1272
+ last_synced_at?: string | null;
1273
+ updated_at?: string;
1274
+ };
1275
+ Update: {
1276
+ connection_id?: string;
1277
+ last_error?: string | null;
1278
+ last_sequence_number?: number;
1279
+ last_synced_at?: string | null;
1280
+ updated_at?: string;
1281
+ };
1282
+ Relationships: [];
1283
+ };
1284
+ floriday_settings: {
1285
+ Row: {
1286
+ active_environment: string;
1287
+ id: number;
1288
+ updated_at: string;
1289
+ };
1290
+ Insert: {
1291
+ active_environment?: string;
1292
+ id?: number;
1293
+ updated_at?: string;
1294
+ };
1295
+ Update: {
1296
+ active_environment?: string;
1297
+ id?: number;
1298
+ updated_at?: string;
1299
+ };
1300
+ Relationships: [];
1301
+ };
1302
+ imap_accounts: {
1303
+ Row: {
1304
+ created_at: string;
1305
+ email: string | null;
1306
+ host: string;
1307
+ id: string;
1308
+ is_active: boolean;
1309
+ last_test_error: string | null;
1310
+ last_test_ok: boolean | null;
1311
+ last_tested_at: string | null;
1312
+ name: string;
1313
+ password: string | null;
1314
+ password_secret_name: string | null;
1315
+ port: number;
1316
+ updated_at: string;
1317
+ use_tls: boolean;
1318
+ username: string;
1319
+ };
1320
+ Insert: {
1321
+ created_at?: string;
1322
+ email?: string | null;
1323
+ host: string;
1324
+ id?: string;
1325
+ is_active?: boolean;
1326
+ last_test_error?: string | null;
1327
+ last_test_ok?: boolean | null;
1328
+ last_tested_at?: string | null;
1329
+ name: string;
1330
+ password?: string | null;
1331
+ password_secret_name?: string | null;
1332
+ port?: number;
1333
+ updated_at?: string;
1334
+ use_tls?: boolean;
1335
+ username: string;
1336
+ };
1337
+ Update: {
1338
+ created_at?: string;
1339
+ email?: string | null;
1340
+ host?: string;
1341
+ id?: string;
1342
+ is_active?: boolean;
1343
+ last_test_error?: string | null;
1344
+ last_test_ok?: boolean | null;
1345
+ last_tested_at?: string | null;
1346
+ name?: string;
1347
+ password?: string | null;
1348
+ password_secret_name?: string | null;
1349
+ port?: number;
1350
+ updated_at?: string;
1351
+ use_tls?: boolean;
1352
+ username?: string;
1353
+ };
1354
+ Relationships: [];
1355
+ };
1356
+ imap_profiles: {
1357
+ Row: {
1358
+ account_id: string | null;
1359
+ created_at: string;
1360
+ folder: string;
1361
+ id: string;
1362
+ last_error: string | null;
1363
+ last_polled_at: string | null;
1364
+ last_uid_seen: number;
1365
+ name: string;
1366
+ polling_enabled: boolean;
1367
+ profile_key: string;
1368
+ updated_at: string;
1369
+ };
1370
+ Insert: {
1371
+ account_id?: string | null;
1372
+ created_at?: string;
1373
+ folder?: string;
1374
+ id?: string;
1375
+ last_error?: string | null;
1376
+ last_polled_at?: string | null;
1377
+ last_uid_seen?: number;
1378
+ name: string;
1379
+ polling_enabled?: boolean;
1380
+ profile_key: string;
1381
+ updated_at?: string;
1382
+ };
1383
+ Update: {
1384
+ account_id?: string | null;
1385
+ created_at?: string;
1386
+ folder?: string;
1387
+ id?: string;
1388
+ last_error?: string | null;
1389
+ last_polled_at?: string | null;
1390
+ last_uid_seen?: number;
1391
+ name?: string;
1392
+ polling_enabled?: boolean;
1393
+ profile_key?: string;
1394
+ updated_at?: string;
1395
+ };
1396
+ Relationships: [
1397
+ {
1398
+ foreignKeyName: "imap_profiles_account_id_fkey";
1399
+ columns: ["account_id"];
1400
+ isOneToOne: false;
1401
+ referencedRelation: "imap_accounts";
1402
+ referencedColumns: ["id"];
1403
+ }
1404
+ ];
1405
+ };
1406
+ imap_sync_log: {
1407
+ Row: {
1408
+ account_id: string | null;
1409
+ details: Json | null;
1410
+ error: string | null;
1411
+ finished_at: string | null;
1412
+ id: string;
1413
+ inserted: number;
1414
+ ok: boolean | null;
1415
+ profile_id: string | null;
1416
+ started_at: string;
1417
+ };
1418
+ Insert: {
1419
+ account_id?: string | null;
1420
+ details?: Json | null;
1421
+ error?: string | null;
1422
+ finished_at?: string | null;
1423
+ id?: string;
1424
+ inserted?: number;
1425
+ ok?: boolean | null;
1426
+ profile_id?: string | null;
1427
+ started_at?: string;
1428
+ };
1429
+ Update: {
1430
+ account_id?: string | null;
1431
+ details?: Json | null;
1432
+ error?: string | null;
1433
+ finished_at?: string | null;
1434
+ id?: string;
1435
+ inserted?: number;
1436
+ ok?: boolean | null;
1437
+ profile_id?: string | null;
1438
+ started_at?: string;
1439
+ };
1440
+ Relationships: [
1441
+ {
1442
+ foreignKeyName: "imap_sync_log_account_id_fkey";
1443
+ columns: ["account_id"];
1444
+ isOneToOne: false;
1445
+ referencedRelation: "imap_accounts";
1446
+ referencedColumns: ["id"];
1447
+ },
1448
+ {
1449
+ foreignKeyName: "imap_sync_log_profile_id_fkey";
1450
+ columns: ["profile_id"];
1451
+ isOneToOne: false;
1452
+ referencedRelation: "imap_profiles";
1453
+ referencedColumns: ["id"];
1454
+ }
1455
+ ];
1456
+ };
1457
+ inventory_settings: {
1458
+ Row: {
1459
+ created_at: string;
1460
+ hierarchy_levels: string[];
1461
+ id: string;
1462
+ updated_at: string;
1463
+ visible_columns: string[];
1464
+ };
1465
+ Insert: {
1466
+ created_at?: string;
1467
+ hierarchy_levels?: string[];
1468
+ id?: string;
1469
+ updated_at?: string;
1470
+ visible_columns?: string[];
1471
+ };
1472
+ Update: {
1473
+ created_at?: string;
1474
+ hierarchy_levels?: string[];
1475
+ id?: string;
1476
+ updated_at?: string;
1477
+ visible_columns?: string[];
1478
+ };
1479
+ Relationships: [];
1480
+ };
1481
+ locations: {
1482
+ Row: {
1483
+ created_at: string;
1484
+ id: string;
1485
+ name: string;
1486
+ sort_order: number;
1487
+ updated_at: string;
1488
+ };
1489
+ Insert: {
1490
+ created_at?: string;
1491
+ id?: string;
1492
+ name: string;
1493
+ sort_order?: number;
1494
+ updated_at?: string;
1495
+ };
1496
+ Update: {
1497
+ created_at?: string;
1498
+ id?: string;
1499
+ name?: string;
1500
+ sort_order?: number;
1501
+ updated_at?: string;
1502
+ };
1503
+ Relationships: [];
1504
+ };
1505
+ mailbox_messages: {
1506
+ Row: {
1507
+ body_html: string | null;
1508
+ body_text: string | null;
1509
+ created_at: string;
1510
+ error_message: string | null;
1511
+ from_email: string | null;
1512
+ from_name: string | null;
1513
+ id: string;
1514
+ message_id: string | null;
1515
+ profile_id: string | null;
1516
+ raw_size: number | null;
1517
+ received_at: string | null;
1518
+ status: string;
1519
+ subject: string | null;
1520
+ uid: number;
1521
+ updated_at: string;
1522
+ };
1523
+ Insert: {
1524
+ body_html?: string | null;
1525
+ body_text?: string | null;
1526
+ created_at?: string;
1527
+ error_message?: string | null;
1528
+ from_email?: string | null;
1529
+ from_name?: string | null;
1530
+ id?: string;
1531
+ message_id?: string | null;
1532
+ profile_id?: string | null;
1533
+ raw_size?: number | null;
1534
+ received_at?: string | null;
1535
+ status?: string;
1536
+ subject?: string | null;
1537
+ uid: number;
1538
+ updated_at?: string;
1539
+ };
1540
+ Update: {
1541
+ body_html?: string | null;
1542
+ body_text?: string | null;
1543
+ created_at?: string;
1544
+ error_message?: string | null;
1545
+ from_email?: string | null;
1546
+ from_name?: string | null;
1547
+ id?: string;
1548
+ message_id?: string | null;
1549
+ profile_id?: string | null;
1550
+ raw_size?: number | null;
1551
+ received_at?: string | null;
1552
+ status?: string;
1553
+ subject?: string | null;
1554
+ uid?: number;
1555
+ updated_at?: string;
1556
+ };
1557
+ Relationships: [
1558
+ {
1559
+ foreignKeyName: "mailbox_messages_profile_id_fkey";
1560
+ columns: ["profile_id"];
1561
+ isOneToOne: false;
1562
+ referencedRelation: "imap_profiles";
1563
+ referencedColumns: ["id"];
1564
+ }
1565
+ ];
1566
+ };
1567
+ mailbox_order_proposals: {
1568
+ Row: {
1569
+ confidence: number | null;
1570
+ created_at: string;
1571
+ created_order_id: string | null;
1572
+ delivery_date: string | null;
1573
+ id: string;
1574
+ matched_customer_id: string | null;
1575
+ message_id: string;
1576
+ notes: string | null;
1577
+ parsed_payload: Json | null;
1578
+ reviewed_at: string | null;
1579
+ reviewed_by: string | null;
1580
+ status: string;
1581
+ updated_at: string;
1582
+ };
1583
+ Insert: {
1584
+ confidence?: number | null;
1585
+ created_at?: string;
1586
+ created_order_id?: string | null;
1587
+ delivery_date?: string | null;
1588
+ id?: string;
1589
+ matched_customer_id?: string | null;
1590
+ message_id: string;
1591
+ notes?: string | null;
1592
+ parsed_payload?: Json | null;
1593
+ reviewed_at?: string | null;
1594
+ reviewed_by?: string | null;
1595
+ status?: string;
1596
+ updated_at?: string;
1597
+ };
1598
+ Update: {
1599
+ confidence?: number | null;
1600
+ created_at?: string;
1601
+ created_order_id?: string | null;
1602
+ delivery_date?: string | null;
1603
+ id?: string;
1604
+ matched_customer_id?: string | null;
1605
+ message_id?: string;
1606
+ notes?: string | null;
1607
+ parsed_payload?: Json | null;
1608
+ reviewed_at?: string | null;
1609
+ reviewed_by?: string | null;
1610
+ status?: string;
1611
+ updated_at?: string;
1612
+ };
1613
+ Relationships: [
1614
+ {
1615
+ foreignKeyName: "mailbox_order_proposals_created_order_id_fkey";
1616
+ columns: ["created_order_id"];
1617
+ isOneToOne: false;
1618
+ referencedRelation: "orders";
1619
+ referencedColumns: ["id"];
1620
+ },
1621
+ {
1622
+ foreignKeyName: "mailbox_order_proposals_matched_customer_id_fkey";
1623
+ columns: ["matched_customer_id"];
1624
+ isOneToOne: false;
1625
+ referencedRelation: "customers";
1626
+ referencedColumns: ["id"];
1627
+ },
1628
+ {
1629
+ foreignKeyName: "mailbox_order_proposals_message_id_fkey";
1630
+ columns: ["message_id"];
1631
+ isOneToOne: false;
1632
+ referencedRelation: "mailbox_messages";
1633
+ referencedColumns: ["id"];
1634
+ }
1635
+ ];
1636
+ };
1637
+ mailbox_order_template_fields: {
1638
+ Row: {
1639
+ ai_enabled: boolean;
1640
+ ai_hint: string | null;
1641
+ created_at: string;
1642
+ default_value: Json | null;
1643
+ field_type: string;
1644
+ id: string;
1645
+ key: string;
1646
+ label: string;
1647
+ options: Json | null;
1648
+ required: boolean;
1649
+ sort_order: number;
1650
+ source: string;
1651
+ source_table: string | null;
1652
+ updated_at: string;
1653
+ visible: boolean;
1654
+ };
1655
+ Insert: {
1656
+ ai_enabled?: boolean;
1657
+ ai_hint?: string | null;
1658
+ created_at?: string;
1659
+ default_value?: Json | null;
1660
+ field_type: string;
1661
+ id?: string;
1662
+ key: string;
1663
+ label: string;
1664
+ options?: Json | null;
1665
+ required?: boolean;
1666
+ sort_order?: number;
1667
+ source?: string;
1668
+ source_table?: string | null;
1669
+ updated_at?: string;
1670
+ visible?: boolean;
1671
+ };
1672
+ Update: {
1673
+ ai_enabled?: boolean;
1674
+ ai_hint?: string | null;
1675
+ created_at?: string;
1676
+ default_value?: Json | null;
1677
+ field_type?: string;
1678
+ id?: string;
1679
+ key?: string;
1680
+ label?: string;
1681
+ options?: Json | null;
1682
+ required?: boolean;
1683
+ sort_order?: number;
1684
+ source?: string;
1685
+ source_table?: string | null;
1686
+ updated_at?: string;
1687
+ visible?: boolean;
1688
+ };
1689
+ Relationships: [];
1690
+ };
1691
+ mailbox_proposal_field_values: {
1692
+ Row: {
1693
+ ai_confidence: number | null;
1694
+ ai_filled: boolean;
1695
+ created_at: string;
1696
+ field_key: string;
1697
+ id: string;
1698
+ needs_review: boolean;
1699
+ proposal_id: string;
1700
+ updated_at: string;
1701
+ value: Json | null;
1702
+ };
1703
+ Insert: {
1704
+ ai_confidence?: number | null;
1705
+ ai_filled?: boolean;
1706
+ created_at?: string;
1707
+ field_key: string;
1708
+ id?: string;
1709
+ needs_review?: boolean;
1710
+ proposal_id: string;
1711
+ updated_at?: string;
1712
+ value?: Json | null;
1713
+ };
1714
+ Update: {
1715
+ ai_confidence?: number | null;
1716
+ ai_filled?: boolean;
1717
+ created_at?: string;
1718
+ field_key?: string;
1719
+ id?: string;
1720
+ needs_review?: boolean;
1721
+ proposal_id?: string;
1722
+ updated_at?: string;
1723
+ value?: Json | null;
1724
+ };
1725
+ Relationships: [
1726
+ {
1727
+ foreignKeyName: "mailbox_proposal_field_values_proposal_id_fkey";
1728
+ columns: ["proposal_id"];
1729
+ isOneToOne: false;
1730
+ referencedRelation: "mailbox_order_proposals";
1731
+ referencedColumns: ["id"];
1732
+ }
1733
+ ];
1734
+ };
1735
+ mailbox_proposal_lines: {
1736
+ Row: {
1737
+ created_at: string;
1738
+ id: string;
1739
+ match_confidence: number | null;
1740
+ product_id: string | null;
1741
+ proposal_id: string;
1742
+ quantity: number | null;
1743
+ raw_product_text: string | null;
1744
+ sort_order: number;
1745
+ unit: string | null;
1746
+ updated_at: string;
1747
+ };
1748
+ Insert: {
1749
+ created_at?: string;
1750
+ id?: string;
1751
+ match_confidence?: number | null;
1752
+ product_id?: string | null;
1753
+ proposal_id: string;
1754
+ quantity?: number | null;
1755
+ raw_product_text?: string | null;
1756
+ sort_order?: number;
1757
+ unit?: string | null;
1758
+ updated_at?: string;
1759
+ };
1760
+ Update: {
1761
+ created_at?: string;
1762
+ id?: string;
1763
+ match_confidence?: number | null;
1764
+ product_id?: string | null;
1765
+ proposal_id?: string;
1766
+ quantity?: number | null;
1767
+ raw_product_text?: string | null;
1768
+ sort_order?: number;
1769
+ unit?: string | null;
1770
+ updated_at?: string;
1771
+ };
1772
+ Relationships: [
1773
+ {
1774
+ foreignKeyName: "mailbox_proposal_lines_product_id_fkey";
1775
+ columns: ["product_id"];
1776
+ isOneToOne: false;
1777
+ referencedRelation: "products";
1778
+ referencedColumns: ["id"];
1779
+ },
1780
+ {
1781
+ foreignKeyName: "mailbox_proposal_lines_proposal_id_fkey";
1782
+ columns: ["proposal_id"];
1783
+ isOneToOne: false;
1784
+ referencedRelation: "mailbox_order_proposals";
1785
+ referencedColumns: ["id"];
1786
+ }
1787
+ ];
1788
+ };
1789
+ mailbox_settings: {
1790
+ Row: {
1791
+ created_at: string;
1792
+ folder: string;
1793
+ id: string;
1794
+ imap_host: string;
1795
+ imap_port: number;
1796
+ imap_use_tls: boolean;
1797
+ imap_username: string;
1798
+ last_error: string | null;
1799
+ last_polled_at: string | null;
1800
+ last_uid_seen: number;
1801
+ polling_enabled: boolean;
1802
+ singleton: boolean;
1803
+ updated_at: string;
1804
+ };
1805
+ Insert: {
1806
+ created_at?: string;
1807
+ folder?: string;
1808
+ id?: string;
1809
+ imap_host?: string;
1810
+ imap_port?: number;
1811
+ imap_use_tls?: boolean;
1812
+ imap_username?: string;
1813
+ last_error?: string | null;
1814
+ last_polled_at?: string | null;
1815
+ last_uid_seen?: number;
1816
+ polling_enabled?: boolean;
1817
+ singleton?: boolean;
1818
+ updated_at?: string;
1819
+ };
1820
+ Update: {
1821
+ created_at?: string;
1822
+ folder?: string;
1823
+ id?: string;
1824
+ imap_host?: string;
1825
+ imap_port?: number;
1826
+ imap_use_tls?: boolean;
1827
+ imap_username?: string;
1828
+ last_error?: string | null;
1829
+ last_polled_at?: string | null;
1830
+ last_uid_seen?: number;
1831
+ polling_enabled?: boolean;
1832
+ singleton?: boolean;
1833
+ updated_at?: string;
1834
+ };
1835
+ Relationships: [];
1836
+ };
1837
+ notifications: {
1838
+ Row: {
1839
+ created_at: string;
1840
+ id: string;
1841
+ message: string | null;
1842
+ read: boolean;
1843
+ title: string;
1844
+ updated_at: string;
1845
+ user_id: string;
1846
+ };
1847
+ Insert: {
1848
+ created_at?: string;
1849
+ id?: string;
1850
+ message?: string | null;
1851
+ read?: boolean;
1852
+ title: string;
1853
+ updated_at?: string;
1854
+ user_id: string;
1855
+ };
1856
+ Update: {
1857
+ created_at?: string;
1858
+ id?: string;
1859
+ message?: string | null;
1860
+ read?: boolean;
1861
+ title?: string;
1862
+ updated_at?: string;
1863
+ user_id?: string;
1864
+ };
1865
+ Relationships: [];
1866
+ };
1867
+ offer_campaign_product_tiers: {
1868
+ Row: {
1869
+ campaign_product_id: string;
1870
+ created_at: string;
1871
+ id: string;
1872
+ min_crates: number;
1873
+ price_per_crate: number;
1874
+ sort_order: number;
1875
+ };
1876
+ Insert: {
1877
+ campaign_product_id: string;
1878
+ created_at?: string;
1879
+ id?: string;
1880
+ min_crates?: number;
1881
+ price_per_crate?: number;
1882
+ sort_order?: number;
1883
+ };
1884
+ Update: {
1885
+ campaign_product_id?: string;
1886
+ created_at?: string;
1887
+ id?: string;
1888
+ min_crates?: number;
1889
+ price_per_crate?: number;
1890
+ sort_order?: number;
1891
+ };
1892
+ Relationships: [
1893
+ {
1894
+ foreignKeyName: "offer_campaign_product_tiers_campaign_product_id_fkey";
1895
+ columns: ["campaign_product_id"];
1896
+ isOneToOne: false;
1897
+ referencedRelation: "offer_campaign_products";
1898
+ referencedColumns: ["id"];
1899
+ }
1900
+ ];
1901
+ };
1902
+ offer_campaign_products: {
1903
+ Row: {
1904
+ available_stock: number;
1905
+ barcode: string | null;
1906
+ belading: string | null;
1907
+ campaign_id: string;
1908
+ crate_price: number | null;
1909
+ created_at: string;
1910
+ description: string | null;
1911
+ discount_price: number;
1912
+ id: string;
1913
+ image_url: string | null;
1914
+ normal_price: number;
1915
+ plants_per_crate: number | null;
1916
+ product_id: string | null;
1917
+ product_name: string;
1918
+ sort_order: number;
1919
+ sticker_available: boolean;
1920
+ sticker_cost: number | null;
1921
+ };
1922
+ Insert: {
1923
+ available_stock?: number;
1924
+ barcode?: string | null;
1925
+ belading?: string | null;
1926
+ campaign_id: string;
1927
+ crate_price?: number | null;
1928
+ created_at?: string;
1929
+ description?: string | null;
1930
+ discount_price?: number;
1931
+ id?: string;
1932
+ image_url?: string | null;
1933
+ normal_price?: number;
1934
+ plants_per_crate?: number | null;
1935
+ product_id?: string | null;
1936
+ product_name: string;
1937
+ sort_order?: number;
1938
+ sticker_available?: boolean;
1939
+ sticker_cost?: number | null;
1940
+ };
1941
+ Update: {
1942
+ available_stock?: number;
1943
+ barcode?: string | null;
1944
+ belading?: string | null;
1945
+ campaign_id?: string;
1946
+ crate_price?: number | null;
1947
+ created_at?: string;
1948
+ description?: string | null;
1949
+ discount_price?: number;
1950
+ id?: string;
1951
+ image_url?: string | null;
1952
+ normal_price?: number;
1953
+ plants_per_crate?: number | null;
1954
+ product_id?: string | null;
1955
+ product_name?: string;
1956
+ sort_order?: number;
1957
+ sticker_available?: boolean;
1958
+ sticker_cost?: number | null;
1959
+ };
1960
+ Relationships: [
1961
+ {
1962
+ foreignKeyName: "offer_campaign_products_campaign_id_fkey";
1963
+ columns: ["campaign_id"];
1964
+ isOneToOne: false;
1965
+ referencedRelation: "offer_campaigns";
1966
+ referencedColumns: ["id"];
1967
+ },
1968
+ {
1969
+ foreignKeyName: "offer_campaign_products_product_id_fkey";
1970
+ columns: ["product_id"];
1971
+ isOneToOne: false;
1972
+ referencedRelation: "products";
1973
+ referencedColumns: ["id"];
1974
+ }
1975
+ ];
1976
+ };
1977
+ offer_campaigns: {
1978
+ Row: {
1979
+ created_at: string;
1980
+ created_by: string | null;
1981
+ from_email: string;
1982
+ from_name: string;
1983
+ id: string;
1984
+ intro_message: string | null;
1985
+ name: string;
1986
+ scheduled_at: string | null;
1987
+ sent_at: string | null;
1988
+ status: string;
1989
+ subject: string;
1990
+ updated_at: string;
1991
+ };
1992
+ Insert: {
1993
+ created_at?: string;
1994
+ created_by?: string | null;
1995
+ from_email: string;
1996
+ from_name: string;
1997
+ id?: string;
1998
+ intro_message?: string | null;
1999
+ name: string;
2000
+ scheduled_at?: string | null;
2001
+ sent_at?: string | null;
2002
+ status?: string;
2003
+ subject: string;
2004
+ updated_at?: string;
2005
+ };
2006
+ Update: {
2007
+ created_at?: string;
2008
+ created_by?: string | null;
2009
+ from_email?: string;
2010
+ from_name?: string;
2011
+ id?: string;
2012
+ intro_message?: string | null;
2013
+ name?: string;
2014
+ scheduled_at?: string | null;
2015
+ sent_at?: string | null;
2016
+ status?: string;
2017
+ subject?: string;
2018
+ updated_at?: string;
2019
+ };
2020
+ Relationships: [];
2021
+ };
2022
+ offer_events: {
2023
+ Row: {
2024
+ campaign_id: string;
2025
+ created_at: string;
2026
+ event_type: string;
2027
+ id: string;
2028
+ metadata: Json;
2029
+ recipient_id: string;
2030
+ };
2031
+ Insert: {
2032
+ campaign_id: string;
2033
+ created_at?: string;
2034
+ event_type: string;
2035
+ id?: string;
2036
+ metadata?: Json;
2037
+ recipient_id: string;
2038
+ };
2039
+ Update: {
2040
+ campaign_id?: string;
2041
+ created_at?: string;
2042
+ event_type?: string;
2043
+ id?: string;
2044
+ metadata?: Json;
2045
+ recipient_id?: string;
2046
+ };
2047
+ Relationships: [
2048
+ {
2049
+ foreignKeyName: "offer_events_campaign_id_fkey";
2050
+ columns: ["campaign_id"];
2051
+ isOneToOne: false;
2052
+ referencedRelation: "offer_campaigns";
2053
+ referencedColumns: ["id"];
2054
+ },
2055
+ {
2056
+ foreignKeyName: "offer_events_recipient_id_fkey";
2057
+ columns: ["recipient_id"];
2058
+ isOneToOne: false;
2059
+ referencedRelation: "offer_recipients";
2060
+ referencedColumns: ["id"];
2061
+ }
2062
+ ];
2063
+ };
2064
+ offer_orders: {
2065
+ Row: {
2066
+ campaign_id: string;
2067
+ created_at: string;
2068
+ customer_email: string;
2069
+ customer_id: string | null;
2070
+ customer_name: string;
2071
+ customer_phone: string | null;
2072
+ id: string;
2073
+ items: Json;
2074
+ notes: string | null;
2075
+ recipient_id: string;
2076
+ total_amount: number;
2077
+ };
2078
+ Insert: {
2079
+ campaign_id: string;
2080
+ created_at?: string;
2081
+ customer_email: string;
2082
+ customer_id?: string | null;
2083
+ customer_name: string;
2084
+ customer_phone?: string | null;
2085
+ id?: string;
2086
+ items?: Json;
2087
+ notes?: string | null;
2088
+ recipient_id: string;
2089
+ total_amount?: number;
2090
+ };
2091
+ Update: {
2092
+ campaign_id?: string;
2093
+ created_at?: string;
2094
+ customer_email?: string;
2095
+ customer_id?: string | null;
2096
+ customer_name?: string;
2097
+ customer_phone?: string | null;
2098
+ id?: string;
2099
+ items?: Json;
2100
+ notes?: string | null;
2101
+ recipient_id?: string;
2102
+ total_amount?: number;
2103
+ };
2104
+ Relationships: [
2105
+ {
2106
+ foreignKeyName: "offer_orders_campaign_id_fkey";
2107
+ columns: ["campaign_id"];
2108
+ isOneToOne: false;
2109
+ referencedRelation: "offer_campaigns";
2110
+ referencedColumns: ["id"];
2111
+ },
2112
+ {
2113
+ foreignKeyName: "offer_orders_customer_id_fkey";
2114
+ columns: ["customer_id"];
2115
+ isOneToOne: false;
2116
+ referencedRelation: "customers";
2117
+ referencedColumns: ["id"];
2118
+ },
2119
+ {
2120
+ foreignKeyName: "offer_orders_recipient_id_fkey";
2121
+ columns: ["recipient_id"];
2122
+ isOneToOne: false;
2123
+ referencedRelation: "offer_recipients";
2124
+ referencedColumns: ["id"];
2125
+ }
2126
+ ];
2127
+ };
2128
+ offer_recipients: {
2129
+ Row: {
2130
+ campaign_id: string;
2131
+ clicked_at: string | null;
2132
+ contact_id: string | null;
2133
+ created_at: string;
2134
+ customer_id: string | null;
2135
+ id: string;
2136
+ link_code: string;
2137
+ opened_at: string | null;
2138
+ ordered_at: string | null;
2139
+ recipient_email: string;
2140
+ recipient_name: string;
2141
+ sent_at: string | null;
2142
+ };
2143
+ Insert: {
2144
+ campaign_id: string;
2145
+ clicked_at?: string | null;
2146
+ contact_id?: string | null;
2147
+ created_at?: string;
2148
+ customer_id?: string | null;
2149
+ id?: string;
2150
+ link_code?: string;
2151
+ opened_at?: string | null;
2152
+ ordered_at?: string | null;
2153
+ recipient_email: string;
2154
+ recipient_name: string;
2155
+ sent_at?: string | null;
2156
+ };
2157
+ Update: {
2158
+ campaign_id?: string;
2159
+ clicked_at?: string | null;
2160
+ contact_id?: string | null;
2161
+ created_at?: string;
2162
+ customer_id?: string | null;
2163
+ id?: string;
2164
+ link_code?: string;
2165
+ opened_at?: string | null;
2166
+ ordered_at?: string | null;
2167
+ recipient_email?: string;
2168
+ recipient_name?: string;
2169
+ sent_at?: string | null;
2170
+ };
2171
+ Relationships: [
2172
+ {
2173
+ foreignKeyName: "offer_recipients_campaign_id_fkey";
2174
+ columns: ["campaign_id"];
2175
+ isOneToOne: false;
2176
+ referencedRelation: "offer_campaigns";
2177
+ referencedColumns: ["id"];
2178
+ },
2179
+ {
2180
+ foreignKeyName: "offer_recipients_contact_id_fkey";
2181
+ columns: ["contact_id"];
2182
+ isOneToOne: false;
2183
+ referencedRelation: "customer_contacts";
2184
+ referencedColumns: ["id"];
2185
+ },
2186
+ {
2187
+ foreignKeyName: "offer_recipients_customer_id_fkey";
2188
+ columns: ["customer_id"];
2189
+ isOneToOne: false;
2190
+ referencedRelation: "customers";
2191
+ referencedColumns: ["id"];
2192
+ }
2193
+ ];
2194
+ };
2195
+ offer_settings: {
2196
+ Row: {
2197
+ button_color: string;
2198
+ created_at: string;
2199
+ default_countries: string[];
2200
+ default_customer_classes: string[];
2201
+ default_intro: string;
2202
+ default_sticker_cost: number;
2203
+ default_subject: string;
2204
+ discount_display: string;
2205
+ excluded_contact_ids: string[];
2206
+ excluded_customer_ids: string[];
2207
+ from_email: string;
2208
+ from_name: string;
2209
+ id: string;
2210
+ logo_url: string | null;
2211
+ primary_color: string;
2212
+ show_customer_classes: boolean;
2213
+ singleton: boolean;
2214
+ tracking_enabled: boolean;
2215
+ updated_at: string;
2216
+ };
2217
+ Insert: {
2218
+ button_color?: string;
2219
+ created_at?: string;
2220
+ default_countries?: string[];
2221
+ default_customer_classes?: string[];
2222
+ default_intro?: string;
2223
+ default_sticker_cost?: number;
2224
+ default_subject?: string;
2225
+ discount_display?: string;
2226
+ excluded_contact_ids?: string[];
2227
+ excluded_customer_ids?: string[];
2228
+ from_email?: string;
2229
+ from_name?: string;
2230
+ id?: string;
2231
+ logo_url?: string | null;
2232
+ primary_color?: string;
2233
+ show_customer_classes?: boolean;
2234
+ singleton?: boolean;
2235
+ tracking_enabled?: boolean;
2236
+ updated_at?: string;
2237
+ };
2238
+ Update: {
2239
+ button_color?: string;
2240
+ created_at?: string;
2241
+ default_countries?: string[];
2242
+ default_customer_classes?: string[];
2243
+ default_intro?: string;
2244
+ default_sticker_cost?: number;
2245
+ default_subject?: string;
2246
+ discount_display?: string;
2247
+ excluded_contact_ids?: string[];
2248
+ excluded_customer_ids?: string[];
2249
+ from_email?: string;
2250
+ from_name?: string;
2251
+ id?: string;
2252
+ logo_url?: string | null;
2253
+ primary_color?: string;
2254
+ show_customer_classes?: boolean;
2255
+ singleton?: boolean;
2256
+ tracking_enabled?: boolean;
2257
+ updated_at?: string;
2258
+ };
2259
+ Relationships: [];
2260
+ };
2261
+ order_field_options: {
2262
+ Row: {
2263
+ created_at: string;
2264
+ field_setting_id: string;
2265
+ id: string;
2266
+ label: string;
2267
+ sort_order: number;
2268
+ };
2269
+ Insert: {
2270
+ created_at?: string;
2271
+ field_setting_id: string;
2272
+ id?: string;
2273
+ label: string;
2274
+ sort_order?: number;
2275
+ };
2276
+ Update: {
2277
+ created_at?: string;
2278
+ field_setting_id?: string;
2279
+ id?: string;
2280
+ label?: string;
2281
+ sort_order?: number;
2282
+ };
2283
+ Relationships: [
2284
+ {
2285
+ foreignKeyName: "order_field_options_field_setting_id_fkey";
2286
+ columns: ["field_setting_id"];
2287
+ isOneToOne: false;
2288
+ referencedRelation: "order_field_settings";
2289
+ referencedColumns: ["id"];
2290
+ }
2291
+ ];
2292
+ };
2293
+ order_field_settings: {
2294
+ Row: {
2295
+ active: boolean;
2296
+ created_at: string;
2297
+ field_key: string;
2298
+ field_label: string;
2299
+ field_type: string;
2300
+ id: string;
2301
+ is_custom: boolean;
2302
+ sort_order: number;
2303
+ updated_at: string;
2304
+ };
2305
+ Insert: {
2306
+ active?: boolean;
2307
+ created_at?: string;
2308
+ field_key: string;
2309
+ field_label: string;
2310
+ field_type?: string;
2311
+ id?: string;
2312
+ is_custom?: boolean;
2313
+ sort_order?: number;
2314
+ updated_at?: string;
2315
+ };
2316
+ Update: {
2317
+ active?: boolean;
2318
+ created_at?: string;
2319
+ field_key?: string;
2320
+ field_label?: string;
2321
+ field_type?: string;
2322
+ id?: string;
2323
+ is_custom?: boolean;
2324
+ sort_order?: number;
2325
+ updated_at?: string;
2326
+ };
2327
+ Relationships: [];
2328
+ };
2329
+ order_items: {
2330
+ Row: {
2331
+ created_at: string;
2332
+ id: string;
2333
+ order_id: string;
2334
+ product_id: string | null;
2335
+ product_name: string;
2336
+ quantity: number;
2337
+ unit: string;
2338
+ unit_price: number | null;
2339
+ };
2340
+ Insert: {
2341
+ created_at?: string;
2342
+ id?: string;
2343
+ order_id: string;
2344
+ product_id?: string | null;
2345
+ product_name: string;
2346
+ quantity?: number;
2347
+ unit?: string;
2348
+ unit_price?: number | null;
2349
+ };
2350
+ Update: {
2351
+ created_at?: string;
2352
+ id?: string;
2353
+ order_id?: string;
2354
+ product_id?: string | null;
2355
+ product_name?: string;
2356
+ quantity?: number;
2357
+ unit?: string;
2358
+ unit_price?: number | null;
2359
+ };
2360
+ Relationships: [
2361
+ {
2362
+ foreignKeyName: "order_items_order_id_fkey";
2363
+ columns: ["order_id"];
2364
+ isOneToOne: false;
2365
+ referencedRelation: "orders";
2366
+ referencedColumns: ["id"];
2367
+ },
2368
+ {
2369
+ foreignKeyName: "order_items_product_id_fkey";
2370
+ columns: ["product_id"];
2371
+ isOneToOne: false;
2372
+ referencedRelation: "products";
2373
+ referencedColumns: ["id"];
2374
+ }
2375
+ ];
2376
+ };
2377
+ orders: {
2378
+ Row: {
2379
+ created_at: string;
2380
+ custom_fields: Json;
2381
+ customer_id: string | null;
2382
+ customer_name: string;
2383
+ deleted_at: string | null;
2384
+ delivery_date: string;
2385
+ id: string;
2386
+ notes: string | null;
2387
+ order_date: string;
2388
+ order_number: string;
2389
+ status: string;
2390
+ total: string;
2391
+ updated_at: string;
2392
+ };
2393
+ Insert: {
2394
+ created_at?: string;
2395
+ custom_fields?: Json;
2396
+ customer_id?: string | null;
2397
+ customer_name?: string;
2398
+ deleted_at?: string | null;
2399
+ delivery_date: string;
2400
+ id?: string;
2401
+ notes?: string | null;
2402
+ order_date?: string;
2403
+ order_number: string;
2404
+ status?: string;
2405
+ total?: string;
2406
+ updated_at?: string;
2407
+ };
2408
+ Update: {
2409
+ created_at?: string;
2410
+ custom_fields?: Json;
2411
+ customer_id?: string | null;
2412
+ customer_name?: string;
2413
+ deleted_at?: string | null;
2414
+ delivery_date?: string;
2415
+ id?: string;
2416
+ notes?: string | null;
2417
+ order_date?: string;
2418
+ order_number?: string;
2419
+ status?: string;
2420
+ total?: string;
2421
+ updated_at?: string;
2422
+ };
2423
+ Relationships: [
2424
+ {
2425
+ foreignKeyName: "orders_customer_id_fkey";
2426
+ columns: ["customer_id"];
2427
+ isOneToOne: false;
2428
+ referencedRelation: "customers";
2429
+ referencedColumns: ["id"];
2430
+ }
2431
+ ];
2432
+ };
2433
+ product_categories: {
2434
+ Row: {
2435
+ color: string;
2436
+ created_at: string;
2437
+ icon: string | null;
2438
+ id: string;
2439
+ name: string;
2440
+ slug: string;
2441
+ sort_order: number;
2442
+ updated_at: string;
2443
+ };
2444
+ Insert: {
2445
+ color?: string;
2446
+ created_at?: string;
2447
+ icon?: string | null;
2448
+ id?: string;
2449
+ name: string;
2450
+ slug: string;
2451
+ sort_order?: number;
2452
+ updated_at?: string;
2453
+ };
2454
+ Update: {
2455
+ color?: string;
2456
+ created_at?: string;
2457
+ icon?: string | null;
2458
+ id?: string;
2459
+ name?: string;
2460
+ slug?: string;
2461
+ sort_order?: number;
2462
+ updated_at?: string;
2463
+ };
2464
+ Relationships: [];
2465
+ };
2466
+ product_field_options: {
2467
+ Row: {
2468
+ created_at: string;
2469
+ field_setting_id: string;
2470
+ id: string;
2471
+ label: string;
2472
+ sort_order: number;
2473
+ };
2474
+ Insert: {
2475
+ created_at?: string;
2476
+ field_setting_id: string;
2477
+ id?: string;
2478
+ label: string;
2479
+ sort_order?: number;
2480
+ };
2481
+ Update: {
2482
+ created_at?: string;
2483
+ field_setting_id?: string;
2484
+ id?: string;
2485
+ label?: string;
2486
+ sort_order?: number;
2487
+ };
2488
+ Relationships: [
2489
+ {
2490
+ foreignKeyName: "product_field_options_field_setting_id_fkey";
2491
+ columns: ["field_setting_id"];
2492
+ isOneToOne: false;
2493
+ referencedRelation: "product_field_settings";
2494
+ referencedColumns: ["id"];
2495
+ }
2496
+ ];
2497
+ };
2498
+ product_field_settings: {
2499
+ Row: {
2500
+ active_per_category: Json;
2501
+ created_at: string;
2502
+ field_key: string;
2503
+ field_label: string;
2504
+ field_type: string;
2505
+ id: string;
2506
+ is_custom: boolean;
2507
+ sort_order: number;
2508
+ updated_at: string;
2509
+ };
2510
+ Insert: {
2511
+ active_per_category?: Json;
2512
+ created_at?: string;
2513
+ field_key: string;
2514
+ field_label: string;
2515
+ field_type?: string;
2516
+ id?: string;
2517
+ is_custom?: boolean;
2518
+ sort_order?: number;
2519
+ updated_at?: string;
2520
+ };
2521
+ Update: {
2522
+ active_per_category?: Json;
2523
+ created_at?: string;
2524
+ field_key?: string;
2525
+ field_label?: string;
2526
+ field_type?: string;
2527
+ id?: string;
2528
+ is_custom?: boolean;
2529
+ sort_order?: number;
2530
+ updated_at?: string;
2531
+ };
2532
+ Relationships: [];
2533
+ };
2534
+ products: {
2535
+ Row: {
2536
+ barcode: string | null;
2537
+ batch: string;
2538
+ created_at: string;
2539
+ custom_fields: Json;
2540
+ id: string;
2541
+ image_url: string | null;
2542
+ incoming_quantity: number;
2543
+ location: string;
2544
+ min_quantity: number;
2545
+ product: string;
2546
+ product_type: string;
2547
+ purchase_price: number | null;
2548
+ quantity: number;
2549
+ sale_price: number | null;
2550
+ unit: string;
2551
+ updated_at: string;
2552
+ weight: string | null;
2553
+ };
2554
+ Insert: {
2555
+ barcode?: string | null;
2556
+ batch: string;
2557
+ created_at?: string;
2558
+ custom_fields?: Json;
2559
+ id?: string;
2560
+ image_url?: string | null;
2561
+ incoming_quantity?: number;
2562
+ location: string;
2563
+ min_quantity?: number;
2564
+ product: string;
2565
+ product_type?: string;
2566
+ purchase_price?: number | null;
2567
+ quantity?: number;
2568
+ sale_price?: number | null;
2569
+ unit?: string;
2570
+ updated_at?: string;
2571
+ weight?: string | null;
2572
+ };
2573
+ Update: {
2574
+ barcode?: string | null;
2575
+ batch?: string;
2576
+ created_at?: string;
2577
+ custom_fields?: Json;
2578
+ id?: string;
2579
+ image_url?: string | null;
2580
+ incoming_quantity?: number;
2581
+ location?: string;
2582
+ min_quantity?: number;
2583
+ product?: string;
2584
+ product_type?: string;
2585
+ purchase_price?: number | null;
2586
+ quantity?: number;
2587
+ sale_price?: number | null;
2588
+ unit?: string;
2589
+ updated_at?: string;
2590
+ weight?: string | null;
2591
+ };
2592
+ Relationships: [];
2593
+ };
2594
+ profiles: {
2595
+ Row: {
2596
+ created_at: string;
2597
+ display_name: string | null;
2598
+ email: string | null;
2599
+ id: string;
2600
+ notification_preferences: Json;
2601
+ updated_at: string;
2602
+ };
2603
+ Insert: {
2604
+ created_at?: string;
2605
+ display_name?: string | null;
2606
+ email?: string | null;
2607
+ id: string;
2608
+ notification_preferences?: Json;
2609
+ updated_at?: string;
2610
+ };
2611
+ Update: {
2612
+ created_at?: string;
2613
+ display_name?: string | null;
2614
+ email?: string | null;
2615
+ id?: string;
2616
+ notification_preferences?: Json;
2617
+ updated_at?: string;
2618
+ };
2619
+ Relationships: [];
2620
+ };
2621
+ prospects: {
2622
+ Row: {
2623
+ company_name: string;
2624
+ contact_name: string | null;
2625
+ created_at: string;
2626
+ email: string | null;
2627
+ id: string;
2628
+ notes: string | null;
2629
+ phone: string | null;
2630
+ source: string | null;
2631
+ status: string;
2632
+ updated_at: string;
2633
+ };
2634
+ Insert: {
2635
+ company_name: string;
2636
+ contact_name?: string | null;
2637
+ created_at?: string;
2638
+ email?: string | null;
2639
+ id?: string;
2640
+ notes?: string | null;
2641
+ phone?: string | null;
2642
+ source?: string | null;
2643
+ status?: string;
2644
+ updated_at?: string;
2645
+ };
2646
+ Update: {
2647
+ company_name?: string;
2648
+ contact_name?: string | null;
2649
+ created_at?: string;
2650
+ email?: string | null;
2651
+ id?: string;
2652
+ notes?: string | null;
2653
+ phone?: string | null;
2654
+ source?: string | null;
2655
+ status?: string;
2656
+ updated_at?: string;
2657
+ };
2658
+ Relationships: [];
2659
+ };
2660
+ purchase_order_items: {
2661
+ Row: {
2662
+ created_at: string;
2663
+ id: string;
2664
+ product_id: string | null;
2665
+ product_type: string;
2666
+ purchase_order_id: string;
2667
+ quantity: number;
2668
+ };
2669
+ Insert: {
2670
+ created_at?: string;
2671
+ id?: string;
2672
+ product_id?: string | null;
2673
+ product_type?: string;
2674
+ purchase_order_id: string;
2675
+ quantity?: number;
2676
+ };
2677
+ Update: {
2678
+ created_at?: string;
2679
+ id?: string;
2680
+ product_id?: string | null;
2681
+ product_type?: string;
2682
+ purchase_order_id?: string;
2683
+ quantity?: number;
2684
+ };
2685
+ Relationships: [
2686
+ {
2687
+ foreignKeyName: "purchase_order_items_product_id_fkey";
2688
+ columns: ["product_id"];
2689
+ isOneToOne: false;
2690
+ referencedRelation: "products";
2691
+ referencedColumns: ["id"];
2692
+ },
2693
+ {
2694
+ foreignKeyName: "purchase_order_items_purchase_order_id_fkey";
2695
+ columns: ["purchase_order_id"];
2696
+ isOneToOne: false;
2697
+ referencedRelation: "purchase_orders";
2698
+ referencedColumns: ["id"];
2699
+ }
2700
+ ];
2701
+ };
2702
+ purchase_orders: {
2703
+ Row: {
2704
+ created_at: string;
2705
+ expected_delivery_date: string;
2706
+ id: string;
2707
+ location_id: string | null;
2708
+ notes: string | null;
2709
+ order_number: string;
2710
+ status: string;
2711
+ supplier_id: string | null;
2712
+ supplier_name: string;
2713
+ updated_at: string;
2714
+ };
2715
+ Insert: {
2716
+ created_at?: string;
2717
+ expected_delivery_date: string;
2718
+ id?: string;
2719
+ location_id?: string | null;
2720
+ notes?: string | null;
2721
+ order_number: string;
2722
+ status?: string;
2723
+ supplier_id?: string | null;
2724
+ supplier_name?: string;
2725
+ updated_at?: string;
2726
+ };
2727
+ Update: {
2728
+ created_at?: string;
2729
+ expected_delivery_date?: string;
2730
+ id?: string;
2731
+ location_id?: string | null;
2732
+ notes?: string | null;
2733
+ order_number?: string;
2734
+ status?: string;
2735
+ supplier_id?: string | null;
2736
+ supplier_name?: string;
2737
+ updated_at?: string;
2738
+ };
2739
+ Relationships: [
2740
+ {
2741
+ foreignKeyName: "purchase_orders_location_id_fkey";
2742
+ columns: ["location_id"];
2743
+ isOneToOne: false;
2744
+ referencedRelation: "locations";
2745
+ referencedColumns: ["id"];
2746
+ },
2747
+ {
2748
+ foreignKeyName: "purchase_orders_supplier_id_fkey";
2749
+ columns: ["supplier_id"];
2750
+ isOneToOne: false;
2751
+ referencedRelation: "suppliers";
2752
+ referencedColumns: ["id"];
2753
+ }
2754
+ ];
2755
+ };
2756
+ quote_items: {
2757
+ Row: {
2758
+ created_at: string;
2759
+ description: string;
2760
+ id: string;
2761
+ quantity: number;
2762
+ quote_id: string;
2763
+ sort_order: number;
2764
+ unit_price: number;
2765
+ };
2766
+ Insert: {
2767
+ created_at?: string;
2768
+ description?: string;
2769
+ id?: string;
2770
+ quantity?: number;
2771
+ quote_id: string;
2772
+ sort_order?: number;
2773
+ unit_price?: number;
2774
+ };
2775
+ Update: {
2776
+ created_at?: string;
2777
+ description?: string;
2778
+ id?: string;
2779
+ quantity?: number;
2780
+ quote_id?: string;
2781
+ sort_order?: number;
2782
+ unit_price?: number;
2783
+ };
2784
+ Relationships: [
2785
+ {
2786
+ foreignKeyName: "quote_items_quote_id_fkey";
2787
+ columns: ["quote_id"];
2788
+ isOneToOne: false;
2789
+ referencedRelation: "quotes";
2790
+ referencedColumns: ["id"];
2791
+ }
2792
+ ];
2793
+ };
2794
+ quotes: {
2795
+ Row: {
2796
+ created_at: string;
2797
+ id: string;
2798
+ notes: string | null;
2799
+ prospect_id: string | null;
2800
+ quote_number: string | null;
2801
+ status: string;
2802
+ title: string;
2803
+ updated_at: string;
2804
+ valid_until: string | null;
2805
+ };
2806
+ Insert: {
2807
+ created_at?: string;
2808
+ id?: string;
2809
+ notes?: string | null;
2810
+ prospect_id?: string | null;
2811
+ quote_number?: string | null;
2812
+ status?: string;
2813
+ title?: string;
2814
+ updated_at?: string;
2815
+ valid_until?: string | null;
2816
+ };
2817
+ Update: {
2818
+ created_at?: string;
2819
+ id?: string;
2820
+ notes?: string | null;
2821
+ prospect_id?: string | null;
2822
+ quote_number?: string | null;
2823
+ status?: string;
2824
+ title?: string;
2825
+ updated_at?: string;
2826
+ valid_until?: string | null;
2827
+ };
2828
+ Relationships: [
2829
+ {
2830
+ foreignKeyName: "quotes_prospect_id_fkey";
2831
+ columns: ["prospect_id"];
2832
+ isOneToOne: false;
2833
+ referencedRelation: "prospects";
2834
+ referencedColumns: ["id"];
2835
+ }
2836
+ ];
2837
+ };
2838
+ supplier_products: {
2839
+ Row: {
2840
+ article_number: string | null;
2841
+ created_at: string;
2842
+ id: string;
2843
+ name: string;
2844
+ notes: string | null;
2845
+ pot_size: string | null;
2846
+ price: number | null;
2847
+ quantity: number | null;
2848
+ supplier_id: string;
2849
+ unit: string;
2850
+ updated_at: string;
2851
+ };
2852
+ Insert: {
2853
+ article_number?: string | null;
2854
+ created_at?: string;
2855
+ id?: string;
2856
+ name: string;
2857
+ notes?: string | null;
2858
+ pot_size?: string | null;
2859
+ price?: number | null;
2860
+ quantity?: number | null;
2861
+ supplier_id: string;
2862
+ unit?: string;
2863
+ updated_at?: string;
2864
+ };
2865
+ Update: {
2866
+ article_number?: string | null;
2867
+ created_at?: string;
2868
+ id?: string;
2869
+ name?: string;
2870
+ notes?: string | null;
2871
+ pot_size?: string | null;
2872
+ price?: number | null;
2873
+ quantity?: number | null;
2874
+ supplier_id?: string;
2875
+ unit?: string;
2876
+ updated_at?: string;
2877
+ };
2878
+ Relationships: [
2879
+ {
2880
+ foreignKeyName: "supplier_products_supplier_id_fkey";
2881
+ columns: ["supplier_id"];
2882
+ isOneToOne: false;
2883
+ referencedRelation: "suppliers";
2884
+ referencedColumns: ["id"];
2885
+ }
2886
+ ];
2887
+ };
2888
+ suppliers: {
2889
+ Row: {
2890
+ address: string | null;
2891
+ column_mappings: Json | null;
2892
+ contact_person: string | null;
2893
+ created_at: string;
2894
+ default_product_type: string;
2895
+ email: string | null;
2896
+ id: string;
2897
+ imported_file_name: string | null;
2898
+ name: string;
2899
+ notes: string | null;
2900
+ phone: string | null;
2901
+ updated_at: string;
2902
+ };
2903
+ Insert: {
2904
+ address?: string | null;
2905
+ column_mappings?: Json | null;
2906
+ contact_person?: string | null;
2907
+ created_at?: string;
2908
+ default_product_type?: string;
2909
+ email?: string | null;
2910
+ id?: string;
2911
+ imported_file_name?: string | null;
2912
+ name: string;
2913
+ notes?: string | null;
2914
+ phone?: string | null;
2915
+ updated_at?: string;
2916
+ };
2917
+ Update: {
2918
+ address?: string | null;
2919
+ column_mappings?: Json | null;
2920
+ contact_person?: string | null;
2921
+ created_at?: string;
2922
+ default_product_type?: string;
2923
+ email?: string | null;
2924
+ id?: string;
2925
+ imported_file_name?: string | null;
2926
+ name?: string;
2927
+ notes?: string | null;
2928
+ phone?: string | null;
2929
+ updated_at?: string;
2930
+ };
2931
+ Relationships: [];
2932
+ };
2933
+ trade_item_drafts: {
2934
+ Row: {
2935
+ connection_id: string | null;
2936
+ created_at: string;
2937
+ data: Json;
2938
+ id: string;
2939
+ updated_at: string;
2940
+ user_id: string;
2941
+ };
2942
+ Insert: {
2943
+ connection_id?: string | null;
2944
+ created_at?: string;
2945
+ data?: Json;
2946
+ id?: string;
2947
+ updated_at?: string;
2948
+ user_id: string;
2949
+ };
2950
+ Update: {
2951
+ connection_id?: string | null;
2952
+ created_at?: string;
2953
+ data?: Json;
2954
+ id?: string;
2955
+ updated_at?: string;
2956
+ user_id?: string;
2957
+ };
2958
+ Relationships: [];
2959
+ };
2960
+ user_roles: {
2961
+ Row: {
2962
+ created_at: string;
2963
+ id: string;
2964
+ role: Database["public"]["Enums"]["app_role"];
2965
+ user_id: string;
2966
+ };
2967
+ Insert: {
2968
+ created_at?: string;
2969
+ id?: string;
2970
+ role: Database["public"]["Enums"]["app_role"];
2971
+ user_id: string;
2972
+ };
2973
+ Update: {
2974
+ created_at?: string;
2975
+ id?: string;
2976
+ role?: Database["public"]["Enums"]["app_role"];
2977
+ user_id?: string;
2978
+ };
2979
+ Relationships: [
2980
+ {
2981
+ foreignKeyName: "user_roles_user_id_fkey";
2982
+ columns: ["user_id"];
2983
+ isOneToOne: false;
2984
+ referencedRelation: "profiles";
2985
+ referencedColumns: ["id"];
2986
+ }
2987
+ ];
2988
+ };
2989
+ };
2990
+ Views: {
2991
+ [_ in never]: never;
2992
+ };
2993
+ Functions: {
2994
+ dashboard_list_public_schema: {
2995
+ Args: never;
2996
+ Returns: {
2997
+ column_name: string;
2998
+ data_type: string;
2999
+ table_name: string;
3000
+ }[];
3001
+ };
3002
+ exact_decrypt: {
3003
+ Args: {
3004
+ cipher: string;
3005
+ };
3006
+ Returns: string;
3007
+ };
3008
+ exact_encrypt: {
3009
+ Args: {
3010
+ plain: string;
3011
+ };
3012
+ Returns: string;
3013
+ };
3014
+ get_offer_by_link_code: {
3015
+ Args: {
3016
+ p_code: string;
3017
+ };
3018
+ Returns: Json;
3019
+ };
3020
+ has_role: {
3021
+ Args: {
3022
+ _role: Database["public"]["Enums"]["app_role"];
3023
+ _user_id: string;
3024
+ };
3025
+ Returns: boolean;
3026
+ };
3027
+ schedule_floriday_network_sync: {
3028
+ Args: {
3029
+ p_apikey: string;
3030
+ p_url: string;
3031
+ };
3032
+ Returns: number;
3033
+ };
3034
+ schedule_floriday_token_refresh: {
3035
+ Args: {
3036
+ p_apikey: string;
3037
+ p_url: string;
3038
+ };
3039
+ Returns: number;
3040
+ };
3041
+ show_limit: {
3042
+ Args: never;
3043
+ Returns: number;
3044
+ };
3045
+ show_trgm: {
3046
+ Args: {
3047
+ "": string;
3048
+ };
3049
+ Returns: string[];
3050
+ };
3051
+ };
3052
+ Enums: {
3053
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
3054
+ exact_env: "staging" | "live";
3055
+ };
3056
+ CompositeTypes: {
3057
+ [_ in never]: never;
3058
+ };
3059
+ };
3060
+ };
3061
+ type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
3062
+ type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">];
3063
+ export type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
3064
+ schema: keyof DatabaseWithoutInternals;
3065
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
3066
+ schema: keyof DatabaseWithoutInternals;
3067
+ } ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
3068
+ schema: keyof DatabaseWithoutInternals;
3069
+ } ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
3070
+ Row: infer R;
3071
+ } ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
3072
+ Row: infer R;
3073
+ } ? R : never : never;
3074
+ export type TablesInsert<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
3075
+ schema: keyof DatabaseWithoutInternals;
3076
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
3077
+ schema: keyof DatabaseWithoutInternals;
3078
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
3079
+ schema: keyof DatabaseWithoutInternals;
3080
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3081
+ Insert: infer I;
3082
+ } ? I : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
3083
+ Insert: infer I;
3084
+ } ? I : never : never;
3085
+ export type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
3086
+ schema: keyof DatabaseWithoutInternals;
3087
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
3088
+ schema: keyof DatabaseWithoutInternals;
3089
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
3090
+ schema: keyof DatabaseWithoutInternals;
3091
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3092
+ Update: infer U;
3093
+ } ? U : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
3094
+ Update: infer U;
3095
+ } ? U : never : never;
3096
+ export type Enums<DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] | {
3097
+ schema: keyof DatabaseWithoutInternals;
3098
+ }, EnumName extends DefaultSchemaEnumNameOrOptions extends {
3099
+ schema: keyof DatabaseWithoutInternals;
3100
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
3101
+ schema: keyof DatabaseWithoutInternals;
3102
+ } ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
3103
+ export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] | {
3104
+ schema: keyof DatabaseWithoutInternals;
3105
+ }, CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
3106
+ schema: keyof DatabaseWithoutInternals;
3107
+ } ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
3108
+ schema: keyof DatabaseWithoutInternals;
3109
+ } ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
3110
+ export declare const Constants: {
3111
+ readonly public: {
3112
+ readonly Enums: {
3113
+ readonly app_role: readonly ["admin", "manager", "warehouse", "sales", "developer"];
3114
+ readonly exact_env: readonly ["staging", "live"];
3115
+ };
3116
+ };
3117
+ };
3118
+ export {};
3119
+ //# sourceMappingURL=types.d.ts.map