@flowselections/core 1.0.7 → 1.0.9

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 (131) hide show
  1. package/dist/auth/useAuth.d.ts +27 -27
  2. package/dist/auth/useAuth.js +72 -72
  3. package/dist/components/instellingen/NotificationSettingsCard.d.ts +1 -1
  4. package/dist/components/instellingen/NotificationSettingsCard.js +63 -63
  5. package/dist/components/layout/BugsDialog.d.ts +6 -6
  6. package/dist/components/layout/BugsDialog.js +148 -148
  7. package/dist/components/layout/Header.d.ts +5 -5
  8. package/dist/components/layout/Header.js +30 -30
  9. package/dist/components/layout/InstellingenPage.d.ts +4 -4
  10. package/dist/components/layout/InstellingenPage.js +78 -78
  11. package/dist/components/layout/LoginPage.d.ts +5 -5
  12. package/dist/components/layout/LoginPage.js +57 -57
  13. package/dist/components/layout/NotificationBell.d.ts +1 -1
  14. package/dist/components/layout/NotificationBell.js +45 -45
  15. package/dist/components/layout/ResetWachtwoordPage.d.ts +5 -5
  16. package/dist/components/layout/ResetWachtwoordPage.js +51 -51
  17. package/dist/components/layout/Sidebar.d.ts +8 -8
  18. package/dist/components/layout/Sidebar.js +29 -31
  19. package/dist/components/ui/accordion.d.ts +7 -7
  20. package/dist/components/ui/accordion.js +13 -13
  21. package/dist/components/ui/alert-dialog.d.ts +20 -20
  22. package/dist/components/ui/alert-dialog.js +26 -26
  23. package/dist/components/ui/alert.d.ts +8 -8
  24. package/dist/components/ui/alert.js +22 -22
  25. package/dist/components/ui/aspect-ratio.d.ts +3 -3
  26. package/dist/components/ui/aspect-ratio.js +3 -3
  27. package/dist/components/ui/avatar.d.ts +6 -6
  28. package/dist/components/ui/avatar.js +12 -12
  29. package/dist/components/ui/badge.d.ts +9 -9
  30. package/dist/components/ui/badge.js +20 -20
  31. package/dist/components/ui/breadcrumb.d.ts +19 -19
  32. package/dist/components/ui/breadcrumb.js +23 -23
  33. package/dist/components/ui/button.d.ts +11 -11
  34. package/dist/components/ui/button.js +33 -33
  35. package/dist/components/ui/calendar.d.ts +8 -8
  36. package/dist/components/ui/calendar.js +74 -74
  37. package/dist/components/ui/card.d.ts +8 -8
  38. package/dist/components/ui/card.js +16 -16
  39. package/dist/components/ui/carousel.d.ts +18 -18
  40. package/dist/components/ui/carousel.js +98 -98
  41. package/dist/components/ui/chart.d.ts +62 -62
  42. package/dist/components/ui/chart.js +130 -130
  43. package/dist/components/ui/checkbox.d.ts +4 -4
  44. package/dist/components/ui/checkbox.js +8 -8
  45. package/dist/components/ui/collapsible.d.ts +5 -5
  46. package/dist/components/ui/collapsible.js +6 -6
  47. package/dist/components/ui/command.d.ts +80 -80
  48. package/dist/components/ui/command.js +29 -29
  49. package/dist/components/ui/context-menu.d.ts +27 -27
  50. package/dist/components/ui/context-menu.js +33 -33
  51. package/dist/components/ui/dialog.d.ts +19 -19
  52. package/dist/components/ui/dialog.js +23 -23
  53. package/dist/components/ui/drawer.d.ts +22 -22
  54. package/dist/components/ui/drawer.js +22 -22
  55. package/dist/components/ui/dropdown-menu.d.ts +27 -27
  56. package/dist/components/ui/dropdown-menu.js +36 -36
  57. package/dist/components/ui/form.d.ts +23 -23
  58. package/dist/components/ui/form.js +65 -65
  59. package/dist/components/ui/hover-card.d.ts +6 -6
  60. package/dist/components/ui/hover-card.js +9 -9
  61. package/dist/components/ui/icon-picker.d.ts +14 -14
  62. package/dist/components/ui/icon-picker.js +73 -73
  63. package/dist/components/ui/input-otp.d.ts +34 -34
  64. package/dist/components/ui/input-otp.js +18 -18
  65. package/dist/components/ui/input.d.ts +3 -3
  66. package/dist/components/ui/input.js +8 -8
  67. package/dist/components/ui/label.d.ts +5 -5
  68. package/dist/components/ui/label.js +10 -10
  69. package/dist/components/ui/menubar.d.ts +28 -28
  70. package/dist/components/ui/menubar.js +45 -45
  71. package/dist/components/ui/navigation-menu.d.ts +12 -12
  72. package/dist/components/ui/navigation-menu.js +24 -24
  73. package/dist/components/ui/pagination.d.ts +28 -28
  74. package/dist/components/ui/pagination.js +23 -23
  75. package/dist/components/ui/popover.d.ts +7 -7
  76. package/dist/components/ui/popover.js +10 -10
  77. package/dist/components/ui/progress.d.ts +4 -4
  78. package/dist/components/ui/progress.js +8 -8
  79. package/dist/components/ui/radio-group.d.ts +5 -5
  80. package/dist/components/ui/radio-group.js +14 -14
  81. package/dist/components/ui/resizable.d.ts +7 -7
  82. package/dist/components/ui/resizable.js +8 -8
  83. package/dist/components/ui/scroll-area.d.ts +5 -5
  84. package/dist/components/ui/scroll-area.js +11 -11
  85. package/dist/components/ui/select.d.ts +13 -13
  86. package/dist/components/ui/select.js +27 -27
  87. package/dist/components/ui/separator.d.ts +4 -4
  88. package/dist/components/ui/separator.js +7 -7
  89. package/dist/components/ui/sheet.d.ts +25 -25
  90. package/dist/components/ui/sheet.js +37 -37
  91. package/dist/components/ui/sidebar.d.ts +65 -65
  92. package/dist/components/ui/sidebar.js +224 -224
  93. package/dist/components/ui/skeleton.d.ts +2 -2
  94. package/dist/components/ui/skeleton.js +6 -6
  95. package/dist/components/ui/slider.d.ts +4 -4
  96. package/dist/components/ui/slider.js +7 -7
  97. package/dist/components/ui/sonner.d.ts +4 -4
  98. package/dist/components/ui/sonner.js +13 -13
  99. package/dist/components/ui/switch.d.ts +4 -4
  100. package/dist/components/ui/switch.js +7 -7
  101. package/dist/components/ui/table.d.ts +10 -10
  102. package/dist/components/ui/table.js +20 -20
  103. package/dist/components/ui/tabs.d.ts +7 -7
  104. package/dist/components/ui/tabs.js +12 -12
  105. package/dist/components/ui/textarea.d.ts +3 -3
  106. package/dist/components/ui/textarea.js +8 -8
  107. package/dist/components/ui/toggle-group.d.ts +12 -12
  108. package/dist/components/ui/toggle-group.js +21 -21
  109. package/dist/components/ui/toggle.d.ts +12 -12
  110. package/dist/components/ui/toggle.js +25 -25
  111. package/dist/components/ui/tooltip.d.ts +7 -7
  112. package/dist/components/ui/tooltip.js +11 -11
  113. package/dist/hooks/use-mobile.d.ts +1 -1
  114. package/dist/hooks/use-mobile.js +15 -15
  115. package/dist/index.d.ts +31 -31
  116. package/dist/index.js +33 -33
  117. package/dist/lib/utils.d.ts +2 -2
  118. package/dist/lib/utils.js +5 -5
  119. package/dist/lib/validationSchemas.d.ts +14 -14
  120. package/dist/lib/validationSchemas.js +25 -25
  121. package/dist/supabase/auth-middleware.d.ts +638 -638
  122. package/dist/supabase/auth-middleware.js +52 -52
  123. package/dist/supabase/client.d.ts +634 -634
  124. package/dist/supabase/client.js +13 -13
  125. package/dist/supabase/client.server.d.ts +634 -634
  126. package/dist/supabase/client.server.js +30 -30
  127. package/dist/supabase/types.d.ts +716 -716
  128. package/dist/supabase/types.js +7 -7
  129. package/dist/types/module.d.ts +19 -19
  130. package/dist/types/module.js +1 -1
  131. package/package.json +1 -1
