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