@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,4682 @@
1
+ import type { AccountingProviderInfo, AccountingSyncResult } from "@/lib/accounting/types";
2
+ export declare const listAccountingProviders: import("@tanstack/start-client-core").OptionalFetcher<readonly [import("@tanstack/start-client-core").FunctionMiddlewareAfterServer<{}, unknown, undefined, {
3
+ supabase: import("@supabase/supabase-js").SupabaseClient<import("../integrations/supabase/types").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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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: import("../integrations/supabase/types").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: import("../integrations/supabase/types").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?: import("../integrations/supabase/types").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: import("../integrations/supabase/types").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: import("../integrations/supabase/types").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?: import("../integrations/supabase/types").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("../integrations/supabase/types").Json;
555
+ exact_id: string;
556
+ fetched_at: string;
557
+ };
558
+ Insert: {
559
+ connection_id: string;
560
+ data?: import("../integrations/supabase/types").Json;
561
+ exact_id: string;
562
+ fetched_at?: string;
563
+ };
564
+ Update: {
565
+ connection_id?: string;
566
+ data?: import("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/types").Json;
750
+ fetched_at: string;
751
+ organization_id: string;
752
+ };
753
+ Insert: {
754
+ connection_id?: string | null;
755
+ data?: import("../integrations/supabase/types").Json;
756
+ fetched_at?: string;
757
+ organization_id: string;
758
+ };
759
+ Update: {
760
+ connection_id?: string | null;
761
+ data?: import("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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("../integrations/supabase/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: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
1492
+ user_id: string;
1493
+ };
1494
+ Insert: {
1495
+ created_at?: string;
1496
+ id?: string;
1497
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
1498
+ user_id: string;
1499
+ };
1500
+ Update: {
1501
+ created_at?: string;
1502
+ id?: string;
1503
+ role?: import("../integrations/supabase/types").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: import("../integrations/supabase/types").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>], undefined, Promise<{
1560
+ providers: AccountingProviderInfo[];
1561
+ }>>;
1562
+ export declare const syncAccountingProvider: import("@tanstack/start-client-core").OptionalFetcher<readonly [import("@tanstack/start-client-core").FunctionMiddlewareAfterServer<{}, unknown, undefined, {
1563
+ supabase: import("@supabase/supabase-js").SupabaseClient<import("../integrations/supabase/types").Database, "public", "public", {
1564
+ Tables: {
1565
+ bugs: {
1566
+ Row: {
1567
+ attachment_url: string | null;
1568
+ created_at: string;
1569
+ description: string;
1570
+ id: string;
1571
+ priority: string;
1572
+ status: string;
1573
+ title: string;
1574
+ updated_at: string;
1575
+ user_id: string;
1576
+ };
1577
+ Insert: {
1578
+ attachment_url?: string | null;
1579
+ created_at?: string;
1580
+ description: string;
1581
+ id?: string;
1582
+ priority?: string;
1583
+ status?: string;
1584
+ title: string;
1585
+ updated_at?: string;
1586
+ user_id: string;
1587
+ };
1588
+ Update: {
1589
+ attachment_url?: string | null;
1590
+ created_at?: string;
1591
+ description?: string;
1592
+ id?: string;
1593
+ priority?: string;
1594
+ status?: string;
1595
+ title?: string;
1596
+ updated_at?: string;
1597
+ user_id?: string;
1598
+ };
1599
+ Relationships: [];
1600
+ };
1601
+ collections: {
1602
+ Row: {
1603
+ created_at: string;
1604
+ created_by: string | null;
1605
+ id: string;
1606
+ name: string;
1607
+ updated_at: string;
1608
+ };
1609
+ Insert: {
1610
+ created_at?: string;
1611
+ created_by?: string | null;
1612
+ id?: string;
1613
+ name: string;
1614
+ updated_at?: string;
1615
+ };
1616
+ Update: {
1617
+ created_at?: string;
1618
+ created_by?: string | null;
1619
+ id?: string;
1620
+ name?: string;
1621
+ updated_at?: string;
1622
+ };
1623
+ Relationships: [];
1624
+ };
1625
+ customer_audit_log: {
1626
+ Row: {
1627
+ action: string;
1628
+ changes: import("../integrations/supabase/types").Json;
1629
+ created_at: string;
1630
+ customer_id: string;
1631
+ id: string;
1632
+ user_id: string | null;
1633
+ };
1634
+ Insert: {
1635
+ action: string;
1636
+ changes?: import("../integrations/supabase/types").Json;
1637
+ created_at?: string;
1638
+ customer_id: string;
1639
+ id?: string;
1640
+ user_id?: string | null;
1641
+ };
1642
+ Update: {
1643
+ action?: string;
1644
+ changes?: import("../integrations/supabase/types").Json;
1645
+ created_at?: string;
1646
+ customer_id?: string;
1647
+ id?: string;
1648
+ user_id?: string | null;
1649
+ };
1650
+ Relationships: [{
1651
+ foreignKeyName: "customer_audit_log_customer_id_fkey";
1652
+ columns: ["customer_id"];
1653
+ isOneToOne: false;
1654
+ referencedRelation: "customers";
1655
+ referencedColumns: ["id"];
1656
+ }];
1657
+ };
1658
+ customer_contacts: {
1659
+ Row: {
1660
+ created_at: string;
1661
+ customer_id: string;
1662
+ email: string | null;
1663
+ floriday_contact_id: string | null;
1664
+ full_name: string;
1665
+ id: string;
1666
+ is_active: boolean;
1667
+ job_title: string | null;
1668
+ phone: string | null;
1669
+ photo_url: string | null;
1670
+ raw: import("../integrations/supabase/types").Json | null;
1671
+ updated_at: string;
1672
+ };
1673
+ Insert: {
1674
+ created_at?: string;
1675
+ customer_id: string;
1676
+ email?: string | null;
1677
+ floriday_contact_id?: string | null;
1678
+ full_name: string;
1679
+ id?: string;
1680
+ is_active?: boolean;
1681
+ job_title?: string | null;
1682
+ phone?: string | null;
1683
+ photo_url?: string | null;
1684
+ raw?: import("../integrations/supabase/types").Json | null;
1685
+ updated_at?: string;
1686
+ };
1687
+ Update: {
1688
+ created_at?: string;
1689
+ customer_id?: string;
1690
+ email?: string | null;
1691
+ floriday_contact_id?: string | null;
1692
+ full_name?: string;
1693
+ id?: string;
1694
+ is_active?: boolean;
1695
+ job_title?: string | null;
1696
+ phone?: string | null;
1697
+ photo_url?: string | null;
1698
+ raw?: import("../integrations/supabase/types").Json | null;
1699
+ updated_at?: string;
1700
+ };
1701
+ Relationships: [{
1702
+ foreignKeyName: "customer_contacts_customer_id_fkey";
1703
+ columns: ["customer_id"];
1704
+ isOneToOne: false;
1705
+ referencedRelation: "customers";
1706
+ referencedColumns: ["id"];
1707
+ }];
1708
+ };
1709
+ customer_delivery_locations: {
1710
+ Row: {
1711
+ address_line: string | null;
1712
+ city: string | null;
1713
+ country: string | null;
1714
+ created_at: string;
1715
+ customer_id: string;
1716
+ floriday_location_id: string | null;
1717
+ gln: string | null;
1718
+ id: string;
1719
+ is_primary: boolean;
1720
+ name: string | null;
1721
+ postal_code: string | null;
1722
+ raw: import("../integrations/supabase/types").Json | null;
1723
+ updated_at: string;
1724
+ };
1725
+ Insert: {
1726
+ address_line?: string | null;
1727
+ city?: string | null;
1728
+ country?: string | null;
1729
+ created_at?: string;
1730
+ customer_id: string;
1731
+ floriday_location_id?: string | null;
1732
+ gln?: string | null;
1733
+ id?: string;
1734
+ is_primary?: boolean;
1735
+ name?: string | null;
1736
+ postal_code?: string | null;
1737
+ raw?: import("../integrations/supabase/types").Json | null;
1738
+ updated_at?: string;
1739
+ };
1740
+ Update: {
1741
+ address_line?: string | null;
1742
+ city?: string | null;
1743
+ country?: string | null;
1744
+ created_at?: string;
1745
+ customer_id?: string;
1746
+ floriday_location_id?: string | null;
1747
+ gln?: string | null;
1748
+ id?: string;
1749
+ is_primary?: boolean;
1750
+ name?: string | null;
1751
+ postal_code?: string | null;
1752
+ raw?: import("../integrations/supabase/types").Json | null;
1753
+ updated_at?: string;
1754
+ };
1755
+ Relationships: [{
1756
+ foreignKeyName: "customer_delivery_locations_customer_id_fkey";
1757
+ columns: ["customer_id"];
1758
+ isOneToOne: false;
1759
+ referencedRelation: "customers";
1760
+ referencedColumns: ["id"];
1761
+ }];
1762
+ };
1763
+ customer_field_options: {
1764
+ Row: {
1765
+ created_at: string;
1766
+ field_setting_id: string;
1767
+ id: string;
1768
+ label: string;
1769
+ sort_order: number;
1770
+ };
1771
+ Insert: {
1772
+ created_at?: string;
1773
+ field_setting_id: string;
1774
+ id?: string;
1775
+ label: string;
1776
+ sort_order?: number;
1777
+ };
1778
+ Update: {
1779
+ created_at?: string;
1780
+ field_setting_id?: string;
1781
+ id?: string;
1782
+ label?: string;
1783
+ sort_order?: number;
1784
+ };
1785
+ Relationships: [{
1786
+ foreignKeyName: "customer_field_options_field_setting_id_fkey";
1787
+ columns: ["field_setting_id"];
1788
+ isOneToOne: false;
1789
+ referencedRelation: "customer_field_settings";
1790
+ referencedColumns: ["id"];
1791
+ }];
1792
+ };
1793
+ customer_field_settings: {
1794
+ Row: {
1795
+ created_at: string;
1796
+ field_key: string;
1797
+ field_label: string;
1798
+ field_type: string;
1799
+ id: string;
1800
+ is_custom: boolean;
1801
+ sort_order: number;
1802
+ updated_at: string;
1803
+ };
1804
+ Insert: {
1805
+ created_at?: string;
1806
+ field_key: string;
1807
+ field_label: string;
1808
+ field_type?: string;
1809
+ id?: string;
1810
+ is_custom?: boolean;
1811
+ sort_order?: number;
1812
+ updated_at?: string;
1813
+ };
1814
+ Update: {
1815
+ created_at?: string;
1816
+ field_key?: string;
1817
+ field_label?: string;
1818
+ field_type?: string;
1819
+ id?: string;
1820
+ is_custom?: boolean;
1821
+ sort_order?: number;
1822
+ updated_at?: string;
1823
+ };
1824
+ Relationships: [];
1825
+ };
1826
+ customer_selected_assortment: {
1827
+ Row: {
1828
+ article_number: string | null;
1829
+ created_at: string;
1830
+ customer_id: string;
1831
+ floriday_item_id: string | null;
1832
+ id: string;
1833
+ price: number | null;
1834
+ product_group: string | null;
1835
+ product_name: string;
1836
+ raw: import("../integrations/supabase/types").Json | null;
1837
+ unit: string | null;
1838
+ updated_at: string;
1839
+ };
1840
+ Insert: {
1841
+ article_number?: string | null;
1842
+ created_at?: string;
1843
+ customer_id: string;
1844
+ floriday_item_id?: string | null;
1845
+ id?: string;
1846
+ price?: number | null;
1847
+ product_group?: string | null;
1848
+ product_name: string;
1849
+ raw?: import("../integrations/supabase/types").Json | null;
1850
+ unit?: string | null;
1851
+ updated_at?: string;
1852
+ };
1853
+ Update: {
1854
+ article_number?: string | null;
1855
+ created_at?: string;
1856
+ customer_id?: string;
1857
+ floriday_item_id?: string | null;
1858
+ id?: string;
1859
+ price?: number | null;
1860
+ product_group?: string | null;
1861
+ product_name?: string;
1862
+ raw?: import("../integrations/supabase/types").Json | null;
1863
+ unit?: string | null;
1864
+ updated_at?: string;
1865
+ };
1866
+ Relationships: [{
1867
+ foreignKeyName: "customer_selected_assortment_customer_id_fkey";
1868
+ columns: ["customer_id"];
1869
+ isOneToOne: false;
1870
+ referencedRelation: "customers";
1871
+ referencedColumns: ["id"];
1872
+ }];
1873
+ };
1874
+ customer_trade_settings: {
1875
+ Row: {
1876
+ category: string;
1877
+ created_at: string;
1878
+ customer_id: string;
1879
+ id: string;
1880
+ is_active: boolean;
1881
+ raw: import("../integrations/supabase/types").Json | null;
1882
+ setting_key: string;
1883
+ setting_label: string;
1884
+ updated_at: string;
1885
+ };
1886
+ Insert: {
1887
+ category?: string;
1888
+ created_at?: string;
1889
+ customer_id: string;
1890
+ id?: string;
1891
+ is_active?: boolean;
1892
+ raw?: import("../integrations/supabase/types").Json | null;
1893
+ setting_key: string;
1894
+ setting_label: string;
1895
+ updated_at?: string;
1896
+ };
1897
+ Update: {
1898
+ category?: string;
1899
+ created_at?: string;
1900
+ customer_id?: string;
1901
+ id?: string;
1902
+ is_active?: boolean;
1903
+ raw?: import("../integrations/supabase/types").Json | null;
1904
+ setting_key?: string;
1905
+ setting_label?: string;
1906
+ updated_at?: string;
1907
+ };
1908
+ Relationships: [{
1909
+ foreignKeyName: "customer_trade_settings_customer_id_fkey";
1910
+ columns: ["customer_id"];
1911
+ isOneToOne: false;
1912
+ referencedRelation: "customers";
1913
+ referencedColumns: ["id"];
1914
+ }];
1915
+ };
1916
+ customers: {
1917
+ Row: {
1918
+ address: string | null;
1919
+ bio: string | null;
1920
+ city: string | null;
1921
+ commercial_name: string | null;
1922
+ company_name: string;
1923
+ connection_status: string;
1924
+ contact_person: string | null;
1925
+ country: string | null;
1926
+ created_at: string;
1927
+ custom_fields: import("../integrations/supabase/types").Json;
1928
+ customer_class: string | null;
1929
+ email: string | null;
1930
+ external_id: string | null;
1931
+ floriday_connection_id: string | null;
1932
+ floriday_organization_id: string | null;
1933
+ floriday_raw: import("../integrations/supabase/types").Json | null;
1934
+ gln: string | null;
1935
+ house_number: string | null;
1936
+ id: string;
1937
+ is_active: boolean;
1938
+ last_synced_at: string | null;
1939
+ logo_url: string | null;
1940
+ markets: string[];
1941
+ notes: string | null;
1942
+ organization_type: string | null;
1943
+ payment_methods: string[];
1944
+ phone: string | null;
1945
+ postal_code: string | null;
1946
+ product_groups: string[];
1947
+ segments: string[];
1948
+ source: string;
1949
+ street: string | null;
1950
+ sync_error: string | null;
1951
+ sync_status: string;
1952
+ trade_forms: string[];
1953
+ updated_at: string;
1954
+ vat_number: string | null;
1955
+ website: string | null;
1956
+ };
1957
+ Insert: {
1958
+ address?: string | null;
1959
+ bio?: string | null;
1960
+ city?: string | null;
1961
+ commercial_name?: string | null;
1962
+ company_name: string;
1963
+ connection_status?: string;
1964
+ contact_person?: string | null;
1965
+ country?: string | null;
1966
+ created_at?: string;
1967
+ custom_fields?: import("../integrations/supabase/types").Json;
1968
+ customer_class?: string | null;
1969
+ email?: string | null;
1970
+ external_id?: string | null;
1971
+ floriday_connection_id?: string | null;
1972
+ floriday_organization_id?: string | null;
1973
+ floriday_raw?: import("../integrations/supabase/types").Json | null;
1974
+ gln?: string | null;
1975
+ house_number?: string | null;
1976
+ id?: string;
1977
+ is_active?: boolean;
1978
+ last_synced_at?: string | null;
1979
+ logo_url?: string | null;
1980
+ markets?: string[];
1981
+ notes?: string | null;
1982
+ organization_type?: string | null;
1983
+ payment_methods?: string[];
1984
+ phone?: string | null;
1985
+ postal_code?: string | null;
1986
+ product_groups?: string[];
1987
+ segments?: string[];
1988
+ source?: string;
1989
+ street?: string | null;
1990
+ sync_error?: string | null;
1991
+ sync_status?: string;
1992
+ trade_forms?: string[];
1993
+ updated_at?: string;
1994
+ vat_number?: string | null;
1995
+ website?: string | null;
1996
+ };
1997
+ Update: {
1998
+ address?: string | null;
1999
+ bio?: string | null;
2000
+ city?: string | null;
2001
+ commercial_name?: string | null;
2002
+ company_name?: string;
2003
+ connection_status?: string;
2004
+ contact_person?: string | null;
2005
+ country?: string | null;
2006
+ created_at?: string;
2007
+ custom_fields?: import("../integrations/supabase/types").Json;
2008
+ customer_class?: string | null;
2009
+ email?: string | null;
2010
+ external_id?: string | null;
2011
+ floriday_connection_id?: string | null;
2012
+ floriday_organization_id?: string | null;
2013
+ floriday_raw?: import("../integrations/supabase/types").Json | null;
2014
+ gln?: string | null;
2015
+ house_number?: string | null;
2016
+ id?: string;
2017
+ is_active?: boolean;
2018
+ last_synced_at?: string | null;
2019
+ logo_url?: string | null;
2020
+ markets?: string[];
2021
+ notes?: string | null;
2022
+ organization_type?: string | null;
2023
+ payment_methods?: string[];
2024
+ phone?: string | null;
2025
+ postal_code?: string | null;
2026
+ product_groups?: string[];
2027
+ segments?: string[];
2028
+ source?: string;
2029
+ street?: string | null;
2030
+ sync_error?: string | null;
2031
+ sync_status?: string;
2032
+ trade_forms?: string[];
2033
+ updated_at?: string;
2034
+ vat_number?: string | null;
2035
+ website?: string | null;
2036
+ };
2037
+ Relationships: [];
2038
+ };
2039
+ exact_connections: {
2040
+ Row: {
2041
+ access_token_encrypted: string;
2042
+ company_name: string | null;
2043
+ connected_at: string;
2044
+ connected_by: string | null;
2045
+ division_code: number | null;
2046
+ environment: import("../integrations/supabase/types").Database["public"]["Enums"]["exact_env"];
2047
+ expires_at: string;
2048
+ id: string;
2049
+ refresh_token_encrypted: string;
2050
+ status: string;
2051
+ updated_at: string;
2052
+ };
2053
+ Insert: {
2054
+ access_token_encrypted: string;
2055
+ company_name?: string | null;
2056
+ connected_at?: string;
2057
+ connected_by?: string | null;
2058
+ division_code?: number | null;
2059
+ environment: import("../integrations/supabase/types").Database["public"]["Enums"]["exact_env"];
2060
+ expires_at: string;
2061
+ id?: string;
2062
+ refresh_token_encrypted: string;
2063
+ status?: string;
2064
+ updated_at?: string;
2065
+ };
2066
+ Update: {
2067
+ access_token_encrypted?: string;
2068
+ company_name?: string | null;
2069
+ connected_at?: string;
2070
+ connected_by?: string | null;
2071
+ division_code?: number | null;
2072
+ environment?: import("../integrations/supabase/types").Database["public"]["Enums"]["exact_env"];
2073
+ expires_at?: string;
2074
+ id?: string;
2075
+ refresh_token_encrypted?: string;
2076
+ status?: string;
2077
+ updated_at?: string;
2078
+ };
2079
+ Relationships: [];
2080
+ };
2081
+ exact_credentials: {
2082
+ Row: {
2083
+ client_id: string;
2084
+ client_secret_encrypted: string;
2085
+ created_at: string;
2086
+ environment: import("../integrations/supabase/types").Database["public"]["Enums"]["exact_env"];
2087
+ id: string;
2088
+ redirect_uri: string;
2089
+ updated_at: string;
2090
+ };
2091
+ Insert: {
2092
+ client_id: string;
2093
+ client_secret_encrypted: string;
2094
+ created_at?: string;
2095
+ environment: import("../integrations/supabase/types").Database["public"]["Enums"]["exact_env"];
2096
+ id?: string;
2097
+ redirect_uri: string;
2098
+ updated_at?: string;
2099
+ };
2100
+ Update: {
2101
+ client_id?: string;
2102
+ client_secret_encrypted?: string;
2103
+ created_at?: string;
2104
+ environment?: import("../integrations/supabase/types").Database["public"]["Enums"]["exact_env"];
2105
+ id?: string;
2106
+ redirect_uri?: string;
2107
+ updated_at?: string;
2108
+ };
2109
+ Relationships: [];
2110
+ };
2111
+ exact_customers_cache: {
2112
+ Row: {
2113
+ connection_id: string;
2114
+ data: import("../integrations/supabase/types").Json;
2115
+ exact_id: string;
2116
+ fetched_at: string;
2117
+ };
2118
+ Insert: {
2119
+ connection_id: string;
2120
+ data?: import("../integrations/supabase/types").Json;
2121
+ exact_id: string;
2122
+ fetched_at?: string;
2123
+ };
2124
+ Update: {
2125
+ connection_id?: string;
2126
+ data?: import("../integrations/supabase/types").Json;
2127
+ exact_id?: string;
2128
+ fetched_at?: string;
2129
+ };
2130
+ Relationships: [];
2131
+ };
2132
+ exact_sync_state: {
2133
+ Row: {
2134
+ connection_id: string;
2135
+ last_error: string | null;
2136
+ last_modified_cursor: string | null;
2137
+ last_synced_at: string | null;
2138
+ status: string;
2139
+ updated_at: string;
2140
+ };
2141
+ Insert: {
2142
+ connection_id: string;
2143
+ last_error?: string | null;
2144
+ last_modified_cursor?: string | null;
2145
+ last_synced_at?: string | null;
2146
+ status?: string;
2147
+ updated_at?: string;
2148
+ };
2149
+ Update: {
2150
+ connection_id?: string;
2151
+ last_error?: string | null;
2152
+ last_modified_cursor?: string | null;
2153
+ last_synced_at?: string | null;
2154
+ status?: string;
2155
+ updated_at?: string;
2156
+ };
2157
+ Relationships: [];
2158
+ };
2159
+ floricode_connection_settings: {
2160
+ Row: {
2161
+ catalog_key: string | null;
2162
+ catalog_url: string;
2163
+ created_at: string;
2164
+ id: number;
2165
+ last_meta: import("../integrations/supabase/types").Json | null;
2166
+ last_test_at: string | null;
2167
+ last_test_error: string | null;
2168
+ last_test_ok: boolean | null;
2169
+ updated_at: string;
2170
+ };
2171
+ Insert: {
2172
+ catalog_key?: string | null;
2173
+ catalog_url?: string;
2174
+ created_at?: string;
2175
+ id?: number;
2176
+ last_meta?: import("../integrations/supabase/types").Json | null;
2177
+ last_test_at?: string | null;
2178
+ last_test_error?: string | null;
2179
+ last_test_ok?: boolean | null;
2180
+ updated_at?: string;
2181
+ };
2182
+ Update: {
2183
+ catalog_key?: string | null;
2184
+ catalog_url?: string;
2185
+ created_at?: string;
2186
+ id?: number;
2187
+ last_meta?: import("../integrations/supabase/types").Json | null;
2188
+ last_test_at?: string | null;
2189
+ last_test_error?: string | null;
2190
+ last_test_ok?: boolean | null;
2191
+ updated_at?: string;
2192
+ };
2193
+ Relationships: [];
2194
+ };
2195
+ floricode_records: {
2196
+ Row: {
2197
+ change_date_time: string | null;
2198
+ data: import("../integrations/supabase/types").Json;
2199
+ last_synced_at: string;
2200
+ record_id: string;
2201
+ resource: string;
2202
+ };
2203
+ Insert: {
2204
+ change_date_time?: string | null;
2205
+ data?: import("../integrations/supabase/types").Json;
2206
+ last_synced_at?: string;
2207
+ record_id: string;
2208
+ resource: string;
2209
+ };
2210
+ Update: {
2211
+ change_date_time?: string | null;
2212
+ data?: import("../integrations/supabase/types").Json;
2213
+ last_synced_at?: string;
2214
+ record_id?: string;
2215
+ resource?: string;
2216
+ };
2217
+ Relationships: [];
2218
+ };
2219
+ floricode_sync_state: {
2220
+ Row: {
2221
+ error_message: string | null;
2222
+ last_change_date_time: string | null;
2223
+ last_sequence_number: number;
2224
+ last_sync_at: string | null;
2225
+ resource: string;
2226
+ status: string;
2227
+ updated_at: string;
2228
+ };
2229
+ Insert: {
2230
+ error_message?: string | null;
2231
+ last_change_date_time?: string | null;
2232
+ last_sequence_number?: number;
2233
+ last_sync_at?: string | null;
2234
+ resource: string;
2235
+ status?: string;
2236
+ updated_at?: string;
2237
+ };
2238
+ Update: {
2239
+ error_message?: string | null;
2240
+ last_change_date_time?: string | null;
2241
+ last_sequence_number?: number;
2242
+ last_sync_at?: string | null;
2243
+ resource?: string;
2244
+ status?: string;
2245
+ updated_at?: string;
2246
+ };
2247
+ Relationships: [];
2248
+ };
2249
+ floriday_connections: {
2250
+ Row: {
2251
+ access_token: string | null;
2252
+ api_key: string;
2253
+ client_id: string;
2254
+ client_secret: string;
2255
+ created_at: string;
2256
+ customers_endpoint: string | null;
2257
+ environment: string;
2258
+ gln_code: string | null;
2259
+ id: string;
2260
+ is_active: boolean;
2261
+ label: string;
2262
+ organization_name: string | null;
2263
+ preferred_warehouse_id: string | null;
2264
+ preferred_warehouse_name: string | null;
2265
+ token_expires_at: string | null;
2266
+ updated_at: string;
2267
+ };
2268
+ Insert: {
2269
+ access_token?: string | null;
2270
+ api_key: string;
2271
+ client_id: string;
2272
+ client_secret: string;
2273
+ created_at?: string;
2274
+ customers_endpoint?: string | null;
2275
+ environment: string;
2276
+ gln_code?: string | null;
2277
+ id?: string;
2278
+ is_active?: boolean;
2279
+ label?: string;
2280
+ organization_name?: string | null;
2281
+ preferred_warehouse_id?: string | null;
2282
+ preferred_warehouse_name?: string | null;
2283
+ token_expires_at?: string | null;
2284
+ updated_at?: string;
2285
+ };
2286
+ Update: {
2287
+ access_token?: string | null;
2288
+ api_key?: string;
2289
+ client_id?: string;
2290
+ client_secret?: string;
2291
+ created_at?: string;
2292
+ customers_endpoint?: string | null;
2293
+ environment?: string;
2294
+ gln_code?: string | null;
2295
+ id?: string;
2296
+ is_active?: boolean;
2297
+ label?: string;
2298
+ organization_name?: string | null;
2299
+ preferred_warehouse_id?: string | null;
2300
+ preferred_warehouse_name?: string | null;
2301
+ token_expires_at?: string | null;
2302
+ updated_at?: string;
2303
+ };
2304
+ Relationships: [];
2305
+ };
2306
+ floriday_customers_cache: {
2307
+ Row: {
2308
+ connection_id: string | null;
2309
+ data: import("../integrations/supabase/types").Json;
2310
+ fetched_at: string;
2311
+ organization_id: string;
2312
+ };
2313
+ Insert: {
2314
+ connection_id?: string | null;
2315
+ data?: import("../integrations/supabase/types").Json;
2316
+ fetched_at?: string;
2317
+ organization_id: string;
2318
+ };
2319
+ Update: {
2320
+ connection_id?: string | null;
2321
+ data?: import("../integrations/supabase/types").Json;
2322
+ fetched_at?: string;
2323
+ organization_id?: string;
2324
+ };
2325
+ Relationships: [{
2326
+ foreignKeyName: "floriday_customers_cache_connection_id_fkey";
2327
+ columns: ["connection_id"];
2328
+ isOneToOne: false;
2329
+ referencedRelation: "floriday_connections";
2330
+ referencedColumns: ["id"];
2331
+ }];
2332
+ };
2333
+ floriday_network_cache: {
2334
+ Row: {
2335
+ city: string | null;
2336
+ connection_id: string;
2337
+ country: string | null;
2338
+ data: import("../integrations/supabase/types").Json;
2339
+ fetched_at: string;
2340
+ gln: string | null;
2341
+ organization_id: string;
2342
+ organization_name: string | null;
2343
+ };
2344
+ Insert: {
2345
+ city?: string | null;
2346
+ connection_id: string;
2347
+ country?: string | null;
2348
+ data?: import("../integrations/supabase/types").Json;
2349
+ fetched_at?: string;
2350
+ gln?: string | null;
2351
+ organization_id: string;
2352
+ organization_name?: string | null;
2353
+ };
2354
+ Update: {
2355
+ city?: string | null;
2356
+ connection_id?: string;
2357
+ country?: string | null;
2358
+ data?: import("../integrations/supabase/types").Json;
2359
+ fetched_at?: string;
2360
+ gln?: string | null;
2361
+ organization_id?: string;
2362
+ organization_name?: string | null;
2363
+ };
2364
+ Relationships: [];
2365
+ };
2366
+ floriday_network_sync_state: {
2367
+ Row: {
2368
+ connection_id: string;
2369
+ last_error: string | null;
2370
+ last_sequence_number: number;
2371
+ last_synced_at: string | null;
2372
+ updated_at: string;
2373
+ };
2374
+ Insert: {
2375
+ connection_id: string;
2376
+ last_error?: string | null;
2377
+ last_sequence_number?: number;
2378
+ last_synced_at?: string | null;
2379
+ updated_at?: string;
2380
+ };
2381
+ Update: {
2382
+ connection_id?: string;
2383
+ last_error?: string | null;
2384
+ last_sequence_number?: number;
2385
+ last_synced_at?: string | null;
2386
+ updated_at?: string;
2387
+ };
2388
+ Relationships: [];
2389
+ };
2390
+ floriday_settings: {
2391
+ Row: {
2392
+ active_environment: string;
2393
+ id: number;
2394
+ updated_at: string;
2395
+ };
2396
+ Insert: {
2397
+ active_environment?: string;
2398
+ id?: number;
2399
+ updated_at?: string;
2400
+ };
2401
+ Update: {
2402
+ active_environment?: string;
2403
+ id?: number;
2404
+ updated_at?: string;
2405
+ };
2406
+ Relationships: [];
2407
+ };
2408
+ inventory_settings: {
2409
+ Row: {
2410
+ created_at: string;
2411
+ hierarchy_levels: string[];
2412
+ id: string;
2413
+ updated_at: string;
2414
+ visible_columns: string[];
2415
+ };
2416
+ Insert: {
2417
+ created_at?: string;
2418
+ hierarchy_levels?: string[];
2419
+ id?: string;
2420
+ updated_at?: string;
2421
+ visible_columns?: string[];
2422
+ };
2423
+ Update: {
2424
+ created_at?: string;
2425
+ hierarchy_levels?: string[];
2426
+ id?: string;
2427
+ updated_at?: string;
2428
+ visible_columns?: string[];
2429
+ };
2430
+ Relationships: [];
2431
+ };
2432
+ locations: {
2433
+ Row: {
2434
+ created_at: string;
2435
+ id: string;
2436
+ name: string;
2437
+ sort_order: number;
2438
+ updated_at: string;
2439
+ };
2440
+ Insert: {
2441
+ created_at?: string;
2442
+ id?: string;
2443
+ name: string;
2444
+ sort_order?: number;
2445
+ updated_at?: string;
2446
+ };
2447
+ Update: {
2448
+ created_at?: string;
2449
+ id?: string;
2450
+ name?: string;
2451
+ sort_order?: number;
2452
+ updated_at?: string;
2453
+ };
2454
+ Relationships: [];
2455
+ };
2456
+ notifications: {
2457
+ Row: {
2458
+ created_at: string;
2459
+ id: string;
2460
+ message: string | null;
2461
+ read: boolean;
2462
+ title: string;
2463
+ updated_at: string;
2464
+ user_id: string;
2465
+ };
2466
+ Insert: {
2467
+ created_at?: string;
2468
+ id?: string;
2469
+ message?: string | null;
2470
+ read?: boolean;
2471
+ title: string;
2472
+ updated_at?: string;
2473
+ user_id: string;
2474
+ };
2475
+ Update: {
2476
+ created_at?: string;
2477
+ id?: string;
2478
+ message?: string | null;
2479
+ read?: boolean;
2480
+ title?: string;
2481
+ updated_at?: string;
2482
+ user_id?: string;
2483
+ };
2484
+ Relationships: [];
2485
+ };
2486
+ order_field_options: {
2487
+ Row: {
2488
+ created_at: string;
2489
+ field_setting_id: string;
2490
+ id: string;
2491
+ label: string;
2492
+ sort_order: number;
2493
+ };
2494
+ Insert: {
2495
+ created_at?: string;
2496
+ field_setting_id: string;
2497
+ id?: string;
2498
+ label: string;
2499
+ sort_order?: number;
2500
+ };
2501
+ Update: {
2502
+ created_at?: string;
2503
+ field_setting_id?: string;
2504
+ id?: string;
2505
+ label?: string;
2506
+ sort_order?: number;
2507
+ };
2508
+ Relationships: [{
2509
+ foreignKeyName: "order_field_options_field_setting_id_fkey";
2510
+ columns: ["field_setting_id"];
2511
+ isOneToOne: false;
2512
+ referencedRelation: "order_field_settings";
2513
+ referencedColumns: ["id"];
2514
+ }];
2515
+ };
2516
+ order_field_settings: {
2517
+ Row: {
2518
+ active: boolean;
2519
+ created_at: string;
2520
+ field_key: string;
2521
+ field_label: string;
2522
+ field_type: string;
2523
+ id: string;
2524
+ is_custom: boolean;
2525
+ sort_order: number;
2526
+ updated_at: string;
2527
+ };
2528
+ Insert: {
2529
+ active?: boolean;
2530
+ created_at?: string;
2531
+ field_key: string;
2532
+ field_label: string;
2533
+ field_type?: string;
2534
+ id?: string;
2535
+ is_custom?: boolean;
2536
+ sort_order?: number;
2537
+ updated_at?: string;
2538
+ };
2539
+ Update: {
2540
+ active?: boolean;
2541
+ created_at?: string;
2542
+ field_key?: string;
2543
+ field_label?: string;
2544
+ field_type?: string;
2545
+ id?: string;
2546
+ is_custom?: boolean;
2547
+ sort_order?: number;
2548
+ updated_at?: string;
2549
+ };
2550
+ Relationships: [];
2551
+ };
2552
+ order_items: {
2553
+ Row: {
2554
+ created_at: string;
2555
+ id: string;
2556
+ order_id: string;
2557
+ product_id: string | null;
2558
+ product_name: string;
2559
+ quantity: number;
2560
+ unit: string;
2561
+ unit_price: number | null;
2562
+ };
2563
+ Insert: {
2564
+ created_at?: string;
2565
+ id?: string;
2566
+ order_id: string;
2567
+ product_id?: string | null;
2568
+ product_name: string;
2569
+ quantity?: number;
2570
+ unit?: string;
2571
+ unit_price?: number | null;
2572
+ };
2573
+ Update: {
2574
+ created_at?: string;
2575
+ id?: string;
2576
+ order_id?: string;
2577
+ product_id?: string | null;
2578
+ product_name?: string;
2579
+ quantity?: number;
2580
+ unit?: string;
2581
+ unit_price?: number | null;
2582
+ };
2583
+ Relationships: [{
2584
+ foreignKeyName: "order_items_order_id_fkey";
2585
+ columns: ["order_id"];
2586
+ isOneToOne: false;
2587
+ referencedRelation: "orders";
2588
+ referencedColumns: ["id"];
2589
+ }, {
2590
+ foreignKeyName: "order_items_product_id_fkey";
2591
+ columns: ["product_id"];
2592
+ isOneToOne: false;
2593
+ referencedRelation: "products";
2594
+ referencedColumns: ["id"];
2595
+ }];
2596
+ };
2597
+ orders: {
2598
+ Row: {
2599
+ created_at: string;
2600
+ custom_fields: import("../integrations/supabase/types").Json;
2601
+ customer_id: string | null;
2602
+ customer_name: string;
2603
+ deleted_at: string | null;
2604
+ delivery_date: string;
2605
+ id: string;
2606
+ notes: string | null;
2607
+ order_date: string;
2608
+ order_number: string;
2609
+ status: string;
2610
+ total: string;
2611
+ updated_at: string;
2612
+ };
2613
+ Insert: {
2614
+ created_at?: string;
2615
+ custom_fields?: import("../integrations/supabase/types").Json;
2616
+ customer_id?: string | null;
2617
+ customer_name?: string;
2618
+ deleted_at?: string | null;
2619
+ delivery_date: string;
2620
+ id?: string;
2621
+ notes?: string | null;
2622
+ order_date?: string;
2623
+ order_number: string;
2624
+ status?: string;
2625
+ total?: string;
2626
+ updated_at?: string;
2627
+ };
2628
+ Update: {
2629
+ created_at?: string;
2630
+ custom_fields?: import("../integrations/supabase/types").Json;
2631
+ customer_id?: string | null;
2632
+ customer_name?: string;
2633
+ deleted_at?: string | null;
2634
+ delivery_date?: string;
2635
+ id?: string;
2636
+ notes?: string | null;
2637
+ order_date?: string;
2638
+ order_number?: string;
2639
+ status?: string;
2640
+ total?: string;
2641
+ updated_at?: string;
2642
+ };
2643
+ Relationships: [{
2644
+ foreignKeyName: "orders_customer_id_fkey";
2645
+ columns: ["customer_id"];
2646
+ isOneToOne: false;
2647
+ referencedRelation: "customers";
2648
+ referencedColumns: ["id"];
2649
+ }];
2650
+ };
2651
+ product_categories: {
2652
+ Row: {
2653
+ color: string;
2654
+ created_at: string;
2655
+ icon: string | null;
2656
+ id: string;
2657
+ name: string;
2658
+ slug: string;
2659
+ sort_order: number;
2660
+ updated_at: string;
2661
+ };
2662
+ Insert: {
2663
+ color?: string;
2664
+ created_at?: string;
2665
+ icon?: string | null;
2666
+ id?: string;
2667
+ name: string;
2668
+ slug: string;
2669
+ sort_order?: number;
2670
+ updated_at?: string;
2671
+ };
2672
+ Update: {
2673
+ color?: string;
2674
+ created_at?: string;
2675
+ icon?: string | null;
2676
+ id?: string;
2677
+ name?: string;
2678
+ slug?: string;
2679
+ sort_order?: number;
2680
+ updated_at?: string;
2681
+ };
2682
+ Relationships: [];
2683
+ };
2684
+ product_field_options: {
2685
+ Row: {
2686
+ created_at: string;
2687
+ field_setting_id: string;
2688
+ id: string;
2689
+ label: string;
2690
+ sort_order: number;
2691
+ };
2692
+ Insert: {
2693
+ created_at?: string;
2694
+ field_setting_id: string;
2695
+ id?: string;
2696
+ label: string;
2697
+ sort_order?: number;
2698
+ };
2699
+ Update: {
2700
+ created_at?: string;
2701
+ field_setting_id?: string;
2702
+ id?: string;
2703
+ label?: string;
2704
+ sort_order?: number;
2705
+ };
2706
+ Relationships: [{
2707
+ foreignKeyName: "product_field_options_field_setting_id_fkey";
2708
+ columns: ["field_setting_id"];
2709
+ isOneToOne: false;
2710
+ referencedRelation: "product_field_settings";
2711
+ referencedColumns: ["id"];
2712
+ }];
2713
+ };
2714
+ product_field_settings: {
2715
+ Row: {
2716
+ active_per_category: import("../integrations/supabase/types").Json;
2717
+ created_at: string;
2718
+ field_key: string;
2719
+ field_label: string;
2720
+ field_type: string;
2721
+ id: string;
2722
+ is_custom: boolean;
2723
+ sort_order: number;
2724
+ updated_at: string;
2725
+ };
2726
+ Insert: {
2727
+ active_per_category?: import("../integrations/supabase/types").Json;
2728
+ created_at?: string;
2729
+ field_key: string;
2730
+ field_label: string;
2731
+ field_type?: string;
2732
+ id?: string;
2733
+ is_custom?: boolean;
2734
+ sort_order?: number;
2735
+ updated_at?: string;
2736
+ };
2737
+ Update: {
2738
+ active_per_category?: import("../integrations/supabase/types").Json;
2739
+ created_at?: string;
2740
+ field_key?: string;
2741
+ field_label?: string;
2742
+ field_type?: string;
2743
+ id?: string;
2744
+ is_custom?: boolean;
2745
+ sort_order?: number;
2746
+ updated_at?: string;
2747
+ };
2748
+ Relationships: [];
2749
+ };
2750
+ products: {
2751
+ Row: {
2752
+ barcode: string | null;
2753
+ batch: string;
2754
+ created_at: string;
2755
+ custom_fields: import("../integrations/supabase/types").Json;
2756
+ id: string;
2757
+ image_url: string | null;
2758
+ incoming_quantity: number;
2759
+ location: string;
2760
+ min_quantity: number;
2761
+ product: string;
2762
+ product_type: string;
2763
+ purchase_price: number | null;
2764
+ quantity: number;
2765
+ sale_price: number | null;
2766
+ unit: string;
2767
+ updated_at: string;
2768
+ weight: string | null;
2769
+ };
2770
+ Insert: {
2771
+ barcode?: string | null;
2772
+ batch: string;
2773
+ created_at?: string;
2774
+ custom_fields?: import("../integrations/supabase/types").Json;
2775
+ id?: string;
2776
+ image_url?: string | null;
2777
+ incoming_quantity?: number;
2778
+ location: string;
2779
+ min_quantity?: number;
2780
+ product: string;
2781
+ product_type?: string;
2782
+ purchase_price?: number | null;
2783
+ quantity?: number;
2784
+ sale_price?: number | null;
2785
+ unit?: string;
2786
+ updated_at?: string;
2787
+ weight?: string | null;
2788
+ };
2789
+ Update: {
2790
+ barcode?: string | null;
2791
+ batch?: string;
2792
+ created_at?: string;
2793
+ custom_fields?: import("../integrations/supabase/types").Json;
2794
+ id?: string;
2795
+ image_url?: string | null;
2796
+ incoming_quantity?: number;
2797
+ location?: string;
2798
+ min_quantity?: number;
2799
+ product?: string;
2800
+ product_type?: string;
2801
+ purchase_price?: number | null;
2802
+ quantity?: number;
2803
+ sale_price?: number | null;
2804
+ unit?: string;
2805
+ updated_at?: string;
2806
+ weight?: string | null;
2807
+ };
2808
+ Relationships: [];
2809
+ };
2810
+ profiles: {
2811
+ Row: {
2812
+ created_at: string;
2813
+ display_name: string | null;
2814
+ email: string | null;
2815
+ id: string;
2816
+ notification_preferences: import("../integrations/supabase/types").Json;
2817
+ updated_at: string;
2818
+ };
2819
+ Insert: {
2820
+ created_at?: string;
2821
+ display_name?: string | null;
2822
+ email?: string | null;
2823
+ id: string;
2824
+ notification_preferences?: import("../integrations/supabase/types").Json;
2825
+ updated_at?: string;
2826
+ };
2827
+ Update: {
2828
+ created_at?: string;
2829
+ display_name?: string | null;
2830
+ email?: string | null;
2831
+ id?: string;
2832
+ notification_preferences?: import("../integrations/supabase/types").Json;
2833
+ updated_at?: string;
2834
+ };
2835
+ Relationships: [];
2836
+ };
2837
+ purchase_order_items: {
2838
+ Row: {
2839
+ created_at: string;
2840
+ id: string;
2841
+ product_id: string | null;
2842
+ product_type: string;
2843
+ purchase_order_id: string;
2844
+ quantity: number;
2845
+ };
2846
+ Insert: {
2847
+ created_at?: string;
2848
+ id?: string;
2849
+ product_id?: string | null;
2850
+ product_type?: string;
2851
+ purchase_order_id: string;
2852
+ quantity?: number;
2853
+ };
2854
+ Update: {
2855
+ created_at?: string;
2856
+ id?: string;
2857
+ product_id?: string | null;
2858
+ product_type?: string;
2859
+ purchase_order_id?: string;
2860
+ quantity?: number;
2861
+ };
2862
+ Relationships: [{
2863
+ foreignKeyName: "purchase_order_items_product_id_fkey";
2864
+ columns: ["product_id"];
2865
+ isOneToOne: false;
2866
+ referencedRelation: "products";
2867
+ referencedColumns: ["id"];
2868
+ }, {
2869
+ foreignKeyName: "purchase_order_items_purchase_order_id_fkey";
2870
+ columns: ["purchase_order_id"];
2871
+ isOneToOne: false;
2872
+ referencedRelation: "purchase_orders";
2873
+ referencedColumns: ["id"];
2874
+ }];
2875
+ };
2876
+ purchase_orders: {
2877
+ Row: {
2878
+ created_at: string;
2879
+ expected_delivery_date: string;
2880
+ id: string;
2881
+ location_id: string | null;
2882
+ notes: string | null;
2883
+ order_number: string;
2884
+ status: string;
2885
+ supplier_id: string | null;
2886
+ supplier_name: string;
2887
+ updated_at: string;
2888
+ };
2889
+ Insert: {
2890
+ created_at?: string;
2891
+ expected_delivery_date: string;
2892
+ id?: string;
2893
+ location_id?: string | null;
2894
+ notes?: string | null;
2895
+ order_number: string;
2896
+ status?: string;
2897
+ supplier_id?: string | null;
2898
+ supplier_name?: string;
2899
+ updated_at?: string;
2900
+ };
2901
+ Update: {
2902
+ created_at?: string;
2903
+ expected_delivery_date?: string;
2904
+ id?: string;
2905
+ location_id?: string | null;
2906
+ notes?: string | null;
2907
+ order_number?: string;
2908
+ status?: string;
2909
+ supplier_id?: string | null;
2910
+ supplier_name?: string;
2911
+ updated_at?: string;
2912
+ };
2913
+ Relationships: [{
2914
+ foreignKeyName: "purchase_orders_location_id_fkey";
2915
+ columns: ["location_id"];
2916
+ isOneToOne: false;
2917
+ referencedRelation: "locations";
2918
+ referencedColumns: ["id"];
2919
+ }, {
2920
+ foreignKeyName: "purchase_orders_supplier_id_fkey";
2921
+ columns: ["supplier_id"];
2922
+ isOneToOne: false;
2923
+ referencedRelation: "suppliers";
2924
+ referencedColumns: ["id"];
2925
+ }];
2926
+ };
2927
+ supplier_products: {
2928
+ Row: {
2929
+ article_number: string | null;
2930
+ created_at: string;
2931
+ id: string;
2932
+ name: string;
2933
+ notes: string | null;
2934
+ pot_size: string | null;
2935
+ price: number | null;
2936
+ quantity: number | null;
2937
+ supplier_id: string;
2938
+ unit: string;
2939
+ updated_at: string;
2940
+ };
2941
+ Insert: {
2942
+ article_number?: string | null;
2943
+ created_at?: string;
2944
+ id?: string;
2945
+ name: string;
2946
+ notes?: string | null;
2947
+ pot_size?: string | null;
2948
+ price?: number | null;
2949
+ quantity?: number | null;
2950
+ supplier_id: string;
2951
+ unit?: string;
2952
+ updated_at?: string;
2953
+ };
2954
+ Update: {
2955
+ article_number?: string | null;
2956
+ created_at?: string;
2957
+ id?: string;
2958
+ name?: string;
2959
+ notes?: string | null;
2960
+ pot_size?: string | null;
2961
+ price?: number | null;
2962
+ quantity?: number | null;
2963
+ supplier_id?: string;
2964
+ unit?: string;
2965
+ updated_at?: string;
2966
+ };
2967
+ Relationships: [{
2968
+ foreignKeyName: "supplier_products_supplier_id_fkey";
2969
+ columns: ["supplier_id"];
2970
+ isOneToOne: false;
2971
+ referencedRelation: "suppliers";
2972
+ referencedColumns: ["id"];
2973
+ }];
2974
+ };
2975
+ suppliers: {
2976
+ Row: {
2977
+ address: string | null;
2978
+ column_mappings: import("../integrations/supabase/types").Json | null;
2979
+ contact_person: string | null;
2980
+ created_at: string;
2981
+ default_product_type: string;
2982
+ email: string | null;
2983
+ id: string;
2984
+ imported_file_name: string | null;
2985
+ name: string;
2986
+ notes: string | null;
2987
+ phone: string | null;
2988
+ updated_at: string;
2989
+ };
2990
+ Insert: {
2991
+ address?: string | null;
2992
+ column_mappings?: import("../integrations/supabase/types").Json | null;
2993
+ contact_person?: string | null;
2994
+ created_at?: string;
2995
+ default_product_type?: string;
2996
+ email?: string | null;
2997
+ id?: string;
2998
+ imported_file_name?: string | null;
2999
+ name: string;
3000
+ notes?: string | null;
3001
+ phone?: string | null;
3002
+ updated_at?: string;
3003
+ };
3004
+ Update: {
3005
+ address?: string | null;
3006
+ column_mappings?: import("../integrations/supabase/types").Json | null;
3007
+ contact_person?: string | null;
3008
+ created_at?: string;
3009
+ default_product_type?: string;
3010
+ email?: string | null;
3011
+ id?: string;
3012
+ imported_file_name?: string | null;
3013
+ name?: string;
3014
+ notes?: string | null;
3015
+ phone?: string | null;
3016
+ updated_at?: string;
3017
+ };
3018
+ Relationships: [];
3019
+ };
3020
+ trade_item_drafts: {
3021
+ Row: {
3022
+ connection_id: string | null;
3023
+ created_at: string;
3024
+ data: import("../integrations/supabase/types").Json;
3025
+ id: string;
3026
+ updated_at: string;
3027
+ user_id: string;
3028
+ };
3029
+ Insert: {
3030
+ connection_id?: string | null;
3031
+ created_at?: string;
3032
+ data?: import("../integrations/supabase/types").Json;
3033
+ id?: string;
3034
+ updated_at?: string;
3035
+ user_id: string;
3036
+ };
3037
+ Update: {
3038
+ connection_id?: string | null;
3039
+ created_at?: string;
3040
+ data?: import("../integrations/supabase/types").Json;
3041
+ id?: string;
3042
+ updated_at?: string;
3043
+ user_id?: string;
3044
+ };
3045
+ Relationships: [];
3046
+ };
3047
+ user_roles: {
3048
+ Row: {
3049
+ created_at: string;
3050
+ id: string;
3051
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
3052
+ user_id: string;
3053
+ };
3054
+ Insert: {
3055
+ created_at?: string;
3056
+ id?: string;
3057
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
3058
+ user_id: string;
3059
+ };
3060
+ Update: {
3061
+ created_at?: string;
3062
+ id?: string;
3063
+ role?: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
3064
+ user_id?: string;
3065
+ };
3066
+ Relationships: [{
3067
+ foreignKeyName: "user_roles_user_id_fkey";
3068
+ columns: ["user_id"];
3069
+ isOneToOne: false;
3070
+ referencedRelation: "profiles";
3071
+ referencedColumns: ["id"];
3072
+ }];
3073
+ };
3074
+ };
3075
+ Views: { [_ in never]: never; };
3076
+ Functions: {
3077
+ has_role: {
3078
+ Args: {
3079
+ _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
3080
+ _user_id: string;
3081
+ };
3082
+ Returns: boolean;
3083
+ };
3084
+ schedule_floriday_network_sync: {
3085
+ Args: {
3086
+ p_apikey: string;
3087
+ p_url: string;
3088
+ };
3089
+ Returns: number;
3090
+ };
3091
+ schedule_floriday_token_refresh: {
3092
+ Args: {
3093
+ p_apikey: string;
3094
+ p_url: string;
3095
+ };
3096
+ Returns: number;
3097
+ };
3098
+ show_limit: {
3099
+ Args: never;
3100
+ Returns: number;
3101
+ };
3102
+ show_trgm: {
3103
+ Args: {
3104
+ "": string;
3105
+ };
3106
+ Returns: string[];
3107
+ };
3108
+ };
3109
+ Enums: {
3110
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
3111
+ exact_env: "staging" | "live";
3112
+ };
3113
+ CompositeTypes: { [_ in never]: never; };
3114
+ }, {
3115
+ PostgrestVersion: "14.5";
3116
+ }>;
3117
+ userId: string;
3118
+ claims: import("@supabase/auth-js").JwtPayload;
3119
+ }, undefined, undefined, undefined>], (input: unknown) => {
3120
+ providerId: string;
3121
+ }, Promise<AccountingSyncResult>>;
3122
+ export declare const syncAllAccountingProviders: import("@tanstack/start-client-core").OptionalFetcher<readonly [import("@tanstack/start-client-core").FunctionMiddlewareAfterServer<{}, unknown, undefined, {
3123
+ supabase: import("@supabase/supabase-js").SupabaseClient<import("../integrations/supabase/types").Database, "public", "public", {
3124
+ Tables: {
3125
+ bugs: {
3126
+ Row: {
3127
+ attachment_url: string | null;
3128
+ created_at: string;
3129
+ description: string;
3130
+ id: string;
3131
+ priority: string;
3132
+ status: string;
3133
+ title: string;
3134
+ updated_at: string;
3135
+ user_id: string;
3136
+ };
3137
+ Insert: {
3138
+ attachment_url?: string | null;
3139
+ created_at?: string;
3140
+ description: string;
3141
+ id?: string;
3142
+ priority?: string;
3143
+ status?: string;
3144
+ title: string;
3145
+ updated_at?: string;
3146
+ user_id: string;
3147
+ };
3148
+ Update: {
3149
+ attachment_url?: string | null;
3150
+ created_at?: string;
3151
+ description?: string;
3152
+ id?: string;
3153
+ priority?: string;
3154
+ status?: string;
3155
+ title?: string;
3156
+ updated_at?: string;
3157
+ user_id?: string;
3158
+ };
3159
+ Relationships: [];
3160
+ };
3161
+ collections: {
3162
+ Row: {
3163
+ created_at: string;
3164
+ created_by: string | null;
3165
+ id: string;
3166
+ name: string;
3167
+ updated_at: string;
3168
+ };
3169
+ Insert: {
3170
+ created_at?: string;
3171
+ created_by?: string | null;
3172
+ id?: string;
3173
+ name: string;
3174
+ updated_at?: string;
3175
+ };
3176
+ Update: {
3177
+ created_at?: string;
3178
+ created_by?: string | null;
3179
+ id?: string;
3180
+ name?: string;
3181
+ updated_at?: string;
3182
+ };
3183
+ Relationships: [];
3184
+ };
3185
+ customer_audit_log: {
3186
+ Row: {
3187
+ action: string;
3188
+ changes: import("../integrations/supabase/types").Json;
3189
+ created_at: string;
3190
+ customer_id: string;
3191
+ id: string;
3192
+ user_id: string | null;
3193
+ };
3194
+ Insert: {
3195
+ action: string;
3196
+ changes?: import("../integrations/supabase/types").Json;
3197
+ created_at?: string;
3198
+ customer_id: string;
3199
+ id?: string;
3200
+ user_id?: string | null;
3201
+ };
3202
+ Update: {
3203
+ action?: string;
3204
+ changes?: import("../integrations/supabase/types").Json;
3205
+ created_at?: string;
3206
+ customer_id?: string;
3207
+ id?: string;
3208
+ user_id?: string | null;
3209
+ };
3210
+ Relationships: [{
3211
+ foreignKeyName: "customer_audit_log_customer_id_fkey";
3212
+ columns: ["customer_id"];
3213
+ isOneToOne: false;
3214
+ referencedRelation: "customers";
3215
+ referencedColumns: ["id"];
3216
+ }];
3217
+ };
3218
+ customer_contacts: {
3219
+ Row: {
3220
+ created_at: string;
3221
+ customer_id: string;
3222
+ email: string | null;
3223
+ floriday_contact_id: string | null;
3224
+ full_name: string;
3225
+ id: string;
3226
+ is_active: boolean;
3227
+ job_title: string | null;
3228
+ phone: string | null;
3229
+ photo_url: string | null;
3230
+ raw: import("../integrations/supabase/types").Json | null;
3231
+ updated_at: string;
3232
+ };
3233
+ Insert: {
3234
+ created_at?: string;
3235
+ customer_id: string;
3236
+ email?: string | null;
3237
+ floriday_contact_id?: string | null;
3238
+ full_name: string;
3239
+ id?: string;
3240
+ is_active?: boolean;
3241
+ job_title?: string | null;
3242
+ phone?: string | null;
3243
+ photo_url?: string | null;
3244
+ raw?: import("../integrations/supabase/types").Json | null;
3245
+ updated_at?: string;
3246
+ };
3247
+ Update: {
3248
+ created_at?: string;
3249
+ customer_id?: string;
3250
+ email?: string | null;
3251
+ floriday_contact_id?: string | null;
3252
+ full_name?: string;
3253
+ id?: string;
3254
+ is_active?: boolean;
3255
+ job_title?: string | null;
3256
+ phone?: string | null;
3257
+ photo_url?: string | null;
3258
+ raw?: import("../integrations/supabase/types").Json | null;
3259
+ updated_at?: string;
3260
+ };
3261
+ Relationships: [{
3262
+ foreignKeyName: "customer_contacts_customer_id_fkey";
3263
+ columns: ["customer_id"];
3264
+ isOneToOne: false;
3265
+ referencedRelation: "customers";
3266
+ referencedColumns: ["id"];
3267
+ }];
3268
+ };
3269
+ customer_delivery_locations: {
3270
+ Row: {
3271
+ address_line: string | null;
3272
+ city: string | null;
3273
+ country: string | null;
3274
+ created_at: string;
3275
+ customer_id: string;
3276
+ floriday_location_id: string | null;
3277
+ gln: string | null;
3278
+ id: string;
3279
+ is_primary: boolean;
3280
+ name: string | null;
3281
+ postal_code: string | null;
3282
+ raw: import("../integrations/supabase/types").Json | null;
3283
+ updated_at: string;
3284
+ };
3285
+ Insert: {
3286
+ address_line?: string | null;
3287
+ city?: string | null;
3288
+ country?: string | null;
3289
+ created_at?: string;
3290
+ customer_id: string;
3291
+ floriday_location_id?: string | null;
3292
+ gln?: string | null;
3293
+ id?: string;
3294
+ is_primary?: boolean;
3295
+ name?: string | null;
3296
+ postal_code?: string | null;
3297
+ raw?: import("../integrations/supabase/types").Json | null;
3298
+ updated_at?: string;
3299
+ };
3300
+ Update: {
3301
+ address_line?: string | null;
3302
+ city?: string | null;
3303
+ country?: string | null;
3304
+ created_at?: string;
3305
+ customer_id?: string;
3306
+ floriday_location_id?: string | null;
3307
+ gln?: string | null;
3308
+ id?: string;
3309
+ is_primary?: boolean;
3310
+ name?: string | null;
3311
+ postal_code?: string | null;
3312
+ raw?: import("../integrations/supabase/types").Json | null;
3313
+ updated_at?: string;
3314
+ };
3315
+ Relationships: [{
3316
+ foreignKeyName: "customer_delivery_locations_customer_id_fkey";
3317
+ columns: ["customer_id"];
3318
+ isOneToOne: false;
3319
+ referencedRelation: "customers";
3320
+ referencedColumns: ["id"];
3321
+ }];
3322
+ };
3323
+ customer_field_options: {
3324
+ Row: {
3325
+ created_at: string;
3326
+ field_setting_id: string;
3327
+ id: string;
3328
+ label: string;
3329
+ sort_order: number;
3330
+ };
3331
+ Insert: {
3332
+ created_at?: string;
3333
+ field_setting_id: string;
3334
+ id?: string;
3335
+ label: string;
3336
+ sort_order?: number;
3337
+ };
3338
+ Update: {
3339
+ created_at?: string;
3340
+ field_setting_id?: string;
3341
+ id?: string;
3342
+ label?: string;
3343
+ sort_order?: number;
3344
+ };
3345
+ Relationships: [{
3346
+ foreignKeyName: "customer_field_options_field_setting_id_fkey";
3347
+ columns: ["field_setting_id"];
3348
+ isOneToOne: false;
3349
+ referencedRelation: "customer_field_settings";
3350
+ referencedColumns: ["id"];
3351
+ }];
3352
+ };
3353
+ customer_field_settings: {
3354
+ Row: {
3355
+ created_at: string;
3356
+ field_key: string;
3357
+ field_label: string;
3358
+ field_type: string;
3359
+ id: string;
3360
+ is_custom: boolean;
3361
+ sort_order: number;
3362
+ updated_at: string;
3363
+ };
3364
+ Insert: {
3365
+ created_at?: string;
3366
+ field_key: string;
3367
+ field_label: string;
3368
+ field_type?: string;
3369
+ id?: string;
3370
+ is_custom?: boolean;
3371
+ sort_order?: number;
3372
+ updated_at?: string;
3373
+ };
3374
+ Update: {
3375
+ created_at?: string;
3376
+ field_key?: string;
3377
+ field_label?: string;
3378
+ field_type?: string;
3379
+ id?: string;
3380
+ is_custom?: boolean;
3381
+ sort_order?: number;
3382
+ updated_at?: string;
3383
+ };
3384
+ Relationships: [];
3385
+ };
3386
+ customer_selected_assortment: {
3387
+ Row: {
3388
+ article_number: string | null;
3389
+ created_at: string;
3390
+ customer_id: string;
3391
+ floriday_item_id: string | null;
3392
+ id: string;
3393
+ price: number | null;
3394
+ product_group: string | null;
3395
+ product_name: string;
3396
+ raw: import("../integrations/supabase/types").Json | null;
3397
+ unit: string | null;
3398
+ updated_at: string;
3399
+ };
3400
+ Insert: {
3401
+ article_number?: string | null;
3402
+ created_at?: string;
3403
+ customer_id: string;
3404
+ floriday_item_id?: string | null;
3405
+ id?: string;
3406
+ price?: number | null;
3407
+ product_group?: string | null;
3408
+ product_name: string;
3409
+ raw?: import("../integrations/supabase/types").Json | null;
3410
+ unit?: string | null;
3411
+ updated_at?: string;
3412
+ };
3413
+ Update: {
3414
+ article_number?: string | null;
3415
+ created_at?: string;
3416
+ customer_id?: string;
3417
+ floriday_item_id?: string | null;
3418
+ id?: string;
3419
+ price?: number | null;
3420
+ product_group?: string | null;
3421
+ product_name?: string;
3422
+ raw?: import("../integrations/supabase/types").Json | null;
3423
+ unit?: string | null;
3424
+ updated_at?: string;
3425
+ };
3426
+ Relationships: [{
3427
+ foreignKeyName: "customer_selected_assortment_customer_id_fkey";
3428
+ columns: ["customer_id"];
3429
+ isOneToOne: false;
3430
+ referencedRelation: "customers";
3431
+ referencedColumns: ["id"];
3432
+ }];
3433
+ };
3434
+ customer_trade_settings: {
3435
+ Row: {
3436
+ category: string;
3437
+ created_at: string;
3438
+ customer_id: string;
3439
+ id: string;
3440
+ is_active: boolean;
3441
+ raw: import("../integrations/supabase/types").Json | null;
3442
+ setting_key: string;
3443
+ setting_label: string;
3444
+ updated_at: string;
3445
+ };
3446
+ Insert: {
3447
+ category?: string;
3448
+ created_at?: string;
3449
+ customer_id: string;
3450
+ id?: string;
3451
+ is_active?: boolean;
3452
+ raw?: import("../integrations/supabase/types").Json | null;
3453
+ setting_key: string;
3454
+ setting_label: string;
3455
+ updated_at?: string;
3456
+ };
3457
+ Update: {
3458
+ category?: string;
3459
+ created_at?: string;
3460
+ customer_id?: string;
3461
+ id?: string;
3462
+ is_active?: boolean;
3463
+ raw?: import("../integrations/supabase/types").Json | null;
3464
+ setting_key?: string;
3465
+ setting_label?: string;
3466
+ updated_at?: string;
3467
+ };
3468
+ Relationships: [{
3469
+ foreignKeyName: "customer_trade_settings_customer_id_fkey";
3470
+ columns: ["customer_id"];
3471
+ isOneToOne: false;
3472
+ referencedRelation: "customers";
3473
+ referencedColumns: ["id"];
3474
+ }];
3475
+ };
3476
+ customers: {
3477
+ Row: {
3478
+ address: string | null;
3479
+ bio: string | null;
3480
+ city: string | null;
3481
+ commercial_name: string | null;
3482
+ company_name: string;
3483
+ connection_status: string;
3484
+ contact_person: string | null;
3485
+ country: string | null;
3486
+ created_at: string;
3487
+ custom_fields: import("../integrations/supabase/types").Json;
3488
+ customer_class: string | null;
3489
+ email: string | null;
3490
+ external_id: string | null;
3491
+ floriday_connection_id: string | null;
3492
+ floriday_organization_id: string | null;
3493
+ floriday_raw: import("../integrations/supabase/types").Json | null;
3494
+ gln: string | null;
3495
+ house_number: string | null;
3496
+ id: string;
3497
+ is_active: boolean;
3498
+ last_synced_at: string | null;
3499
+ logo_url: string | null;
3500
+ markets: string[];
3501
+ notes: string | null;
3502
+ organization_type: string | null;
3503
+ payment_methods: string[];
3504
+ phone: string | null;
3505
+ postal_code: string | null;
3506
+ product_groups: string[];
3507
+ segments: string[];
3508
+ source: string;
3509
+ street: string | null;
3510
+ sync_error: string | null;
3511
+ sync_status: string;
3512
+ trade_forms: string[];
3513
+ updated_at: string;
3514
+ vat_number: string | null;
3515
+ website: string | null;
3516
+ };
3517
+ Insert: {
3518
+ address?: string | null;
3519
+ bio?: string | null;
3520
+ city?: string | null;
3521
+ commercial_name?: string | null;
3522
+ company_name: string;
3523
+ connection_status?: string;
3524
+ contact_person?: string | null;
3525
+ country?: string | null;
3526
+ created_at?: string;
3527
+ custom_fields?: import("../integrations/supabase/types").Json;
3528
+ customer_class?: string | null;
3529
+ email?: string | null;
3530
+ external_id?: string | null;
3531
+ floriday_connection_id?: string | null;
3532
+ floriday_organization_id?: string | null;
3533
+ floriday_raw?: import("../integrations/supabase/types").Json | null;
3534
+ gln?: string | null;
3535
+ house_number?: string | null;
3536
+ id?: string;
3537
+ is_active?: boolean;
3538
+ last_synced_at?: string | null;
3539
+ logo_url?: string | null;
3540
+ markets?: string[];
3541
+ notes?: string | null;
3542
+ organization_type?: string | null;
3543
+ payment_methods?: string[];
3544
+ phone?: string | null;
3545
+ postal_code?: string | null;
3546
+ product_groups?: string[];
3547
+ segments?: string[];
3548
+ source?: string;
3549
+ street?: string | null;
3550
+ sync_error?: string | null;
3551
+ sync_status?: string;
3552
+ trade_forms?: string[];
3553
+ updated_at?: string;
3554
+ vat_number?: string | null;
3555
+ website?: string | null;
3556
+ };
3557
+ Update: {
3558
+ address?: string | null;
3559
+ bio?: string | null;
3560
+ city?: string | null;
3561
+ commercial_name?: string | null;
3562
+ company_name?: string;
3563
+ connection_status?: string;
3564
+ contact_person?: string | null;
3565
+ country?: string | null;
3566
+ created_at?: string;
3567
+ custom_fields?: import("../integrations/supabase/types").Json;
3568
+ customer_class?: string | null;
3569
+ email?: string | null;
3570
+ external_id?: string | null;
3571
+ floriday_connection_id?: string | null;
3572
+ floriday_organization_id?: string | null;
3573
+ floriday_raw?: import("../integrations/supabase/types").Json | null;
3574
+ gln?: string | null;
3575
+ house_number?: string | null;
3576
+ id?: string;
3577
+ is_active?: boolean;
3578
+ last_synced_at?: string | null;
3579
+ logo_url?: string | null;
3580
+ markets?: string[];
3581
+ notes?: string | null;
3582
+ organization_type?: string | null;
3583
+ payment_methods?: string[];
3584
+ phone?: string | null;
3585
+ postal_code?: string | null;
3586
+ product_groups?: string[];
3587
+ segments?: string[];
3588
+ source?: string;
3589
+ street?: string | null;
3590
+ sync_error?: string | null;
3591
+ sync_status?: string;
3592
+ trade_forms?: string[];
3593
+ updated_at?: string;
3594
+ vat_number?: string | null;
3595
+ website?: string | null;
3596
+ };
3597
+ Relationships: [];
3598
+ };
3599
+ exact_connections: {
3600
+ Row: {
3601
+ access_token_encrypted: string;
3602
+ company_name: string | null;
3603
+ connected_at: string;
3604
+ connected_by: string | null;
3605
+ division_code: number | null;
3606
+ environment: import("../integrations/supabase/types").Database["public"]["Enums"]["exact_env"];
3607
+ expires_at: string;
3608
+ id: string;
3609
+ refresh_token_encrypted: string;
3610
+ status: string;
3611
+ updated_at: string;
3612
+ };
3613
+ Insert: {
3614
+ access_token_encrypted: string;
3615
+ company_name?: string | null;
3616
+ connected_at?: string;
3617
+ connected_by?: string | null;
3618
+ division_code?: number | null;
3619
+ environment: import("../integrations/supabase/types").Database["public"]["Enums"]["exact_env"];
3620
+ expires_at: string;
3621
+ id?: string;
3622
+ refresh_token_encrypted: string;
3623
+ status?: string;
3624
+ updated_at?: string;
3625
+ };
3626
+ Update: {
3627
+ access_token_encrypted?: string;
3628
+ company_name?: string | null;
3629
+ connected_at?: string;
3630
+ connected_by?: string | null;
3631
+ division_code?: number | null;
3632
+ environment?: import("../integrations/supabase/types").Database["public"]["Enums"]["exact_env"];
3633
+ expires_at?: string;
3634
+ id?: string;
3635
+ refresh_token_encrypted?: string;
3636
+ status?: string;
3637
+ updated_at?: string;
3638
+ };
3639
+ Relationships: [];
3640
+ };
3641
+ exact_credentials: {
3642
+ Row: {
3643
+ client_id: string;
3644
+ client_secret_encrypted: string;
3645
+ created_at: string;
3646
+ environment: import("../integrations/supabase/types").Database["public"]["Enums"]["exact_env"];
3647
+ id: string;
3648
+ redirect_uri: string;
3649
+ updated_at: string;
3650
+ };
3651
+ Insert: {
3652
+ client_id: string;
3653
+ client_secret_encrypted: string;
3654
+ created_at?: string;
3655
+ environment: import("../integrations/supabase/types").Database["public"]["Enums"]["exact_env"];
3656
+ id?: string;
3657
+ redirect_uri: string;
3658
+ updated_at?: string;
3659
+ };
3660
+ Update: {
3661
+ client_id?: string;
3662
+ client_secret_encrypted?: string;
3663
+ created_at?: string;
3664
+ environment?: import("../integrations/supabase/types").Database["public"]["Enums"]["exact_env"];
3665
+ id?: string;
3666
+ redirect_uri?: string;
3667
+ updated_at?: string;
3668
+ };
3669
+ Relationships: [];
3670
+ };
3671
+ exact_customers_cache: {
3672
+ Row: {
3673
+ connection_id: string;
3674
+ data: import("../integrations/supabase/types").Json;
3675
+ exact_id: string;
3676
+ fetched_at: string;
3677
+ };
3678
+ Insert: {
3679
+ connection_id: string;
3680
+ data?: import("../integrations/supabase/types").Json;
3681
+ exact_id: string;
3682
+ fetched_at?: string;
3683
+ };
3684
+ Update: {
3685
+ connection_id?: string;
3686
+ data?: import("../integrations/supabase/types").Json;
3687
+ exact_id?: string;
3688
+ fetched_at?: string;
3689
+ };
3690
+ Relationships: [];
3691
+ };
3692
+ exact_sync_state: {
3693
+ Row: {
3694
+ connection_id: string;
3695
+ last_error: string | null;
3696
+ last_modified_cursor: string | null;
3697
+ last_synced_at: string | null;
3698
+ status: string;
3699
+ updated_at: string;
3700
+ };
3701
+ Insert: {
3702
+ connection_id: string;
3703
+ last_error?: string | null;
3704
+ last_modified_cursor?: string | null;
3705
+ last_synced_at?: string | null;
3706
+ status?: string;
3707
+ updated_at?: string;
3708
+ };
3709
+ Update: {
3710
+ connection_id?: string;
3711
+ last_error?: string | null;
3712
+ last_modified_cursor?: string | null;
3713
+ last_synced_at?: string | null;
3714
+ status?: string;
3715
+ updated_at?: string;
3716
+ };
3717
+ Relationships: [];
3718
+ };
3719
+ floricode_connection_settings: {
3720
+ Row: {
3721
+ catalog_key: string | null;
3722
+ catalog_url: string;
3723
+ created_at: string;
3724
+ id: number;
3725
+ last_meta: import("../integrations/supabase/types").Json | null;
3726
+ last_test_at: string | null;
3727
+ last_test_error: string | null;
3728
+ last_test_ok: boolean | null;
3729
+ updated_at: string;
3730
+ };
3731
+ Insert: {
3732
+ catalog_key?: string | null;
3733
+ catalog_url?: string;
3734
+ created_at?: string;
3735
+ id?: number;
3736
+ last_meta?: import("../integrations/supabase/types").Json | null;
3737
+ last_test_at?: string | null;
3738
+ last_test_error?: string | null;
3739
+ last_test_ok?: boolean | null;
3740
+ updated_at?: string;
3741
+ };
3742
+ Update: {
3743
+ catalog_key?: string | null;
3744
+ catalog_url?: string;
3745
+ created_at?: string;
3746
+ id?: number;
3747
+ last_meta?: import("../integrations/supabase/types").Json | null;
3748
+ last_test_at?: string | null;
3749
+ last_test_error?: string | null;
3750
+ last_test_ok?: boolean | null;
3751
+ updated_at?: string;
3752
+ };
3753
+ Relationships: [];
3754
+ };
3755
+ floricode_records: {
3756
+ Row: {
3757
+ change_date_time: string | null;
3758
+ data: import("../integrations/supabase/types").Json;
3759
+ last_synced_at: string;
3760
+ record_id: string;
3761
+ resource: string;
3762
+ };
3763
+ Insert: {
3764
+ change_date_time?: string | null;
3765
+ data?: import("../integrations/supabase/types").Json;
3766
+ last_synced_at?: string;
3767
+ record_id: string;
3768
+ resource: string;
3769
+ };
3770
+ Update: {
3771
+ change_date_time?: string | null;
3772
+ data?: import("../integrations/supabase/types").Json;
3773
+ last_synced_at?: string;
3774
+ record_id?: string;
3775
+ resource?: string;
3776
+ };
3777
+ Relationships: [];
3778
+ };
3779
+ floricode_sync_state: {
3780
+ Row: {
3781
+ error_message: string | null;
3782
+ last_change_date_time: string | null;
3783
+ last_sequence_number: number;
3784
+ last_sync_at: string | null;
3785
+ resource: string;
3786
+ status: string;
3787
+ updated_at: string;
3788
+ };
3789
+ Insert: {
3790
+ error_message?: string | null;
3791
+ last_change_date_time?: string | null;
3792
+ last_sequence_number?: number;
3793
+ last_sync_at?: string | null;
3794
+ resource: string;
3795
+ status?: string;
3796
+ updated_at?: string;
3797
+ };
3798
+ Update: {
3799
+ error_message?: string | null;
3800
+ last_change_date_time?: string | null;
3801
+ last_sequence_number?: number;
3802
+ last_sync_at?: string | null;
3803
+ resource?: string;
3804
+ status?: string;
3805
+ updated_at?: string;
3806
+ };
3807
+ Relationships: [];
3808
+ };
3809
+ floriday_connections: {
3810
+ Row: {
3811
+ access_token: string | null;
3812
+ api_key: string;
3813
+ client_id: string;
3814
+ client_secret: string;
3815
+ created_at: string;
3816
+ customers_endpoint: string | null;
3817
+ environment: string;
3818
+ gln_code: string | null;
3819
+ id: string;
3820
+ is_active: boolean;
3821
+ label: string;
3822
+ organization_name: string | null;
3823
+ preferred_warehouse_id: string | null;
3824
+ preferred_warehouse_name: string | null;
3825
+ token_expires_at: string | null;
3826
+ updated_at: string;
3827
+ };
3828
+ Insert: {
3829
+ access_token?: string | null;
3830
+ api_key: string;
3831
+ client_id: string;
3832
+ client_secret: string;
3833
+ created_at?: string;
3834
+ customers_endpoint?: string | null;
3835
+ environment: string;
3836
+ gln_code?: string | null;
3837
+ id?: string;
3838
+ is_active?: boolean;
3839
+ label?: string;
3840
+ organization_name?: string | null;
3841
+ preferred_warehouse_id?: string | null;
3842
+ preferred_warehouse_name?: string | null;
3843
+ token_expires_at?: string | null;
3844
+ updated_at?: string;
3845
+ };
3846
+ Update: {
3847
+ access_token?: string | null;
3848
+ api_key?: string;
3849
+ client_id?: string;
3850
+ client_secret?: string;
3851
+ created_at?: string;
3852
+ customers_endpoint?: string | null;
3853
+ environment?: string;
3854
+ gln_code?: string | null;
3855
+ id?: string;
3856
+ is_active?: boolean;
3857
+ label?: string;
3858
+ organization_name?: string | null;
3859
+ preferred_warehouse_id?: string | null;
3860
+ preferred_warehouse_name?: string | null;
3861
+ token_expires_at?: string | null;
3862
+ updated_at?: string;
3863
+ };
3864
+ Relationships: [];
3865
+ };
3866
+ floriday_customers_cache: {
3867
+ Row: {
3868
+ connection_id: string | null;
3869
+ data: import("../integrations/supabase/types").Json;
3870
+ fetched_at: string;
3871
+ organization_id: string;
3872
+ };
3873
+ Insert: {
3874
+ connection_id?: string | null;
3875
+ data?: import("../integrations/supabase/types").Json;
3876
+ fetched_at?: string;
3877
+ organization_id: string;
3878
+ };
3879
+ Update: {
3880
+ connection_id?: string | null;
3881
+ data?: import("../integrations/supabase/types").Json;
3882
+ fetched_at?: string;
3883
+ organization_id?: string;
3884
+ };
3885
+ Relationships: [{
3886
+ foreignKeyName: "floriday_customers_cache_connection_id_fkey";
3887
+ columns: ["connection_id"];
3888
+ isOneToOne: false;
3889
+ referencedRelation: "floriday_connections";
3890
+ referencedColumns: ["id"];
3891
+ }];
3892
+ };
3893
+ floriday_network_cache: {
3894
+ Row: {
3895
+ city: string | null;
3896
+ connection_id: string;
3897
+ country: string | null;
3898
+ data: import("../integrations/supabase/types").Json;
3899
+ fetched_at: string;
3900
+ gln: string | null;
3901
+ organization_id: string;
3902
+ organization_name: string | null;
3903
+ };
3904
+ Insert: {
3905
+ city?: string | null;
3906
+ connection_id: string;
3907
+ country?: string | null;
3908
+ data?: import("../integrations/supabase/types").Json;
3909
+ fetched_at?: string;
3910
+ gln?: string | null;
3911
+ organization_id: string;
3912
+ organization_name?: string | null;
3913
+ };
3914
+ Update: {
3915
+ city?: string | null;
3916
+ connection_id?: string;
3917
+ country?: string | null;
3918
+ data?: import("../integrations/supabase/types").Json;
3919
+ fetched_at?: string;
3920
+ gln?: string | null;
3921
+ organization_id?: string;
3922
+ organization_name?: string | null;
3923
+ };
3924
+ Relationships: [];
3925
+ };
3926
+ floriday_network_sync_state: {
3927
+ Row: {
3928
+ connection_id: string;
3929
+ last_error: string | null;
3930
+ last_sequence_number: number;
3931
+ last_synced_at: string | null;
3932
+ updated_at: string;
3933
+ };
3934
+ Insert: {
3935
+ connection_id: string;
3936
+ last_error?: string | null;
3937
+ last_sequence_number?: number;
3938
+ last_synced_at?: string | null;
3939
+ updated_at?: string;
3940
+ };
3941
+ Update: {
3942
+ connection_id?: string;
3943
+ last_error?: string | null;
3944
+ last_sequence_number?: number;
3945
+ last_synced_at?: string | null;
3946
+ updated_at?: string;
3947
+ };
3948
+ Relationships: [];
3949
+ };
3950
+ floriday_settings: {
3951
+ Row: {
3952
+ active_environment: string;
3953
+ id: number;
3954
+ updated_at: string;
3955
+ };
3956
+ Insert: {
3957
+ active_environment?: string;
3958
+ id?: number;
3959
+ updated_at?: string;
3960
+ };
3961
+ Update: {
3962
+ active_environment?: string;
3963
+ id?: number;
3964
+ updated_at?: string;
3965
+ };
3966
+ Relationships: [];
3967
+ };
3968
+ inventory_settings: {
3969
+ Row: {
3970
+ created_at: string;
3971
+ hierarchy_levels: string[];
3972
+ id: string;
3973
+ updated_at: string;
3974
+ visible_columns: string[];
3975
+ };
3976
+ Insert: {
3977
+ created_at?: string;
3978
+ hierarchy_levels?: string[];
3979
+ id?: string;
3980
+ updated_at?: string;
3981
+ visible_columns?: string[];
3982
+ };
3983
+ Update: {
3984
+ created_at?: string;
3985
+ hierarchy_levels?: string[];
3986
+ id?: string;
3987
+ updated_at?: string;
3988
+ visible_columns?: string[];
3989
+ };
3990
+ Relationships: [];
3991
+ };
3992
+ locations: {
3993
+ Row: {
3994
+ created_at: string;
3995
+ id: string;
3996
+ name: string;
3997
+ sort_order: number;
3998
+ updated_at: string;
3999
+ };
4000
+ Insert: {
4001
+ created_at?: string;
4002
+ id?: string;
4003
+ name: string;
4004
+ sort_order?: number;
4005
+ updated_at?: string;
4006
+ };
4007
+ Update: {
4008
+ created_at?: string;
4009
+ id?: string;
4010
+ name?: string;
4011
+ sort_order?: number;
4012
+ updated_at?: string;
4013
+ };
4014
+ Relationships: [];
4015
+ };
4016
+ notifications: {
4017
+ Row: {
4018
+ created_at: string;
4019
+ id: string;
4020
+ message: string | null;
4021
+ read: boolean;
4022
+ title: string;
4023
+ updated_at: string;
4024
+ user_id: string;
4025
+ };
4026
+ Insert: {
4027
+ created_at?: string;
4028
+ id?: string;
4029
+ message?: string | null;
4030
+ read?: boolean;
4031
+ title: string;
4032
+ updated_at?: string;
4033
+ user_id: string;
4034
+ };
4035
+ Update: {
4036
+ created_at?: string;
4037
+ id?: string;
4038
+ message?: string | null;
4039
+ read?: boolean;
4040
+ title?: string;
4041
+ updated_at?: string;
4042
+ user_id?: string;
4043
+ };
4044
+ Relationships: [];
4045
+ };
4046
+ order_field_options: {
4047
+ Row: {
4048
+ created_at: string;
4049
+ field_setting_id: string;
4050
+ id: string;
4051
+ label: string;
4052
+ sort_order: number;
4053
+ };
4054
+ Insert: {
4055
+ created_at?: string;
4056
+ field_setting_id: string;
4057
+ id?: string;
4058
+ label: string;
4059
+ sort_order?: number;
4060
+ };
4061
+ Update: {
4062
+ created_at?: string;
4063
+ field_setting_id?: string;
4064
+ id?: string;
4065
+ label?: string;
4066
+ sort_order?: number;
4067
+ };
4068
+ Relationships: [{
4069
+ foreignKeyName: "order_field_options_field_setting_id_fkey";
4070
+ columns: ["field_setting_id"];
4071
+ isOneToOne: false;
4072
+ referencedRelation: "order_field_settings";
4073
+ referencedColumns: ["id"];
4074
+ }];
4075
+ };
4076
+ order_field_settings: {
4077
+ Row: {
4078
+ active: boolean;
4079
+ created_at: string;
4080
+ field_key: string;
4081
+ field_label: string;
4082
+ field_type: string;
4083
+ id: string;
4084
+ is_custom: boolean;
4085
+ sort_order: number;
4086
+ updated_at: string;
4087
+ };
4088
+ Insert: {
4089
+ active?: boolean;
4090
+ created_at?: string;
4091
+ field_key: string;
4092
+ field_label: string;
4093
+ field_type?: string;
4094
+ id?: string;
4095
+ is_custom?: boolean;
4096
+ sort_order?: number;
4097
+ updated_at?: string;
4098
+ };
4099
+ Update: {
4100
+ active?: boolean;
4101
+ created_at?: string;
4102
+ field_key?: string;
4103
+ field_label?: string;
4104
+ field_type?: string;
4105
+ id?: string;
4106
+ is_custom?: boolean;
4107
+ sort_order?: number;
4108
+ updated_at?: string;
4109
+ };
4110
+ Relationships: [];
4111
+ };
4112
+ order_items: {
4113
+ Row: {
4114
+ created_at: string;
4115
+ id: string;
4116
+ order_id: string;
4117
+ product_id: string | null;
4118
+ product_name: string;
4119
+ quantity: number;
4120
+ unit: string;
4121
+ unit_price: number | null;
4122
+ };
4123
+ Insert: {
4124
+ created_at?: string;
4125
+ id?: string;
4126
+ order_id: string;
4127
+ product_id?: string | null;
4128
+ product_name: string;
4129
+ quantity?: number;
4130
+ unit?: string;
4131
+ unit_price?: number | null;
4132
+ };
4133
+ Update: {
4134
+ created_at?: string;
4135
+ id?: string;
4136
+ order_id?: string;
4137
+ product_id?: string | null;
4138
+ product_name?: string;
4139
+ quantity?: number;
4140
+ unit?: string;
4141
+ unit_price?: number | null;
4142
+ };
4143
+ Relationships: [{
4144
+ foreignKeyName: "order_items_order_id_fkey";
4145
+ columns: ["order_id"];
4146
+ isOneToOne: false;
4147
+ referencedRelation: "orders";
4148
+ referencedColumns: ["id"];
4149
+ }, {
4150
+ foreignKeyName: "order_items_product_id_fkey";
4151
+ columns: ["product_id"];
4152
+ isOneToOne: false;
4153
+ referencedRelation: "products";
4154
+ referencedColumns: ["id"];
4155
+ }];
4156
+ };
4157
+ orders: {
4158
+ Row: {
4159
+ created_at: string;
4160
+ custom_fields: import("../integrations/supabase/types").Json;
4161
+ customer_id: string | null;
4162
+ customer_name: string;
4163
+ deleted_at: string | null;
4164
+ delivery_date: string;
4165
+ id: string;
4166
+ notes: string | null;
4167
+ order_date: string;
4168
+ order_number: string;
4169
+ status: string;
4170
+ total: string;
4171
+ updated_at: string;
4172
+ };
4173
+ Insert: {
4174
+ created_at?: string;
4175
+ custom_fields?: import("../integrations/supabase/types").Json;
4176
+ customer_id?: string | null;
4177
+ customer_name?: string;
4178
+ deleted_at?: string | null;
4179
+ delivery_date: string;
4180
+ id?: string;
4181
+ notes?: string | null;
4182
+ order_date?: string;
4183
+ order_number: string;
4184
+ status?: string;
4185
+ total?: string;
4186
+ updated_at?: string;
4187
+ };
4188
+ Update: {
4189
+ created_at?: string;
4190
+ custom_fields?: import("../integrations/supabase/types").Json;
4191
+ customer_id?: string | null;
4192
+ customer_name?: string;
4193
+ deleted_at?: string | null;
4194
+ delivery_date?: string;
4195
+ id?: string;
4196
+ notes?: string | null;
4197
+ order_date?: string;
4198
+ order_number?: string;
4199
+ status?: string;
4200
+ total?: string;
4201
+ updated_at?: string;
4202
+ };
4203
+ Relationships: [{
4204
+ foreignKeyName: "orders_customer_id_fkey";
4205
+ columns: ["customer_id"];
4206
+ isOneToOne: false;
4207
+ referencedRelation: "customers";
4208
+ referencedColumns: ["id"];
4209
+ }];
4210
+ };
4211
+ product_categories: {
4212
+ Row: {
4213
+ color: string;
4214
+ created_at: string;
4215
+ icon: string | null;
4216
+ id: string;
4217
+ name: string;
4218
+ slug: string;
4219
+ sort_order: number;
4220
+ updated_at: string;
4221
+ };
4222
+ Insert: {
4223
+ color?: string;
4224
+ created_at?: string;
4225
+ icon?: string | null;
4226
+ id?: string;
4227
+ name: string;
4228
+ slug: string;
4229
+ sort_order?: number;
4230
+ updated_at?: string;
4231
+ };
4232
+ Update: {
4233
+ color?: string;
4234
+ created_at?: string;
4235
+ icon?: string | null;
4236
+ id?: string;
4237
+ name?: string;
4238
+ slug?: string;
4239
+ sort_order?: number;
4240
+ updated_at?: string;
4241
+ };
4242
+ Relationships: [];
4243
+ };
4244
+ product_field_options: {
4245
+ Row: {
4246
+ created_at: string;
4247
+ field_setting_id: string;
4248
+ id: string;
4249
+ label: string;
4250
+ sort_order: number;
4251
+ };
4252
+ Insert: {
4253
+ created_at?: string;
4254
+ field_setting_id: string;
4255
+ id?: string;
4256
+ label: string;
4257
+ sort_order?: number;
4258
+ };
4259
+ Update: {
4260
+ created_at?: string;
4261
+ field_setting_id?: string;
4262
+ id?: string;
4263
+ label?: string;
4264
+ sort_order?: number;
4265
+ };
4266
+ Relationships: [{
4267
+ foreignKeyName: "product_field_options_field_setting_id_fkey";
4268
+ columns: ["field_setting_id"];
4269
+ isOneToOne: false;
4270
+ referencedRelation: "product_field_settings";
4271
+ referencedColumns: ["id"];
4272
+ }];
4273
+ };
4274
+ product_field_settings: {
4275
+ Row: {
4276
+ active_per_category: import("../integrations/supabase/types").Json;
4277
+ created_at: string;
4278
+ field_key: string;
4279
+ field_label: string;
4280
+ field_type: string;
4281
+ id: string;
4282
+ is_custom: boolean;
4283
+ sort_order: number;
4284
+ updated_at: string;
4285
+ };
4286
+ Insert: {
4287
+ active_per_category?: import("../integrations/supabase/types").Json;
4288
+ created_at?: string;
4289
+ field_key: string;
4290
+ field_label: string;
4291
+ field_type?: string;
4292
+ id?: string;
4293
+ is_custom?: boolean;
4294
+ sort_order?: number;
4295
+ updated_at?: string;
4296
+ };
4297
+ Update: {
4298
+ active_per_category?: import("../integrations/supabase/types").Json;
4299
+ created_at?: string;
4300
+ field_key?: string;
4301
+ field_label?: string;
4302
+ field_type?: string;
4303
+ id?: string;
4304
+ is_custom?: boolean;
4305
+ sort_order?: number;
4306
+ updated_at?: string;
4307
+ };
4308
+ Relationships: [];
4309
+ };
4310
+ products: {
4311
+ Row: {
4312
+ barcode: string | null;
4313
+ batch: string;
4314
+ created_at: string;
4315
+ custom_fields: import("../integrations/supabase/types").Json;
4316
+ id: string;
4317
+ image_url: string | null;
4318
+ incoming_quantity: number;
4319
+ location: string;
4320
+ min_quantity: number;
4321
+ product: string;
4322
+ product_type: string;
4323
+ purchase_price: number | null;
4324
+ quantity: number;
4325
+ sale_price: number | null;
4326
+ unit: string;
4327
+ updated_at: string;
4328
+ weight: string | null;
4329
+ };
4330
+ Insert: {
4331
+ barcode?: string | null;
4332
+ batch: string;
4333
+ created_at?: string;
4334
+ custom_fields?: import("../integrations/supabase/types").Json;
4335
+ id?: string;
4336
+ image_url?: string | null;
4337
+ incoming_quantity?: number;
4338
+ location: string;
4339
+ min_quantity?: number;
4340
+ product: string;
4341
+ product_type?: string;
4342
+ purchase_price?: number | null;
4343
+ quantity?: number;
4344
+ sale_price?: number | null;
4345
+ unit?: string;
4346
+ updated_at?: string;
4347
+ weight?: string | null;
4348
+ };
4349
+ Update: {
4350
+ barcode?: string | null;
4351
+ batch?: string;
4352
+ created_at?: string;
4353
+ custom_fields?: import("../integrations/supabase/types").Json;
4354
+ id?: string;
4355
+ image_url?: string | null;
4356
+ incoming_quantity?: number;
4357
+ location?: string;
4358
+ min_quantity?: number;
4359
+ product?: string;
4360
+ product_type?: string;
4361
+ purchase_price?: number | null;
4362
+ quantity?: number;
4363
+ sale_price?: number | null;
4364
+ unit?: string;
4365
+ updated_at?: string;
4366
+ weight?: string | null;
4367
+ };
4368
+ Relationships: [];
4369
+ };
4370
+ profiles: {
4371
+ Row: {
4372
+ created_at: string;
4373
+ display_name: string | null;
4374
+ email: string | null;
4375
+ id: string;
4376
+ notification_preferences: import("../integrations/supabase/types").Json;
4377
+ updated_at: string;
4378
+ };
4379
+ Insert: {
4380
+ created_at?: string;
4381
+ display_name?: string | null;
4382
+ email?: string | null;
4383
+ id: string;
4384
+ notification_preferences?: import("../integrations/supabase/types").Json;
4385
+ updated_at?: string;
4386
+ };
4387
+ Update: {
4388
+ created_at?: string;
4389
+ display_name?: string | null;
4390
+ email?: string | null;
4391
+ id?: string;
4392
+ notification_preferences?: import("../integrations/supabase/types").Json;
4393
+ updated_at?: string;
4394
+ };
4395
+ Relationships: [];
4396
+ };
4397
+ purchase_order_items: {
4398
+ Row: {
4399
+ created_at: string;
4400
+ id: string;
4401
+ product_id: string | null;
4402
+ product_type: string;
4403
+ purchase_order_id: string;
4404
+ quantity: number;
4405
+ };
4406
+ Insert: {
4407
+ created_at?: string;
4408
+ id?: string;
4409
+ product_id?: string | null;
4410
+ product_type?: string;
4411
+ purchase_order_id: string;
4412
+ quantity?: number;
4413
+ };
4414
+ Update: {
4415
+ created_at?: string;
4416
+ id?: string;
4417
+ product_id?: string | null;
4418
+ product_type?: string;
4419
+ purchase_order_id?: string;
4420
+ quantity?: number;
4421
+ };
4422
+ Relationships: [{
4423
+ foreignKeyName: "purchase_order_items_product_id_fkey";
4424
+ columns: ["product_id"];
4425
+ isOneToOne: false;
4426
+ referencedRelation: "products";
4427
+ referencedColumns: ["id"];
4428
+ }, {
4429
+ foreignKeyName: "purchase_order_items_purchase_order_id_fkey";
4430
+ columns: ["purchase_order_id"];
4431
+ isOneToOne: false;
4432
+ referencedRelation: "purchase_orders";
4433
+ referencedColumns: ["id"];
4434
+ }];
4435
+ };
4436
+ purchase_orders: {
4437
+ Row: {
4438
+ created_at: string;
4439
+ expected_delivery_date: string;
4440
+ id: string;
4441
+ location_id: string | null;
4442
+ notes: string | null;
4443
+ order_number: string;
4444
+ status: string;
4445
+ supplier_id: string | null;
4446
+ supplier_name: string;
4447
+ updated_at: string;
4448
+ };
4449
+ Insert: {
4450
+ created_at?: string;
4451
+ expected_delivery_date: string;
4452
+ id?: string;
4453
+ location_id?: string | null;
4454
+ notes?: string | null;
4455
+ order_number: string;
4456
+ status?: string;
4457
+ supplier_id?: string | null;
4458
+ supplier_name?: string;
4459
+ updated_at?: string;
4460
+ };
4461
+ Update: {
4462
+ created_at?: string;
4463
+ expected_delivery_date?: string;
4464
+ id?: string;
4465
+ location_id?: string | null;
4466
+ notes?: string | null;
4467
+ order_number?: string;
4468
+ status?: string;
4469
+ supplier_id?: string | null;
4470
+ supplier_name?: string;
4471
+ updated_at?: string;
4472
+ };
4473
+ Relationships: [{
4474
+ foreignKeyName: "purchase_orders_location_id_fkey";
4475
+ columns: ["location_id"];
4476
+ isOneToOne: false;
4477
+ referencedRelation: "locations";
4478
+ referencedColumns: ["id"];
4479
+ }, {
4480
+ foreignKeyName: "purchase_orders_supplier_id_fkey";
4481
+ columns: ["supplier_id"];
4482
+ isOneToOne: false;
4483
+ referencedRelation: "suppliers";
4484
+ referencedColumns: ["id"];
4485
+ }];
4486
+ };
4487
+ supplier_products: {
4488
+ Row: {
4489
+ article_number: string | null;
4490
+ created_at: string;
4491
+ id: string;
4492
+ name: string;
4493
+ notes: string | null;
4494
+ pot_size: string | null;
4495
+ price: number | null;
4496
+ quantity: number | null;
4497
+ supplier_id: string;
4498
+ unit: string;
4499
+ updated_at: string;
4500
+ };
4501
+ Insert: {
4502
+ article_number?: string | null;
4503
+ created_at?: string;
4504
+ id?: string;
4505
+ name: string;
4506
+ notes?: string | null;
4507
+ pot_size?: string | null;
4508
+ price?: number | null;
4509
+ quantity?: number | null;
4510
+ supplier_id: string;
4511
+ unit?: string;
4512
+ updated_at?: string;
4513
+ };
4514
+ Update: {
4515
+ article_number?: string | null;
4516
+ created_at?: string;
4517
+ id?: string;
4518
+ name?: string;
4519
+ notes?: string | null;
4520
+ pot_size?: string | null;
4521
+ price?: number | null;
4522
+ quantity?: number | null;
4523
+ supplier_id?: string;
4524
+ unit?: string;
4525
+ updated_at?: string;
4526
+ };
4527
+ Relationships: [{
4528
+ foreignKeyName: "supplier_products_supplier_id_fkey";
4529
+ columns: ["supplier_id"];
4530
+ isOneToOne: false;
4531
+ referencedRelation: "suppliers";
4532
+ referencedColumns: ["id"];
4533
+ }];
4534
+ };
4535
+ suppliers: {
4536
+ Row: {
4537
+ address: string | null;
4538
+ column_mappings: import("../integrations/supabase/types").Json | null;
4539
+ contact_person: string | null;
4540
+ created_at: string;
4541
+ default_product_type: string;
4542
+ email: string | null;
4543
+ id: string;
4544
+ imported_file_name: string | null;
4545
+ name: string;
4546
+ notes: string | null;
4547
+ phone: string | null;
4548
+ updated_at: string;
4549
+ };
4550
+ Insert: {
4551
+ address?: string | null;
4552
+ column_mappings?: import("../integrations/supabase/types").Json | null;
4553
+ contact_person?: string | null;
4554
+ created_at?: string;
4555
+ default_product_type?: string;
4556
+ email?: string | null;
4557
+ id?: string;
4558
+ imported_file_name?: string | null;
4559
+ name: string;
4560
+ notes?: string | null;
4561
+ phone?: string | null;
4562
+ updated_at?: string;
4563
+ };
4564
+ Update: {
4565
+ address?: string | null;
4566
+ column_mappings?: import("../integrations/supabase/types").Json | null;
4567
+ contact_person?: string | null;
4568
+ created_at?: string;
4569
+ default_product_type?: string;
4570
+ email?: string | null;
4571
+ id?: string;
4572
+ imported_file_name?: string | null;
4573
+ name?: string;
4574
+ notes?: string | null;
4575
+ phone?: string | null;
4576
+ updated_at?: string;
4577
+ };
4578
+ Relationships: [];
4579
+ };
4580
+ trade_item_drafts: {
4581
+ Row: {
4582
+ connection_id: string | null;
4583
+ created_at: string;
4584
+ data: import("../integrations/supabase/types").Json;
4585
+ id: string;
4586
+ updated_at: string;
4587
+ user_id: string;
4588
+ };
4589
+ Insert: {
4590
+ connection_id?: string | null;
4591
+ created_at?: string;
4592
+ data?: import("../integrations/supabase/types").Json;
4593
+ id?: string;
4594
+ updated_at?: string;
4595
+ user_id: string;
4596
+ };
4597
+ Update: {
4598
+ connection_id?: string | null;
4599
+ created_at?: string;
4600
+ data?: import("../integrations/supabase/types").Json;
4601
+ id?: string;
4602
+ updated_at?: string;
4603
+ user_id?: string;
4604
+ };
4605
+ Relationships: [];
4606
+ };
4607
+ user_roles: {
4608
+ Row: {
4609
+ created_at: string;
4610
+ id: string;
4611
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
4612
+ user_id: string;
4613
+ };
4614
+ Insert: {
4615
+ created_at?: string;
4616
+ id?: string;
4617
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
4618
+ user_id: string;
4619
+ };
4620
+ Update: {
4621
+ created_at?: string;
4622
+ id?: string;
4623
+ role?: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
4624
+ user_id?: string;
4625
+ };
4626
+ Relationships: [{
4627
+ foreignKeyName: "user_roles_user_id_fkey";
4628
+ columns: ["user_id"];
4629
+ isOneToOne: false;
4630
+ referencedRelation: "profiles";
4631
+ referencedColumns: ["id"];
4632
+ }];
4633
+ };
4634
+ };
4635
+ Views: { [_ in never]: never; };
4636
+ Functions: {
4637
+ has_role: {
4638
+ Args: {
4639
+ _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
4640
+ _user_id: string;
4641
+ };
4642
+ Returns: boolean;
4643
+ };
4644
+ schedule_floriday_network_sync: {
4645
+ Args: {
4646
+ p_apikey: string;
4647
+ p_url: string;
4648
+ };
4649
+ Returns: number;
4650
+ };
4651
+ schedule_floriday_token_refresh: {
4652
+ Args: {
4653
+ p_apikey: string;
4654
+ p_url: string;
4655
+ };
4656
+ Returns: number;
4657
+ };
4658
+ show_limit: {
4659
+ Args: never;
4660
+ Returns: number;
4661
+ };
4662
+ show_trgm: {
4663
+ Args: {
4664
+ "": string;
4665
+ };
4666
+ Returns: string[];
4667
+ };
4668
+ };
4669
+ Enums: {
4670
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
4671
+ exact_env: "staging" | "live";
4672
+ };
4673
+ CompositeTypes: { [_ in never]: never; };
4674
+ }, {
4675
+ PostgrestVersion: "14.5";
4676
+ }>;
4677
+ userId: string;
4678
+ claims: import("@supabase/auth-js").JwtPayload;
4679
+ }, undefined, undefined, undefined>], undefined, Promise<{
4680
+ results: AccountingSyncResult[];
4681
+ }>>;
4682
+ //# sourceMappingURL=accounting.functions.d.ts.map