@flowselections/floriday-voorraad 1.0.19 → 1.0.21

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 (64) hide show
  1. package/dist-lib/components/voorraad/ArtikelCompositionCard.d.ts +7 -0
  2. package/dist-lib/components/voorraad/ArtikelCompositionCard.d.ts.map +1 -0
  3. package/dist-lib/components/voorraad/ArtikelCompositionCard.js +196 -0
  4. package/dist-lib/components/voorraad/ArtikelWizard.d.ts +2 -1
  5. package/dist-lib/components/voorraad/ArtikelWizard.d.ts.map +1 -1
  6. package/dist-lib/components/voorraad/ArtikelWizard.js +259 -26
  7. package/dist-lib/components/voorraad/EditArtikelPage.d.ts.map +1 -1
  8. package/dist-lib/components/voorraad/EditArtikelPage.js +28 -85
  9. package/dist-lib/components/voorraad/FloridayStatusBadge.d.ts +4 -0
  10. package/dist-lib/components/voorraad/FloridayStatusBadge.d.ts.map +1 -0
  11. package/dist-lib/components/voorraad/FloridayStatusBadge.js +8 -0
  12. package/dist-lib/components/voorraad/StockBulkButtons.js +7 -6
  13. package/dist-lib/components/voorraad/ValidationOverviewTable.d.ts +5 -0
  14. package/dist-lib/components/voorraad/ValidationOverviewTable.d.ts.map +1 -1
  15. package/dist-lib/components/voorraad/ValidationOverviewTable.js +26 -56
  16. package/dist-lib/components/voorraad/VoorraadDashboard.d.ts +4 -0
  17. package/dist-lib/components/voorraad/VoorraadDashboard.d.ts.map +1 -1
  18. package/dist-lib/components/voorraad/VoorraadDashboard.js +14 -6
  19. package/dist-lib/components/voorraad/VoorraadStockCard.d.ts.map +1 -1
  20. package/dist-lib/components/voorraad/VoorraadStockCard.js +11 -0
  21. package/dist-lib/components/voorraad/VoorraadTable.d.ts.map +1 -1
  22. package/dist-lib/components/voorraad/VoorraadTable.js +5 -12
  23. package/dist-lib/hooks/useFloridayContinuousStock.d.ts +13 -0
  24. package/dist-lib/hooks/useFloridayContinuousStock.d.ts.map +1 -0
  25. package/dist-lib/hooks/useFloridayContinuousStock.js +109 -0
  26. package/dist-lib/hooks/useFlorydayCustomers.d.ts +11 -4
  27. package/dist-lib/hooks/useFlorydayCustomers.d.ts.map +1 -1
  28. package/dist-lib/hooks/useFlorydayCustomers.js +85 -38
  29. package/dist-lib/hooks/useLocalTradeItems.d.ts +26 -2
  30. package/dist-lib/hooks/useLocalTradeItems.d.ts.map +1 -1
  31. package/dist-lib/hooks/useLocalTradeItems.js +119 -79
  32. package/dist-lib/hooks/useVoorraadData.d.ts +5 -5
  33. package/dist-lib/hooks/useVoorraadData.d.ts.map +1 -1
  34. package/dist-lib/hooks/useVoorraadData.js +127 -50
  35. package/dist-lib/integrations/supabase/auth-middleware.d.ts +662 -168
  36. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  37. package/dist-lib/integrations/supabase/client.d.ts +662 -168
  38. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  39. package/dist-lib/integrations/supabase/client.server.d.ts +662 -168
  40. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  41. package/dist-lib/integrations/supabase/types.d.ts +678 -163
  42. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  43. package/dist-lib/lib/floricode-required-features.functions.d.ts +662 -168
  44. package/dist-lib/lib/floricode-required-features.functions.d.ts.map +1 -1
  45. package/dist-lib/lib/floriday-client.d.ts +29 -12
  46. package/dist-lib/lib/floriday-client.d.ts.map +1 -1
  47. package/dist-lib/lib/floriday-client.js +36 -0
  48. package/dist-lib/lib/floriday-customer-offer.functions.d.ts +662 -168
  49. package/dist-lib/lib/floriday-customer-offer.functions.d.ts.map +1 -1
  50. package/dist-lib/lib/floriday-gateway.functions.d.ts +3220 -750
  51. package/dist-lib/lib/floriday-gateway.functions.d.ts.map +1 -1
  52. package/dist-lib/lib/floriday-gateway.server.d.ts +14 -0
  53. package/dist-lib/lib/floriday-gateway.server.d.ts.map +1 -1
  54. package/dist-lib/lib/floriday-gateway.server.js +3 -0
  55. package/dist-lib/lib/floriday-payload.d.ts.map +1 -1
  56. package/dist-lib/lib/floriday-payload.js +32 -8
  57. package/dist-lib/lib/floriday-warehouse.functions.d.ts +1932 -450
  58. package/dist-lib/lib/floriday-warehouse.functions.d.ts.map +1 -1
  59. package/dist-lib/lib/floriday-writes.functions.d.ts +1333 -345
  60. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  61. package/dist-lib/lib/merge-products.d.ts +8 -0
  62. package/dist-lib/lib/merge-products.d.ts.map +1 -0
  63. package/dist-lib/lib/merge-products.js +17 -0
  64. package/package.json +3 -3
@@ -255,6 +255,165 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
255
255
  };
256
256
  Relationships: [];
257
257
  };
258
+ ai_credentials: {
259
+ Row: {
260
+ active: boolean;
261
+ api_key: string;
262
+ created_at: string;
263
+ created_by: string | null;
264
+ id: string;
265
+ label: string;
266
+ provider_id: string;
267
+ updated_at: string;
268
+ };
269
+ Insert: {
270
+ active?: boolean;
271
+ api_key: string;
272
+ created_at?: string;
273
+ created_by?: string | null;
274
+ id?: string;
275
+ label: string;
276
+ provider_id: string;
277
+ updated_at?: string;
278
+ };
279
+ Update: {
280
+ active?: boolean;
281
+ api_key?: string;
282
+ created_at?: string;
283
+ created_by?: string | null;
284
+ id?: string;
285
+ label?: string;
286
+ provider_id?: string;
287
+ updated_at?: string;
288
+ };
289
+ Relationships: [{
290
+ foreignKeyName: "ai_credentials_provider_id_fkey";
291
+ columns: ["provider_id"];
292
+ isOneToOne: false;
293
+ referencedRelation: "ai_providers";
294
+ referencedColumns: ["id"];
295
+ }];
296
+ };
297
+ ai_models: {
298
+ Row: {
299
+ active: boolean;
300
+ context_window: number | null;
301
+ created_at: string;
302
+ display_name: string;
303
+ id: string;
304
+ is_default: boolean;
305
+ modality: string;
306
+ provider_id: string;
307
+ slug: string;
308
+ updated_at: string;
309
+ };
310
+ Insert: {
311
+ active?: boolean;
312
+ context_window?: number | null;
313
+ created_at?: string;
314
+ display_name: string;
315
+ id?: string;
316
+ is_default?: boolean;
317
+ modality?: string;
318
+ provider_id: string;
319
+ slug: string;
320
+ updated_at?: string;
321
+ };
322
+ Update: {
323
+ active?: boolean;
324
+ context_window?: number | null;
325
+ created_at?: string;
326
+ display_name?: string;
327
+ id?: string;
328
+ is_default?: boolean;
329
+ modality?: string;
330
+ provider_id?: string;
331
+ slug?: string;
332
+ updated_at?: string;
333
+ };
334
+ Relationships: [{
335
+ foreignKeyName: "ai_models_provider_id_fkey";
336
+ columns: ["provider_id"];
337
+ isOneToOne: false;
338
+ referencedRelation: "ai_providers";
339
+ referencedColumns: ["id"];
340
+ }];
341
+ };
342
+ ai_module_bindings: {
343
+ Row: {
344
+ consumer_module_id: string;
345
+ created_at: string;
346
+ credential_id: string;
347
+ id: string;
348
+ model_id: string;
349
+ notes: string | null;
350
+ updated_at: string;
351
+ };
352
+ Insert: {
353
+ consumer_module_id: string;
354
+ created_at?: string;
355
+ credential_id: string;
356
+ id?: string;
357
+ model_id: string;
358
+ notes?: string | null;
359
+ updated_at?: string;
360
+ };
361
+ Update: {
362
+ consumer_module_id?: string;
363
+ created_at?: string;
364
+ credential_id?: string;
365
+ id?: string;
366
+ model_id?: string;
367
+ notes?: string | null;
368
+ updated_at?: string;
369
+ };
370
+ Relationships: [{
371
+ foreignKeyName: "ai_module_bindings_credential_id_fkey";
372
+ columns: ["credential_id"];
373
+ isOneToOne: false;
374
+ referencedRelation: "ai_credentials";
375
+ referencedColumns: ["id"];
376
+ }, {
377
+ foreignKeyName: "ai_module_bindings_model_id_fkey";
378
+ columns: ["model_id"];
379
+ isOneToOne: false;
380
+ referencedRelation: "ai_models";
381
+ referencedColumns: ["id"];
382
+ }];
383
+ };
384
+ ai_providers: {
385
+ Row: {
386
+ active: boolean;
387
+ auth_type: string;
388
+ base_url: string | null;
389
+ created_at: string;
390
+ id: string;
391
+ name: string;
392
+ slug: string;
393
+ updated_at: string;
394
+ };
395
+ Insert: {
396
+ active?: boolean;
397
+ auth_type?: string;
398
+ base_url?: string | null;
399
+ created_at?: string;
400
+ id?: string;
401
+ name: string;
402
+ slug: string;
403
+ updated_at?: string;
404
+ };
405
+ Update: {
406
+ active?: boolean;
407
+ auth_type?: string;
408
+ base_url?: string | null;
409
+ created_at?: string;
410
+ id?: string;
411
+ name?: string;
412
+ slug?: string;
413
+ updated_at?: string;
414
+ };
415
+ Relationships: [];
416
+ };
258
417
  app_settings: {
259
418
  Row: {
260
419
  created_at: string;
@@ -3261,105 +3420,6 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
3261
3420
  referencedColumns: ["id"];
3262
3421
  }];
3263
3422
  };
3264
- floriday_agreement_calloffs_cache: {
3265
- Row: {
3266
- agreement_id: string | null;
3267
- connection_id: string;
3268
- data: import("../integrations/supabase/types").Json;
3269
- delivery_date: string | null;
3270
- fetched_at: string;
3271
- floriday_id: string;
3272
- id: string;
3273
- is_deleted: boolean;
3274
- sequence_number: number;
3275
- status: string | null;
3276
- updated_at: string;
3277
- };
3278
- Insert: {
3279
- agreement_id?: string | null;
3280
- connection_id: string;
3281
- data?: import("../integrations/supabase/types").Json;
3282
- delivery_date?: string | null;
3283
- fetched_at?: string;
3284
- floriday_id: string;
3285
- id?: string;
3286
- is_deleted?: boolean;
3287
- sequence_number?: number;
3288
- status?: string | null;
3289
- updated_at?: string;
3290
- };
3291
- Update: {
3292
- agreement_id?: string | null;
3293
- connection_id?: string;
3294
- data?: import("../integrations/supabase/types").Json;
3295
- delivery_date?: string | null;
3296
- fetched_at?: string;
3297
- floriday_id?: string;
3298
- id?: string;
3299
- is_deleted?: boolean;
3300
- sequence_number?: number;
3301
- status?: string | null;
3302
- updated_at?: string;
3303
- };
3304
- Relationships: [{
3305
- foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
3306
- columns: ["connection_id"];
3307
- isOneToOne: false;
3308
- referencedRelation: "floriday_connections";
3309
- referencedColumns: ["id"];
3310
- }];
3311
- };
3312
- floriday_agreements_cache: {
3313
- Row: {
3314
- buyer_organization_id: string | null;
3315
- connection_id: string;
3316
- data: import("../integrations/supabase/types").Json;
3317
- fetched_at: string;
3318
- floriday_id: string;
3319
- id: string;
3320
- is_deleted: boolean;
3321
- sequence_number: number;
3322
- status: string | null;
3323
- updated_at: string;
3324
- valid_from: string | null;
3325
- valid_until: string | null;
3326
- };
3327
- Insert: {
3328
- buyer_organization_id?: string | null;
3329
- connection_id: string;
3330
- data?: import("../integrations/supabase/types").Json;
3331
- fetched_at?: string;
3332
- floriday_id: string;
3333
- id?: string;
3334
- is_deleted?: boolean;
3335
- sequence_number?: number;
3336
- status?: string | null;
3337
- updated_at?: string;
3338
- valid_from?: string | null;
3339
- valid_until?: string | null;
3340
- };
3341
- Update: {
3342
- buyer_organization_id?: string | null;
3343
- connection_id?: string;
3344
- data?: import("../integrations/supabase/types").Json;
3345
- fetched_at?: string;
3346
- floriday_id?: string;
3347
- id?: string;
3348
- is_deleted?: boolean;
3349
- sequence_number?: number;
3350
- status?: string | null;
3351
- updated_at?: string;
3352
- valid_from?: string | null;
3353
- valid_until?: string | null;
3354
- };
3355
- Relationships: [{
3356
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
3357
- columns: ["connection_id"];
3358
- isOneToOne: false;
3359
- referencedRelation: "floriday_connections";
3360
- referencedColumns: ["id"];
3361
- }];
3362
- };
3363
3423
  floriday_auction_letters_cache: {
3364
3424
  Row: {
3365
3425
  auction_letter_code: string;
@@ -3858,6 +3918,27 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
3858
3918
  referencedColumns: ["id"];
3859
3919
  }];
3860
3920
  };
3921
+ floriday_continuous_stock_cache: {
3922
+ Row: {
3923
+ connection_id: string;
3924
+ fetched_at: string;
3925
+ number_of_pieces: number;
3926
+ trade_item_id: string;
3927
+ };
3928
+ Insert: {
3929
+ connection_id: string;
3930
+ fetched_at?: string;
3931
+ number_of_pieces?: number;
3932
+ trade_item_id: string;
3933
+ };
3934
+ Update: {
3935
+ connection_id?: string;
3936
+ fetched_at?: string;
3937
+ number_of_pieces?: number;
3938
+ trade_item_id?: string;
3939
+ };
3940
+ Relationships: [];
3941
+ };
3861
3942
  floriday_continuous_stock_queue: {
3862
3943
  Row: {
3863
3944
  attempts: number;
@@ -4836,6 +4917,45 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
4836
4917
  referencedColumns: ["id"];
4837
4918
  }];
4838
4919
  };
