@flowselections/floriday-klanten-module 1.0.0

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 (71) 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/CustomerAvatar.d.ts +7 -0
  5. package/dist-lib/components/CustomerAvatar.d.ts.map +1 -0
  6. package/dist-lib/components/CustomerAvatar.js +18 -0
  7. package/dist-lib/components/TemplatePage.d.ts +2 -0
  8. package/dist-lib/components/TemplatePage.d.ts.map +1 -0
  9. package/dist-lib/components/TemplatePage.js +4 -0
  10. package/dist-lib/components/settings/CustomerFieldsCard.d.ts +2 -0
  11. package/dist-lib/components/settings/CustomerFieldsCard.d.ts.map +1 -0
  12. package/dist-lib/components/settings/CustomerFieldsCard.js +59 -0
  13. package/dist-lib/index.d.ts +5 -0
  14. package/dist-lib/index.d.ts.map +1 -0
  15. package/dist-lib/index.js +32 -0
  16. package/dist-lib/integrations/supabase/auth-attacher.d.ts +2 -0
  17. package/dist-lib/integrations/supabase/auth-attacher.d.ts.map +1 -0
  18. package/dist-lib/integrations/supabase/auth-attacher.js +12 -0
  19. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1560 -0
  20. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -0
  21. package/dist-lib/integrations/supabase/auth-middleware.js +52 -0
  22. package/dist-lib/integrations/supabase/client.d.ts +1556 -0
  23. package/dist-lib/integrations/supabase/client.d.ts.map +1 -0
  24. package/dist-lib/integrations/supabase/client.js +28 -0
  25. package/dist-lib/integrations/supabase/client.server.d.ts +1556 -0
  26. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -0
  27. package/dist-lib/integrations/supabase/client.server.js +50 -0
  28. package/dist-lib/integrations/supabase/types.d.ts +1656 -0
  29. package/dist-lib/integrations/supabase/types.d.ts.map +1 -0
  30. package/dist-lib/integrations/supabase/types.js +8 -0
  31. package/dist-lib/lib/accounting/exact/client.server.d.ts +37 -0
  32. package/dist-lib/lib/accounting/exact/client.server.d.ts.map +1 -0
  33. package/dist-lib/lib/accounting/exact/client.server.js +160 -0
  34. package/dist-lib/lib/accounting/exact/mapping.d.ts +39 -0
  35. package/dist-lib/lib/accounting/exact/mapping.d.ts.map +1 -0
  36. package/dist-lib/lib/accounting/exact/mapping.js +45 -0
  37. package/dist-lib/lib/accounting/exact/sync.server.d.ts +4 -0
  38. package/dist-lib/lib/accounting/exact/sync.server.d.ts.map +1 -0
  39. package/dist-lib/lib/accounting/exact/sync.server.js +181 -0
  40. package/dist-lib/lib/accounting/floriday/sync.server.d.ts +3 -0
  41. package/dist-lib/lib/accounting/floriday/sync.server.d.ts.map +1 -0
  42. package/dist-lib/lib/accounting/floriday/sync.server.js +17 -0
  43. package/dist-lib/lib/accounting/registry.server.d.ts +4 -0
  44. package/dist-lib/lib/accounting/registry.server.d.ts.map +1 -0
  45. package/dist-lib/lib/accounting/registry.server.js +9 -0
  46. package/dist-lib/lib/accounting/types.d.ts +24 -0
  47. package/dist-lib/lib/accounting/types.d.ts.map +1 -0
  48. package/dist-lib/lib/accounting/types.js +4 -0
  49. package/dist-lib/lib/accounting.functions.d.ts +4682 -0
  50. package/dist-lib/lib/accounting.functions.d.ts.map +1 -0
  51. package/dist-lib/lib/accounting.functions.js +50 -0
  52. package/dist-lib/lib/crypto.server.d.ts +10 -0
  53. package/dist-lib/lib/crypto.server.d.ts.map +1 -0
  54. package/dist-lib/lib/crypto.server.js +61 -0
  55. package/dist-lib/lib/customer-schemas.d.ts +53 -0
  56. package/dist-lib/lib/customer-schemas.d.ts.map +1 -0
  57. package/dist-lib/lib/customer-schemas.js +31 -0
  58. package/dist-lib/lib/customers.functions.d.ts +15904 -0
  59. package/dist-lib/lib/customers.functions.d.ts.map +1 -0
  60. package/dist-lib/lib/customers.functions.js +251 -0
  61. package/dist-lib/lib/floriday.server.d.ts +55 -0
  62. package/dist-lib/lib/floriday.server.d.ts.map +1 -0
  63. package/dist-lib/lib/floriday.server.js +765 -0
  64. package/dist-lib/lib/utils.d.ts +3 -0
  65. package/dist-lib/lib/utils.d.ts.map +1 -0
  66. package/dist-lib/lib/utils.js +5 -0
  67. package/dist-lib/lib/validationSchemas.d.ts +15 -0
  68. package/dist-lib/lib/validationSchemas.d.ts.map +1 -0
  69. package/dist-lib/lib/validationSchemas.js +25 -0
  70. package/dist-lib/styles.css +1 -0
  71. package/package.json +74 -0
