@flowselections/floriday-klanten-module 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 (71) 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/CustomerAvatar.d.ts +7 -0
  5. package/dist-lib/components/CustomerAvatar.d.ts.map +1 -0
  6. package/dist-lib/components/CustomerAvatar.js +18 -0
  7. package/dist-lib/components/TemplatePage.d.ts +2 -0
  8. package/dist-lib/components/TemplatePage.d.ts.map +1 -0
  9. package/dist-lib/components/TemplatePage.js +4 -0
  10. package/dist-lib/components/settings/CustomerFieldsCard.d.ts +2 -0
  11. package/dist-lib/components/settings/CustomerFieldsCard.d.ts.map +1 -0
  12. package/dist-lib/components/settings/CustomerFieldsCard.js +59 -0
  13. package/dist-lib/index.d.ts +5 -0
  14. package/dist-lib/index.d.ts.map +1 -0
  15. package/dist-lib/index.js +32 -0
  16. package/dist-lib/integrations/supabase/auth-attacher.d.ts +2 -0
  17. package/dist-lib/integrations/supabase/auth-attacher.d.ts.map +1 -0
  18. package/dist-lib/integrations/supabase/auth-attacher.js +12 -0
  19. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1560 -0
  20. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -0
  21. package/dist-lib/integrations/supabase/auth-middleware.js +52 -0
  22. package/dist-lib/integrations/supabase/client.d.ts +1556 -0
  23. package/dist-lib/integrations/supabase/client.d.ts.map +1 -0
  24. package/dist-lib/integrations/supabase/client.js +28 -0
  25. package/dist-lib/integrations/supabase/client.server.d.ts +1556 -0
  26. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -0
  27. package/dist-lib/integrations/supabase/client.server.js +50 -0
  28. package/dist-lib/integrations/supabase/types.d.ts +1656 -0
  29. package/dist-lib/integrations/supabase/types.d.ts.map +1 -0
  30. package/dist-lib/integrations/supabase/types.js +8 -0
  31. package/dist-lib/lib/accounting/exact/client.server.d.ts +37 -0
  32. package/dist-lib/lib/accounting/exact/client.server.d.ts.map +1 -0
  33. package/dist-lib/lib/accounting/exact/client.server.js +160 -0
  34. package/dist-lib/lib/accounting/exact/mapping.d.ts +39 -0
  35. package/dist-lib/lib/accounting/exact/mapping.d.ts.map +1 -0
  36. package/dist-lib/lib/accounting/exact/mapping.js +45 -0
  37. package/dist-lib/lib/accounting/exact/sync.server.d.ts +4 -0
  38. package/dist-lib/lib/accounting/exact/sync.server.d.ts.map +1 -0
  39. package/dist-lib/lib/accounting/exact/sync.server.js +181 -0
  40. package/dist-lib/lib/accounting/floriday/sync.server.d.ts +3 -0
  41. package/dist-lib/lib/accounting/floriday/sync.server.d.ts.map +1 -0
  42. package/dist-lib/lib/accounting/floriday/sync.server.js +17 -0
  43. package/dist-lib/lib/accounting/registry.server.d.ts +4 -0
  44. package/dist-lib/lib/accounting/registry.server.d.ts.map +1 -0
  45. package/dist-lib/lib/accounting/registry.server.js +9 -0
  46. package/dist-lib/lib/accounting/types.d.ts +24 -0
  47. package/dist-lib/lib/accounting/types.d.ts.map +1 -0
  48. package/dist-lib/lib/accounting/types.js +4 -0
  49. package/dist-lib/lib/accounting.functions.d.ts +4682 -0
  50. package/dist-lib/lib/accounting.functions.d.ts.map +1 -0
  51. package/dist-lib/lib/accounting.functions.js +50 -0
  52. package/dist-lib/lib/crypto.server.d.ts +10 -0
  53. package/dist-lib/lib/crypto.server.d.ts.map +1 -0
  54. package/dist-lib/lib/crypto.server.js +61 -0
  55. package/dist-lib/lib/customer-schemas.d.ts +53 -0
  56. package/dist-lib/lib/customer-schemas.d.ts.map +1 -0
  57. package/dist-lib/lib/customer-schemas.js +31 -0
  58. package/dist-lib/lib/customers.functions.d.ts +15904 -0
  59. package/dist-lib/lib/customers.functions.d.ts.map +1 -0
  60. package/dist-lib/lib/customers.functions.js +251 -0
  61. package/dist-lib/lib/floriday.server.d.ts +55 -0
  62. package/dist-lib/lib/floriday.server.d.ts.map +1 -0
  63. package/dist-lib/lib/floriday.server.js +765 -0
  64. package/dist-lib/lib/utils.d.ts +3 -0
  65. package/dist-lib/lib/utils.d.ts.map +1 -0
  66. package/dist-lib/lib/utils.js +5 -0
  67. package/dist-lib/lib/validationSchemas.d.ts +15 -0
  68. package/dist-lib/lib/validationSchemas.d.ts.map +1 -0
  69. package/dist-lib/lib/validationSchemas.js +25 -0
  70. package/dist-lib/styles.css +1 -0
  71. package/package.json +74 -0
