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