@@ -0,0 +1,1656 @@
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
+ bugs: {
11
+ Row: {
12
+ attachment_url: string | null;
13
+ created_at: string;
14
+ description: string;
15
+ id: string;
16
+ priority: string;
17
+ status: string;
18
+ title: string;
19
+ updated_at: string;
20
+ user_id: string;
21
+ };
22
+ Insert: {
23
+ attachment_url?: string | null;
24
+ created_at?: string;
25
+ description: string;
26
+ id?: string;
27
+ priority?: string;
28
+ status?: string;
29
+ title: string;
30
+ updated_at?: string;
31
+ user_id: string;
32
+ };
33
+ Update: {
34
+ attachment_url?: string | null;
35
+ created_at?: string;
36
+ description?: string;
37
+ id?: string;
38
+ priority?: string;
39
+ status?: string;
40
+ title?: string;
41
+ updated_at?: string;
42
+ user_id?: string;
43
+ };
44
+ Relationships: [];
45
+ };
46
+ collections: {
47
+ Row: {
48
+ created_at: string;
49
+ created_by: string | null;
50
+ id: string;
51
+ name: string;
52
+ updated_at: string;
53
+ };
54
+ Insert: {
55
+ created_at?: string;
56
+ created_by?: string | null;
57
+ id?: string;
58
+ name: string;
59
+ updated_at?: string;
60
+ };
61
+ Update: {
62
+ created_at?: string;
63
+ created_by?: string | null;
64
+ id?: string;
65
+ name?: string;
66
+ updated_at?: string;
67
+ };
68
+ Relationships: [];
69
+ };
70
+ customer_audit_log: {
71
+ Row: {
72
+ action: string;
73
+ changes: Json;
74
+ created_at: string;
75
+ customer_id: string;
76
+ id: string;
77
+ user_id: string | null;
78
+ };
79
+ Insert: {
80
+ action: string;
81
+ changes?: Json;
82
+ created_at?: string;
83
+ customer_id: string;
84
+ id?: string;
85
+ user_id?: string | null;
86
+ };
87
+ Update: {
88
+ action?: string;
89
+ changes?: Json;
90
+ created_at?: string;
91
+ customer_id?: string;
92
+ id?: string;
93
+ user_id?: string | null;
94
+ };
95
+ Relationships: [
96
+ {
97
+ foreignKeyName: "customer_audit_log_customer_id_fkey";
98
+ columns: ["customer_id"];
99
+ isOneToOne: false;
100
+ referencedRelation: "customers";
101
+ referencedColumns: ["id"];
102
+ }
103
+ ];
104
+ };
105
+ customer_contacts: {
106
+ Row: {
107
+ created_at: string;
108
+ customer_id: string;
109
+ email: string | null;
110
+ floriday_contact_id: string | null;
111
+ full_name: string;
112
+ id: string;
113
+ is_active: boolean;
114
+ job_title: string | null;
115
+ phone: string | null;
116
+ photo_url: string | null;
117
+ raw: Json | null;
118
+ updated_at: string;
119
+ };
120
+ Insert: {
121
+ created_at?: string;
122
+ customer_id: string;
123
+ email?: string | null;
124
+ floriday_contact_id?: string | null;
125
+ full_name: string;
126
+ id?: string;
127
+ is_active?: boolean;
128
+ job_title?: string | null;
129
+ phone?: string | null;
130
+ photo_url?: string | null;
131
+ raw?: Json | null;
132
+ updated_at?: string;
133
+ };
134
+ Update: {
135
+ created_at?: string;
136
+ customer_id?: string;
137
+ email?: string | null;
138
+ floriday_contact_id?: string | null;
139
+ full_name?: string;
140
+ id?: string;
141
+ is_active?: boolean;
142
+ job_title?: string | null;
143
+ phone?: string | null;
144
+ photo_url?: string | null;
145
+ raw?: Json | null;
146
+ updated_at?: string;
147
+ };
148
+ Relationships: [
149
+ {
150
+ foreignKeyName: "customer_contacts_customer_id_fkey";
151
+ columns: ["customer_id"];
152
+ isOneToOne: false;
153
+ referencedRelation: "customers";
154
+ referencedColumns: ["id"];
155
+ }
156
+ ];
157
+ };
158
+ customer_delivery_locations: {
159
+ Row: {
160
+ address_line: string | null;
161
+ city: string | null;
162
+ country: string | null;
163
+ created_at: string;
164
+ customer_id: string;
165
+ floriday_location_id: string | null;
166
+ gln: string | null;
167
+ id: string;
168
+ is_primary: boolean;
169
+ name: string | null;
170
+ postal_code: string | null;
171
+ raw: Json | null;
172
+ updated_at: string;
173
+ };
174
+ Insert: {
175
+ address_line?: string | null;
176
+ city?: string | null;
177
+ country?: string | null;
178
+ created_at?: string;
179
+ customer_id: string;
180
+ floriday_location_id?: string | null;
181
+ gln?: string | null;
182
+ id?: string;
183
+ is_primary?: boolean;
184
+ name?: string | null;
185
+ postal_code?: string | null;
186
+ raw?: Json | null;
187
+ updated_at?: string;
188
+ };
189
+ Update: {
190
+ address_line?: string | null;
191
+ city?: string | null;
192
+ country?: string | null;
193
+ created_at?: string;
194
+ customer_id?: string;
195
+ floriday_location_id?: string | null;
196
+ gln?: string | null;
197
+ id?: string;
198
+ is_primary?: boolean;
199
+ name?: string | null;
200
+ postal_code?: string | null;
201
+ raw?: Json | null;
202
+ updated_at?: string;
203
+ };
204
+ Relationships: [
205
+ {
206
+ foreignKeyName: "customer_delivery_locations_customer_id_fkey";
207
+ columns: ["customer_id"];
208
+ isOneToOne: false;
209
+ referencedRelation: "customers";
210
+ referencedColumns: ["id"];
211
+ }
212
+ ];
213
+ };
214
+ customer_field_options: {
215
+ Row: {
216
+ created_at: string;
217
+ field_setting_id: string;
218
+ id: string;
219
+ label: string;
220
+ sort_order: number;
221
+ };
222
+ Insert: {
223
+ created_at?: string;
224
+ field_setting_id: string;
225
+ id?: string;
226
+ label: string;
227
+ sort_order?: number;
228
+ };
229
+ Update: {
230
+ created_at?: string;
231
+ field_setting_id?: string;
232
+ id?: string;
233
+ label?: string;
234
+ sort_order?: number;
235
+ };
236
+ Relationships: [
237
+ {
238
+ foreignKeyName: "customer_field_options_field_setting_id_fkey";
239
+ columns: ["field_setting_id"];
240
+ isOneToOne: false;
241
+ referencedRelation: "customer_field_settings";
242
+ referencedColumns: ["id"];
243
+ }
244
+ ];
245
+ };
246
+ customer_field_settings: {
247
+ Row: {
248
+ created_at: string;
249
+ field_key: string;
250
+ field_label: string;
251
+ field_type: string;
252
+ id: string;
253
+ is_custom: boolean;
254
+ sort_order: number;
255
+ updated_at: string;
256
+ };
257
+ Insert: {
258
+ created_at?: string;
259
+ field_key: string;
260
+ field_label: string;
261
+ field_type?: string;
262
+ id?: string;
263
+ is_custom?: boolean;
264
+ sort_order?: number;
265
+ updated_at?: string;
266
+ };
267
+ Update: {
268
+ created_at?: string;
269
+ field_key?: string;
270
+ field_label?: string;
271
+ field_type?: string;
272
+ id?: string;
273
+ is_custom?: boolean;
274
+ sort_order?: number;
275
+ updated_at?: string;
276
+ };
277
+ Relationships: [];
278
+ };
279
+ customer_selected_assortment: {
280
+ Row: {
281
+ article_number: string | null;
282
+ created_at: string;
283
+ customer_id: string;
284
+ floriday_item_id: string | null;
285
+ id: string;
286
+ price: number | null;
287
+ product_group: string | null;
288
+ product_name: string;
289
+ raw: Json | null;
290
+ unit: string | null;
291
+ updated_at: string;
292
+ };
293
+ Insert: {
294
+ article_number?: string | null;
295
+ created_at?: string;
296
+ customer_id: string;
297
+ floriday_item_id?: string | null;
298
+ id?: string;
299
+ price?: number | null;
300
+ product_group?: string | null;
301
+ product_name: string;
302
+ raw?: Json | null;
303
+ unit?: string | null;
304
+ updated_at?: string;
305
+ };
306
+ Update: {
307
+ article_number?: string | null;
308
+ created_at?: string;
309
+ customer_id?: string;
310
+ floriday_item_id?: string | null;
311
+ id?: string;
312
+ price?: number | null;
313
+ product_group?: string | null;
314
+ product_name?: string;
315
+ raw?: Json | null;
316
+ unit?: string | null;
317
+ updated_at?: string;
318
+ };
319
+ Relationships: [
320
+ {
321
+ foreignKeyName: "customer_selected_assortment_customer_id_fkey";
322
+ columns: ["customer_id"];
323
+ isOneToOne: false;
324
+ referencedRelation: "customers";
325
+ referencedColumns: ["id"];
326
+ }
327
+ ];
328
+ };
329
+ customer_trade_settings: {
330
+ Row: {
331
+ category: string;
332
+ created_at: string;
333
+ customer_id: string;
334
+ id: string;
335
+ is_active: boolean;
336
+ raw: Json | null;
337
+ setting_key: string;
338
+ setting_label: string;
339
+ updated_at: string;
340
+ };
341
+ Insert: {
342
+ category?: string;
343
+ created_at?: string;
344
+ customer_id: string;
345
+ id?: string;
346
+ is_active?: boolean;
347
+ raw?: Json | null;
348
+ setting_key: string;
349
+ setting_label: string;
350
+ updated_at?: string;
351
+ };
352
+ Update: {
353
+ category?: string;
354
+ created_at?: string;
355
+ customer_id?: string;
356
+ id?: string;
357
+ is_active?: boolean;
358
+ raw?: Json | null;
359
+ setting_key?: string;
360
+ setting_label?: string;
361
+ updated_at?: string;
362
+ };
363
+ Relationships: [
364
+ {
365
+ foreignKeyName: "customer_trade_settings_customer_id_fkey";
366
+ columns: ["customer_id"];
367
+ isOneToOne: false;
368
+ referencedRelation: "customers";
369
+ referencedColumns: ["id"];
370
+ }
371
+ ];
372
+ };
373
+ customers: {
374
+ Row: {
375
+ address: string | null;
376
+ bio: string | null;
377
+ city: string | null;
378
+ commercial_name: string | null;
379
+ company_name: string;
380
+ connection_status: string;
381
+ contact_person: string | null;
382
+ country: string | null;
383
+ created_at: string;
384
+ custom_fields: Json;
385
+ customer_class: string | null;
386
+ email: string | null;
387
+ external_id: string | null;
388
+ floriday_connection_id: string | null;
389
+ floriday_organization_id: string | null;
390
+ floriday_raw: Json | null;
391
+ gln: string | null;
392
+ house_number: string | null;
393
+ id: string;
394
+ is_active: boolean;
395
+ last_synced_at: string | null;
396
+ logo_url: string | null;
397
+ markets: string[];
398
+ notes: string | null;
399
+ organization_type: string | null;
400
+ payment_methods: string[];
401
+ phone: string | null;
402
+ postal_code: string | null;
403
+ product_groups: string[];
404
+ segments: string[];
405
+ source: string;
406
+ street: string | null;
407
+ sync_error: string | null;
408
+ sync_status: string;
409
+ trade_forms: string[];
410
+ updated_at: string;
411
+ vat_number: string | null;
412
+ website: string | null;
413
+ };
414
+ Insert: {
415
+ address?: string | null;
416
+ bio?: string | null;
417
+ city?: string | null;
418
+ commercial_name?: string | null;
419
+ company_name: string;
420
+ connection_status?: string;
421
+ contact_person?: string | null;
422
+ country?: string | null;
423
+ created_at?: string;
424
+ custom_fields?: Json;
425
+ customer_class?: string | null;
426
+ email?: string | null;
427
+ external_id?: string | null;
428
+ floriday_connection_id?: string | null;
429
+ floriday_organization_id?: string | null;
430
+ floriday_raw?: Json | null;
431
+ gln?: string | null;
432
+ house_number?: string | null;
433
+ id?: string;
434
+ is_active?: boolean;
435
+ last_synced_at?: string | null;
436
+ logo_url?: string | null;
437
+ markets?: string[];
438
+ notes?: string | null;
439
+ organization_type?: string | null;
440
+ payment_methods?: string[];
441
+ phone?: string | null;
442
+ postal_code?: string | null;
443
+ product_groups?: string[];
444
+ segments?: string[];
445
+ source?: string;
446
+ street?: string | null;
447
+ sync_error?: string | null;
448
+ sync_status?: string;
449
+ trade_forms?: string[];
450
+ updated_at?: string;
451
+ vat_number?: string | null;
452
+ website?: string | null;
453
+ };
454
+ Update: {
455
+ address?: string | null;
456
+ bio?: string | null;
457
+ city?: string | null;
458
+ commercial_name?: string | null;
459
+ company_name?: string;
460
+ connection_status?: string;
461
+ contact_person?: string | null;
462
+ country?: string | null;
463
+ created_at?: string;
464
+ custom_fields?: Json;
465
+ customer_class?: string | null;
466
+ email?: string | null;
467
+ external_id?: string | null;
468
+ floriday_connection_id?: string | null;
469
+ floriday_organization_id?: string | null;
470
+ floriday_raw?: Json | null;
471
+ gln?: string | null;
472
+ house_number?: string | null;
473
+ id?: string;
474
+ is_active?: boolean;
475
+ last_synced_at?: string | null;
476
+ logo_url?: string | null;
477
+ markets?: string[];
478
+ notes?: string | null;
479
+ organization_type?: string | null;
480
+ payment_methods?: string[];
481
+ phone?: string | null;
482
+ postal_code?: string | null;
483
+ product_groups?: string[];
484
+ segments?: string[];
485
+ source?: string;
486
+ street?: string | null;
487
+ sync_error?: string | null;
488
+ sync_status?: string;
489
+ trade_forms?: string[];
490
+ updated_at?: string;
491
+ vat_number?: string | null;
492
+ website?: string | null;
493
+ };
494
+ Relationships: [];
495
+ };
496
+ exact_connections: {
497
+ Row: {
498
+ access_token_encrypted: string;
499
+ company_name: string | null;
500
+ connected_at: string;
501
+ connected_by: string | null;
502
+ division_code: number | null;
503
+ environment: Database["public"]["Enums"]["exact_env"];
504
+ expires_at: string;
505
+ id: string;
506
+ refresh_token_encrypted: string;
507
+ status: string;
508
+ updated_at: string;
509
+ };
510
+ Insert: {
511
+ access_token_encrypted: string;
512
+ company_name?: string | null;
513
+ connected_at?: string;
514
+ connected_by?: string | null;
515
+ division_code?: number | null;
516
+ environment: Database["public"]["Enums"]["exact_env"];
517
+ expires_at: string;
518
+ id?: string;
519
+ refresh_token_encrypted: string;
520
+ status?: string;
521
+ updated_at?: string;
522
+ };
523
+ Update: {
524
+ access_token_encrypted?: string;
525
+ company_name?: string | null;
526
+ connected_at?: string;
527
+ connected_by?: string | null;
528
+ division_code?: number | null;
529
+ environment?: Database["public"]["Enums"]["exact_env"];
530
+ expires_at?: string;
531
+ id?: string;
532
+ refresh_token_encrypted?: string;
533
+ status?: string;
534
+ updated_at?: string;
535
+ };
536
+ Relationships: [];
537
+ };
538
+ exact_credentials: {
539
+ Row: {
540
+ client_id: string;
541
+ client_secret_encrypted: string;
542
+ created_at: string;
543
+ environment: Database["public"]["Enums"]["exact_env"];
544
+ id: string;
545
+ redirect_uri: string;
546
+ updated_at: string;
547
+ };
548
+ Insert: {
549
+ client_id: string;
550
+ client_secret_encrypted: string;
551
+ created_at?: string;
552
+ environment: Database["public"]["Enums"]["exact_env"];
553
+ id?: string;
554
+ redirect_uri: string;
555
+ updated_at?: string;
556
+ };
557
+ Update: {
558
+ client_id?: string;
559
+ client_secret_encrypted?: string;
560
+ created_at?: string;
561
+ environment?: Database["public"]["Enums"]["exact_env"];
562
+ id?: string;
563
+ redirect_uri?: string;
564
+ updated_at?: string;
565
+ };
566
+ Relationships: [];
567
+ };
568
+ exact_customers_cache: {
569
+ Row: {
570
+ connection_id: string;
571
+ data: Json;
572
+ exact_id: string;
573
+ fetched_at: string;
574
+ };
575
+ Insert: {
576
+ connection_id: string;
577
+ data?: Json;
578
+ exact_id: string;
579
+ fetched_at?: string;
580
+ };
581
+ Update: {
582
+ connection_id?: string;
583
+ data?: Json;
584
+ exact_id?: string;
585
+ fetched_at?: string;
586
+ };
587
+ Relationships: [];
588
+ };
589
+ exact_sync_state: {
590
+ Row: {
591
+ connection_id: string;
592
+ last_error: string | null;
593
+ last_modified_cursor: string | null;
594
+ last_synced_at: string | null;
595
+ status: string;
596
+ updated_at: string;
597
+ };
598
+ Insert: {
599
+ connection_id: string;
600
+ last_error?: string | null;
601
+ last_modified_cursor?: string | null;
602
+ last_synced_at?: string | null;
603
+ status?: string;
604
+ updated_at?: string;
605
+ };
606
+ Update: {
607
+ connection_id?: string;
608
+ last_error?: string | null;
609
+ last_modified_cursor?: string | null;
610
+ last_synced_at?: string | null;
611
+ status?: string;
612
+ updated_at?: string;
613
+ };
614
+ Relationships: [];
615
+ };
616
+ floricode_connection_settings: {
617
+ Row: {
618
+ catalog_key: string | null;
619
+ catalog_url: string;
620
+ created_at: string;
621
+ id: number;
622
+ last_meta: Json | null;
623
+ last_test_at: string | null;
624
+ last_test_error: string | null;
625
+ last_test_ok: boolean | null;
626
+ updated_at: string;
627
+ };
628
+ Insert: {
629
+ catalog_key?: string | null;
630
+ catalog_url?: string;
631
+ created_at?: string;
632
+ id?: number;
633
+ last_meta?: Json | null;
634
+ last_test_at?: string | null;
635
+ last_test_error?: string | null;
636
+ last_test_ok?: boolean | null;
637
+ updated_at?: string;
638
+ };
639
+ Update: {
640
+ catalog_key?: string | null;
641
+ catalog_url?: string;
642
+ created_at?: string;
643
+ id?: number;
644
+ last_meta?: Json | null;
645
+ last_test_at?: string | null;
646
+ last_test_error?: string | null;
647
+ last_test_ok?: boolean | null;
648
+ updated_at?: string;
649
+ };
650
+ Relationships: [];
651
+ };
652
+ floricode_records: {
653
+ Row: {
654
+ change_date_time: string | null;
655
+ data: Json;
656
+ last_synced_at: string;
657
+ record_id: string;
658
+ resource: string;
659
+ };
660
+ Insert: {
661
+ change_date_time?: string | null;
662
+ data?: Json;
663
+ last_synced_at?: string;
664
+ record_id: string;
665
+ resource: string;
666
+ };
667
+ Update: {
668
+ change_date_time?: string | null;
669
+ data?: Json;
670
+ last_synced_at?: string;
671
+ record_id?: string;
672
+ resource?: string;
673
+ };
674
+ Relationships: [];
675
+ };
676
+ floricode_sync_state: {
677
+ Row: {
678
+ error_message: string | null;
679
+ last_change_date_time: string | null;
680
+ last_sequence_number: number;
681
+ last_sync_at: string | null;
682
+ resource: string;
683
+ status: string;
684
+ updated_at: string;
685
+ };
686
+ Insert: {
687
+ error_message?: string | null;
688
+ last_change_date_time?: string | null;
689
+ last_sequence_number?: number;
690
+ last_sync_at?: string | null;
691
+ resource: string;
692
+ status?: string;
693
+ updated_at?: string;
694
+ };
695
+ Update: {
696
+ error_message?: string | null;
697
+ last_change_date_time?: string | null;
698
+ last_sequence_number?: number;
699
+ last_sync_at?: string | null;
700
+ resource?: string;
701
+ status?: string;
702
+ updated_at?: string;
703
+ };
704
+ Relationships: [];
705
+ };
706
+ floriday_connections: {
707
+ Row: {
708
+ access_token: string | null;
709
+ api_key: string;
710
+ client_id: string;
711
+ client_secret: string;
712
+ created_at: string;
713
+ customers_endpoint: string | null;
714
+ environment: string;
715
+ gln_code: string | null;
716
+ id: string;
717
+ is_active: boolean;
718
+ label: string;
719
+ organization_name: string | null;
720
+ preferred_warehouse_id: string | null;
721
+ preferred_warehouse_name: string | null;
722
+ token_expires_at: string | null;
723
+ updated_at: string;
724
+ };
725
+ Insert: {
726
+ access_token?: string | null;
727
+ api_key: string;
728
+ client_id: string;
729
+ client_secret: string;
730
+ created_at?: string;
731
+ customers_endpoint?: string | null;
732
+ environment: string;
733
+ gln_code?: string | null;
734
+ id?: string;
735
+ is_active?: boolean;
736
+ label?: string;
737
+ organization_name?: string | null;
738
+ preferred_warehouse_id?: string | null;
739
+ preferred_warehouse_name?: string | null;
740
+ token_expires_at?: string | null;
741
+ updated_at?: string;
742
+ };
743
+ Update: {
744
+ access_token?: string | null;
745
+ api_key?: string;
746
+ client_id?: string;
747
+ client_secret?: string;
748
+ created_at?: string;
749
+ customers_endpoint?: string | null;
750
+ environment?: string;
751
+ gln_code?: string | null;
752
+ 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;
759
+ updated_at?: string;
760
+ };
761
+ Relationships: [];
762
+ };
763
+ floriday_customers_cache: {
764
+ Row: {
765
+ connection_id: string | null;
766
+ data: Json;
767
+ fetched_at: string;
768
+ organization_id: string;
769
+ };
770
+ Insert: {
771
+ connection_id?: string | null;
772
+ data?: Json;
773
+ fetched_at?: string;
774
+ organization_id: string;
775
+ };
776
+ Update: {
777
+ connection_id?: string | null;
778
+ data?: Json;
779
+ fetched_at?: string;
780
+ organization_id?: string;
781
+ };
782
+ Relationships: [
783
+ {
784
+ foreignKeyName: "floriday_customers_cache_connection_id_fkey";
785
+ columns: ["connection_id"];
786
+ isOneToOne: false;
787
+ referencedRelation: "floriday_connections";
788
+ referencedColumns: ["id"];
789
+ }
790
+ ];
791
+ };
792
+ floriday_network_cache: {
793
+ 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;
802
+ };
803
+ 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;
812
+ };
813
+ 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;
822
+ };
823
+ Relationships: [];
824
+ };
825
+ floriday_network_sync_state: {
826
+ Row: {
827
+ connection_id: string;
828
+ last_error: string | null;
829
+ last_sequence_number: number;
830
+ last_synced_at: string | null;
831
+ updated_at: string;
832
+ };
833
+ Insert: {
834
+ connection_id: string;
835
+ last_error?: string | null;
836
+ last_sequence_number?: number;
837
+ last_synced_at?: string | null;
838
+ updated_at?: string;
839
+ };
840
+ Update: {
841
+ connection_id?: string;
842
+ last_error?: string | null;
843
+ last_sequence_number?: number;
844
+ last_synced_at?: string | null;
845
+ updated_at?: string;
846
+ };
847
+ Relationships: [];
848
+ };
849
+ floriday_settings: {
850
+ Row: {
851
+ active_environment: string;
852
+ id: number;
853
+ updated_at: string;
854
+ };
855
+ Insert: {
856
+ active_environment?: string;
857
+ id?: number;
858
+ updated_at?: string;
859
+ };
860
+ Update: {
861
+ active_environment?: string;
862
+ id?: number;
863
+ updated_at?: string;
864
+ };
865
+ Relationships: [];
866
+ };
867
+ inventory_settings: {
868
+ Row: {
869
+ created_at: string;
870
+ hierarchy_levels: string[];
871
+ id: string;
872
+ updated_at: string;
873
+ visible_columns: string[];
874
+ };
875
+ Insert: {
876
+ created_at?: string;
877
+ hierarchy_levels?: string[];
878
+ id?: string;
879
+ updated_at?: string;
880
+ visible_columns?: string[];
881
+ };
882
+ Update: {
883
+ created_at?: string;
884
+ hierarchy_levels?: string[];
885
+ id?: string;
886
+ updated_at?: string;
887
+ visible_columns?: string[];
888
+ };
889
+ Relationships: [];
890
+ };
891
+ locations: {
892
+ Row: {
893
+ created_at: string;
894
+ id: string;
895
+ name: string;
896
+ sort_order: number;
897
+ updated_at: string;
898
+ };
899
+ Insert: {
900
+ created_at?: string;
901
+ id?: string;
902
+ name: string;
903
+ sort_order?: number;
904
+ updated_at?: string;
905
+ };
906
+ Update: {
907
+ created_at?: string;
908
+ id?: string;
909
+ name?: string;
910
+ sort_order?: number;
911
+ updated_at?: string;
912
+ };
913
+ Relationships: [];
914
+ };
915
+ notifications: {
916
+ Row: {
917
+ created_at: string;
918
+ id: string;
919
+ message: string | null;
920
+ read: boolean;
921
+ title: string;
922
+ updated_at: string;
923
+ user_id: string;
924
+ };
925
+ Insert: {
926
+ created_at?: string;
927
+ id?: string;
928
+ message?: string | null;
929
+ read?: boolean;
930
+ title: string;
931
+ updated_at?: string;
932
+ user_id: string;
933
+ };
934
+ Update: {
935
+ created_at?: string;
936
+ id?: string;
937
+ message?: string | null;
938
+ read?: boolean;
939
+ title?: string;
940
+ updated_at?: string;
941
+ user_id?: string;
942
+ };
943
+ Relationships: [];
944
+ };
945
+ order_field_options: {
946
+ Row: {
947
+ created_at: string;
948
+ field_setting_id: string;
949
+ id: string;
950
+ label: string;
951
+ sort_order: number;
952
+ };
953
+ Insert: {
954
+ created_at?: string;
955
+ field_setting_id: string;
956
+ id?: string;
957
+ label: string;
958
+ sort_order?: number;
959
+ };
960
+ Update: {
961
+ created_at?: string;
962
+ field_setting_id?: string;
963
+ id?: string;
964
+ label?: string;
965
+ sort_order?: number;
966
+ };
967
+ Relationships: [
968
+ {
969
+ foreignKeyName: "order_field_options_field_setting_id_fkey";
970
+ columns: ["field_setting_id"];
971
+ isOneToOne: false;
972
+ referencedRelation: "order_field_settings";
973
+ referencedColumns: ["id"];
974
+ }
975
+ ];
976
+ };
977
+ order_field_settings: {
978
+ Row: {
979
+ active: boolean;
980
+ created_at: string;
981
+ field_key: string;
982
+ field_label: string;
983
+ field_type: string;
984
+ id: string;
985
+ is_custom: boolean;
986
+ sort_order: number;
987
+ updated_at: string;
988
+ };
989
+ Insert: {
990
+ active?: boolean;
991
+ created_at?: string;
992
+ field_key: string;
993
+ field_label: string;
994
+ field_type?: string;
995
+ id?: string;
996
+ is_custom?: boolean;
997
+ sort_order?: number;
998
+ updated_at?: string;
999
+ };
1000
+ Update: {
1001
+ active?: boolean;
1002
+ created_at?: string;
1003
+ field_key?: string;
1004
+ field_label?: string;
1005
+ field_type?: string;
1006
+ id?: string;
1007
+ is_custom?: boolean;
1008
+ sort_order?: number;
1009
+ updated_at?: string;
1010
+ };
1011
+ Relationships: [];
1012
+ };
1013
+ order_items: {
1014
+ Row: {
1015
+ created_at: string;
1016
+ id: string;
1017
+ order_id: string;
1018
+ product_id: string | null;
1019
+ product_name: string;
1020
+ quantity: number;
1021
+ unit: string;
1022
+ unit_price: number | null;
1023
+ };
1024
+ Insert: {
1025
+ created_at?: string;
1026
+ id?: string;
1027
+ order_id: string;
1028
+ product_id?: string | null;
1029
+ product_name: string;
1030
+ quantity?: number;
1031
+ unit?: string;
1032
+ unit_price?: number | null;
1033
+ };
1034
+ Update: {
1035
+ created_at?: string;
1036
+ id?: string;
1037
+ order_id?: string;
1038
+ product_id?: string | null;
1039
+ product_name?: string;
1040
+ quantity?: number;
1041
+ unit?: string;
1042
+ unit_price?: number | null;
1043
+ };
1044
+ Relationships: [
1045
+ {
1046
+ foreignKeyName: "order_items_order_id_fkey";
1047
+ columns: ["order_id"];
1048
+ isOneToOne: false;
1049
+ referencedRelation: "orders";
1050
+ referencedColumns: ["id"];
1051
+ },
1052
+ {
1053
+ foreignKeyName: "order_items_product_id_fkey";
1054
+ columns: ["product_id"];
1055
+ isOneToOne: false;
1056
+ referencedRelation: "products";
1057
+ referencedColumns: ["id"];
1058
+ }
1059
+ ];
1060
+ };
1061
+ orders: {
1062
+ Row: {
1063
+ created_at: string;
1064
+ custom_fields: Json;
1065
+ customer_id: string | null;
1066
+ customer_name: string;
1067
+ deleted_at: string | null;
1068
+ delivery_date: string;
1069
+ id: string;
1070
+ notes: string | null;
1071
+ order_date: string;
1072
+ order_number: string;
1073
+ status: string;
1074
+ total: string;
1075
+ updated_at: string;
1076
+ };
1077
+ Insert: {
1078
+ created_at?: string;
1079
+ custom_fields?: Json;
1080
+ customer_id?: string | null;
1081
+ customer_name?: string;
1082
+ deleted_at?: string | null;
1083
+ delivery_date: string;
1084
+ id?: string;
1085
+ notes?: string | null;
1086
+ order_date?: string;
1087
+ order_number: string;
1088
+ status?: string;
1089
+ total?: string;
1090
+ updated_at?: string;
1091
+ };
1092
+ Update: {
1093
+ created_at?: string;
1094
+ custom_fields?: Json;
1095
+ customer_id?: string | null;
1096
+ customer_name?: string;
1097
+ deleted_at?: string | null;
1098
+ delivery_date?: string;
1099
+ id?: string;
1100
+ notes?: string | null;
1101
+ order_date?: string;
1102
+ order_number?: string;
1103
+ status?: string;
1104
+ total?: string;
1105
+ updated_at?: string;
1106
+ };
1107
+ Relationships: [
1108
+ {
1109
+ foreignKeyName: "orders_customer_id_fkey";
1110
+ columns: ["customer_id"];
1111
+ isOneToOne: false;
1112
+ referencedRelation: "customers";
1113
+ referencedColumns: ["id"];
1114
+ }
1115
+ ];
1116
+ };
1117
+ product_categories: {
1118
+ Row: {
1119
+ color: string;
1120
+ created_at: string;
1121
+ icon: string | null;
1122
+ id: string;
1123
+ name: string;
1124
+ slug: string;
1125
+ sort_order: number;
1126
+ updated_at: string;
1127
+ };
1128
+ Insert: {
1129
+ color?: string;
1130
+ created_at?: string;
1131
+ icon?: string | null;
1132
+ id?: string;
1133
+ name: string;
1134
+ slug: string;
1135
+ sort_order?: number;
1136
+ updated_at?: string;
1137
+ };
1138
+ Update: {
1139
+ color?: string;
1140
+ created_at?: string;
1141
+ icon?: string | null;
1142
+ id?: string;
1143
+ name?: string;
1144
+ slug?: string;
1145
+ sort_order?: number;
1146
+ updated_at?: string;
1147
+ };
1148
+ Relationships: [];
1149
+ };
1150
+ product_field_options: {
1151
+ Row: {
1152
+ created_at: string;
1153
+ field_setting_id: string;
1154
+ id: string;
1155
+ label: string;
1156
+ sort_order: number;
1157
+ };
1158
+ Insert: {
1159
+ created_at?: string;
1160
+ field_setting_id: string;
1161
+ id?: string;
1162
+ label: string;
1163
+ sort_order?: number;
1164
+ };
1165
+ Update: {
1166
+ created_at?: string;
1167
+ field_setting_id?: string;
1168
+ id?: string;
1169
+ label?: string;
1170
+ sort_order?: number;
1171
+ };
1172
+ Relationships: [
1173
+ {
1174
+ foreignKeyName: "product_field_options_field_setting_id_fkey";
1175
+ columns: ["field_setting_id"];
1176
+ isOneToOne: false;
1177
+ referencedRelation: "product_field_settings";
1178
+ referencedColumns: ["id"];
1179
+ }
1180
+ ];
1181
+ };
1182
+ product_field_settings: {
1183
+ Row: {
1184
+ active_per_category: Json;
1185
+ created_at: string;
1186
+ field_key: string;
1187
+ field_label: string;
1188
+ field_type: string;
1189
+ id: string;
1190
+ is_custom: boolean;
1191
+ sort_order: number;
1192
+ updated_at: string;
1193
+ };
1194
+ Insert: {
1195
+ active_per_category?: Json;
1196
+ created_at?: string;
1197
+ field_key: string;
1198
+ field_label: string;
1199
+ field_type?: string;
1200
+ id?: string;
1201
+ is_custom?: boolean;
1202
+ sort_order?: number;
1203
+ updated_at?: string;
1204
+ };
1205
+ Update: {
1206
+ active_per_category?: Json;
1207
+ created_at?: string;
1208
+ field_key?: string;
1209
+ field_label?: string;
1210
+ field_type?: string;
1211
+ id?: string;
1212
+ is_custom?: boolean;
1213
+ sort_order?: number;
1214
+ updated_at?: string;
1215
+ };
1216
+ Relationships: [];
1217
+ };
1218
+ products: {
1219
+ Row: {
1220
+ barcode: string | null;
1221
+ batch: string;
1222
+ created_at: string;
1223
+ custom_fields: Json;
1224
+ id: string;
1225
+ image_url: string | null;
1226
+ incoming_quantity: number;
1227
+ location: string;
1228
+ min_quantity: number;
1229
+ product: string;
1230
+ product_type: string;
1231
+ purchase_price: number | null;
1232
+ quantity: number;
1233
+ sale_price: number | null;
1234
+ unit: string;
1235
+ updated_at: string;
1236
+ weight: string | null;
1237
+ };
1238
+ Insert: {
1239
+ barcode?: string | null;
1240
+ batch: string;
1241
+ created_at?: string;
1242
+ custom_fields?: Json;
1243
+ id?: string;
1244
+ image_url?: string | null;
1245
+ incoming_quantity?: number;
1246
+ location: string;
1247
+ min_quantity?: number;
1248
+ product: string;
1249
+ product_type?: string;
1250
+ purchase_price?: number | null;
1251
+ quantity?: number;
1252
+ sale_price?: number | null;
1253
+ unit?: string;
1254
+ updated_at?: string;
1255
+ weight?: string | null;
1256
+ };
1257
+ Update: {
1258
+ barcode?: string | null;
1259
+ batch?: string;
1260
+ created_at?: string;
1261
+ custom_fields?: Json;
1262
+ id?: string;
1263
+ image_url?: string | null;
1264
+ incoming_quantity?: number;
1265
+ location?: string;
1266
+ min_quantity?: number;
1267
+ product?: string;
1268
+ product_type?: string;
1269
+ purchase_price?: number | null;
1270
+ quantity?: number;
1271
+ sale_price?: number | null;
1272
+ unit?: string;
1273
+ updated_at?: string;
1274
+ weight?: string | null;
1275
+ };
1276
+ Relationships: [];
1277
+ };
1278
+ profiles: {
1279
+ Row: {
1280
+ created_at: string;
1281
+ display_name: string | null;
1282
+ email: string | null;
1283
+ id: string;
1284
+ notification_preferences: Json;
1285
+ updated_at: string;
1286
+ };
1287
+ Insert: {
1288
+ created_at?: string;
1289
+ display_name?: string | null;
1290
+ email?: string | null;
1291
+ id: string;
1292
+ notification_preferences?: Json;
1293
+ updated_at?: string;
1294
+ };
1295
+ Update: {
1296
+ created_at?: string;
1297
+ display_name?: string | null;
1298
+ email?: string | null;
1299
+ id?: string;
1300
+ notification_preferences?: Json;
1301
+ updated_at?: string;
1302
+ };
1303
+ Relationships: [];
1304
+ };
1305
+ purchase_order_items: {
1306
+ Row: {
1307
+ created_at: string;
1308
+ id: string;
1309
+ product_id: string | null;
1310
+ product_type: string;
1311
+ purchase_order_id: string;
1312
+ quantity: number;
1313
+ };
1314
+ Insert: {
1315
+ created_at?: string;
1316
+ id?: string;
1317
+ product_id?: string | null;
1318
+ product_type?: string;
1319
+ purchase_order_id: string;
1320
+ quantity?: number;
1321
+ };
1322
+ Update: {
1323
+ created_at?: string;
1324
+ id?: string;
1325
+ product_id?: string | null;
1326
+ product_type?: string;
1327
+ purchase_order_id?: string;
1328
+ quantity?: number;
1329
+ };
1330
+ Relationships: [
1331
+ {
1332
+ foreignKeyName: "purchase_order_items_product_id_fkey";
1333
+ columns: ["product_id"];
1334
+ isOneToOne: false;
1335
+ referencedRelation: "products";
1336
+ referencedColumns: ["id"];
1337
+ },
1338
+ {
1339
+ foreignKeyName: "purchase_order_items_purchase_order_id_fkey";
1340
+ columns: ["purchase_order_id"];
1341
+ isOneToOne: false;
1342
+ referencedRelation: "purchase_orders";
1343
+ referencedColumns: ["id"];
1344
+ }
1345
+ ];
1346
+ };
1347
+ purchase_orders: {
1348
+ Row: {
1349
+ created_at: string;
1350
+ expected_delivery_date: string;
1351
+ id: string;
1352
+ location_id: string | null;
1353
+ notes: string | null;
1354
+ order_number: string;
1355
+ status: string;
1356
+ supplier_id: string | null;
1357
+ supplier_name: string;
1358
+ updated_at: string;
1359
+ };
1360
+ Insert: {
1361
+ created_at?: string;
1362
+ expected_delivery_date: string;
1363
+ id?: string;
1364
+ location_id?: string | null;
1365
+ notes?: string | null;
1366
+ order_number: string;
1367
+ status?: string;
1368
+ supplier_id?: string | null;
1369
+ supplier_name?: string;
1370
+ updated_at?: string;
1371
+ };
1372
+ Update: {
1373
+ created_at?: string;
1374
+ expected_delivery_date?: string;
1375
+ id?: string;
1376
+ location_id?: string | null;
1377
+ notes?: string | null;
1378
+ order_number?: string;
1379
+ status?: string;
1380
+ supplier_id?: string | null;
1381
+ supplier_name?: string;
1382
+ updated_at?: string;
1383
+ };
1384
+ Relationships: [
1385
+ {
1386
+ foreignKeyName: "purchase_orders_location_id_fkey";
1387
+ columns: ["location_id"];
1388
+ isOneToOne: false;
1389
+ referencedRelation: "locations";
1390
+ referencedColumns: ["id"];
1391
+ },
1392
+ {
1393
+ foreignKeyName: "purchase_orders_supplier_id_fkey";
1394
+ columns: ["supplier_id"];
1395
+ isOneToOne: false;
1396
+ referencedRelation: "suppliers";
1397
+ referencedColumns: ["id"];
1398
+ }
1399
+ ];
1400
+ };
1401
+ supplier_products: {
1402
+ Row: {
1403
+ article_number: string | null;
1404
+ created_at: string;
1405
+ id: string;
1406
+ name: string;
1407
+ notes: string | null;
1408
+ pot_size: string | null;
1409
+ price: number | null;
1410
+ quantity: number | null;
1411
+ supplier_id: string;
1412
+ unit: string;
1413
+ updated_at: string;
1414
+ };
1415
+ Insert: {
1416
+ article_number?: string | null;
1417
+ created_at?: string;
1418
+ id?: string;
1419
+ name: string;
1420
+ notes?: string | null;
1421
+ pot_size?: string | null;
1422
+ price?: number | null;
1423
+ quantity?: number | null;
1424
+ supplier_id: string;
1425
+ unit?: string;
1426
+ updated_at?: string;
1427
+ };
1428
+ Update: {
1429
+ article_number?: string | null;
1430
+ created_at?: string;
1431
+ id?: string;
1432
+ name?: string;
1433
+ notes?: string | null;
1434
+ pot_size?: string | null;
1435
+ price?: number | null;
1436
+ quantity?: number | null;
1437
+ supplier_id?: string;
1438
+ unit?: string;
1439
+ updated_at?: string;
1440
+ };
1441
+ Relationships: [
1442
+ {
1443
+ foreignKeyName: "supplier_products_supplier_id_fkey";
1444
+ columns: ["supplier_id"];
1445
+ isOneToOne: false;
1446
+ referencedRelation: "suppliers";
1447
+ referencedColumns: ["id"];
1448
+ }
1449
+ ];
1450
+ };
1451
+ suppliers: {
1452
+ Row: {
1453
+ address: string | null;
1454
+ column_mappings: Json | null;
1455
+ contact_person: string | null;
1456
+ created_at: string;
1457
+ default_product_type: string;
1458
+ email: string | null;
1459
+ id: string;
1460
+ imported_file_name: string | null;
1461
+ name: string;
1462
+ notes: string | null;
1463
+ phone: string | null;
1464
+ updated_at: string;
1465
+ };
1466
+ Insert: {
1467
+ address?: string | null;
1468
+ column_mappings?: Json | null;
1469
+ contact_person?: string | null;
1470
+ created_at?: string;
1471
+ default_product_type?: string;
1472
+ email?: string | null;
1473
+ id?: string;
1474
+ imported_file_name?: string | null;
1475
+ name: string;
1476
+ notes?: string | null;
1477
+ phone?: string | null;
1478
+ updated_at?: string;
1479
+ };
1480
+ Update: {
1481
+ address?: string | null;
1482
+ column_mappings?: Json | null;
1483
+ contact_person?: string | null;
1484
+ created_at?: string;
1485
+ default_product_type?: string;
1486
+ email?: string | null;
1487
+ id?: string;
1488
+ imported_file_name?: string | null;
1489
+ name?: string;
1490
+ notes?: string | null;
1491
+ phone?: string | null;
1492
+ updated_at?: string;
1493
+ };
1494
+ Relationships: [];
1495
+ };
1496
+ trade_item_drafts: {
1497
+ Row: {
1498
+ connection_id: string | null;
1499
+ created_at: string;
1500
+ data: Json;
1501
+ id: string;
1502
+ updated_at: string;
1503
+ user_id: string;
1504
+ };
1505
+ Insert: {
1506
+ connection_id?: string | null;
1507
+ created_at?: string;
1508
+ data?: Json;
1509
+ id?: string;
1510
+ updated_at?: string;
1511
+ user_id: string;
1512
+ };
1513
+ Update: {
1514
+ connection_id?: string | null;
1515
+ created_at?: string;
1516
+ data?: Json;
1517
+ id?: string;
1518
+ updated_at?: string;
1519
+ user_id?: string;
1520
+ };
1521
+ Relationships: [];
1522
+ };
1523
+ user_roles: {
1524
+ Row: {
1525
+ created_at: string;
1526
+ id: string;
1527
+ role: Database["public"]["Enums"]["app_role"];
1528
+ user_id: string;
1529
+ };
1530
+ Insert: {
1531
+ created_at?: string;
1532
+ id?: string;
1533
+ role: Database["public"]["Enums"]["app_role"];
1534
+ user_id: string;
1535
+ };
1536
+ Update: {
1537
+ created_at?: string;
1538
+ id?: string;
1539
+ role?: Database["public"]["Enums"]["app_role"];
1540
+ user_id?: string;
1541
+ };
1542
+ Relationships: [
1543
+ {
1544
+ foreignKeyName: "user_roles_user_id_fkey";
1545
+ columns: ["user_id"];
1546
+ isOneToOne: false;
1547
+ referencedRelation: "profiles";
1548
+ referencedColumns: ["id"];
1549
+ }
1550
+ ];
1551
+ };
1552
+ };
1553
+ Views: {
1554
+ [_ in never]: never;
1555
+ };
1556
+ Functions: {
1557
+ has_role: {
1558
+ Args: {
1559
+ _role: Database["public"]["Enums"]["app_role"];
1560
+ _user_id: string;
1561
+ };
1562
+ Returns: boolean;
1563
+ };
1564
+ schedule_floriday_network_sync: {
1565
+ Args: {
1566
+ p_apikey: string;
1567
+ p_url: string;
1568
+ };
1569
+ Returns: number;
1570
+ };
1571
+ schedule_floriday_token_refresh: {
1572
+ Args: {
1573
+ p_apikey: string;
1574
+ p_url: string;
1575
+ };
1576
+ Returns: number;
1577
+ };
1578
+ show_limit: {
1579
+ Args: never;
1580
+ Returns: number;
1581
+ };
1582
+ show_trgm: {
1583
+ Args: {
1584
+ "": string;
1585
+ };
1586
+ Returns: string[];
1587
+ };
1588
+ };
1589
+ Enums: {
1590
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
1591
+ exact_env: "staging" | "live";
1592
+ };
1593
+ CompositeTypes: {
1594
+ [_ in never]: never;
1595
+ };
1596
+ };
1597
+ };
1598
+ type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
1599
+ type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">];
1600
+ export type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
1601
+ schema: keyof DatabaseWithoutInternals;
1602
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
1603
+ schema: keyof DatabaseWithoutInternals;
1604
+ } ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
1605
+ schema: keyof DatabaseWithoutInternals;
1606
+ } ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
1607
+ Row: infer R;
1608
+ } ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
1609
+ Row: infer R;
1610
+ } ? R : never : never;
1611
+ export type TablesInsert<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
1612
+ schema: keyof DatabaseWithoutInternals;
1613
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
1614
+ schema: keyof DatabaseWithoutInternals;
1615
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
1616
+ schema: keyof DatabaseWithoutInternals;
1617
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1618
+ Insert: infer I;
1619
+ } ? I : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
1620
+ Insert: infer I;
1621
+ } ? I : never : never;
1622
+ export type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
1623
+ schema: keyof DatabaseWithoutInternals;
1624
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
1625
+ schema: keyof DatabaseWithoutInternals;
1626
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
1627
+ schema: keyof DatabaseWithoutInternals;
1628
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1629
+ Update: infer U;
1630
+ } ? U : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
1631
+ Update: infer U;
1632
+ } ? U : never : never;
1633
+ export type Enums<DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] | {
1634
+ schema: keyof DatabaseWithoutInternals;
1635
+ }, EnumName extends DefaultSchemaEnumNameOrOptions extends {
1636
+ schema: keyof DatabaseWithoutInternals;
1637
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
1638
+ schema: keyof DatabaseWithoutInternals;
1639
+ } ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
1640
+ export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] | {
1641
+ schema: keyof DatabaseWithoutInternals;
1642
+ }, CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
1643
+ schema: keyof DatabaseWithoutInternals;
1644
+ } ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
1645
+ schema: keyof DatabaseWithoutInternals;
1646
+ } ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
1647
+ export declare const Constants: {
1648
+ readonly public: {
1649
+ readonly Enums: {
1650
+ readonly app_role: readonly ["admin", "manager", "warehouse", "sales", "developer"];
1651
+ readonly exact_env: readonly ["staging", "live"];
1652
+ };
1653
+ };
1654
+ };
1655
+ export {};
1656
+ //# sourceMappingURL=types.d.ts.map