@flowselections/dashboard-erp-kwekers 1.0.1

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 (150) 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/DashboardErpLogo.d.ts +6 -0
  5. package/dist-lib/components/DashboardErpLogo.d.ts.map +1 -0
  6. package/dist-lib/components/DashboardErpLogo.js +4 -0
  7. package/dist-lib/components/dashboard/AiSettingsCard.d.ts +2 -0
  8. package/dist-lib/components/dashboard/AiSettingsCard.d.ts.map +1 -0
  9. package/dist-lib/components/dashboard/AiSettingsCard.js +37 -0
  10. package/dist-lib/components/dashboard/AlertHistoryPanel.d.ts +4 -0
  11. package/dist-lib/components/dashboard/AlertHistoryPanel.d.ts.map +1 -0
  12. package/dist-lib/components/dashboard/AlertHistoryPanel.js +18 -0
  13. package/dist-lib/components/dashboard/BlockEditorDialog.d.ts +15 -0
  14. package/dist-lib/components/dashboard/BlockEditorDialog.d.ts.map +1 -0
  15. package/dist-lib/components/dashboard/BlockEditorDialog.js +89 -0
  16. package/dist-lib/components/dashboard/BlockRenderer.d.ts +5 -0
  17. package/dist-lib/components/dashboard/BlockRenderer.d.ts.map +1 -0
  18. package/dist-lib/components/dashboard/BlockRenderer.js +25 -0
  19. package/dist-lib/components/dashboard/DashboardBuilderPage.d.ts +4 -0
  20. package/dist-lib/components/dashboard/DashboardBuilderPage.d.ts.map +1 -0
  21. package/dist-lib/components/dashboard/DashboardBuilderPage.js +49 -0
  22. package/dist-lib/components/dashboard/DashboardErpLayoutPage.d.ts +2 -0
  23. package/dist-lib/components/dashboard/DashboardErpLayoutPage.d.ts.map +1 -0
  24. package/dist-lib/components/dashboard/DashboardErpLayoutPage.js +30 -0
  25. package/dist-lib/components/dashboard/DashboardSummary.d.ts +9 -0
  26. package/dist-lib/components/dashboard/DashboardSummary.d.ts.map +1 -0
  27. package/dist-lib/components/dashboard/DashboardSummary.js +136 -0
  28. package/dist-lib/components/dashboard/DashboardViewPage.d.ts +3 -0
  29. package/dist-lib/components/dashboard/DashboardViewPage.d.ts.map +1 -0
  30. package/dist-lib/components/dashboard/DashboardViewPage.js +37 -0
  31. package/dist-lib/components/dashboard/FilterBar.d.ts +17 -0
  32. package/dist-lib/components/dashboard/FilterBar.d.ts.map +1 -0
  33. package/dist-lib/components/dashboard/FilterBar.js +66 -0
  34. package/dist-lib/components/dashboard/QuickAddDialog.d.ts +15 -0
  35. package/dist-lib/components/dashboard/QuickAddDialog.d.ts.map +1 -0
  36. package/dist-lib/components/dashboard/QuickAddDialog.js +168 -0
  37. package/dist-lib/components/dashboard/SuggestionBanner.d.ts +15 -0
  38. package/dist-lib/components/dashboard/SuggestionBanner.d.ts.map +1 -0
  39. package/dist-lib/components/dashboard/SuggestionBanner.js +13 -0
  40. package/dist-lib/components/dashboard/TileGallery.d.ts +17 -0
  41. package/dist-lib/components/dashboard/TileGallery.d.ts.map +1 -0
  42. package/dist-lib/components/dashboard/TileGallery.js +60 -0
  43. package/dist-lib/components/dashboard/ai/AiChatPanel.d.ts +6 -0
  44. package/dist-lib/components/dashboard/ai/AiChatPanel.d.ts.map +1 -0
  45. package/dist-lib/components/dashboard/ai/AiChatPanel.js +57 -0
  46. package/dist-lib/components/dashboard/ai/BlockGeneratorDialog.d.ts +14 -0
  47. package/dist-lib/components/dashboard/ai/BlockGeneratorDialog.d.ts.map +1 -0
  48. package/dist-lib/components/dashboard/ai/BlockGeneratorDialog.js +61 -0
  49. package/dist-lib/components/dashboard/blocks/AiAnalysisBlock.d.ts +5 -0
  50. package/dist-lib/components/dashboard/blocks/AiAnalysisBlock.d.ts.map +1 -0
  51. package/dist-lib/components/dashboard/blocks/AiAnalysisBlock.js +58 -0
  52. package/dist-lib/components/dashboard/blocks/AlertBlock.d.ts +5 -0
  53. package/dist-lib/components/dashboard/blocks/AlertBlock.d.ts.map +1 -0
  54. package/dist-lib/components/dashboard/blocks/AlertBlock.js +107 -0
  55. package/dist-lib/components/dashboard/blocks/BlockShell.d.ts +10 -0
  56. package/dist-lib/components/dashboard/blocks/BlockShell.d.ts.map +1 -0
  57. package/dist-lib/components/dashboard/blocks/BlockShell.js +39 -0
  58. package/dist-lib/components/dashboard/blocks/ChartBlock.d.ts +5 -0
  59. package/dist-lib/components/dashboard/blocks/ChartBlock.d.ts.map +1 -0
  60. package/dist-lib/components/dashboard/blocks/ChartBlock.js +31 -0
  61. package/dist-lib/components/dashboard/blocks/ForecastBlock.d.ts +5 -0
  62. package/dist-lib/components/dashboard/blocks/ForecastBlock.d.ts.map +1 -0
  63. package/dist-lib/components/dashboard/blocks/ForecastBlock.js +86 -0
  64. package/dist-lib/components/dashboard/blocks/KpiBlock.d.ts +5 -0
  65. package/dist-lib/components/dashboard/blocks/KpiBlock.d.ts.map +1 -0
  66. package/dist-lib/components/dashboard/blocks/KpiBlock.js +17 -0
  67. package/dist-lib/components/dashboard/blocks/TableBlock.d.ts +5 -0
  68. package/dist-lib/components/dashboard/blocks/TableBlock.d.ts.map +1 -0
  69. package/dist-lib/components/dashboard/blocks/TableBlock.js +12 -0
  70. package/dist-lib/components/dashboard/types.d.ts +129 -0
  71. package/dist-lib/components/dashboard/types.d.ts.map +1 -0
  72. package/dist-lib/components/dashboard/types.js +1 -0
  73. package/dist-lib/hooks/useAlertEvents.d.ts +9 -0
  74. package/dist-lib/hooks/useAlertEvents.d.ts.map +1 -0
  75. package/dist-lib/hooks/useAlertEvents.js +32 -0
  76. package/dist-lib/hooks/useBlockData.d.ts +10 -0
  77. package/dist-lib/hooks/useBlockData.d.ts.map +1 -0
  78. package/dist-lib/hooks/useBlockData.js +130 -0
  79. package/dist-lib/hooks/useDashboardBlocks.d.ts +25 -0
  80. package/dist-lib/hooks/useDashboardBlocks.d.ts.map +1 -0
  81. package/dist-lib/hooks/useDashboardBlocks.js +66 -0
  82. package/dist-lib/hooks/useDashboardPages.d.ts +10 -0
  83. package/dist-lib/hooks/useDashboardPages.d.ts.map +1 -0
  84. package/dist-lib/hooks/useDashboardPages.js +56 -0
  85. package/dist-lib/hooks/useSchema.d.ts +13 -0
  86. package/dist-lib/hooks/useSchema.d.ts.map +1 -0
  87. package/dist-lib/hooks/useSchema.js +23 -0
  88. package/dist-lib/hooks/useUserRoles.d.ts +5 -0
  89. package/dist-lib/hooks/useUserRoles.d.ts.map +1 -0
  90. package/dist-lib/hooks/useUserRoles.js +23 -0
  91. package/dist-lib/index.d.ts +17 -0
  92. package/dist-lib/index.d.ts.map +1 -0
  93. package/dist-lib/index.js +47 -0
  94. package/dist-lib/integrations/supabase/auth-attacher.d.ts +2 -0
  95. package/dist-lib/integrations/supabase/auth-attacher.d.ts.map +1 -0
  96. package/dist-lib/integrations/supabase/auth-attacher.js +12 -0
  97. package/dist-lib/integrations/supabase/auth-middleware.d.ts +2555 -0
  98. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -0
  99. package/dist-lib/integrations/supabase/auth-middleware.js +52 -0
  100. package/dist-lib/integrations/supabase/client.d.ts +2551 -0
  101. package/dist-lib/integrations/supabase/client.d.ts.map +1 -0
  102. package/dist-lib/integrations/supabase/client.js +13 -0
  103. package/dist-lib/integrations/supabase/client.server.d.ts +2551 -0
  104. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -0
  105. package/dist-lib/integrations/supabase/client.server.js +30 -0
  106. package/dist-lib/integrations/supabase/types.d.ts +2685 -0
  107. package/dist-lib/integrations/supabase/types.d.ts.map +1 -0
  108. package/dist-lib/integrations/supabase/types.js +8 -0
  109. package/dist-lib/lib/ai-gateway.server.d.ts +2 -0
  110. package/dist-lib/lib/ai-gateway.server.d.ts.map +1 -0
  111. package/dist-lib/lib/ai-gateway.server.js +11 -0
  112. package/dist-lib/lib/ai-insights.functions.d.ts +10271 -0
  113. package/dist-lib/lib/ai-insights.functions.d.ts.map +1 -0
  114. package/dist-lib/lib/ai-insights.functions.js +118 -0
  115. package/dist-lib/lib/aiSettings.d.ts +22 -0
  116. package/dist-lib/lib/aiSettings.d.ts.map +1 -0
  117. package/dist-lib/lib/aiSettings.js +107 -0
  118. package/dist-lib/lib/dashboard-eval.functions.d.ts +5130 -0
  119. package/dist-lib/lib/dashboard-eval.functions.d.ts.map +1 -0
  120. package/dist-lib/lib/dashboard-eval.functions.js +87 -0
  121. package/dist-lib/lib/dashboard.functions.d.ts +2562 -0
  122. package/dist-lib/lib/dashboard.functions.d.ts.map +1 -0
  123. package/dist-lib/lib/dashboard.functions.js +21 -0
  124. package/dist-lib/lib/dashboardTemplates.d.ts +11 -0
  125. package/dist-lib/lib/dashboardTemplates.d.ts.map +1 -0
  126. package/dist-lib/lib/dashboardTemplates.js +44 -0
  127. package/dist-lib/lib/format.d.ts +20 -0
  128. package/dist-lib/lib/format.d.ts.map +1 -0
  129. package/dist-lib/lib/format.js +121 -0
  130. package/dist-lib/lib/query.functions.d.ts +2583 -0
  131. package/dist-lib/lib/query.functions.d.ts.map +1 -0
  132. package/dist-lib/lib/query.functions.js +85 -0
  133. package/dist-lib/lib/quickBlocks.d.ts +28 -0
  134. package/dist-lib/lib/quickBlocks.d.ts.map +1 -0
  135. package/dist-lib/lib/quickBlocks.js +297 -0
  136. package/dist-lib/lib/roles.functions.d.ts +2556 -0
  137. package/dist-lib/lib/roles.functions.d.ts.map +1 -0
  138. package/dist-lib/lib/roles.functions.js +14 -0
  139. package/dist-lib/lib/suggestions.d.ts +8 -0
  140. package/dist-lib/lib/suggestions.d.ts.map +1 -0
  141. package/dist-lib/lib/suggestions.js +41 -0
  142. package/dist-lib/lib/utils.d.ts +3 -0
  143. package/dist-lib/lib/utils.d.ts.map +1 -0
  144. package/dist-lib/lib/utils.js +5 -0
  145. package/dist-lib/lib/validationSchemas.d.ts +15 -0
  146. package/dist-lib/lib/validationSchemas.d.ts.map +1 -0
  147. package/dist-lib/lib/validationSchemas.js +25 -0
  148. package/dist-lib/styles.css +1 -0
  149. package/package.json +95 -0
  150. package/public/flowselections-assets/template-module/README.md +15 -0
