@flowselections/floriday-verkoop-module 1.0.2

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 (50) 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/ui/dropdown-menu.d.ts +9 -0
  5. package/dist-lib/components/ui/dropdown-menu.d.ts.map +1 -0
  6. package/dist-lib/components/ui/dropdown-menu.js +14 -0
  7. package/dist-lib/components/verkoop/AnalyticsCards.d.ts +9 -0
  8. package/dist-lib/components/verkoop/AnalyticsCards.d.ts.map +1 -0
  9. package/dist-lib/components/verkoop/AnalyticsCards.js +18 -0
  10. package/dist-lib/components/verkoop/CreateOrderDialog.d.ts +5 -0
  11. package/dist-lib/components/verkoop/CreateOrderDialog.d.ts.map +1 -0
  12. package/dist-lib/components/verkoop/CreateOrderDialog.js +33 -0
  13. package/dist-lib/components/verkoop/SalesOrdersFilters.d.ts +16 -0
  14. package/dist-lib/components/verkoop/SalesOrdersFilters.d.ts.map +1 -0
  15. package/dist-lib/components/verkoop/SalesOrdersFilters.js +40 -0
  16. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts +6 -0
  17. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -0
  18. package/dist-lib/components/verkoop/SalesOrdersTable.js +83 -0
  19. package/dist-lib/index.d.ts +4 -0
  20. package/dist-lib/index.d.ts.map +1 -0
  21. package/dist-lib/index.js +20 -0
  22. package/dist-lib/integrations/supabase/auth-attacher.d.ts +2 -0
  23. package/dist-lib/integrations/supabase/auth-attacher.d.ts.map +1 -0
  24. package/dist-lib/integrations/supabase/auth-attacher.js +12 -0
  25. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1029 -0
  26. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -0
  27. package/dist-lib/integrations/supabase/auth-middleware.js +44 -0
  28. package/dist-lib/integrations/supabase/client.d.ts +1025 -0
  29. package/dist-lib/integrations/supabase/client.d.ts.map +1 -0
  30. package/dist-lib/integrations/supabase/client.js +14 -0
  31. package/dist-lib/integrations/supabase/client.server.d.ts +1025 -0
  32. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -0
  33. package/dist-lib/integrations/supabase/client.server.js +30 -0
  34. package/dist-lib/integrations/supabase/types.d.ts +1112 -0
  35. package/dist-lib/integrations/supabase/types.d.ts.map +1 -0
  36. package/dist-lib/integrations/supabase/types.js +7 -0
  37. package/dist-lib/lib/floriday/floriday.server.d.ts +14 -0
  38. package/dist-lib/lib/floriday/floriday.server.d.ts.map +1 -0
  39. package/dist-lib/lib/floriday/floriday.server.js +92 -0
  40. package/dist-lib/lib/floriday/sales-orders.functions.d.ts +3143 -0
  41. package/dist-lib/lib/floriday/sales-orders.functions.d.ts.map +1 -0
  42. package/dist-lib/lib/floriday/sales-orders.functions.js +193 -0
  43. package/dist-lib/lib/utils.d.ts +3 -0
  44. package/dist-lib/lib/utils.d.ts.map +1 -0
  45. package/dist-lib/lib/utils.js +5 -0
  46. package/dist-lib/lib/validationSchemas.d.ts +15 -0
  47. package/dist-lib/lib/validationSchemas.d.ts.map +1 -0
  48. package/dist-lib/lib/validationSchemas.js +25 -0
  49. package/dist-lib/styles.css +1 -0
  50. package/package.json +76 -0
