@flowselections/floriday-voorraad 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 (58) 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/TemplatePage.d.ts +2 -0
  5. package/dist-lib/components/TemplatePage.d.ts.map +1 -0
  6. package/dist-lib/components/TemplatePage.js +4 -0
  7. package/dist-lib/components/settings/VoorraadSettingsCard.d.ts +2 -0
  8. package/dist-lib/components/settings/VoorraadSettingsCard.d.ts.map +1 -0
  9. package/dist-lib/components/settings/VoorraadSettingsCard.js +39 -0
  10. package/dist-lib/components/voorraad/ConnectionPicker.d.ts +8 -0
  11. package/dist-lib/components/voorraad/ConnectionPicker.d.ts.map +1 -0
  12. package/dist-lib/components/voorraad/ConnectionPicker.js +8 -0
  13. package/dist-lib/components/voorraad/ExcelExportButton.d.ts +6 -0
  14. package/dist-lib/components/voorraad/ExcelExportButton.d.ts.map +1 -0
  15. package/dist-lib/components/voorraad/ExcelExportButton.js +24 -0
  16. package/dist-lib/components/voorraad/VoorraadTable.d.ts +6 -0
  17. package/dist-lib/components/voorraad/VoorraadTable.d.ts.map +1 -0
  18. package/dist-lib/components/voorraad/VoorraadTable.js +22 -0
  19. package/dist-lib/hooks/useFloridayConnection.d.ts +9 -0
  20. package/dist-lib/hooks/useFloridayConnection.d.ts.map +1 -0
  21. package/dist-lib/hooks/useFloridayConnection.js +40 -0
  22. package/dist-lib/hooks/useVoorraadData.d.ts +7 -0
  23. package/dist-lib/hooks/useVoorraadData.d.ts.map +1 -0
  24. package/dist-lib/hooks/useVoorraadData.js +30 -0
  25. package/dist-lib/index.d.ts +5 -0
  26. package/dist-lib/index.d.ts.map +1 -0
  27. package/dist-lib/index.js +20 -0
  28. package/dist-lib/integrations/supabase/auth-attacher.d.ts +2 -0
  29. package/dist-lib/integrations/supabase/auth-attacher.d.ts.map +1 -0
  30. package/dist-lib/integrations/supabase/auth-attacher.js +12 -0
  31. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1029 -0
  32. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -0
  33. package/dist-lib/integrations/supabase/auth-middleware.js +52 -0
  34. package/dist-lib/integrations/supabase/client.d.ts +1025 -0
  35. package/dist-lib/integrations/supabase/client.d.ts.map +1 -0
  36. package/dist-lib/integrations/supabase/client.js +28 -0
  37. package/dist-lib/integrations/supabase/client.server.d.ts +1025 -0
  38. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -0
  39. package/dist-lib/integrations/supabase/client.server.js +30 -0
  40. package/dist-lib/integrations/supabase/types.d.ts +1112 -0
  41. package/dist-lib/integrations/supabase/types.d.ts.map +1 -0
  42. package/dist-lib/integrations/supabase/types.js +7 -0
  43. package/dist-lib/lib/floricode-client.d.ts +15 -0
  44. package/dist-lib/lib/floricode-client.d.ts.map +1 -0
  45. package/dist-lib/lib/floricode-client.js +34 -0
  46. package/dist-lib/lib/floriday-client.d.ts +51 -0
  47. package/dist-lib/lib/floriday-client.d.ts.map +1 -0
  48. package/dist-lib/lib/floriday-client.js +45 -0
  49. package/dist-lib/lib/floriday-payload.d.ts +152 -0
  50. package/dist-lib/lib/floriday-payload.d.ts.map +1 -0
  51. package/dist-lib/lib/floriday-payload.js +214 -0
  52. package/dist-lib/lib/utils.d.ts +3 -0
  53. package/dist-lib/lib/utils.d.ts.map +1 -0
  54. package/dist-lib/lib/utils.js +5 -0
  55. package/dist-lib/lib/validationSchemas.d.ts +15 -0
  56. package/dist-lib/lib/validationSchemas.d.ts.map +1 -0
  57. package/dist-lib/lib/validationSchemas.js +25 -0
  58. package/package.json +71 -0