@@ -0,0 +1,2562 @@
1
+ export declare const listSchema: import("@tanstack/start-client-core").OptionalFetcher<readonly [import("@tanstack/start-client-core").FunctionMiddlewareAfterServer<{}, unknown, undefined, {
2
+ supabase: import("@supabase/supabase-js").SupabaseClient<import("../integrations/supabase/types").Database, "public", "public", {
3
+ Tables: {
4
+ bugs: {
5
+ Row: {
6
+ attachment_url: string | null;
7
+ created_at: string;
8
+ description: string;
9
+ id: string;
10
+ priority: string;
11
+ status: string;
12
+ title: string;
13
+ updated_at: string;
14
+ user_id: string;
15
+ };
16
+ Insert: {
17
+ attachment_url?: string | null;
18
+ created_at?: string;
19
+ description: string;
20
+ id?: string;
21
+ priority?: string;
22
+ status?: string;
23
+ title: string;
24
+ updated_at?: string;
25
+ user_id: string;
26
+ };
27
+ Update: {
28
+ attachment_url?: string | null;
29
+ created_at?: string;
30
+ description?: string;
31
+ id?: string;
32
+ priority?: string;
33
+ status?: string;
34
+ title?: string;
35
+ updated_at?: string;
36
+ user_id?: string;
37
+ };
38
+ Relationships: [];
39
+ };
40
+ collections: {
41
+ Row: {
42
+ created_at: string;
43
+ created_by: string | null;
44
+ id: string;
45
+ name: string;
46
+ updated_at: string;
47
+ };
48
+ Insert: {
49
+ created_at?: string;
50
+ created_by?: string | null;
51
+ id?: string;
52
+ name: string;
53
+ updated_at?: string;
54
+ };
55
+ Update: {
56
+ created_at?: string;
57
+ created_by?: string | null;
58
+ id?: string;
59
+ name?: string;
60
+ updated_at?: string;
61
+ };
62
+ Relationships: [];
63
+ };
64
+ customer_audit_log: {
65
+ Row: {
66
+ action: string;
67
+ changes: import("../integrations/supabase/types").Json;
68
+ created_at: string;
69
+ customer_id: string;
70
+ id: string;
71
+ user_id: string | null;
72
+ };
73
+ Insert: {
74
+ action: string;
75
+ changes?: import("../integrations/supabase/types").Json;
76
+ created_at?: string;
77
+ customer_id: string;
78
+ id?: string;
79
+ user_id?: string | null;
80
+ };
81
+ Update: {
82
+ action?: string;
83
+ changes?: import("../integrations/supabase/types").Json;
84
+ created_at?: string;
85
+ customer_id?: string;
86
+ id?: string;
87
+ user_id?: string | null;
88
+ };
89
+ Relationships: [{
90
+ foreignKeyName: "customer_audit_log_customer_id_fkey";
91
+ columns: ["customer_id"];
92
+ isOneToOne: false;
93
+ referencedRelation: "customers";
94
+ referencedColumns: ["id"];
95
+ }];
96
+ };
97
+ customer_contacts: {
98
+ Row: {
99
+ created_at: string;
100
+ customer_id: string;
101
+ email: string | null;
102
+ floriday_contact_id: string | null;
103
+ full_name: string;
104
+ id: string;
105
+ is_active: boolean;
106
+ job_title: string | null;
107
+ phone: string | null;
108
+ photo_url: string | null;
109
+ raw: import("../integrations/supabase/types").Json | null;
110
+ updated_at: string;
111
+ };
112
+ Insert: {
113
+ created_at?: string;
114
+ customer_id: string;
115
+ email?: string | null;
116
+ floriday_contact_id?: string | null;
117
+ full_name: string;
118
+ id?: string;
119
+ is_active?: boolean;
120
+ job_title?: string | null;
121
+ phone?: string | null;
122
+ photo_url?: string | null;
123
+ raw?: import("../integrations/supabase/types").Json | null;
124
+ updated_at?: string;
125
+ };
126
+ Update: {
127
+ created_at?: string;
128
+ customer_id?: string;
129
+ email?: string | null;
130
+ floriday_contact_id?: string | null;
131
+ full_name?: string;
132
+ id?: string;
133
+ is_active?: boolean;
134
+ job_title?: string | null;
135
+ phone?: string | null;
136
+ photo_url?: string | null;
137
+ raw?: import("../integrations/supabase/types").Json | null;
138
+ updated_at?: string;
139
+ };
140
+ Relationships: [{
141
+ foreignKeyName: "customer_contacts_customer_id_fkey";
142
+ columns: ["customer_id"];
143
+ isOneToOne: false;
144
+ referencedRelation: "customers";
145
+ referencedColumns: ["id"];
146
+ }];
147
+ };
148
+ customer_delivery_locations: {
149
+ Row: {
150
+ address_line: string | null;
151
+ city: string | null;
152
+ country: string | null;
153
+ created_at: string;
154
+ customer_id: string;
155
+ floriday_location_id: string | null;
156
+ gln: string | null;
157
+ id: string;
158
+ is_primary: boolean;
159
+ name: string | null;
160
+ postal_code: string | null;
161
+ raw: import("../integrations/supabase/types").Json | null;
162
+ updated_at: string;
163
+ };
164
+ Insert: {
165
+ address_line?: string | null;
166
+ city?: string | null;
167
+ country?: string | null;
168
+ created_at?: string;
169
+ customer_id: string;
170
+ floriday_location_id?: string | null;
171
+ gln?: string | null;
172
+ id?: string;
173
+ is_primary?: boolean;
174
+ name?: string | null;
175
+ postal_code?: string | null;
176
+ raw?: import("../integrations/supabase/types").Json | null;
177
+ updated_at?: string;
178
+ };
179
+ Update: {
180
+ address_line?: string | null;
181
+ city?: string | null;
182
+ country?: string | null;
183
+ created_at?: string;
184
+ customer_id?: string;
185
+ floriday_location_id?: string | null;
186
+ gln?: string | null;
187
+ id?: string;
188
+ is_primary?: boolean;
189
+ name?: string | null;
190
+ postal_code?: string | null;
191
+ raw?: import("../integrations/supabase/types").Json | null;
192
+ updated_at?: string;
193
+ };
194
+ Relationships: [{
195
+ foreignKeyName: "customer_delivery_locations_customer_id_fkey";
196
+ columns: ["customer_id"];
197
+ isOneToOne: false;
198
+ referencedRelation: "customers";
199
+ referencedColumns: ["id"];
200
+ }];
201
+ };
202
+ customer_field_options: {
203
+ Row: {
204
+ created_at: string;
205
+ field_setting_id: string;
206
+ id: string;
207
+ label: string;
208
+ sort_order: number;
209
+ };
210
+ Insert: {
211
+ created_at?: string;
212
+ field_setting_id: string;
213
+ id?: string;
214
+ label: string;
215
+ sort_order?: number;
216
+ };
217
+ Update: {
218
+ created_at?: string;
219
+ field_setting_id?: string;
220
+ id?: string;
221
+ label?: string;
222
+ sort_order?: number;
223
+ };
224
+ Relationships: [{
225
+ foreignKeyName: "customer_field_options_field_setting_id_fkey";
226
+ columns: ["field_setting_id"];
227
+ isOneToOne: false;
228
+ referencedRelation: "customer_field_settings";
229
+ referencedColumns: ["id"];
230
+ }];
231
+ };
232
+ customer_field_settings: {
233
+ Row: {
234
+ created_at: string;
235
+ field_key: string;
236
+ field_label: string;
237
+ field_type: string;
238
+ id: string;
239
+ is_custom: boolean;
240
+ sort_order: number;
241
+ updated_at: string;
242
+ };
243
+ Insert: {
244
+ created_at?: string;
245
+ field_key: string;
246
+ field_label: string;
247
+ field_type?: string;
248
+ id?: string;
249
+ is_custom?: boolean;
250
+ sort_order?: number;
251
+ updated_at?: string;
252
+ };
253
+ Update: {
254
+ created_at?: string;
255
+ field_key?: string;
256
+ field_label?: string;
257
+ field_type?: string;
258
+ id?: string;
259
+ is_custom?: boolean;
260
+ sort_order?: number;
261
+ updated_at?: string;
262
+ };
263
+ Relationships: [];
264
+ };
265
+ customer_selected_assortment: {
266
+ Row: {
267
+ article_number: string | null;
268
+ created_at: string;
269
+ customer_id: string;
270
+ floriday_item_id: string | null;
271
+ id: string;
272
+ price: number | null;
273
+ product_group: string | null;
274
+ product_name: string;
275
+ raw: import("../integrations/supabase/types").Json | null;
276
+ unit: string | null;
277
+ updated_at: string;
278
+ };
279
+ Insert: {
280
+ article_number?: string | null;
281
+ created_at?: string;
282
+ customer_id: string;
283
+ floriday_item_id?: string | null;
284
+ id?: string;
285
+ price?: number | null;
286
+ product_group?: string | null;
287
+ product_name: string;
288
+ raw?: import("../integrations/supabase/types").Json | null;
289
+ unit?: string | null;
290
+ updated_at?: string;
291
+ };
292
+ Update: {
293
+ article_number?: string | null;
294
+ created_at?: string;
295
+ customer_id?: string;
296
+ floriday_item_id?: string | null;
297
+ id?: string;
298
+ price?: number | null;
299
+ product_group?: string | null;
300
+ product_name?: string;
301
+ raw?: import("../integrations/supabase/types").Json | null;
302
+ unit?: string | null;
303
+ updated_at?: string;
304
+ };
305
+ Relationships: [{
306
+ foreignKeyName: "customer_selected_assortment_customer_id_fkey";
307
+ columns: ["customer_id"];
308
+ isOneToOne: false;
309
+ referencedRelation: "customers";
310
+ referencedColumns: ["id"];
311
+ }];
312
+ };
313
+ customer_trade_settings: {
314
+ Row: {
315
+ category: string;
316
+ created_at: string;
317
+ customer_id: string;
318
+ id: string;
319
+ is_active: boolean;
320
+ raw: import("../integrations/supabase/types").Json | null;
321
+ setting_key: string;
322
+ setting_label: string;
323
+ updated_at: string;
324
+ };
325
+ Insert: {
326
+ category?: string;
327
+ created_at?: string;
328
+ customer_id: string;
329
+ id?: string;
330
+ is_active?: boolean;
331
+ raw?: import("../integrations/supabase/types").Json | null;
332
+ setting_key: string;
333
+ setting_label: string;
334
+ updated_at?: string;
335
+ };
336
+ Update: {
337
+ category?: string;
338
+ created_at?: string;
339
+ customer_id?: string;
340
+ id?: string;
341
+ is_active?: boolean;
342
+ raw?: import("../integrations/supabase/types").Json | null;
343
+ setting_key?: string;
344
+ setting_label?: string;
345
+ updated_at?: string;
346
+ };
347
+ Relationships: [{
348
+ foreignKeyName: "customer_trade_settings_customer_id_fkey";
349
+ columns: ["customer_id"];
350
+ isOneToOne: false;
351
+ referencedRelation: "customers";
352
+ referencedColumns: ["id"];
353
+ }];
354
+ };
355
+ customers: {
356
+ Row: {
357
+ address: string | null;
358
+ bio: string | null;
359
+ city: string | null;
360
+ commercial_name: string | null;
361
+ company_name: string;
362
+ connection_status: string;
363
+ contact_person: string | null;
364
+ country: string | null;
365
+ created_at: string;
366
+ custom_fields: import("../integrations/supabase/types").Json;
367
+ customer_class: string | null;
368
+ email: string | null;
369
+ external_id: string | null;
370
+ floriday_connection_id: string | null;
371
+ floriday_organization_id: string | null;
372
+ floriday_raw: import("../integrations/supabase/types").Json | null;
373
+ gln: string | null;
374
+ house_number: string | null;
375
+ id: string;
376
+ is_active: boolean;
377
+ last_synced_at: string | null;
378
+ logo_url: string | null;
379
+ markets: string[];
380
+ notes: string | null;
381
+ organization_type: string | null;
382
+ payment_methods: string[];
383
+ phone: string | null;
384
+ postal_code: string | null;
385
+ product_groups: string[];
386
+ segments: string[];
387
+ source: string;
388
+ street: string | null;
389
+ sync_error: string | null;
390
+ sync_status: string;
391
+ trade_forms: string[];
392
+ updated_at: string;
393
+ vat_number: string | null;
394
+ website: string | null;
395
+ };
396
+ Insert: {
397
+ address?: string | null;
398
+ bio?: string | null;
399
+ city?: string | null;
400
+ commercial_name?: string | null;
401
+ company_name: string;
402
+ connection_status?: string;
403
+ contact_person?: string | null;
404
+ country?: string | null;
405
+ created_at?: string;
406
+ custom_fields?: import("../integrations/supabase/types").Json;
407
+ customer_class?: string | null;
408
+ email?: string | null;
409
+ external_id?: string | null;
410
+ floriday_connection_id?: string | null;
411
+ floriday_organization_id?: string | null;
412
+ floriday_raw?: import("../integrations/supabase/types").Json | null;
413
+ gln?: string | null;
414
+ house_number?: string | null;
415
+ id?: string;
416
+ is_active?: boolean;
417
+ last_synced_at?: string | null;
418
+ logo_url?: string | null;
419
+ markets?: string[];
420
+ notes?: string | null;
421
+ organization_type?: string | null;
422
+ payment_methods?: string[];
423
+ phone?: string | null;
424
+ postal_code?: string | null;
425
+ product_groups?: string[];
426
+ segments?: string[];
427
+ source?: string;
428
+ street?: string | null;
429
+ sync_error?: string | null;
430
+ sync_status?: string;
431
+ trade_forms?: string[];
432
+ updated_at?: string;
433
+ vat_number?: string | null;
434
+ website?: string | null;
435
+ };
436
+ Update: {
437
+ address?: string | null;
438
+ bio?: string | null;
439
+ city?: string | null;
440
+ commercial_name?: string | null;
441
+ company_name?: string;
442
+ connection_status?: string;
443
+ contact_person?: string | null;
444
+ country?: string | null;
445
+ created_at?: string;
446
+ custom_fields?: import("../integrations/supabase/types").Json;
447
+ customer_class?: string | null;
448
+ email?: string | null;
449
+ external_id?: string | null;
450
+ floriday_connection_id?: string | null;
451
+ floriday_organization_id?: string | null;
452
+ floriday_raw?: import("../integrations/supabase/types").Json | null;
453
+ gln?: string | null;
454
+ house_number?: string | null;
455
+ id?: string;
456
+ is_active?: boolean;
457
+ last_synced_at?: string | null;
458
+ logo_url?: string | null;
459
+ markets?: string[];
460
+ notes?: string | null;
461
+ organization_type?: string | null;
462
+ payment_methods?: string[];
463
+ phone?: string | null;
464
+ postal_code?: string | null;
465
+ product_groups?: string[];
466
+ segments?: string[];
467
+ source?: string;
468
+ street?: string | null;
469
+ sync_error?: string | null;
470
+ sync_status?: string;
471
+ trade_forms?: string[];
472
+ updated_at?: string;
473
+ vat_number?: string | null;
474
+ website?: string | null;
475
+ };
476
+ Relationships: [];
477
+ };
478
+ dashboard_ai_conversations: {
479
+ Row: {
480
+ created_at: string;
481
+ id: string;
482
+ messages: import("../integrations/supabase/types").Json;
483
+ page_id: string | null;
484
+ title: string | null;
485
+ updated_at: string;
486
+ user_id: string;
487
+ };
488
+ Insert: {
489
+ created_at?: string;
490
+ id?: string;
491
+ messages?: import("../integrations/supabase/types").Json;
492
+ page_id?: string | null;
493
+ title?: string | null;
494
+ updated_at?: string;
495
+ user_id: string;
496
+ };
497
+ Update: {
498
+ created_at?: string;
499
+ id?: string;
500
+ messages?: import("../integrations/supabase/types").Json;
501
+ page_id?: string | null;
502
+ title?: string | null;
503
+ updated_at?: string;
504
+ user_id?: string;
505
+ };
506
+ Relationships: [{
507
+ foreignKeyName: "dashboard_ai_conversations_page_id_fkey";
508
+ columns: ["page_id"];
509
+ isOneToOne: false;
510
+ referencedRelation: "dashboard_pages";
511
+ referencedColumns: ["id"];
512
+ }];
513
+ };
514
+ dashboard_alert_events: {
515
+ Row: {
516
+ acknowledged: boolean;
517
+ block_id: string;
518
+ created_at: string;
519
+ id: string;
520
+ message: string | null;
521
+ page_id: string;
522
+ severity: string;
523
+ threshold: number | null;
524
+ user_id: string;
525
+ value: number | null;
526
+ };
527
+ Insert: {
528
+ acknowledged?: boolean;
529
+ block_id: string;
530
+ created_at?: string;
531
+ id?: string;
532
+ message?: string | null;
533
+ page_id: string;
534
+ severity?: string;
535
+ threshold?: number | null;
536
+ user_id: string;
537
+ value?: number | null;
538
+ };
539
+ Update: {
540
+ acknowledged?: boolean;
541
+ block_id?: string;
542
+ created_at?: string;
543
+ id?: string;
544
+ message?: string | null;
545
+ page_id?: string;
546
+ severity?: string;
547
+ threshold?: number | null;
548
+ user_id?: string;
549
+ value?: number | null;
550
+ };
551
+ Relationships: [{
552
+ foreignKeyName: "dashboard_alert_events_block_id_fkey";
553
+ columns: ["block_id"];
554
+ isOneToOne: false;
555
+ referencedRelation: "dashboard_blocks";
556
+ referencedColumns: ["id"];
557
+ }, {
558
+ foreignKeyName: "dashboard_alert_events_page_id_fkey";
559
+ columns: ["page_id"];
560
+ isOneToOne: false;
561
+ referencedRelation: "dashboard_pages";
562
+ referencedColumns: ["id"];
563
+ }];
564
+ };
565
+ dashboard_block_templates: {
566
+ Row: {
567
+ config: import("../integrations/supabase/types").Json;
568
+ created_at: string;
569
+ description: string | null;
570
+ id: string;
571
+ is_public: boolean;
572
+ name: string;
573
+ type: string;
574
+ updated_at: string;
575
+ user_id: string;
576
+ };
577
+ Insert: {
578
+ config?: import("../integrations/supabase/types").Json;
579
+ created_at?: string;
580
+ description?: string | null;
581
+ id?: string;
582
+ is_public?: boolean;
583
+ name: string;
584
+ type: string;
585
+ updated_at?: string;
586
+ user_id: string;
587
+ };
588
+ Update: {
589
+ config?: import("../integrations/supabase/types").Json;
590
+ created_at?: string;
591
+ description?: string | null;
592
+ id?: string;
593
+ is_public?: boolean;
594
+ name?: string;
595
+ type?: string;
596
+ updated_at?: string;
597
+ user_id?: string;
598
+ };
599
+ Relationships: [];
600
+ };
601
+ dashboard_blocks: {
602
+ Row: {
603
+ config: import("../integrations/supabase/types").Json;
604
+ created_at: string;
605
+ filters: import("../integrations/supabase/types").Json;
606
+ id: string;
607
+ layout: import("../integrations/supabase/types").Json;
608
+ page_id: string;
609
+ permissions: import("../integrations/supabase/types").Json;
610
+ sort_order: number;
611
+ title: string;
612
+ type: string;
613
+ updated_at: string;
614
+ };
615
+ Insert: {
616
+ config?: import("../integrations/supabase/types").Json;
617
+ created_at?: string;
618
+ filters?: import("../integrations/supabase/types").Json;
619
+ id?: string;
620
+ layout?: import("../integrations/supabase/types").Json;
621
+ page_id: string;
622
+ permissions?: import("../integrations/supabase/types").Json;
623
+ sort_order?: number;
624
+ title: string;
625
+ type: string;
626
+ updated_at?: string;
627
+ };
628
+ Update: {
629
+ config?: import("../integrations/supabase/types").Json;
630
+ created_at?: string;
631
+ filters?: import("../integrations/supabase/types").Json;
632
+ id?: string;
633
+ layout?: import("../integrations/supabase/types").Json;
634
+ page_id?: string;
635
+ permissions?: import("../integrations/supabase/types").Json;
636
+ sort_order?: number;
637
+ title?: string;
638
+ type?: string;
639
+ updated_at?: string;
640
+ };
641
+ Relationships: [{
642
+ foreignKeyName: "dashboard_blocks_page_id_fkey";
643
+ columns: ["page_id"];
644
+ isOneToOne: false;
645
+ referencedRelation: "dashboard_pages";
646
+ referencedColumns: ["id"];
647
+ }];
648
+ };
649
+ dashboard_daily_reports: {
650
+ Row: {
651
+ created_at: string;
652
+ highlights: import("../integrations/supabase/types").Json | null;
653
+ id: string;
654
+ page_id: string;
655
+ summary: string;
656
+ user_id: string;
657
+ };
658
+ Insert: {
659
+ created_at?: string;
660
+ highlights?: import("../integrations/supabase/types").Json | null;
661
+ id?: string;
662
+ page_id: string;
663
+ summary: string;
664
+ user_id: string;
665
+ };
666
+ Update: {
667
+ created_at?: string;
668
+ highlights?: import("../integrations/supabase/types").Json | null;
669
+ id?: string;
670
+ page_id?: string;
671
+ summary?: string;
672
+ user_id?: string;
673
+ };
674
+ Relationships: [{
675
+ foreignKeyName: "dashboard_daily_reports_page_id_fkey";
676
+ columns: ["page_id"];
677
+ isOneToOne: false;
678
+ referencedRelation: "dashboard_pages";
679
+ referencedColumns: ["id"];
680
+ }];
681
+ };
682
+ dashboard_pages: {
683
+ Row: {
684
+ created_at: string;
685
+ icon: string | null;
686
+ id: string;
687
+ is_default: boolean;
688
+ name: string;
689
+ shared_with: string[];
690
+ sort_order: number;
691
+ updated_at: string;
692
+ user_id: string;
693
+ };
694
+ Insert: {
695
+ created_at?: string;
696
+ icon?: string | null;
697
+ id?: string;
698
+ is_default?: boolean;
699
+ name: string;
700
+ shared_with?: string[];
701
+ sort_order?: number;
702
+ updated_at?: string;
703
+ user_id: string;
704
+ };
705
+ Update: {
706
+ created_at?: string;
707
+ icon?: string | null;
708
+ id?: string;
709
+ is_default?: boolean;
710
+ name?: string;
711
+ shared_with?: string[];
712
+ sort_order?: number;
713
+ updated_at?: string;
714
+ user_id?: string;
715
+ };
716
+ Relationships: [];
717
+ };
718
+ dashboard_saved_queries: {
719
+ Row: {
720
+ created_at: string;
721
+ description: string | null;
722
+ id: string;
723
+ name: string;
724
+ query_spec: import("../integrations/supabase/types").Json;
725
+ updated_at: string;
726
+ user_id: string;
727
+ };
728
+ Insert: {
729
+ created_at?: string;
730
+ description?: string | null;
731
+ id?: string;
732
+ name: string;
733
+ query_spec: import("../integrations/supabase/types").Json;
734
+ updated_at?: string;
735
+ user_id: string;
736
+ };
737
+ Update: {
738
+ created_at?: string;
739
+ description?: string | null;
740
+ id?: string;
741
+ name?: string;
742
+ query_spec?: import("../integrations/supabase/types").Json;
743
+ updated_at?: string;
744
+ user_id?: string;
745
+ };
746
+ Relationships: [];
747
+ };
748
+ exact_connections: {
749
+ Row: {
750
+ access_token_encrypted: string;
751
+ company_name: string | null;
752
+ connected_at: string;
753
+ connected_by: string | null;
754
+ division_code: number | null;
755
+ environment: import("../integrations/supabase/types").Database["public"]["Enums"]["exact_env"];
756
+ expires_at: string;
757
+ id: string;
758
+ last_error: string | null;
759
+ last_refreshed_at: string | null;
760
+ last_tested_at: string | null;
761
+ refresh_token_encrypted: string;
762
+ status: string;
763
+ updated_at: string;
764
+ };
765
+ Insert: {
766
+ access_token_encrypted: string;
767
+ company_name?: string | null;
768
+ connected_at?: string;
769
+ connected_by?: string | null;
770
+ division_code?: number | null;
771
+ environment: import("../integrations/supabase/types").Database["public"]["Enums"]["exact_env"];
772
+ expires_at: string;
773
+ id?: string;
774
+ last_error?: string | null;
775
+ last_refreshed_at?: string | null;
776
+ last_tested_at?: string | null;
777
+ refresh_token_encrypted: string;
778
+ status?: string;
779
+ updated_at?: string;
780
+ };
781
+ Update: {
782
+ access_token_encrypted?: string;
783
+ company_name?: string | null;
784
+ connected_at?: string;
785
+ connected_by?: string | null;
786
+ division_code?: number | null;
787
+ environment?: import("../integrations/supabase/types").Database["public"]["Enums"]["exact_env"];
788
+ expires_at?: string;
789
+ id?: string;
790
+ last_error?: string | null;
791
+ last_refreshed_at?: string | null;
792
+ last_tested_at?: string | null;
793
+ refresh_token_encrypted?: string;
794
+ status?: string;
795
+ updated_at?: string;
796
+ };
797
+ Relationships: [];
798
+ };
799
+ exact_credentials: {
800
+ Row: {
801
+ client_id: string;
802
+ client_secret_encrypted: string;
803
+ created_at: string;
804
+ environment: import("../integrations/supabase/types").Database["public"]["Enums"]["exact_env"];
805
+ id: string;
806
+ redirect_uri: string;
807
+ updated_at: string;
808
+ };
809
+ Insert: {
810
+ client_id: string;
811
+ client_secret_encrypted: string;
812
+ created_at?: string;
813
+ environment: import("../integrations/supabase/types").Database["public"]["Enums"]["exact_env"];
814
+ id?: string;
815
+ redirect_uri?: string;
816
+ updated_at?: string;
817
+ };
818
+ Update: {
819
+ client_id?: string;
820
+ client_secret_encrypted?: string;
821
+ created_at?: string;
822
+ environment?: import("../integrations/supabase/types").Database["public"]["Enums"]["exact_env"];
823
+ id?: string;
824
+ redirect_uri?: string;
825
+ updated_at?: string;
826
+ };
827
+ Relationships: [];
828
+ };
829
+ exact_customers_cache: {
830
+ Row: {
831
+ connection_id: string;
832
+ data: import("../integrations/supabase/types").Json;
833
+ exact_id: string;
834
+ fetched_at: string;
835
+ };
836
+ Insert: {
837
+ connection_id: string;
838
+ data?: import("../integrations/supabase/types").Json;
839
+ exact_id: string;
840
+ fetched_at?: string;
841
+ };
842
+ Update: {
843
+ connection_id?: string;
844
+ data?: import("../integrations/supabase/types").Json;
845
+ exact_id?: string;
846
+ fetched_at?: string;
847
+ };
848
+ Relationships: [];
849
+ };
850
+ exact_sync_state: {
851
+ Row: {
852
+ connection_id: string;
853
+ last_error: string | null;
854
+ last_modified_cursor: string | null;
855
+ last_synced_at: string | null;
856
+ status: string;
857
+ updated_at: string;
858
+ };
859
+ Insert: {
860
+ connection_id: string;
861
+ last_error?: string | null;
862
+ last_modified_cursor?: string | null;
863
+ last_synced_at?: string | null;
864
+ status?: string;
865
+ updated_at?: string;
866
+ };
867
+ Update: {
868
+ connection_id?: string;
869
+ last_error?: string | null;
870
+ last_modified_cursor?: string | null;
871
+ last_synced_at?: string | null;
872
+ status?: string;
873
+ updated_at?: string;
874
+ };
875
+ Relationships: [];
876
+ };
877
+ floricode_connection_settings: {
878
+ Row: {
879
+ catalog_key: string | null;
880
+ catalog_url: string;
881
+ created_at: string;
882
+ id: number;
883
+ last_meta: import("../integrations/supabase/types").Json | null;
884
+ last_test_at: string | null;
885
+ last_test_error: string | null;
886
+ last_test_ok: boolean | null;
887
+ updated_at: string;
888
+ };
889
+ Insert: {
890
+ catalog_key?: string | null;
891
+ catalog_url?: string;
892
+ created_at?: string;
893
+ id?: number;
894
+ last_meta?: import("../integrations/supabase/types").Json | null;
895
+ last_test_at?: string | null;
896
+ last_test_error?: string | null;
897
+ last_test_ok?: boolean | null;
898
+ updated_at?: string;
899
+ };
900
+ Update: {
901
+ catalog_key?: string | null;
902
+ catalog_url?: string;
903
+ created_at?: string;
904
+ id?: number;
905
+ last_meta?: import("../integrations/supabase/types").Json | null;
906
+ last_test_at?: string | null;
907
+ last_test_error?: string | null;
908
+ last_test_ok?: boolean | null;
909
+ updated_at?: string;
910
+ };
911
+ Relationships: [];
912
+ };
913
+ floricode_records: {
914
+ Row: {
915
+ change_date_time: string | null;
916
+ data: import("../integrations/supabase/types").Json;
917
+ last_synced_at: string;
918
+ record_id: string;
919
+ resource: string;
920
+ };
921
+ Insert: {
922
+ change_date_time?: string | null;
923
+ data?: import("../integrations/supabase/types").Json;
924
+ last_synced_at?: string;
925
+ record_id: string;
926
+ resource: string;
927
+ };
928
+ Update: {
929
+ change_date_time?: string | null;
930
+ data?: import("../integrations/supabase/types").Json;
931
+ last_synced_at?: string;
932
+ record_id?: string;
933
+ resource?: string;
934
+ };
935
+ Relationships: [];
936
+ };
937
+ floricode_sync_state: {
938
+ Row: {
939
+ error_message: string | null;
940
+ last_change_date_time: string | null;
941
+ last_sequence_number: number;
942
+ last_sync_at: string | null;
943
+ resource: string;
944
+ status: string;
945
+ updated_at: string;
946
+ };
947
+ Insert: {
948
+ error_message?: string | null;
949
+ last_change_date_time?: string | null;
950
+ last_sequence_number?: number;
951
+ last_sync_at?: string | null;
952
+ resource: string;
953
+ status?: string;
954
+ updated_at?: string;
955
+ };
956
+ Update: {
957
+ error_message?: string | null;
958
+ last_change_date_time?: string | null;
959
+ last_sequence_number?: number;
960
+ last_sync_at?: string | null;
961
+ resource?: string;
962
+ status?: string;
963
+ updated_at?: string;
964
+ };
965
+ Relationships: [];
966
+ };
967
+ floriday_connections: {
968
+ Row: {
969
+ access_token: string | null;
970
+ api_key: string;
971
+ client_id: string;
972
+ client_secret: string;
973
+ created_at: string;
974
+ customers_endpoint: string | null;
975
+ environment: string;
976
+ gln_code: string | null;
977
+ id: string;
978
+ is_active: boolean;
979
+ label: string;
980
+ organization_name: string | null;
981
+ preferred_warehouse_id: string | null;
982
+ preferred_warehouse_name: string | null;
983
+ token_expires_at: string | null;
984
+ updated_at: string;
985
+ };
986
+ Insert: {
987
+ access_token?: string | null;
988
+ api_key: string;
989
+ client_id: string;
990
+ client_secret: string;
991
+ created_at?: string;
992
+ customers_endpoint?: string | null;
993
+ environment: string;
994
+ gln_code?: string | null;
995
+ id?: string;
996
+ is_active?: boolean;
997
+ label?: string;
998
+ organization_name?: string | null;
999
+ preferred_warehouse_id?: string | null;
1000
+ preferred_warehouse_name?: string | null;
1001
+ token_expires_at?: string | null;
1002
+ updated_at?: string;
1003
+ };
1004
+ Update: {
1005
+ access_token?: string | null;
1006
+ api_key?: string;
1007
+ client_id?: string;
1008
+ client_secret?: string;
1009
+ created_at?: string;
1010
+ customers_endpoint?: string | null;
1011
+ environment?: string;
1012
+ gln_code?: string | null;
1013
+ id?: string;
1014
+ is_active?: boolean;
1015
+ label?: string;
1016
+ organization_name?: string | null;
1017
+ preferred_warehouse_id?: string | null;
1018
+ preferred_warehouse_name?: string | null;
1019
+ token_expires_at?: string | null;
1020
+ updated_at?: string;
1021
+ };
1022
+ Relationships: [];
1023
+ };
1024
+ floriday_customers_cache: {
1025
+ Row: {
1026
+ connection_id: string | null;
1027
+ data: import("../integrations/supabase/types").Json;
1028
+ fetched_at: string;
1029
+ organization_id: string;
1030
+ };
1031
+ Insert: {
1032
+ connection_id?: string | null;
1033
+ data?: import("../integrations/supabase/types").Json;
1034
+ fetched_at?: string;
1035
+ organization_id: string;
1036
+ };
1037
+ Update: {
1038
+ connection_id?: string | null;
1039
+ data?: import("../integrations/supabase/types").Json;
1040
+ fetched_at?: string;
1041
+ organization_id?: string;
1042
+ };
1043
+ Relationships: [{
1044
+ foreignKeyName: "floriday_customers_cache_connection_id_fkey";
1045
+ columns: ["connection_id"];
1046
+ isOneToOne: false;
1047
+ referencedRelation: "floriday_connections";
1048
+ referencedColumns: ["id"];
1049
+ }];
1050
+ };
1051
+ floriday_network_cache: {
1052
+ Row: {
1053
+ city: string | null;
1054
+ connection_id: string;
1055
+ country: string | null;
1056
+ data: import("../integrations/supabase/types").Json;
1057
+ fetched_at: string;
1058
+ gln: string | null;
1059
+ organization_id: string;
1060
+ organization_name: string | null;
1061
+ };
1062
+ Insert: {
1063
+ city?: string | null;
1064
+ connection_id: string;
1065
+ country?: string | null;
1066
+ data?: import("../integrations/supabase/types").Json;
1067
+ fetched_at?: string;
1068
+ gln?: string | null;
1069
+ organization_id: string;
1070
+ organization_name?: string | null;
1071
+ };
1072
+ Update: {
1073
+ city?: string | null;
1074
+ connection_id?: string;
1075
+ country?: string | null;
1076
+ data?: import("../integrations/supabase/types").Json;
1077
+ fetched_at?: string;
1078
+ gln?: string | null;
1079
+ organization_id?: string;
1080
+ organization_name?: string | null;
1081
+ };
1082
+ Relationships: [];
1083
+ };
1084
+ floriday_network_sync_state: {
1085
+ Row: {
1086
+ connection_id: string;
1087
+ last_error: string | null;
1088
+ last_sequence_number: number;
1089
+ last_synced_at: string | null;
1090
+ updated_at: string;
1091
+ };
1092
+ Insert: {
1093
+ connection_id: string;
1094
+ last_error?: string | null;
1095
+ last_sequence_number?: number;
1096
+ last_synced_at?: string | null;
1097
+ updated_at?: string;
1098
+ };
1099
+ Update: {
1100
+ connection_id?: string;
1101
+ last_error?: string | null;
1102
+ last_sequence_number?: number;
1103
+ last_synced_at?: string | null;
1104
+ updated_at?: string;
1105
+ };
1106
+ Relationships: [];
1107
+ };
1108
+ floriday_settings: {
1109
+ Row: {
1110
+ active_environment: string;
1111
+ id: number;
1112
+ updated_at: string;
1113
+ };
1114
+ Insert: {
1115
+ active_environment?: string;
1116
+ id?: number;
1117
+ updated_at?: string;
1118
+ };
1119
+ Update: {
1120
+ active_environment?: string;
1121
+ id?: number;
1122
+ updated_at?: string;
1123
+ };
1124
+ Relationships: [];
1125
+ };
1126
+ inventory_settings: {
1127
+ Row: {
1128
+ created_at: string;
1129
+ hierarchy_levels: string[];
1130
+ id: string;
1131
+ updated_at: string;
1132
+ visible_columns: string[];
1133
+ };
1134
+ Insert: {
1135
+ created_at?: string;
1136
+ hierarchy_levels?: string[];
1137
+ id?: string;
1138
+ updated_at?: string;
1139
+ visible_columns?: string[];
1140
+ };
1141
+ Update: {
1142
+ created_at?: string;
1143
+ hierarchy_levels?: string[];
1144
+ id?: string;
1145
+ updated_at?: string;
1146
+ visible_columns?: string[];
1147
+ };
1148
+ Relationships: [];
1149
+ };
1150
+ locations: {
1151
+ Row: {
1152
+ created_at: string;
1153
+ id: string;
1154
+ name: string;
1155
+ sort_order: number;
1156
+ updated_at: string;
1157
+ };
1158
+ Insert: {
1159
+ created_at?: string;
1160
+ id?: string;
1161
+ name: string;
1162
+ sort_order?: number;
1163
+ updated_at?: string;
1164
+ };
1165
+ Update: {
1166
+ created_at?: string;
1167
+ id?: string;
1168
+ name?: string;
1169
+ sort_order?: number;
1170
+ updated_at?: string;
1171
+ };
1172
+ Relationships: [];
1173
+ };
1174
+ mailbox_messages: {
1175
+ Row: {
1176
+ body_html: string | null;
1177
+ body_text: string | null;
1178
+ created_at: string;
1179
+ error_message: string | null;
1180
+ from_email: string | null;
1181
+ from_name: string | null;
1182
+ id: string;
1183
+ message_id: string | null;
1184
+ raw_size: number | null;
1185
+ received_at: string | null;
1186
+ status: string;
1187
+ subject: string | null;
1188
+ uid: number;
1189
+ updated_at: string;
1190
+ };
1191
+ Insert: {
1192
+ body_html?: string | null;
1193
+ body_text?: string | null;
1194
+ created_at?: string;
1195
+ error_message?: string | null;
1196
+ from_email?: string | null;
1197
+ from_name?: string | null;
1198
+ id?: string;
1199
+ message_id?: string | null;
1200
+ raw_size?: number | null;
1201
+ received_at?: string | null;
1202
+ status?: string;
1203
+ subject?: string | null;
1204
+ uid: number;
1205
+ updated_at?: string;
1206
+ };
1207
+ Update: {
1208
+ body_html?: string | null;
1209
+ body_text?: string | null;
1210
+ created_at?: string;
1211
+ error_message?: string | null;
1212
+ from_email?: string | null;
1213
+ from_name?: string | null;
1214
+ id?: string;
1215
+ message_id?: string | null;
1216
+ raw_size?: number | null;
1217
+ received_at?: string | null;
1218
+ status?: string;
1219
+ subject?: string | null;
1220
+ uid?: number;
1221
+ updated_at?: string;
1222
+ };
1223
+ Relationships: [];
1224
+ };
1225
+ mailbox_order_proposals: {
1226
+ Row: {
1227
+ confidence: number | null;
1228
+ created_at: string;
1229
+ created_order_id: string | null;
1230
+ delivery_date: string | null;
1231
+ id: string;
1232
+ matched_customer_id: string | null;
1233
+ message_id: string;
1234
+ notes: string | null;
1235
+ parsed_payload: import("../integrations/supabase/types").Json | null;
1236
+ reviewed_at: string | null;
1237
+ reviewed_by: string | null;
1238
+ status: string;
1239
+ updated_at: string;
1240
+ };
1241
+ Insert: {
1242
+ confidence?: number | null;
1243
+ created_at?: string;
1244
+ created_order_id?: string | null;
1245
+ delivery_date?: string | null;
1246
+ id?: string;
1247
+ matched_customer_id?: string | null;
1248
+ message_id: string;
1249
+ notes?: string | null;
1250
+ parsed_payload?: import("../integrations/supabase/types").Json | null;
1251
+ reviewed_at?: string | null;
1252
+ reviewed_by?: string | null;
1253
+ status?: string;
1254
+ updated_at?: string;
1255
+ };
1256
+ Update: {
1257
+ confidence?: number | null;
1258
+ created_at?: string;
1259
+ created_order_id?: string | null;
1260
+ delivery_date?: string | null;
1261
+ id?: string;
1262
+ matched_customer_id?: string | null;
1263
+ message_id?: string;
1264
+ notes?: string | null;
1265
+ parsed_payload?: import("../integrations/supabase/types").Json | null;
1266
+ reviewed_at?: string | null;
1267
+ reviewed_by?: string | null;
1268
+ status?: string;
1269
+ updated_at?: string;
1270
+ };
1271
+ Relationships: [{
1272
+ foreignKeyName: "mailbox_order_proposals_created_order_id_fkey";
1273
+ columns: ["created_order_id"];
1274
+ isOneToOne: false;
1275
+ referencedRelation: "orders";
1276
+ referencedColumns: ["id"];
1277
+ }, {
1278
+ foreignKeyName: "mailbox_order_proposals_matched_customer_id_fkey";
1279
+ columns: ["matched_customer_id"];
1280
+ isOneToOne: false;
1281
+ referencedRelation: "customers";
1282
+ referencedColumns: ["id"];
1283
+ }, {
1284
+ foreignKeyName: "mailbox_order_proposals_message_id_fkey";
1285
+ columns: ["message_id"];
1286
+ isOneToOne: false;
1287
+ referencedRelation: "mailbox_messages";
1288
+ referencedColumns: ["id"];
1289
+ }];
1290
+ };
1291
+ mailbox_order_template_fields: {
1292
+ Row: {
1293
+ ai_enabled: boolean;
1294
+ ai_hint: string | null;
1295
+ created_at: string;
1296
+ default_value: import("../integrations/supabase/types").Json | null;
1297
+ field_type: string;
1298
+ id: string;
1299
+ key: string;
1300
+ label: string;
1301
+ options: import("../integrations/supabase/types").Json | null;
1302
+ required: boolean;
1303
+ sort_order: number;
1304
+ source: string;
1305
+ source_table: string | null;
1306
+ updated_at: string;
1307
+ visible: boolean;
1308
+ };
1309
+ Insert: {
1310
+ ai_enabled?: boolean;
1311
+ ai_hint?: string | null;
1312
+ created_at?: string;
1313
+ default_value?: import("../integrations/supabase/types").Json | null;
1314
+ field_type: string;
1315
+ id?: string;
1316
+ key: string;
1317
+ label: string;
1318
+ options?: import("../integrations/supabase/types").Json | null;
1319
+ required?: boolean;
1320
+ sort_order?: number;
1321
+ source?: string;
1322
+ source_table?: string | null;
1323
+ updated_at?: string;
1324
+ visible?: boolean;
1325
+ };
1326
+ Update: {
1327
+ ai_enabled?: boolean;
1328
+ ai_hint?: string | null;
1329
+ created_at?: string;
1330
+ default_value?: import("../integrations/supabase/types").Json | null;
1331
+ field_type?: string;
1332
+ id?: string;
1333
+ key?: string;
1334
+ label?: string;
1335
+ options?: import("../integrations/supabase/types").Json | null;
1336
+ required?: boolean;
1337
+ sort_order?: number;
1338
+ source?: string;
1339
+ source_table?: string | null;
1340
+ updated_at?: string;
1341
+ visible?: boolean;
1342
+ };
1343
+ Relationships: [];
1344
+ };
1345
+ mailbox_proposal_field_values: {
1346
+ Row: {
1347
+ ai_confidence: number | null;
1348
+ ai_filled: boolean;
1349
+ created_at: string;
1350
+ field_key: string;
1351
+ id: string;
1352
+ needs_review: boolean;
1353
+ proposal_id: string;
1354
+ updated_at: string;
1355
+ value: import("../integrations/supabase/types").Json | null;
1356
+ };
1357
+ Insert: {
1358
+ ai_confidence?: number | null;
1359
+ ai_filled?: boolean;
1360
+ created_at?: string;
1361
+ field_key: string;
1362
+ id?: string;
1363
+ needs_review?: boolean;
1364
+ proposal_id: string;
1365
+ updated_at?: string;
1366
+ value?: import("../integrations/supabase/types").Json | null;
1367
+ };
1368
+ Update: {
1369
+ ai_confidence?: number | null;
1370
+ ai_filled?: boolean;
1371
+ created_at?: string;
1372
+ field_key?: string;
1373
+ id?: string;
1374
+ needs_review?: boolean;
1375
+ proposal_id?: string;
1376
+ updated_at?: string;
1377
+ value?: import("../integrations/supabase/types").Json | null;
1378
+ };
1379
+ Relationships: [{
1380
+ foreignKeyName: "mailbox_proposal_field_values_proposal_id_fkey";
1381
+ columns: ["proposal_id"];
1382
+ isOneToOne: false;
1383
+ referencedRelation: "mailbox_order_proposals";
1384
+ referencedColumns: ["id"];
1385
+ }];
1386
+ };
1387
+ mailbox_proposal_lines: {
1388
+ Row: {
1389
+ created_at: string;
1390
+ id: string;
1391
+ match_confidence: number | null;
1392
+ product_id: string | null;
1393
+ proposal_id: string;
1394
+ quantity: number | null;
1395
+ raw_product_text: string | null;
1396
+ sort_order: number;
1397
+ unit: string | null;
1398
+ updated_at: string;
1399
+ };
1400
+ Insert: {
1401
+ created_at?: string;
1402
+ id?: string;
1403
+ match_confidence?: number | null;
1404
+ product_id?: string | null;
1405
+ proposal_id: string;
1406
+ quantity?: number | null;
1407
+ raw_product_text?: string | null;
1408
+ sort_order?: number;
1409
+ unit?: string | null;
1410
+ updated_at?: string;
1411
+ };
1412
+ Update: {
1413
+ created_at?: string;
1414
+ id?: string;
1415
+ match_confidence?: number | null;
1416
+ product_id?: string | null;
1417
+ proposal_id?: string;
1418
+ quantity?: number | null;
1419
+ raw_product_text?: string | null;
1420
+ sort_order?: number;
1421
+ unit?: string | null;
1422
+ updated_at?: string;
1423
+ };
1424
+ Relationships: [{
1425
+ foreignKeyName: "mailbox_proposal_lines_product_id_fkey";
1426
+ columns: ["product_id"];
1427
+ isOneToOne: false;
1428
+ referencedRelation: "products";
1429
+ referencedColumns: ["id"];
1430
+ }, {
1431
+ foreignKeyName: "mailbox_proposal_lines_proposal_id_fkey";
1432
+ columns: ["proposal_id"];
1433
+ isOneToOne: false;
1434
+ referencedRelation: "mailbox_order_proposals";
1435
+ referencedColumns: ["id"];
1436
+ }];
1437
+ };
1438
+ mailbox_settings: {
1439
+ Row: {
1440
+ created_at: string;
1441
+ folder: string;
1442
+ id: string;
1443
+ imap_host: string;
1444
+ imap_port: number;
1445
+ imap_use_tls: boolean;
1446
+ imap_username: string;
1447
+ last_error: string | null;
1448
+ last_polled_at: string | null;
1449
+ last_uid_seen: number;
1450
+ polling_enabled: boolean;
1451
+ singleton: boolean;
1452
+ updated_at: string;
1453
+ };
1454
+ Insert: {
1455
+ created_at?: string;
1456
+ folder?: string;
1457
+ id?: string;
1458
+ imap_host?: string;
1459
+ imap_port?: number;
1460
+ imap_use_tls?: boolean;
1461
+ imap_username?: string;
1462
+ last_error?: string | null;
1463
+ last_polled_at?: string | null;
1464
+ last_uid_seen?: number;
1465
+ polling_enabled?: boolean;
1466
+ singleton?: boolean;
1467
+ updated_at?: string;
1468
+ };
1469
+ Update: {
1470
+ created_at?: string;
1471
+ folder?: string;
1472
+ id?: string;
1473
+ imap_host?: string;
1474
+ imap_port?: number;
1475
+ imap_use_tls?: boolean;
1476
+ imap_username?: string;
1477
+ last_error?: string | null;
1478
+ last_polled_at?: string | null;
1479
+ last_uid_seen?: number;
1480
+ polling_enabled?: boolean;
1481
+ singleton?: boolean;
1482
+ updated_at?: string;
1483
+ };
1484
+ Relationships: [];
1485
+ };
1486
+ notifications: {
1487
+ Row: {
1488
+ created_at: string;
1489
+ id: string;
1490
+ message: string | null;
1491
+ read: boolean;
1492
+ title: string;
1493
+ updated_at: string;
1494
+ user_id: string;
1495
+ };
1496
+ Insert: {
1497
+ created_at?: string;
1498
+ id?: string;
1499
+ message?: string | null;
1500
+ read?: boolean;
1501
+ title: string;
1502
+ updated_at?: string;
1503
+ user_id: string;
1504
+ };
1505
+ Update: {
1506
+ created_at?: string;
1507
+ id?: string;
1508
+ message?: string | null;
1509
+ read?: boolean;
1510
+ title?: string;
1511
+ updated_at?: string;
1512
+ user_id?: string;
1513
+ };
1514
+ Relationships: [];
1515
+ };
1516
+ offer_campaign_product_tiers: {
1517
+ Row: {
1518
+ campaign_product_id: string;
1519
+ created_at: string;
1520
+ id: string;
1521
+ min_crates: number;
1522
+ price_per_crate: number;
1523
+ sort_order: number;
1524
+ };
1525
+ Insert: {
1526
+ campaign_product_id: string;
1527
+ created_at?: string;
1528
+ id?: string;
1529
+ min_crates?: number;
1530
+ price_per_crate?: number;
1531
+ sort_order?: number;
1532
+ };
1533
+ Update: {
1534
+ campaign_product_id?: string;
1535
+ created_at?: string;
1536
+ id?: string;
1537
+ min_crates?: number;
1538
+ price_per_crate?: number;
1539
+ sort_order?: number;
1540
+ };
1541
+ Relationships: [{
1542
+ foreignKeyName: "offer_campaign_product_tiers_campaign_product_id_fkey";
1543
+ columns: ["campaign_product_id"];
1544
+ isOneToOne: false;
1545
+ referencedRelation: "offer_campaign_products";
1546
+ referencedColumns: ["id"];
1547
+ }];
1548
+ };
1549
+ offer_campaign_products: {
1550
+ Row: {
1551
+ available_stock: number;
1552
+ barcode: string | null;
1553
+ belading: string | null;
1554
+ campaign_id: string;
1555
+ crate_price: number | null;
1556
+ created_at: string;
1557
+ description: string | null;
1558
+ discount_price: number;
1559
+ id: string;
1560
+ image_url: string | null;
1561
+ normal_price: number;
1562
+ plants_per_crate: number | null;
1563
+ product_id: string | null;
1564
+ product_name: string;
1565
+ sort_order: number;
1566
+ sticker_available: boolean;
1567
+ sticker_cost: number | null;
1568
+ };
1569
+ Insert: {
1570
+ available_stock?: number;
1571
+ barcode?: string | null;
1572
+ belading?: string | null;
1573
+ campaign_id: string;
1574
+ crate_price?: number | null;
1575
+ created_at?: string;
1576
+ description?: string | null;
1577
+ discount_price?: number;
1578
+ id?: string;
1579
+ image_url?: string | null;
1580
+ normal_price?: number;
1581
+ plants_per_crate?: number | null;
1582
+ product_id?: string | null;
1583
+ product_name: string;
1584
+ sort_order?: number;
1585
+ sticker_available?: boolean;
1586
+ sticker_cost?: number | null;
1587
+ };
1588
+ Update: {
1589
+ available_stock?: number;
1590
+ barcode?: string | null;
1591
+ belading?: string | null;
1592
+ campaign_id?: string;
1593
+ crate_price?: number | null;
1594
+ created_at?: string;
1595
+ description?: string | null;
1596
+ discount_price?: number;
1597
+ id?: string;
1598
+ image_url?: string | null;
1599
+ normal_price?: number;
1600
+ plants_per_crate?: number | null;
1601
+ product_id?: string | null;
1602
+ product_name?: string;
1603
+ sort_order?: number;
1604
+ sticker_available?: boolean;
1605
+ sticker_cost?: number | null;
1606
+ };
1607
+ Relationships: [{
1608
+ foreignKeyName: "offer_campaign_products_campaign_id_fkey";
1609
+ columns: ["campaign_id"];
1610
+ isOneToOne: false;
1611
+ referencedRelation: "offer_campaigns";
1612
+ referencedColumns: ["id"];
1613
+ }, {
1614
+ foreignKeyName: "offer_campaign_products_product_id_fkey";
1615
+ columns: ["product_id"];
1616
+ isOneToOne: false;
1617
+ referencedRelation: "products";
1618
+ referencedColumns: ["id"];
1619
+ }];
1620
+ };
1621
+ offer_campaigns: {
1622
+ Row: {
1623
+ created_at: string;
1624
+ created_by: string | null;
1625
+ from_email: string;
1626
+ from_name: string;
1627
+ id: string;
1628
+ intro_message: string | null;
1629
+ name: string;
1630
+ scheduled_at: string | null;
1631
+ sent_at: string | null;
1632
+ status: string;
1633
+ subject: string;
1634
+ updated_at: string;
1635
+ };
1636
+ Insert: {
1637
+ created_at?: string;
1638
+ created_by?: string | null;
1639
+ from_email: string;
1640
+ from_name: string;
1641
+ id?: string;
1642
+ intro_message?: string | null;
1643
+ name: string;
1644
+ scheduled_at?: string | null;
1645
+ sent_at?: string | null;
1646
+ status?: string;
1647
+ subject: string;
1648
+ updated_at?: string;
1649
+ };
1650
+ Update: {
1651
+ created_at?: string;
1652
+ created_by?: string | null;
1653
+ from_email?: string;
1654
+ from_name?: string;
1655
+ id?: string;
1656
+ intro_message?: string | null;
1657
+ name?: string;
1658
+ scheduled_at?: string | null;
1659
+ sent_at?: string | null;
1660
+ status?: string;
1661
+ subject?: string;
1662
+ updated_at?: string;
1663
+ };
1664
+ Relationships: [];
1665
+ };
1666
+ offer_events: {
1667
+ Row: {
1668
+ campaign_id: string;
1669
+ created_at: string;
1670
+ event_type: string;
1671
+ id: string;
1672
+ metadata: import("../integrations/supabase/types").Json;
1673
+ recipient_id: string;
1674
+ };
1675
+ Insert: {
1676
+ campaign_id: string;
1677
+ created_at?: string;
1678
+ event_type: string;
1679
+ id?: string;
1680
+ metadata?: import("../integrations/supabase/types").Json;
1681
+ recipient_id: string;
1682
+ };
1683
+ Update: {
1684
+ campaign_id?: string;
1685
+ created_at?: string;
1686
+ event_type?: string;
1687
+ id?: string;
1688
+ metadata?: import("../integrations/supabase/types").Json;
1689
+ recipient_id?: string;
1690
+ };
1691
+ Relationships: [{
1692
+ foreignKeyName: "offer_events_campaign_id_fkey";
1693
+ columns: ["campaign_id"];
1694
+ isOneToOne: false;
1695
+ referencedRelation: "offer_campaigns";
1696
+ referencedColumns: ["id"];
1697
+ }, {
1698
+ foreignKeyName: "offer_events_recipient_id_fkey";
1699
+ columns: ["recipient_id"];
1700
+ isOneToOne: false;
1701
+ referencedRelation: "offer_recipients";
1702
+ referencedColumns: ["id"];
1703
+ }];
1704
+ };
1705
+ offer_orders: {
1706
+ Row: {
1707
+ campaign_id: string;
1708
+ created_at: string;
1709
+ customer_email: string;
1710
+ customer_id: string | null;
1711
+ customer_name: string;
1712
+ customer_phone: string | null;
1713
+ id: string;
1714
+ items: import("../integrations/supabase/types").Json;
1715
+ notes: string | null;
1716
+ recipient_id: string;
1717
+ total_amount: number;
1718
+ };
1719
+ Insert: {
1720
+ campaign_id: string;
1721
+ created_at?: string;
1722
+ customer_email: string;
1723
+ customer_id?: string | null;
1724
+ customer_name: string;
1725
+ customer_phone?: string | null;
1726
+ id?: string;
1727
+ items?: import("../integrations/supabase/types").Json;
1728
+ notes?: string | null;
1729
+ recipient_id: string;
1730
+ total_amount?: number;
1731
+ };
1732
+ Update: {
1733
+ campaign_id?: string;
1734
+ created_at?: string;
1735
+ customer_email?: string;
1736
+ customer_id?: string | null;
1737
+ customer_name?: string;
1738
+ customer_phone?: string | null;
1739
+ id?: string;
1740
+ items?: import("../integrations/supabase/types").Json;
1741
+ notes?: string | null;
1742
+ recipient_id?: string;
1743
+ total_amount?: number;
1744
+ };
1745
+ Relationships: [{
1746
+ foreignKeyName: "offer_orders_campaign_id_fkey";
1747
+ columns: ["campaign_id"];
1748
+ isOneToOne: false;
1749
+ referencedRelation: "offer_campaigns";
1750
+ referencedColumns: ["id"];
1751
+ }, {
1752
+ foreignKeyName: "offer_orders_customer_id_fkey";
1753
+ columns: ["customer_id"];
1754
+ isOneToOne: false;
1755
+ referencedRelation: "customers";
1756
+ referencedColumns: ["id"];
1757
+ }, {
1758
+ foreignKeyName: "offer_orders_recipient_id_fkey";
1759
+ columns: ["recipient_id"];
1760
+ isOneToOne: false;
1761
+ referencedRelation: "offer_recipients";
1762
+ referencedColumns: ["id"];
1763
+ }];
1764
+ };
1765
+ offer_recipients: {
1766
+ Row: {
1767
+ campaign_id: string;
1768
+ clicked_at: string | null;
1769
+ contact_id: string | null;
1770
+ created_at: string;
1771
+ customer_id: string | null;
1772
+ id: string;
1773
+ link_code: string;
1774
+ opened_at: string | null;
1775
+ ordered_at: string | null;
1776
+ recipient_email: string;
1777
+ recipient_name: string;
1778
+ sent_at: string | null;
1779
+ };
1780
+ Insert: {
1781
+ campaign_id: string;
1782
+ clicked_at?: string | null;
1783
+ contact_id?: string | null;
1784
+ created_at?: string;
1785
+ customer_id?: string | null;
1786
+ id?: string;
1787
+ link_code?: string;
1788
+ opened_at?: string | null;
1789
+ ordered_at?: string | null;
1790
+ recipient_email: string;
1791
+ recipient_name: string;
1792
+ sent_at?: string | null;
1793
+ };
1794
+ Update: {
1795
+ campaign_id?: string;
1796
+ clicked_at?: string | null;
1797
+ contact_id?: string | null;
1798
+ created_at?: string;
1799
+ customer_id?: string | null;
1800
+ id?: string;
1801
+ link_code?: string;
1802
+ opened_at?: string | null;
1803
+ ordered_at?: string | null;
1804
+ recipient_email?: string;
1805
+ recipient_name?: string;
1806
+ sent_at?: string | null;
1807
+ };
1808
+ Relationships: [{
1809
+ foreignKeyName: "offer_recipients_campaign_id_fkey";
1810
+ columns: ["campaign_id"];
1811
+ isOneToOne: false;
1812
+ referencedRelation: "offer_campaigns";
1813
+ referencedColumns: ["id"];
1814
+ }, {
1815
+ foreignKeyName: "offer_recipients_contact_id_fkey";
1816
+ columns: ["contact_id"];
1817
+ isOneToOne: false;
1818
+ referencedRelation: "customer_contacts";
1819
+ referencedColumns: ["id"];
1820
+ }, {
1821
+ foreignKeyName: "offer_recipients_customer_id_fkey";
1822
+ columns: ["customer_id"];
1823
+ isOneToOne: false;
1824
+ referencedRelation: "customers";
1825
+ referencedColumns: ["id"];
1826
+ }];
1827
+ };
1828
+ offer_settings: {
1829
+ Row: {
1830
+ button_color: string;
1831
+ created_at: string;
1832
+ default_countries: string[];
1833
+ default_customer_classes: string[];
1834
+ default_intro: string;
1835
+ default_sticker_cost: number;
1836
+ default_subject: string;
1837
+ discount_display: string;
1838
+ excluded_contact_ids: string[];
1839
+ excluded_customer_ids: string[];
1840
+ from_email: string;
1841
+ from_name: string;
1842
+ id: string;
1843
+ logo_url: string | null;
1844
+ primary_color: string;
1845
+ show_customer_classes: boolean;
1846
+ singleton: boolean;
1847
+ tracking_enabled: boolean;
1848
+ updated_at: string;
1849
+ };
1850
+ Insert: {
1851
+ button_color?: string;
1852
+ created_at?: string;
1853
+ default_countries?: string[];
1854
+ default_customer_classes?: string[];
1855
+ default_intro?: string;
1856
+ default_sticker_cost?: number;
1857
+ default_subject?: string;
1858
+ discount_display?: string;
1859
+ excluded_contact_ids?: string[];
1860
+ excluded_customer_ids?: string[];
1861
+ from_email?: string;
1862
+ from_name?: string;
1863
+ id?: string;
1864
+ logo_url?: string | null;
1865
+ primary_color?: string;
1866
+ show_customer_classes?: boolean;
1867
+ singleton?: boolean;
1868
+ tracking_enabled?: boolean;
1869
+ updated_at?: string;
1870
+ };
1871
+ Update: {
1872
+ button_color?: string;
1873
+ created_at?: string;
1874
+ default_countries?: string[];
1875
+ default_customer_classes?: string[];
1876
+ default_intro?: string;
1877
+ default_sticker_cost?: number;
1878
+ default_subject?: string;
1879
+ discount_display?: string;
1880
+ excluded_contact_ids?: string[];
1881
+ excluded_customer_ids?: string[];
1882
+ from_email?: string;
1883
+ from_name?: string;
1884
+ id?: string;
1885
+ logo_url?: string | null;
1886
+ primary_color?: string;
1887
+ show_customer_classes?: boolean;
1888
+ singleton?: boolean;
1889
+ tracking_enabled?: boolean;
1890
+ updated_at?: string;
1891
+ };
1892
+ Relationships: [];
1893
+ };
1894
+ order_field_options: {
1895
+ Row: {
1896
+ created_at: string;
1897
+ field_setting_id: string;
1898
+ id: string;
1899
+ label: string;
1900
+ sort_order: number;
1901
+ };
1902
+ Insert: {
1903
+ created_at?: string;
1904
+ field_setting_id: string;
1905
+ id?: string;
1906
+ label: string;
1907
+ sort_order?: number;
1908
+ };
1909
+ Update: {
1910
+ created_at?: string;
1911
+ field_setting_id?: string;
1912
+ id?: string;
1913
+ label?: string;
1914
+ sort_order?: number;
1915
+ };
1916
+ Relationships: [{
1917
+ foreignKeyName: "order_field_options_field_setting_id_fkey";
1918
+ columns: ["field_setting_id"];
1919
+ isOneToOne: false;
1920
+ referencedRelation: "order_field_settings";
1921
+ referencedColumns: ["id"];
1922
+ }];
1923
+ };
1924
+ order_field_settings: {
1925
+ Row: {
1926
+ active: boolean;
1927
+ created_at: string;
1928
+ field_key: string;
1929
+ field_label: string;
1930
+ field_type: string;
1931
+ id: string;
1932
+ is_custom: boolean;
1933
+ sort_order: number;
1934
+ updated_at: string;
1935
+ };
1936
+ Insert: {
1937
+ active?: boolean;
1938
+ created_at?: string;
1939
+ field_key: string;
1940
+ field_label: string;
1941
+ field_type?: string;
1942
+ id?: string;
1943
+ is_custom?: boolean;
1944
+ sort_order?: number;
1945
+ updated_at?: string;
1946
+ };
1947
+ Update: {
1948
+ active?: boolean;
1949
+ created_at?: string;
1950
+ field_key?: string;
1951
+ field_label?: string;
1952
+ field_type?: string;
1953
+ id?: string;
1954
+ is_custom?: boolean;
1955
+ sort_order?: number;
1956
+ updated_at?: string;
1957
+ };
1958
+ Relationships: [];
1959
+ };
1960
+ order_items: {
1961
+ Row: {
1962
+ created_at: string;
1963
+ id: string;
1964
+ order_id: string;
1965
+ product_id: string | null;
1966
+ product_name: string;
1967
+ quantity: number;
1968
+ unit: string;
1969
+ unit_price: number | null;
1970
+ };
1971
+ Insert: {
1972
+ created_at?: string;
1973
+ id?: string;
1974
+ order_id: string;
1975
+ product_id?: string | null;
1976
+ product_name: string;
1977
+ quantity?: number;
1978
+ unit?: string;
1979
+ unit_price?: number | null;
1980
+ };
1981
+ Update: {
1982
+ created_at?: string;
1983
+ id?: string;
1984
+ order_id?: string;
1985
+ product_id?: string | null;
1986
+ product_name?: string;
1987
+ quantity?: number;
1988
+ unit?: string;
1989
+ unit_price?: number | null;
1990
+ };
1991
+ Relationships: [{
1992
+ foreignKeyName: "order_items_order_id_fkey";
1993
+ columns: ["order_id"];
1994
+ isOneToOne: false;
1995
+ referencedRelation: "orders";
1996
+ referencedColumns: ["id"];
1997
+ }, {
1998
+ foreignKeyName: "order_items_product_id_fkey";
1999
+ columns: ["product_id"];
2000
+ isOneToOne: false;
2001
+ referencedRelation: "products";
2002
+ referencedColumns: ["id"];
2003
+ }];
2004
+ };
2005
+ orders: {
2006
+ Row: {
2007
+ created_at: string;
2008
+ custom_fields: import("../integrations/supabase/types").Json;
2009
+ customer_id: string | null;
2010
+ customer_name: string;
2011
+ deleted_at: string | null;
2012
+ delivery_date: string;
2013
+ id: string;
2014
+ notes: string | null;
2015
+ order_date: string;
2016
+ order_number: string;
2017
+ status: string;
2018
+ total: string;
2019
+ updated_at: string;
2020
+ };
2021
+ Insert: {
2022
+ created_at?: string;
2023
+ custom_fields?: import("../integrations/supabase/types").Json;
2024
+ customer_id?: string | null;
2025
+ customer_name?: string;
2026
+ deleted_at?: string | null;
2027
+ delivery_date: string;
2028
+ id?: string;
2029
+ notes?: string | null;
2030
+ order_date?: string;
2031
+ order_number: string;
2032
+ status?: string;
2033
+ total?: string;
2034
+ updated_at?: string;
2035
+ };
2036
+ Update: {
2037
+ created_at?: string;
2038
+ custom_fields?: import("../integrations/supabase/types").Json;
2039
+ customer_id?: string | null;
2040
+ customer_name?: string;
2041
+ deleted_at?: string | null;
2042
+ delivery_date?: string;
2043
+ id?: string;
2044
+ notes?: string | null;
2045
+ order_date?: string;
2046
+ order_number?: string;
2047
+ status?: string;
2048
+ total?: string;
2049
+ updated_at?: string;
2050
+ };
2051
+ Relationships: [{
2052
+ foreignKeyName: "orders_customer_id_fkey";
2053
+ columns: ["customer_id"];
2054
+ isOneToOne: false;
2055
+ referencedRelation: "customers";
2056
+ referencedColumns: ["id"];
2057
+ }];
2058
+ };
2059
+ product_categories: {
2060
+ Row: {
2061
+ color: string;
2062
+ created_at: string;
2063
+ icon: string | null;
2064
+ id: string;
2065
+ name: string;
2066
+ slug: string;
2067
+ sort_order: number;
2068
+ updated_at: string;
2069
+ };
2070
+ Insert: {
2071
+ color?: string;
2072
+ created_at?: string;
2073
+ icon?: string | null;
2074
+ id?: string;
2075
+ name: string;
2076
+ slug: string;
2077
+ sort_order?: number;
2078
+ updated_at?: string;
2079
+ };
2080
+ Update: {
2081
+ color?: string;
2082
+ created_at?: string;
2083
+ icon?: string | null;
2084
+ id?: string;
2085
+ name?: string;
2086
+ slug?: string;
2087
+ sort_order?: number;
2088
+ updated_at?: string;
2089
+ };
2090
+ Relationships: [];
2091
+ };
2092
+ product_field_options: {
2093
+ Row: {
2094
+ created_at: string;
2095
+ field_setting_id: string;
2096
+ id: string;
2097
+ label: string;
2098
+ sort_order: number;
2099
+ };
2100
+ Insert: {
2101
+ created_at?: string;
2102
+ field_setting_id: string;
2103
+ id?: string;
2104
+ label: string;
2105
+ sort_order?: number;
2106
+ };
2107
+ Update: {
2108
+ created_at?: string;
2109
+ field_setting_id?: string;
2110
+ id?: string;
2111
+ label?: string;
2112
+ sort_order?: number;
2113
+ };
2114
+ Relationships: [{
2115
+ foreignKeyName: "product_field_options_field_setting_id_fkey";
2116
+ columns: ["field_setting_id"];
2117
+ isOneToOne: false;
2118
+ referencedRelation: "product_field_settings";
2119
+ referencedColumns: ["id"];
2120
+ }];
2121
+ };
2122
+ product_field_settings: {
2123
+ Row: {
2124
+ active_per_category: import("../integrations/supabase/types").Json;
2125
+ created_at: string;
2126
+ field_key: string;
2127
+ field_label: string;
2128
+ field_type: string;
2129
+ id: string;
2130
+ is_custom: boolean;
2131
+ sort_order: number;
2132
+ updated_at: string;
2133
+ };
2134
+ Insert: {
2135
+ active_per_category?: import("../integrations/supabase/types").Json;
2136
+ created_at?: string;
2137
+ field_key: string;
2138
+ field_label: string;
2139
+ field_type?: string;
2140
+ id?: string;
2141
+ is_custom?: boolean;
2142
+ sort_order?: number;
2143
+ updated_at?: string;
2144
+ };
2145
+ Update: {
2146
+ active_per_category?: import("../integrations/supabase/types").Json;
2147
+ created_at?: string;
2148
+ field_key?: string;
2149
+ field_label?: string;
2150
+ field_type?: string;
2151
+ id?: string;
2152
+ is_custom?: boolean;
2153
+ sort_order?: number;
2154
+ updated_at?: string;
2155
+ };
2156
+ Relationships: [];
2157
+ };
2158
+ products: {
2159
+ Row: {
2160
+ barcode: string | null;
2161
+ batch: string;
2162
+ created_at: string;
2163
+ custom_fields: import("../integrations/supabase/types").Json;
2164
+ id: string;
2165
+ image_url: string | null;
2166
+ incoming_quantity: number;
2167
+ location: string;
2168
+ min_quantity: number;
2169
+ product: string;
2170
+ product_type: string;
2171
+ purchase_price: number | null;
2172
+ quantity: number;
2173
+ sale_price: number | null;
2174
+ unit: string;
2175
+ updated_at: string;
2176
+ weight: string | null;
2177
+ };
2178
+ Insert: {
2179
+ barcode?: string | null;
2180
+ batch: string;
2181
+ created_at?: string;
2182
+ custom_fields?: import("../integrations/supabase/types").Json;
2183
+ id?: string;
2184
+ image_url?: string | null;
2185
+ incoming_quantity?: number;
2186
+ location: string;
2187
+ min_quantity?: number;
2188
+ product: string;
2189
+ product_type?: string;
2190
+ purchase_price?: number | null;
2191
+ quantity?: number;
2192
+ sale_price?: number | null;
2193
+ unit?: string;
2194
+ updated_at?: string;
2195
+ weight?: string | null;
2196
+ };
2197
+ Update: {
2198
+ barcode?: string | null;
2199
+ batch?: string;
2200
+ created_at?: string;
2201
+ custom_fields?: import("../integrations/supabase/types").Json;
2202
+ id?: string;
2203
+ image_url?: string | null;
2204
+ incoming_quantity?: number;
2205
+ location?: string;
2206
+ min_quantity?: number;
2207
+ product?: string;
2208
+ product_type?: string;
2209
+ purchase_price?: number | null;
2210
+ quantity?: number;
2211
+ sale_price?: number | null;
2212
+ unit?: string;
2213
+ updated_at?: string;
2214
+ weight?: string | null;
2215
+ };
2216
+ Relationships: [];
2217
+ };
2218
+ profiles: {
2219
+ Row: {
2220
+ created_at: string;
2221
+ display_name: string | null;
2222
+ email: string | null;
2223
+ id: string;
2224
+ notification_preferences: import("../integrations/supabase/types").Json;
2225
+ updated_at: string;
2226
+ };
2227
+ Insert: {
2228
+ created_at?: string;
2229
+ display_name?: string | null;
2230
+ email?: string | null;
2231
+ id: string;
2232
+ notification_preferences?: import("../integrations/supabase/types").Json;
2233
+ updated_at?: string;
2234
+ };
2235
+ Update: {
2236
+ created_at?: string;
2237
+ display_name?: string | null;
2238
+ email?: string | null;
2239
+ id?: string;
2240
+ notification_preferences?: import("../integrations/supabase/types").Json;
2241
+ updated_at?: string;
2242
+ };
2243
+ Relationships: [];
2244
+ };
2245
+ purchase_order_items: {
2246
+ Row: {
2247
+ created_at: string;
2248
+ id: string;
2249
+ product_id: string | null;
2250
+ product_type: string;
2251
+ purchase_order_id: string;
2252
+ quantity: number;
2253
+ };
2254
+ Insert: {
2255
+ created_at?: string;
2256
+ id?: string;
2257
+ product_id?: string | null;
2258
+ product_type?: string;
2259
+ purchase_order_id: string;
2260
+ quantity?: number;
2261
+ };
2262
+ Update: {
2263
+ created_at?: string;
2264
+ id?: string;
2265
+ product_id?: string | null;
2266
+ product_type?: string;
2267
+ purchase_order_id?: string;
2268
+ quantity?: number;
2269
+ };
2270
+ Relationships: [{
2271
+ foreignKeyName: "purchase_order_items_product_id_fkey";
2272
+ columns: ["product_id"];
2273
+ isOneToOne: false;
2274
+ referencedRelation: "products";
2275
+ referencedColumns: ["id"];
2276
+ }, {
2277
+ foreignKeyName: "purchase_order_items_purchase_order_id_fkey";
2278
+ columns: ["purchase_order_id"];
2279
+ isOneToOne: false;
2280
+ referencedRelation: "purchase_orders";
2281
+ referencedColumns: ["id"];
2282
+ }];
2283
+ };
2284
+ purchase_orders: {
2285
+ Row: {
2286
+ created_at: string;
2287
+ expected_delivery_date: string;
2288
+ id: string;
2289
+ location_id: string | null;
2290
+ notes: string | null;
2291
+ order_number: string;
2292
+ status: string;
2293
+ supplier_id: string | null;
2294
+ supplier_name: string;
2295
+ updated_at: string;
2296
+ };
2297
+ Insert: {
2298
+ created_at?: string;
2299
+ expected_delivery_date: string;
2300
+ id?: string;
2301
+ location_id?: string | null;
2302
+ notes?: string | null;
2303
+ order_number: string;
2304
+ status?: string;
2305
+ supplier_id?: string | null;
2306
+ supplier_name?: string;
2307
+ updated_at?: string;
2308
+ };
2309
+ Update: {
2310
+ created_at?: string;
2311
+ expected_delivery_date?: string;
2312
+ id?: string;
2313
+ location_id?: string | null;
2314
+ notes?: string | null;
2315
+ order_number?: string;
2316
+ status?: string;
2317
+ supplier_id?: string | null;
2318
+ supplier_name?: string;
2319
+ updated_at?: string;
2320
+ };
2321
+ Relationships: [{
2322
+ foreignKeyName: "purchase_orders_location_id_fkey";
2323
+ columns: ["location_id"];
2324
+ isOneToOne: false;
2325
+ referencedRelation: "locations";
2326
+ referencedColumns: ["id"];
2327
+ }, {
2328
+ foreignKeyName: "purchase_orders_supplier_id_fkey";
2329
+ columns: ["supplier_id"];
2330
+ isOneToOne: false;
2331
+ referencedRelation: "suppliers";
2332
+ referencedColumns: ["id"];
2333
+ }];
2334
+ };
2335
+ supplier_products: {
2336
+ Row: {
2337
+ article_number: string | null;
2338
+ created_at: string;
2339
+ id: string;
2340
+ name: string;
2341
+ notes: string | null;
2342
+ pot_size: string | null;
2343
+ price: number | null;
2344
+ quantity: number | null;
2345
+ supplier_id: string;
2346
+ unit: string;
2347
+ updated_at: string;
2348
+ };
2349
+ Insert: {
2350
+ article_number?: string | null;
2351
+ created_at?: string;
2352
+ id?: string;
2353
+ name: string;
2354
+ notes?: string | null;
2355
+ pot_size?: string | null;
2356
+ price?: number | null;
2357
+ quantity?: number | null;
2358
+ supplier_id: string;
2359
+ unit?: string;
2360
+ updated_at?: string;
2361
+ };
2362
+ Update: {
2363
+ article_number?: string | null;
2364
+ created_at?: string;
2365
+ id?: string;
2366
+ name?: string;
2367
+ notes?: string | null;
2368
+ pot_size?: string | null;
2369
+ price?: number | null;
2370
+ quantity?: number | null;
2371
+ supplier_id?: string;
2372
+ unit?: string;
2373
+ updated_at?: string;
2374
+ };
2375
+ Relationships: [{
2376
+ foreignKeyName: "supplier_products_supplier_id_fkey";
2377
+ columns: ["supplier_id"];
2378
+ isOneToOne: false;
2379
+ referencedRelation: "suppliers";
2380
+ referencedColumns: ["id"];
2381
+ }];
2382
+ };
2383
+ suppliers: {
2384
+ Row: {
2385
+ address: string | null;
2386
+ column_mappings: import("../integrations/supabase/types").Json | null;
2387
+ contact_person: string | null;
2388
+ created_at: string;
2389
+ default_product_type: string;
2390
+ email: string | null;
2391
+ id: string;
2392
+ imported_file_name: string | null;
2393
+ name: string;
2394
+ notes: string | null;
2395
+ phone: string | null;
2396
+ updated_at: string;
2397
+ };
2398
+ Insert: {
2399
+ address?: string | null;
2400
+ column_mappings?: import("../integrations/supabase/types").Json | null;
2401
+ contact_person?: string | null;
2402
+ created_at?: string;
2403
+ default_product_type?: string;
2404
+ email?: string | null;
2405
+ id?: string;
2406
+ imported_file_name?: string | null;
2407
+ name: string;
2408
+ notes?: string | null;
2409
+ phone?: string | null;
2410
+ updated_at?: string;
2411
+ };
2412
+ Update: {
2413
+ address?: string | null;
2414
+ column_mappings?: import("../integrations/supabase/types").Json | null;
2415
+ contact_person?: string | null;
2416
+ created_at?: string;
2417
+ default_product_type?: string;
2418
+ email?: string | null;
2419
+ id?: string;
2420
+ imported_file_name?: string | null;
2421
+ name?: string;
2422
+ notes?: string | null;
2423
+ phone?: string | null;
2424
+ updated_at?: string;
2425
+ };
2426
+ Relationships: [];
2427
+ };
2428
+ trade_item_drafts: {
2429
+ Row: {
2430
+ connection_id: string | null;
2431
+ created_at: string;
2432
+ data: import("../integrations/supabase/types").Json;
2433
+ id: string;
2434
+ updated_at: string;
2435
+ user_id: string;
2436
+ };
2437
+ Insert: {
2438
+ connection_id?: string | null;
2439
+ created_at?: string;
2440
+ data?: import("../integrations/supabase/types").Json;
2441
+ id?: string;
2442
+ updated_at?: string;
2443
+ user_id: string;
2444
+ };
2445
+ Update: {
2446
+ connection_id?: string | null;
2447
+ created_at?: string;
2448
+ data?: import("../integrations/supabase/types").Json;
2449
+ id?: string;
2450
+ updated_at?: string;
2451
+ user_id?: string;
2452
+ };
2453
+ Relationships: [];
2454
+ };
2455
+ user_roles: {
2456
+ Row: {
2457
+ created_at: string;
2458
+ id: string;
2459
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
2460
+ user_id: string;
2461
+ };
2462
+ Insert: {
2463
+ created_at?: string;
2464
+ id?: string;
2465
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
2466
+ user_id: string;
2467
+ };
2468
+ Update: {
2469
+ created_at?: string;
2470
+ id?: string;
2471
+ role?: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
2472
+ user_id?: string;
2473
+ };
2474
+ Relationships: [{
2475
+ foreignKeyName: "user_roles_user_id_fkey";
2476
+ columns: ["user_id"];
2477
+ isOneToOne: false;
2478
+ referencedRelation: "profiles";
2479
+ referencedColumns: ["id"];
2480
+ }];
2481
+ };
2482
+ };
2483
+ Views: { [_ in never]: never; };
2484
+ Functions: {
2485
+ dashboard_list_public_schema: {
2486
+ Args: never;
2487
+ Returns: {
2488
+ column_name: string;
2489
+ data_type: string;
2490
+ table_name: string;
2491
+ }[];
2492
+ };
2493
+ exact_decrypt: {
2494
+ Args: {
2495
+ cipher: string;
2496
+ };
2497
+ Returns: string;
2498
+ };
2499
+ exact_encrypt: {
2500
+ Args: {
2501
+ plain: string;
2502
+ };
2503
+ Returns: string;
2504
+ };
2505
+ get_offer_by_link_code: {
2506
+ Args: {
2507
+ p_code: string;
2508
+ };
2509
+ Returns: import("../integrations/supabase/types").Json;
2510
+ };
2511
+ has_role: {
2512
+ Args: {
2513
+ _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
2514
+ _user_id: string;
2515
+ };
2516
+ Returns: boolean;
2517
+ };
2518
+ schedule_floriday_network_sync: {
2519
+ Args: {
2520
+ p_apikey: string;
2521
+ p_url: string;
2522
+ };
2523
+ Returns: number;
2524
+ };
2525
+ schedule_floriday_token_refresh: {
2526
+ Args: {
2527
+ p_apikey: string;
2528
+ p_url: string;
2529
+ };
2530
+ Returns: number;
2531
+ };
2532
+ show_limit: {
2533
+ Args: never;
2534
+ Returns: number;
2535
+ };
2536
+ show_trgm: {
2537
+ Args: {
2538
+ "": string;
2539
+ };
2540
+ Returns: string[];
2541
+ };
2542
+ };
2543
+ Enums: {
2544
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
2545
+ exact_env: "staging" | "live";
2546
+ };
2547
+ CompositeTypes: { [_ in never]: never; };
2548
+ }, {
2549
+ PostgrestVersion: "14.5";
2550
+ }>;
2551
+ userId: string;
2552
+ claims: import("@supabase/auth-js").JwtPayload;
2553
+ }, undefined, undefined, undefined>], undefined, Promise<{
2554
+ tables: {
2555
+ name: string;
2556
+ columns: {
2557
+ name: string;
2558
+ type: string;
2559
+ }[];
2560
+ }[];
2561
+ }>>;
2562
+ //# sourceMappingURL=dashboard.functions.d.ts.map