@@ -1,639 +1,639 @@
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
- customer_field_options: {
42
- Row: {
43
- created_at: string;
44
- field_setting_id: string;
45
- id: string;
46
- label: string;
47
- sort_order: number;
48
- };
49
- Insert: {
50
- created_at?: string;
51
- field_setting_id: string;
52
- id?: string;
53
- label: string;
54
- sort_order?: number;
55
- };
56
- Update: {
57
- created_at?: string;
58
- field_setting_id?: string;
59
- id?: string;
60
- label?: string;
61
- sort_order?: number;
62
- };
63
- Relationships: [{
64
- foreignKeyName: "customer_field_options_field_setting_id_fkey";
65
- columns: ["field_setting_id"];
66
- isOneToOne: false;
67
- referencedRelation: "customer_field_settings";
68
- referencedColumns: ["id"];
69
- }];
70
- };
71
- customer_field_settings: {
72
- Row: {
73
- created_at: string;
74
- field_key: string;
75
- field_label: string;
76
- field_type: string;
77
- id: string;
78
- is_custom: boolean;
79
- sort_order: number;
80
- updated_at: string;
81
- };
82
- Insert: {
83
- created_at?: string;
84
- field_key: string;
85
- field_label: string;
86
- field_type?: string;
87
- id?: string;
88
- is_custom?: boolean;
89
- sort_order?: number;
90
- updated_at?: string;
91
- };
92
- Update: {
93
- created_at?: string;
94
- field_key?: string;
95
- field_label?: string;
96
- field_type?: string;
97
- id?: string;
98
- is_custom?: boolean;
99
- sort_order?: number;
100
- updated_at?: string;
101
- };
102
- Relationships: [];
103
- };
104
- customers: {
105
- Row: {
106
- address: string | null;
107
- city: string | null;
108
- company_name: string;
109
- contact_person: string | null;
110
- country: string | null;
111
- created_at: string;
112
- custom_fields: import("./types").Json;
113
- email: string | null;
114
- id: string;
115
- notes: string | null;
116
- phone: string | null;
117
- postal_code: string | null;
118
- updated_at: string;
119
- };
120
- Insert: {
121
- address?: string | null;
122
- city?: string | null;
123
- company_name: string;
124
- contact_person?: string | null;
125
- country?: string | null;
126
- created_at?: string;
127
- custom_fields?: import("./types").Json;
128
- email?: string | null;
129
- id?: string;
130
- notes?: string | null;
131
- phone?: string | null;
132
- postal_code?: string | null;
133
- updated_at?: string;
134
- };
135
- Update: {
136
- address?: string | null;
137
- city?: string | null;
138
- company_name?: string;
139
- contact_person?: string | null;
140
- country?: string | null;
141
- created_at?: string;
142
- custom_fields?: import("./types").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
- Relationships: [];
151
- };
152
- inventory_settings: {
153
- Row: {
154
- created_at: string;
155
- hierarchy_levels: string[];
156
- id: string;
157
- updated_at: string;
158
- visible_columns: string[];
159
- };
160
- Insert: {
161
- created_at?: string;
162
- hierarchy_levels?: string[];
163
- id?: string;
164
- updated_at?: string;
165
- visible_columns?: string[];
166
- };
167
- Update: {
168
- created_at?: string;
169
- hierarchy_levels?: string[];
170
- id?: string;
171
- updated_at?: string;
172
- visible_columns?: string[];
173
- };
174
- Relationships: [];
175
- };
176
- locations: {
177
- Row: {
178
- created_at: string;
179
- id: string;
180
- name: string;
181
- sort_order: number;
182
- updated_at: string;
183
- };
184
- Insert: {
185
- created_at?: string;
186
- id?: string;
187
- name: string;
188
- sort_order?: number;
189
- updated_at?: string;
190
- };
191
- Update: {
192
- created_at?: string;
193
- id?: string;
194
- name?: string;
195
- sort_order?: number;
196
- updated_at?: string;
197
- };
198
- Relationships: [];
199
- };
200
- notifications: {
201
- Row: {
202
- created_at: string;
203
- id: string;
204
- message: string | null;
205
- read: boolean;
206
- title: string;
207
- updated_at: string;
208
- user_id: string;
209
- };
210
- Insert: {
211
- created_at?: string;
212
- id?: string;
213
- message?: string | null;
214
- read?: boolean;
215
- title: string;
216
- updated_at?: string;
217
- user_id: string;
218
- };
219
- Update: {
220
- created_at?: string;
221
- id?: string;
222
- message?: string | null;
223
- read?: boolean;
224
- title?: string;
225
- updated_at?: string;
226
- user_id?: string;
227
- };
228
- Relationships: [];
229
- };
230
- product_categories: {
231
- Row: {
232
- color: string;
233
- created_at: string;
234
- icon: string | null;
235
- id: string;
236
- name: string;
237
- slug: string;
238
- sort_order: number;
239
- updated_at: string;
240
- };
241
- Insert: {
242
- color?: string;
243
- created_at?: string;
244
- icon?: string | null;
245
- id?: string;
246
- name: string;
247
- slug: string;
248
- sort_order?: number;
249
- updated_at?: string;
250
- };
251
- Update: {
252
- color?: string;
253
- created_at?: string;
254
- icon?: string | null;
255
- id?: string;
256
- name?: string;
257
- slug?: string;
258
- sort_order?: number;
259
- updated_at?: string;
260
- };
261
- Relationships: [];
262
- };
263
- product_field_options: {
264
- Row: {
265
- created_at: string;
266
- field_setting_id: string;
267
- id: string;
268
- label: string;
269
- sort_order: number;
270
- };
271
- Insert: {
272
- created_at?: string;
273
- field_setting_id: string;
274
- id?: string;
275
- label: string;
276
- sort_order?: number;
277
- };
278
- Update: {
279
- created_at?: string;
280
- field_setting_id?: string;
281
- id?: string;
282
- label?: string;
283
- sort_order?: number;
284
- };
285
- Relationships: [{
286
- foreignKeyName: "product_field_options_field_setting_id_fkey";
287
- columns: ["field_setting_id"];
288
- isOneToOne: false;
289
- referencedRelation: "product_field_settings";
290
- referencedColumns: ["id"];
291
- }];
292
- };
293
- product_field_settings: {
294
- Row: {
295
- active_per_category: import("./types").Json;
296
- created_at: string;
297
- field_key: string;
298
- field_label: string;
299
- field_type: string;
300
- id: string;
301
- is_custom: boolean;
302
- sort_order: number;
303
- updated_at: string;
304
- };
305
- Insert: {
306
- active_per_category?: import("./types").Json;
307
- created_at?: string;
308
- field_key: string;
309
- field_label: string;
310
- field_type?: string;
311
- id?: string;
312
- is_custom?: boolean;
313
- sort_order?: number;
314
- updated_at?: string;
315
- };
316
- Update: {
317
- active_per_category?: import("./types").Json;
318
- created_at?: string;
319
- field_key?: string;
320
- field_label?: string;
321
- field_type?: string;
322
- id?: string;
323
- is_custom?: boolean;
324
- sort_order?: number;
325
- updated_at?: string;
326
- };
327
- Relationships: [];
328
- };
329
- products: {
330
- Row: {
331
- barcode: string | null;
332
- batch: string;
333
- created_at: string;
334
- custom_fields: import("./types").Json;
335
- id: string;
336
- image_url: string | null;
337
- incoming_quantity: number;
338
- location: string;
339
- min_quantity: number;
340
- product: string;
341
- product_type: string;
342
- purchase_price: number | null;
343
- quantity: number;
344
- sale_price: number | null;
345
- unit: string;
346
- updated_at: string;
347
- weight: string | null;
348
- };
349
- Insert: {
350
- barcode?: string | null;
351
- batch: string;
352
- created_at?: string;
353
- custom_fields?: import("./types").Json;
354
- id?: string;
355
- image_url?: string | null;
356
- incoming_quantity?: number;
357
- location: string;
358
- min_quantity?: number;
359
- product: string;
360
- product_type?: string;
361
- purchase_price?: number | null;
362
- quantity?: number;
363
- sale_price?: number | null;
364
- unit?: string;
365
- updated_at?: string;
366
- weight?: string | null;
367
- };
368
- Update: {
369
- barcode?: string | null;
370
- batch?: string;
371
- created_at?: string;
372
- custom_fields?: import("./types").Json;
373
- id?: string;
374
- image_url?: string | null;
375
- incoming_quantity?: number;
376
- location?: string;
377
- min_quantity?: number;
378
- product?: string;
379
- product_type?: string;
380
- purchase_price?: number | null;
381
- quantity?: number;
382
- sale_price?: number | null;
383
- unit?: string;
384
- updated_at?: string;
385
- weight?: string | null;
386
- };
387
- Relationships: [];
388
- };
389
- profiles: {
390
- Row: {
391
- created_at: string;
392
- display_name: string | null;
393
- email: string | null;
394
- id: string;
395
- notification_preferences: import("./types").Json;
396
- updated_at: string;
397
- };
398
- Insert: {
399
- created_at?: string;
400
- display_name?: string | null;
401
- email?: string | null;
402
- id: string;
403
- notification_preferences?: import("./types").Json;
404
- updated_at?: string;
405
- };
406
- Update: {
407
- created_at?: string;
408
- display_name?: string | null;
409
- email?: string | null;
410
- id?: string;
411
- notification_preferences?: import("./types").Json;
412
- updated_at?: string;
413
- };
414
- Relationships: [];
415
- };
416
- purchase_order_items: {
417
- Row: {
418
- created_at: string;
419
- id: string;
420
- product_id: string | null;
421
- product_type: string;
422
- purchase_order_id: string;
423
- quantity: number;
424
- };
425
- Insert: {
426
- created_at?: string;
427
- id?: string;
428
- product_id?: string | null;
429
- product_type?: string;
430
- purchase_order_id: string;
431
- quantity?: number;
432
- };
433
- Update: {
434
- created_at?: string;
435
- id?: string;
436
- product_id?: string | null;
437
- product_type?: string;
438
- purchase_order_id?: string;
439
- quantity?: number;
440
- };
441
- Relationships: [{
442
- foreignKeyName: "purchase_order_items_product_id_fkey";
443
- columns: ["product_id"];
444
- isOneToOne: false;
445
- referencedRelation: "products";
446
- referencedColumns: ["id"];
447
- }, {
448
- foreignKeyName: "purchase_order_items_purchase_order_id_fkey";
449
- columns: ["purchase_order_id"];
450
- isOneToOne: false;
451
- referencedRelation: "purchase_orders";
452
- referencedColumns: ["id"];
453
- }];
454
- };
455
- purchase_orders: {
456
- Row: {
457
- created_at: string;
458
- expected_delivery_date: string;
459
- id: string;
460
- location_id: string | null;
461
- notes: string | null;
462
- order_number: string;
463
- status: string;
464
- supplier_id: string | null;
465
- supplier_name: string;
466
- updated_at: string;
467
- };
468
- Insert: {
469
- created_at?: string;
470
- expected_delivery_date: string;
471
- id?: string;
472
- location_id?: string | null;
473
- notes?: string | null;
474
- order_number: string;
475
- status?: string;
476
- supplier_id?: string | null;
477
- supplier_name?: string;
478
- updated_at?: string;
479
- };
480
- Update: {
481
- created_at?: string;
482
- expected_delivery_date?: string;
483
- id?: string;
484
- location_id?: string | null;
485
- notes?: string | null;
486
- order_number?: string;
487
- status?: string;
488
- supplier_id?: string | null;
489
- supplier_name?: string;
490
- updated_at?: string;
491
- };
492
- Relationships: [{
493
- foreignKeyName: "purchase_orders_location_id_fkey";
494
- columns: ["location_id"];
495
- isOneToOne: false;
496
- referencedRelation: "locations";
497
- referencedColumns: ["id"];
498
- }, {
499
- foreignKeyName: "purchase_orders_supplier_id_fkey";
500
- columns: ["supplier_id"];
501
- isOneToOne: false;
502
- referencedRelation: "suppliers";
503
- referencedColumns: ["id"];
504
- }];
505
- };
506
- supplier_products: {
507
- Row: {
508
- article_number: string | null;
509
- created_at: string;
510
- id: string;
511
- name: string;
512
- notes: string | null;
513
- pot_size: string | null;
514
- price: number | null;
515
- quantity: number | null;
516
- supplier_id: string;
517
- unit: string;
518
- updated_at: string;
519
- };
520
- Insert: {
521
- article_number?: string | null;
522
- created_at?: string;
523
- id?: string;
524
- name: string;
525
- notes?: string | null;
526
- pot_size?: string | null;
527
- price?: number | null;
528
- quantity?: number | null;
529
- supplier_id: string;
530
- unit?: string;
531
- updated_at?: string;
532
- };
533
- Update: {
534
- article_number?: string | null;
535
- created_at?: string;
536
- id?: string;
537
- name?: string;
538
- notes?: string | null;
539
- pot_size?: string | null;
540
- price?: number | null;
541
- quantity?: number | null;
542
- supplier_id?: string;
543
- unit?: string;
544
- updated_at?: string;
545
- };
546
- Relationships: [{
547
- foreignKeyName: "supplier_products_supplier_id_fkey";
548
- columns: ["supplier_id"];
549
- isOneToOne: false;
550
- referencedRelation: "suppliers";
551
- referencedColumns: ["id"];
552
- }];
553
- };
554
- suppliers: {
555
- Row: {
556
- address: string | null;
557
- column_mappings: import("./types").Json | null;
558
- contact_person: string | null;
559
- created_at: string;
560
- default_product_type: string;
561
- email: string | null;
562
- id: string;
563
- imported_file_name: string | null;
564
- name: string;
565
- notes: string | null;
566
- phone: string | null;
567
- updated_at: string;
568
- };
569
- Insert: {
570
- address?: string | null;
571
- column_mappings?: import("./types").Json | null;
572
- contact_person?: string | null;
573
- created_at?: string;
574
- default_product_type?: string;
575
- email?: string | null;
576
- id?: string;
577
- imported_file_name?: string | null;
578
- name: string;
579
- notes?: string | null;
580
- phone?: string | null;
581
- updated_at?: string;
582
- };
583
- Update: {
584
- address?: string | null;
585
- column_mappings?: import("./types").Json | null;
586
- contact_person?: string | null;
587
- created_at?: string;
588
- default_product_type?: string;
589
- email?: string | null;
590
- id?: string;
591
- imported_file_name?: string | null;
592
- name?: string;
593
- notes?: string | null;
594
- phone?: string | null;
595
- updated_at?: string;
596
- };
597
- Relationships: [];
598
- };
599
- user_roles: {
600
- Row: {
601
- created_at: string;
602
- id: string;
603
- role: Database["public"]["Enums"]["app_role"];
604
- user_id: string;
605
- };
606
- Insert: {
607
- created_at?: string;
608
- id?: string;
609
- role: Database["public"]["Enums"]["app_role"];
610
- user_id: string;
611
- };
612
- Update: {
613
- created_at?: string;
614
- id?: string;
615
- role?: Database["public"]["Enums"]["app_role"];
616
- user_id?: string;
617
- };
618
- Relationships: [{
619
- foreignKeyName: "user_roles_user_id_fkey";
620
- columns: ["user_id"];
621
- isOneToOne: false;
622
- referencedRelation: "profiles";
623
- referencedColumns: ["id"];
624
- }];
625
- };
626
- };
627
- Views: { [_ in never]: never; };
628
- Functions: { [_ in never]: never; };
629
- Enums: {
630
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
631
- };
632
- CompositeTypes: { [_ in never]: never; };
633
- }, {
634
- PostgrestVersion: "14.5";
635
- }>;
636
- userId: string;
637
- claims: import("@supabase/auth-js").JwtPayload;
638
- }, undefined, undefined, undefined>;
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
+ customer_field_options: {
42
+ Row: {
43
+ created_at: string;
44
+ field_setting_id: string;
45
+ id: string;
46
+ label: string;
47
+ sort_order: number;
48
+ };
49
+ Insert: {
50
+ created_at?: string;
51
+ field_setting_id: string;
52
+ id?: string;
53
+ label: string;
54
+ sort_order?: number;
55
+ };
56
+ Update: {
57
+ created_at?: string;
58
+ field_setting_id?: string;
59
+ id?: string;
60
+ label?: string;
61
+ sort_order?: number;
62
+ };
63
+ Relationships: [{
64
+ foreignKeyName: "customer_field_options_field_setting_id_fkey";
65
+ columns: ["field_setting_id"];
66
+ isOneToOne: false;
67
+ referencedRelation: "customer_field_settings";
68
+ referencedColumns: ["id"];
69
+ }];
70
+ };
71
+ customer_field_settings: {
72
+ Row: {
73
+ created_at: string;
74
+ field_key: string;
75
+ field_label: string;
76
+ field_type: string;
77
+ id: string;
78
+ is_custom: boolean;
79
+ sort_order: number;
80
+ updated_at: string;
81
+ };
82
+ Insert: {
83
+ created_at?: string;
84
+ field_key: string;
85
+ field_label: string;
86
+ field_type?: string;
87
+ id?: string;
88
+ is_custom?: boolean;
89
+ sort_order?: number;
90
+ updated_at?: string;
91
+ };
92
+ Update: {
93
+ created_at?: string;
94
+ field_key?: string;
95
+ field_label?: string;
96
+ field_type?: string;
97
+ id?: string;
98
+ is_custom?: boolean;
99
+ sort_order?: number;
100
+ updated_at?: string;
101
+ };
102
+ Relationships: [];
103
+ };
104
+ customers: {
105
+ Row: {
106
+ address: string | null;
107
+ city: string | null;
108
+ company_name: string;
109
+ contact_person: string | null;
110
+ country: string | null;
111
+ created_at: string;
112
+ custom_fields: import("./types").Json;
113
+ email: string | null;
114
+ id: string;
115
+ notes: string | null;
116
+ phone: string | null;
117
+ postal_code: string | null;
118
+ updated_at: string;
119
+ };
120
+ Insert: {
121
+ address?: string | null;
122
+ city?: string | null;
123
+ company_name: string;
124
+ contact_person?: string | null;
125
+ country?: string | null;
126
+ created_at?: string;
127
+ custom_fields?: import("./types").Json;
128
+ email?: string | null;
129
+ id?: string;
130
+ notes?: string | null;
131
+ phone?: string | null;
132
+ postal_code?: string | null;
133
+ updated_at?: string;
134
+ };
135
+ Update: {
136
+ address?: string | null;
137
+ city?: string | null;
138
+ company_name?: string;
139
+ contact_person?: string | null;
140
+ country?: string | null;
141
+ created_at?: string;
142
+ custom_fields?: import("./types").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
+ Relationships: [];
151
+ };
152
+ inventory_settings: {
153
+ Row: {
154
+ created_at: string;
155
+ hierarchy_levels: string[];
156
+ id: string;
157
+ updated_at: string;
158
+ visible_columns: string[];
159
+ };
160
+ Insert: {
161
+ created_at?: string;
162
+ hierarchy_levels?: string[];
163
+ id?: string;
164
+ updated_at?: string;
165
+ visible_columns?: string[];
166
+ };
167
+ Update: {
168
+ created_at?: string;
169
+ hierarchy_levels?: string[];
170
+ id?: string;
171
+ updated_at?: string;
172
+ visible_columns?: string[];
173
+ };
174
+ Relationships: [];
175
+ };
176
+ locations: {
177
+ Row: {
178
+ created_at: string;
179
+ id: string;
180
+ name: string;
181
+ sort_order: number;
182
+ updated_at: string;
183
+ };
184
+ Insert: {
185
+ created_at?: string;
186
+ id?: string;
187
+ name: string;
188
+ sort_order?: number;
189
+ updated_at?: string;
190
+ };
191
+ Update: {
192
+ created_at?: string;
193
+ id?: string;
194
+ name?: string;
195
+ sort_order?: number;
196
+ updated_at?: string;
197
+ };
198
+ Relationships: [];
199
+ };
200
+ notifications: {
201
+ Row: {
202
+ created_at: string;
203
+ id: string;
204
+ message: string | null;
205
+ read: boolean;
206
+ title: string;
207
+ updated_at: string;
208
+ user_id: string;
209
+ };
210
+ Insert: {
211
+ created_at?: string;
212
+ id?: string;
213
+ message?: string | null;
214
+ read?: boolean;
215
+ title: string;
216
+ updated_at?: string;
217
+ user_id: string;
218
+ };
219
+ Update: {
220
+ created_at?: string;
221
+ id?: string;
222
+ message?: string | null;
223
+ read?: boolean;
224
+ title?: string;
225
+ updated_at?: string;
226
+ user_id?: string;
227
+ };
228
+ Relationships: [];
229
+ };
230
+ product_categories: {
231
+ Row: {
232
+ color: string;
233
+ created_at: string;
234
+ icon: string | null;
235
+ id: string;
236
+ name: string;
237
+ slug: string;
238
+ sort_order: number;
239
+ updated_at: string;
240
+ };
241
+ Insert: {
242
+ color?: string;
243
+ created_at?: string;
244
+ icon?: string | null;
245
+ id?: string;
246
+ name: string;
247
+ slug: string;
248
+ sort_order?: number;
249
+ updated_at?: string;
250
+ };
251
+ Update: {
252
+ color?: string;
253
+ created_at?: string;
254
+ icon?: string | null;
255
+ id?: string;
256
+ name?: string;
257
+ slug?: string;
258
+ sort_order?: number;
259
+ updated_at?: string;
260
+ };
261
+ Relationships: [];
262
+ };
263
+ product_field_options: {
264
+ Row: {
265
+ created_at: string;
266
+ field_setting_id: string;
267
+ id: string;
268
+ label: string;
269
+ sort_order: number;
270
+ };
271
+ Insert: {
272
+ created_at?: string;
273
+ field_setting_id: string;
274
+ id?: string;
275
+ label: string;
276
+ sort_order?: number;
277
+ };
278
+ Update: {
279
+ created_at?: string;
280
+ field_setting_id?: string;
281
+ id?: string;
282
+ label?: string;
283
+ sort_order?: number;
284
+ };
285
+ Relationships: [{
286
+ foreignKeyName: "product_field_options_field_setting_id_fkey";
287
+ columns: ["field_setting_id"];
288
+ isOneToOne: false;
289
+ referencedRelation: "product_field_settings";
290
+ referencedColumns: ["id"];
291
+ }];
292
+ };
293
+ product_field_settings: {
294
+ Row: {
295
+ active_per_category: import("./types").Json;
296
+ created_at: string;
297
+ field_key: string;
298
+ field_label: string;
299
+ field_type: string;
300
+ id: string;
301
+ is_custom: boolean;
302
+ sort_order: number;
303
+ updated_at: string;
304
+ };
305
+ Insert: {
306
+ active_per_category?: import("./types").Json;
307
+ created_at?: string;
308
+ field_key: string;
309
+ field_label: string;
310
+ field_type?: string;
311
+ id?: string;
312
+ is_custom?: boolean;
313
+ sort_order?: number;
314
+ updated_at?: string;
315
+ };
316
+ Update: {
317
+ active_per_category?: import("./types").Json;
318
+ created_at?: string;
319
+ field_key?: string;
320
+ field_label?: string;
321
+ field_type?: string;
322
+ id?: string;
323
+ is_custom?: boolean;
324
+ sort_order?: number;
325
+ updated_at?: string;
326
+ };
327
+ Relationships: [];
328
+ };
329
+ products: {
330
+ Row: {
331
+ barcode: string | null;
332
+ batch: string;
333
+ created_at: string;
334
+ custom_fields: import("./types").Json;
335
+ id: string;
336
+ image_url: string | null;
337
+ incoming_quantity: number;
338
+ location: string;
339
+ min_quantity: number;
340
+ product: string;
341
+ product_type: string;
342
+ purchase_price: number | null;
343
+ quantity: number;
344
+ sale_price: number | null;
345
+ unit: string;
346
+ updated_at: string;
347
+ weight: string | null;
348
+ };
349
+ Insert: {
350
+ barcode?: string | null;
351
+ batch: string;
352
+ created_at?: string;
353
+ custom_fields?: import("./types").Json;
354
+ id?: string;
355
+ image_url?: string | null;
356
+ incoming_quantity?: number;
357
+ location: string;
358
+ min_quantity?: number;
359
+ product: string;
360
+ product_type?: string;
361
+ purchase_price?: number | null;
362
+ quantity?: number;
363
+ sale_price?: number | null;
364
+ unit?: string;
365
+ updated_at?: string;
366
+ weight?: string | null;
367
+ };
368
+ Update: {
369
+ barcode?: string | null;
370
+ batch?: string;
371
+ created_at?: string;
372
+ custom_fields?: import("./types").Json;
373
+ id?: string;
374
+ image_url?: string | null;
375
+ incoming_quantity?: number;
376
+ location?: string;
377
+ min_quantity?: number;
378
+ product?: string;
379
+ product_type?: string;
380
+ purchase_price?: number | null;
381
+ quantity?: number;
382
+ sale_price?: number | null;
383
+ unit?: string;
384
+ updated_at?: string;
385
+ weight?: string | null;
386
+ };
387
+ Relationships: [];
388
+ };
389
+ profiles: {
390
+ Row: {
391
+ created_at: string;
392
+ display_name: string | null;
393
+ email: string | null;
394
+ id: string;
395
+ notification_preferences: import("./types").Json;
396
+ updated_at: string;
397
+ };
398
+ Insert: {
399
+ created_at?: string;
400
+ display_name?: string | null;
401
+ email?: string | null;
402
+ id: string;
403
+ notification_preferences?: import("./types").Json;
404
+ updated_at?: string;
405
+ };
406
+ Update: {
407
+ created_at?: string;
408
+ display_name?: string | null;
409
+ email?: string | null;
410
+ id?: string;
411
+ notification_preferences?: import("./types").Json;
412
+ updated_at?: string;
413
+ };
414
+ Relationships: [];
415
+ };
416
+ purchase_order_items: {
417
+ Row: {
418
+ created_at: string;
419
+ id: string;
420
+ product_id: string | null;
421
+ product_type: string;
422
+ purchase_order_id: string;
423
+ quantity: number;
424
+ };
425
+ Insert: {
426
+ created_at?: string;
427
+ id?: string;
428
+ product_id?: string | null;
429
+ product_type?: string;
430
+ purchase_order_id: string;
431
+ quantity?: number;
432
+ };
433
+ Update: {
434
+ created_at?: string;
435
+ id?: string;
436
+ product_id?: string | null;
437
+ product_type?: string;
438
+ purchase_order_id?: string;
439
+ quantity?: number;
440
+ };
441
+ Relationships: [{
442
+ foreignKeyName: "purchase_order_items_product_id_fkey";
443
+ columns: ["product_id"];
444
+ isOneToOne: false;
445
+ referencedRelation: "products";
446
+ referencedColumns: ["id"];
447
+ }, {
448
+ foreignKeyName: "purchase_order_items_purchase_order_id_fkey";
449
+ columns: ["purchase_order_id"];
450
+ isOneToOne: false;
451
+ referencedRelation: "purchase_orders";
452
+ referencedColumns: ["id"];
453
+ }];
454
+ };
455
+ purchase_orders: {
456
+ Row: {
457
+ created_at: string;
458
+ expected_delivery_date: string;
459
+ id: string;
460
+ location_id: string | null;
461
+ notes: string | null;
462
+ order_number: string;
463
+ status: string;
464
+ supplier_id: string | null;
465
+ supplier_name: string;
466
+ updated_at: string;
467
+ };
468
+ Insert: {
469
+ created_at?: string;
470
+ expected_delivery_date: string;
471
+ id?: string;
472
+ location_id?: string | null;
473
+ notes?: string | null;
474
+ order_number: string;
475
+ status?: string;
476
+ supplier_id?: string | null;
477
+ supplier_name?: string;
478
+ updated_at?: string;
479
+ };
480
+ Update: {
481
+ created_at?: string;
482
+ expected_delivery_date?: string;
483
+ id?: string;
484
+ location_id?: string | null;
485
+ notes?: string | null;
486
+ order_number?: string;
487
+ status?: string;
488
+ supplier_id?: string | null;
489
+ supplier_name?: string;
490
+ updated_at?: string;
491
+ };
492
+ Relationships: [{
493
+ foreignKeyName: "purchase_orders_location_id_fkey";
494
+ columns: ["location_id"];
495
+ isOneToOne: false;
496
+ referencedRelation: "locations";
497
+ referencedColumns: ["id"];
498
+ }, {
499
+ foreignKeyName: "purchase_orders_supplier_id_fkey";
500
+ columns: ["supplier_id"];
501
+ isOneToOne: false;
502
+ referencedRelation: "suppliers";
503
+ referencedColumns: ["id"];
504
+ }];
505
+ };
506
+ supplier_products: {
507
+ Row: {
508
+ article_number: string | null;
509
+ created_at: string;
510
+ id: string;
511
+ name: string;
512
+ notes: string | null;
513
+ pot_size: string | null;
514
+ price: number | null;
515
+ quantity: number | null;
516
+ supplier_id: string;
517
+ unit: string;
518
+ updated_at: string;
519
+ };
520
+ Insert: {
521
+ article_number?: string | null;
522
+ created_at?: string;
523
+ id?: string;
524
+ name: string;
525
+ notes?: string | null;
526
+ pot_size?: string | null;
527
+ price?: number | null;
528
+ quantity?: number | null;
529
+ supplier_id: string;
530
+ unit?: string;
531
+ updated_at?: string;
532
+ };
533
+ Update: {
534
+ article_number?: string | null;
535
+ created_at?: string;
536
+ id?: string;
537
+ name?: string;
538
+ notes?: string | null;
539
+ pot_size?: string | null;
540
+ price?: number | null;
541
+ quantity?: number | null;
542
+ supplier_id?: string;
543
+ unit?: string;
544
+ updated_at?: string;
545
+ };
546
+ Relationships: [{
547
+ foreignKeyName: "supplier_products_supplier_id_fkey";
548
+ columns: ["supplier_id"];
549
+ isOneToOne: false;
550
+ referencedRelation: "suppliers";
551
+ referencedColumns: ["id"];
552
+ }];
553
+ };
554
+ suppliers: {
555
+ Row: {
556
+ address: string | null;
557
+ column_mappings: import("./types").Json | null;
558
+ contact_person: string | null;
559
+ created_at: string;
560
+ default_product_type: string;
561
+ email: string | null;
562
+ id: string;
563
+ imported_file_name: string | null;
564
+ name: string;
565
+ notes: string | null;
566
+ phone: string | null;
567
+ updated_at: string;
568
+ };
569
+ Insert: {
570
+ address?: string | null;
571
+ column_mappings?: import("./types").Json | null;
572
+ contact_person?: string | null;
573
+ created_at?: string;
574
+ default_product_type?: string;
575
+ email?: string | null;
576
+ id?: string;
577
+ imported_file_name?: string | null;
578
+ name: string;
579
+ notes?: string | null;
580
+ phone?: string | null;
581
+ updated_at?: string;
582
+ };
583
+ Update: {
584
+ address?: string | null;
585
+ column_mappings?: import("./types").Json | null;
586
+ contact_person?: string | null;
587
+ created_at?: string;
588
+ default_product_type?: string;
589
+ email?: string | null;
590
+ id?: string;
591
+ imported_file_name?: string | null;
592
+ name?: string;
593
+ notes?: string | null;
594
+ phone?: string | null;
595
+ updated_at?: string;
596
+ };
597
+ Relationships: [];
598
+ };
599
+ user_roles: {
600
+ Row: {
601
+ created_at: string;
602
+ id: string;
603
+ role: Database["public"]["Enums"]["app_role"];
604
+ user_id: string;
605
+ };
606
+ Insert: {
607
+ created_at?: string;
608
+ id?: string;
609
+ role: Database["public"]["Enums"]["app_role"];
610
+ user_id: string;
611
+ };
612
+ Update: {
613
+ created_at?: string;
614
+ id?: string;
615
+ role?: Database["public"]["Enums"]["app_role"];
616
+ user_id?: string;
617
+ };
618
+ Relationships: [{
619
+ foreignKeyName: "user_roles_user_id_fkey";
620
+ columns: ["user_id"];
621
+ isOneToOne: false;
622
+ referencedRelation: "profiles";
623
+ referencedColumns: ["id"];
624
+ }];
625
+ };
626
+ };
627
+ Views: { [_ in never]: never; };
628
+ Functions: { [_ in never]: never; };
629
+ Enums: {
630
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
631
+ };
632
+ CompositeTypes: { [_ in never]: never; };
633
+ }, {
634
+ PostgrestVersion: "14.5";
635
+ }>;
636
+ userId: string;
637
+ claims: import("@supabase/auth-js").JwtPayload;
638
+ }, undefined, undefined, undefined>;
639
639
  //# sourceMappingURL=auth-middleware.d.ts.map