@@ -0,0 +1,3143 @@
1
+ export interface SalesOrderDTO {
2
+ id: string;
3
+ orderNumber: string;
4
+ productName: string;
5
+ sku: string;
6
+ imageUrl: string | null;
7
+ orderedAt: string;
8
+ deliveryAt: string;
9
+ quantity: {
10
+ multiplier: number;
11
+ count: number;
12
+ unitPrice: number;
13
+ };
14
+ revenue: number;
15
+ fustCount: number;
16
+ customer: {
17
+ name: string;
18
+ postalCode: string;
19
+ city: string;
20
+ logoUrl: string | null;
21
+ };
22
+ status: {
23
+ isCancelled: boolean;
24
+ isShipped: boolean;
25
+ isInvoiced: boolean;
26
+ isConfirmed: boolean;
27
+ };
28
+ }
29
+ export interface SalesOrdersResult {
30
+ orders: SalesOrderDTO[];
31
+ totals: {
32
+ revenue: number;
33
+ avgPrice: number;
34
+ fustCount: number;
35
+ };
36
+ }
37
+ export declare const listSalesOrders: import("@tanstack/start-client-core").OptionalFetcher<readonly [import("@tanstack/start-client-core").FunctionMiddlewareAfterServer<{}, unknown, undefined, {
38
+ supabase: import("@supabase/supabase-js").SupabaseClient<import("../../integrations/supabase/types").Database, "public", "public", {
39
+ Tables: {
40
+ bugs: {
41
+ Row: {
42
+ attachment_url: string | null;
43
+ created_at: string;
44
+ description: string;
45
+ id: string;
46
+ priority: string;
47
+ status: string;
48
+ title: string;
49
+ updated_at: string;
50
+ user_id: string;
51
+ };
52
+ Insert: {
53
+ attachment_url?: string | null;
54
+ created_at?: string;
55
+ description: string;
56
+ id?: string;
57
+ priority?: string;
58
+ status?: string;
59
+ title: string;
60
+ updated_at?: string;
61
+ user_id: string;
62
+ };
63
+ Update: {
64
+ attachment_url?: string | null;
65
+ created_at?: string;
66
+ description?: string;
67
+ id?: string;
68
+ priority?: string;
69
+ status?: string;
70
+ title?: string;
71
+ updated_at?: string;
72
+ user_id?: string;
73
+ };
74
+ Relationships: [];
75
+ };
76
+ collections: {
77
+ Row: {
78
+ created_at: string;
79
+ created_by: string | null;
80
+ id: string;
81
+ name: string;
82
+ updated_at: string;
83
+ };
84
+ Insert: {
85
+ created_at?: string;
86
+ created_by?: string | null;
87
+ id?: string;
88
+ name: string;
89
+ updated_at?: string;
90
+ };
91
+ Update: {
92
+ created_at?: string;
93
+ created_by?: string | null;
94
+ id?: string;
95
+ name?: string;
96
+ updated_at?: string;
97
+ };
98
+ Relationships: [];
99
+ };
100
+ customer_field_options: {
101
+ Row: {
102
+ created_at: string;
103
+ field_setting_id: string;
104
+ id: string;
105
+ label: string;
106
+ sort_order: number;
107
+ };
108
+ Insert: {
109
+ created_at?: string;
110
+ field_setting_id: string;
111
+ id?: string;
112
+ label: string;
113
+ sort_order?: number;
114
+ };
115
+ Update: {
116
+ created_at?: string;
117
+ field_setting_id?: string;
118
+ id?: string;
119
+ label?: string;
120
+ sort_order?: number;
121
+ };
122
+ Relationships: [{
123
+ foreignKeyName: "customer_field_options_field_setting_id_fkey";
124
+ columns: ["field_setting_id"];
125
+ isOneToOne: false;
126
+ referencedRelation: "customer_field_settings";
127
+ referencedColumns: ["id"];
128
+ }];
129
+ };
130
+ customer_field_settings: {
131
+ Row: {
132
+ created_at: string;
133
+ field_key: string;
134
+ field_label: string;
135
+ field_type: string;
136
+ id: string;
137
+ is_custom: boolean;
138
+ sort_order: number;
139
+ updated_at: string;
140
+ };
141
+ Insert: {
142
+ created_at?: string;
143
+ field_key: string;
144
+ field_label: string;
145
+ field_type?: string;
146
+ id?: string;
147
+ is_custom?: boolean;
148
+ sort_order?: number;
149
+ updated_at?: string;
150
+ };
151
+ Update: {
152
+ created_at?: string;
153
+ field_key?: string;
154
+ field_label?: string;
155
+ field_type?: string;
156
+ id?: string;
157
+ is_custom?: boolean;
158
+ sort_order?: number;
159
+ updated_at?: string;
160
+ };
161
+ Relationships: [];
162
+ };
163
+ customers: {
164
+ Row: {
165
+ address: string | null;
166
+ city: string | null;
167
+ company_name: string;
168
+ country: string | null;
169
+ created_at: string;
170
+ custom_fields: import("../../integrations/supabase/types").Json;
171
+ email: string | null;
172
+ id: string;
173
+ notes: string | null;
174
+ phone: string | null;
175
+ postal_code: string | null;
176
+ updated_at: string;
177
+ };
178
+ Insert: {
179
+ address?: string | null;
180
+ city?: string | null;
181
+ company_name: string;
182
+ country?: string | null;
183
+ created_at?: string;
184
+ custom_fields?: import("../../integrations/supabase/types").Json;
185
+ email?: string | null;
186
+ id?: string;
187
+ notes?: string | null;
188
+ phone?: string | null;
189
+ postal_code?: string | null;
190
+ updated_at?: string;
191
+ };
192
+ Update: {
193
+ address?: string | null;
194
+ city?: string | null;
195
+ company_name?: string;
196
+ country?: string | null;
197
+ created_at?: string;
198
+ custom_fields?: import("../../integrations/supabase/types").Json;
199
+ email?: string | null;
200
+ id?: string;
201
+ notes?: string | null;
202
+ phone?: string | null;
203
+ postal_code?: string | null;
204
+ updated_at?: string;
205
+ };
206
+ Relationships: [];
207
+ };
208
+ floricode_connection_settings: {
209
+ Row: {
210
+ catalog_key: string | null;
211
+ catalog_url: string;
212
+ created_at: string;
213
+ id: number;
214
+ last_meta: import("../../integrations/supabase/types").Json | null;
215
+ last_test_at: string | null;
216
+ last_test_error: string | null;
217
+ last_test_ok: boolean | null;
218
+ updated_at: string;
219
+ };
220
+ Insert: {
221
+ catalog_key?: string | null;
222
+ catalog_url?: string;
223
+ created_at?: string;
224
+ id?: number;
225
+ last_meta?: import("../../integrations/supabase/types").Json | null;
226
+ last_test_at?: string | null;
227
+ last_test_error?: string | null;
228
+ last_test_ok?: boolean | null;
229
+ updated_at?: string;
230
+ };
231
+ Update: {
232
+ catalog_key?: string | null;
233
+ catalog_url?: string;
234
+ created_at?: string;
235
+ id?: number;
236
+ last_meta?: import("../../integrations/supabase/types").Json | null;
237
+ last_test_at?: string | null;
238
+ last_test_error?: string | null;
239
+ last_test_ok?: boolean | null;
240
+ updated_at?: string;
241
+ };
242
+ Relationships: [];
243
+ };
244
+ floricode_records: {
245
+ Row: {
246
+ change_date_time: string | null;
247
+ data: import("../../integrations/supabase/types").Json;
248
+ last_synced_at: string;
249
+ record_id: string;
250
+ resource: string;
251
+ };
252
+ Insert: {
253
+ change_date_time?: string | null;
254
+ data?: import("../../integrations/supabase/types").Json;
255
+ last_synced_at?: string;
256
+ record_id: string;
257
+ resource: string;
258
+ };
259
+ Update: {
260
+ change_date_time?: string | null;
261
+ data?: import("../../integrations/supabase/types").Json;
262
+ last_synced_at?: string;
263
+ record_id?: string;
264
+ resource?: string;
265
+ };
266
+ Relationships: [];
267
+ };
268
+ floricode_sync_state: {
269
+ Row: {
270
+ error_message: string | null;
271
+ last_change_date_time: string | null;
272
+ last_sequence_number: number;
273
+ last_sync_at: string | null;
274
+ resource: string;
275
+ status: string;
276
+ updated_at: string;
277
+ };
278
+ Insert: {
279
+ error_message?: string | null;
280
+ last_change_date_time?: string | null;
281
+ last_sequence_number?: number;
282
+ last_sync_at?: string | null;
283
+ resource: string;
284
+ status?: string;
285
+ updated_at?: string;
286
+ };
287
+ Update: {
288
+ error_message?: string | null;
289
+ last_change_date_time?: string | null;
290
+ last_sequence_number?: number;
291
+ last_sync_at?: string | null;
292
+ resource?: string;
293
+ status?: string;
294
+ updated_at?: string;
295
+ };
296
+ Relationships: [];
297
+ };
298
+ floriday_connections: {
299
+ Row: {
300
+ access_token: string | null;
301
+ api_key: string;
302
+ client_id: string;
303
+ client_secret: string;
304
+ created_at: string;
305
+ environment: string;
306
+ gln_code: string | null;
307
+ id: string;
308
+ is_active: boolean;
309
+ label: string;
310
+ organization_name: string | null;
311
+ preferred_warehouse_id: string | null;
312
+ preferred_warehouse_name: string | null;
313
+ token_expires_at: string | null;
314
+ updated_at: string;
315
+ };
316
+ Insert: {
317
+ access_token?: string | null;
318
+ api_key: string;
319
+ client_id: string;
320
+ client_secret: string;
321
+ created_at?: string;
322
+ environment: string;
323
+ gln_code?: string | null;
324
+ id?: string;
325
+ is_active?: boolean;
326
+ label?: string;
327
+ organization_name?: string | null;
328
+ preferred_warehouse_id?: string | null;
329
+ preferred_warehouse_name?: string | null;
330
+ token_expires_at?: string | null;
331
+ updated_at?: string;
332
+ };
333
+ Update: {
334
+ access_token?: string | null;
335
+ api_key?: string;
336
+ client_id?: string;
337
+ client_secret?: string;
338
+ created_at?: string;
339
+ environment?: string;
340
+ gln_code?: string | null;
341
+ id?: string;
342
+ is_active?: boolean;
343
+ label?: string;
344
+ organization_name?: string | null;
345
+ preferred_warehouse_id?: string | null;
346
+ preferred_warehouse_name?: string | null;
347
+ token_expires_at?: string | null;
348
+ updated_at?: string;
349
+ };
350
+ Relationships: [];
351
+ };
352
+ floriday_settings: {
353
+ Row: {
354
+ active_environment: string;
355
+ id: number;
356
+ updated_at: string;
357
+ };
358
+ Insert: {
359
+ active_environment?: string;
360
+ id?: number;
361
+ updated_at?: string;
362
+ };
363
+ Update: {
364
+ active_environment?: string;
365
+ id?: number;
366
+ updated_at?: string;
367
+ };
368
+ Relationships: [];
369
+ };
370
+ inventory_settings: {
371
+ Row: {
372
+ created_at: string;
373
+ hierarchy_levels: string[];
374
+ id: string;
375
+ updated_at: string;
376
+ visible_columns: string[];
377
+ };
378
+ Insert: {
379
+ created_at?: string;
380
+ hierarchy_levels?: string[];
381
+ id?: string;
382
+ updated_at?: string;
383
+ visible_columns?: string[];
384
+ };
385
+ Update: {
386
+ created_at?: string;
387
+ hierarchy_levels?: string[];
388
+ id?: string;
389
+ updated_at?: string;
390
+ visible_columns?: string[];
391
+ };
392
+ Relationships: [];
393
+ };
394
+ locations: {
395
+ Row: {
396
+ created_at: string;
397
+ id: string;
398
+ name: string;
399
+ sort_order: number;
400
+ updated_at: string;
401
+ };
402
+ Insert: {
403
+ created_at?: string;
404
+ id?: string;
405
+ name: string;
406
+ sort_order?: number;
407
+ updated_at?: string;
408
+ };
409
+ Update: {
410
+ created_at?: string;
411
+ id?: string;
412
+ name?: string;
413
+ sort_order?: number;
414
+ updated_at?: string;
415
+ };
416
+ Relationships: [];
417
+ };
418
+ notifications: {
419
+ Row: {
420
+ created_at: string;
421
+ id: string;
422
+ message: string | null;
423
+ read: boolean;
424
+ title: string;
425
+ updated_at: string;
426
+ user_id: string;
427
+ };
428
+ Insert: {
429
+ created_at?: string;
430
+ id?: string;
431
+ message?: string | null;
432
+ read?: boolean;
433
+ title: string;
434
+ updated_at?: string;
435
+ user_id: string;
436
+ };
437
+ Update: {
438
+ created_at?: string;
439
+ id?: string;
440
+ message?: string | null;
441
+ read?: boolean;
442
+ title?: string;
443
+ updated_at?: string;
444
+ user_id?: string;
445
+ };
446
+ Relationships: [];
447
+ };
448
+ order_field_options: {
449
+ Row: {
450
+ created_at: string;
451
+ field_setting_id: string;
452
+ id: string;
453
+ label: string;
454
+ sort_order: number;
455
+ };
456
+ Insert: {
457
+ created_at?: string;
458
+ field_setting_id: string;
459
+ id?: string;
460
+ label: string;
461
+ sort_order?: number;
462
+ };
463
+ Update: {
464
+ created_at?: string;
465
+ field_setting_id?: string;
466
+ id?: string;
467
+ label?: string;
468
+ sort_order?: number;
469
+ };
470
+ Relationships: [{
471
+ foreignKeyName: "order_field_options_field_setting_id_fkey";
472
+ columns: ["field_setting_id"];
473
+ isOneToOne: false;
474
+ referencedRelation: "order_field_settings";
475
+ referencedColumns: ["id"];
476
+ }];
477
+ };
478
+ order_field_settings: {
479
+ Row: {
480
+ active: boolean;
481
+ created_at: string;
482
+ field_key: string;
483
+ field_label: string;
484
+ field_type: string;
485
+ id: string;
486
+ is_custom: boolean;
487
+ sort_order: number;
488
+ updated_at: string;
489
+ };
490
+ Insert: {
491
+ active?: boolean;
492
+ created_at?: string;
493
+ field_key: string;
494
+ field_label: string;
495
+ field_type?: string;
496
+ id?: string;
497
+ is_custom?: boolean;
498
+ sort_order?: number;
499
+ updated_at?: string;
500
+ };
501
+ Update: {
502
+ active?: boolean;
503
+ created_at?: string;
504
+ field_key?: string;
505
+ field_label?: string;
506
+ field_type?: string;
507
+ id?: string;
508
+ is_custom?: boolean;
509
+ sort_order?: number;
510
+ updated_at?: string;
511
+ };
512
+ Relationships: [];
513
+ };
514
+ order_items: {
515
+ Row: {
516
+ created_at: string;
517
+ id: string;
518
+ order_id: string;
519
+ product_id: string | null;
520
+ product_name: string;
521
+ quantity: number;
522
+ unit: string;
523
+ unit_price: number | null;
524
+ };
525
+ Insert: {
526
+ created_at?: string;
527
+ id?: string;
528
+ order_id: string;
529
+ product_id?: string | null;
530
+ product_name: string;
531
+ quantity?: number;
532
+ unit?: string;
533
+ unit_price?: number | null;
534
+ };
535
+ Update: {
536
+ created_at?: string;
537
+ id?: string;
538
+ order_id?: string;
539
+ product_id?: string | null;
540
+ product_name?: string;
541
+ quantity?: number;
542
+ unit?: string;
543
+ unit_price?: number | null;
544
+ };
545
+ Relationships: [{
546
+ foreignKeyName: "order_items_order_id_fkey";
547
+ columns: ["order_id"];
548
+ isOneToOne: false;
549
+ referencedRelation: "orders";
550
+ referencedColumns: ["id"];
551
+ }, {
552
+ foreignKeyName: "order_items_product_id_fkey";
553
+ columns: ["product_id"];
554
+ isOneToOne: false;
555
+ referencedRelation: "products";
556
+ referencedColumns: ["id"];
557
+ }];
558
+ };
559
+ orders: {
560
+ Row: {
561
+ created_at: string;
562
+ custom_fields: import("../../integrations/supabase/types").Json;
563
+ customer_id: string | null;
564
+ customer_name: string;
565
+ deleted_at: string | null;
566
+ delivery_date: string;
567
+ id: string;
568
+ notes: string | null;
569
+ order_date: string;
570
+ order_number: string;
571
+ status: string;
572
+ total: string;
573
+ updated_at: string;
574
+ };
575
+ Insert: {
576
+ created_at?: string;
577
+ custom_fields?: import("../../integrations/supabase/types").Json;
578
+ customer_id?: string | null;
579
+ customer_name?: string;
580
+ deleted_at?: string | null;
581
+ delivery_date: string;
582
+ id?: string;
583
+ notes?: string | null;
584
+ order_date?: string;
585
+ order_number: string;
586
+ status?: string;
587
+ total?: string;
588
+ updated_at?: string;
589
+ };
590
+ Update: {
591
+ created_at?: string;
592
+ custom_fields?: import("../../integrations/supabase/types").Json;
593
+ customer_id?: string | null;
594
+ customer_name?: string;
595
+ deleted_at?: string | null;
596
+ delivery_date?: string;
597
+ id?: string;
598
+ notes?: string | null;
599
+ order_date?: string;
600
+ order_number?: string;
601
+ status?: string;
602
+ total?: string;
603
+ updated_at?: string;
604
+ };
605
+ Relationships: [{
606
+ foreignKeyName: "orders_customer_id_fkey";
607
+ columns: ["customer_id"];
608
+ isOneToOne: false;
609
+ referencedRelation: "customers";
610
+ referencedColumns: ["id"];
611
+ }];
612
+ };
613
+ product_categories: {
614
+ Row: {
615
+ color: string;
616
+ created_at: string;
617
+ icon: string | null;
618
+ id: string;
619
+ name: string;
620
+ slug: string;
621
+ sort_order: number;
622
+ updated_at: string;
623
+ };
624
+ Insert: {
625
+ color?: string;
626
+ created_at?: string;
627
+ icon?: string | null;
628
+ id?: string;
629
+ name: string;
630
+ slug: string;
631
+ sort_order?: number;
632
+ updated_at?: string;
633
+ };
634
+ Update: {
635
+ color?: string;
636
+ created_at?: string;
637
+ icon?: string | null;
638
+ id?: string;
639
+ name?: string;
640
+ slug?: string;
641
+ sort_order?: number;
642
+ updated_at?: string;
643
+ };
644
+ Relationships: [];
645
+ };
646
+ product_field_options: {
647
+ Row: {
648
+ created_at: string;
649
+ field_setting_id: string;
650
+ id: string;
651
+ label: string;
652
+ sort_order: number;
653
+ };
654
+ Insert: {
655
+ created_at?: string;
656
+ field_setting_id: string;
657
+ id?: string;
658
+ label: string;
659
+ sort_order?: number;
660
+ };
661
+ Update: {
662
+ created_at?: string;
663
+ field_setting_id?: string;
664
+ id?: string;
665
+ label?: string;
666
+ sort_order?: number;
667
+ };
668
+ Relationships: [{
669
+ foreignKeyName: "product_field_options_field_setting_id_fkey";
670
+ columns: ["field_setting_id"];
671
+ isOneToOne: false;
672
+ referencedRelation: "product_field_settings";
673
+ referencedColumns: ["id"];
674
+ }];
675
+ };
676
+ product_field_settings: {
677
+ Row: {
678
+ active_per_category: import("../../integrations/supabase/types").Json;
679
+ created_at: string;
680
+ field_key: string;
681
+ field_label: string;
682
+ field_type: string;
683
+ id: string;
684
+ is_custom: boolean;
685
+ sort_order: number;
686
+ updated_at: string;
687
+ };
688
+ Insert: {
689
+ active_per_category?: import("../../integrations/supabase/types").Json;
690
+ created_at?: string;
691
+ field_key: string;
692
+ field_label: string;
693
+ field_type?: string;
694
+ id?: string;
695
+ is_custom?: boolean;
696
+ sort_order?: number;
697
+ updated_at?: string;
698
+ };
699
+ Update: {
700
+ active_per_category?: import("../../integrations/supabase/types").Json;
701
+ created_at?: string;
702
+ field_key?: string;
703
+ field_label?: string;
704
+ field_type?: string;
705
+ id?: string;
706
+ is_custom?: boolean;
707
+ sort_order?: number;
708
+ updated_at?: string;
709
+ };
710
+ Relationships: [];
711
+ };
712
+ products: {
713
+ Row: {
714
+ barcode: string | null;
715
+ batch: string;
716
+ created_at: string;
717
+ custom_fields: import("../../integrations/supabase/types").Json;
718
+ id: string;
719
+ image_url: string | null;
720
+ incoming_quantity: number;
721
+ location: string;
722
+ min_quantity: number;
723
+ product: string;
724
+ product_type: string;
725
+ purchase_price: number | null;
726
+ quantity: number;
727
+ sale_price: number | null;
728
+ unit: string;
729
+ updated_at: string;
730
+ weight: string | null;
731
+ };
732
+ Insert: {
733
+ barcode?: string | null;
734
+ batch: string;
735
+ created_at?: string;
736
+ custom_fields?: import("../../integrations/supabase/types").Json;
737
+ id?: string;
738
+ image_url?: string | null;
739
+ incoming_quantity?: number;
740
+ location: string;
741
+ min_quantity?: number;
742
+ product: string;
743
+ product_type?: string;
744
+ purchase_price?: number | null;
745
+ quantity?: number;
746
+ sale_price?: number | null;
747
+ unit?: string;
748
+ updated_at?: string;
749
+ weight?: string | null;
750
+ };
751
+ Update: {
752
+ barcode?: string | null;
753
+ batch?: string;
754
+ created_at?: string;
755
+ custom_fields?: import("../../integrations/supabase/types").Json;
756
+ id?: string;
757
+ image_url?: string | null;
758
+ incoming_quantity?: number;
759
+ location?: string;
760
+ min_quantity?: number;
761
+ product?: string;
762
+ product_type?: string;
763
+ purchase_price?: number | null;
764
+ quantity?: number;
765
+ sale_price?: number | null;
766
+ unit?: string;
767
+ updated_at?: string;
768
+ weight?: string | null;
769
+ };
770
+ Relationships: [];
771
+ };
772
+ profiles: {
773
+ Row: {
774
+ created_at: string;
775
+ display_name: string | null;
776
+ email: string | null;
777
+ id: string;
778
+ notification_preferences: import("../../integrations/supabase/types").Json;
779
+ updated_at: string;
780
+ };
781
+ Insert: {
782
+ created_at?: string;
783
+ display_name?: string | null;
784
+ email?: string | null;
785
+ id: string;
786
+ notification_preferences?: import("../../integrations/supabase/types").Json;
787
+ updated_at?: string;
788
+ };
789
+ Update: {
790
+ created_at?: string;
791
+ display_name?: string | null;
792
+ email?: string | null;
793
+ id?: string;
794
+ notification_preferences?: import("../../integrations/supabase/types").Json;
795
+ updated_at?: string;
796
+ };
797
+ Relationships: [];
798
+ };
799
+ purchase_order_items: {
800
+ Row: {
801
+ created_at: string;
802
+ id: string;
803
+ product_id: string | null;
804
+ product_type: string;
805
+ purchase_order_id: string;
806
+ quantity: number;
807
+ };
808
+ Insert: {
809
+ created_at?: string;
810
+ id?: string;
811
+ product_id?: string | null;
812
+ product_type?: string;
813
+ purchase_order_id: string;
814
+ quantity?: number;
815
+ };
816
+ Update: {
817
+ created_at?: string;
818
+ id?: string;
819
+ product_id?: string | null;
820
+ product_type?: string;
821
+ purchase_order_id?: string;
822
+ quantity?: number;
823
+ };
824
+ Relationships: [{
825
+ foreignKeyName: "purchase_order_items_product_id_fkey";
826
+ columns: ["product_id"];
827
+ isOneToOne: false;
828
+ referencedRelation: "products";
829
+ referencedColumns: ["id"];
830
+ }, {
831
+ foreignKeyName: "purchase_order_items_purchase_order_id_fkey";
832
+ columns: ["purchase_order_id"];
833
+ isOneToOne: false;
834
+ referencedRelation: "purchase_orders";
835
+ referencedColumns: ["id"];
836
+ }];
837
+ };
838
+ purchase_orders: {
839
+ Row: {
840
+ created_at: string;
841
+ expected_delivery_date: string;
842
+ id: string;
843
+ location_id: string | null;
844
+ notes: string | null;
845
+ order_number: string;
846
+ status: string;
847
+ supplier_id: string | null;
848
+ supplier_name: string;
849
+ updated_at: string;
850
+ };
851
+ Insert: {
852
+ created_at?: string;
853
+ expected_delivery_date: string;
854
+ id?: string;
855
+ location_id?: string | null;
856
+ notes?: string | null;
857
+ order_number: string;
858
+ status?: string;
859
+ supplier_id?: string | null;
860
+ supplier_name?: string;
861
+ updated_at?: string;
862
+ };
863
+ Update: {
864
+ created_at?: string;
865
+ expected_delivery_date?: string;
866
+ id?: string;
867
+ location_id?: string | null;
868
+ notes?: string | null;
869
+ order_number?: string;
870
+ status?: string;
871
+ supplier_id?: string | null;
872
+ supplier_name?: string;
873
+ updated_at?: string;
874
+ };
875
+ Relationships: [{
876
+ foreignKeyName: "purchase_orders_location_id_fkey";
877
+ columns: ["location_id"];
878
+ isOneToOne: false;
879
+ referencedRelation: "locations";
880
+ referencedColumns: ["id"];
881
+ }, {
882
+ foreignKeyName: "purchase_orders_supplier_id_fkey";
883
+ columns: ["supplier_id"];
884
+ isOneToOne: false;
885
+ referencedRelation: "suppliers";
886
+ referencedColumns: ["id"];
887
+ }];
888
+ };
889
+ supplier_products: {
890
+ Row: {
891
+ article_number: string | null;
892
+ created_at: string;
893
+ id: string;
894
+ name: string;
895
+ notes: string | null;
896
+ pot_size: string | null;
897
+ price: number | null;
898
+ quantity: number | null;
899
+ supplier_id: string;
900
+ unit: string;
901
+ updated_at: string;
902
+ };
903
+ Insert: {
904
+ article_number?: string | null;
905
+ created_at?: string;
906
+ id?: string;
907
+ name: string;
908
+ notes?: string | null;
909
+ pot_size?: string | null;
910
+ price?: number | null;
911
+ quantity?: number | null;
912
+ supplier_id: string;
913
+ unit?: string;
914
+ updated_at?: string;
915
+ };
916
+ Update: {
917
+ article_number?: string | null;
918
+ created_at?: string;
919
+ id?: string;
920
+ name?: string;
921
+ notes?: string | null;
922
+ pot_size?: string | null;
923
+ price?: number | null;
924
+ quantity?: number | null;
925
+ supplier_id?: string;
926
+ unit?: string;
927
+ updated_at?: string;
928
+ };
929
+ Relationships: [{
930
+ foreignKeyName: "supplier_products_supplier_id_fkey";
931
+ columns: ["supplier_id"];
932
+ isOneToOne: false;
933
+ referencedRelation: "suppliers";
934
+ referencedColumns: ["id"];
935
+ }];
936
+ };
937
+ suppliers: {
938
+ Row: {
939
+ address: string | null;
940
+ column_mappings: import("../../integrations/supabase/types").Json | null;
941
+ contact_person: string | null;
942
+ created_at: string;
943
+ default_product_type: string;
944
+ email: string | null;
945
+ id: string;
946
+ imported_file_name: string | null;
947
+ name: string;
948
+ notes: string | null;
949
+ phone: string | null;
950
+ updated_at: string;
951
+ };
952
+ Insert: {
953
+ address?: string | null;
954
+ column_mappings?: import("../../integrations/supabase/types").Json | null;
955
+ contact_person?: string | null;
956
+ created_at?: string;
957
+ default_product_type?: string;
958
+ email?: string | null;
959
+ id?: string;
960
+ imported_file_name?: string | null;
961
+ name: string;
962
+ notes?: string | null;
963
+ phone?: string | null;
964
+ updated_at?: string;
965
+ };
966
+ Update: {
967
+ address?: string | null;
968
+ column_mappings?: import("../../integrations/supabase/types").Json | null;
969
+ contact_person?: string | null;
970
+ created_at?: string;
971
+ default_product_type?: string;
972
+ email?: string | null;
973
+ id?: string;
974
+ imported_file_name?: string | null;
975
+ name?: string;
976
+ notes?: string | null;
977
+ phone?: string | null;
978
+ updated_at?: string;
979
+ };
980
+ Relationships: [];
981
+ };
982
+ trade_item_drafts: {
983
+ Row: {
984
+ connection_id: string | null;
985
+ created_at: string;
986
+ data: import("../../integrations/supabase/types").Json;
987
+ id: string;
988
+ updated_at: string;
989
+ user_id: string;
990
+ };
991
+ Insert: {
992
+ connection_id?: string | null;
993
+ created_at?: string;
994
+ data?: import("../../integrations/supabase/types").Json;
995
+ id?: string;
996
+ updated_at?: string;
997
+ user_id: string;
998
+ };
999
+ Update: {
1000
+ connection_id?: string | null;
1001
+ created_at?: string;
1002
+ data?: import("../../integrations/supabase/types").Json;
1003
+ id?: string;
1004
+ updated_at?: string;
1005
+ user_id?: string;
1006
+ };
1007
+ Relationships: [];
1008
+ };
1009
+ user_roles: {
1010
+ Row: {
1011
+ created_at: string;
1012
+ id: string;
1013
+ role: import("../../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
1014
+ user_id: string;
1015
+ };
1016
+ Insert: {
1017
+ created_at?: string;
1018
+ id?: string;
1019
+ role: import("../../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
1020
+ user_id: string;
1021
+ };
1022
+ Update: {
1023
+ created_at?: string;
1024
+ id?: string;
1025
+ role?: import("../../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
1026
+ user_id?: string;
1027
+ };
1028
+ Relationships: [{
1029
+ foreignKeyName: "user_roles_user_id_fkey";
1030
+ columns: ["user_id"];
1031
+ isOneToOne: false;
1032
+ referencedRelation: "profiles";
1033
+ referencedColumns: ["id"];
1034
+ }];
1035
+ };
1036
+ };
1037
+ Views: { [_ in never]: never; };
1038
+ Functions: {
1039
+ has_role: {
1040
+ Args: {
1041
+ _role: import("../../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
1042
+ _user_id: string;
1043
+ };
1044
+ Returns: boolean;
1045
+ };
1046
+ schedule_floriday_token_refresh: {
1047
+ Args: {
1048
+ p_apikey: string;
1049
+ p_url: string;
1050
+ };
1051
+ Returns: number;
1052
+ };
1053
+ };
1054
+ Enums: {
1055
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
1056
+ };
1057
+ CompositeTypes: { [_ in never]: never; };
1058
+ }, {
1059
+ PostgrestVersion: "14.5";
1060
+ }>;
1061
+ userId: string;
1062
+ claims: import("@supabase/auth-js").User;
1063
+ }, undefined, undefined, undefined>], (data: unknown) => {
1064
+ from?: string | undefined;
1065
+ to?: string | undefined;
1066
+ search?: string | undefined;
1067
+ status?: string | undefined;
1068
+ }, Promise<SalesOrdersResult>>;
1069
+ export declare const exportSalesOrders: import("@tanstack/start-client-core").OptionalFetcher<readonly [import("@tanstack/start-client-core").FunctionMiddlewareAfterServer<{}, unknown, undefined, {
1070
+ supabase: import("@supabase/supabase-js").SupabaseClient<import("../../integrations/supabase/types").Database, "public", "public", {
1071
+ Tables: {
1072
+ bugs: {
1073
+ Row: {
1074
+ attachment_url: string | null;
1075
+ created_at: string;
1076
+ description: string;
1077
+ id: string;
1078
+ priority: string;
1079
+ status: string;
1080
+ title: string;
1081
+ updated_at: string;
1082
+ user_id: string;
1083
+ };
1084
+ Insert: {
1085
+ attachment_url?: string | null;
1086
+ created_at?: string;
1087
+ description: string;
1088
+ id?: string;
1089
+ priority?: string;
1090
+ status?: string;
1091
+ title: string;
1092
+ updated_at?: string;
1093
+ user_id: string;
1094
+ };
1095
+ Update: {
1096
+ attachment_url?: string | null;
1097
+ created_at?: string;
1098
+ description?: string;
1099
+ id?: string;
1100
+ priority?: string;
1101
+ status?: string;
1102
+ title?: string;
1103
+ updated_at?: string;
1104
+ user_id?: string;
1105
+ };
1106
+ Relationships: [];
1107
+ };
1108
+ collections: {
1109
+ Row: {
1110
+ created_at: string;
1111
+ created_by: string | null;
1112
+ id: string;
1113
+ name: string;
1114
+ updated_at: string;
1115
+ };
1116
+ Insert: {
1117
+ created_at?: string;
1118
+ created_by?: string | null;
1119
+ id?: string;
1120
+ name: string;
1121
+ updated_at?: string;
1122
+ };
1123
+ Update: {
1124
+ created_at?: string;
1125
+ created_by?: string | null;
1126
+ id?: string;
1127
+ name?: string;
1128
+ updated_at?: string;
1129
+ };
1130
+ Relationships: [];
1131
+ };
1132
+ customer_field_options: {
1133
+ Row: {
1134
+ created_at: string;
1135
+ field_setting_id: string;
1136
+ id: string;
1137
+ label: string;
1138
+ sort_order: number;
1139
+ };
1140
+ Insert: {
1141
+ created_at?: string;
1142
+ field_setting_id: string;
1143
+ id?: string;
1144
+ label: string;
1145
+ sort_order?: number;
1146
+ };
1147
+ Update: {
1148
+ created_at?: string;
1149
+ field_setting_id?: string;
1150
+ id?: string;
1151
+ label?: string;
1152
+ sort_order?: number;
1153
+ };
1154
+ Relationships: [{
1155
+ foreignKeyName: "customer_field_options_field_setting_id_fkey";
1156
+ columns: ["field_setting_id"];
1157
+ isOneToOne: false;
1158
+ referencedRelation: "customer_field_settings";
1159
+ referencedColumns: ["id"];
1160
+ }];
1161
+ };
1162
+ customer_field_settings: {
1163
+ Row: {
1164
+ created_at: string;
1165
+ field_key: string;
1166
+ field_label: string;
1167
+ field_type: string;
1168
+ id: string;
1169
+ is_custom: boolean;
1170
+ sort_order: number;
1171
+ updated_at: string;
1172
+ };
1173
+ Insert: {
1174
+ created_at?: string;
1175
+ field_key: string;
1176
+ field_label: string;
1177
+ field_type?: string;
1178
+ id?: string;
1179
+ is_custom?: boolean;
1180
+ sort_order?: number;
1181
+ updated_at?: string;
1182
+ };
1183
+ Update: {
1184
+ created_at?: string;
1185
+ field_key?: string;
1186
+ field_label?: string;
1187
+ field_type?: string;
1188
+ id?: string;
1189
+ is_custom?: boolean;
1190
+ sort_order?: number;
1191
+ updated_at?: string;
1192
+ };
1193
+ Relationships: [];
1194
+ };
1195
+ customers: {
1196
+ Row: {
1197
+ address: string | null;
1198
+ city: string | null;
1199
+ company_name: string;
1200
+ country: string | null;
1201
+ created_at: string;
1202
+ custom_fields: import("../../integrations/supabase/types").Json;
1203
+ email: string | null;
1204
+ id: string;
1205
+ notes: string | null;
1206
+ phone: string | null;
1207
+ postal_code: string | null;
1208
+ updated_at: string;
1209
+ };
1210
+ Insert: {
1211
+ address?: string | null;
1212
+ city?: string | null;
1213
+ company_name: string;
1214
+ country?: string | null;
1215
+ created_at?: string;
1216
+ custom_fields?: import("../../integrations/supabase/types").Json;
1217
+ email?: string | null;
1218
+ id?: string;
1219
+ notes?: string | null;
1220
+ phone?: string | null;
1221
+ postal_code?: string | null;
1222
+ updated_at?: string;
1223
+ };
1224
+ Update: {
1225
+ address?: string | null;
1226
+ city?: string | null;
1227
+ company_name?: string;
1228
+ country?: string | null;
1229
+ created_at?: string;
1230
+ custom_fields?: import("../../integrations/supabase/types").Json;
1231
+ email?: string | null;
1232
+ id?: string;
1233
+ notes?: string | null;
1234
+ phone?: string | null;
1235
+ postal_code?: string | null;
1236
+ updated_at?: string;
1237
+ };
1238
+ Relationships: [];
1239
+ };
1240
+ floricode_connection_settings: {
1241
+ Row: {
1242
+ catalog_key: string | null;
1243
+ catalog_url: string;
1244
+ created_at: string;
1245
+ id: number;
1246
+ last_meta: import("../../integrations/supabase/types").Json | null;
1247
+ last_test_at: string | null;
1248
+ last_test_error: string | null;
1249
+ last_test_ok: boolean | null;
1250
+ updated_at: string;
1251
+ };
1252
+ Insert: {
1253
+ catalog_key?: string | null;
1254
+ catalog_url?: string;
1255
+ created_at?: string;
1256
+ id?: number;
1257
+ last_meta?: import("../../integrations/supabase/types").Json | null;
1258
+ last_test_at?: string | null;
1259
+ last_test_error?: string | null;
1260
+ last_test_ok?: boolean | null;
1261
+ updated_at?: string;
1262
+ };
1263
+ Update: {
1264
+ catalog_key?: string | null;
1265
+ catalog_url?: string;
1266
+ created_at?: string;
1267
+ id?: number;
1268
+ last_meta?: import("../../integrations/supabase/types").Json | null;
1269
+ last_test_at?: string | null;
1270
+ last_test_error?: string | null;
1271
+ last_test_ok?: boolean | null;
1272
+ updated_at?: string;
1273
+ };
1274
+ Relationships: [];
1275
+ };
1276
+ floricode_records: {
1277
+ Row: {
1278
+ change_date_time: string | null;
1279
+ data: import("../../integrations/supabase/types").Json;
1280
+ last_synced_at: string;
1281
+ record_id: string;
1282
+ resource: string;
1283
+ };
1284
+ Insert: {
1285
+ change_date_time?: string | null;
1286
+ data?: import("../../integrations/supabase/types").Json;
1287
+ last_synced_at?: string;
1288
+ record_id: string;
1289
+ resource: string;
1290
+ };
1291
+ Update: {
1292
+ change_date_time?: string | null;
1293
+ data?: import("../../integrations/supabase/types").Json;
1294
+ last_synced_at?: string;
1295
+ record_id?: string;
1296
+ resource?: string;
1297
+ };
1298
+ Relationships: [];
1299
+ };
1300
+ floricode_sync_state: {
1301
+ Row: {
1302
+ error_message: string | null;
1303
+ last_change_date_time: string | null;
1304
+ last_sequence_number: number;
1305
+ last_sync_at: string | null;
1306
+ resource: string;
1307
+ status: string;
1308
+ updated_at: string;
1309
+ };
1310
+ Insert: {
1311
+ error_message?: string | null;
1312
+ last_change_date_time?: string | null;
1313
+ last_sequence_number?: number;
1314
+ last_sync_at?: string | null;
1315
+ resource: string;
1316
+ status?: string;
1317
+ updated_at?: string;
1318
+ };
1319
+ Update: {
1320
+ error_message?: string | null;
1321
+ last_change_date_time?: string | null;
1322
+ last_sequence_number?: number;
1323
+ last_sync_at?: string | null;
1324
+ resource?: string;
1325
+ status?: string;
1326
+ updated_at?: string;
1327
+ };
1328
+ Relationships: [];
1329
+ };
1330
+ floriday_connections: {
1331
+ Row: {
1332
+ access_token: string | null;
1333
+ api_key: string;
1334
+ client_id: string;
1335
+ client_secret: string;
1336
+ created_at: string;
1337
+ environment: string;
1338
+ gln_code: string | null;
1339
+ id: string;
1340
+ is_active: boolean;
1341
+ label: string;
1342
+ organization_name: string | null;
1343
+ preferred_warehouse_id: string | null;
1344
+ preferred_warehouse_name: string | null;
1345
+ token_expires_at: string | null;
1346
+ updated_at: string;
1347
+ };
1348
+ Insert: {
1349
+ access_token?: string | null;
1350
+ api_key: string;
1351
+ client_id: string;
1352
+ client_secret: string;
1353
+ created_at?: string;
1354
+ environment: string;
1355
+ gln_code?: string | null;
1356
+ id?: string;
1357
+ is_active?: boolean;
1358
+ label?: string;
1359
+ organization_name?: string | null;
1360
+ preferred_warehouse_id?: string | null;
1361
+ preferred_warehouse_name?: string | null;
1362
+ token_expires_at?: string | null;
1363
+ updated_at?: string;
1364
+ };
1365
+ Update: {
1366
+ access_token?: string | null;
1367
+ api_key?: string;
1368
+ client_id?: string;
1369
+ client_secret?: string;
1370
+ created_at?: string;
1371
+ environment?: string;
1372
+ gln_code?: string | null;
1373
+ id?: string;
1374
+ is_active?: boolean;
1375
+ label?: string;
1376
+ organization_name?: string | null;
1377
+ preferred_warehouse_id?: string | null;
1378
+ preferred_warehouse_name?: string | null;
1379
+ token_expires_at?: string | null;
1380
+ updated_at?: string;
1381
+ };
1382
+ Relationships: [];
1383
+ };
1384
+ floriday_settings: {
1385
+ Row: {
1386
+ active_environment: string;
1387
+ id: number;
1388
+ updated_at: string;
1389
+ };
1390
+ Insert: {
1391
+ active_environment?: string;
1392
+ id?: number;
1393
+ updated_at?: string;
1394
+ };
1395
+ Update: {
1396
+ active_environment?: string;
1397
+ id?: number;
1398
+ updated_at?: string;
1399
+ };
1400
+ Relationships: [];
1401
+ };
1402
+ inventory_settings: {
1403
+ Row: {
1404
+ created_at: string;
1405
+ hierarchy_levels: string[];
1406
+ id: string;
1407
+ updated_at: string;
1408
+ visible_columns: string[];
1409
+ };
1410
+ Insert: {
1411
+ created_at?: string;
1412
+ hierarchy_levels?: string[];
1413
+ id?: string;
1414
+ updated_at?: string;
1415
+ visible_columns?: string[];
1416
+ };
1417
+ Update: {
1418
+ created_at?: string;
1419
+ hierarchy_levels?: string[];
1420
+ id?: string;
1421
+ updated_at?: string;
1422
+ visible_columns?: string[];
1423
+ };
1424
+ Relationships: [];
1425
+ };
1426
+ locations: {
1427
+ Row: {
1428
+ created_at: string;
1429
+ id: string;
1430
+ name: string;
1431
+ sort_order: number;
1432
+ updated_at: string;
1433
+ };
1434
+ Insert: {
1435
+ created_at?: string;
1436
+ id?: string;
1437
+ name: string;
1438
+ sort_order?: number;
1439
+ updated_at?: string;
1440
+ };
1441
+ Update: {
1442
+ created_at?: string;
1443
+ id?: string;
1444
+ name?: string;
1445
+ sort_order?: number;
1446
+ updated_at?: string;
1447
+ };
1448
+ Relationships: [];
1449
+ };
1450
+ notifications: {
1451
+ Row: {
1452
+ created_at: string;
1453
+ id: string;
1454
+ message: string | null;
1455
+ read: boolean;
1456
+ title: string;
1457
+ updated_at: string;
1458
+ user_id: string;
1459
+ };
1460
+ Insert: {
1461
+ created_at?: string;
1462
+ id?: string;
1463
+ message?: string | null;
1464
+ read?: boolean;
1465
+ title: string;
1466
+ updated_at?: string;
1467
+ user_id: string;
1468
+ };
1469
+ Update: {
1470
+ created_at?: string;
1471
+ id?: string;
1472
+ message?: string | null;
1473
+ read?: boolean;
1474
+ title?: string;
1475
+ updated_at?: string;
1476
+ user_id?: string;
1477
+ };
1478
+ Relationships: [];
1479
+ };
1480
+ order_field_options: {
1481
+ Row: {
1482
+ created_at: string;
1483
+ field_setting_id: string;
1484
+ id: string;
1485
+ label: string;
1486
+ sort_order: number;
1487
+ };
1488
+ Insert: {
1489
+ created_at?: string;
1490
+ field_setting_id: string;
1491
+ id?: string;
1492
+ label: string;
1493
+ sort_order?: number;
1494
+ };
1495
+ Update: {
1496
+ created_at?: string;
1497
+ field_setting_id?: string;
1498
+ id?: string;
1499
+ label?: string;
1500
+ sort_order?: number;
1501
+ };
1502
+ Relationships: [{
1503
+ foreignKeyName: "order_field_options_field_setting_id_fkey";
1504
+ columns: ["field_setting_id"];
1505
+ isOneToOne: false;
1506
+ referencedRelation: "order_field_settings";
1507
+ referencedColumns: ["id"];
1508
+ }];
1509
+ };
1510
+ order_field_settings: {
1511
+ Row: {
1512
+ active: boolean;
1513
+ created_at: string;
1514
+ field_key: string;
1515
+ field_label: string;
1516
+ field_type: string;
1517
+ id: string;
1518
+ is_custom: boolean;
1519
+ sort_order: number;
1520
+ updated_at: string;
1521
+ };
1522
+ Insert: {
1523
+ active?: boolean;
1524
+ created_at?: string;
1525
+ field_key: string;
1526
+ field_label: string;
1527
+ field_type?: string;
1528
+ id?: string;
1529
+ is_custom?: boolean;
1530
+ sort_order?: number;
1531
+ updated_at?: string;
1532
+ };
1533
+ Update: {
1534
+ active?: boolean;
1535
+ created_at?: string;
1536
+ field_key?: string;
1537
+ field_label?: string;
1538
+ field_type?: string;
1539
+ id?: string;
1540
+ is_custom?: boolean;
1541
+ sort_order?: number;
1542
+ updated_at?: string;
1543
+ };
1544
+ Relationships: [];
1545
+ };
1546
+ order_items: {
1547
+ Row: {
1548
+ created_at: string;
1549
+ id: string;
1550
+ order_id: string;
1551
+ product_id: string | null;
1552
+ product_name: string;
1553
+ quantity: number;
1554
+ unit: string;
1555
+ unit_price: number | null;
1556
+ };
1557
+ Insert: {
1558
+ created_at?: string;
1559
+ id?: string;
1560
+ order_id: string;
1561
+ product_id?: string | null;
1562
+ product_name: string;
1563
+ quantity?: number;
1564
+ unit?: string;
1565
+ unit_price?: number | null;
1566
+ };
1567
+ Update: {
1568
+ created_at?: string;
1569
+ id?: string;
1570
+ order_id?: string;
1571
+ product_id?: string | null;
1572
+ product_name?: string;
1573
+ quantity?: number;
1574
+ unit?: string;
1575
+ unit_price?: number | null;
1576
+ };
1577
+ Relationships: [{
1578
+ foreignKeyName: "order_items_order_id_fkey";
1579
+ columns: ["order_id"];
1580
+ isOneToOne: false;
1581
+ referencedRelation: "orders";
1582
+ referencedColumns: ["id"];
1583
+ }, {
1584
+ foreignKeyName: "order_items_product_id_fkey";
1585
+ columns: ["product_id"];
1586
+ isOneToOne: false;
1587
+ referencedRelation: "products";
1588
+ referencedColumns: ["id"];
1589
+ }];
1590
+ };
1591
+ orders: {
1592
+ Row: {
1593
+ created_at: string;
1594
+ custom_fields: import("../../integrations/supabase/types").Json;
1595
+ customer_id: string | null;
1596
+ customer_name: string;
1597
+ deleted_at: string | null;
1598
+ delivery_date: string;
1599
+ id: string;
1600
+ notes: string | null;
1601
+ order_date: string;
1602
+ order_number: string;
1603
+ status: string;
1604
+ total: string;
1605
+ updated_at: string;
1606
+ };
1607
+ Insert: {
1608
+ created_at?: string;
1609
+ custom_fields?: import("../../integrations/supabase/types").Json;
1610
+ customer_id?: string | null;
1611
+ customer_name?: string;
1612
+ deleted_at?: string | null;
1613
+ delivery_date: string;
1614
+ id?: string;
1615
+ notes?: string | null;
1616
+ order_date?: string;
1617
+ order_number: string;
1618
+ status?: string;
1619
+ total?: string;
1620
+ updated_at?: string;
1621
+ };
1622
+ Update: {
1623
+ created_at?: string;
1624
+ custom_fields?: import("../../integrations/supabase/types").Json;
1625
+ customer_id?: string | null;
1626
+ customer_name?: string;
1627
+ deleted_at?: string | null;
1628
+ delivery_date?: string;
1629
+ id?: string;
1630
+ notes?: string | null;
1631
+ order_date?: string;
1632
+ order_number?: string;
1633
+ status?: string;
1634
+ total?: string;
1635
+ updated_at?: string;
1636
+ };
1637
+ Relationships: [{
1638
+ foreignKeyName: "orders_customer_id_fkey";
1639
+ columns: ["customer_id"];
1640
+ isOneToOne: false;
1641
+ referencedRelation: "customers";
1642
+ referencedColumns: ["id"];
1643
+ }];
1644
+ };
1645
+ product_categories: {
1646
+ Row: {
1647
+ color: string;
1648
+ created_at: string;
1649
+ icon: string | null;
1650
+ id: string;
1651
+ name: string;
1652
+ slug: string;
1653
+ sort_order: number;
1654
+ updated_at: string;
1655
+ };
1656
+ Insert: {
1657
+ color?: string;
1658
+ created_at?: string;
1659
+ icon?: string | null;
1660
+ id?: string;
1661
+ name: string;
1662
+ slug: string;
1663
+ sort_order?: number;
1664
+ updated_at?: string;
1665
+ };
1666
+ Update: {
1667
+ color?: string;
1668
+ created_at?: string;
1669
+ icon?: string | null;
1670
+ id?: string;
1671
+ name?: string;
1672
+ slug?: string;
1673
+ sort_order?: number;
1674
+ updated_at?: string;
1675
+ };
1676
+ Relationships: [];
1677
+ };
1678
+ product_field_options: {
1679
+ Row: {
1680
+ created_at: string;
1681
+ field_setting_id: string;
1682
+ id: string;
1683
+ label: string;
1684
+ sort_order: number;
1685
+ };
1686
+ Insert: {
1687
+ created_at?: string;
1688
+ field_setting_id: string;
1689
+ id?: string;
1690
+ label: string;
1691
+ sort_order?: number;
1692
+ };
1693
+ Update: {
1694
+ created_at?: string;
1695
+ field_setting_id?: string;
1696
+ id?: string;
1697
+ label?: string;
1698
+ sort_order?: number;
1699
+ };
1700
+ Relationships: [{
1701
+ foreignKeyName: "product_field_options_field_setting_id_fkey";
1702
+ columns: ["field_setting_id"];
1703
+ isOneToOne: false;
1704
+ referencedRelation: "product_field_settings";
1705
+ referencedColumns: ["id"];
1706
+ }];
1707
+ };
1708
+ product_field_settings: {
1709
+ Row: {
1710
+ active_per_category: import("../../integrations/supabase/types").Json;
1711
+ created_at: string;
1712
+ field_key: string;
1713
+ field_label: string;
1714
+ field_type: string;
1715
+ id: string;
1716
+ is_custom: boolean;
1717
+ sort_order: number;
1718
+ updated_at: string;
1719
+ };
1720
+ Insert: {
1721
+ active_per_category?: import("../../integrations/supabase/types").Json;
1722
+ created_at?: string;
1723
+ field_key: string;
1724
+ field_label: string;
1725
+ field_type?: string;
1726
+ id?: string;
1727
+ is_custom?: boolean;
1728
+ sort_order?: number;
1729
+ updated_at?: string;
1730
+ };
1731
+ Update: {
1732
+ active_per_category?: import("../../integrations/supabase/types").Json;
1733
+ created_at?: string;
1734
+ field_key?: string;
1735
+ field_label?: string;
1736
+ field_type?: string;
1737
+ id?: string;
1738
+ is_custom?: boolean;
1739
+ sort_order?: number;
1740
+ updated_at?: string;
1741
+ };
1742
+ Relationships: [];
1743
+ };
1744
+ products: {
1745
+ Row: {
1746
+ barcode: string | null;
1747
+ batch: string;
1748
+ created_at: string;
1749
+ custom_fields: import("../../integrations/supabase/types").Json;
1750
+ id: string;
1751
+ image_url: string | null;
1752
+ incoming_quantity: number;
1753
+ location: string;
1754
+ min_quantity: number;
1755
+ product: string;
1756
+ product_type: string;
1757
+ purchase_price: number | null;
1758
+ quantity: number;
1759
+ sale_price: number | null;
1760
+ unit: string;
1761
+ updated_at: string;
1762
+ weight: string | null;
1763
+ };
1764
+ Insert: {
1765
+ barcode?: string | null;
1766
+ batch: string;
1767
+ created_at?: string;
1768
+ custom_fields?: import("../../integrations/supabase/types").Json;
1769
+ id?: string;
1770
+ image_url?: string | null;
1771
+ incoming_quantity?: number;
1772
+ location: string;
1773
+ min_quantity?: number;
1774
+ product: string;
1775
+ product_type?: string;
1776
+ purchase_price?: number | null;
1777
+ quantity?: number;
1778
+ sale_price?: number | null;
1779
+ unit?: string;
1780
+ updated_at?: string;
1781
+ weight?: string | null;
1782
+ };
1783
+ Update: {
1784
+ barcode?: string | null;
1785
+ batch?: string;
1786
+ created_at?: string;
1787
+ custom_fields?: import("../../integrations/supabase/types").Json;
1788
+ id?: string;
1789
+ image_url?: string | null;
1790
+ incoming_quantity?: number;
1791
+ location?: string;
1792
+ min_quantity?: number;
1793
+ product?: string;
1794
+ product_type?: string;
1795
+ purchase_price?: number | null;
1796
+ quantity?: number;
1797
+ sale_price?: number | null;
1798
+ unit?: string;
1799
+ updated_at?: string;
1800
+ weight?: string | null;
1801
+ };
1802
+ Relationships: [];
1803
+ };
1804
+ profiles: {
1805
+ Row: {
1806
+ created_at: string;
1807
+ display_name: string | null;
1808
+ email: string | null;
1809
+ id: string;
1810
+ notification_preferences: import("../../integrations/supabase/types").Json;
1811
+ updated_at: string;
1812
+ };
1813
+ Insert: {
1814
+ created_at?: string;
1815
+ display_name?: string | null;
1816
+ email?: string | null;
1817
+ id: string;
1818
+ notification_preferences?: import("../../integrations/supabase/types").Json;
1819
+ updated_at?: string;
1820
+ };
1821
+ Update: {
1822
+ created_at?: string;
1823
+ display_name?: string | null;
1824
+ email?: string | null;
1825
+ id?: string;
1826
+ notification_preferences?: import("../../integrations/supabase/types").Json;
1827
+ updated_at?: string;
1828
+ };
1829
+ Relationships: [];
1830
+ };
1831
+ purchase_order_items: {
1832
+ Row: {
1833
+ created_at: string;
1834
+ id: string;
1835
+ product_id: string | null;
1836
+ product_type: string;
1837
+ purchase_order_id: string;
1838
+ quantity: number;
1839
+ };
1840
+ Insert: {
1841
+ created_at?: string;
1842
+ id?: string;
1843
+ product_id?: string | null;
1844
+ product_type?: string;
1845
+ purchase_order_id: string;
1846
+ quantity?: number;
1847
+ };
1848
+ Update: {
1849
+ created_at?: string;
1850
+ id?: string;
1851
+ product_id?: string | null;
1852
+ product_type?: string;
1853
+ purchase_order_id?: string;
1854
+ quantity?: number;
1855
+ };
1856
+ Relationships: [{
1857
+ foreignKeyName: "purchase_order_items_product_id_fkey";
1858
+ columns: ["product_id"];
1859
+ isOneToOne: false;
1860
+ referencedRelation: "products";
1861
+ referencedColumns: ["id"];
1862
+ }, {
1863
+ foreignKeyName: "purchase_order_items_purchase_order_id_fkey";
1864
+ columns: ["purchase_order_id"];
1865
+ isOneToOne: false;
1866
+ referencedRelation: "purchase_orders";
1867
+ referencedColumns: ["id"];
1868
+ }];
1869
+ };
1870
+ purchase_orders: {
1871
+ Row: {
1872
+ created_at: string;
1873
+ expected_delivery_date: string;
1874
+ id: string;
1875
+ location_id: string | null;
1876
+ notes: string | null;
1877
+ order_number: string;
1878
+ status: string;
1879
+ supplier_id: string | null;
1880
+ supplier_name: string;
1881
+ updated_at: string;
1882
+ };
1883
+ Insert: {
1884
+ created_at?: string;
1885
+ expected_delivery_date: string;
1886
+ id?: string;
1887
+ location_id?: string | null;
1888
+ notes?: string | null;
1889
+ order_number: string;
1890
+ status?: string;
1891
+ supplier_id?: string | null;
1892
+ supplier_name?: string;
1893
+ updated_at?: string;
1894
+ };
1895
+ Update: {
1896
+ created_at?: string;
1897
+ expected_delivery_date?: string;
1898
+ id?: string;
1899
+ location_id?: string | null;
1900
+ notes?: string | null;
1901
+ order_number?: string;
1902
+ status?: string;
1903
+ supplier_id?: string | null;
1904
+ supplier_name?: string;
1905
+ updated_at?: string;
1906
+ };
1907
+ Relationships: [{
1908
+ foreignKeyName: "purchase_orders_location_id_fkey";
1909
+ columns: ["location_id"];
1910
+ isOneToOne: false;
1911
+ referencedRelation: "locations";
1912
+ referencedColumns: ["id"];
1913
+ }, {
1914
+ foreignKeyName: "purchase_orders_supplier_id_fkey";
1915
+ columns: ["supplier_id"];
1916
+ isOneToOne: false;
1917
+ referencedRelation: "suppliers";
1918
+ referencedColumns: ["id"];
1919
+ }];
1920
+ };
1921
+ supplier_products: {
1922
+ Row: {
1923
+ article_number: string | null;
1924
+ created_at: string;
1925
+ id: string;
1926
+ name: string;
1927
+ notes: string | null;
1928
+ pot_size: string | null;
1929
+ price: number | null;
1930
+ quantity: number | null;
1931
+ supplier_id: string;
1932
+ unit: string;
1933
+ updated_at: string;
1934
+ };
1935
+ Insert: {
1936
+ article_number?: string | null;
1937
+ created_at?: string;
1938
+ id?: string;
1939
+ name: string;
1940
+ notes?: string | null;
1941
+ pot_size?: string | null;
1942
+ price?: number | null;
1943
+ quantity?: number | null;
1944
+ supplier_id: string;
1945
+ unit?: string;
1946
+ updated_at?: string;
1947
+ };
1948
+ Update: {
1949
+ article_number?: string | null;
1950
+ created_at?: string;
1951
+ id?: string;
1952
+ name?: string;
1953
+ notes?: string | null;
1954
+ pot_size?: string | null;
1955
+ price?: number | null;
1956
+ quantity?: number | null;
1957
+ supplier_id?: string;
1958
+ unit?: string;
1959
+ updated_at?: string;
1960
+ };
1961
+ Relationships: [{
1962
+ foreignKeyName: "supplier_products_supplier_id_fkey";
1963
+ columns: ["supplier_id"];
1964
+ isOneToOne: false;
1965
+ referencedRelation: "suppliers";
1966
+ referencedColumns: ["id"];
1967
+ }];
1968
+ };
1969
+ suppliers: {
1970
+ Row: {
1971
+ address: string | null;
1972
+ column_mappings: import("../../integrations/supabase/types").Json | null;
1973
+ contact_person: string | null;
1974
+ created_at: string;
1975
+ default_product_type: string;
1976
+ email: string | null;
1977
+ id: string;
1978
+ imported_file_name: string | null;
1979
+ name: string;
1980
+ notes: string | null;
1981
+ phone: string | null;
1982
+ updated_at: string;
1983
+ };
1984
+ Insert: {
1985
+ address?: string | null;
1986
+ column_mappings?: import("../../integrations/supabase/types").Json | null;
1987
+ contact_person?: string | null;
1988
+ created_at?: string;
1989
+ default_product_type?: string;
1990
+ email?: string | null;
1991
+ id?: string;
1992
+ imported_file_name?: string | null;
1993
+ name: string;
1994
+ notes?: string | null;
1995
+ phone?: string | null;
1996
+ updated_at?: string;
1997
+ };
1998
+ Update: {
1999
+ address?: string | null;
2000
+ column_mappings?: import("../../integrations/supabase/types").Json | null;
2001
+ contact_person?: string | null;
2002
+ created_at?: string;
2003
+ default_product_type?: string;
2004
+ email?: string | null;
2005
+ id?: string;
2006
+ imported_file_name?: string | null;
2007
+ name?: string;
2008
+ notes?: string | null;
2009
+ phone?: string | null;
2010
+ updated_at?: string;
2011
+ };
2012
+ Relationships: [];
2013
+ };
2014
+ trade_item_drafts: {
2015
+ Row: {
2016
+ connection_id: string | null;
2017
+ created_at: string;
2018
+ data: import("../../integrations/supabase/types").Json;
2019
+ id: string;
2020
+ updated_at: string;
2021
+ user_id: string;
2022
+ };
2023
+ Insert: {
2024
+ connection_id?: string | null;
2025
+ created_at?: string;
2026
+ data?: import("../../integrations/supabase/types").Json;
2027
+ id?: string;
2028
+ updated_at?: string;
2029
+ user_id: string;
2030
+ };
2031
+ Update: {
2032
+ connection_id?: string | null;
2033
+ created_at?: string;
2034
+ data?: import("../../integrations/supabase/types").Json;
2035
+ id?: string;
2036
+ updated_at?: string;
2037
+ user_id?: string;
2038
+ };
2039
+ Relationships: [];
2040
+ };
2041
+ user_roles: {
2042
+ Row: {
2043
+ created_at: string;
2044
+ id: string;
2045
+ role: import("../../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
2046
+ user_id: string;
2047
+ };
2048
+ Insert: {
2049
+ created_at?: string;
2050
+ id?: string;
2051
+ role: import("../../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
2052
+ user_id: string;
2053
+ };
2054
+ Update: {
2055
+ created_at?: string;
2056
+ id?: string;
2057
+ role?: import("../../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
2058
+ user_id?: string;
2059
+ };
2060
+ Relationships: [{
2061
+ foreignKeyName: "user_roles_user_id_fkey";
2062
+ columns: ["user_id"];
2063
+ isOneToOne: false;
2064
+ referencedRelation: "profiles";
2065
+ referencedColumns: ["id"];
2066
+ }];
2067
+ };
2068
+ };
2069
+ Views: { [_ in never]: never; };
2070
+ Functions: {
2071
+ has_role: {
2072
+ Args: {
2073
+ _role: import("../../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
2074
+ _user_id: string;
2075
+ };
2076
+ Returns: boolean;
2077
+ };
2078
+ schedule_floriday_token_refresh: {
2079
+ Args: {
2080
+ p_apikey: string;
2081
+ p_url: string;
2082
+ };
2083
+ Returns: number;
2084
+ };
2085
+ };
2086
+ Enums: {
2087
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
2088
+ };
2089
+ CompositeTypes: { [_ in never]: never; };
2090
+ }, {
2091
+ PostgrestVersion: "14.5";
2092
+ }>;
2093
+ userId: string;
2094
+ claims: import("@supabase/auth-js").User;
2095
+ }, undefined, undefined, undefined>], (data: unknown) => {
2096
+ from?: string | undefined;
2097
+ to?: string | undefined;
2098
+ search?: string | undefined;
2099
+ status?: string | undefined;
2100
+ }, Promise<{
2101
+ csv: string;
2102
+ filename: string;
2103
+ }>>;
2104
+ export declare const createSalesOrder: import("@tanstack/start-client-core").OptionalFetcher<readonly [import("@tanstack/start-client-core").FunctionMiddlewareAfterServer<{}, unknown, undefined, {
2105
+ supabase: import("@supabase/supabase-js").SupabaseClient<import("../../integrations/supabase/types").Database, "public", "public", {
2106
+ Tables: {
2107
+ bugs: {
2108
+ Row: {
2109
+ attachment_url: string | null;
2110
+ created_at: string;
2111
+ description: string;
2112
+ id: string;
2113
+ priority: string;
2114
+ status: string;
2115
+ title: string;
2116
+ updated_at: string;
2117
+ user_id: string;
2118
+ };
2119
+ Insert: {
2120
+ attachment_url?: string | null;
2121
+ created_at?: string;
2122
+ description: string;
2123
+ id?: string;
2124
+ priority?: string;
2125
+ status?: string;
2126
+ title: string;
2127
+ updated_at?: string;
2128
+ user_id: string;
2129
+ };
2130
+ Update: {
2131
+ attachment_url?: string | null;
2132
+ created_at?: string;
2133
+ description?: string;
2134
+ id?: string;
2135
+ priority?: string;
2136
+ status?: string;
2137
+ title?: string;
2138
+ updated_at?: string;
2139
+ user_id?: string;
2140
+ };
2141
+ Relationships: [];
2142
+ };
2143
+ collections: {
2144
+ Row: {
2145
+ created_at: string;
2146
+ created_by: string | null;
2147
+ id: string;
2148
+ name: string;
2149
+ updated_at: string;
2150
+ };
2151
+ Insert: {
2152
+ created_at?: string;
2153
+ created_by?: string | null;
2154
+ id?: string;
2155
+ name: string;
2156
+ updated_at?: string;
2157
+ };
2158
+ Update: {
2159
+ created_at?: string;
2160
+ created_by?: string | null;
2161
+ id?: string;
2162
+ name?: string;
2163
+ updated_at?: string;
2164
+ };
2165
+ Relationships: [];
2166
+ };
2167
+ customer_field_options: {
2168
+ Row: {
2169
+ created_at: string;
2170
+ field_setting_id: string;
2171
+ id: string;
2172
+ label: string;
2173
+ sort_order: number;
2174
+ };
2175
+ Insert: {
2176
+ created_at?: string;
2177
+ field_setting_id: string;
2178
+ id?: string;
2179
+ label: string;
2180
+ sort_order?: number;
2181
+ };
2182
+ Update: {
2183
+ created_at?: string;
2184
+ field_setting_id?: string;
2185
+ id?: string;
2186
+ label?: string;
2187
+ sort_order?: number;
2188
+ };
2189
+ Relationships: [{
2190
+ foreignKeyName: "customer_field_options_field_setting_id_fkey";
2191
+ columns: ["field_setting_id"];
2192
+ isOneToOne: false;
2193
+ referencedRelation: "customer_field_settings";
2194
+ referencedColumns: ["id"];
2195
+ }];
2196
+ };
2197
+ customer_field_settings: {
2198
+ Row: {
2199
+ created_at: string;
2200
+ field_key: string;
2201
+ field_label: string;
2202
+ field_type: string;
2203
+ id: string;
2204
+ is_custom: boolean;
2205
+ sort_order: number;
2206
+ updated_at: string;
2207
+ };
2208
+ Insert: {
2209
+ created_at?: string;
2210
+ field_key: string;
2211
+ field_label: string;
2212
+ field_type?: string;
2213
+ id?: string;
2214
+ is_custom?: boolean;
2215
+ sort_order?: number;
2216
+ updated_at?: string;
2217
+ };
2218
+ Update: {
2219
+ created_at?: string;
2220
+ field_key?: string;
2221
+ field_label?: string;
2222
+ field_type?: string;
2223
+ id?: string;
2224
+ is_custom?: boolean;
2225
+ sort_order?: number;
2226
+ updated_at?: string;
2227
+ };
2228
+ Relationships: [];
2229
+ };
2230
+ customers: {
2231
+ Row: {
2232
+ address: string | null;
2233
+ city: string | null;
2234
+ company_name: string;
2235
+ country: string | null;
2236
+ created_at: string;
2237
+ custom_fields: import("../../integrations/supabase/types").Json;
2238
+ email: string | null;
2239
+ id: string;
2240
+ notes: string | null;
2241
+ phone: string | null;
2242
+ postal_code: string | null;
2243
+ updated_at: string;
2244
+ };
2245
+ Insert: {
2246
+ address?: string | null;
2247
+ city?: string | null;
2248
+ company_name: string;
2249
+ country?: string | null;
2250
+ created_at?: string;
2251
+ custom_fields?: import("../../integrations/supabase/types").Json;
2252
+ email?: string | null;
2253
+ id?: string;
2254
+ notes?: string | null;
2255
+ phone?: string | null;
2256
+ postal_code?: string | null;
2257
+ updated_at?: string;
2258
+ };
2259
+ Update: {
2260
+ address?: string | null;
2261
+ city?: string | null;
2262
+ company_name?: string;
2263
+ country?: string | null;
2264
+ created_at?: string;
2265
+ custom_fields?: import("../../integrations/supabase/types").Json;
2266
+ email?: string | null;
2267
+ id?: string;
2268
+ notes?: string | null;
2269
+ phone?: string | null;
2270
+ postal_code?: string | null;
2271
+ updated_at?: string;
2272
+ };
2273
+ Relationships: [];
2274
+ };
2275
+ floricode_connection_settings: {
2276
+ Row: {
2277
+ catalog_key: string | null;
2278
+ catalog_url: string;
2279
+ created_at: string;
2280
+ id: number;
2281
+ last_meta: import("../../integrations/supabase/types").Json | null;
2282
+ last_test_at: string | null;
2283
+ last_test_error: string | null;
2284
+ last_test_ok: boolean | null;
2285
+ updated_at: string;
2286
+ };
2287
+ Insert: {
2288
+ catalog_key?: string | null;
2289
+ catalog_url?: string;
2290
+ created_at?: string;
2291
+ id?: number;
2292
+ last_meta?: import("../../integrations/supabase/types").Json | null;
2293
+ last_test_at?: string | null;
2294
+ last_test_error?: string | null;
2295
+ last_test_ok?: boolean | null;
2296
+ updated_at?: string;
2297
+ };
2298
+ Update: {
2299
+ catalog_key?: string | null;
2300
+ catalog_url?: string;
2301
+ created_at?: string;
2302
+ id?: number;
2303
+ last_meta?: import("../../integrations/supabase/types").Json | null;
2304
+ last_test_at?: string | null;
2305
+ last_test_error?: string | null;
2306
+ last_test_ok?: boolean | null;
2307
+ updated_at?: string;
2308
+ };
2309
+ Relationships: [];
2310
+ };
2311
+ floricode_records: {
2312
+ Row: {
2313
+ change_date_time: string | null;
2314
+ data: import("../../integrations/supabase/types").Json;
2315
+ last_synced_at: string;
2316
+ record_id: string;
2317
+ resource: string;
2318
+ };
2319
+ Insert: {
2320
+ change_date_time?: string | null;
2321
+ data?: import("../../integrations/supabase/types").Json;
2322
+ last_synced_at?: string;
2323
+ record_id: string;
2324
+ resource: string;
2325
+ };
2326
+ Update: {
2327
+ change_date_time?: string | null;
2328
+ data?: import("../../integrations/supabase/types").Json;
2329
+ last_synced_at?: string;
2330
+ record_id?: string;
2331
+ resource?: string;
2332
+ };
2333
+ Relationships: [];
2334
+ };
2335
+ floricode_sync_state: {
2336
+ Row: {
2337
+ error_message: string | null;
2338
+ last_change_date_time: string | null;
2339
+ last_sequence_number: number;
2340
+ last_sync_at: string | null;
2341
+ resource: string;
2342
+ status: string;
2343
+ updated_at: string;
2344
+ };
2345
+ Insert: {
2346
+ error_message?: string | null;
2347
+ last_change_date_time?: string | null;
2348
+ last_sequence_number?: number;
2349
+ last_sync_at?: string | null;
2350
+ resource: string;
2351
+ status?: string;
2352
+ updated_at?: string;
2353
+ };
2354
+ Update: {
2355
+ error_message?: string | null;
2356
+ last_change_date_time?: string | null;
2357
+ last_sequence_number?: number;
2358
+ last_sync_at?: string | null;
2359
+ resource?: string;
2360
+ status?: string;
2361
+ updated_at?: string;
2362
+ };
2363
+ Relationships: [];
2364
+ };
2365
+ floriday_connections: {
2366
+ Row: {
2367
+ access_token: string | null;
2368
+ api_key: string;
2369
+ client_id: string;
2370
+ client_secret: string;
2371
+ created_at: string;
2372
+ environment: string;
2373
+ gln_code: string | null;
2374
+ id: string;
2375
+ is_active: boolean;
2376
+ label: string;
2377
+ organization_name: string | null;
2378
+ preferred_warehouse_id: string | null;
2379
+ preferred_warehouse_name: string | null;
2380
+ token_expires_at: string | null;
2381
+ updated_at: string;
2382
+ };
2383
+ Insert: {
2384
+ access_token?: string | null;
2385
+ api_key: string;
2386
+ client_id: string;
2387
+ client_secret: string;
2388
+ created_at?: string;
2389
+ environment: string;
2390
+ gln_code?: string | null;
2391
+ id?: string;
2392
+ is_active?: boolean;
2393
+ label?: string;
2394
+ organization_name?: string | null;
2395
+ preferred_warehouse_id?: string | null;
2396
+ preferred_warehouse_name?: string | null;
2397
+ token_expires_at?: string | null;
2398
+ updated_at?: string;
2399
+ };
2400
+ Update: {
2401
+ access_token?: string | null;
2402
+ api_key?: string;
2403
+ client_id?: string;
2404
+ client_secret?: string;
2405
+ created_at?: string;
2406
+ environment?: string;
2407
+ gln_code?: string | null;
2408
+ id?: string;
2409
+ is_active?: boolean;
2410
+ label?: string;
2411
+ organization_name?: string | null;
2412
+ preferred_warehouse_id?: string | null;
2413
+ preferred_warehouse_name?: string | null;
2414
+ token_expires_at?: string | null;
2415
+ updated_at?: string;
2416
+ };
2417
+ Relationships: [];
2418
+ };
2419
+ floriday_settings: {
2420
+ Row: {
2421
+ active_environment: string;
2422
+ id: number;
2423
+ updated_at: string;
2424
+ };
2425
+ Insert: {
2426
+ active_environment?: string;
2427
+ id?: number;
2428
+ updated_at?: string;
2429
+ };
2430
+ Update: {
2431
+ active_environment?: string;
2432
+ id?: number;
2433
+ updated_at?: string;
2434
+ };
2435
+ Relationships: [];
2436
+ };
2437
+ inventory_settings: {
2438
+ Row: {
2439
+ created_at: string;
2440
+ hierarchy_levels: string[];
2441
+ id: string;
2442
+ updated_at: string;
2443
+ visible_columns: string[];
2444
+ };
2445
+ Insert: {
2446
+ created_at?: string;
2447
+ hierarchy_levels?: string[];
2448
+ id?: string;
2449
+ updated_at?: string;
2450
+ visible_columns?: string[];
2451
+ };
2452
+ Update: {
2453
+ created_at?: string;
2454
+ hierarchy_levels?: string[];
2455
+ id?: string;
2456
+ updated_at?: string;
2457
+ visible_columns?: string[];
2458
+ };
2459
+ Relationships: [];
2460
+ };
2461
+ locations: {
2462
+ Row: {
2463
+ created_at: string;
2464
+ id: string;
2465
+ name: string;
2466
+ sort_order: number;
2467
+ updated_at: string;
2468
+ };
2469
+ Insert: {
2470
+ created_at?: string;
2471
+ id?: string;
2472
+ name: string;
2473
+ sort_order?: number;
2474
+ updated_at?: string;
2475
+ };
2476
+ Update: {
2477
+ created_at?: string;
2478
+ id?: string;
2479
+ name?: string;
2480
+ sort_order?: number;
2481
+ updated_at?: string;
2482
+ };
2483
+ Relationships: [];
2484
+ };
2485
+ notifications: {
2486
+ Row: {
2487
+ created_at: string;
2488
+ id: string;
2489
+ message: string | null;
2490
+ read: boolean;
2491
+ title: string;
2492
+ updated_at: string;
2493
+ user_id: string;
2494
+ };
2495
+ Insert: {
2496
+ created_at?: string;
2497
+ id?: string;
2498
+ message?: string | null;
2499
+ read?: boolean;
2500
+ title: string;
2501
+ updated_at?: string;
2502
+ user_id: string;
2503
+ };
2504
+ Update: {
2505
+ created_at?: string;
2506
+ id?: string;
2507
+ message?: string | null;
2508
+ read?: boolean;
2509
+ title?: string;
2510
+ updated_at?: string;
2511
+ user_id?: string;
2512
+ };
2513
+ Relationships: [];
2514
+ };
2515
+ order_field_options: {
2516
+ Row: {
2517
+ created_at: string;
2518
+ field_setting_id: string;
2519
+ id: string;
2520
+ label: string;
2521
+ sort_order: number;
2522
+ };
2523
+ Insert: {
2524
+ created_at?: string;
2525
+ field_setting_id: string;
2526
+ id?: string;
2527
+ label: string;
2528
+ sort_order?: number;
2529
+ };
2530
+ Update: {
2531
+ created_at?: string;
2532
+ field_setting_id?: string;
2533
+ id?: string;
2534
+ label?: string;
2535
+ sort_order?: number;
2536
+ };
2537
+ Relationships: [{
2538
+ foreignKeyName: "order_field_options_field_setting_id_fkey";
2539
+ columns: ["field_setting_id"];
2540
+ isOneToOne: false;
2541
+ referencedRelation: "order_field_settings";
2542
+ referencedColumns: ["id"];
2543
+ }];
2544
+ };
2545
+ order_field_settings: {
2546
+ Row: {
2547
+ active: boolean;
2548
+ created_at: string;
2549
+ field_key: string;
2550
+ field_label: string;
2551
+ field_type: string;
2552
+ id: string;
2553
+ is_custom: boolean;
2554
+ sort_order: number;
2555
+ updated_at: string;
2556
+ };
2557
+ Insert: {
2558
+ active?: boolean;
2559
+ created_at?: string;
2560
+ field_key: string;
2561
+ field_label: string;
2562
+ field_type?: string;
2563
+ id?: string;
2564
+ is_custom?: boolean;
2565
+ sort_order?: number;
2566
+ updated_at?: string;
2567
+ };
2568
+ Update: {
2569
+ active?: boolean;
2570
+ created_at?: string;
2571
+ field_key?: string;
2572
+ field_label?: string;
2573
+ field_type?: string;
2574
+ id?: string;
2575
+ is_custom?: boolean;
2576
+ sort_order?: number;
2577
+ updated_at?: string;
2578
+ };
2579
+ Relationships: [];
2580
+ };
2581
+ order_items: {
2582
+ Row: {
2583
+ created_at: string;
2584
+ id: string;
2585
+ order_id: string;
2586
+ product_id: string | null;
2587
+ product_name: string;
2588
+ quantity: number;
2589
+ unit: string;
2590
+ unit_price: number | null;
2591
+ };
2592
+ Insert: {
2593
+ created_at?: string;
2594
+ id?: string;
2595
+ order_id: string;
2596
+ product_id?: string | null;
2597
+ product_name: string;
2598
+ quantity?: number;
2599
+ unit?: string;
2600
+ unit_price?: number | null;
2601
+ };
2602
+ Update: {
2603
+ created_at?: string;
2604
+ id?: string;
2605
+ order_id?: string;
2606
+ product_id?: string | null;
2607
+ product_name?: string;
2608
+ quantity?: number;
2609
+ unit?: string;
2610
+ unit_price?: number | null;
2611
+ };
2612
+ Relationships: [{
2613
+ foreignKeyName: "order_items_order_id_fkey";
2614
+ columns: ["order_id"];
2615
+ isOneToOne: false;
2616
+ referencedRelation: "orders";
2617
+ referencedColumns: ["id"];
2618
+ }, {
2619
+ foreignKeyName: "order_items_product_id_fkey";
2620
+ columns: ["product_id"];
2621
+ isOneToOne: false;
2622
+ referencedRelation: "products";
2623
+ referencedColumns: ["id"];
2624
+ }];
2625
+ };
2626
+ orders: {
2627
+ Row: {
2628
+ created_at: string;
2629
+ custom_fields: import("../../integrations/supabase/types").Json;
2630
+ customer_id: string | null;
2631
+ customer_name: string;
2632
+ deleted_at: string | null;
2633
+ delivery_date: string;
2634
+ id: string;
2635
+ notes: string | null;
2636
+ order_date: string;
2637
+ order_number: string;
2638
+ status: string;
2639
+ total: string;
2640
+ updated_at: string;
2641
+ };
2642
+ Insert: {
2643
+ created_at?: string;
2644
+ custom_fields?: import("../../integrations/supabase/types").Json;
2645
+ customer_id?: string | null;
2646
+ customer_name?: string;
2647
+ deleted_at?: string | null;
2648
+ delivery_date: string;
2649
+ id?: string;
2650
+ notes?: string | null;
2651
+ order_date?: string;
2652
+ order_number: string;
2653
+ status?: string;
2654
+ total?: string;
2655
+ updated_at?: string;
2656
+ };
2657
+ Update: {
2658
+ created_at?: string;
2659
+ custom_fields?: import("../../integrations/supabase/types").Json;
2660
+ customer_id?: string | null;
2661
+ customer_name?: string;
2662
+ deleted_at?: string | null;
2663
+ delivery_date?: string;
2664
+ id?: string;
2665
+ notes?: string | null;
2666
+ order_date?: string;
2667
+ order_number?: string;
2668
+ status?: string;
2669
+ total?: string;
2670
+ updated_at?: string;
2671
+ };
2672
+ Relationships: [{
2673
+ foreignKeyName: "orders_customer_id_fkey";
2674
+ columns: ["customer_id"];
2675
+ isOneToOne: false;
2676
+ referencedRelation: "customers";
2677
+ referencedColumns: ["id"];
2678
+ }];
2679
+ };
2680
+ product_categories: {
2681
+ Row: {
2682
+ color: string;
2683
+ created_at: string;
2684
+ icon: string | null;
2685
+ id: string;
2686
+ name: string;
2687
+ slug: string;
2688
+ sort_order: number;
2689
+ updated_at: string;
2690
+ };
2691
+ Insert: {
2692
+ color?: string;
2693
+ created_at?: string;
2694
+ icon?: string | null;
2695
+ id?: string;
2696
+ name: string;
2697
+ slug: string;
2698
+ sort_order?: number;
2699
+ updated_at?: string;
2700
+ };
2701
+ Update: {
2702
+ color?: string;
2703
+ created_at?: string;
2704
+ icon?: string | null;
2705
+ id?: string;
2706
+ name?: string;
2707
+ slug?: string;
2708
+ sort_order?: number;
2709
+ updated_at?: string;
2710
+ };
2711
+ Relationships: [];
2712
+ };
2713
+ product_field_options: {
2714
+ Row: {
2715
+ created_at: string;
2716
+ field_setting_id: string;
2717
+ id: string;
2718
+ label: string;
2719
+ sort_order: number;
2720
+ };
2721
+ Insert: {
2722
+ created_at?: string;
2723
+ field_setting_id: string;
2724
+ id?: string;
2725
+ label: string;
2726
+ sort_order?: number;
2727
+ };
2728
+ Update: {
2729
+ created_at?: string;
2730
+ field_setting_id?: string;
2731
+ id?: string;
2732
+ label?: string;
2733
+ sort_order?: number;
2734
+ };
2735
+ Relationships: [{
2736
+ foreignKeyName: "product_field_options_field_setting_id_fkey";
2737
+ columns: ["field_setting_id"];
2738
+ isOneToOne: false;
2739
+ referencedRelation: "product_field_settings";
2740
+ referencedColumns: ["id"];
2741
+ }];
2742
+ };
2743
+ product_field_settings: {
2744
+ Row: {
2745
+ active_per_category: import("../../integrations/supabase/types").Json;
2746
+ created_at: string;
2747
+ field_key: string;
2748
+ field_label: string;
2749
+ field_type: string;
2750
+ id: string;
2751
+ is_custom: boolean;
2752
+ sort_order: number;
2753
+ updated_at: string;
2754
+ };
2755
+ Insert: {
2756
+ active_per_category?: import("../../integrations/supabase/types").Json;
2757
+ created_at?: string;
2758
+ field_key: string;
2759
+ field_label: string;
2760
+ field_type?: string;
2761
+ id?: string;
2762
+ is_custom?: boolean;
2763
+ sort_order?: number;
2764
+ updated_at?: string;
2765
+ };
2766
+ Update: {
2767
+ active_per_category?: import("../../integrations/supabase/types").Json;
2768
+ created_at?: string;
2769
+ field_key?: string;
2770
+ field_label?: string;
2771
+ field_type?: string;
2772
+ id?: string;
2773
+ is_custom?: boolean;
2774
+ sort_order?: number;
2775
+ updated_at?: string;
2776
+ };
2777
+ Relationships: [];
2778
+ };
2779
+ products: {
2780
+ Row: {
2781
+ barcode: string | null;
2782
+ batch: string;
2783
+ created_at: string;
2784
+ custom_fields: import("../../integrations/supabase/types").Json;
2785
+ id: string;
2786
+ image_url: string | null;
2787
+ incoming_quantity: number;
2788
+ location: string;
2789
+ min_quantity: number;
2790
+ product: string;
2791
+ product_type: string;
2792
+ purchase_price: number | null;
2793
+ quantity: number;
2794
+ sale_price: number | null;
2795
+ unit: string;
2796
+ updated_at: string;
2797
+ weight: string | null;
2798
+ };
2799
+ Insert: {
2800
+ barcode?: string | null;
2801
+ batch: string;
2802
+ created_at?: string;
2803
+ custom_fields?: import("../../integrations/supabase/types").Json;
2804
+ id?: string;
2805
+ image_url?: string | null;
2806
+ incoming_quantity?: number;
2807
+ location: string;
2808
+ min_quantity?: number;
2809
+ product: string;
2810
+ product_type?: string;
2811
+ purchase_price?: number | null;
2812
+ quantity?: number;
2813
+ sale_price?: number | null;
2814
+ unit?: string;
2815
+ updated_at?: string;
2816
+ weight?: string | null;
2817
+ };
2818
+ Update: {
2819
+ barcode?: string | null;
2820
+ batch?: string;
2821
+ created_at?: string;
2822
+ custom_fields?: import("../../integrations/supabase/types").Json;
2823
+ id?: string;
2824
+ image_url?: string | null;
2825
+ incoming_quantity?: number;
2826
+ location?: string;
2827
+ min_quantity?: number;
2828
+ product?: string;
2829
+ product_type?: string;
2830
+ purchase_price?: number | null;
2831
+ quantity?: number;
2832
+ sale_price?: number | null;
2833
+ unit?: string;
2834
+ updated_at?: string;
2835
+ weight?: string | null;
2836
+ };
2837
+ Relationships: [];
2838
+ };
2839
+ profiles: {
2840
+ Row: {
2841
+ created_at: string;
2842
+ display_name: string | null;
2843
+ email: string | null;
2844
+ id: string;
2845
+ notification_preferences: import("../../integrations/supabase/types").Json;
2846
+ updated_at: string;
2847
+ };
2848
+ Insert: {
2849
+ created_at?: string;
2850
+ display_name?: string | null;
2851
+ email?: string | null;
2852
+ id: string;
2853
+ notification_preferences?: import("../../integrations/supabase/types").Json;
2854
+ updated_at?: string;
2855
+ };
2856
+ Update: {
2857
+ created_at?: string;
2858
+ display_name?: string | null;
2859
+ email?: string | null;
2860
+ id?: string;
2861
+ notification_preferences?: import("../../integrations/supabase/types").Json;
2862
+ updated_at?: string;
2863
+ };
2864
+ Relationships: [];
2865
+ };
2866
+ purchase_order_items: {
2867
+ Row: {
2868
+ created_at: string;
2869
+ id: string;
2870
+ product_id: string | null;
2871
+ product_type: string;
2872
+ purchase_order_id: string;
2873
+ quantity: number;
2874
+ };
2875
+ Insert: {
2876
+ created_at?: string;
2877
+ id?: string;
2878
+ product_id?: string | null;
2879
+ product_type?: string;
2880
+ purchase_order_id: string;
2881
+ quantity?: number;
2882
+ };
2883
+ Update: {
2884
+ created_at?: string;
2885
+ id?: string;
2886
+ product_id?: string | null;
2887
+ product_type?: string;
2888
+ purchase_order_id?: string;
2889
+ quantity?: number;
2890
+ };
2891
+ Relationships: [{
2892
+ foreignKeyName: "purchase_order_items_product_id_fkey";
2893
+ columns: ["product_id"];
2894
+ isOneToOne: false;
2895
+ referencedRelation: "products";
2896
+ referencedColumns: ["id"];
2897
+ }, {
2898
+ foreignKeyName: "purchase_order_items_purchase_order_id_fkey";
2899
+ columns: ["purchase_order_id"];
2900
+ isOneToOne: false;
2901
+ referencedRelation: "purchase_orders";
2902
+ referencedColumns: ["id"];
2903
+ }];
2904
+ };
2905
+ purchase_orders: {
2906
+ Row: {
2907
+ created_at: string;
2908
+ expected_delivery_date: string;
2909
+ id: string;
2910
+ location_id: string | null;
2911
+ notes: string | null;
2912
+ order_number: string;
2913
+ status: string;
2914
+ supplier_id: string | null;
2915
+ supplier_name: string;
2916
+ updated_at: string;
2917
+ };
2918
+ Insert: {
2919
+ created_at?: string;
2920
+ expected_delivery_date: string;
2921
+ id?: string;
2922
+ location_id?: string | null;
2923
+ notes?: string | null;
2924
+ order_number: string;
2925
+ status?: string;
2926
+ supplier_id?: string | null;
2927
+ supplier_name?: string;
2928
+ updated_at?: string;
2929
+ };
2930
+ Update: {
2931
+ created_at?: string;
2932
+ expected_delivery_date?: string;
2933
+ id?: string;
2934
+ location_id?: string | null;
2935
+ notes?: string | null;
2936
+ order_number?: string;
2937
+ status?: string;
2938
+ supplier_id?: string | null;
2939
+ supplier_name?: string;
2940
+ updated_at?: string;
2941
+ };
2942
+ Relationships: [{
2943
+ foreignKeyName: "purchase_orders_location_id_fkey";
2944
+ columns: ["location_id"];
2945
+ isOneToOne: false;
2946
+ referencedRelation: "locations";
2947
+ referencedColumns: ["id"];
2948
+ }, {
2949
+ foreignKeyName: "purchase_orders_supplier_id_fkey";
2950
+ columns: ["supplier_id"];
2951
+ isOneToOne: false;
2952
+ referencedRelation: "suppliers";
2953
+ referencedColumns: ["id"];
2954
+ }];
2955
+ };
2956
+ supplier_products: {
2957
+ Row: {
2958
+ article_number: string | null;
2959
+ created_at: string;
2960
+ id: string;
2961
+ name: string;
2962
+ notes: string | null;
2963
+ pot_size: string | null;
2964
+ price: number | null;
2965
+ quantity: number | null;
2966
+ supplier_id: string;
2967
+ unit: string;
2968
+ updated_at: string;
2969
+ };
2970
+ Insert: {
2971
+ article_number?: string | null;
2972
+ created_at?: string;
2973
+ id?: string;
2974
+ name: string;
2975
+ notes?: string | null;
2976
+ pot_size?: string | null;
2977
+ price?: number | null;
2978
+ quantity?: number | null;
2979
+ supplier_id: string;
2980
+ unit?: string;
2981
+ updated_at?: string;
2982
+ };
2983
+ Update: {
2984
+ article_number?: string | null;
2985
+ created_at?: string;
2986
+ id?: string;
2987
+ name?: string;
2988
+ notes?: string | null;
2989
+ pot_size?: string | null;
2990
+ price?: number | null;
2991
+ quantity?: number | null;
2992
+ supplier_id?: string;
2993
+ unit?: string;
2994
+ updated_at?: string;
2995
+ };
2996
+ Relationships: [{
2997
+ foreignKeyName: "supplier_products_supplier_id_fkey";
2998
+ columns: ["supplier_id"];
2999
+ isOneToOne: false;
3000
+ referencedRelation: "suppliers";
3001
+ referencedColumns: ["id"];
3002
+ }];
3003
+ };
3004
+ suppliers: {
3005
+ Row: {
3006
+ address: string | null;
3007
+ column_mappings: import("../../integrations/supabase/types").Json | null;
3008
+ contact_person: string | null;
3009
+ created_at: string;
3010
+ default_product_type: string;
3011
+ email: string | null;
3012
+ id: string;
3013
+ imported_file_name: string | null;
3014
+ name: string;
3015
+ notes: string | null;
3016
+ phone: string | null;
3017
+ updated_at: string;
3018
+ };
3019
+ Insert: {
3020
+ address?: string | null;
3021
+ column_mappings?: import("../../integrations/supabase/types").Json | null;
3022
+ contact_person?: string | null;
3023
+ created_at?: string;
3024
+ default_product_type?: string;
3025
+ email?: string | null;
3026
+ id?: string;
3027
+ imported_file_name?: string | null;
3028
+ name: string;
3029
+ notes?: string | null;
3030
+ phone?: string | null;
3031
+ updated_at?: string;
3032
+ };
3033
+ Update: {
3034
+ address?: string | null;
3035
+ column_mappings?: import("../../integrations/supabase/types").Json | null;
3036
+ contact_person?: string | null;
3037
+ created_at?: string;
3038
+ default_product_type?: string;
3039
+ email?: string | null;
3040
+ id?: string;
3041
+ imported_file_name?: string | null;
3042
+ name?: string;
3043
+ notes?: string | null;
3044
+ phone?: string | null;
3045
+ updated_at?: string;
3046
+ };
3047
+ Relationships: [];
3048
+ };
3049
+ trade_item_drafts: {
3050
+ Row: {
3051
+ connection_id: string | null;
3052
+ created_at: string;
3053
+ data: import("../../integrations/supabase/types").Json;
3054
+ id: string;
3055
+ updated_at: string;
3056
+ user_id: string;
3057
+ };
3058
+ Insert: {
3059
+ connection_id?: string | null;
3060
+ created_at?: string;
3061
+ data?: import("../../integrations/supabase/types").Json;
3062
+ id?: string;
3063
+ updated_at?: string;
3064
+ user_id: string;
3065
+ };
3066
+ Update: {
3067
+ connection_id?: string | null;
3068
+ created_at?: string;
3069
+ data?: import("../../integrations/supabase/types").Json;
3070
+ id?: string;
3071
+ updated_at?: string;
3072
+ user_id?: string;
3073
+ };
3074
+ Relationships: [];
3075
+ };
3076
+ user_roles: {
3077
+ Row: {
3078
+ created_at: string;
3079
+ id: string;
3080
+ role: import("../../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
3081
+ user_id: string;
3082
+ };
3083
+ Insert: {
3084
+ created_at?: string;
3085
+ id?: string;
3086
+ role: import("../../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
3087
+ user_id: string;
3088
+ };
3089
+ Update: {
3090
+ created_at?: string;
3091
+ id?: string;
3092
+ role?: import("../../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
3093
+ user_id?: string;
3094
+ };
3095
+ Relationships: [{
3096
+ foreignKeyName: "user_roles_user_id_fkey";
3097
+ columns: ["user_id"];
3098
+ isOneToOne: false;
3099
+ referencedRelation: "profiles";
3100
+ referencedColumns: ["id"];
3101
+ }];
3102
+ };
3103
+ };
3104
+ Views: { [_ in never]: never; };
3105
+ Functions: {
3106
+ has_role: {
3107
+ Args: {
3108
+ _role: import("../../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
3109
+ _user_id: string;
3110
+ };
3111
+ Returns: boolean;
3112
+ };
3113
+ schedule_floriday_token_refresh: {
3114
+ Args: {
3115
+ p_apikey: string;
3116
+ p_url: string;
3117
+ };
3118
+ Returns: number;
3119
+ };
3120
+ };
3121
+ Enums: {
3122
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
3123
+ };
3124
+ CompositeTypes: { [_ in never]: never; };
3125
+ }, {
3126
+ PostgrestVersion: "14.5";
3127
+ }>;
3128
+ userId: string;
3129
+ claims: import("@supabase/auth-js").User;
3130
+ }, undefined, undefined, undefined>], (data: unknown) => {
3131
+ customerOrganizationId: string;
3132
+ deliveryDateTime: string;
3133
+ lines: {
3134
+ tradeItemId: string;
3135
+ numberOfPieces: number;
3136
+ pricePerPiece: number;
3137
+ }[];
3138
+ reference?: string | undefined;
3139
+ }, Promise<{
3140
+ id: any;
3141
+ ok: true;
3142
+ }>>;
3143
+ //# sourceMappingURL=sales-orders.functions.d.ts.map