4920
+ floriday_trade_settings_customers_cache: {
4921
+ Row: {
4922
+ connection_id: string;
4923
+ data: import("../integrations/supabase/types").Json;
4924
+ fetched_at: string;
4925
+ floriday_id: string;
4926
+ id: string;
4927
+ is_deleted: boolean;
4928
+ sequence_number: number;
4929
+ updated_at: string;
4930
+ };
4931
+ Insert: {
4932
+ connection_id: string;
4933
+ data: import("../integrations/supabase/types").Json;
4934
+ fetched_at?: string;
4935
+ floriday_id: string;
4936
+ id?: string;
4937
+ is_deleted?: boolean;
4938
+ sequence_number?: number;
4939
+ updated_at?: string;
4940
+ };
4941
+ Update: {
4942
+ connection_id?: string;
4943
+ data?: import("../integrations/supabase/types").Json;
4944
+ fetched_at?: string;
4945
+ floriday_id?: string;
4946
+ id?: string;
4947
+ is_deleted?: boolean;
4948
+ sequence_number?: number;
4949
+ updated_at?: string;
4950
+ };
4951
+ Relationships: [{
4952
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
4953
+ columns: ["connection_id"];
4954
+ isOneToOne: false;
4955
+ referencedRelation: "floriday_connections";
4956
+ referencedColumns: ["id"];
4957
+ }];
4958
+ };
4839
4959
  floriday_trips_cache: {
4840
4960
  Row: {
4841
4961
  carrier_organization_id: string | null;
@@ -5981,39 +6101,60 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
5981
6101
  };
5982
6102
  manufacture_products: {
5983
6103
  Row: {
6104
+ aantal_te_produceren: number;
5984
6105
  created_at: string;
5985
6106
  description: string | null;
5986
6107
  id: string;
5987
6108
  is_active: boolean;
6109
+ location_id: string | null;
5988
6110
  name: string;
6111
+ partij_nummer: string | null;
6112
+ photos: import("../integrations/supabase/types").Json;
5989
6113
  produced_stock: number;
5990
6114
  product_code: string;
5991
6115
  tenant_id: string;
6116
+ unit: string;
5992
6117
  updated_at: string;
5993
6118
  };
5994
6119
  Insert: {
6120
+ aantal_te_produceren?: number;
5995
6121
  created_at?: string;
5996
6122
  description?: string | null;
5997
6123
  id?: string;
5998
6124
  is_active?: boolean;
6125
+ location_id?: string | null;
5999
6126
  name: string;
6127
+ partij_nummer?: string | null;
6128
+ photos?: import("../integrations/supabase/types").Json;
6000
6129
  produced_stock?: number;
6001
6130
  product_code: string;
6002
6131
  tenant_id: string;
6132
+ unit?: string;
6003
6133
  updated_at?: string;
6004
6134
  };
6005
6135
  Update: {
6136
+ aantal_te_produceren?: number;
6006
6137
  created_at?: string;
6007
6138
  description?: string | null;
6008
6139
  id?: string;
6009
6140
  is_active?: boolean;
6141
+ location_id?: string | null;
6010
6142
  name?: string;
6143
+ partij_nummer?: string | null;
6144
+ photos?: import("../integrations/supabase/types").Json;
6011
6145
  produced_stock?: number;
6012
6146
  product_code?: string;
6013
6147
  tenant_id?: string;
6148
+ unit?: string;
6014
6149
  updated_at?: string;
6015
6150
  };
6016
- Relationships: [];
6151
+ Relationships: [{
6152
+ foreignKeyName: "manufacture_products_location_id_fkey";
6153
+ columns: ["location_id"];
6154
+ isOneToOne: false;
6155
+ referencedRelation: "locations";
6156
+ referencedColumns: ["id"];
6157
+ }];
6017
6158
  };
6018
6159
  monteurs: {
6019
6160
  Row: {
@@ -6987,6 +7128,105 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6987
7128
  };
6988
7129
  Relationships: [];
6989
7130
  };
7131
+ order_shipment_items: {
7132
+ Row: {
7133
+ created_at: string;
7134
+ id: string;
7135
+ order_item_id: string;
7136
+ product_id: string | null;
7137
+ product_name: string;
7138
+ quantity: number;
7139
+ shipment_id: string;
7140
+ updated_at: string;
7141
+ };
7142
+ Insert: {
7143
+ created_at?: string;
7144
+ id?: string;
7145
+ order_item_id: string;
7146
+ product_id?: string | null;
7147
+ product_name: string;
7148
+ quantity: number;
7149
+ shipment_id: string;
7150
+ updated_at?: string;
7151
+ };
7152
+ Update: {
7153
+ created_at?: string;
7154
+ id?: string;
7155
+ order_item_id?: string;
7156
+ product_id?: string | null;
7157
+ product_name?: string;
7158
+ quantity?: number;
7159
+ shipment_id?: string;
7160
+ updated_at?: string;
7161
+ };
7162
+ Relationships: [{
7163
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
7164
+ columns: ["order_item_id"];
7165
+ isOneToOne: false;
7166
+ referencedRelation: "order_items";
7167
+ referencedColumns: ["id"];
7168
+ }, {
7169
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
7170
+ columns: ["shipment_id"];
7171
+ isOneToOne: false;
7172
+ referencedRelation: "order_shipments";
7173
+ referencedColumns: ["id"];
7174
+ }];
7175
+ };
7176
+ order_shipments: {
7177
+ Row: {
7178
+ carrier_id: string | null;
7179
+ created_at: string;
7180
+ delivery_date: string | null;
7181
+ delivery_location_id: string | null;
7182
+ id: string;
7183
+ notes: string | null;
7184
+ order_id: string;
7185
+ shipment_number: number;
7186
+ shipped_at: string | null;
7187
+ status: string;
7188
+ updated_at: string;
7189
+ };
7190
+ Insert: {
7191
+ carrier_id?: string | null;
7192
+ created_at?: string;
7193
+ delivery_date?: string | null;
7194
+ delivery_location_id?: string | null;
7195
+ id?: string;
7196
+ notes?: string | null;
7197
+ order_id: string;
7198
+ shipment_number: number;
7199
+ shipped_at?: string | null;
7200
+ status?: string;
7201
+ updated_at?: string;
7202
+ };
7203
+ Update: {
7204
+ carrier_id?: string | null;
7205
+ created_at?: string;
7206
+ delivery_date?: string | null;
7207
+ delivery_location_id?: string | null;
7208
+ id?: string;
7209
+ notes?: string | null;
7210
+ order_id?: string;
7211
+ shipment_number?: number;
7212
+ shipped_at?: string | null;
7213
+ status?: string;
7214
+ updated_at?: string;
7215
+ };
7216
+ Relationships: [{
7217
+ foreignKeyName: "order_shipments_carrier_id_fkey";
7218
+ columns: ["carrier_id"];
7219
+ isOneToOne: false;
7220
+ referencedRelation: "carriers";
7221
+ referencedColumns: ["id"];
7222
+ }, {
7223
+ foreignKeyName: "order_shipments_order_id_fkey";
7224
+ columns: ["order_id"];
7225
+ isOneToOne: false;
7226
+ referencedRelation: "orders";
7227
+ referencedColumns: ["id"];
7228
+ }];
7229
+ };
6990
7230
  orders: {
6991
7231
  Row: {
6992
7232
  created_at: string;
@@ -6994,8 +7234,9 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6994
7234
  customer_id: string | null;
6995
7235
  customer_name: string;
6996
7236
  deleted_at: string | null;
6997
- delivery_date: string;
7237
+ delivery_date: string | null;
6998
7238
  id: string;
7239
+ is_reservation: boolean;
6999
7240
  notes: string | null;
7000
7241
  order_date: string;
7001
7242
  order_number: string;
@@ -7012,8 +7253,9 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7012
7253
  customer_id?: string | null;
7013
7254
  customer_name?: string;
7014
7255
  deleted_at?: string | null;
7015
- delivery_date: string;
7256
+ delivery_date?: string | null;
7016
7257
  id?: string;
7258
+ is_reservation?: boolean;
7017
7259
  notes?: string | null;
7018
7260
  order_date?: string;
7019
7261
  order_number: string;
@@ -7030,8 +7272,9 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7030
7272
  customer_id?: string | null;
7031
7273
  customer_name?: string;
7032
7274
  deleted_at?: string | null;
7033
- delivery_date?: string;
7275
+ delivery_date?: string | null;
7034
7276
  id?: string;
7277
+ is_reservation?: boolean;
7035
7278
  notes?: string | null;
7036
7279
  order_date?: string;
7037
7280
  order_number?: string;
@@ -7173,6 +7416,63 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7173
7416
  };
7174
7417
  Relationships: [];
7175
7418
  };
7419
+ product_bom_items: {
7420
+ Row: {
7421
+ component_product_id: string | null;
7422
+ component_trade_item_floriday_id: string | null;
7423
+ created_at: string;
7424
+ id: string;
7425
+ notes: string | null;
7426
+ parent_product_id: string | null;
7427
+ parent_trade_item_floriday_id: string | null;
7428
+ quantity: number;
7429
+ sort_order: number;
7430
+ tenant_id: string;
7431
+ unit: string;
7432
+ updated_at: string;
7433
+ };
7434
+ Insert: {
7435
+ component_product_id?: string | null;
7436
+ component_trade_item_floriday_id?: string | null;
7437
+ created_at?: string;
7438
+ id?: string;
7439
+ notes?: string | null;
7440
+ parent_product_id?: string | null;
7441
+ parent_trade_item_floriday_id?: string | null;
7442
+ quantity?: number;
7443
+ sort_order?: number;
7444
+ tenant_id: string;
7445
+ unit?: string;
7446
+ updated_at?: string;
7447
+ };
7448
+ Update: {
7449
+ component_product_id?: string | null;
7450
+ component_trade_item_floriday_id?: string | null;
7451
+ created_at?: string;
7452
+ id?: string;
7453
+ notes?: string | null;
7454
+ parent_product_id?: string | null;
7455
+ parent_trade_item_floriday_id?: string | null;
7456
+ quantity?: number;
7457
+ sort_order?: number;
7458
+ tenant_id?: string;
7459
+ unit?: string;
7460
+ updated_at?: string;
7461
+ };
7462
+ Relationships: [{
7463
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
7464
+ columns: ["component_product_id"];
7465
+ isOneToOne: false;
7466
+ referencedRelation: "products";
7467
+ referencedColumns: ["id"];
7468
+ }, {
7469
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
7470
+ columns: ["parent_product_id"];
7471
+ isOneToOne: false;
7472
+ referencedRelation: "products";
7473
+ referencedColumns: ["id"];
7474
+ }];
7475
+ };
7176
7476
  product_categories: {
7177
7477
  Row: {
7178
7478
  color: string;
@@ -7278,6 +7578,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7278
7578
  id: string;
7279
7579
  product_group_id: string;
7280
7580
  quantity: number;
7581
+ sort_order: number;
7281
7582
  trade_item_id: string;
7282
7583
  };
7283
7584
  Insert: {
@@ -7285,6 +7586,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7285
7586
  id?: string;
7286
7587
  product_group_id: string;
7287
7588
  quantity?: number;
7589
+ sort_order?: number;
7288
7590
  trade_item_id: string;
7289
7591
  };
7290
7592
  Update: {
@@ -7292,6 +7594,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7292
7594
  id?: string;
7293
7595
  product_group_id?: string;
7294
7596
  quantity?: number;
7597
+ sort_order?: number;
7295
7598
  trade_item_id?: string;
7296
7599
  };
7297
7600
  Relationships: [{
@@ -7306,6 +7609,8 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7306
7609
  Row: {
7307
7610
  created_at: string;
7308
7611
  description: string | null;
7612
+ head_product_id: string | null;
7613
+ head_trade_item_floriday_id: string | null;
7309
7614
  id: string;
7310
7615
  is_active: boolean;
7311
7616
  name: string;
@@ -7315,6 +7620,8 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7315
7620
  Insert: {
7316
7621
  created_at?: string;
7317
7622
  description?: string | null;
7623
+ head_product_id?: string | null;
7624
+ head_trade_item_floriday_id?: string | null;
7318
7625
  id?: string;
7319
7626
  is_active?: boolean;
7320
7627
  name: string;
@@ -7324,21 +7631,126 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7324
7631
  Update: {
7325
7632
  created_at?: string;
7326
7633
  description?: string | null;
7634
+ head_product_id?: string | null;
7635
+ head_trade_item_floriday_id?: string | null;
7327
7636
  id?: string;
7328
7637
  is_active?: boolean;
7329
7638
  name?: string;
7330
7639
  tenant_id?: string;
7331
7640
  updated_at?: string;
7332
7641
  };
7642
+ Relationships: [{
7643
+ foreignKeyName: "product_groups_head_product_id_fkey";
7644
+ columns: ["head_product_id"];
7645
+ isOneToOne: false;
7646
+ referencedRelation: "products";
7647
+ referencedColumns: ["id"];
7648
+ }];
7649
+ };
7650
+ product_load_settings: {
7651
+ Row: {
7652
+ created_at: string;
7653
+ id: string;
7654
+ is_package: boolean;
7655
+ layers_per_load_carrier: number | null;
7656
+ load_carrier: string | null;
7657
+ package_id: string | null;
7658
+ package_label: string | null;
7659
+ packages_per_layer: number | null;
7660
+ product_id: string | null;
7661
+ tenant_id: string;
7662
+ trade_item_floriday_id: string | null;
7663
+ units_per_package: number | null;
7664
+ updated_at: string;
7665
+ };
7666
+ Insert: {
7667
+ created_at?: string;
7668
+ id?: string;
7669
+ is_package?: boolean;
7670
+ layers_per_load_carrier?: number | null;
7671
+ load_carrier?: string | null;
7672
+ package_id?: string | null;
7673
+ package_label?: string | null;
7674
+ packages_per_layer?: number | null;
7675
+ product_id?: string | null;
7676
+ tenant_id: string;
7677
+ trade_item_floriday_id?: string | null;
7678
+ units_per_package?: number | null;
7679
+ updated_at?: string;
7680
+ };
7681
+ Update: {
7682
+ created_at?: string;
7683
+ id?: string;
7684
+ is_package?: boolean;
7685
+ layers_per_load_carrier?: number | null;
7686
+ load_carrier?: string | null;
7687
+ package_id?: string | null;
7688
+ package_label?: string | null;
7689
+ packages_per_layer?: number | null;
7690
+ product_id?: string | null;
7691
+ tenant_id?: string;
7692
+ trade_item_floriday_id?: string | null;
7693
+ units_per_package?: number | null;
7694
+ updated_at?: string;
7695
+ };
7696
+ Relationships: [{
7697
+ foreignKeyName: "product_load_settings_package_id_fkey";
7698
+ columns: ["package_id"];
7699
+ isOneToOne: false;
7700
+ referencedRelation: "packages";
7701
+ referencedColumns: ["id"];
7702
+ }, {
7703
+ foreignKeyName: "product_load_settings_product_id_fkey";
7704
+ columns: ["product_id"];
7705
+ isOneToOne: false;
7706
+ referencedRelation: "products";
7707
+ referencedColumns: ["id"];
7708
+ }];
7709
+ };
7710
+ product_merge_log: {
7711
+ Row: {
7712
+ canonical_product_id: string | null;
7713
+ id: string;
7714
+ merged_at: string;
7715
+ merged_from_id: string;
7716
+ notes: string | null;
7717
+ snapshot: import("../integrations/supabase/types").Json;
7718
+ source_table: string;
7719
+ status: string;
7720
+ };
7721
+ Insert: {
7722
+ canonical_product_id?: string | null;
7723
+ id?: string;
7724
+ merged_at?: string;
7725
+ merged_from_id: string;
7726
+ notes?: string | null;
7727
+ snapshot?: import("../integrations/supabase/types").Json;
7728
+ source_table: string;
7729
+ status?: string;
7730
+ };
7731
+ Update: {
7732
+ canonical_product_id?: string | null;
7733
+ id?: string;
7734
+ merged_at?: string;
7735
+ merged_from_id?: string;
7736
+ notes?: string | null;
7737
+ snapshot?: import("../integrations/supabase/types").Json;
7738
+ source_table?: string;
7739
+ status?: string;
7740
+ };
7333
7741
  Relationships: [];
7334
7742
  };
7335
7743
  products: {
7336
7744
  Row: {
7745
+ article_number: string | null;
7337
7746
  barcode: string | null;
7338
7747
  batch: string;
7339
7748
  crates_per_layer: number;
7340
7749
  created_at: string;
7341
7750
  custom_fields: import("../integrations/supabase/types").Json;
7751
+ floriday_active: boolean;
7752
+ floriday_payload: import("../integrations/supabase/types").Json;
7753
+ floriday_trade_item_id: string | null;
7342
7754
  id: string;
7343
7755
  image_url: string | null;
7344
7756
  incoming_quantity: number;
@@ -7357,11 +7769,15 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7357
7769
  weight: string | null;
7358
7770
  };
7359
7771
  Insert: {
7772
+ article_number?: string | null;
7360
7773
  barcode?: string | null;
7361
7774
  batch: string;
7362
7775
  crates_per_layer?: number;
7363
7776
  created_at?: string;
7364
7777
  custom_fields?: import("../integrations/supabase/types").Json;
7778
+ floriday_active?: boolean;
7779
+ floriday_payload?: import("../integrations/supabase/types").Json;
7780
+ floriday_trade_item_id?: string | null;
7365
7781
  id?: string;
7366
7782
  image_url?: string | null;
7367
7783
  incoming_quantity?: number;
@@ -7380,11 +7796,15 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7380
7796
  weight?: string | null;
7381
7797
  };
7382
7798
  Update: {
7799
+ article_number?: string | null;
7383
7800
  barcode?: string | null;
7384
7801
  batch?: string;
7385
7802
  crates_per_layer?: number;
7386
7803
  created_at?: string;
7387
7804
  custom_fields?: import("../integrations/supabase/types").Json;
7805
+ floriday_active?: boolean;
7806
+ floriday_payload?: import("../integrations/supabase/types").Json;
7807
+ floriday_trade_item_id?: string | null;
7388
7808
  id?: string;
7389
7809
  image_url?: string | null;
7390
7810
  incoming_quantity?: number;
@@ -8293,8 +8713,10 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
8293
8713
  order_id: string | null;
8294
8714
  order_item_id: string | null;
8295
8715
  order_source: string | null;
8716
+ parent_trade_item_key: string | null;
8296
8717
  physical_after: number | null;
8297
8718
  physical_before: number | null;
8719
+ production_batch_id: string | null;
8298
8720
  qty_delta: number;
8299
8721
  reason: string | null;
8300
8722
  reserved_after: number | null;
@@ -8310,8 +8732,10 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
8310
8732
  order_id?: string | null;
8311
8733
  order_item_id?: string | null;
8312
8734
  order_source?: string | null;
8735
+ parent_trade_item_key?: string | null;
8313
8736
  physical_after?: number | null;
8314
8737
  physical_before?: number | null;
8738
+ production_batch_id?: string | null;
8315
8739
  qty_delta: number;
8316
8740
  reason?: string | null;
8317
8741
  reserved_after?: number | null;
@@ -8327,8 +8751,10 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
8327
8751
  order_id?: string | null;
8328
8752
  order_item_id?: string | null;
8329
8753
  order_source?: string | null;
8754
+ parent_trade_item_key?: string | null;
8330
8755
  physical_after?: number | null;
8331
8756
  physical_before?: number | null;
8757
+ production_batch_id?: string | null;
8332
8758
  qty_delta?: number;
8333
8759
  reason?: string | null;
8334
8760
  reserved_after?: number | null;
@@ -8787,7 +9213,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
8787
9213
  twinfield_connections: {
8788
9214
  Row: {
8789
9215
  access_token: string | null;
8790
- client_id: string;
9216
+ client_id: string | null;
8791
9217
  client_secret: string | null;
8792
9218
  cluster_uri: string | null;
8793
9219
  company_code: string | null;
@@ -8799,7 +9225,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
8799
9225
  is_active: boolean;
8800
9226
  label: string | null;
8801
9227
  office_code: string | null;
8802
- redirect_uri: string;
9228
+ redirect_uri: string | null;
8803
9229
  refresh_token: string | null;
8804
9230
  token_expires_at: string | null;
8805
9231
  updated_at: string;
@@ -8807,7 +9233,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
8807
9233
  };
8808
9234
  Insert: {
8809
9235
  access_token?: string | null;
8810
- client_id: string;
9236
+ client_id?: string | null;
8811
9237
  client_secret?: string | null;
8812
9238
  cluster_uri?: string | null;
8813
9239
  company_code?: string | null;
@@ -8819,7 +9245,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
8819
9245
  is_active?: boolean;
8820
9246
  label?: string | null;
8821
9247
  office_code?: string | null;
8822
- redirect_uri: string;
9248
+ redirect_uri?: string | null;
8823
9249
  refresh_token?: string | null;
8824
9250
  token_expires_at?: string | null;
8825
9251
  updated_at?: string;
@@ -8827,7 +9253,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
8827
9253
  };
8828
9254
  Update: {
8829
9255
  access_token?: string | null;
8830
- client_id?: string;
9256
+ client_id?: string | null;
8831
9257
  client_secret?: string | null;
8832
9258
  cluster_uri?: string | null;
8833
9259
  company_code?: string | null;
@@ -8839,7 +9265,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
8839
9265
  is_active?: boolean;
8840
9266
  label?: string | null;
8841
9267
  office_code?: string | null;
8842
- redirect_uri?: string;
9268
+ redirect_uri?: string | null;
8843
9269
  refresh_token?: string | null;
8844
9270
  token_expires_at?: string | null;
8845
9271
  updated_at?: string;
@@ -10034,25 +10460,6 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10034
10460
  };
10035
10461
  Relationships: [];
10036
10462
  };
10037
- floriday_customer_discounts: {
10038
- Row: {
10039
- base_price: number | null;
10040
- buyer_organization_id: string | null;
10041
- currency: string | null;
10042
- discount_type: string | null;
10043
- discount_value: number | null;
10044
- min_quantity: number | null;
10045
- net_price: number | null;
10046
- product_group_id: string | null;
10047
- raw: import("../integrations/supabase/types").Json | null;
10048
- source: string | null;
10049
- source_id: string | null;
10050
- trade_item_id: string | null;
10051
- valid_from: string | null;
10052
- valid_until: string | null;
10053
- };
10054
- Relationships: [];
10055
- };
10056
10463
  local_customer_discounts: {
10057
10464
  Row: {
10058
10465
  base_price: number | null;
@@ -10356,6 +10763,13 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10356
10763
  };
10357
10764
  Returns: number;
10358
10765
  };
10766
+ _migrate_rewrite_stock_key: {
10767
+ Args: {
10768
+ _from_key: string;
10769
+ _to_key: string;
10770
+ };
10771
+ Returns: undefined;
10772
+ };
10359
10773
  afh_city_code: {
10360
10774
  Args: {
10361
10775
  _city: string;
@@ -10471,6 +10885,28 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10471
10885
  Args: never;
10472
10886
  Returns: undefined;
10473
10887
  };
10888
+ consume_bom_for_production: {
10889
+ Args: {
10890
+ p_connection_id: string;
10891
+ p_parent_id: string;
10892
+ p_parent_key: string;
10893
+ p_parent_kind: string;
10894
+ p_quantity: number;
10895
+ p_user_id: string;
10896
+ };
10897
+ Returns: import("../integrations/supabase/types").Json;
10898
+ } | {
10899
+ Args: {
10900
+ p_batch_id?: string;
10901
+ p_connection_id: string;
10902
+ p_parent_id: string;
10903
+ p_parent_key: string;
10904
+ p_parent_kind: string;
10905
+ p_quantity: number;
10906
+ p_user_id: string;
10907
+ };
10908
+ Returns: import("../integrations/supabase/types").Json;
10909
+ };
10474
10910
  consume_floriday_rate_limit: {
10475
10911
  Args: {
10476
10912
  p_bucket: string;
@@ -10522,6 +10958,13 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10522
10958
  table_name: string;
10523
10959
  }[];
10524
10960
  };
10961
+ delete_samenstelling: {
10962
+ Args: {
10963
+ p_parent_id: string;
10964
+ p_parent_kind: string;
10965
+ };
10966
+ Returns: import("../integrations/supabase/types").Json;
10967
+ };
10525
10968
  dispatch_carrier_signups_sql: {
10526
10969
  Args: {
10527
10970
  _catchup?: string;
@@ -10682,19 +11125,6 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10682
11125
  resource: string;
10683
11126
  }[];
10684
11127
  };
10685
- get_floriday_agreements_active: {
10686
- Args: {
10687
- p_on_date?: string;
10688
- };
10689
- Returns: {
10690
- buyer_organization_id: string;
10691
- data: import("../integrations/supabase/types").Json;
10692
- floriday_id: string;
10693
- status: string;
10694
- valid_from: string;
10695
- valid_until: string;
10696
- }[];
10697
- };
10698
11128
  get_floriday_clock_supplies_window: {
10699
11129
  Args: {
10700
11130
  p_from: string;
@@ -10767,6 +11197,21 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10767
11197
  minutes_since_success: number;
10768
11198
  }[];
10769
11199
  };
11200
+ get_group_allocation_keys: {
11201
+ Args: {
11202
+ p_product_id: string;
11203
+ };
11204
+ Returns: {
11205
+ k: string;
11206
+ ord: number;
11207
+ }[];
11208
+ };
11209
+ get_group_head_key: {
11210
+ Args: {
11211
+ p_group_id: string;
11212
+ };
11213
+ Returns: string;
11214
+ };
10770
11215
  get_offer_by_link_code: {
10771
11216
  Args: {
10772
11217
  p_code: string;
@@ -10877,6 +11322,25 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10877
11322
  };
10878
11323
  Returns: undefined;
10879
11324
  };
11325
+ mark_shipment_shipped: {
11326
+ Args: {
11327
+ p_shipment_id: string;
11328
+ };
11329
+ Returns: undefined;
11330
+ };
11331
+ merge_products: {
11332
+ Args: {
11333
+ _canonical: string;
11334
+ _loser: string;
11335
+ };
11336
+ Returns: undefined;
11337
+ };
11338
+ next_manufacture_partij: {
11339
+ Args: {
11340
+ _tenant_id: string;
11341
+ };
11342
+ Returns: string;
11343
+ };
10880
11344
  next_order_number: {
10881
11345
  Args: {
10882
11346
  p_prefix: string;
@@ -10955,6 +11419,14 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10955
11419
  };
10956
11420
  Returns: undefined;
10957
11421
  };
11422
+ produce_designed_product: {
11423
+ Args: {
11424
+ p_parent_id: string;
11425
+ p_parent_kind: string;
11426
+ p_quantity: number;
11427
+ };
11428
+ Returns: import("../integrations/supabase/types").Json;
11429
+ };
10958
11430
  promote_trade_item_key: {
10959
11431
  Args: {
10960
11432
  p_new: string;
@@ -10962,6 +11434,10 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10962
11434
  };
10963
11435
  Returns: undefined;
10964
11436
  };
11437
+ recompute_all_reserved_stock: {
11438
+ Args: never;
11439
+ Returns: undefined;
11440
+ };
10965
11441
  recompute_order_status: {
10966
11442
  Args: {
10967
11443
  p_order_id: string;
@@ -11011,27 +11487,45 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
11011
11487
  };
11012
11488
  Returns: undefined;
11013
11489
  };
11490
+ resolve_group_allocation: {
11491
+ Args: {
11492
+ _needed: number;
11493
+ _product_group_id: string;
11494
+ };
11495
+ Returns: {
11496
+ allocated: number;
11497
+ trade_item_id: string;
11498
+ }[];
11499
+ };
11500
+ resolve_group_member_stock_key: {
11501
+ Args: {
11502
+ p_trade_item_id: string;
11503
+ };
11504
+ Returns: string;
11505
+ };
11014
11506
  resolve_product_id_for_item: {
11015
11507
  Args: {
11016
11508
  p_product_name: string;
11017
11509
  };
11018
11510
  Returns: string;
11019
11511
  };
11020
- schedule_floriday_additional_services_sync: {
11512
+ resolve_stock_trade_item_key: {
11021
11513
  Args: {
11022
- p_apikey: string;
11023
- p_url: string;
11514
+ p_product_id: string;
11024
11515
  };
11025
- Returns: number;
11516
+ Returns: string;
11026
11517
  };
11027
- schedule_floriday_agreement_calloffs_sync: {
11518
+ reverse_production: {
11028
11519
  Args: {
11029
- p_apikey: string;
11030
- p_url: string;
11520
+ p_connection_id?: string;
11521
+ p_parent_key: string;
11522
+ p_quantity: number;
11523
+ p_reason?: string;
11524
+ p_user_id?: string;
11031
11525
  };
11032
- Returns: number;
11526
+ Returns: import("../integrations/supabase/types").Json;
11033
11527
  };
11034
- schedule_floriday_agreements_sync: {
11528
+ schedule_floriday_additional_services_sync: {
11035
11529
  Args: {
11036
11530
  p_apikey: string;
11037
11531
  p_url: string;
@@ -11597,6 +12091,165 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
11597
12091
  };
11598
12092
  Relationships: [];
11599
12093
  };
12094
+ ai_credentials: {
12095
+ Row: {
12096
+ active: boolean;
12097
+ api_key: string;
12098
+ created_at: string;
12099
+ created_by: string | null;
12100
+ id: string;
12101
+ label: string;
12102
+ provider_id: string;
12103
+ updated_at: string;
12104
+ };
12105
+ Insert: {
12106
+ active?: boolean;
12107
+ api_key: string;
12108
+ created_at?: string;
12109
+ created_by?: string | null;
12110
+ id?: string;
12111
+ label: string;
12112
+ provider_id: string;
12113
+ updated_at?: string;
12114
+ };
12115
+ Update: {
12116
+ active?: boolean;
12117
+ api_key?: string;
12118
+ created_at?: string;
12119
+ created_by?: string | null;
12120
+ id?: string;
12121
+ label?: string;
12122
+ provider_id?: string;
12123
+ updated_at?: string;
12124
+ };
12125
+ Relationships: [{
12126
+ foreignKeyName: "ai_credentials_provider_id_fkey";
12127
+ columns: ["provider_id"];
12128
+ isOneToOne: false;
12129
+ referencedRelation: "ai_providers";
12130
+ referencedColumns: ["id"];
12131
+ }];
12132
+ };
12133
+ ai_models: {
12134
+ Row: {
12135
+ active: boolean;
12136
+ context_window: number | null;
12137
+ created_at: string;
12138
+ display_name: string;
12139
+ id: string;
12140
+ is_default: boolean;
12141
+ modality: string;
12142
+ provider_id: string;
12143
+ slug: string;
12144
+ updated_at: string;
12145
+ };
12146
+ Insert: {
12147
+ active?: boolean;
12148
+ context_window?: number | null;
12149
+ created_at?: string;
12150
+ display_name: string;
12151
+ id?: string;
12152
+ is_default?: boolean;
12153
+ modality?: string;
12154
+ provider_id: string;
12155
+ slug: string;
12156
+ updated_at?: string;
12157
+ };
12158
+ Update: {
12159
+ active?: boolean;
12160
+ context_window?: number | null;
12161
+ created_at?: string;
12162
+ display_name?: string;
12163
+ id?: string;
12164
+ is_default?: boolean;
12165
+ modality?: string;
12166
+ provider_id?: string;
12167
+ slug?: string;
12168
+ updated_at?: string;
12169
+ };
12170
+ Relationships: [{
12171
+ foreignKeyName: "ai_models_provider_id_fkey";
12172
+ columns: ["provider_id"];
12173
+ isOneToOne: false;
12174
+ referencedRelation: "ai_providers";
12175
+ referencedColumns: ["id"];
12176
+ }];
12177
+ };
12178
+ ai_module_bindings: {
12179
+ Row: {
12180
+ consumer_module_id: string;
12181
+ created_at: string;
12182
+ credential_id: string;
12183
+ id: string;
12184
+ model_id: string;
12185
+ notes: string | null;
12186
+ updated_at: string;
12187
+ };
12188
+ Insert: {
12189
+ consumer_module_id: string;
12190
+ created_at?: string;
12191
+ credential_id: string;
12192
+ id?: string;
12193
+ model_id: string;
12194
+ notes?: string | null;
12195
+ updated_at?: string;
12196
+ };
12197
+ Update: {
12198
+ consumer_module_id?: string;
12199
+ created_at?: string;
12200
+ credential_id?: string;
12201
+ id?: string;
12202
+ model_id?: string;
12203
+ notes?: string | null;
12204
+ updated_at?: string;
12205
+ };
12206
+ Relationships: [{
12207
+ foreignKeyName: "ai_module_bindings_credential_id_fkey";
12208
+ columns: ["credential_id"];
12209
+ isOneToOne: false;
12210
+ referencedRelation: "ai_credentials";
12211
+ referencedColumns: ["id"];
12212
+ }, {
12213
+ foreignKeyName: "ai_module_bindings_model_id_fkey";
12214
+ columns: ["model_id"];
12215
+ isOneToOne: false;
12216
+ referencedRelation: "ai_models";
12217
+ referencedColumns: ["id"];
12218
+ }];
12219
+ };
12220
+ ai_providers: {
12221
+ Row: {
12222
+ active: boolean;
12223
+ auth_type: string;
12224
+ base_url: string | null;
12225
+ created_at: string;
12226
+ id: string;
12227
+ name: string;
12228
+ slug: string;
12229
+ updated_at: string;
12230
+ };
12231
+ Insert: {
12232
+ active?: boolean;
12233
+ auth_type?: string;
12234
+ base_url?: string | null;
12235
+ created_at?: string;
12236
+ id?: string;
12237
+ name: string;
12238
+ slug: string;
12239
+ updated_at?: string;
12240
+ };
12241
+ Update: {
12242
+ active?: boolean;
12243
+ auth_type?: string;
12244
+ base_url?: string | null;
12245
+ created_at?: string;
12246
+ id?: string;
12247
+ name?: string;
12248
+ slug?: string;
12249
+ updated_at?: string;
12250
+ };
12251
+ Relationships: [];
12252
+ };
11600
12253
  app_settings: {
11601
12254
  Row: {
11602
12255
  created_at: string;
@@ -14603,105 +15256,6 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
14603
15256
  referencedColumns: ["id"];
14604
15257
  }];
14605
15258
  };
14606
- floriday_agreement_calloffs_cache: {
14607
- Row: {
14608
- agreement_id: string | null;
14609
- connection_id: string;
14610
- data: import("../integrations/supabase/types").Json;
14611
- delivery_date: string | null;
14612
- fetched_at: string;
14613
- floriday_id: string;
14614
- id: string;
14615
- is_deleted: boolean;
14616
- sequence_number: number;
14617
- status: string | null;
14618
- updated_at: string;
14619
- };
14620
- Insert: {
14621
- agreement_id?: string | null;
14622
- connection_id: string;
14623
- data?: import("../integrations/supabase/types").Json;
14624
- delivery_date?: string | null;
14625
- fetched_at?: string;
14626
- floriday_id: string;
14627
- id?: string;
14628
- is_deleted?: boolean;
14629
- sequence_number?: number;
14630
- status?: string | null;
14631
- updated_at?: string;
14632
- };
14633
- Update: {
14634
- agreement_id?: string | null;
14635
- connection_id?: string;
14636
- data?: import("../integrations/supabase/types").Json;
14637
- delivery_date?: string | null;
14638
- fetched_at?: string;
14639
- floriday_id?: string;
14640
- id?: string;
14641
- is_deleted?: boolean;
14642
- sequence_number?: number;
14643
- status?: string | null;
14644
- updated_at?: string;
14645
- };
14646
- Relationships: [{
14647
- foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
14648
- columns: ["connection_id"];
14649
- isOneToOne: false;
14650
- referencedRelation: "floriday_connections";
14651
- referencedColumns: ["id"];
14652
- }];
14653
- };
14654
- floriday_agreements_cache: {
14655
- Row: {
14656
- buyer_organization_id: string | null;
14657
- connection_id: string;
14658
- data: import("../integrations/supabase/types").Json;
14659
- fetched_at: string;
14660
- floriday_id: string;
14661
- id: string;
14662
- is_deleted: boolean;
14663
- sequence_number: number;
14664
- status: string | null;
14665
- updated_at: string;
14666
- valid_from: string | null;
14667
- valid_until: string | null;
14668
- };
14669
- Insert: {
14670
- buyer_organization_id?: string | null;
14671
- connection_id: string;
14672
- data?: import("../integrations/supabase/types").Json;
14673
- fetched_at?: string;
14674
- floriday_id: string;
14675
- id?: string;
14676
- is_deleted?: boolean;
14677
- sequence_number?: number;
14678
- status?: string | null;
14679
- updated_at?: string;
14680
- valid_from?: string | null;
14681
- valid_until?: string | null;
14682
- };
14683
- Update: {
14684
- buyer_organization_id?: string | null;
14685
- connection_id?: string;
14686
- data?: import("../integrations/supabase/types").Json;
14687
- fetched_at?: string;
14688
- floriday_id?: string;
14689
- id?: string;
14690
- is_deleted?: boolean;
14691
- sequence_number?: number;
14692
- status?: string | null;
14693
- updated_at?: string;
14694
- valid_from?: string | null;
14695
- valid_until?: string | null;
14696
- };
14697
- Relationships: [{
14698
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
14699
- columns: ["connection_id"];
14700
- isOneToOne: false;
14701
- referencedRelation: "floriday_connections";
14702
- referencedColumns: ["id"];
14703
- }];
14704
- };
14705
15259
  floriday_auction_letters_cache: {
14706
15260
  Row: {
14707
15261
  auction_letter_code: string;
@@ -15200,6 +15754,27 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
15200
15754
  referencedColumns: ["id"];
15201
15755
  }];
15202
15756
  };
15757
+ floriday_continuous_stock_cache: {
15758
+ Row: {
15759
+ connection_id: string;
15760
+ fetched_at: string;
15761
+ number_of_pieces: number;
15762
+ trade_item_id: string;
15763
+ };
15764
+ Insert: {
15765
+ connection_id: string;
15766
+ fetched_at?: string;
15767
+ number_of_pieces?: number;
15768
+ trade_item_id: string;
15769
+ };
15770
+ Update: {
15771
+ connection_id?: string;
15772
+ fetched_at?: string;
15773
+ number_of_pieces?: number;
15774
+ trade_item_id?: string;
15775
+ };
15776
+ Relationships: [];
15777
+ };
15203
15778
  floriday_continuous_stock_queue: {
15204
15779
  Row: {
15205
15780
  attempts: number;
@@ -16178,6 +16753,45 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
16178
16753
  referencedColumns: ["id"];
16179
16754
  }];
16180
16755
  };
16756
+ floriday_trade_settings_customers_cache: {
16757
+ Row: {
16758
+ connection_id: string;
16759
+ data: import("../integrations/supabase/types").Json;
16760
+ fetched_at: string;
16761
+ floriday_id: string;
16762
+ id: string;
16763
+ is_deleted: boolean;
16764
+ sequence_number: number;
16765
+ updated_at: string;
16766
+ };
16767
+ Insert: {
16768
+ connection_id: string;
16769
+ data: import("../integrations/supabase/types").Json;
16770
+ fetched_at?: string;
16771
+ floriday_id: string;
16772
+ id?: string;
16773
+ is_deleted?: boolean;
16774
+ sequence_number?: number;
16775
+ updated_at?: string;
16776
+ };
16777
+ Update: {
16778
+ connection_id?: string;
16779
+ data?: import("../integrations/supabase/types").Json;
16780
+ fetched_at?: string;
16781
+ floriday_id?: string;
16782
+ id?: string;
16783
+ is_deleted?: boolean;
16784
+ sequence_number?: number;
16785
+ updated_at?: string;
16786
+ };
16787
+ Relationships: [{
16788
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
16789
+ columns: ["connection_id"];
16790
+ isOneToOne: false;
16791
+ referencedRelation: "floriday_connections";
16792
+ referencedColumns: ["id"];
16793
+ }];
16794
+ };
16181
16795
  floriday_trips_cache: {
16182
16796
  Row: {
16183
16797
  carrier_organization_id: string | null;
@@ -17323,39 +17937,60 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17323
17937
  };
17324
17938
  manufacture_products: {
17325
17939
  Row: {
17940
+ aantal_te_produceren: number;
17326
17941
  created_at: string;
17327
17942
  description: string | null;
17328
17943
  id: string;
17329
17944
  is_active: boolean;
17945
+ location_id: string | null;
17330
17946
  name: string;
17947
+ partij_nummer: string | null;
17948
+ photos: import("../integrations/supabase/types").Json;
17331
17949
  produced_stock: number;
17332
17950
  product_code: string;
17333
17951
  tenant_id: string;
17952
+ unit: string;
17334
17953
  updated_at: string;
17335
17954
  };
17336
17955
  Insert: {
17956
+ aantal_te_produceren?: number;
17337
17957
  created_at?: string;
17338
17958
  description?: string | null;
17339
17959
  id?: string;
17340
17960
  is_active?: boolean;
17961
+ location_id?: string | null;
17341
17962
  name: string;
17963
+ partij_nummer?: string | null;
17964
+ photos?: import("../integrations/supabase/types").Json;
17342
17965
  produced_stock?: number;
17343
17966
  product_code: string;
17344
17967
  tenant_id: string;
17968
+ unit?: string;
17345
17969
  updated_at?: string;
17346
17970
  };
17347
17971
  Update: {
17972
+ aantal_te_produceren?: number;
17348
17973
  created_at?: string;
17349
17974
  description?: string | null;
17350
17975
  id?: string;
17351
17976
  is_active?: boolean;
17977
+ location_id?: string | null;
17352
17978
  name?: string;
17979
+ partij_nummer?: string | null;
17980
+ photos?: import("../integrations/supabase/types").Json;
17353
17981
  produced_stock?: number;
17354
17982
  product_code?: string;
17355
17983
  tenant_id?: string;
17984
+ unit?: string;
17356
17985
  updated_at?: string;
17357
17986
  };
17358
- Relationships: [];
17987
+ Relationships: [{
17988
+ foreignKeyName: "manufacture_products_location_id_fkey";
17989
+ columns: ["location_id"];
17990
+ isOneToOne: false;
17991
+ referencedRelation: "locations";
17992
+ referencedColumns: ["id"];
17993
+ }];
17359
17994
  };
17360
17995
  monteurs: {
17361
17996
  Row: {
@@ -18329,6 +18964,105 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18329
18964
  };
18330
18965
  Relationships: [];
18331
18966
  };
18967
+ order_shipment_items: {
18968
+ Row: {
18969
+ created_at: string;
18970
+ id: string;
18971
+ order_item_id: string;
18972
+ product_id: string | null;
18973
+ product_name: string;
18974
+ quantity: number;
18975
+ shipment_id: string;
18976
+ updated_at: string;
18977
+ };
18978
+ Insert: {
18979
+ created_at?: string;
18980
+ id?: string;
18981
+ order_item_id: string;
18982
+ product_id?: string | null;
18983
+ product_name: string;
18984
+ quantity: number;
18985
+ shipment_id: string;
18986
+ updated_at?: string;
18987
+ };
18988
+ Update: {
18989
+ created_at?: string;
18990
+ id?: string;
18991
+ order_item_id?: string;
18992
+ product_id?: string | null;
18993
+ product_name?: string;
18994
+ quantity?: number;
18995
+ shipment_id?: string;
18996
+ updated_at?: string;
18997
+ };
18998
+ Relationships: [{
18999
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
19000
+ columns: ["order_item_id"];
19001
+ isOneToOne: false;
19002
+ referencedRelation: "order_items";
19003
+ referencedColumns: ["id"];
19004
+ }, {
19005
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
19006
+ columns: ["shipment_id"];
19007
+ isOneToOne: false;
19008
+ referencedRelation: "order_shipments";
19009
+ referencedColumns: ["id"];
19010
+ }];
19011
+ };
19012
+ order_shipments: {
19013
+ Row: {
19014
+ carrier_id: string | null;
19015
+ created_at: string;
19016
+ delivery_date: string | null;
19017
+ delivery_location_id: string | null;
19018
+ id: string;
19019
+ notes: string | null;
19020
+ order_id: string;
19021
+ shipment_number: number;
19022
+ shipped_at: string | null;
19023
+ status: string;
19024
+ updated_at: string;
19025
+ };
19026
+ Insert: {
19027
+ carrier_id?: string | null;
19028
+ created_at?: string;
19029
+ delivery_date?: string | null;
19030
+ delivery_location_id?: string | null;
19031
+ id?: string;
19032
+ notes?: string | null;
19033
+ order_id: string;
19034
+ shipment_number: number;
19035
+ shipped_at?: string | null;
19036
+ status?: string;
19037
+ updated_at?: string;
19038
+ };
19039
+ Update: {
19040
+ carrier_id?: string | null;
19041
+ created_at?: string;
19042
+ delivery_date?: string | null;
19043
+ delivery_location_id?: string | null;
19044
+ id?: string;
19045
+ notes?: string | null;
19046
+ order_id?: string;
19047
+ shipment_number?: number;
19048
+ shipped_at?: string | null;
19049
+ status?: string;
19050
+ updated_at?: string;
19051
+ };
19052
+ Relationships: [{
19053
+ foreignKeyName: "order_shipments_carrier_id_fkey";
19054
+ columns: ["carrier_id"];
19055
+ isOneToOne: false;
19056
+ referencedRelation: "carriers";
19057
+ referencedColumns: ["id"];
19058
+ }, {
19059
+ foreignKeyName: "order_shipments_order_id_fkey";
19060
+ columns: ["order_id"];
19061
+ isOneToOne: false;
19062
+ referencedRelation: "orders";
19063
+ referencedColumns: ["id"];
19064
+ }];
19065
+ };
18332
19066
  orders: {
18333
19067
  Row: {
18334
19068
  created_at: string;
@@ -18336,8 +19070,9 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18336
19070
  customer_id: string | null;
18337
19071
  customer_name: string;
18338
19072
  deleted_at: string | null;
18339
- delivery_date: string;
19073
+ delivery_date: string | null;
18340
19074
  id: string;
19075
+ is_reservation: boolean;
18341
19076
  notes: string | null;
18342
19077
  order_date: string;
18343
19078
  order_number: string;
@@ -18354,8 +19089,9 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18354
19089
  customer_id?: string | null;
18355
19090
  customer_name?: string;
18356
19091
  deleted_at?: string | null;
18357
- delivery_date: string;
19092
+ delivery_date?: string | null;
18358
19093
  id?: string;
19094
+ is_reservation?: boolean;
18359
19095
  notes?: string | null;
18360
19096
  order_date?: string;
18361
19097
  order_number: string;
@@ -18372,8 +19108,9 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18372
19108
  customer_id?: string | null;
18373
19109
  customer_name?: string;
18374
19110
  deleted_at?: string | null;
18375
- delivery_date?: string;
19111
+ delivery_date?: string | null;
18376
19112
  id?: string;
19113
+ is_reservation?: boolean;
18377
19114
  notes?: string | null;
18378
19115
  order_date?: string;
18379
19116
  order_number?: string;
@@ -18515,6 +19252,63 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18515
19252
  };
18516
19253
  Relationships: [];
18517
19254
  };
19255
+ product_bom_items: {
19256
+ Row: {
19257
+ component_product_id: string | null;
19258
+ component_trade_item_floriday_id: string | null;
19259
+ created_at: string;
19260
+ id: string;
19261
+ notes: string | null;
19262
+ parent_product_id: string | null;
19263
+ parent_trade_item_floriday_id: string | null;
19264
+ quantity: number;
19265
+ sort_order: number;
19266
+ tenant_id: string;
19267
+ unit: string;
19268
+ updated_at: string;
19269
+ };
19270
+ Insert: {
19271
+ component_product_id?: string | null;
19272
+ component_trade_item_floriday_id?: string | null;
19273
+ created_at?: string;
19274
+ id?: string;
19275
+ notes?: string | null;
19276
+ parent_product_id?: string | null;
19277
+ parent_trade_item_floriday_id?: string | null;
19278
+ quantity?: number;
19279
+ sort_order?: number;
19280
+ tenant_id: string;
19281
+ unit?: string;
19282
+ updated_at?: string;
19283
+ };
19284
+ Update: {
19285
+ component_product_id?: string | null;
19286
+ component_trade_item_floriday_id?: string | null;
19287
+ created_at?: string;
19288
+ id?: string;
19289
+ notes?: string | null;
19290
+ parent_product_id?: string | null;
19291
+ parent_trade_item_floriday_id?: string | null;
19292
+ quantity?: number;
19293
+ sort_order?: number;
19294
+ tenant_id?: string;
19295
+ unit?: string;
19296
+ updated_at?: string;
19297
+ };
19298
+ Relationships: [{
19299
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
19300
+ columns: ["component_product_id"];
19301
+ isOneToOne: false;
19302
+ referencedRelation: "products";
19303
+ referencedColumns: ["id"];
19304
+ }, {
19305
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
19306
+ columns: ["parent_product_id"];
19307
+ isOneToOne: false;
19308
+ referencedRelation: "products";
19309
+ referencedColumns: ["id"];
19310
+ }];
19311
+ };
18518
19312
  product_categories: {
18519
19313
  Row: {
18520
19314
  color: string;
@@ -18620,6 +19414,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18620
19414
  id: string;
18621
19415
  product_group_id: string;
18622
19416
  quantity: number;
19417
+ sort_order: number;
18623
19418
  trade_item_id: string;
18624
19419
  };
18625
19420
  Insert: {
@@ -18627,6 +19422,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18627
19422
  id?: string;
18628
19423
  product_group_id: string;
18629
19424
  quantity?: number;
19425
+ sort_order?: number;
18630
19426
  trade_item_id: string;
18631
19427
  };
18632
19428
  Update: {
@@ -18634,6 +19430,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18634
19430
  id?: string;
18635
19431
  product_group_id?: string;
18636
19432
  quantity?: number;
19433
+ sort_order?: number;
18637
19434
  trade_item_id?: string;
18638
19435
  };
18639
19436
  Relationships: [{
@@ -18648,6 +19445,8 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18648
19445
  Row: {
18649
19446
  created_at: string;
18650
19447
  description: string | null;
19448
+ head_product_id: string | null;
19449
+ head_trade_item_floriday_id: string | null;
18651
19450
  id: string;
18652
19451
  is_active: boolean;
18653
19452
  name: string;
@@ -18657,6 +19456,8 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18657
19456
  Insert: {
18658
19457
  created_at?: string;
18659
19458
  description?: string | null;
19459
+ head_product_id?: string | null;
19460
+ head_trade_item_floriday_id?: string | null;
18660
19461
  id?: string;
18661
19462
  is_active?: boolean;
18662
19463
  name: string;
@@ -18666,21 +19467,126 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18666
19467
  Update: {
18667
19468
  created_at?: string;
18668
19469
  description?: string | null;
19470
+ head_product_id?: string | null;
19471
+ head_trade_item_floriday_id?: string | null;
18669
19472
  id?: string;
18670
19473
  is_active?: boolean;
18671
19474
  name?: string;
18672
19475
  tenant_id?: string;
18673
19476
  updated_at?: string;
18674
19477
  };
19478
+ Relationships: [{
19479
+ foreignKeyName: "product_groups_head_product_id_fkey";
19480
+ columns: ["head_product_id"];
19481
+ isOneToOne: false;
19482
+ referencedRelation: "products";
19483
+ referencedColumns: ["id"];
19484
+ }];
19485
+ };
19486
+ product_load_settings: {
19487
+ Row: {
19488
+ created_at: string;
19489
+ id: string;
19490
+ is_package: boolean;
19491
+ layers_per_load_carrier: number | null;
19492
+ load_carrier: string | null;
19493
+ package_id: string | null;
19494
+ package_label: string | null;
19495
+ packages_per_layer: number | null;
19496
+ product_id: string | null;
19497
+ tenant_id: string;
19498
+ trade_item_floriday_id: string | null;
19499
+ units_per_package: number | null;
19500
+ updated_at: string;
19501
+ };
19502
+ Insert: {
19503
+ created_at?: string;
19504
+ id?: string;
19505
+ is_package?: boolean;
19506
+ layers_per_load_carrier?: number | null;
19507
+ load_carrier?: string | null;
19508
+ package_id?: string | null;
19509
+ package_label?: string | null;
19510
+ packages_per_layer?: number | null;
19511
+ product_id?: string | null;
19512
+ tenant_id: string;
19513
+ trade_item_floriday_id?: string | null;
19514
+ units_per_package?: number | null;
19515
+ updated_at?: string;
19516
+ };
19517
+ Update: {
19518
+ created_at?: string;
19519
+ id?: string;
19520
+ is_package?: boolean;
19521
+ layers_per_load_carrier?: number | null;
19522
+ load_carrier?: string | null;
19523
+ package_id?: string | null;
19524
+ package_label?: string | null;
19525
+ packages_per_layer?: number | null;
19526
+ product_id?: string | null;
19527
+ tenant_id?: string;
19528
+ trade_item_floriday_id?: string | null;
19529
+ units_per_package?: number | null;
19530
+ updated_at?: string;
19531
+ };
19532
+ Relationships: [{
19533
+ foreignKeyName: "product_load_settings_package_id_fkey";
19534
+ columns: ["package_id"];
19535
+ isOneToOne: false;
19536
+ referencedRelation: "packages";
19537
+ referencedColumns: ["id"];
19538
+ }, {
19539
+ foreignKeyName: "product_load_settings_product_id_fkey";
19540
+ columns: ["product_id"];
19541
+ isOneToOne: false;
19542
+ referencedRelation: "products";
19543
+ referencedColumns: ["id"];
19544
+ }];
19545
+ };
19546
+ product_merge_log: {
19547
+ Row: {
19548
+ canonical_product_id: string | null;
19549
+ id: string;
19550
+ merged_at: string;
19551
+ merged_from_id: string;
19552
+ notes: string | null;
19553
+ snapshot: import("../integrations/supabase/types").Json;
19554
+ source_table: string;
19555
+ status: string;
19556
+ };
19557
+ Insert: {
19558
+ canonical_product_id?: string | null;
19559
+ id?: string;
19560
+ merged_at?: string;
19561
+ merged_from_id: string;
19562
+ notes?: string | null;
19563
+ snapshot?: import("../integrations/supabase/types").Json;
19564
+ source_table: string;
19565
+ status?: string;
19566
+ };
19567
+ Update: {
19568
+ canonical_product_id?: string | null;
19569
+ id?: string;
19570
+ merged_at?: string;
19571
+ merged_from_id?: string;
19572
+ notes?: string | null;
19573
+ snapshot?: import("../integrations/supabase/types").Json;
19574
+ source_table?: string;
19575
+ status?: string;
19576
+ };
18675
19577
  Relationships: [];
18676
19578
  };
18677
19579
  products: {
18678
19580
  Row: {
19581
+ article_number: string | null;
18679
19582
  barcode: string | null;
18680
19583
  batch: string;
18681
19584
  crates_per_layer: number;
18682
19585
  created_at: string;
18683
19586
  custom_fields: import("../integrations/supabase/types").Json;
19587
+ floriday_active: boolean;
19588
+ floriday_payload: import("../integrations/supabase/types").Json;
19589
+ floriday_trade_item_id: string | null;
18684
19590
  id: string;
18685
19591
  image_url: string | null;
18686
19592
  incoming_quantity: number;
@@ -18699,11 +19605,15 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18699
19605
  weight: string | null;
18700
19606
  };
18701
19607
  Insert: {
19608
+ article_number?: string | null;
18702
19609
  barcode?: string | null;
18703
19610
  batch: string;
18704
19611
  crates_per_layer?: number;
18705
19612
  created_at?: string;
18706
19613
  custom_fields?: import("../integrations/supabase/types").Json;
19614
+ floriday_active?: boolean;
19615
+ floriday_payload?: import("../integrations/supabase/types").Json;
19616
+ floriday_trade_item_id?: string | null;
18707
19617
  id?: string;
18708
19618
  image_url?: string | null;
18709
19619
  incoming_quantity?: number;
@@ -18722,11 +19632,15 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18722
19632
  weight?: string | null;
18723
19633
  };
18724
19634
  Update: {
19635
+ article_number?: string | null;
18725
19636
  barcode?: string | null;
18726
19637
  batch?: string;
18727
19638
  crates_per_layer?: number;
18728
19639
  created_at?: string;
18729
19640
  custom_fields?: import("../integrations/supabase/types").Json;
19641
+ floriday_active?: boolean;
19642
+ floriday_payload?: import("../integrations/supabase/types").Json;
19643
+ floriday_trade_item_id?: string | null;
18730
19644
  id?: string;
18731
19645
  image_url?: string | null;
18732
19646
  incoming_quantity?: number;
@@ -19635,8 +20549,10 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
19635
20549
  order_id: string | null;
19636
20550
  order_item_id: string | null;
19637
20551
  order_source: string | null;
20552
+ parent_trade_item_key: string | null;
19638
20553
  physical_after: number | null;
19639
20554
  physical_before: number | null;
20555
+ production_batch_id: string | null;
19640
20556
  qty_delta: number;
19641
20557
  reason: string | null;
19642
20558
  reserved_after: number | null;
@@ -19652,8 +20568,10 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
19652
20568
  order_id?: string | null;
19653
20569
  order_item_id?: string | null;
19654
20570
  order_source?: string | null;
20571
+ parent_trade_item_key?: string | null;
19655
20572
  physical_after?: number | null;
19656
20573
  physical_before?: number | null;
20574
+ production_batch_id?: string | null;
19657
20575
  qty_delta: number;
19658
20576
  reason?: string | null;
19659
20577
  reserved_after?: number | null;
@@ -19669,8 +20587,10 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
19669
20587
  order_id?: string | null;
19670
20588
  order_item_id?: string | null;
19671
20589
  order_source?: string | null;
20590
+ parent_trade_item_key?: string | null;
19672
20591
  physical_after?: number | null;
19673
20592
  physical_before?: number | null;
20593
+ production_batch_id?: string | null;
19674
20594
  qty_delta?: number;
19675
20595
  reason?: string | null;
19676
20596
  reserved_after?: number | null;
@@ -20129,7 +21049,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
20129
21049
  twinfield_connections: {
20130
21050
  Row: {
20131
21051
  access_token: string | null;
20132
- client_id: string;
21052
+ client_id: string | null;
20133
21053
  client_secret: string | null;
20134
21054
  cluster_uri: string | null;
20135
21055
  company_code: string | null;
@@ -20141,7 +21061,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
20141
21061
  is_active: boolean;
20142
21062
  label: string | null;
20143
21063
  office_code: string | null;
20144
- redirect_uri: string;
21064
+ redirect_uri: string | null;
20145
21065
  refresh_token: string | null;
20146
21066
  token_expires_at: string | null;
20147
21067
  updated_at: string;
@@ -20149,7 +21069,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
20149
21069
  };
20150
21070
  Insert: {
20151
21071
  access_token?: string | null;
20152
- client_id: string;
21072
+ client_id?: string | null;
20153
21073
  client_secret?: string | null;
20154
21074
  cluster_uri?: string | null;
20155
21075
  company_code?: string | null;
@@ -20161,7 +21081,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
20161
21081
  is_active?: boolean;
20162
21082
  label?: string | null;
20163
21083
  office_code?: string | null;
20164
- redirect_uri: string;
21084
+ redirect_uri?: string | null;
20165
21085
  refresh_token?: string | null;
20166
21086
  token_expires_at?: string | null;
20167
21087
  updated_at?: string;
@@ -20169,7 +21089,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
20169
21089
  };
20170
21090
  Update: {
20171
21091
  access_token?: string | null;
20172
- client_id?: string;
21092
+ client_id?: string | null;
20173
21093
  client_secret?: string | null;
20174
21094
  cluster_uri?: string | null;
20175
21095
  company_code?: string | null;
@@ -20181,7 +21101,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
20181
21101
  is_active?: boolean;
20182
21102
  label?: string | null;
20183
21103
  office_code?: string | null;
20184
- redirect_uri?: string;
21104
+ redirect_uri?: string | null;
20185
21105
  refresh_token?: string | null;
20186
21106
  token_expires_at?: string | null;
20187
21107
  updated_at?: string;
@@ -21376,25 +22296,6 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21376
22296
  };
21377
22297
  Relationships: [];
21378
22298
  };
21379
- floriday_customer_discounts: {
21380
- Row: {
21381
- base_price: number | null;
21382
- buyer_organization_id: string | null;
21383
- currency: string | null;
21384
- discount_type: string | null;
21385
- discount_value: number | null;
21386
- min_quantity: number | null;
21387
- net_price: number | null;
21388
- product_group_id: string | null;
21389
- raw: import("../integrations/supabase/types").Json | null;
21390
- source: string | null;
21391
- source_id: string | null;
21392
- trade_item_id: string | null;
21393
- valid_from: string | null;
21394
- valid_until: string | null;
21395
- };
21396
- Relationships: [];
21397
- };
21398
22299
  local_customer_discounts: {
21399
22300
  Row: {
21400
22301
  base_price: number | null;
@@ -21698,6 +22599,13 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21698
22599
  };
21699
22600
  Returns: number;
21700
22601
  };
22602
+ _migrate_rewrite_stock_key: {
22603
+ Args: {
22604
+ _from_key: string;
22605
+ _to_key: string;
22606
+ };
22607
+ Returns: undefined;
22608
+ };
21701
22609
  afh_city_code: {
21702
22610
  Args: {
21703
22611
  _city: string;
@@ -21813,6 +22721,28 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21813
22721
  Args: never;
21814
22722
  Returns: undefined;
21815
22723
  };
22724
+ consume_bom_for_production: {
22725
+ Args: {
22726
+ p_connection_id: string;
22727
+ p_parent_id: string;
22728
+ p_parent_key: string;
22729
+ p_parent_kind: string;
22730
+ p_quantity: number;
22731
+ p_user_id: string;
22732
+ };
22733
+ Returns: import("../integrations/supabase/types").Json;
22734
+ } | {
22735
+ Args: {
22736
+ p_batch_id?: string;
22737
+ p_connection_id: string;
22738
+ p_parent_id: string;
22739
+ p_parent_key: string;
22740
+ p_parent_kind: string;
22741
+ p_quantity: number;
22742
+ p_user_id: string;
22743
+ };
22744
+ Returns: import("../integrations/supabase/types").Json;
22745
+ };
21816
22746
  consume_floriday_rate_limit: {
21817
22747
  Args: {
21818
22748
  p_bucket: string;
@@ -21864,6 +22794,13 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21864
22794
  table_name: string;
21865
22795
  }[];
21866
22796
  };
22797
+ delete_samenstelling: {
22798
+ Args: {
22799
+ p_parent_id: string;
22800
+ p_parent_kind: string;
22801
+ };
22802
+ Returns: import("../integrations/supabase/types").Json;
22803
+ };
21867
22804
  dispatch_carrier_signups_sql: {
21868
22805
  Args: {
21869
22806
  _catchup?: string;
@@ -22024,19 +22961,6 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
22024
22961
  resource: string;
22025
22962
  }[];
22026
22963
  };
22027
- get_floriday_agreements_active: {
22028
- Args: {
22029
- p_on_date?: string;
22030
- };
22031
- Returns: {
22032
- buyer_organization_id: string;
22033
- data: import("../integrations/supabase/types").Json;
22034
- floriday_id: string;
22035
- status: string;
22036
- valid_from: string;
22037
- valid_until: string;
22038
- }[];
22039
- };
22040
22964
  get_floriday_clock_supplies_window: {
22041
22965
  Args: {
22042
22966
  p_from: string;
@@ -22109,6 +23033,21 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
22109
23033
  minutes_since_success: number;
22110
23034
  }[];
22111
23035
  };
23036
+ get_group_allocation_keys: {
23037
+ Args: {
23038
+ p_product_id: string;
23039
+ };
23040
+ Returns: {
23041
+ k: string;
23042
+ ord: number;
23043
+ }[];
23044
+ };
23045
+ get_group_head_key: {
23046
+ Args: {
23047
+ p_group_id: string;
23048
+ };
23049
+ Returns: string;
23050
+ };
22112
23051
  get_offer_by_link_code: {
22113
23052
  Args: {
22114
23053
  p_code: string;
@@ -22219,6 +23158,25 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
22219
23158
  };
22220
23159
  Returns: undefined;
22221
23160
  };
23161
+ mark_shipment_shipped: {
23162
+ Args: {
23163
+ p_shipment_id: string;
23164
+ };
23165
+ Returns: undefined;
23166
+ };
23167
+ merge_products: {
23168
+ Args: {
23169
+ _canonical: string;
23170
+ _loser: string;
23171
+ };
23172
+ Returns: undefined;
23173
+ };
23174
+ next_manufacture_partij: {
23175
+ Args: {
23176
+ _tenant_id: string;
23177
+ };
23178
+ Returns: string;
23179
+ };
22222
23180
  next_order_number: {
22223
23181
  Args: {
22224
23182
  p_prefix: string;
@@ -22297,6 +23255,14 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
22297
23255
  };
22298
23256
  Returns: undefined;
22299
23257
  };
23258
+ produce_designed_product: {
23259
+ Args: {
23260
+ p_parent_id: string;
23261
+ p_parent_kind: string;
23262
+ p_quantity: number;
23263
+ };
23264
+ Returns: import("../integrations/supabase/types").Json;
23265
+ };
22300
23266
  promote_trade_item_key: {
22301
23267
  Args: {
22302
23268
  p_new: string;
@@ -22304,6 +23270,10 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
22304
23270
  };
22305
23271
  Returns: undefined;
22306
23272
  };
23273
+ recompute_all_reserved_stock: {
23274
+ Args: never;
23275
+ Returns: undefined;
23276
+ };
22307
23277
  recompute_order_status: {
22308
23278
  Args: {
22309
23279
  p_order_id: string;
@@ -22353,27 +23323,45 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
22353
23323
  };
22354
23324
  Returns: undefined;
22355
23325
  };
23326
+ resolve_group_allocation: {
23327
+ Args: {
23328
+ _needed: number;
23329
+ _product_group_id: string;
23330
+ };
23331
+ Returns: {
23332
+ allocated: number;
23333
+ trade_item_id: string;
23334
+ }[];
23335
+ };
23336
+ resolve_group_member_stock_key: {
23337
+ Args: {
23338
+ p_trade_item_id: string;
23339
+ };
23340
+ Returns: string;
23341
+ };
22356
23342
  resolve_product_id_for_item: {
22357
23343
  Args: {
22358
23344
  p_product_name: string;
22359
23345
  };
22360
23346
  Returns: string;
22361
23347
  };
22362
- schedule_floriday_additional_services_sync: {
23348
+ resolve_stock_trade_item_key: {
22363
23349
  Args: {
22364
- p_apikey: string;
22365
- p_url: string;
23350
+ p_product_id: string;
22366
23351
  };
22367
- Returns: number;
23352
+ Returns: string;
22368
23353
  };
22369
- schedule_floriday_agreement_calloffs_sync: {
23354
+ reverse_production: {
22370
23355
  Args: {
22371
- p_apikey: string;
22372
- p_url: string;
23356
+ p_connection_id?: string;
23357
+ p_parent_key: string;
23358
+ p_quantity: number;
23359
+ p_reason?: string;
23360
+ p_user_id?: string;
22373
23361
  };
22374
- Returns: number;
23362
+ Returns: import("../integrations/supabase/types").Json;
22375
23363
  };
22376
- schedule_floriday_agreements_sync: {
23364
+ schedule_floriday_additional_services_sync: {
22377
23365
  Args: {
22378
23366
  p_apikey: string;
22379
23367
  p_url: string;
@@ -22934,6 +23922,165 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
22934
23922
  };
22935
23923
  Relationships: [];
22936
23924
  };
23925
+ ai_credentials: {
23926
+ Row: {
23927
+ active: boolean;
23928
+ api_key: string;
23929
+ created_at: string;
23930
+ created_by: string | null;
23931
+ id: string;
23932
+ label: string;
23933
+ provider_id: string;
23934
+ updated_at: string;
23935
+ };
23936
+ Insert: {
23937
+ active?: boolean;
23938
+ api_key: string;
23939
+ created_at?: string;
23940
+ created_by?: string | null;
23941
+ id?: string;
23942
+ label: string;
23943
+ provider_id: string;
23944
+ updated_at?: string;
23945
+ };
23946
+ Update: {
23947
+ active?: boolean;
23948
+ api_key?: string;
23949
+ created_at?: string;
23950
+ created_by?: string | null;
23951
+ id?: string;
23952
+ label?: string;
23953
+ provider_id?: string;
23954
+ updated_at?: string;
23955
+ };
23956
+ Relationships: [{
23957
+ foreignKeyName: "ai_credentials_provider_id_fkey";
23958
+ columns: ["provider_id"];
23959
+ isOneToOne: false;
23960
+ referencedRelation: "ai_providers";
23961
+ referencedColumns: ["id"];
23962
+ }];
23963
+ };
23964
+ ai_models: {
23965
+ Row: {
23966
+ active: boolean;
23967
+ context_window: number | null;
23968
+ created_at: string;
23969
+ display_name: string;
23970
+ id: string;
23971
+ is_default: boolean;
23972
+ modality: string;
23973
+ provider_id: string;
23974
+ slug: string;
23975
+ updated_at: string;
23976
+ };
23977
+ Insert: {
23978
+ active?: boolean;
23979
+ context_window?: number | null;
23980
+ created_at?: string;
23981
+ display_name: string;
23982
+ id?: string;
23983
+ is_default?: boolean;
23984
+ modality?: string;
23985
+ provider_id: string;
23986
+ slug: string;
23987
+ updated_at?: string;
23988
+ };
23989
+ Update: {
23990
+ active?: boolean;
23991
+ context_window?: number | null;
23992
+ created_at?: string;
23993
+ display_name?: string;
23994
+ id?: string;
23995
+ is_default?: boolean;
23996
+ modality?: string;
23997
+ provider_id?: string;
23998
+ slug?: string;
23999
+ updated_at?: string;
24000
+ };
24001
+ Relationships: [{
24002
+ foreignKeyName: "ai_models_provider_id_fkey";
24003
+ columns: ["provider_id"];
24004
+ isOneToOne: false;
24005
+ referencedRelation: "ai_providers";
24006
+ referencedColumns: ["id"];
24007
+ }];
24008
+ };
24009
+ ai_module_bindings: {
24010
+ Row: {
24011
+ consumer_module_id: string;
24012
+ created_at: string;
24013
+ credential_id: string;
24014
+ id: string;
24015
+ model_id: string;
24016
+ notes: string | null;
24017
+ updated_at: string;
24018
+ };
24019
+ Insert: {
24020
+ consumer_module_id: string;
24021
+ created_at?: string;
24022
+ credential_id: string;
24023
+ id?: string;
24024
+ model_id: string;
24025
+ notes?: string | null;
24026
+ updated_at?: string;
24027
+ };
24028
+ Update: {
24029
+ consumer_module_id?: string;
24030
+ created_at?: string;
24031
+ credential_id?: string;
24032
+ id?: string;
24033
+ model_id?: string;
24034
+ notes?: string | null;
24035
+ updated_at?: string;
24036
+ };
24037
+ Relationships: [{
24038
+ foreignKeyName: "ai_module_bindings_credential_id_fkey";
24039
+ columns: ["credential_id"];
24040
+ isOneToOne: false;
24041
+ referencedRelation: "ai_credentials";
24042
+ referencedColumns: ["id"];
24043
+ }, {
24044
+ foreignKeyName: "ai_module_bindings_model_id_fkey";
24045
+ columns: ["model_id"];
24046
+ isOneToOne: false;
24047
+ referencedRelation: "ai_models";
24048
+ referencedColumns: ["id"];
24049
+ }];
24050
+ };
24051
+ ai_providers: {
24052
+ Row: {
24053
+ active: boolean;
24054
+ auth_type: string;
24055
+ base_url: string | null;
24056
+ created_at: string;
24057
+ id: string;
24058
+ name: string;
24059
+ slug: string;
24060
+ updated_at: string;
24061
+ };
24062
+ Insert: {
24063
+ active?: boolean;
24064
+ auth_type?: string;
24065
+ base_url?: string | null;
24066
+ created_at?: string;
24067
+ id?: string;
24068
+ name: string;
24069
+ slug: string;
24070
+ updated_at?: string;
24071
+ };
24072
+ Update: {
24073
+ active?: boolean;
24074
+ auth_type?: string;
24075
+ base_url?: string | null;
24076
+ created_at?: string;
24077
+ id?: string;
24078
+ name?: string;
24079
+ slug?: string;
24080
+ updated_at?: string;
24081
+ };
24082
+ Relationships: [];
24083
+ };
22937
24084
  app_settings: {
22938
24085
  Row: {
22939
24086
  created_at: string;
@@ -25940,105 +27087,6 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
25940
27087
  referencedColumns: ["id"];
25941
27088
  }];
25942
27089
  };
25943
- floriday_agreement_calloffs_cache: {
25944
- Row: {
25945
- agreement_id: string | null;
25946
- connection_id: string;
25947
- data: import("../integrations/supabase/types").Json;
25948
- delivery_date: string | null;
25949
- fetched_at: string;
25950
- floriday_id: string;
25951
- id: string;
25952
- is_deleted: boolean;
25953
- sequence_number: number;
25954
- status: string | null;
25955
- updated_at: string;
25956
- };
25957
- Insert: {
25958
- agreement_id?: string | null;
25959
- connection_id: string;
25960
- data?: import("../integrations/supabase/types").Json;
25961
- delivery_date?: string | null;
25962
- fetched_at?: string;
25963
- floriday_id: string;
25964
- id?: string;
25965
- is_deleted?: boolean;
25966
- sequence_number?: number;
25967
- status?: string | null;
25968
- updated_at?: string;
25969
- };
25970
- Update: {
25971
- agreement_id?: string | null;
25972
- connection_id?: string;
25973
- data?: import("../integrations/supabase/types").Json;
25974
- delivery_date?: string | null;
25975
- fetched_at?: string;
25976
- floriday_id?: string;
25977
- id?: string;
25978
- is_deleted?: boolean;
25979
- sequence_number?: number;
25980
- status?: string | null;
25981
- updated_at?: string;
25982
- };
25983
- Relationships: [{
25984
- foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
25985
- columns: ["connection_id"];
25986
- isOneToOne: false;
25987
- referencedRelation: "floriday_connections";
25988
- referencedColumns: ["id"];
25989
- }];
25990
- };
25991
- floriday_agreements_cache: {
25992
- Row: {
25993
- buyer_organization_id: string | null;
25994
- connection_id: string;
25995
- data: import("../integrations/supabase/types").Json;
25996
- fetched_at: string;
25997
- floriday_id: string;
25998
- id: string;
25999
- is_deleted: boolean;
26000
- sequence_number: number;
26001
- status: string | null;
26002
- updated_at: string;
26003
- valid_from: string | null;
26004
- valid_until: string | null;
26005
- };
26006
- Insert: {
26007
- buyer_organization_id?: string | null;
26008
- connection_id: string;
26009
- data?: import("../integrations/supabase/types").Json;
26010
- fetched_at?: string;
26011
- floriday_id: string;
26012
- id?: string;
26013
- is_deleted?: boolean;
26014
- sequence_number?: number;
26015
- status?: string | null;
26016
- updated_at?: string;
26017
- valid_from?: string | null;
26018
- valid_until?: string | null;
26019
- };
26020
- Update: {
26021
- buyer_organization_id?: string | null;
26022
- connection_id?: string;
26023
- data?: import("../integrations/supabase/types").Json;
26024
- fetched_at?: string;
26025
- floriday_id?: string;
26026
- id?: string;
26027
- is_deleted?: boolean;
26028
- sequence_number?: number;
26029
- status?: string | null;
26030
- updated_at?: string;
26031
- valid_from?: string | null;
26032
- valid_until?: string | null;
26033
- };
26034
- Relationships: [{
26035
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
26036
- columns: ["connection_id"];
26037
- isOneToOne: false;
26038
- referencedRelation: "floriday_connections";
26039
- referencedColumns: ["id"];
26040
- }];
26041
- };
26042
27090
  floriday_auction_letters_cache: {
26043
27091
  Row: {
26044
27092
  auction_letter_code: string;
@@ -26537,6 +27585,27 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
26537
27585
  referencedColumns: ["id"];
26538
27586
  }];
26539
27587
  };
27588
+ floriday_continuous_stock_cache: {
27589
+ Row: {
27590
+ connection_id: string;
27591
+ fetched_at: string;
27592
+ number_of_pieces: number;
27593
+ trade_item_id: string;
27594
+ };
27595
+ Insert: {
27596
+ connection_id: string;
27597
+ fetched_at?: string;
27598
+ number_of_pieces?: number;
27599
+ trade_item_id: string;
27600
+ };
27601
+ Update: {
27602
+ connection_id?: string;
27603
+ fetched_at?: string;
27604
+ number_of_pieces?: number;
27605
+ trade_item_id?: string;
27606
+ };
27607
+ Relationships: [];
27608
+ };
26540
27609
  floriday_continuous_stock_queue: {
26541
27610
  Row: {
26542
27611
  attempts: number;
@@ -27515,6 +28584,45 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
27515
28584
  referencedColumns: ["id"];
27516
28585
  }];
27517
28586
  };
28587
+ floriday_trade_settings_customers_cache: {
28588
+ Row: {
28589
+ connection_id: string;
28590
+ data: import("../integrations/supabase/types").Json;
28591
+ fetched_at: string;
28592
+ floriday_id: string;
28593
+ id: string;
28594
+ is_deleted: boolean;
28595
+ sequence_number: number;
28596
+ updated_at: string;
28597
+ };
28598
+ Insert: {
28599
+ connection_id: string;
28600
+ data: import("../integrations/supabase/types").Json;
28601
+ fetched_at?: string;
28602
+ floriday_id: string;
28603
+ id?: string;
28604
+ is_deleted?: boolean;
28605
+ sequence_number?: number;
28606
+ updated_at?: string;
28607
+ };
28608
+ Update: {
28609
+ connection_id?: string;
28610
+ data?: import("../integrations/supabase/types").Json;
28611
+ fetched_at?: string;
28612
+ floriday_id?: string;
28613
+ id?: string;
28614
+ is_deleted?: boolean;
28615
+ sequence_number?: number;
28616
+ updated_at?: string;
28617
+ };
28618
+ Relationships: [{
28619
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
28620
+ columns: ["connection_id"];
28621
+ isOneToOne: false;
28622
+ referencedRelation: "floriday_connections";
28623
+ referencedColumns: ["id"];
28624
+ }];
28625
+ };
27518
28626
  floriday_trips_cache: {
27519
28627
  Row: {
27520
28628
  carrier_organization_id: string | null;
@@ -28660,39 +29768,60 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
28660
29768
  };
28661
29769
  manufacture_products: {
28662
29770
  Row: {
29771
+ aantal_te_produceren: number;
28663
29772
  created_at: string;
28664
29773
  description: string | null;
28665
29774
  id: string;
28666
29775
  is_active: boolean;
29776
+ location_id: string | null;
28667
29777
  name: string;
29778
+ partij_nummer: string | null;
29779
+ photos: import("../integrations/supabase/types").Json;
28668
29780
  produced_stock: number;
28669
29781
  product_code: string;
28670
29782
  tenant_id: string;
29783
+ unit: string;
28671
29784
  updated_at: string;
28672
29785
  };
28673
29786
  Insert: {
29787
+ aantal_te_produceren?: number;
28674
29788
  created_at?: string;
28675
29789
  description?: string | null;
28676
29790
  id?: string;
28677
29791
  is_active?: boolean;
29792
+ location_id?: string | null;
28678
29793
  name: string;
29794
+ partij_nummer?: string | null;
29795
+ photos?: import("../integrations/supabase/types").Json;
28679
29796
  produced_stock?: number;
28680
29797
  product_code: string;
28681
29798
  tenant_id: string;
29799
+ unit?: string;
28682
29800
  updated_at?: string;
28683
29801
  };
28684
29802
  Update: {
29803
+ aantal_te_produceren?: number;
28685
29804
  created_at?: string;
28686
29805
  description?: string | null;
28687
29806
  id?: string;
28688
29807
  is_active?: boolean;
29808
+ location_id?: string | null;
28689
29809
  name?: string;
29810
+ partij_nummer?: string | null;
29811
+ photos?: import("../integrations/supabase/types").Json;
28690
29812
  produced_stock?: number;
28691
29813
  product_code?: string;
28692
29814
  tenant_id?: string;
29815
+ unit?: string;
28693
29816
  updated_at?: string;
28694
29817
  };
28695
- Relationships: [];
29818
+ Relationships: [{
29819
+ foreignKeyName: "manufacture_products_location_id_fkey";
29820
+ columns: ["location_id"];
29821
+ isOneToOne: false;
29822
+ referencedRelation: "locations";
29823
+ referencedColumns: ["id"];
29824
+ }];
28696
29825
  };
28697
29826
  monteurs: {
28698
29827
  Row: {
@@ -29666,6 +30795,105 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29666
30795
  };
29667
30796
  Relationships: [];
29668
30797
  };
30798
+ order_shipment_items: {
30799
+ Row: {
30800
+ created_at: string;
30801
+ id: string;
30802
+ order_item_id: string;
30803
+ product_id: string | null;
30804
+ product_name: string;
30805
+ quantity: number;
30806
+ shipment_id: string;
30807
+ updated_at: string;
30808
+ };
30809
+ Insert: {
30810
+ created_at?: string;
30811
+ id?: string;
30812
+ order_item_id: string;
30813
+ product_id?: string | null;
30814
+ product_name: string;
30815
+ quantity: number;
30816
+ shipment_id: string;
30817
+ updated_at?: string;
30818
+ };
30819
+ Update: {
30820
+ created_at?: string;
30821
+ id?: string;
30822
+ order_item_id?: string;
30823
+ product_id?: string | null;
30824
+ product_name?: string;
30825
+ quantity?: number;
30826
+ shipment_id?: string;
30827
+ updated_at?: string;
30828
+ };
30829
+ Relationships: [{
30830
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
30831
+ columns: ["order_item_id"];
30832
+ isOneToOne: false;
30833
+ referencedRelation: "order_items";
30834
+ referencedColumns: ["id"];
30835
+ }, {
30836
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
30837
+ columns: ["shipment_id"];
30838
+ isOneToOne: false;
30839
+ referencedRelation: "order_shipments";
30840
+ referencedColumns: ["id"];
30841
+ }];
30842
+ };
30843
+ order_shipments: {
30844
+ Row: {
30845
+ carrier_id: string | null;
30846
+ created_at: string;
30847
+ delivery_date: string | null;
30848
+ delivery_location_id: string | null;
30849
+ id: string;
30850
+ notes: string | null;
30851
+ order_id: string;
30852
+ shipment_number: number;
30853
+ shipped_at: string | null;
30854
+ status: string;
30855
+ updated_at: string;
30856
+ };
30857
+ Insert: {
30858
+ carrier_id?: string | null;
30859
+ created_at?: string;
30860
+ delivery_date?: string | null;
30861
+ delivery_location_id?: string | null;
30862
+ id?: string;
30863
+ notes?: string | null;
30864
+ order_id: string;
30865
+ shipment_number: number;
30866
+ shipped_at?: string | null;
30867
+ status?: string;
30868
+ updated_at?: string;
30869
+ };
30870
+ Update: {
30871
+ carrier_id?: string | null;
30872
+ created_at?: string;
30873
+ delivery_date?: string | null;
30874
+ delivery_location_id?: string | null;
30875
+ id?: string;
30876
+ notes?: string | null;
30877
+ order_id?: string;
30878
+ shipment_number?: number;
30879
+ shipped_at?: string | null;
30880
+ status?: string;
30881
+ updated_at?: string;
30882
+ };
30883
+ Relationships: [{
30884
+ foreignKeyName: "order_shipments_carrier_id_fkey";
30885
+ columns: ["carrier_id"];
30886
+ isOneToOne: false;
30887
+ referencedRelation: "carriers";
30888
+ referencedColumns: ["id"];
30889
+ }, {
30890
+ foreignKeyName: "order_shipments_order_id_fkey";
30891
+ columns: ["order_id"];
30892
+ isOneToOne: false;
30893
+ referencedRelation: "orders";
30894
+ referencedColumns: ["id"];
30895
+ }];
30896
+ };
29669
30897
  orders: {
29670
30898
  Row: {
29671
30899
  created_at: string;
@@ -29673,8 +30901,9 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29673
30901
  customer_id: string | null;
29674
30902
  customer_name: string;
29675
30903
  deleted_at: string | null;
29676
- delivery_date: string;
30904
+ delivery_date: string | null;
29677
30905
  id: string;
30906
+ is_reservation: boolean;
29678
30907
  notes: string | null;
29679
30908
  order_date: string;
29680
30909
  order_number: string;
@@ -29691,8 +30920,9 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29691
30920
  customer_id?: string | null;
29692
30921
  customer_name?: string;
29693
30922
  deleted_at?: string | null;
29694
- delivery_date: string;
30923
+ delivery_date?: string | null;
29695
30924
  id?: string;
30925
+ is_reservation?: boolean;
29696
30926
  notes?: string | null;
29697
30927
  order_date?: string;
29698
30928
  order_number: string;
@@ -29709,8 +30939,9 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29709
30939
  customer_id?: string | null;
29710
30940
  customer_name?: string;
29711
30941
  deleted_at?: string | null;
29712
- delivery_date?: string;
30942
+ delivery_date?: string | null;
29713
30943
  id?: string;
30944
+ is_reservation?: boolean;
29714
30945
  notes?: string | null;
29715
30946
  order_date?: string;
29716
30947
  order_number?: string;
@@ -29852,6 +31083,63 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29852
31083
  };
29853
31084
  Relationships: [];
29854
31085
  };
31086
+ product_bom_items: {
31087
+ Row: {
31088
+ component_product_id: string | null;
31089
+ component_trade_item_floriday_id: string | null;
31090
+ created_at: string;
31091
+ id: string;
31092
+ notes: string | null;
31093
+ parent_product_id: string | null;
31094
+ parent_trade_item_floriday_id: string | null;
31095
+ quantity: number;
31096
+ sort_order: number;
31097
+ tenant_id: string;
31098
+ unit: string;
31099
+ updated_at: string;
31100
+ };
31101
+ Insert: {
31102
+ component_product_id?: string | null;
31103
+ component_trade_item_floriday_id?: string | null;
31104
+ created_at?: string;
31105
+ id?: string;
31106
+ notes?: string | null;
31107
+ parent_product_id?: string | null;
31108
+ parent_trade_item_floriday_id?: string | null;
31109
+ quantity?: number;
31110
+ sort_order?: number;
31111
+ tenant_id: string;
31112
+ unit?: string;
31113
+ updated_at?: string;
31114
+ };
31115
+ Update: {
31116
+ component_product_id?: string | null;
31117
+ component_trade_item_floriday_id?: string | null;
31118
+ created_at?: string;
31119
+ id?: string;
31120
+ notes?: string | null;
31121
+ parent_product_id?: string | null;
31122
+ parent_trade_item_floriday_id?: string | null;
31123
+ quantity?: number;
31124
+ sort_order?: number;
31125
+ tenant_id?: string;
31126
+ unit?: string;
31127
+ updated_at?: string;
31128
+ };
31129
+ Relationships: [{
31130
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
31131
+ columns: ["component_product_id"];
31132
+ isOneToOne: false;
31133
+ referencedRelation: "products";
31134
+ referencedColumns: ["id"];
31135
+ }, {
31136
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
31137
+ columns: ["parent_product_id"];
31138
+ isOneToOne: false;
31139
+ referencedRelation: "products";
31140
+ referencedColumns: ["id"];
31141
+ }];
31142
+ };
29855
31143
  product_categories: {
29856
31144
  Row: {
29857
31145
  color: string;
@@ -29957,6 +31245,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29957
31245
  id: string;
29958
31246
  product_group_id: string;
29959
31247
  quantity: number;
31248
+ sort_order: number;
29960
31249
  trade_item_id: string;
29961
31250
  };
29962
31251
  Insert: {
@@ -29964,6 +31253,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29964
31253
  id?: string;
29965
31254
  product_group_id: string;
29966
31255
  quantity?: number;
31256
+ sort_order?: number;
29967
31257
  trade_item_id: string;
29968
31258
  };
29969
31259
  Update: {
@@ -29971,6 +31261,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29971
31261
  id?: string;
29972
31262
  product_group_id?: string;
29973
31263
  quantity?: number;
31264
+ sort_order?: number;
29974
31265
  trade_item_id?: string;
29975
31266
  };
29976
31267
  Relationships: [{
@@ -29985,6 +31276,8 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29985
31276
  Row: {
29986
31277
  created_at: string;
29987
31278
  description: string | null;
31279
+ head_product_id: string | null;
31280
+ head_trade_item_floriday_id: string | null;
29988
31281
  id: string;
29989
31282
  is_active: boolean;
29990
31283
  name: string;
@@ -29994,6 +31287,8 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29994
31287
  Insert: {
29995
31288
  created_at?: string;
29996
31289
  description?: string | null;
31290
+ head_product_id?: string | null;
31291
+ head_trade_item_floriday_id?: string | null;
29997
31292
  id?: string;
29998
31293
  is_active?: boolean;
29999
31294
  name: string;
@@ -30003,21 +31298,126 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
30003
31298
  Update: {
30004
31299
  created_at?: string;
30005
31300
  description?: string | null;
31301
+ head_product_id?: string | null;
31302
+ head_trade_item_floriday_id?: string | null;
30006
31303
  id?: string;
30007
31304
  is_active?: boolean;
30008
31305
  name?: string;
30009
31306
  tenant_id?: string;
30010
31307
  updated_at?: string;
30011
31308
  };
31309
+ Relationships: [{
31310
+ foreignKeyName: "product_groups_head_product_id_fkey";
31311
+ columns: ["head_product_id"];
31312
+ isOneToOne: false;
31313
+ referencedRelation: "products";
31314
+ referencedColumns: ["id"];
31315
+ }];
31316
+ };
31317
+ product_load_settings: {
31318
+ Row: {
31319
+ created_at: string;
31320
+ id: string;
31321
+ is_package: boolean;
31322
+ layers_per_load_carrier: number | null;
31323
+ load_carrier: string | null;
31324
+ package_id: string | null;
31325
+ package_label: string | null;
31326
+ packages_per_layer: number | null;
31327
+ product_id: string | null;
31328
+ tenant_id: string;
31329
+ trade_item_floriday_id: string | null;
31330
+ units_per_package: number | null;
31331
+ updated_at: string;
31332
+ };
31333
+ Insert: {
31334
+ created_at?: string;
31335
+ id?: string;
31336
+ is_package?: boolean;
31337
+ layers_per_load_carrier?: number | null;
31338
+ load_carrier?: string | null;
31339
+ package_id?: string | null;
31340
+ package_label?: string | null;
31341
+ packages_per_layer?: number | null;
31342
+ product_id?: string | null;
31343
+ tenant_id: string;
31344
+ trade_item_floriday_id?: string | null;
31345
+ units_per_package?: number | null;
31346
+ updated_at?: string;
31347
+ };
31348
+ Update: {
31349
+ created_at?: string;
31350
+ id?: string;
31351
+ is_package?: boolean;
31352
+ layers_per_load_carrier?: number | null;
31353
+ load_carrier?: string | null;
31354
+ package_id?: string | null;
31355
+ package_label?: string | null;
31356
+ packages_per_layer?: number | null;
31357
+ product_id?: string | null;
31358
+ tenant_id?: string;
31359
+ trade_item_floriday_id?: string | null;
31360
+ units_per_package?: number | null;
31361
+ updated_at?: string;
31362
+ };
31363
+ Relationships: [{
31364
+ foreignKeyName: "product_load_settings_package_id_fkey";
31365
+ columns: ["package_id"];
31366
+ isOneToOne: false;
31367
+ referencedRelation: "packages";
31368
+ referencedColumns: ["id"];
31369
+ }, {
31370
+ foreignKeyName: "product_load_settings_product_id_fkey";
31371
+ columns: ["product_id"];
31372
+ isOneToOne: false;
31373
+ referencedRelation: "products";
31374
+ referencedColumns: ["id"];
31375
+ }];
31376
+ };
31377
+ product_merge_log: {
31378
+ Row: {
31379
+ canonical_product_id: string | null;
31380
+ id: string;
31381
+ merged_at: string;
31382
+ merged_from_id: string;
31383
+ notes: string | null;
31384
+ snapshot: import("../integrations/supabase/types").Json;
31385
+ source_table: string;
31386
+ status: string;
31387
+ };
31388
+ Insert: {
31389
+ canonical_product_id?: string | null;
31390
+ id?: string;
31391
+ merged_at?: string;
31392
+ merged_from_id: string;
31393
+ notes?: string | null;
31394
+ snapshot?: import("../integrations/supabase/types").Json;
31395
+ source_table: string;
31396
+ status?: string;
31397
+ };
31398
+ Update: {
31399
+ canonical_product_id?: string | null;
31400
+ id?: string;
31401
+ merged_at?: string;
31402
+ merged_from_id?: string;
31403
+ notes?: string | null;
31404
+ snapshot?: import("../integrations/supabase/types").Json;
31405
+ source_table?: string;
31406
+ status?: string;
31407
+ };
30012
31408
  Relationships: [];
30013
31409
  };
30014
31410
  products: {
30015
31411
  Row: {
31412
+ article_number: string | null;
30016
31413
  barcode: string | null;
30017
31414
  batch: string;
30018
31415
  crates_per_layer: number;
30019
31416
  created_at: string;
30020
31417
  custom_fields: import("../integrations/supabase/types").Json;
31418
+ floriday_active: boolean;
31419
+ floriday_payload: import("../integrations/supabase/types").Json;
31420
+ floriday_trade_item_id: string | null;
30021
31421
  id: string;
30022
31422
  image_url: string | null;
30023
31423
  incoming_quantity: number;
@@ -30036,11 +31436,15 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
30036
31436
  weight: string | null;
30037
31437
  };
30038
31438
  Insert: {
31439
+ article_number?: string | null;
30039
31440
  barcode?: string | null;
30040
31441
  batch: string;
30041
31442
  crates_per_layer?: number;
30042
31443
  created_at?: string;
30043
31444
  custom_fields?: import("../integrations/supabase/types").Json;
31445
+ floriday_active?: boolean;
31446
+ floriday_payload?: import("../integrations/supabase/types").Json;
31447
+ floriday_trade_item_id?: string | null;
30044
31448
  id?: string;
30045
31449
  image_url?: string | null;
30046
31450
  incoming_quantity?: number;
@@ -30059,11 +31463,15 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
30059
31463
  weight?: string | null;
30060
31464
  };
30061
31465
  Update: {
31466
+ article_number?: string | null;
30062
31467
  barcode?: string | null;
30063
31468
  batch?: string;
30064
31469
  crates_per_layer?: number;
30065
31470
  created_at?: string;
30066
31471
  custom_fields?: import("../integrations/supabase/types").Json;
31472
+ floriday_active?: boolean;
31473
+ floriday_payload?: import("../integrations/supabase/types").Json;
31474
+ floriday_trade_item_id?: string | null;
30067
31475
  id?: string;
30068
31476
  image_url?: string | null;
30069
31477
  incoming_quantity?: number;
@@ -30972,8 +32380,10 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
30972
32380
  order_id: string | null;
30973
32381
  order_item_id: string | null;
30974
32382
  order_source: string | null;
32383
+ parent_trade_item_key: string | null;
30975
32384
  physical_after: number | null;
30976
32385
  physical_before: number | null;
32386
+ production_batch_id: string | null;
30977
32387
  qty_delta: number;
30978
32388
  reason: string | null;
30979
32389
  reserved_after: number | null;
@@ -30989,8 +32399,10 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
30989
32399
  order_id?: string | null;
30990
32400
  order_item_id?: string | null;
30991
32401
  order_source?: string | null;
32402
+ parent_trade_item_key?: string | null;
30992
32403
  physical_after?: number | null;
30993
32404
  physical_before?: number | null;
32405
+ production_batch_id?: string | null;
30994
32406
  qty_delta: number;
30995
32407
  reason?: string | null;
30996
32408
  reserved_after?: number | null;
@@ -31006,8 +32418,10 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31006
32418
  order_id?: string | null;
31007
32419
  order_item_id?: string | null;
31008
32420
  order_source?: string | null;
32421
+ parent_trade_item_key?: string | null;
31009
32422
  physical_after?: number | null;
31010
32423
  physical_before?: number | null;
32424
+ production_batch_id?: string | null;
31011
32425
  qty_delta?: number;
31012
32426
  reason?: string | null;
31013
32427
  reserved_after?: number | null;
@@ -31466,7 +32880,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31466
32880
  twinfield_connections: {
31467
32881
  Row: {
31468
32882
  access_token: string | null;
31469
- client_id: string;
32883
+ client_id: string | null;
31470
32884
  client_secret: string | null;
31471
32885
  cluster_uri: string | null;
31472
32886
  company_code: string | null;
@@ -31478,7 +32892,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31478
32892
  is_active: boolean;
31479
32893
  label: string | null;
31480
32894
  office_code: string | null;
31481
- redirect_uri: string;
32895
+ redirect_uri: string | null;
31482
32896
  refresh_token: string | null;
31483
32897
  token_expires_at: string | null;
31484
32898
  updated_at: string;
@@ -31486,7 +32900,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31486
32900
  };
31487
32901
  Insert: {
31488
32902
  access_token?: string | null;
31489
- client_id: string;
32903
+ client_id?: string | null;
31490
32904
  client_secret?: string | null;
31491
32905
  cluster_uri?: string | null;
31492
32906
  company_code?: string | null;
@@ -31498,7 +32912,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31498
32912
  is_active?: boolean;
31499
32913
  label?: string | null;
31500
32914
  office_code?: string | null;
31501
- redirect_uri: string;
32915
+ redirect_uri?: string | null;
31502
32916
  refresh_token?: string | null;
31503
32917
  token_expires_at?: string | null;
31504
32918
  updated_at?: string;
@@ -31506,7 +32920,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31506
32920
  };
31507
32921
  Update: {
31508
32922
  access_token?: string | null;
31509
- client_id?: string;
32923
+ client_id?: string | null;
31510
32924
  client_secret?: string | null;
31511
32925
  cluster_uri?: string | null;
31512
32926
  company_code?: string | null;
@@ -31518,7 +32932,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31518
32932
  is_active?: boolean;
31519
32933
  label?: string | null;
31520
32934
  office_code?: string | null;
31521
- redirect_uri?: string;
32935
+ redirect_uri?: string | null;
31522
32936
  refresh_token?: string | null;
31523
32937
  token_expires_at?: string | null;
31524
32938
  updated_at?: string;
@@ -32713,25 +34127,6 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
32713
34127
  };
32714
34128
  Relationships: [];
32715
34129
  };
32716
- floriday_customer_discounts: {
32717
- Row: {
32718
- base_price: number | null;
32719
- buyer_organization_id: string | null;
32720
- currency: string | null;
32721
- discount_type: string | null;
32722
- discount_value: number | null;
32723
- min_quantity: number | null;
32724
- net_price: number | null;
32725
- product_group_id: string | null;
32726
- raw: import("../integrations/supabase/types").Json | null;
32727
- source: string | null;
32728
- source_id: string | null;
32729
- trade_item_id: string | null;
32730
- valid_from: string | null;
32731
- valid_until: string | null;
32732
- };
32733
- Relationships: [];
32734
- };
32735
34130
  local_customer_discounts: {
32736
34131
  Row: {
32737
34132
  base_price: number | null;
@@ -33035,6 +34430,13 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
33035
34430
  };
33036
34431
  Returns: number;
33037
34432
  };
34433
+ _migrate_rewrite_stock_key: {
34434
+ Args: {
34435
+ _from_key: string;
34436
+ _to_key: string;
34437
+ };
34438
+ Returns: undefined;
34439
+ };
33038
34440
  afh_city_code: {
33039
34441
  Args: {
33040
34442
  _city: string;
@@ -33150,6 +34552,28 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
33150
34552
  Args: never;
33151
34553
  Returns: undefined;
33152
34554
  };
34555
+ consume_bom_for_production: {
34556
+ Args: {
34557
+ p_connection_id: string;
34558
+ p_parent_id: string;
34559
+ p_parent_key: string;
34560
+ p_parent_kind: string;
34561
+ p_quantity: number;
34562
+ p_user_id: string;
34563
+ };
34564
+ Returns: import("../integrations/supabase/types").Json;
34565
+ } | {
34566
+ Args: {
34567
+ p_batch_id?: string;
34568
+ p_connection_id: string;
34569
+ p_parent_id: string;
34570
+ p_parent_key: string;
34571
+ p_parent_kind: string;
34572
+ p_quantity: number;
34573
+ p_user_id: string;
34574
+ };
34575
+ Returns: import("../integrations/supabase/types").Json;
34576
+ };
33153
34577
  consume_floriday_rate_limit: {
33154
34578
  Args: {
33155
34579
  p_bucket: string;
@@ -33201,6 +34625,13 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
33201
34625
  table_name: string;
33202
34626
  }[];
33203
34627
  };
34628
+ delete_samenstelling: {
34629
+ Args: {
34630
+ p_parent_id: string;
34631
+ p_parent_kind: string;
34632
+ };
34633
+ Returns: import("../integrations/supabase/types").Json;
34634
+ };
33204
34635
  dispatch_carrier_signups_sql: {
33205
34636
  Args: {
33206
34637
  _catchup?: string;
@@ -33361,19 +34792,6 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
33361
34792
  resource: string;
33362
34793
  }[];
33363
34794
  };
33364
- get_floriday_agreements_active: {
33365
- Args: {
33366
- p_on_date?: string;
33367
- };
33368
- Returns: {
33369
- buyer_organization_id: string;
33370
- data: import("../integrations/supabase/types").Json;
33371
- floriday_id: string;
33372
- status: string;
33373
- valid_from: string;
33374
- valid_until: string;
33375
- }[];
33376
- };
33377
34795
  get_floriday_clock_supplies_window: {
33378
34796
  Args: {
33379
34797
  p_from: string;
@@ -33446,6 +34864,21 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
33446
34864
  minutes_since_success: number;
33447
34865
  }[];
33448
34866
  };
34867
+ get_group_allocation_keys: {
34868
+ Args: {
34869
+ p_product_id: string;
34870
+ };
34871
+ Returns: {
34872
+ k: string;
34873
+ ord: number;
34874
+ }[];
34875
+ };
34876
+ get_group_head_key: {
34877
+ Args: {
34878
+ p_group_id: string;
34879
+ };
34880
+ Returns: string;
34881
+ };
33449
34882
  get_offer_by_link_code: {
33450
34883
  Args: {
33451
34884
  p_code: string;
@@ -33556,6 +34989,25 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
33556
34989
  };
33557
34990
  Returns: undefined;
33558
34991
  };
34992
+ mark_shipment_shipped: {
34993
+ Args: {
34994
+ p_shipment_id: string;
34995
+ };
34996
+ Returns: undefined;
34997
+ };
34998
+ merge_products: {
34999
+ Args: {
35000
+ _canonical: string;
35001
+ _loser: string;
35002
+ };
35003
+ Returns: undefined;
35004
+ };
35005
+ next_manufacture_partij: {
35006
+ Args: {
35007
+ _tenant_id: string;
35008
+ };
35009
+ Returns: string;
35010
+ };
33559
35011
  next_order_number: {
33560
35012
  Args: {
33561
35013
  p_prefix: string;
@@ -33634,6 +35086,14 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
33634
35086
  };
33635
35087
  Returns: undefined;
33636
35088
  };
35089
+ produce_designed_product: {
35090
+ Args: {
35091
+ p_parent_id: string;
35092
+ p_parent_kind: string;
35093
+ p_quantity: number;
35094
+ };
35095
+ Returns: import("../integrations/supabase/types").Json;
35096
+ };
33637
35097
  promote_trade_item_key: {
33638
35098
  Args: {
33639
35099
  p_new: string;
@@ -33641,6 +35101,10 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
33641
35101
  };
33642
35102
  Returns: undefined;
33643
35103
  };
35104
+ recompute_all_reserved_stock: {
35105
+ Args: never;
35106
+ Returns: undefined;
35107
+ };
33644
35108
  recompute_order_status: {
33645
35109
  Args: {
33646
35110
  p_order_id: string;
@@ -33690,27 +35154,45 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
33690
35154
  };
33691
35155
  Returns: undefined;
33692
35156
  };
35157
+ resolve_group_allocation: {
35158
+ Args: {
35159
+ _needed: number;
35160
+ _product_group_id: string;
35161
+ };
35162
+ Returns: {
35163
+ allocated: number;
35164
+ trade_item_id: string;
35165
+ }[];
35166
+ };
35167
+ resolve_group_member_stock_key: {
35168
+ Args: {
35169
+ p_trade_item_id: string;
35170
+ };
35171
+ Returns: string;
35172
+ };
33693
35173
  resolve_product_id_for_item: {
33694
35174
  Args: {
33695
35175
  p_product_name: string;
33696
35176
  };
33697
35177
  Returns: string;
33698
35178
  };
33699
- schedule_floriday_additional_services_sync: {
35179
+ resolve_stock_trade_item_key: {
33700
35180
  Args: {
33701
- p_apikey: string;
33702
- p_url: string;
35181
+ p_product_id: string;
33703
35182
  };
33704
- Returns: number;
35183
+ Returns: string;
33705
35184
  };
33706
- schedule_floriday_agreement_calloffs_sync: {
35185
+ reverse_production: {
33707
35186
  Args: {
33708
- p_apikey: string;
33709
- p_url: string;
35187
+ p_connection_id?: string;
35188
+ p_parent_key: string;
35189
+ p_quantity: number;
35190
+ p_reason?: string;
35191
+ p_user_id?: string;
33710
35192
  };
33711
- Returns: number;
35193
+ Returns: import("../integrations/supabase/types").Json;
33712
35194
  };
33713
- schedule_floriday_agreements_sync: {
35195
+ schedule_floriday_additional_services_sync: {
33714
35196
  Args: {
33715
35197
  p_apikey: string;
33716
35198
  p_url: string;