@@ -0,0 +1,1112 @@
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_field_options: {
71
+ Row: {
72
+ created_at: string;
73
+ field_setting_id: string;
74
+ id: string;
75
+ label: string;
76
+ sort_order: number;
77
+ };
78
+ Insert: {
79
+ created_at?: string;
80
+ field_setting_id: string;
81
+ id?: string;
82
+ label: string;
83
+ sort_order?: number;
84
+ };
85
+ Update: {
86
+ created_at?: string;
87
+ field_setting_id?: string;
88
+ id?: string;
89
+ label?: string;
90
+ sort_order?: number;
91
+ };
92
+ Relationships: [
93
+ {
94
+ foreignKeyName: "customer_field_options_field_setting_id_fkey";
95
+ columns: ["field_setting_id"];
96
+ isOneToOne: false;
97
+ referencedRelation: "customer_field_settings";
98
+ referencedColumns: ["id"];
99
+ }
100
+ ];
101
+ };
102
+ customer_field_settings: {
103
+ Row: {
104
+ created_at: string;
105
+ field_key: string;
106
+ field_label: string;
107
+ field_type: string;
108
+ id: string;
109
+ is_custom: boolean;
110
+ sort_order: number;
111
+ updated_at: string;
112
+ };
113
+ Insert: {
114
+ created_at?: string;
115
+ field_key: string;
116
+ field_label: string;
117
+ field_type?: string;
118
+ id?: string;
119
+ is_custom?: boolean;
120
+ sort_order?: number;
121
+ updated_at?: string;
122
+ };
123
+ Update: {
124
+ created_at?: string;
125
+ field_key?: string;
126
+ field_label?: string;
127
+ field_type?: string;
128
+ id?: string;
129
+ is_custom?: boolean;
130
+ sort_order?: number;
131
+ updated_at?: string;
132
+ };
133
+ Relationships: [];
134
+ };
135
+ customers: {
136
+ Row: {
137
+ address: string | null;
138
+ city: string | null;
139
+ company_name: string;
140
+ country: string | null;
141
+ created_at: string;
142
+ custom_fields: Json;
143
+ email: string | null;
144
+ id: string;
145
+ notes: string | null;
146
+ phone: string | null;
147
+ postal_code: string | null;
148
+ updated_at: string;
149
+ };
150
+ Insert: {
151
+ address?: string | null;
152
+ city?: string | null;
153
+ company_name: string;
154
+ country?: string | null;
155
+ created_at?: string;
156
+ custom_fields?: Json;
157
+ email?: string | null;
158
+ id?: string;
159
+ notes?: string | null;
160
+ phone?: string | null;
161
+ postal_code?: string | null;
162
+ updated_at?: string;
163
+ };
164
+ Update: {
165
+ address?: string | null;
166
+ city?: string | null;
167
+ company_name?: string;
168
+ country?: string | null;
169
+ created_at?: string;
170
+ custom_fields?: Json;
171
+ email?: string | null;
172
+ id?: string;
173
+ notes?: string | null;
174
+ phone?: string | null;
175
+ postal_code?: string | null;
176
+ updated_at?: string;
177
+ };
178
+ Relationships: [];
179
+ };
180
+ floricode_connection_settings: {
181
+ Row: {
182
+ catalog_key: string | null;
183
+ catalog_url: string;
184
+ created_at: string;
185
+ id: number;
186
+ last_meta: Json | null;
187
+ last_test_at: string | null;
188
+ last_test_error: string | null;
189
+ last_test_ok: boolean | null;
190
+ updated_at: string;
191
+ };
192
+ Insert: {
193
+ catalog_key?: string | null;
194
+ catalog_url?: string;
195
+ created_at?: string;
196
+ id?: number;
197
+ last_meta?: Json | null;
198
+ last_test_at?: string | null;
199
+ last_test_error?: string | null;
200
+ last_test_ok?: boolean | null;
201
+ updated_at?: string;
202
+ };
203
+ Update: {
204
+ catalog_key?: string | null;
205
+ catalog_url?: string;
206
+ created_at?: string;
207
+ id?: number;
208
+ last_meta?: Json | null;
209
+ last_test_at?: string | null;
210
+ last_test_error?: string | null;
211
+ last_test_ok?: boolean | null;
212
+ updated_at?: string;
213
+ };
214
+ Relationships: [];
215
+ };
216
+ floricode_records: {
217
+ Row: {
218
+ change_date_time: string | null;
219
+ data: Json;
220
+ last_synced_at: string;
221
+ record_id: string;
222
+ resource: string;
223
+ };
224
+ Insert: {
225
+ change_date_time?: string | null;
226
+ data?: Json;
227
+ last_synced_at?: string;
228
+ record_id: string;
229
+ resource: string;
230
+ };
231
+ Update: {
232
+ change_date_time?: string | null;
233
+ data?: Json;
234
+ last_synced_at?: string;
235
+ record_id?: string;
236
+ resource?: string;
237
+ };
238
+ Relationships: [];
239
+ };
240
+ floricode_sync_state: {
241
+ Row: {
242
+ error_message: string | null;
243
+ last_change_date_time: string | null;
244
+ last_sequence_number: number;
245
+ last_sync_at: string | null;
246
+ resource: string;
247
+ status: string;
248
+ updated_at: string;
249
+ };
250
+ Insert: {
251
+ error_message?: string | null;
252
+ last_change_date_time?: string | null;
253
+ last_sequence_number?: number;
254
+ last_sync_at?: string | null;
255
+ resource: string;
256
+ status?: string;
257
+ updated_at?: string;
258
+ };
259
+ Update: {
260
+ error_message?: string | null;
261
+ last_change_date_time?: string | null;
262
+ last_sequence_number?: number;
263
+ last_sync_at?: string | null;
264
+ resource?: string;
265
+ status?: string;
266
+ updated_at?: string;
267
+ };
268
+ Relationships: [];
269
+ };
270
+ floriday_connections: {
271
+ Row: {
272
+ access_token: string | null;
273
+ api_key: string;
274
+ client_id: string;
275
+ client_secret: string;
276
+ created_at: string;
277
+ environment: string;
278
+ gln_code: string | null;
279
+ id: string;
280
+ is_active: boolean;
281
+ label: string;
282
+ organization_name: string | null;
283
+ preferred_warehouse_id: string | null;
284
+ preferred_warehouse_name: string | null;
285
+ token_expires_at: string | null;
286
+ updated_at: string;
287
+ };
288
+ Insert: {
289
+ access_token?: string | null;
290
+ api_key: string;
291
+ client_id: string;
292
+ client_secret: string;
293
+ created_at?: string;
294
+ environment: string;
295
+ gln_code?: string | null;
296
+ id?: string;
297
+ is_active?: boolean;
298
+ label?: string;
299
+ organization_name?: string | null;
300
+ preferred_warehouse_id?: string | null;
301
+ preferred_warehouse_name?: string | null;
302
+ token_expires_at?: string | null;
303
+ updated_at?: string;
304
+ };
305
+ Update: {
306
+ access_token?: string | null;
307
+ api_key?: string;
308
+ client_id?: string;
309
+ client_secret?: string;
310
+ created_at?: string;
311
+ environment?: string;
312
+ gln_code?: string | null;
313
+ id?: string;
314
+ is_active?: boolean;
315
+ label?: string;
316
+ organization_name?: string | null;
317
+ preferred_warehouse_id?: string | null;
318
+ preferred_warehouse_name?: string | null;
319
+ token_expires_at?: string | null;
320
+ updated_at?: string;
321
+ };
322
+ Relationships: [];
323
+ };
324
+ floriday_settings: {
325
+ Row: {
326
+ active_environment: string;
327
+ id: number;
328
+ updated_at: string;
329
+ };
330
+ Insert: {
331
+ active_environment?: string;
332
+ id?: number;
333
+ updated_at?: string;
334
+ };
335
+ Update: {
336
+ active_environment?: string;
337
+ id?: number;
338
+ updated_at?: string;
339
+ };
340
+ Relationships: [];
341
+ };
342
+ inventory_settings: {
343
+ Row: {
344
+ created_at: string;
345
+ hierarchy_levels: string[];
346
+ id: string;
347
+ updated_at: string;
348
+ visible_columns: string[];
349
+ };
350
+ Insert: {
351
+ created_at?: string;
352
+ hierarchy_levels?: string[];
353
+ id?: string;
354
+ updated_at?: string;
355
+ visible_columns?: string[];
356
+ };
357
+ Update: {
358
+ created_at?: string;
359
+ hierarchy_levels?: string[];
360
+ id?: string;
361
+ updated_at?: string;
362
+ visible_columns?: string[];
363
+ };
364
+ Relationships: [];
365
+ };
366
+ locations: {
367
+ Row: {
368
+ created_at: string;
369
+ id: string;
370
+ name: string;
371
+ sort_order: number;
372
+ updated_at: string;
373
+ };
374
+ Insert: {
375
+ created_at?: string;
376
+ id?: string;
377
+ name: string;
378
+ sort_order?: number;
379
+ updated_at?: string;
380
+ };
381
+ Update: {
382
+ created_at?: string;
383
+ id?: string;
384
+ name?: string;
385
+ sort_order?: number;
386
+ updated_at?: string;
387
+ };
388
+ Relationships: [];
389
+ };
390
+ notifications: {
391
+ Row: {
392
+ created_at: string;
393
+ id: string;
394
+ message: string | null;
395
+ read: boolean;
396
+ title: string;
397
+ updated_at: string;
398
+ user_id: string;
399
+ };
400
+ Insert: {
401
+ created_at?: string;
402
+ id?: string;
403
+ message?: string | null;
404
+ read?: boolean;
405
+ title: string;
406
+ updated_at?: string;
407
+ user_id: string;
408
+ };
409
+ Update: {
410
+ created_at?: string;
411
+ id?: string;
412
+ message?: string | null;
413
+ read?: boolean;
414
+ title?: string;
415
+ updated_at?: string;
416
+ user_id?: string;
417
+ };
418
+ Relationships: [];
419
+ };
420
+ order_field_options: {
421
+ Row: {
422
+ created_at: string;
423
+ field_setting_id: string;
424
+ id: string;
425
+ label: string;
426
+ sort_order: number;
427
+ };
428
+ Insert: {
429
+ created_at?: string;
430
+ field_setting_id: string;
431
+ id?: string;
432
+ label: string;
433
+ sort_order?: number;
434
+ };
435
+ Update: {
436
+ created_at?: string;
437
+ field_setting_id?: string;
438
+ id?: string;
439
+ label?: string;
440
+ sort_order?: number;
441
+ };
442
+ Relationships: [
443
+ {
444
+ foreignKeyName: "order_field_options_field_setting_id_fkey";
445
+ columns: ["field_setting_id"];
446
+ isOneToOne: false;
447
+ referencedRelation: "order_field_settings";
448
+ referencedColumns: ["id"];
449
+ }
450
+ ];
451
+ };
452
+ order_field_settings: {
453
+ Row: {
454
+ active: boolean;
455
+ created_at: string;
456
+ field_key: string;
457
+ field_label: string;
458
+ field_type: string;
459
+ id: string;
460
+ is_custom: boolean;
461
+ sort_order: number;
462
+ updated_at: string;
463
+ };
464
+ Insert: {
465
+ active?: boolean;
466
+ created_at?: string;
467
+ field_key: string;
468
+ field_label: string;
469
+ field_type?: string;
470
+ id?: string;
471
+ is_custom?: boolean;
472
+ sort_order?: number;
473
+ updated_at?: string;
474
+ };
475
+ Update: {
476
+ active?: boolean;
477
+ created_at?: string;
478
+ field_key?: string;
479
+ field_label?: string;
480
+ field_type?: string;
481
+ id?: string;
482
+ is_custom?: boolean;
483
+ sort_order?: number;
484
+ updated_at?: string;
485
+ };
486
+ Relationships: [];
487
+ };
488
+ order_items: {
489
+ Row: {
490
+ created_at: string;
491
+ id: string;
492
+ order_id: string;
493
+ product_id: string | null;
494
+ product_name: string;
495
+ quantity: number;
496
+ unit: string;
497
+ unit_price: number | null;
498
+ };
499
+ Insert: {
500
+ created_at?: string;
501
+ id?: string;
502
+ order_id: string;
503
+ product_id?: string | null;
504
+ product_name: string;
505
+ quantity?: number;
506
+ unit?: string;
507
+ unit_price?: number | null;
508
+ };
509
+ Update: {
510
+ created_at?: string;
511
+ id?: string;
512
+ order_id?: string;
513
+ product_id?: string | null;
514
+ product_name?: string;
515
+ quantity?: number;
516
+ unit?: string;
517
+ unit_price?: number | null;
518
+ };
519
+ Relationships: [
520
+ {
521
+ foreignKeyName: "order_items_order_id_fkey";
522
+ columns: ["order_id"];
523
+ isOneToOne: false;
524
+ referencedRelation: "orders";
525
+ referencedColumns: ["id"];
526
+ },
527
+ {
528
+ foreignKeyName: "order_items_product_id_fkey";
529
+ columns: ["product_id"];
530
+ isOneToOne: false;
531
+ referencedRelation: "products";
532
+ referencedColumns: ["id"];
533
+ }
534
+ ];
535
+ };
536
+ orders: {
537
+ Row: {
538
+ created_at: string;
539
+ custom_fields: Json;
540
+ customer_id: string | null;
541
+ customer_name: string;
542
+ deleted_at: string | null;
543
+ delivery_date: string;
544
+ id: string;
545
+ notes: string | null;
546
+ order_date: string;
547
+ order_number: string;
548
+ status: string;
549
+ total: string;
550
+ updated_at: string;
551
+ };
552
+ Insert: {
553
+ created_at?: string;
554
+ custom_fields?: Json;
555
+ customer_id?: string | null;
556
+ customer_name?: string;
557
+ deleted_at?: string | null;
558
+ delivery_date: string;
559
+ id?: string;
560
+ notes?: string | null;
561
+ order_date?: string;
562
+ order_number: string;
563
+ status?: string;
564
+ total?: string;
565
+ updated_at?: string;
566
+ };
567
+ Update: {
568
+ created_at?: string;
569
+ custom_fields?: Json;
570
+ customer_id?: string | null;
571
+ customer_name?: string;
572
+ deleted_at?: string | null;
573
+ delivery_date?: string;
574
+ id?: string;
575
+ notes?: string | null;
576
+ order_date?: string;
577
+ order_number?: string;
578
+ status?: string;
579
+ total?: string;
580
+ updated_at?: string;
581
+ };
582
+ Relationships: [
583
+ {
584
+ foreignKeyName: "orders_customer_id_fkey";
585
+ columns: ["customer_id"];
586
+ isOneToOne: false;
587
+ referencedRelation: "customers";
588
+ referencedColumns: ["id"];
589
+ }
590
+ ];
591
+ };
592
+ product_categories: {
593
+ Row: {
594
+ color: string;
595
+ created_at: string;
596
+ icon: string | null;
597
+ id: string;
598
+ name: string;
599
+ slug: string;
600
+ sort_order: number;
601
+ updated_at: string;
602
+ };
603
+ Insert: {
604
+ color?: string;
605
+ created_at?: string;
606
+ icon?: string | null;
607
+ id?: string;
608
+ name: string;
609
+ slug: string;
610
+ sort_order?: number;
611
+ updated_at?: string;
612
+ };
613
+ Update: {
614
+ color?: string;
615
+ created_at?: string;
616
+ icon?: string | null;
617
+ id?: string;
618
+ name?: string;
619
+ slug?: string;
620
+ sort_order?: number;
621
+ updated_at?: string;
622
+ };
623
+ Relationships: [];
624
+ };
625
+ product_field_options: {
626
+ Row: {
627
+ created_at: string;
628
+ field_setting_id: string;
629
+ id: string;
630
+ label: string;
631
+ sort_order: number;
632
+ };
633
+ Insert: {
634
+ created_at?: string;
635
+ field_setting_id: string;
636
+ id?: string;
637
+ label: string;
638
+ sort_order?: number;
639
+ };
640
+ Update: {
641
+ created_at?: string;
642
+ field_setting_id?: string;
643
+ id?: string;
644
+ label?: string;
645
+ sort_order?: number;
646
+ };
647
+ Relationships: [
648
+ {
649
+ foreignKeyName: "product_field_options_field_setting_id_fkey";
650
+ columns: ["field_setting_id"];
651
+ isOneToOne: false;
652
+ referencedRelation: "product_field_settings";
653
+ referencedColumns: ["id"];
654
+ }
655
+ ];
656
+ };
657
+ product_field_settings: {
658
+ Row: {
659
+ active_per_category: Json;
660
+ created_at: string;
661
+ field_key: string;
662
+ field_label: string;
663
+ field_type: string;
664
+ id: string;
665
+ is_custom: boolean;
666
+ sort_order: number;
667
+ updated_at: string;
668
+ };
669
+ Insert: {
670
+ active_per_category?: Json;
671
+ created_at?: string;
672
+ field_key: string;
673
+ field_label: string;
674
+ field_type?: string;
675
+ id?: string;
676
+ is_custom?: boolean;
677
+ sort_order?: number;
678
+ updated_at?: string;
679
+ };
680
+ Update: {
681
+ active_per_category?: Json;
682
+ created_at?: string;
683
+ field_key?: string;
684
+ field_label?: string;
685
+ field_type?: string;
686
+ id?: string;
687
+ is_custom?: boolean;
688
+ sort_order?: number;
689
+ updated_at?: string;
690
+ };
691
+ Relationships: [];
692
+ };
693
+ products: {
694
+ Row: {
695
+ barcode: string | null;
696
+ batch: string;
697
+ created_at: string;
698
+ custom_fields: Json;
699
+ id: string;
700
+ image_url: string | null;
701
+ incoming_quantity: number;
702
+ location: string;
703
+ min_quantity: number;
704
+ product: string;
705
+ product_type: string;
706
+ purchase_price: number | null;
707
+ quantity: number;
708
+ sale_price: number | null;
709
+ unit: string;
710
+ updated_at: string;
711
+ weight: string | null;
712
+ };
713
+ Insert: {
714
+ barcode?: string | null;
715
+ batch: string;
716
+ created_at?: string;
717
+ custom_fields?: Json;
718
+ id?: string;
719
+ image_url?: string | null;
720
+ incoming_quantity?: number;
721
+ location: string;
722
+ min_quantity?: number;
723
+ product: string;
724
+ product_type?: string;
725
+ purchase_price?: number | null;
726
+ quantity?: number;
727
+ sale_price?: number | null;
728
+ unit?: string;
729
+ updated_at?: string;
730
+ weight?: string | null;
731
+ };
732
+ Update: {
733
+ barcode?: string | null;
734
+ batch?: string;
735
+ created_at?: string;
736
+ custom_fields?: Json;
737
+ id?: string;
738
+ image_url?: string | null;
739
+ incoming_quantity?: number;
740
+ location?: string;
741
+ min_quantity?: number;
742
+ product?: string;
743
+ product_type?: string;
744
+ purchase_price?: number | null;
745
+ quantity?: number;
746
+ sale_price?: number | null;
747
+ unit?: string;
748
+ updated_at?: string;
749
+ weight?: string | null;
750
+ };
751
+ Relationships: [];
752
+ };
753
+ profiles: {
754
+ Row: {
755
+ created_at: string;
756
+ display_name: string | null;
757
+ email: string | null;
758
+ id: string;
759
+ notification_preferences: Json;
760
+ updated_at: string;
761
+ };
762
+ Insert: {
763
+ created_at?: string;
764
+ display_name?: string | null;
765
+ email?: string | null;
766
+ id: string;
767
+ notification_preferences?: Json;
768
+ updated_at?: string;
769
+ };
770
+ Update: {
771
+ created_at?: string;
772
+ display_name?: string | null;
773
+ email?: string | null;
774
+ id?: string;
775
+ notification_preferences?: Json;
776
+ updated_at?: string;
777
+ };
778
+ Relationships: [];
779
+ };
780
+ purchase_order_items: {
781
+ Row: {
782
+ created_at: string;
783
+ id: string;
784
+ product_id: string | null;
785
+ product_type: string;
786
+ purchase_order_id: string;
787
+ quantity: number;
788
+ };
789
+ Insert: {
790
+ created_at?: string;
791
+ id?: string;
792
+ product_id?: string | null;
793
+ product_type?: string;
794
+ purchase_order_id: string;
795
+ quantity?: number;
796
+ };
797
+ Update: {
798
+ created_at?: string;
799
+ id?: string;
800
+ product_id?: string | null;
801
+ product_type?: string;
802
+ purchase_order_id?: string;
803
+ quantity?: number;
804
+ };
805
+ Relationships: [
806
+ {
807
+ foreignKeyName: "purchase_order_items_product_id_fkey";
808
+ columns: ["product_id"];
809
+ isOneToOne: false;
810
+ referencedRelation: "products";
811
+ referencedColumns: ["id"];
812
+ },
813
+ {
814
+ foreignKeyName: "purchase_order_items_purchase_order_id_fkey";
815
+ columns: ["purchase_order_id"];
816
+ isOneToOne: false;
817
+ referencedRelation: "purchase_orders";
818
+ referencedColumns: ["id"];
819
+ }
820
+ ];
821
+ };
822
+ purchase_orders: {
823
+ Row: {
824
+ created_at: string;
825
+ expected_delivery_date: string;
826
+ id: string;
827
+ location_id: string | null;
828
+ notes: string | null;
829
+ order_number: string;
830
+ status: string;
831
+ supplier_id: string | null;
832
+ supplier_name: string;
833
+ updated_at: string;
834
+ };
835
+ Insert: {
836
+ created_at?: string;
837
+ expected_delivery_date: string;
838
+ id?: string;
839
+ location_id?: string | null;
840
+ notes?: string | null;
841
+ order_number: string;
842
+ status?: string;
843
+ supplier_id?: string | null;
844
+ supplier_name?: string;
845
+ updated_at?: string;
846
+ };
847
+ Update: {
848
+ created_at?: string;
849
+ expected_delivery_date?: string;
850
+ id?: string;
851
+ location_id?: string | null;
852
+ notes?: string | null;
853
+ order_number?: string;
854
+ status?: string;
855
+ supplier_id?: string | null;
856
+ supplier_name?: string;
857
+ updated_at?: string;
858
+ };
859
+ Relationships: [
860
+ {
861
+ foreignKeyName: "purchase_orders_location_id_fkey";
862
+ columns: ["location_id"];
863
+ isOneToOne: false;
864
+ referencedRelation: "locations";
865
+ referencedColumns: ["id"];
866
+ },
867
+ {
868
+ foreignKeyName: "purchase_orders_supplier_id_fkey";
869
+ columns: ["supplier_id"];
870
+ isOneToOne: false;
871
+ referencedRelation: "suppliers";
872
+ referencedColumns: ["id"];
873
+ }
874
+ ];
875
+ };
876
+ supplier_products: {
877
+ Row: {
878
+ article_number: string | null;
879
+ created_at: string;
880
+ id: string;
881
+ name: string;
882
+ notes: string | null;
883
+ pot_size: string | null;
884
+ price: number | null;
885
+ quantity: number | null;
886
+ supplier_id: string;
887
+ unit: string;
888
+ updated_at: string;
889
+ };
890
+ Insert: {
891
+ article_number?: string | null;
892
+ created_at?: string;
893
+ id?: string;
894
+ name: string;
895
+ notes?: string | null;
896
+ pot_size?: string | null;
897
+ price?: number | null;
898
+ quantity?: number | null;
899
+ supplier_id: string;
900
+ unit?: string;
901
+ updated_at?: string;
902
+ };
903
+ Update: {
904
+ article_number?: string | null;
905
+ created_at?: string;
906
+ id?: string;
907
+ name?: string;
908
+ notes?: string | null;
909
+ pot_size?: string | null;
910
+ price?: number | null;
911
+ quantity?: number | null;
912
+ supplier_id?: string;
913
+ unit?: string;
914
+ updated_at?: string;
915
+ };
916
+ Relationships: [
917
+ {
918
+ foreignKeyName: "supplier_products_supplier_id_fkey";
919
+ columns: ["supplier_id"];
920
+ isOneToOne: false;
921
+ referencedRelation: "suppliers";
922
+ referencedColumns: ["id"];
923
+ }
924
+ ];
925
+ };
926
+ suppliers: {
927
+ Row: {
928
+ address: string | null;
929
+ column_mappings: Json | null;
930
+ contact_person: string | null;
931
+ created_at: string;
932
+ default_product_type: string;
933
+ email: string | null;
934
+ id: string;
935
+ imported_file_name: string | null;
936
+ name: string;
937
+ notes: string | null;
938
+ phone: string | null;
939
+ updated_at: string;
940
+ };
941
+ Insert: {
942
+ address?: string | null;
943
+ column_mappings?: Json | null;
944
+ contact_person?: string | null;
945
+ created_at?: string;
946
+ default_product_type?: string;
947
+ email?: string | null;
948
+ id?: string;
949
+ imported_file_name?: string | null;
950
+ name: string;
951
+ notes?: string | null;
952
+ phone?: string | null;
953
+ updated_at?: string;
954
+ };
955
+ Update: {
956
+ address?: string | null;
957
+ column_mappings?: Json | null;
958
+ contact_person?: string | null;
959
+ created_at?: string;
960
+ default_product_type?: string;
961
+ email?: string | null;
962
+ id?: string;
963
+ imported_file_name?: string | null;
964
+ name?: string;
965
+ notes?: string | null;
966
+ phone?: string | null;
967
+ updated_at?: string;
968
+ };
969
+ Relationships: [];
970
+ };
971
+ trade_item_drafts: {
972
+ Row: {
973
+ connection_id: string | null;
974
+ created_at: string;
975
+ data: Json;
976
+ id: string;
977
+ updated_at: string;
978
+ user_id: string;
979
+ };
980
+ Insert: {
981
+ connection_id?: string | null;
982
+ created_at?: string;
983
+ data?: Json;
984
+ id?: string;
985
+ updated_at?: string;
986
+ user_id: string;
987
+ };
988
+ Update: {
989
+ connection_id?: string | null;
990
+ created_at?: string;
991
+ data?: Json;
992
+ id?: string;
993
+ updated_at?: string;
994
+ user_id?: string;
995
+ };
996
+ Relationships: [];
997
+ };
998
+ user_roles: {
999
+ Row: {
1000
+ created_at: string;
1001
+ id: string;
1002
+ role: Database["public"]["Enums"]["app_role"];
1003
+ user_id: string;
1004
+ };
1005
+ Insert: {
1006
+ created_at?: string;
1007
+ id?: string;
1008
+ role: Database["public"]["Enums"]["app_role"];
1009
+ user_id: string;
1010
+ };
1011
+ Update: {
1012
+ created_at?: string;
1013
+ id?: string;
1014
+ role?: Database["public"]["Enums"]["app_role"];
1015
+ user_id?: string;
1016
+ };
1017
+ Relationships: [
1018
+ {
1019
+ foreignKeyName: "user_roles_user_id_fkey";
1020
+ columns: ["user_id"];
1021
+ isOneToOne: false;
1022
+ referencedRelation: "profiles";
1023
+ referencedColumns: ["id"];
1024
+ }
1025
+ ];
1026
+ };
1027
+ };
1028
+ Views: {
1029
+ [_ in never]: never;
1030
+ };
1031
+ Functions: {
1032
+ has_role: {
1033
+ Args: {
1034
+ _role: Database["public"]["Enums"]["app_role"];
1035
+ _user_id: string;
1036
+ };
1037
+ Returns: boolean;
1038
+ };
1039
+ schedule_floriday_token_refresh: {
1040
+ Args: {
1041
+ p_apikey: string;
1042
+ p_url: string;
1043
+ };
1044
+ Returns: number;
1045
+ };
1046
+ };
1047
+ Enums: {
1048
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
1049
+ };
1050
+ CompositeTypes: {
1051
+ [_ in never]: never;
1052
+ };
1053
+ };
1054
+ };
1055
+ type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
1056
+ type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">];
1057
+ export type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
1058
+ schema: keyof DatabaseWithoutInternals;
1059
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
1060
+ schema: keyof DatabaseWithoutInternals;
1061
+ } ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
1062
+ schema: keyof DatabaseWithoutInternals;
1063
+ } ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
1064
+ Row: infer R;
1065
+ } ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
1066
+ Row: infer R;
1067
+ } ? R : never : never;
1068
+ export type TablesInsert<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
1069
+ schema: keyof DatabaseWithoutInternals;
1070
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
1071
+ schema: keyof DatabaseWithoutInternals;
1072
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
1073
+ schema: keyof DatabaseWithoutInternals;
1074
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1075
+ Insert: infer I;
1076
+ } ? I : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
1077
+ Insert: infer I;
1078
+ } ? I : never : never;
1079
+ export type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
1080
+ schema: keyof DatabaseWithoutInternals;
1081
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
1082
+ schema: keyof DatabaseWithoutInternals;
1083
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
1084
+ schema: keyof DatabaseWithoutInternals;
1085
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1086
+ Update: infer U;
1087
+ } ? U : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
1088
+ Update: infer U;
1089
+ } ? U : never : never;
1090
+ export type Enums<DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] | {
1091
+ schema: keyof DatabaseWithoutInternals;
1092
+ }, EnumName extends DefaultSchemaEnumNameOrOptions extends {
1093
+ schema: keyof DatabaseWithoutInternals;
1094
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
1095
+ schema: keyof DatabaseWithoutInternals;
1096
+ } ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
1097
+ export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] | {
1098
+ schema: keyof DatabaseWithoutInternals;
1099
+ }, CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
1100
+ schema: keyof DatabaseWithoutInternals;
1101
+ } ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
1102
+ schema: keyof DatabaseWithoutInternals;
1103
+ } ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
1104
+ export declare const Constants: {
1105
+ readonly public: {
1106
+ readonly Enums: {
1107
+ readonly app_role: readonly ["admin", "manager", "warehouse", "sales", "developer"];
1108
+ };
1109
+ };
1110
+ };
1111
+ export {};
1112
+ //# sourceMappingURL=types.d.ts.map