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