@@ -0,0 +1,1560 @@
1
+ import type { Database } from './types';
2
+ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").FunctionMiddlewareAfterServer<{}, unknown, undefined, {
3
+ supabase: import("@supabase/supabase-js").SupabaseClient<Database, "public", "public", {
4
+ Tables: {
5
+ bugs: {
6
+ Row: {
7
+ attachment_url: string | null;
8
+ created_at: string;
9
+ description: string;
10
+ id: string;
11
+ priority: string;
12
+ status: string;
13
+ title: string;
14
+ updated_at: string;
15
+ user_id: string;
16
+ };
17
+ Insert: {
18
+ attachment_url?: string | null;
19
+ created_at?: string;
20
+ description: string;
21
+ id?: string;
22
+ priority?: string;
23
+ status?: string;
24
+ title: string;
25
+ updated_at?: string;
26
+ user_id: string;
27
+ };
28
+ Update: {
29
+ attachment_url?: string | null;
30
+ created_at?: string;
31
+ description?: string;
32
+ id?: string;
33
+ priority?: string;
34
+ status?: string;
35
+ title?: string;
36
+ updated_at?: string;
37
+ user_id?: string;
38
+ };
39
+ Relationships: [];
40
+ };
41
+ collections: {
42
+ Row: {
43
+ created_at: string;
44
+ created_by: string | null;
45
+ id: string;
46
+ name: string;
47
+ updated_at: string;
48
+ };
49
+ Insert: {
50
+ created_at?: string;
51
+ created_by?: string | null;
52
+ id?: string;
53
+ name: string;
54
+ updated_at?: string;
55
+ };
56
+ Update: {
57
+ created_at?: string;
58
+ created_by?: string | null;
59
+ id?: string;
60
+ name?: string;
61
+ updated_at?: string;
62
+ };
63
+ Relationships: [];
64
+ };
65
+ customer_audit_log: {
66
+ Row: {
67
+ action: string;
68
+ changes: import("./types").Json;
69
+ created_at: string;
70
+ customer_id: string;
71
+ id: string;
72
+ user_id: string | null;
73
+ };
74
+ Insert: {
75
+ action: string;
76
+ changes?: import("./types").Json;
77
+ created_at?: string;
78
+ customer_id: string;
79
+ id?: string;
80
+ user_id?: string | null;
81
+ };
82
+ Update: {
83
+ action?: string;
84
+ changes?: import("./types").Json;
85
+ created_at?: string;
86
+ customer_id?: string;
87
+ id?: string;
88
+ user_id?: string | null;
89
+ };
90
+ Relationships: [{
91
+ foreignKeyName: "customer_audit_log_customer_id_fkey";
92
+ columns: ["customer_id"];
93
+ isOneToOne: false;
94
+ referencedRelation: "customers";
95
+ referencedColumns: ["id"];
96
+ }];
97
+ };
98
+ customer_contacts: {
99
+ Row: {
100
+ created_at: string;
101
+ customer_id: string;
102
+ email: string | null;
103
+ floriday_contact_id: string | null;
104
+ full_name: string;
105
+ id: string;
106
+ is_active: boolean;
107
+ job_title: string | null;
108
+ phone: string | null;
109
+ photo_url: string | null;
110
+ raw: import("./types").Json | null;
111
+ updated_at: string;
112
+ };
113
+ Insert: {
114
+ created_at?: string;
115
+ customer_id: string;
116
+ email?: string | null;
117
+ floriday_contact_id?: string | null;
118
+ full_name: string;
119
+ id?: string;
120
+ is_active?: boolean;
121
+ job_title?: string | null;
122
+ phone?: string | null;
123
+ photo_url?: string | null;
124
+ raw?: import("./types").Json | null;
125
+ updated_at?: string;
126
+ };
127
+ Update: {
128
+ created_at?: string;
129
+ customer_id?: string;
130
+ email?: string | null;
131
+ floriday_contact_id?: string | null;
132
+ full_name?: string;
133
+ id?: string;
134
+ is_active?: boolean;
135
+ job_title?: string | null;
136
+ phone?: string | null;
137
+ photo_url?: string | null;
138
+ raw?: import("./types").Json | null;
139
+ updated_at?: string;
140
+ };
141
+ Relationships: [{
142
+ foreignKeyName: "customer_contacts_customer_id_fkey";
143
+ columns: ["customer_id"];
144
+ isOneToOne: false;
145
+ referencedRelation: "customers";
146
+ referencedColumns: ["id"];
147
+ }];
148
+ };
149
+ customer_delivery_locations: {
150
+ Row: {
151
+ address_line: string | null;
152
+ city: string | null;
153
+ country: string | null;
154
+ created_at: string;
155
+ customer_id: string;
156
+ floriday_location_id: string | null;
157
+ gln: string | null;
158
+ id: string;
159
+ is_primary: boolean;
160
+ name: string | null;
161
+ postal_code: string | null;
162
+ raw: import("./types").Json | null;
163
+ updated_at: string;
164
+ };
165
+ Insert: {
166
+ address_line?: string | null;
167
+ city?: string | null;
168
+ country?: string | null;
169
+ created_at?: string;
170
+ customer_id: string;
171
+ floriday_location_id?: string | null;
172
+ gln?: string | null;
173
+ id?: string;
174
+ is_primary?: boolean;
175
+ name?: string | null;
176
+ postal_code?: string | null;
177
+ raw?: import("./types").Json | null;
178
+ updated_at?: string;
179
+ };
180
+ Update: {
181
+ address_line?: string | null;
182
+ city?: string | null;
183
+ country?: string | null;
184
+ created_at?: string;
185
+ customer_id?: string;
186
+ floriday_location_id?: string | null;
187
+ gln?: string | null;
188
+ id?: string;
189
+ is_primary?: boolean;
190
+ name?: string | null;
191
+ postal_code?: string | null;
192
+ raw?: import("./types").Json | null;
193
+ updated_at?: string;
194
+ };
195
+ Relationships: [{
196
+ foreignKeyName: "customer_delivery_locations_customer_id_fkey";
197
+ columns: ["customer_id"];
198
+ isOneToOne: false;
199
+ referencedRelation: "customers";
200
+ referencedColumns: ["id"];
201
+ }];
202
+ };
203
+ customer_field_options: {
204
+ Row: {
205
+ created_at: string;
206
+ field_setting_id: string;
207
+ id: string;
208
+ label: string;
209
+ sort_order: number;
210
+ };
211
+ Insert: {
212
+ created_at?: string;
213
+ field_setting_id: string;
214
+ id?: string;
215
+ label: string;
216
+ sort_order?: number;
217
+ };
218
+ Update: {
219
+ created_at?: string;
220
+ field_setting_id?: string;
221
+ id?: string;
222
+ label?: string;
223
+ sort_order?: number;
224
+ };
225
+ Relationships: [{
226
+ foreignKeyName: "customer_field_options_field_setting_id_fkey";
227
+ columns: ["field_setting_id"];
228
+ isOneToOne: false;
229
+ referencedRelation: "customer_field_settings";
230
+ referencedColumns: ["id"];
231
+ }];
232
+ };
233
+ customer_field_settings: {
234
+ Row: {
235
+ created_at: string;
236
+ field_key: string;
237
+ field_label: string;
238
+ field_type: string;
239
+ id: string;
240
+ is_custom: boolean;
241
+ sort_order: number;
242
+ updated_at: string;
243
+ };
244
+ Insert: {
245
+ created_at?: string;
246
+ field_key: string;
247
+ field_label: string;
248
+ field_type?: string;
249
+ id?: string;
250
+ is_custom?: boolean;
251
+ sort_order?: number;
252
+ updated_at?: string;
253
+ };
254
+ Update: {
255
+ created_at?: string;
256
+ field_key?: string;
257
+ field_label?: string;
258
+ field_type?: string;
259
+ id?: string;
260
+ is_custom?: boolean;
261
+ sort_order?: number;
262
+ updated_at?: string;
263
+ };
264
+ Relationships: [];
265
+ };
266
+ customer_selected_assortment: {
267
+ Row: {
268
+ article_number: string | null;
269
+ created_at: string;
270
+ customer_id: string;
271
+ floriday_item_id: string | null;
272
+ id: string;
273
+ price: number | null;
274
+ product_group: string | null;
275
+ product_name: string;
276
+ raw: import("./types").Json | null;
277
+ unit: string | null;
278
+ updated_at: string;
279
+ };
280
+ Insert: {
281
+ article_number?: string | null;
282
+ created_at?: string;
283
+ customer_id: string;
284
+ floriday_item_id?: string | null;
285
+ id?: string;
286
+ price?: number | null;
287
+ product_group?: string | null;
288
+ product_name: string;
289
+ raw?: import("./types").Json | null;
290
+ unit?: string | null;
291
+ updated_at?: string;
292
+ };
293
+ Update: {
294
+ article_number?: string | null;
295
+ created_at?: string;
296
+ customer_id?: string;
297
+ floriday_item_id?: string | null;
298
+ id?: string;
299
+ price?: number | null;
300
+ product_group?: string | null;
301
+ product_name?: string;
302
+ raw?: import("./types").Json | null;
303
+ unit?: string | null;
304
+ updated_at?: string;
305
+ };
306
+ Relationships: [{
307
+ foreignKeyName: "customer_selected_assortment_customer_id_fkey";
308
+ columns: ["customer_id"];
309
+ isOneToOne: false;
310
+ referencedRelation: "customers";
311
+ referencedColumns: ["id"];
312
+ }];
313
+ };
314
+ customer_trade_settings: {
315
+ Row: {
316
+ category: string;
317
+ created_at: string;
318
+ customer_id: string;
319
+ id: string;
320
+ is_active: boolean;
321
+ raw: import("./types").Json | null;
322
+ setting_key: string;
323
+ setting_label: string;
324
+ updated_at: string;
325
+ };
326
+ Insert: {
327
+ category?: string;
328
+ created_at?: string;
329
+ customer_id: string;
330
+ id?: string;
331
+ is_active?: boolean;
332
+ raw?: import("./types").Json | null;
333
+ setting_key: string;
334
+ setting_label: string;
335
+ updated_at?: string;
336
+ };
337
+ Update: {
338
+ category?: string;
339
+ created_at?: string;
340
+ customer_id?: string;
341
+ id?: string;
342
+ is_active?: boolean;
343
+ raw?: import("./types").Json | null;
344
+ setting_key?: string;
345
+ setting_label?: string;
346
+ updated_at?: string;
347
+ };
348
+ Relationships: [{
349
+ foreignKeyName: "customer_trade_settings_customer_id_fkey";
350
+ columns: ["customer_id"];
351
+ isOneToOne: false;
352
+ referencedRelation: "customers";
353
+ referencedColumns: ["id"];
354
+ }];
355
+ };
356
+ customers: {
357
+ Row: {
358
+ address: string | null;
359
+ bio: string | null;
360
+ city: string | null;
361
+ commercial_name: string | null;
362
+ company_name: string;
363
+ connection_status: string;
364
+ contact_person: string | null;
365
+ country: string | null;
366
+ created_at: string;
367
+ custom_fields: import("./types").Json;
368
+ customer_class: string | null;
369
+ email: string | null;
370
+ external_id: string | null;
371
+ floriday_connection_id: string | null;
372
+ floriday_organization_id: string | null;
373
+ floriday_raw: import("./types").Json | null;
374
+ gln: string | null;
375
+ house_number: string | null;
376
+ id: string;
377
+ is_active: boolean;
378
+ last_synced_at: string | null;
379
+ logo_url: string | null;
380
+ markets: string[];
381
+ notes: string | null;
382
+ organization_type: string | null;
383
+ payment_methods: string[];
384
+ phone: string | null;
385
+ postal_code: string | null;
386
+ product_groups: string[];
387
+ segments: string[];
388
+ source: string;
389
+ street: string | null;
390
+ sync_error: string | null;
391
+ sync_status: string;
392
+ trade_forms: string[];
393
+ updated_at: string;
394
+ vat_number: string | null;
395
+ website: string | null;
396
+ };
397
+ Insert: {
398
+ address?: string | null;
399
+ bio?: string | null;
400
+ city?: string | null;
401
+ commercial_name?: string | null;
402
+ company_name: string;
403
+ connection_status?: string;
404
+ contact_person?: string | null;
405
+ country?: string | null;
406
+ created_at?: string;
407
+ custom_fields?: import("./types").Json;
408
+ customer_class?: string | null;
409
+ email?: string | null;
410
+ external_id?: string | null;
411
+ floriday_connection_id?: string | null;
412
+ floriday_organization_id?: string | null;
413
+ floriday_raw?: import("./types").Json | null;
414
+ gln?: string | null;
415
+ house_number?: string | null;
416
+ id?: string;
417
+ is_active?: boolean;
418
+ last_synced_at?: string | null;
419
+ logo_url?: string | null;
420
+ markets?: string[];
421
+ notes?: string | null;
422
+ organization_type?: string | null;
423
+ payment_methods?: string[];
424
+ phone?: string | null;
425
+ postal_code?: string | null;
426
+ product_groups?: string[];
427
+ segments?: string[];
428
+ source?: string;
429
+ street?: string | null;
430
+ sync_error?: string | null;
431
+ sync_status?: string;
432
+ trade_forms?: string[];
433
+ updated_at?: string;
434
+ vat_number?: string | null;
435
+ website?: string | null;
436
+ };
437
+ Update: {
438
+ address?: string | null;
439
+ bio?: string | null;
440
+ city?: string | null;
441
+ commercial_name?: string | null;
442
+ company_name?: string;
443
+ connection_status?: string;
444
+ contact_person?: string | null;
445
+ country?: string | null;
446
+ created_at?: string;
447
+ custom_fields?: import("./types").Json;
448
+ customer_class?: string | null;
449
+ email?: string | null;
450
+ external_id?: string | null;
451
+ floriday_connection_id?: string | null;
452
+ floriday_organization_id?: string | null;
453
+ floriday_raw?: import("./types").Json | null;
454
+ gln?: string | null;
455
+ house_number?: string | null;
456
+ id?: string;
457
+ is_active?: boolean;
458
+ last_synced_at?: string | null;
459
+ logo_url?: string | null;
460
+ markets?: string[];
461
+ notes?: string | null;
462
+ organization_type?: string | null;
463
+ payment_methods?: string[];
464
+ phone?: string | null;
465
+ postal_code?: string | null;
466
+ product_groups?: string[];
467
+ segments?: string[];
468
+ source?: string;
469
+ street?: string | null;
470
+ sync_error?: string | null;
471
+ sync_status?: string;
472
+ trade_forms?: string[];
473
+ updated_at?: string;
474
+ vat_number?: string | null;
475
+ website?: string | null;
476
+ };
477
+ Relationships: [];
478
+ };
479
+ exact_connections: {
480
+ Row: {
481
+ access_token_encrypted: string;
482
+ company_name: string | null;
483
+ connected_at: string;
484
+ connected_by: string | null;
485
+ division_code: number | null;
486
+ environment: Database["public"]["Enums"]["exact_env"];
487
+ expires_at: string;
488
+ id: string;
489
+ refresh_token_encrypted: string;
490
+ status: string;
491
+ updated_at: string;
492
+ };
493
+ Insert: {
494
+ access_token_encrypted: string;
495
+ company_name?: string | null;
496
+ connected_at?: string;
497
+ connected_by?: string | null;
498
+ division_code?: number | null;
499
+ environment: Database["public"]["Enums"]["exact_env"];
500
+ expires_at: string;
501
+ id?: string;
502
+ refresh_token_encrypted: string;
503
+ status?: string;
504
+ updated_at?: string;
505
+ };
506
+ Update: {
507
+ access_token_encrypted?: string;
508
+ company_name?: string | null;
509
+ connected_at?: string;
510
+ connected_by?: string | null;
511
+ division_code?: number | null;
512
+ environment?: Database["public"]["Enums"]["exact_env"];
513
+ expires_at?: string;
514
+ id?: string;
515
+ refresh_token_encrypted?: string;
516
+ status?: string;
517
+ updated_at?: string;
518
+ };
519
+ Relationships: [];
520
+ };
521
+ exact_credentials: {
522
+ Row: {
523
+ client_id: string;
524
+ client_secret_encrypted: string;
525
+ created_at: string;
526
+ environment: Database["public"]["Enums"]["exact_env"];
527
+ id: string;
528
+ redirect_uri: string;
529
+ updated_at: string;
530
+ };
531
+ Insert: {
532
+ client_id: string;
533
+ client_secret_encrypted: string;
534
+ created_at?: string;
535
+ environment: Database["public"]["Enums"]["exact_env"];
536
+ id?: string;
537
+ redirect_uri: string;
538
+ updated_at?: string;
539
+ };
540
+ Update: {
541
+ client_id?: string;
542
+ client_secret_encrypted?: string;
543
+ created_at?: string;
544
+ environment?: Database["public"]["Enums"]["exact_env"];
545
+ id?: string;
546
+ redirect_uri?: string;
547
+ updated_at?: string;
548
+ };
549
+ Relationships: [];
550
+ };
551
+ exact_customers_cache: {
552
+ Row: {
553
+ connection_id: string;
554
+ data: import("./types").Json;
555
+ exact_id: string;
556
+ fetched_at: string;
557
+ };
558
+ Insert: {
559
+ connection_id: string;
560
+ data?: import("./types").Json;
561
+ exact_id: string;
562
+ fetched_at?: string;
563
+ };
564
+ Update: {
565
+ connection_id?: string;
566
+ data?: import("./types").Json;
567
+ exact_id?: string;
568
+ fetched_at?: string;
569
+ };
570
+ Relationships: [];
571
+ };
572
+ exact_sync_state: {
573
+ Row: {
574
+ connection_id: string;
575
+ last_error: string | null;
576
+ last_modified_cursor: string | null;
577
+ last_synced_at: string | null;
578
+ status: string;
579
+ updated_at: string;
580
+ };
581
+ Insert: {
582
+ connection_id: string;
583
+ last_error?: string | null;
584
+ last_modified_cursor?: string | null;
585
+ last_synced_at?: string | null;
586
+ status?: string;
587
+ updated_at?: string;
588
+ };
589
+ Update: {
590
+ connection_id?: string;
591
+ last_error?: string | null;
592
+ last_modified_cursor?: string | null;
593
+ last_synced_at?: string | null;
594
+ status?: string;
595
+ updated_at?: string;
596
+ };
597
+ Relationships: [];
598
+ };
599
+ floricode_connection_settings: {
600
+ Row: {
601
+ catalog_key: string | null;
602
+ catalog_url: string;
603
+ created_at: string;
604
+ id: number;
605
+ last_meta: import("./types").Json | null;
606
+ last_test_at: string | null;
607
+ last_test_error: string | null;
608
+ last_test_ok: boolean | null;
609
+ updated_at: string;
610
+ };
611
+ Insert: {
612
+ catalog_key?: string | null;
613
+ catalog_url?: string;
614
+ created_at?: string;
615
+ id?: number;
616
+ last_meta?: import("./types").Json | null;
617
+ last_test_at?: string | null;
618
+ last_test_error?: string | null;
619
+ last_test_ok?: boolean | null;
620
+ updated_at?: string;
621
+ };
622
+ Update: {
623
+ catalog_key?: string | null;
624
+ catalog_url?: string;
625
+ created_at?: string;
626
+ id?: number;
627
+ last_meta?: import("./types").Json | null;
628
+ last_test_at?: string | null;
629
+ last_test_error?: string | null;
630
+ last_test_ok?: boolean | null;
631
+ updated_at?: string;
632
+ };
633
+ Relationships: [];
634
+ };
635
+ floricode_records: {
636
+ Row: {
637
+ change_date_time: string | null;
638
+ data: import("./types").Json;
639
+ last_synced_at: string;
640
+ record_id: string;
641
+ resource: string;
642
+ };
643
+ Insert: {
644
+ change_date_time?: string | null;
645
+ data?: import("./types").Json;
646
+ last_synced_at?: string;
647
+ record_id: string;
648
+ resource: string;
649
+ };
650
+ Update: {
651
+ change_date_time?: string | null;
652
+ data?: import("./types").Json;
653
+ last_synced_at?: string;
654
+ record_id?: string;
655
+ resource?: string;
656
+ };
657
+ Relationships: [];
658
+ };
659
+ floricode_sync_state: {
660
+ Row: {
661
+ error_message: string | null;
662
+ last_change_date_time: string | null;
663
+ last_sequence_number: number;
664
+ last_sync_at: string | null;
665
+ resource: string;
666
+ status: string;
667
+ updated_at: string;
668
+ };
669
+ Insert: {
670
+ error_message?: string | null;
671
+ last_change_date_time?: string | null;
672
+ last_sequence_number?: number;
673
+ last_sync_at?: string | null;
674
+ resource: string;
675
+ status?: string;
676
+ updated_at?: string;
677
+ };
678
+ Update: {
679
+ error_message?: string | null;
680
+ last_change_date_time?: string | null;
681
+ last_sequence_number?: number;
682
+ last_sync_at?: string | null;
683
+ resource?: string;
684
+ status?: string;
685
+ updated_at?: string;
686
+ };
687
+ Relationships: [];
688
+ };
689
+ floriday_connections: {
690
+ Row: {
691
+ access_token: string | null;
692
+ api_key: string;
693
+ client_id: string;
694
+ client_secret: string;
695
+ created_at: string;
696
+ customers_endpoint: string | null;
697
+ environment: string;
698
+ gln_code: string | null;
699
+ id: string;
700
+ is_active: boolean;
701
+ label: string;
702
+ organization_name: string | null;
703
+ preferred_warehouse_id: string | null;
704
+ preferred_warehouse_name: string | null;
705
+ token_expires_at: string | null;
706
+ updated_at: string;
707
+ };
708
+ Insert: {
709
+ access_token?: string | null;
710
+ api_key: string;
711
+ client_id: string;
712
+ client_secret: string;
713
+ created_at?: string;
714
+ customers_endpoint?: string | null;
715
+ environment: string;
716
+ gln_code?: string | null;
717
+ id?: string;
718
+ is_active?: boolean;
719
+ label?: string;
720
+ organization_name?: string | null;
721
+ preferred_warehouse_id?: string | null;
722
+ preferred_warehouse_name?: string | null;
723
+ token_expires_at?: string | null;
724
+ updated_at?: string;
725
+ };
726
+ Update: {
727
+ access_token?: string | null;
728
+ api_key?: string;
729
+ client_id?: string;
730
+ client_secret?: string;
731
+ created_at?: string;
732
+ customers_endpoint?: string | null;
733
+ environment?: string;
734
+ gln_code?: string | null;
735
+ id?: string;
736
+ is_active?: boolean;
737
+ label?: string;
738
+ organization_name?: string | null;
739
+ preferred_warehouse_id?: string | null;
740
+ preferred_warehouse_name?: string | null;
741
+ token_expires_at?: string | null;
742
+ updated_at?: string;
743
+ };
744
+ Relationships: [];
745
+ };
746
+ floriday_customers_cache: {
747
+ Row: {
748
+ connection_id: string | null;
749
+ data: import("./types").Json;
750
+ fetched_at: string;
751
+ organization_id: string;
752
+ };
753
+ Insert: {
754
+ connection_id?: string | null;
755
+ data?: import("./types").Json;
756
+ fetched_at?: string;
757
+ organization_id: string;
758
+ };
759
+ Update: {
760
+ connection_id?: string | null;
761
+ data?: import("./types").Json;
762
+ fetched_at?: string;
763
+ organization_id?: string;
764
+ };
765
+ Relationships: [{
766
+ foreignKeyName: "floriday_customers_cache_connection_id_fkey";
767
+ columns: ["connection_id"];
768
+ isOneToOne: false;
769
+ referencedRelation: "floriday_connections";
770
+ referencedColumns: ["id"];
771
+ }];
772
+ };
773
+ floriday_network_cache: {
774
+ Row: {
775
+ city: string | null;
776
+ connection_id: string;
777
+ country: string | null;
778
+ data: import("./types").Json;
779
+ fetched_at: string;
780
+ gln: string | null;
781
+ organization_id: string;
782
+ organization_name: string | null;
783
+ };
784
+ Insert: {
785
+ city?: string | null;
786
+ connection_id: string;
787
+ country?: string | null;
788
+ data?: import("./types").Json;
789
+ fetched_at?: string;
790
+ gln?: string | null;
791
+ organization_id: string;
792
+ organization_name?: string | null;
793
+ };
794
+ Update: {
795
+ city?: string | null;
796
+ connection_id?: string;
797
+ country?: string | null;
798
+ data?: import("./types").Json;
799
+ fetched_at?: string;
800
+ gln?: string | null;
801
+ organization_id?: string;
802
+ organization_name?: string | null;
803
+ };
804
+ Relationships: [];
805
+ };
806
+ floriday_network_sync_state: {
807
+ Row: {
808
+ connection_id: string;
809
+ last_error: string | null;
810
+ last_sequence_number: number;
811
+ last_synced_at: string | null;
812
+ updated_at: string;
813
+ };
814
+ Insert: {
815
+ connection_id: string;
816
+ last_error?: string | null;
817
+ last_sequence_number?: number;
818
+ last_synced_at?: string | null;
819
+ updated_at?: string;
820
+ };
821
+ Update: {
822
+ connection_id?: string;
823
+ last_error?: string | null;
824
+ last_sequence_number?: number;
825
+ last_synced_at?: string | null;
826
+ updated_at?: string;
827
+ };
828
+ Relationships: [];
829
+ };
830
+ floriday_settings: {
831
+ Row: {
832
+ active_environment: string;
833
+ id: number;
834
+ updated_at: string;
835
+ };
836
+ Insert: {
837
+ active_environment?: string;
838
+ id?: number;
839
+ updated_at?: string;
840
+ };
841
+ Update: {
842
+ active_environment?: string;
843
+ id?: number;
844
+ updated_at?: string;
845
+ };
846
+ Relationships: [];
847
+ };
848
+ inventory_settings: {
849
+ Row: {
850
+ created_at: string;
851
+ hierarchy_levels: string[];
852
+ id: string;
853
+ updated_at: string;
854
+ visible_columns: string[];
855
+ };
856
+ Insert: {
857
+ created_at?: string;
858
+ hierarchy_levels?: string[];
859
+ id?: string;
860
+ updated_at?: string;
861
+ visible_columns?: string[];
862
+ };
863
+ Update: {
864
+ created_at?: string;
865
+ hierarchy_levels?: string[];
866
+ id?: string;
867
+ updated_at?: string;
868
+ visible_columns?: string[];
869
+ };
870
+ Relationships: [];
871
+ };
872
+ locations: {
873
+ Row: {
874
+ created_at: string;
875
+ id: string;
876
+ name: string;
877
+ sort_order: number;
878
+ updated_at: string;
879
+ };
880
+ Insert: {
881
+ created_at?: string;
882
+ id?: string;
883
+ name: string;
884
+ sort_order?: number;
885
+ updated_at?: string;
886
+ };
887
+ Update: {
888
+ created_at?: string;
889
+ id?: string;
890
+ name?: string;
891
+ sort_order?: number;
892
+ updated_at?: string;
893
+ };
894
+ Relationships: [];
895
+ };
896
+ notifications: {
897
+ Row: {
898
+ created_at: string;
899
+ id: string;
900
+ message: string | null;
901
+ read: boolean;
902
+ title: string;
903
+ updated_at: string;
904
+ user_id: string;
905
+ };
906
+ Insert: {
907
+ created_at?: string;
908
+ id?: string;
909
+ message?: string | null;
910
+ read?: boolean;
911
+ title: string;
912
+ updated_at?: string;
913
+ user_id: string;
914
+ };
915
+ Update: {
916
+ created_at?: string;
917
+ id?: string;
918
+ message?: string | null;
919
+ read?: boolean;
920
+ title?: string;
921
+ updated_at?: string;
922
+ user_id?: string;
923
+ };
924
+ Relationships: [];
925
+ };
926
+ order_field_options: {
927
+ Row: {
928
+ created_at: string;
929
+ field_setting_id: string;
930
+ id: string;
931
+ label: string;
932
+ sort_order: number;
933
+ };
934
+ Insert: {
935
+ created_at?: string;
936
+ field_setting_id: string;
937
+ id?: string;
938
+ label: string;
939
+ sort_order?: number;
940
+ };
941
+ Update: {
942
+ created_at?: string;
943
+ field_setting_id?: string;
944
+ id?: string;
945
+ label?: string;
946
+ sort_order?: number;
947
+ };
948
+ Relationships: [{
949
+ foreignKeyName: "order_field_options_field_setting_id_fkey";
950
+ columns: ["field_setting_id"];
951
+ isOneToOne: false;
952
+ referencedRelation: "order_field_settings";
953
+ referencedColumns: ["id"];
954
+ }];
955
+ };
956
+ order_field_settings: {
957
+ Row: {
958
+ active: boolean;
959
+ created_at: string;
960
+ field_key: string;
961
+ field_label: string;
962
+ field_type: string;
963
+ id: string;
964
+ is_custom: boolean;
965
+ sort_order: number;
966
+ updated_at: string;
967
+ };
968
+ Insert: {
969
+ active?: boolean;
970
+ created_at?: string;
971
+ field_key: string;
972
+ field_label: string;
973
+ field_type?: string;
974
+ id?: string;
975
+ is_custom?: boolean;
976
+ sort_order?: number;
977
+ updated_at?: string;
978
+ };
979
+ Update: {
980
+ active?: boolean;
981
+ created_at?: string;
982
+ field_key?: string;
983
+ field_label?: string;
984
+ field_type?: string;
985
+ id?: string;
986
+ is_custom?: boolean;
987
+ sort_order?: number;
988
+ updated_at?: string;
989
+ };
990
+ Relationships: [];
991
+ };
992
+ order_items: {
993
+ Row: {
994
+ created_at: string;
995
+ id: string;
996
+ order_id: string;
997
+ product_id: string | null;
998
+ product_name: string;
999
+ quantity: number;
1000
+ unit: string;
1001
+ unit_price: number | null;
1002
+ };
1003
+ Insert: {
1004
+ created_at?: string;
1005
+ id?: string;
1006
+ order_id: string;
1007
+ product_id?: string | null;
1008
+ product_name: string;
1009
+ quantity?: number;
1010
+ unit?: string;
1011
+ unit_price?: number | null;
1012
+ };
1013
+ Update: {
1014
+ created_at?: string;
1015
+ id?: string;
1016
+ order_id?: string;
1017
+ product_id?: string | null;
1018
+ product_name?: string;
1019
+ quantity?: number;
1020
+ unit?: string;
1021
+ unit_price?: number | null;
1022
+ };
1023
+ Relationships: [{
1024
+ foreignKeyName: "order_items_order_id_fkey";
1025
+ columns: ["order_id"];
1026
+ isOneToOne: false;
1027
+ referencedRelation: "orders";
1028
+ referencedColumns: ["id"];
1029
+ }, {
1030
+ foreignKeyName: "order_items_product_id_fkey";
1031
+ columns: ["product_id"];
1032
+ isOneToOne: false;
1033
+ referencedRelation: "products";
1034
+ referencedColumns: ["id"];
1035
+ }];
1036
+ };
1037
+ orders: {
1038
+ Row: {
1039
+ created_at: string;
1040
+ custom_fields: import("./types").Json;
1041
+ customer_id: string | null;
1042
+ customer_name: string;
1043
+ deleted_at: string | null;
1044
+ delivery_date: string;
1045
+ id: string;
1046
+ notes: string | null;
1047
+ order_date: string;
1048
+ order_number: string;
1049
+ status: string;
1050
+ total: string;
1051
+ updated_at: string;
1052
+ };
1053
+ Insert: {
1054
+ created_at?: string;
1055
+ custom_fields?: import("./types").Json;
1056
+ customer_id?: string | null;
1057
+ customer_name?: string;
1058
+ deleted_at?: string | null;
1059
+ delivery_date: string;
1060
+ id?: string;
1061
+ notes?: string | null;
1062
+ order_date?: string;
1063
+ order_number: string;
1064
+ status?: string;
1065
+ total?: string;
1066
+ updated_at?: string;
1067
+ };
1068
+ Update: {
1069
+ created_at?: string;
1070
+ custom_fields?: import("./types").Json;
1071
+ customer_id?: string | null;
1072
+ customer_name?: string;
1073
+ deleted_at?: string | null;
1074
+ delivery_date?: string;
1075
+ id?: string;
1076
+ notes?: string | null;
1077
+ order_date?: string;
1078
+ order_number?: string;
1079
+ status?: string;
1080
+ total?: string;
1081
+ updated_at?: string;
1082
+ };
1083
+ Relationships: [{
1084
+ foreignKeyName: "orders_customer_id_fkey";
1085
+ columns: ["customer_id"];
1086
+ isOneToOne: false;
1087
+ referencedRelation: "customers";
1088
+ referencedColumns: ["id"];
1089
+ }];
1090
+ };
1091
+ product_categories: {
1092
+ Row: {
1093
+ color: string;
1094
+ created_at: string;
1095
+ icon: string | null;
1096
+ id: string;
1097
+ name: string;
1098
+ slug: string;
1099
+ sort_order: number;
1100
+ updated_at: string;
1101
+ };
1102
+ Insert: {
1103
+ color?: string;
1104
+ created_at?: string;
1105
+ icon?: string | null;
1106
+ id?: string;
1107
+ name: string;
1108
+ slug: string;
1109
+ sort_order?: number;
1110
+ updated_at?: string;
1111
+ };
1112
+ Update: {
1113
+ color?: string;
1114
+ created_at?: string;
1115
+ icon?: string | null;
1116
+ id?: string;
1117
+ name?: string;
1118
+ slug?: string;
1119
+ sort_order?: number;
1120
+ updated_at?: string;
1121
+ };
1122
+ Relationships: [];
1123
+ };
1124
+ product_field_options: {
1125
+ Row: {
1126
+ created_at: string;
1127
+ field_setting_id: string;
1128
+ id: string;
1129
+ label: string;
1130
+ sort_order: number;
1131
+ };
1132
+ Insert: {
1133
+ created_at?: string;
1134
+ field_setting_id: string;
1135
+ id?: string;
1136
+ label: string;
1137
+ sort_order?: number;
1138
+ };
1139
+ Update: {
1140
+ created_at?: string;
1141
+ field_setting_id?: string;
1142
+ id?: string;
1143
+ label?: string;
1144
+ sort_order?: number;
1145
+ };
1146
+ Relationships: [{
1147
+ foreignKeyName: "product_field_options_field_setting_id_fkey";
1148
+ columns: ["field_setting_id"];
1149
+ isOneToOne: false;
1150
+ referencedRelation: "product_field_settings";
1151
+ referencedColumns: ["id"];
1152
+ }];
1153
+ };
1154
+ product_field_settings: {
1155
+ Row: {
1156
+ active_per_category: import("./types").Json;
1157
+ created_at: string;
1158
+ field_key: string;
1159
+ field_label: string;
1160
+ field_type: string;
1161
+ id: string;
1162
+ is_custom: boolean;
1163
+ sort_order: number;
1164
+ updated_at: string;
1165
+ };
1166
+ Insert: {
1167
+ active_per_category?: import("./types").Json;
1168
+ created_at?: string;
1169
+ field_key: string;
1170
+ field_label: string;
1171
+ field_type?: string;
1172
+ id?: string;
1173
+ is_custom?: boolean;
1174
+ sort_order?: number;
1175
+ updated_at?: string;
1176
+ };
1177
+ Update: {
1178
+ active_per_category?: import("./types").Json;
1179
+ created_at?: string;
1180
+ field_key?: string;
1181
+ field_label?: string;
1182
+ field_type?: string;
1183
+ id?: string;
1184
+ is_custom?: boolean;
1185
+ sort_order?: number;
1186
+ updated_at?: string;
1187
+ };
1188
+ Relationships: [];
1189
+ };
1190
+ products: {
1191
+ Row: {
1192
+ barcode: string | null;
1193
+ batch: string;
1194
+ created_at: string;
1195
+ custom_fields: import("./types").Json;
1196
+ id: string;
1197
+ image_url: string | null;
1198
+ incoming_quantity: number;
1199
+ location: string;
1200
+ min_quantity: number;
1201
+ product: string;
1202
+ product_type: string;
1203
+ purchase_price: number | null;
1204
+ quantity: number;
1205
+ sale_price: number | null;
1206
+ unit: string;
1207
+ updated_at: string;
1208
+ weight: string | null;
1209
+ };
1210
+ Insert: {
1211
+ barcode?: string | null;
1212
+ batch: string;
1213
+ created_at?: string;
1214
+ custom_fields?: import("./types").Json;
1215
+ id?: string;
1216
+ image_url?: string | null;
1217
+ incoming_quantity?: number;
1218
+ location: string;
1219
+ min_quantity?: number;
1220
+ product: string;
1221
+ product_type?: string;
1222
+ purchase_price?: number | null;
1223
+ quantity?: number;
1224
+ sale_price?: number | null;
1225
+ unit?: string;
1226
+ updated_at?: string;
1227
+ weight?: string | null;
1228
+ };
1229
+ Update: {
1230
+ barcode?: string | null;
1231
+ batch?: string;
1232
+ created_at?: string;
1233
+ custom_fields?: import("./types").Json;
1234
+ id?: string;
1235
+ image_url?: string | null;
1236
+ incoming_quantity?: number;
1237
+ location?: string;
1238
+ min_quantity?: number;
1239
+ product?: string;
1240
+ product_type?: string;
1241
+ purchase_price?: number | null;
1242
+ quantity?: number;
1243
+ sale_price?: number | null;
1244
+ unit?: string;
1245
+ updated_at?: string;
1246
+ weight?: string | null;
1247
+ };
1248
+ Relationships: [];
1249
+ };
1250
+ profiles: {
1251
+ Row: {
1252
+ created_at: string;
1253
+ display_name: string | null;
1254
+ email: string | null;
1255
+ id: string;
1256
+ notification_preferences: import("./types").Json;
1257
+ updated_at: string;
1258
+ };
1259
+ Insert: {
1260
+ created_at?: string;
1261
+ display_name?: string | null;
1262
+ email?: string | null;
1263
+ id: string;
1264
+ notification_preferences?: import("./types").Json;
1265
+ updated_at?: string;
1266
+ };
1267
+ Update: {
1268
+ created_at?: string;
1269
+ display_name?: string | null;
1270
+ email?: string | null;
1271
+ id?: string;
1272
+ notification_preferences?: import("./types").Json;
1273
+ updated_at?: string;
1274
+ };
1275
+ Relationships: [];
1276
+ };
1277
+ purchase_order_items: {
1278
+ Row: {
1279
+ created_at: string;
1280
+ id: string;
1281
+ product_id: string | null;
1282
+ product_type: string;
1283
+ purchase_order_id: string;
1284
+ quantity: number;
1285
+ };
1286
+ Insert: {
1287
+ created_at?: string;
1288
+ id?: string;
1289
+ product_id?: string | null;
1290
+ product_type?: string;
1291
+ purchase_order_id: string;
1292
+ quantity?: number;
1293
+ };
1294
+ Update: {
1295
+ created_at?: string;
1296
+ id?: string;
1297
+ product_id?: string | null;
1298
+ product_type?: string;
1299
+ purchase_order_id?: string;
1300
+ quantity?: number;
1301
+ };
1302
+ Relationships: [{
1303
+ foreignKeyName: "purchase_order_items_product_id_fkey";
1304
+ columns: ["product_id"];
1305
+ isOneToOne: false;
1306
+ referencedRelation: "products";
1307
+ referencedColumns: ["id"];
1308
+ }, {
1309
+ foreignKeyName: "purchase_order_items_purchase_order_id_fkey";
1310
+ columns: ["purchase_order_id"];
1311
+ isOneToOne: false;
1312
+ referencedRelation: "purchase_orders";
1313
+ referencedColumns: ["id"];
1314
+ }];
1315
+ };
1316
+ purchase_orders: {
1317
+ Row: {
1318
+ created_at: string;
1319
+ expected_delivery_date: string;
1320
+ id: string;
1321
+ location_id: string | null;
1322
+ notes: string | null;
1323
+ order_number: string;
1324
+ status: string;
1325
+ supplier_id: string | null;
1326
+ supplier_name: string;
1327
+ updated_at: string;
1328
+ };
1329
+ Insert: {
1330
+ created_at?: string;
1331
+ expected_delivery_date: string;
1332
+ id?: string;
1333
+ location_id?: string | null;
1334
+ notes?: string | null;
1335
+ order_number: string;
1336
+ status?: string;
1337
+ supplier_id?: string | null;
1338
+ supplier_name?: string;
1339
+ updated_at?: string;
1340
+ };
1341
+ Update: {
1342
+ created_at?: string;
1343
+ expected_delivery_date?: string;
1344
+ id?: string;
1345
+ location_id?: string | null;
1346
+ notes?: string | null;
1347
+ order_number?: string;
1348
+ status?: string;
1349
+ supplier_id?: string | null;
1350
+ supplier_name?: string;
1351
+ updated_at?: string;
1352
+ };
1353
+ Relationships: [{
1354
+ foreignKeyName: "purchase_orders_location_id_fkey";
1355
+ columns: ["location_id"];
1356
+ isOneToOne: false;
1357
+ referencedRelation: "locations";
1358
+ referencedColumns: ["id"];
1359
+ }, {
1360
+ foreignKeyName: "purchase_orders_supplier_id_fkey";
1361
+ columns: ["supplier_id"];
1362
+ isOneToOne: false;
1363
+ referencedRelation: "suppliers";
1364
+ referencedColumns: ["id"];
1365
+ }];
1366
+ };
1367
+ supplier_products: {
1368
+ Row: {
1369
+ article_number: string | null;
1370
+ created_at: string;
1371
+ id: string;
1372
+ name: string;
1373
+ notes: string | null;
1374
+ pot_size: string | null;
1375
+ price: number | null;
1376
+ quantity: number | null;
1377
+ supplier_id: string;
1378
+ unit: string;
1379
+ updated_at: string;
1380
+ };
1381
+ Insert: {
1382
+ article_number?: string | null;
1383
+ created_at?: string;
1384
+ id?: string;
1385
+ name: string;
1386
+ notes?: string | null;
1387
+ pot_size?: string | null;
1388
+ price?: number | null;
1389
+ quantity?: number | null;
1390
+ supplier_id: string;
1391
+ unit?: string;
1392
+ updated_at?: string;
1393
+ };
1394
+ Update: {
1395
+ article_number?: string | null;
1396
+ created_at?: string;
1397
+ id?: string;
1398
+ name?: string;
1399
+ notes?: string | null;
1400
+ pot_size?: string | null;
1401
+ price?: number | null;
1402
+ quantity?: number | null;
1403
+ supplier_id?: string;
1404
+ unit?: string;
1405
+ updated_at?: string;
1406
+ };
1407
+ Relationships: [{
1408
+ foreignKeyName: "supplier_products_supplier_id_fkey";
1409
+ columns: ["supplier_id"];
1410
+ isOneToOne: false;
1411
+ referencedRelation: "suppliers";
1412
+ referencedColumns: ["id"];
1413
+ }];
1414
+ };
1415
+ suppliers: {
1416
+ Row: {
1417
+ address: string | null;
1418
+ column_mappings: import("./types").Json | null;
1419
+ contact_person: string | null;
1420
+ created_at: string;
1421
+ default_product_type: string;
1422
+ email: string | null;
1423
+ id: string;
1424
+ imported_file_name: string | null;
1425
+ name: string;
1426
+ notes: string | null;
1427
+ phone: string | null;
1428
+ updated_at: string;
1429
+ };
1430
+ Insert: {
1431
+ address?: string | null;
1432
+ column_mappings?: import("./types").Json | null;
1433
+ contact_person?: string | null;
1434
+ created_at?: string;
1435
+ default_product_type?: string;
1436
+ email?: string | null;
1437
+ id?: string;
1438
+ imported_file_name?: string | null;
1439
+ name: string;
1440
+ notes?: string | null;
1441
+ phone?: string | null;
1442
+ updated_at?: string;
1443
+ };
1444
+ Update: {
1445
+ address?: string | null;
1446
+ column_mappings?: import("./types").Json | null;
1447
+ contact_person?: string | null;
1448
+ created_at?: string;
1449
+ default_product_type?: string;
1450
+ email?: string | null;
1451
+ id?: string;
1452
+ imported_file_name?: string | null;
1453
+ name?: string;
1454
+ notes?: string | null;
1455
+ phone?: string | null;
1456
+ updated_at?: string;
1457
+ };
1458
+ Relationships: [];
1459
+ };
1460
+ trade_item_drafts: {
1461
+ Row: {
1462
+ connection_id: string | null;
1463
+ created_at: string;
1464
+ data: import("./types").Json;
1465
+ id: string;
1466
+ updated_at: string;
1467
+ user_id: string;
1468
+ };
1469
+ Insert: {
1470
+ connection_id?: string | null;
1471
+ created_at?: string;
1472
+ data?: import("./types").Json;
1473
+ id?: string;
1474
+ updated_at?: string;
1475
+ user_id: string;
1476
+ };
1477
+ Update: {
1478
+ connection_id?: string | null;
1479
+ created_at?: string;
1480
+ data?: import("./types").Json;
1481
+ id?: string;
1482
+ updated_at?: string;
1483
+ user_id?: string;
1484
+ };
1485
+ Relationships: [];
1486
+ };
1487
+ user_roles: {
1488
+ Row: {
1489
+ created_at: string;
1490
+ id: string;
1491
+ role: Database["public"]["Enums"]["app_role"];
1492
+ user_id: string;
1493
+ };
1494
+ Insert: {
1495
+ created_at?: string;
1496
+ id?: string;
1497
+ role: Database["public"]["Enums"]["app_role"];
1498
+ user_id: string;
1499
+ };
1500
+ Update: {
1501
+ created_at?: string;
1502
+ id?: string;
1503
+ role?: Database["public"]["Enums"]["app_role"];
1504
+ user_id?: string;
1505
+ };
1506
+ Relationships: [{
1507
+ foreignKeyName: "user_roles_user_id_fkey";
1508
+ columns: ["user_id"];
1509
+ isOneToOne: false;
1510
+ referencedRelation: "profiles";
1511
+ referencedColumns: ["id"];
1512
+ }];
1513
+ };
1514
+ };
1515
+ Views: { [_ in never]: never; };
1516
+ Functions: {
1517
+ has_role: {
1518
+ Args: {
1519
+ _role: Database["public"]["Enums"]["app_role"];
1520
+ _user_id: string;
1521
+ };
1522
+ Returns: boolean;
1523
+ };
1524
+ schedule_floriday_network_sync: {
1525
+ Args: {
1526
+ p_apikey: string;
1527
+ p_url: string;
1528
+ };
1529
+ Returns: number;
1530
+ };
1531
+ schedule_floriday_token_refresh: {
1532
+ Args: {
1533
+ p_apikey: string;
1534
+ p_url: string;
1535
+ };
1536
+ Returns: number;
1537
+ };
1538
+ show_limit: {
1539
+ Args: never;
1540
+ Returns: number;
1541
+ };
1542
+ show_trgm: {
1543
+ Args: {
1544
+ "": string;
1545
+ };
1546
+ Returns: string[];
1547
+ };
1548
+ };
1549
+ Enums: {
1550
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
1551
+ exact_env: "staging" | "live";
1552
+ };
1553
+ CompositeTypes: { [_ in never]: never; };
1554
+ }, {
1555
+ PostgrestVersion: "14.5";
1556
+ }>;
1557
+ userId: string;
1558
+ claims: import("@supabase/auth-js").JwtPayload;
1559
+ }, undefined, undefined, undefined>;
1560
+ //# sourceMappingURL=auth-middleware.d.ts.map