@flowselections/floriday-verkoop-module 1.0.16 → 1.0.18

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 (60) hide show
  1. package/dist-lib/components/verkoop/CreateOrderPage.d.ts.map +1 -1
  2. package/dist-lib/components/verkoop/CreateOrderPage.js +12 -12
  3. package/dist-lib/components/verkoop/EditLocalOrderDialog.d.ts +6 -0
  4. package/dist-lib/components/verkoop/EditLocalOrderDialog.d.ts.map +1 -0
  5. package/dist-lib/components/verkoop/EditLocalOrderDialog.js +102 -0
  6. package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts.map +1 -1
  7. package/dist-lib/components/verkoop/OrderKarindelingCard.js +26 -28
  8. package/dist-lib/components/verkoop/OrderShipmentsCard.d.ts +5 -0
  9. package/dist-lib/components/verkoop/OrderShipmentsCard.d.ts.map +1 -0
  10. package/dist-lib/components/verkoop/OrderShipmentsCard.js +137 -0
  11. package/dist-lib/components/verkoop/SalesOrderDetailPage.d.ts.map +1 -1
  12. package/dist-lib/components/verkoop/SalesOrderDetailPage.js +8 -2
  13. package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts.map +1 -1
  14. package/dist-lib/components/verkoop/SalesOrderDetailView.js +2 -1
  15. package/dist-lib/components/verkoop/SalesOrdersFilters.d.ts.map +1 -1
  16. package/dist-lib/components/verkoop/SalesOrdersFilters.js +2 -8
  17. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts +4 -1
  18. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
  19. package/dist-lib/components/verkoop/SalesOrdersTable.js +2 -2
  20. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts.map +1 -1
  21. package/dist-lib/components/verkoop/VerkoopOrdersPage.js +43 -1
  22. package/dist-lib/index.js +2 -2
  23. package/dist-lib/integrations/supabase/auth-middleware.d.ts +607 -169
  24. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  25. package/dist-lib/integrations/supabase/client.d.ts +607 -169
  26. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  27. package/dist-lib/integrations/supabase/client.server.d.ts +607 -169
  28. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  29. package/dist-lib/integrations/supabase/types.d.ts +623 -164
  30. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  31. package/dist-lib/lib/cart-lock.functions.d.ts +607 -169
  32. package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
  33. package/dist-lib/lib/cart-replan.functions.d.ts +1221 -345
  34. package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
  35. package/dist-lib/lib/create-order.functions.d.ts +40700 -1397
  36. package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
  37. package/dist-lib/lib/create-order.functions.js +792 -52
  38. package/dist-lib/lib/expand-group-order-items.d.ts +13 -0
  39. package/dist-lib/lib/expand-group-order-items.d.ts.map +1 -0
  40. package/dist-lib/lib/expand-group-order-items.js +216 -0
  41. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +1767 -453
  42. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
  43. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +607 -169
  44. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
  45. package/dist-lib/lib/floriday-public.functions.d.ts +4123 -1057
  46. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  47. package/dist-lib/lib/floriday-writes.functions.d.ts +2945 -755
  48. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  49. package/dist-lib/lib/order-shipments.functions.d.ts +47158 -0
  50. package/dist-lib/lib/order-shipments.functions.d.ts.map +1 -0
  51. package/dist-lib/lib/order-shipments.functions.js +178 -0
  52. package/dist-lib/lib/salesorders-mapping.d.ts +1 -0
  53. package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
  54. package/dist-lib/lib/salesorders.functions.d.ts +1767 -453
  55. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  56. package/dist-lib/lib/tradeitems.functions.d.ts +607 -169
  57. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  58. package/dist-lib/lib/useSalesOrdersQuery.d.ts.map +1 -1
  59. package/dist-lib/lib/useSalesOrdersQuery.js +39 -2
  60. package/package.json +2 -2
@@ -250,6 +250,165 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
250
250
  };
251
251
  Relationships: [];
252
252
  };
253
+ ai_credentials: {
254
+ Row: {
255
+ active: boolean;
256
+ api_key: string;
257
+ created_at: string;
258
+ created_by: string | null;
259
+ id: string;
260
+ label: string;
261
+ provider_id: string;
262
+ updated_at: string;
263
+ };
264
+ Insert: {
265
+ active?: boolean;
266
+ api_key: string;
267
+ created_at?: string;
268
+ created_by?: string | null;
269
+ id?: string;
270
+ label: string;
271
+ provider_id: string;
272
+ updated_at?: string;
273
+ };
274
+ Update: {
275
+ active?: boolean;
276
+ api_key?: string;
277
+ created_at?: string;
278
+ created_by?: string | null;
279
+ id?: string;
280
+ label?: string;
281
+ provider_id?: string;
282
+ updated_at?: string;
283
+ };
284
+ Relationships: [{
285
+ foreignKeyName: "ai_credentials_provider_id_fkey";
286
+ columns: ["provider_id"];
287
+ isOneToOne: false;
288
+ referencedRelation: "ai_providers";
289
+ referencedColumns: ["id"];
290
+ }];
291
+ };
292
+ ai_models: {
293
+ Row: {
294
+ active: boolean;
295
+ context_window: number | null;
296
+ created_at: string;
297
+ display_name: string;
298
+ id: string;
299
+ is_default: boolean;
300
+ modality: string;
301
+ provider_id: string;
302
+ slug: string;
303
+ updated_at: string;
304
+ };
305
+ Insert: {
306
+ active?: boolean;
307
+ context_window?: number | null;
308
+ created_at?: string;
309
+ display_name: string;
310
+ id?: string;
311
+ is_default?: boolean;
312
+ modality?: string;
313
+ provider_id: string;
314
+ slug: string;
315
+ updated_at?: string;
316
+ };
317
+ Update: {
318
+ active?: boolean;
319
+ context_window?: number | null;
320
+ created_at?: string;
321
+ display_name?: string;
322
+ id?: string;
323
+ is_default?: boolean;
324
+ modality?: string;
325
+ provider_id?: string;
326
+ slug?: string;
327
+ updated_at?: string;
328
+ };
329
+ Relationships: [{
330
+ foreignKeyName: "ai_models_provider_id_fkey";
331
+ columns: ["provider_id"];
332
+ isOneToOne: false;
333
+ referencedRelation: "ai_providers";
334
+ referencedColumns: ["id"];
335
+ }];
336
+ };
337
+ ai_module_bindings: {
338
+ Row: {
339
+ consumer_module_id: string;
340
+ created_at: string;
341
+ credential_id: string;
342
+ id: string;
343
+ model_id: string;
344
+ notes: string | null;
345
+ updated_at: string;
346
+ };
347
+ Insert: {
348
+ consumer_module_id: string;
349
+ created_at?: string;
350
+ credential_id: string;
351
+ id?: string;
352
+ model_id: string;
353
+ notes?: string | null;
354
+ updated_at?: string;
355
+ };
356
+ Update: {
357
+ consumer_module_id?: string;
358
+ created_at?: string;
359
+ credential_id?: string;
360
+ id?: string;
361
+ model_id?: string;
362
+ notes?: string | null;
363
+ updated_at?: string;
364
+ };
365
+ Relationships: [{
366
+ foreignKeyName: "ai_module_bindings_credential_id_fkey";
367
+ columns: ["credential_id"];
368
+ isOneToOne: false;
369
+ referencedRelation: "ai_credentials";
370
+ referencedColumns: ["id"];
371
+ }, {
372
+ foreignKeyName: "ai_module_bindings_model_id_fkey";
373
+ columns: ["model_id"];
374
+ isOneToOne: false;
375
+ referencedRelation: "ai_models";
376
+ referencedColumns: ["id"];
377
+ }];
378
+ };
379
+ ai_providers: {
380
+ Row: {
381
+ active: boolean;
382
+ auth_type: string;
383
+ base_url: string | null;
384
+ created_at: string;
385
+ id: string;
386
+ name: string;
387
+ slug: string;
388
+ updated_at: string;
389
+ };
390
+ Insert: {
391
+ active?: boolean;
392
+ auth_type?: string;
393
+ base_url?: string | null;
394
+ created_at?: string;
395
+ id?: string;
396
+ name: string;
397
+ slug: string;
398
+ updated_at?: string;
399
+ };
400
+ Update: {
401
+ active?: boolean;
402
+ auth_type?: string;
403
+ base_url?: string | null;
404
+ created_at?: string;
405
+ id?: string;
406
+ name?: string;
407
+ slug?: string;
408
+ updated_at?: string;
409
+ };
410
+ Relationships: [];
411
+ };
253
412
  app_settings: {
254
413
  Row: {
255
414
  created_at: string;
@@ -3256,105 +3415,6 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
3256
3415
  referencedColumns: ["id"];
3257
3416
  }];
3258
3417
  };
3259
- floriday_agreement_calloffs_cache: {
3260
- Row: {
3261
- agreement_id: string | null;
3262
- connection_id: string;
3263
- data: import("../integrations/supabase/types").Json;
3264
- delivery_date: string | null;
3265
- fetched_at: string;
3266
- floriday_id: string;
3267
- id: string;
3268
- is_deleted: boolean;
3269
- sequence_number: number;
3270
- status: string | null;
3271
- updated_at: string;
3272
- };
3273
- Insert: {
3274
- agreement_id?: string | null;
3275
- connection_id: string;
3276
- data?: import("../integrations/supabase/types").Json;
3277
- delivery_date?: string | null;
3278
- fetched_at?: string;
3279
- floriday_id: string;
3280
- id?: string;
3281
- is_deleted?: boolean;
3282
- sequence_number?: number;
3283
- status?: string | null;
3284
- updated_at?: string;
3285
- };
3286
- Update: {
3287
- agreement_id?: string | null;
3288
- connection_id?: string;
3289
- data?: import("../integrations/supabase/types").Json;
3290
- delivery_date?: string | null;
3291
- fetched_at?: string;
3292
- floriday_id?: string;
3293
- id?: string;
3294
- is_deleted?: boolean;
3295
- sequence_number?: number;
3296
- status?: string | null;
3297
- updated_at?: string;
3298
- };
3299
- Relationships: [{
3300
- foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
3301
- columns: ["connection_id"];
3302
- isOneToOne: false;
3303
- referencedRelation: "floriday_connections";
3304
- referencedColumns: ["id"];
3305
- }];
3306
- };
3307
- floriday_agreements_cache: {
3308
- Row: {
3309
- buyer_organization_id: string | null;
3310
- connection_id: string;
3311
- data: import("../integrations/supabase/types").Json;
3312
- fetched_at: string;
3313
- floriday_id: string;
3314
- id: string;
3315
- is_deleted: boolean;
3316
- sequence_number: number;
3317
- status: string | null;
3318
- updated_at: string;
3319
- valid_from: string | null;
3320
- valid_until: string | null;
3321
- };
3322
- Insert: {
3323
- buyer_organization_id?: string | null;
3324
- connection_id: string;
3325
- data?: import("../integrations/supabase/types").Json;
3326
- fetched_at?: string;
3327
- floriday_id: string;
3328
- id?: string;
3329
- is_deleted?: boolean;
3330
- sequence_number?: number;
3331
- status?: string | null;
3332
- updated_at?: string;
3333
- valid_from?: string | null;
3334
- valid_until?: string | null;
3335
- };
3336
- Update: {
3337
- buyer_organization_id?: string | null;
3338
- connection_id?: string;
3339
- data?: import("../integrations/supabase/types").Json;
3340
- fetched_at?: string;
3341
- floriday_id?: string;
3342
- id?: string;
3343
- is_deleted?: boolean;
3344
- sequence_number?: number;
3345
- status?: string | null;
3346
- updated_at?: string;
3347
- valid_from?: string | null;
3348
- valid_until?: string | null;
3349
- };
3350
- Relationships: [{
3351
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
3352
- columns: ["connection_id"];
3353
- isOneToOne: false;
3354
- referencedRelation: "floriday_connections";
3355
- referencedColumns: ["id"];
3356
- }];
3357
- };
3358
3418
  floriday_auction_letters_cache: {
3359
3419
  Row: {
3360
3420
  auction_letter_code: string;
@@ -3853,6 +3913,27 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
3853
3913
  referencedColumns: ["id"];
3854
3914
  }];
3855
3915
  };
3916
+ floriday_continuous_stock_cache: {
3917
+ Row: {
3918
+ connection_id: string;
3919
+ fetched_at: string;
3920
+ number_of_pieces: number;
3921
+ trade_item_id: string;
3922
+ };
3923
+ Insert: {
3924
+ connection_id: string;
3925
+ fetched_at?: string;
3926
+ number_of_pieces?: number;
3927
+ trade_item_id: string;
3928
+ };
3929
+ Update: {
3930
+ connection_id?: string;
3931
+ fetched_at?: string;
3932
+ number_of_pieces?: number;
3933
+ trade_item_id?: string;
3934
+ };
3935
+ Relationships: [];
3936
+ };
3856
3937
  floriday_continuous_stock_queue: {
3857
3938
  Row: {
3858
3939
  attempts: number;
@@ -4831,9 +4912,8 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
4831
4912
  referencedColumns: ["id"];
4832
4913
  }];
4833
4914
  };
4834
- floriday_trips_cache: {
4915
+ floriday_trade_settings_customers_cache: {
4835
4916
  Row: {
4836
- carrier_organization_id: string | null;
4837
4917
  connection_id: string;
4838
4918
  data: import("../integrations/supabase/types").Json;
4839
4919
  fetched_at: string;
@@ -4841,25 +4921,19 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
4841
4921
  id: string;
4842
4922
  is_deleted: boolean;
4843
4923
  sequence_number: number;
4844
- status: string | null;
4845
- trip_date: string | null;
4846
4924
  updated_at: string;
4847
4925
  };
4848
4926
  Insert: {
4849
- carrier_organization_id?: string | null;
4850
4927
  connection_id: string;
4851
- data?: import("../integrations/supabase/types").Json;
4928
+ data: import("../integrations/supabase/types").Json;
4852
4929
  fetched_at?: string;
4853
4930
  floriday_id: string;
4854
4931
  id?: string;
4855
4932
  is_deleted?: boolean;
4856
4933
  sequence_number?: number;
4857
- status?: string | null;
4858
- trip_date?: string | null;
4859
4934
  updated_at?: string;
4860
4935
  };
4861
4936
  Update: {
4862
- carrier_organization_id?: string | null;
4863
4937
  connection_id?: string;
4864
4938
  data?: import("../integrations/supabase/types").Json;
4865
4939
  fetched_at?: string;
@@ -4867,31 +4941,77 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
4867
4941
  id?: string;
4868
4942
  is_deleted?: boolean;
4869
4943
  sequence_number?: number;
4870
- status?: string | null;
4871
- trip_date?: string | null;
4872
4944
  updated_at?: string;
4873
4945
  };
4874
4946
  Relationships: [{
4875
- foreignKeyName: "floriday_trips_cache_connection_id_fkey";
4947
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
4876
4948
  columns: ["connection_id"];
4877
4949
  isOneToOne: false;
4878
4950
  referencedRelation: "floriday_connections";
4879
4951
  referencedColumns: ["id"];
4880
4952
  }];
4881
4953
  };
4882
- floriday_warehouses_cache: {
4954
+ floriday_trips_cache: {
4883
4955
  Row: {
4956
+ carrier_organization_id: string | null;
4884
4957
  connection_id: string;
4885
4958
  data: import("../integrations/supabase/types").Json;
4886
4959
  fetched_at: string;
4887
4960
  floriday_id: string;
4888
- gln_code: string | null;
4889
4961
  id: string;
4890
- is_default: boolean;
4891
4962
  is_deleted: boolean;
4892
- name: string | null;
4893
- updated_at: string;
4894
- };
4963
+ sequence_number: number;
4964
+ status: string | null;
4965
+ trip_date: string | null;
4966
+ updated_at: string;
4967
+ };
4968
+ Insert: {
4969
+ carrier_organization_id?: string | null;
4970
+ connection_id: string;
4971
+ data?: import("../integrations/supabase/types").Json;
4972
+ fetched_at?: string;
4973
+ floriday_id: string;
4974
+ id?: string;
4975
+ is_deleted?: boolean;
4976
+ sequence_number?: number;
4977
+ status?: string | null;
4978
+ trip_date?: string | null;
4979
+ updated_at?: string;
4980
+ };
4981
+ Update: {
4982
+ carrier_organization_id?: string | null;
4983
+ connection_id?: string;
4984
+ data?: import("../integrations/supabase/types").Json;
4985
+ fetched_at?: string;
4986
+ floriday_id?: string;
4987
+ id?: string;
4988
+ is_deleted?: boolean;
4989
+ sequence_number?: number;
4990
+ status?: string | null;
4991
+ trip_date?: string | null;
4992
+ updated_at?: string;
4993
+ };
4994
+ Relationships: [{
4995
+ foreignKeyName: "floriday_trips_cache_connection_id_fkey";
4996
+ columns: ["connection_id"];
4997
+ isOneToOne: false;
4998
+ referencedRelation: "floriday_connections";
4999
+ referencedColumns: ["id"];
5000
+ }];
5001
+ };
5002
+ floriday_warehouses_cache: {
5003
+ Row: {
5004
+ connection_id: string;
5005
+ data: import("../integrations/supabase/types").Json;
5006
+ fetched_at: string;
5007
+ floriday_id: string;
5008
+ gln_code: string | null;
5009
+ id: string;
5010
+ is_default: boolean;
5011
+ is_deleted: boolean;
5012
+ name: string | null;
5013
+ updated_at: string;
5014
+ };
4895
5015
  Insert: {
4896
5016
  connection_id: string;
4897
5017
  data?: import("../integrations/supabase/types").Json;
@@ -5976,39 +6096,60 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
5976
6096
  };
5977
6097
  manufacture_products: {
5978
6098
  Row: {
6099
+ aantal_te_produceren: number;
5979
6100
  created_at: string;
5980
6101
  description: string | null;
5981
6102
  id: string;
5982
6103
  is_active: boolean;
6104
+ location_id: string | null;
5983
6105
  name: string;
6106
+ partij_nummer: string | null;
6107
+ photos: import("../integrations/supabase/types").Json;
5984
6108
  produced_stock: number;
5985
6109
  product_code: string;
5986
6110
  tenant_id: string;
6111
+ unit: string;
5987
6112
  updated_at: string;
5988
6113
  };
5989
6114
  Insert: {
6115
+ aantal_te_produceren?: number;
5990
6116
  created_at?: string;
5991
6117
  description?: string | null;
5992
6118
  id?: string;
5993
6119
  is_active?: boolean;
6120
+ location_id?: string | null;
5994
6121
  name: string;
6122
+ partij_nummer?: string | null;
6123
+ photos?: import("../integrations/supabase/types").Json;
5995
6124
  produced_stock?: number;
5996
6125
  product_code: string;
5997
6126
  tenant_id: string;
6127
+ unit?: string;
5998
6128
  updated_at?: string;
5999
6129
  };
6000
6130
  Update: {
6131
+ aantal_te_produceren?: number;
6001
6132
  created_at?: string;
6002
6133
  description?: string | null;
6003
6134
  id?: string;
6004
6135
  is_active?: boolean;
6136
+ location_id?: string | null;
6005
6137
  name?: string;
6138
+ partij_nummer?: string | null;
6139
+ photos?: import("../integrations/supabase/types").Json;
6006
6140
  produced_stock?: number;
6007
6141
  product_code?: string;
6008
6142
  tenant_id?: string;
6143
+ unit?: string;
6009
6144
  updated_at?: string;
6010
6145
  };
6011
- Relationships: [];
6146
+ Relationships: [{
6147
+ foreignKeyName: "manufacture_products_location_id_fkey";
6148
+ columns: ["location_id"];
6149
+ isOneToOne: false;
6150
+ referencedRelation: "locations";
6151
+ referencedColumns: ["id"];
6152
+ }];
6012
6153
  };
6013
6154
  monteurs: {
6014
6155
  Row: {
@@ -6982,6 +7123,105 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
6982
7123
  };
6983
7124
  Relationships: [];
6984
7125
  };
7126
+ order_shipment_items: {
7127
+ Row: {
7128
+ created_at: string;
7129
+ id: string;
7130
+ order_item_id: string;
7131
+ product_id: string | null;
7132
+ product_name: string;
7133
+ quantity: number;
7134
+ shipment_id: string;
7135
+ updated_at: string;
7136
+ };
7137
+ Insert: {
7138
+ created_at?: string;
7139
+ id?: string;
7140
+ order_item_id: string;
7141
+ product_id?: string | null;
7142
+ product_name: string;
7143
+ quantity: number;
7144
+ shipment_id: string;
7145
+ updated_at?: string;
7146
+ };
7147
+ Update: {
7148
+ created_at?: string;
7149
+ id?: string;
7150
+ order_item_id?: string;
7151
+ product_id?: string | null;
7152
+ product_name?: string;
7153
+ quantity?: number;
7154
+ shipment_id?: string;
7155
+ updated_at?: string;
7156
+ };
7157
+ Relationships: [{
7158
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
7159
+ columns: ["order_item_id"];
7160
+ isOneToOne: false;
7161
+ referencedRelation: "order_items";
7162
+ referencedColumns: ["id"];
7163
+ }, {
7164
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
7165
+ columns: ["shipment_id"];
7166
+ isOneToOne: false;
7167
+ referencedRelation: "order_shipments";
7168
+ referencedColumns: ["id"];
7169
+ }];
7170
+ };
7171
+ order_shipments: {
7172
+ Row: {
7173
+ carrier_id: string | null;
7174
+ created_at: string;
7175
+ delivery_date: string | null;
7176
+ delivery_location_id: string | null;
7177
+ id: string;
7178
+ notes: string | null;
7179
+ order_id: string;
7180
+ shipment_number: number;
7181
+ shipped_at: string | null;
7182
+ status: string;
7183
+ updated_at: string;
7184
+ };
7185
+ Insert: {
7186
+ carrier_id?: string | null;
7187
+ created_at?: string;
7188
+ delivery_date?: string | null;
7189
+ delivery_location_id?: string | null;
7190
+ id?: string;
7191
+ notes?: string | null;
7192
+ order_id: string;
7193
+ shipment_number: number;
7194
+ shipped_at?: string | null;
7195
+ status?: string;
7196
+ updated_at?: string;
7197
+ };
7198
+ Update: {
7199
+ carrier_id?: string | null;
7200
+ created_at?: string;
7201
+ delivery_date?: string | null;
7202
+ delivery_location_id?: string | null;
7203
+ id?: string;
7204
+ notes?: string | null;
7205
+ order_id?: string;
7206
+ shipment_number?: number;
7207
+ shipped_at?: string | null;
7208
+ status?: string;
7209
+ updated_at?: string;
7210
+ };
7211
+ Relationships: [{
7212
+ foreignKeyName: "order_shipments_carrier_id_fkey";
7213
+ columns: ["carrier_id"];
7214
+ isOneToOne: false;
7215
+ referencedRelation: "carriers";
7216
+ referencedColumns: ["id"];
7217
+ }, {
7218
+ foreignKeyName: "order_shipments_order_id_fkey";
7219
+ columns: ["order_id"];
7220
+ isOneToOne: false;
7221
+ referencedRelation: "orders";
7222
+ referencedColumns: ["id"];
7223
+ }];
7224
+ };
6985
7225
  orders: {
6986
7226
  Row: {
6987
7227
  created_at: string;
@@ -6989,8 +7229,9 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
6989
7229
  customer_id: string | null;
6990
7230
  customer_name: string;
6991
7231
  deleted_at: string | null;
6992
- delivery_date: string;
7232
+ delivery_date: string | null;
6993
7233
  id: string;
7234
+ is_reservation: boolean;
6994
7235
  notes: string | null;
6995
7236
  order_date: string;
6996
7237
  order_number: string;
@@ -7007,8 +7248,9 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
7007
7248
  customer_id?: string | null;
7008
7249
  customer_name?: string;
7009
7250
  deleted_at?: string | null;
7010
- delivery_date: string;
7251
+ delivery_date?: string | null;
7011
7252
  id?: string;
7253
+ is_reservation?: boolean;
7012
7254
  notes?: string | null;
7013
7255
  order_date?: string;
7014
7256
  order_number: string;
@@ -7025,8 +7267,9 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
7025
7267
  customer_id?: string | null;
7026
7268
  customer_name?: string;
7027
7269
  deleted_at?: string | null;
7028
- delivery_date?: string;
7270
+ delivery_date?: string | null;
7029
7271
  id?: string;
7272
+ is_reservation?: boolean;
7030
7273
  notes?: string | null;
7031
7274
  order_date?: string;
7032
7275
  order_number?: string;
@@ -7168,6 +7411,63 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
7168
7411
  };
7169
7412
  Relationships: [];
7170
7413
  };
7414
+ product_bom_items: {
7415
+ Row: {
7416
+ component_product_id: string | null;
7417
+ component_trade_item_floriday_id: string | null;
7418
+ created_at: string;
7419
+ id: string;
7420
+ notes: string | null;
7421
+ parent_product_id: string | null;
7422
+ parent_trade_item_floriday_id: string | null;
7423
+ quantity: number;
7424
+ sort_order: number;
7425
+ tenant_id: string;
7426
+ unit: string;
7427
+ updated_at: string;
7428
+ };
7429
+ Insert: {
7430
+ component_product_id?: string | null;
7431
+ component_trade_item_floriday_id?: string | null;
7432
+ created_at?: string;
7433
+ id?: string;
7434
+ notes?: string | null;
7435
+ parent_product_id?: string | null;
7436
+ parent_trade_item_floriday_id?: string | null;
7437
+ quantity?: number;
7438
+ sort_order?: number;
7439
+ tenant_id: string;
7440
+ unit?: string;
7441
+ updated_at?: string;
7442
+ };
7443
+ Update: {
7444
+ component_product_id?: string | null;
7445
+ component_trade_item_floriday_id?: string | null;
7446
+ created_at?: string;
7447
+ id?: string;
7448
+ notes?: string | null;
7449
+ parent_product_id?: string | null;
7450
+ parent_trade_item_floriday_id?: string | null;
7451
+ quantity?: number;
7452
+ sort_order?: number;
7453
+ tenant_id?: string;
7454
+ unit?: string;
7455
+ updated_at?: string;
7456
+ };
7457
+ Relationships: [{
7458
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
7459
+ columns: ["component_product_id"];
7460
+ isOneToOne: false;
7461
+ referencedRelation: "products";
7462
+ referencedColumns: ["id"];
7463
+ }, {
7464
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
7465
+ columns: ["parent_product_id"];
7466
+ isOneToOne: false;
7467
+ referencedRelation: "products";
7468
+ referencedColumns: ["id"];
7469
+ }];
7470
+ };
7171
7471
  product_categories: {
7172
7472
  Row: {
7173
7473
  color: string;
@@ -7273,6 +7573,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
7273
7573
  id: string;
7274
7574
  product_group_id: string;
7275
7575
  quantity: number;
7576
+ sort_order: number;
7276
7577
  trade_item_id: string;
7277
7578
  };
7278
7579
  Insert: {
@@ -7280,6 +7581,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
7280
7581
  id?: string;
7281
7582
  product_group_id: string;
7282
7583
  quantity?: number;
7584
+ sort_order?: number;
7283
7585
  trade_item_id: string;
7284
7586
  };
7285
7587
  Update: {
@@ -7287,6 +7589,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
7287
7589
  id?: string;
7288
7590
  product_group_id?: string;
7289
7591
  quantity?: number;
7592
+ sort_order?: number;
7290
7593
  trade_item_id?: string;
7291
7594
  };
7292
7595
  Relationships: [{
@@ -7301,6 +7604,8 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
7301
7604
  Row: {
7302
7605
  created_at: string;
7303
7606
  description: string | null;
7607
+ head_product_id: string | null;
7608
+ head_trade_item_floriday_id: string | null;
7304
7609
  id: string;
7305
7610
  is_active: boolean;
7306
7611
  name: string;
@@ -7310,6 +7615,8 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
7310
7615
  Insert: {
7311
7616
  created_at?: string;
7312
7617
  description?: string | null;
7618
+ head_product_id?: string | null;
7619
+ head_trade_item_floriday_id?: string | null;
7313
7620
  id?: string;
7314
7621
  is_active?: boolean;
7315
7622
  name: string;
@@ -7319,16 +7626,85 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
7319
7626
  Update: {
7320
7627
  created_at?: string;
7321
7628
  description?: string | null;
7629
+ head_product_id?: string | null;
7630
+ head_trade_item_floriday_id?: string | null;
7322
7631
  id?: string;
7323
7632
  is_active?: boolean;
7324
7633
  name?: string;
7325
7634
  tenant_id?: string;
7326
7635
  updated_at?: string;
7327
7636
  };
7328
- Relationships: [];
7637
+ Relationships: [{
7638
+ foreignKeyName: "product_groups_head_product_id_fkey";
7639
+ columns: ["head_product_id"];
7640
+ isOneToOne: false;
7641
+ referencedRelation: "products";
7642
+ referencedColumns: ["id"];
7643
+ }];
7644
+ };
7645
+ product_load_settings: {
7646
+ Row: {
7647
+ created_at: string;
7648
+ id: string;
7649
+ is_package: boolean;
7650
+ layers_per_load_carrier: number | null;
7651
+ load_carrier: string | null;
7652
+ package_id: string | null;
7653
+ package_label: string | null;
7654
+ packages_per_layer: number | null;
7655
+ product_id: string | null;
7656
+ tenant_id: string;
7657
+ trade_item_floriday_id: string | null;
7658
+ units_per_package: number | null;
7659
+ updated_at: string;
7660
+ };
7661
+ Insert: {
7662
+ created_at?: string;
7663
+ id?: string;
7664
+ is_package?: boolean;
7665
+ layers_per_load_carrier?: number | null;
7666
+ load_carrier?: string | null;
7667
+ package_id?: string | null;
7668
+ package_label?: string | null;
7669
+ packages_per_layer?: number | null;
7670
+ product_id?: string | null;
7671
+ tenant_id: string;
7672
+ trade_item_floriday_id?: string | null;
7673
+ units_per_package?: number | null;
7674
+ updated_at?: string;
7675
+ };
7676
+ Update: {
7677
+ created_at?: string;
7678
+ id?: string;
7679
+ is_package?: boolean;
7680
+ layers_per_load_carrier?: number | null;
7681
+ load_carrier?: string | null;
7682
+ package_id?: string | null;
7683
+ package_label?: string | null;
7684
+ packages_per_layer?: number | null;
7685
+ product_id?: string | null;
7686
+ tenant_id?: string;
7687
+ trade_item_floriday_id?: string | null;
7688
+ units_per_package?: number | null;
7689
+ updated_at?: string;
7690
+ };
7691
+ Relationships: [{
7692
+ foreignKeyName: "product_load_settings_package_id_fkey";
7693
+ columns: ["package_id"];
7694
+ isOneToOne: false;
7695
+ referencedRelation: "packages";
7696
+ referencedColumns: ["id"];
7697
+ }, {
7698
+ foreignKeyName: "product_load_settings_product_id_fkey";
7699
+ columns: ["product_id"];
7700
+ isOneToOne: false;
7701
+ referencedRelation: "products";
7702
+ referencedColumns: ["id"];
7703
+ }];
7329
7704
  };
7330
7705
  products: {
7331
7706
  Row: {
7707
+ article_number: string | null;
7332
7708
  barcode: string | null;
7333
7709
  batch: string;
7334
7710
  crates_per_layer: number;
@@ -7352,6 +7728,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
7352
7728
  weight: string | null;
7353
7729
  };
7354
7730
  Insert: {
7731
+ article_number?: string | null;
7355
7732
  barcode?: string | null;
7356
7733
  batch: string;
7357
7734
  crates_per_layer?: number;
@@ -7375,6 +7752,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
7375
7752
  weight?: string | null;
7376
7753
  };
7377
7754
  Update: {
7755
+ article_number?: string | null;
7378
7756
  barcode?: string | null;
7379
7757
  batch?: string;
7380
7758
  crates_per_layer?: number;
@@ -8288,8 +8666,10 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
8288
8666
  order_id: string | null;
8289
8667
  order_item_id: string | null;
8290
8668
  order_source: string | null;
8669
+ parent_trade_item_key: string | null;
8291
8670
  physical_after: number | null;
8292
8671
  physical_before: number | null;
8672
+ production_batch_id: string | null;
8293
8673
  qty_delta: number;
8294
8674
  reason: string | null;
8295
8675
  reserved_after: number | null;
@@ -8305,8 +8685,10 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
8305
8685
  order_id?: string | null;
8306
8686
  order_item_id?: string | null;
8307
8687
  order_source?: string | null;
8688
+ parent_trade_item_key?: string | null;
8308
8689
  physical_after?: number | null;
8309
8690
  physical_before?: number | null;
8691
+ production_batch_id?: string | null;
8310
8692
  qty_delta: number;
8311
8693
  reason?: string | null;
8312
8694
  reserved_after?: number | null;
@@ -8322,8 +8704,10 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
8322
8704
  order_id?: string | null;
8323
8705
  order_item_id?: string | null;
8324
8706
  order_source?: string | null;
8707
+ parent_trade_item_key?: string | null;
8325
8708
  physical_after?: number | null;
8326
8709
  physical_before?: number | null;
8710
+ production_batch_id?: string | null;
8327
8711
  qty_delta?: number;
8328
8712
  reason?: string | null;
8329
8713
  reserved_after?: number | null;
@@ -8782,7 +9166,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
8782
9166
  twinfield_connections: {
8783
9167
  Row: {
8784
9168
  access_token: string | null;
8785
- client_id: string;
9169
+ client_id: string | null;
8786
9170
  client_secret: string | null;
8787
9171
  cluster_uri: string | null;
8788
9172
  company_code: string | null;
@@ -8794,7 +9178,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
8794
9178
  is_active: boolean;
8795
9179
  label: string | null;
8796
9180
  office_code: string | null;
8797
- redirect_uri: string;
9181
+ redirect_uri: string | null;
8798
9182
  refresh_token: string | null;
8799
9183
  token_expires_at: string | null;
8800
9184
  updated_at: string;
@@ -8802,7 +9186,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
8802
9186
  };
8803
9187
  Insert: {
8804
9188
  access_token?: string | null;
8805
- client_id: string;
9189
+ client_id?: string | null;
8806
9190
  client_secret?: string | null;
8807
9191
  cluster_uri?: string | null;
8808
9192
  company_code?: string | null;
@@ -8814,7 +9198,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
8814
9198
  is_active?: boolean;
8815
9199
  label?: string | null;
8816
9200
  office_code?: string | null;
8817
- redirect_uri: string;
9201
+ redirect_uri?: string | null;
8818
9202
  refresh_token?: string | null;
8819
9203
  token_expires_at?: string | null;
8820
9204
  updated_at?: string;
@@ -8822,7 +9206,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
8822
9206
  };
8823
9207
  Update: {
8824
9208
  access_token?: string | null;
8825
- client_id?: string;
9209
+ client_id?: string | null;
8826
9210
  client_secret?: string | null;
8827
9211
  cluster_uri?: string | null;
8828
9212
  company_code?: string | null;
@@ -8834,7 +9218,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
8834
9218
  is_active?: boolean;
8835
9219
  label?: string | null;
8836
9220
  office_code?: string | null;
8837
- redirect_uri?: string;
9221
+ redirect_uri?: string | null;
8838
9222
  refresh_token?: string | null;
8839
9223
  token_expires_at?: string | null;
8840
9224
  updated_at?: string;
@@ -10029,45 +10413,26 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
10029
10413
  };
10030
10414
  Relationships: [];
10031
10415
  };
10032
- floriday_customer_discounts: {
10416
+ local_customer_discounts: {
10033
10417
  Row: {
10034
10418
  base_price: number | null;
10035
- buyer_organization_id: string | null;
10036
10419
  currency: string | null;
10420
+ customer_id: string | null;
10037
10421
  discount_type: string | null;
10038
10422
  discount_value: number | null;
10039
10423
  min_quantity: number | null;
10040
10424
  net_price: number | null;
10041
- product_group_id: string | null;
10042
- raw: import("../integrations/supabase/types").Json | null;
10425
+ product_category_id: string | null;
10426
+ product_id: string | null;
10427
+ product_name: string | null;
10043
10428
  source: string | null;
10044
10429
  source_id: string | null;
10045
- trade_item_id: string | null;
10046
10430
  valid_from: string | null;
10047
10431
  valid_until: string | null;
10048
10432
  };
10049
10433
  Relationships: [];
10050
10434
  };
10051
- local_customer_discounts: {
10052
- Row: {
10053
- base_price: number | null;
10054
- currency: string | null;
10055
- customer_id: string | null;
10056
- discount_type: string | null;
10057
- discount_value: number | null;
10058
- min_quantity: number | null;
10059
- net_price: number | null;
10060
- product_category_id: string | null;
10061
- product_id: string | null;
10062
- product_name: string | null;
10063
- source: string | null;
10064
- source_id: string | null;
10065
- valid_from: string | null;
10066
- valid_until: string | null;
10067
- };
10068
- Relationships: [];
10069
- };
10070
- manufacture_product_possible_stock_view: {
10435
+ manufacture_product_possible_stock_view: {
10071
10436
  Row: {
10072
10437
  component_count: number | null;
10073
10438
  manufacture_product_id: string | null;
@@ -10466,6 +10831,28 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
10466
10831
  Args: never;
10467
10832
  Returns: undefined;
10468
10833
  };
10834
+ consume_bom_for_production: {
10835
+ Args: {
10836
+ p_connection_id: string;
10837
+ p_parent_id: string;
10838
+ p_parent_key: string;
10839
+ p_parent_kind: string;
10840
+ p_quantity: number;
10841
+ p_user_id: string;
10842
+ };
10843
+ Returns: import("../integrations/supabase/types").Json;
10844
+ } | {
10845
+ Args: {
10846
+ p_batch_id?: string;
10847
+ p_connection_id: string;
10848
+ p_parent_id: string;
10849
+ p_parent_key: string;
10850
+ p_parent_kind: string;
10851
+ p_quantity: number;
10852
+ p_user_id: string;
10853
+ };
10854
+ Returns: import("../integrations/supabase/types").Json;
10855
+ };
10469
10856
  consume_floriday_rate_limit: {
10470
10857
  Args: {
10471
10858
  p_bucket: string;
@@ -10517,6 +10904,13 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
10517
10904
  table_name: string;
10518
10905
  }[];
10519
10906
  };
10907
+ delete_samenstelling: {
10908
+ Args: {
10909
+ p_parent_id: string;
10910
+ p_parent_kind: string;
10911
+ };
10912
+ Returns: import("../integrations/supabase/types").Json;
10913
+ };
10520
10914
  dispatch_carrier_signups_sql: {
10521
10915
  Args: {
10522
10916
  _catchup?: string;
@@ -10677,19 +11071,6 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
10677
11071
  resource: string;
10678
11072
  }[];
10679
11073
  };
10680
- get_floriday_agreements_active: {
10681
- Args: {
10682
- p_on_date?: string;
10683
- };
10684
- Returns: {
10685
- buyer_organization_id: string;
10686
- data: import("../integrations/supabase/types").Json;
10687
- floriday_id: string;
10688
- status: string;
10689
- valid_from: string;
10690
- valid_until: string;
10691
- }[];
10692
- };
10693
11074
  get_floriday_clock_supplies_window: {
10694
11075
  Args: {
10695
11076
  p_from: string;
@@ -10762,6 +11143,21 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
10762
11143
  minutes_since_success: number;
10763
11144
  }[];
10764
11145
  };
11146
+ get_group_allocation_keys: {
11147
+ Args: {
11148
+ p_product_id: string;
11149
+ };
11150
+ Returns: {
11151
+ k: string;
11152
+ ord: number;
11153
+ }[];
11154
+ };
11155
+ get_group_head_key: {
11156
+ Args: {
11157
+ p_group_id: string;
11158
+ };
11159
+ Returns: string;
11160
+ };
10765
11161
  get_offer_by_link_code: {
10766
11162
  Args: {
10767
11163
  p_code: string;
@@ -10872,6 +11268,18 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
10872
11268
  };
10873
11269
  Returns: undefined;
10874
11270
  };
11271
+ mark_shipment_shipped: {
11272
+ Args: {
11273
+ p_shipment_id: string;
11274
+ };
11275
+ Returns: undefined;
11276
+ };
11277
+ next_manufacture_partij: {
11278
+ Args: {
11279
+ _tenant_id: string;
11280
+ };
11281
+ Returns: string;
11282
+ };
10875
11283
  next_order_number: {
10876
11284
  Args: {
10877
11285
  p_prefix: string;
@@ -10950,6 +11358,14 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
10950
11358
  };
10951
11359
  Returns: undefined;
10952
11360
  };
11361
+ produce_designed_product: {
11362
+ Args: {
11363
+ p_parent_id: string;
11364
+ p_parent_kind: string;
11365
+ p_quantity: number;
11366
+ };
11367
+ Returns: import("../integrations/supabase/types").Json;
11368
+ };
10953
11369
  promote_trade_item_key: {
10954
11370
  Args: {
10955
11371
  p_new: string;
@@ -10957,6 +11373,10 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
10957
11373
  };
10958
11374
  Returns: undefined;
10959
11375
  };
11376
+ recompute_all_reserved_stock: {
11377
+ Args: never;
11378
+ Returns: undefined;
11379
+ };
10960
11380
  recompute_order_status: {
10961
11381
  Args: {
10962
11382
  p_order_id: string;
@@ -11006,27 +11426,45 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
11006
11426
  };
11007
11427
  Returns: undefined;
11008
11428
  };
11429
+ resolve_group_allocation: {
11430
+ Args: {
11431
+ _needed: number;
11432
+ _product_group_id: string;
11433
+ };
11434
+ Returns: {
11435
+ allocated: number;
11436
+ trade_item_id: string;
11437
+ }[];
11438
+ };
11439
+ resolve_group_member_stock_key: {
11440
+ Args: {
11441
+ p_trade_item_id: string;
11442
+ };
11443
+ Returns: string;
11444
+ };
11009
11445
  resolve_product_id_for_item: {
11010
11446
  Args: {
11011
11447
  p_product_name: string;
11012
11448
  };
11013
11449
  Returns: string;
11014
11450
  };
11015
- schedule_floriday_additional_services_sync: {
11451
+ resolve_stock_trade_item_key: {
11016
11452
  Args: {
11017
- p_apikey: string;
11018
- p_url: string;
11453
+ p_product_id: string;
11019
11454
  };
11020
- Returns: number;
11455
+ Returns: string;
11021
11456
  };
11022
- schedule_floriday_agreement_calloffs_sync: {
11457
+ reverse_production: {
11023
11458
  Args: {
11024
- p_apikey: string;
11025
- p_url: string;
11459
+ p_connection_id?: string;
11460
+ p_parent_key: string;
11461
+ p_quantity: number;
11462
+ p_reason?: string;
11463
+ p_user_id?: string;
11026
11464
  };
11027
- Returns: number;
11465
+ Returns: import("../integrations/supabase/types").Json;
11028
11466
  };
11029
- schedule_floriday_agreements_sync: {
11467
+ schedule_floriday_additional_services_sync: {
11030
11468
  Args: {
11031
11469
  p_apikey: string;
11032
11470
  p_url: string;
@@ -11607,6 +12045,165 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
11607
12045
  };
11608
12046
  Relationships: [];
11609
12047
  };
12048
+ ai_credentials: {
12049
+ Row: {
12050
+ active: boolean;
12051
+ api_key: string;
12052
+ created_at: string;
12053
+ created_by: string | null;
12054
+ id: string;
12055
+ label: string;
12056
+ provider_id: string;
12057
+ updated_at: string;
12058
+ };
12059
+ Insert: {
12060
+ active?: boolean;
12061
+ api_key: string;
12062
+ created_at?: string;
12063
+ created_by?: string | null;
12064
+ id?: string;
12065
+ label: string;
12066
+ provider_id: string;
12067
+ updated_at?: string;
12068
+ };
12069
+ Update: {
12070
+ active?: boolean;
12071
+ api_key?: string;
12072
+ created_at?: string;
12073
+ created_by?: string | null;
12074
+ id?: string;
12075
+ label?: string;
12076
+ provider_id?: string;
12077
+ updated_at?: string;
12078
+ };
12079
+ Relationships: [{
12080
+ foreignKeyName: "ai_credentials_provider_id_fkey";
12081
+ columns: ["provider_id"];
12082
+ isOneToOne: false;
12083
+ referencedRelation: "ai_providers";
12084
+ referencedColumns: ["id"];
12085
+ }];
12086
+ };
12087
+ ai_models: {
12088
+ Row: {
12089
+ active: boolean;
12090
+ context_window: number | null;
12091
+ created_at: string;
12092
+ display_name: string;
12093
+ id: string;
12094
+ is_default: boolean;
12095
+ modality: string;
12096
+ provider_id: string;
12097
+ slug: string;
12098
+ updated_at: string;
12099
+ };
12100
+ Insert: {
12101
+ active?: boolean;
12102
+ context_window?: number | null;
12103
+ created_at?: string;
12104
+ display_name: string;
12105
+ id?: string;
12106
+ is_default?: boolean;
12107
+ modality?: string;
12108
+ provider_id: string;
12109
+ slug: string;
12110
+ updated_at?: string;
12111
+ };
12112
+ Update: {
12113
+ active?: boolean;
12114
+ context_window?: number | null;
12115
+ created_at?: string;
12116
+ display_name?: string;
12117
+ id?: string;
12118
+ is_default?: boolean;
12119
+ modality?: string;
12120
+ provider_id?: string;
12121
+ slug?: string;
12122
+ updated_at?: string;
12123
+ };
12124
+ Relationships: [{
12125
+ foreignKeyName: "ai_models_provider_id_fkey";
12126
+ columns: ["provider_id"];
12127
+ isOneToOne: false;
12128
+ referencedRelation: "ai_providers";
12129
+ referencedColumns: ["id"];
12130
+ }];
12131
+ };
12132
+ ai_module_bindings: {
12133
+ Row: {
12134
+ consumer_module_id: string;
12135
+ created_at: string;
12136
+ credential_id: string;
12137
+ id: string;
12138
+ model_id: string;
12139
+ notes: string | null;
12140
+ updated_at: string;
12141
+ };
12142
+ Insert: {
12143
+ consumer_module_id: string;
12144
+ created_at?: string;
12145
+ credential_id: string;
12146
+ id?: string;
12147
+ model_id: string;
12148
+ notes?: string | null;
12149
+ updated_at?: string;
12150
+ };
12151
+ Update: {
12152
+ consumer_module_id?: string;
12153
+ created_at?: string;
12154
+ credential_id?: string;
12155
+ id?: string;
12156
+ model_id?: string;
12157
+ notes?: string | null;
12158
+ updated_at?: string;
12159
+ };
12160
+ Relationships: [{
12161
+ foreignKeyName: "ai_module_bindings_credential_id_fkey";
12162
+ columns: ["credential_id"];
12163
+ isOneToOne: false;
12164
+ referencedRelation: "ai_credentials";
12165
+ referencedColumns: ["id"];
12166
+ }, {
12167
+ foreignKeyName: "ai_module_bindings_model_id_fkey";
12168
+ columns: ["model_id"];
12169
+ isOneToOne: false;
12170
+ referencedRelation: "ai_models";
12171
+ referencedColumns: ["id"];
12172
+ }];
12173
+ };
12174
+ ai_providers: {
12175
+ Row: {
12176
+ active: boolean;
12177
+ auth_type: string;
12178
+ base_url: string | null;
12179
+ created_at: string;
12180
+ id: string;
12181
+ name: string;
12182
+ slug: string;
12183
+ updated_at: string;
12184
+ };
12185
+ Insert: {
12186
+ active?: boolean;
12187
+ auth_type?: string;
12188
+ base_url?: string | null;
12189
+ created_at?: string;
12190
+ id?: string;
12191
+ name: string;
12192
+ slug: string;
12193
+ updated_at?: string;
12194
+ };
12195
+ Update: {
12196
+ active?: boolean;
12197
+ auth_type?: string;
12198
+ base_url?: string | null;
12199
+ created_at?: string;
12200
+ id?: string;
12201
+ name?: string;
12202
+ slug?: string;
12203
+ updated_at?: string;
12204
+ };
12205
+ Relationships: [];
12206
+ };
11610
12207
  app_settings: {
11611
12208
  Row: {
11612
12209
  created_at: string;
@@ -14613,148 +15210,49 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
14613
15210
  referencedColumns: ["id"];
14614
15211
  }];
14615
15212
  };
14616
- floriday_agreement_calloffs_cache: {
15213
+ floriday_auction_letters_cache: {
14617
15214
  Row: {
14618
- agreement_id: string | null;
15215
+ auction_letter_code: string;
15216
+ clock_supply_id: string;
14619
15217
  connection_id: string;
14620
- data: import("../integrations/supabase/types").Json;
14621
- delivery_date: string | null;
15218
+ content_type: string;
14622
15219
  fetched_at: string;
14623
- floriday_id: string;
14624
15220
  id: string;
14625
- is_deleted: boolean;
14626
- sequence_number: number;
14627
- status: string | null;
14628
- updated_at: string;
15221
+ storage_path: string;
14629
15222
  };
14630
15223
  Insert: {
14631
- agreement_id?: string | null;
15224
+ auction_letter_code: string;
15225
+ clock_supply_id: string;
14632
15226
  connection_id: string;
14633
- data?: import("../integrations/supabase/types").Json;
14634
- delivery_date?: string | null;
15227
+ content_type?: string;
14635
15228
  fetched_at?: string;
14636
- floriday_id: string;
14637
15229
  id?: string;
14638
- is_deleted?: boolean;
14639
- sequence_number?: number;
14640
- status?: string | null;
14641
- updated_at?: string;
15230
+ storage_path: string;
14642
15231
  };
14643
15232
  Update: {
14644
- agreement_id?: string | null;
15233
+ auction_letter_code?: string;
15234
+ clock_supply_id?: string;
14645
15235
  connection_id?: string;
14646
- data?: import("../integrations/supabase/types").Json;
14647
- delivery_date?: string | null;
15236
+ content_type?: string;
14648
15237
  fetched_at?: string;
14649
- floriday_id?: string;
14650
15238
  id?: string;
14651
- is_deleted?: boolean;
14652
- sequence_number?: number;
14653
- status?: string | null;
14654
- updated_at?: string;
15239
+ storage_path?: string;
14655
15240
  };
14656
15241
  Relationships: [{
14657
- foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
15242
+ foreignKeyName: "floriday_auction_letters_cache_connection_id_fkey";
14658
15243
  columns: ["connection_id"];
14659
15244
  isOneToOne: false;
14660
15245
  referencedRelation: "floriday_connections";
14661
15246
  referencedColumns: ["id"];
14662
15247
  }];
14663
15248
  };
14664
- floriday_agreements_cache: {
15249
+ floriday_auto_fulfillment_log: {
14665
15250
  Row: {
14666
- buyer_organization_id: string | null;
15251
+ attempts: number;
14667
15252
  connection_id: string;
14668
- data: import("../integrations/supabase/types").Json;
14669
- fetched_at: string;
14670
- floriday_id: string;
14671
- id: string;
14672
- is_deleted: boolean;
14673
- sequence_number: number;
14674
- status: string | null;
14675
- updated_at: string;
14676
- valid_from: string | null;
14677
- valid_until: string | null;
14678
- };
14679
- Insert: {
14680
- buyer_organization_id?: string | null;
14681
- connection_id: string;
14682
- data?: import("../integrations/supabase/types").Json;
14683
- fetched_at?: string;
14684
- floriday_id: string;
14685
- id?: string;
14686
- is_deleted?: boolean;
14687
- sequence_number?: number;
14688
- status?: string | null;
14689
- updated_at?: string;
14690
- valid_from?: string | null;
14691
- valid_until?: string | null;
14692
- };
14693
- Update: {
14694
- buyer_organization_id?: string | null;
14695
- connection_id?: string;
14696
- data?: import("../integrations/supabase/types").Json;
14697
- fetched_at?: string;
14698
- floriday_id?: string;
14699
- id?: string;
14700
- is_deleted?: boolean;
14701
- sequence_number?: number;
14702
- status?: string | null;
14703
- updated_at?: string;
14704
- valid_from?: string | null;
14705
- valid_until?: string | null;
14706
- };
14707
- Relationships: [{
14708
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
14709
- columns: ["connection_id"];
14710
- isOneToOne: false;
14711
- referencedRelation: "floriday_connections";
14712
- referencedColumns: ["id"];
14713
- }];
14714
- };
14715
- floriday_auction_letters_cache: {
14716
- Row: {
14717
- auction_letter_code: string;
14718
- clock_supply_id: string;
14719
- connection_id: string;
14720
- content_type: string;
14721
- fetched_at: string;
14722
- id: string;
14723
- storage_path: string;
14724
- };
14725
- Insert: {
14726
- auction_letter_code: string;
14727
- clock_supply_id: string;
14728
- connection_id: string;
14729
- content_type?: string;
14730
- fetched_at?: string;
14731
- id?: string;
14732
- storage_path: string;
14733
- };
14734
- Update: {
14735
- auction_letter_code?: string;
14736
- clock_supply_id?: string;
14737
- connection_id?: string;
14738
- content_type?: string;
14739
- fetched_at?: string;
14740
- id?: string;
14741
- storage_path?: string;
14742
- };
14743
- Relationships: [{
14744
- foreignKeyName: "floriday_auction_letters_cache_connection_id_fkey";
14745
- columns: ["connection_id"];
14746
- isOneToOne: false;
14747
- referencedRelation: "floriday_connections";
14748
- referencedColumns: ["id"];
14749
- }];
14750
- };
14751
- floriday_auto_fulfillment_log: {
14752
- Row: {
14753
- attempts: number;
14754
- connection_id: string;
14755
- created_at: string;
14756
- error: string | null;
14757
- fulfillment_order_id: string | null;
15253
+ created_at: string;
15254
+ error: string | null;
15255
+ fulfillment_order_id: string | null;
14758
15256
  id: string;
14759
15257
  last_attempt_at: string | null;
14760
15258
  reason: string | null;
@@ -15210,6 +15708,27 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
15210
15708
  referencedColumns: ["id"];
15211
15709
  }];
15212
15710
  };
15711
+ floriday_continuous_stock_cache: {
15712
+ Row: {
15713
+ connection_id: string;
15714
+ fetched_at: string;
15715
+ number_of_pieces: number;
15716
+ trade_item_id: string;
15717
+ };
15718
+ Insert: {
15719
+ connection_id: string;
15720
+ fetched_at?: string;
15721
+ number_of_pieces?: number;
15722
+ trade_item_id: string;
15723
+ };
15724
+ Update: {
15725
+ connection_id?: string;
15726
+ fetched_at?: string;
15727
+ number_of_pieces?: number;
15728
+ trade_item_id?: string;
15729
+ };
15730
+ Relationships: [];
15731
+ };
15213
15732
  floriday_continuous_stock_queue: {
15214
15733
  Row: {
15215
15734
  attempts: number;
@@ -16188,6 +16707,45 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
16188
16707
  referencedColumns: ["id"];
16189
16708
  }];
16190
16709
  };
16710
+ floriday_trade_settings_customers_cache: {
16711
+ Row: {
16712
+ connection_id: string;
16713
+ data: import("../integrations/supabase/types").Json;
16714
+ fetched_at: string;
16715
+ floriday_id: string;
16716
+ id: string;
16717
+ is_deleted: boolean;
16718
+ sequence_number: number;
16719
+ updated_at: string;
16720
+ };
16721
+ Insert: {
16722
+ connection_id: string;
16723
+ data: import("../integrations/supabase/types").Json;
16724
+ fetched_at?: string;
16725
+ floriday_id: string;
16726
+ id?: string;
16727
+ is_deleted?: boolean;
16728
+ sequence_number?: number;
16729
+ updated_at?: string;
16730
+ };
16731
+ Update: {
16732
+ connection_id?: string;
16733
+ data?: import("../integrations/supabase/types").Json;
16734
+ fetched_at?: string;
16735
+ floriday_id?: string;
16736
+ id?: string;
16737
+ is_deleted?: boolean;
16738
+ sequence_number?: number;
16739
+ updated_at?: string;
16740
+ };
16741
+ Relationships: [{
16742
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
16743
+ columns: ["connection_id"];
16744
+ isOneToOne: false;
16745
+ referencedRelation: "floriday_connections";
16746
+ referencedColumns: ["id"];
16747
+ }];
16748
+ };
16191
16749
  floriday_trips_cache: {
16192
16750
  Row: {
16193
16751
  carrier_organization_id: string | null;
@@ -17333,39 +17891,60 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
17333
17891
  };
17334
17892
  manufacture_products: {
17335
17893
  Row: {
17894
+ aantal_te_produceren: number;
17336
17895
  created_at: string;
17337
17896
  description: string | null;
17338
17897
  id: string;
17339
17898
  is_active: boolean;
17899
+ location_id: string | null;
17340
17900
  name: string;
17901
+ partij_nummer: string | null;
17902
+ photos: import("../integrations/supabase/types").Json;
17341
17903
  produced_stock: number;
17342
17904
  product_code: string;
17343
17905
  tenant_id: string;
17906
+ unit: string;
17344
17907
  updated_at: string;
17345
17908
  };
17346
17909
  Insert: {
17910
+ aantal_te_produceren?: number;
17347
17911
  created_at?: string;
17348
17912
  description?: string | null;
17349
17913
  id?: string;
17350
17914
  is_active?: boolean;
17915
+ location_id?: string | null;
17351
17916
  name: string;
17917
+ partij_nummer?: string | null;
17918
+ photos?: import("../integrations/supabase/types").Json;
17352
17919
  produced_stock?: number;
17353
17920
  product_code: string;
17354
17921
  tenant_id: string;
17922
+ unit?: string;
17355
17923
  updated_at?: string;
17356
17924
  };
17357
17925
  Update: {
17926
+ aantal_te_produceren?: number;
17358
17927
  created_at?: string;
17359
17928
  description?: string | null;
17360
17929
  id?: string;
17361
17930
  is_active?: boolean;
17931
+ location_id?: string | null;
17362
17932
  name?: string;
17933
+ partij_nummer?: string | null;
17934
+ photos?: import("../integrations/supabase/types").Json;
17363
17935
  produced_stock?: number;
17364
17936
  product_code?: string;
17365
17937
  tenant_id?: string;
17938
+ unit?: string;
17366
17939
  updated_at?: string;
17367
17940
  };
17368
- Relationships: [];
17941
+ Relationships: [{
17942
+ foreignKeyName: "manufacture_products_location_id_fkey";
17943
+ columns: ["location_id"];
17944
+ isOneToOne: false;
17945
+ referencedRelation: "locations";
17946
+ referencedColumns: ["id"];
17947
+ }];
17369
17948
  };
17370
17949
  monteurs: {
17371
17950
  Row: {
@@ -18339,6 +18918,105 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
18339
18918
  };
18340
18919
  Relationships: [];
18341
18920
  };
18921
+ order_shipment_items: {
18922
+ Row: {
18923
+ created_at: string;
18924
+ id: string;
18925
+ order_item_id: string;
18926
+ product_id: string | null;
18927
+ product_name: string;
18928
+ quantity: number;
18929
+ shipment_id: string;
18930
+ updated_at: string;
18931
+ };
18932
+ Insert: {
18933
+ created_at?: string;
18934
+ id?: string;
18935
+ order_item_id: string;
18936
+ product_id?: string | null;
18937
+ product_name: string;
18938
+ quantity: number;
18939
+ shipment_id: string;
18940
+ updated_at?: string;
18941
+ };
18942
+ Update: {
18943
+ created_at?: string;
18944
+ id?: string;
18945
+ order_item_id?: string;
18946
+ product_id?: string | null;
18947
+ product_name?: string;
18948
+ quantity?: number;
18949
+ shipment_id?: string;
18950
+ updated_at?: string;
18951
+ };
18952
+ Relationships: [{
18953
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
18954
+ columns: ["order_item_id"];
18955
+ isOneToOne: false;
18956
+ referencedRelation: "order_items";
18957
+ referencedColumns: ["id"];
18958
+ }, {
18959
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
18960
+ columns: ["shipment_id"];
18961
+ isOneToOne: false;
18962
+ referencedRelation: "order_shipments";
18963
+ referencedColumns: ["id"];
18964
+ }];
18965
+ };
18966
+ order_shipments: {
18967
+ Row: {
18968
+ carrier_id: string | null;
18969
+ created_at: string;
18970
+ delivery_date: string | null;
18971
+ delivery_location_id: string | null;
18972
+ id: string;
18973
+ notes: string | null;
18974
+ order_id: string;
18975
+ shipment_number: number;
18976
+ shipped_at: string | null;
18977
+ status: string;
18978
+ updated_at: string;
18979
+ };
18980
+ Insert: {
18981
+ carrier_id?: string | null;
18982
+ created_at?: string;
18983
+ delivery_date?: string | null;
18984
+ delivery_location_id?: string | null;
18985
+ id?: string;
18986
+ notes?: string | null;
18987
+ order_id: string;
18988
+ shipment_number: number;
18989
+ shipped_at?: string | null;
18990
+ status?: string;
18991
+ updated_at?: string;
18992
+ };
18993
+ Update: {
18994
+ carrier_id?: string | null;
18995
+ created_at?: string;
18996
+ delivery_date?: string | null;
18997
+ delivery_location_id?: string | null;
18998
+ id?: string;
18999
+ notes?: string | null;
19000
+ order_id?: string;
19001
+ shipment_number?: number;
19002
+ shipped_at?: string | null;
19003
+ status?: string;
19004
+ updated_at?: string;
19005
+ };
19006
+ Relationships: [{
19007
+ foreignKeyName: "order_shipments_carrier_id_fkey";
19008
+ columns: ["carrier_id"];
19009
+ isOneToOne: false;
19010
+ referencedRelation: "carriers";
19011
+ referencedColumns: ["id"];
19012
+ }, {
19013
+ foreignKeyName: "order_shipments_order_id_fkey";
19014
+ columns: ["order_id"];
19015
+ isOneToOne: false;
19016
+ referencedRelation: "orders";
19017
+ referencedColumns: ["id"];
19018
+ }];
19019
+ };
18342
19020
  orders: {
18343
19021
  Row: {
18344
19022
  created_at: string;
@@ -18346,8 +19024,9 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
18346
19024
  customer_id: string | null;
18347
19025
  customer_name: string;
18348
19026
  deleted_at: string | null;
18349
- delivery_date: string;
19027
+ delivery_date: string | null;
18350
19028
  id: string;
19029
+ is_reservation: boolean;
18351
19030
  notes: string | null;
18352
19031
  order_date: string;
18353
19032
  order_number: string;
@@ -18364,8 +19043,9 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
18364
19043
  customer_id?: string | null;
18365
19044
  customer_name?: string;
18366
19045
  deleted_at?: string | null;
18367
- delivery_date: string;
19046
+ delivery_date?: string | null;
18368
19047
  id?: string;
19048
+ is_reservation?: boolean;
18369
19049
  notes?: string | null;
18370
19050
  order_date?: string;
18371
19051
  order_number: string;
@@ -18382,8 +19062,9 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
18382
19062
  customer_id?: string | null;
18383
19063
  customer_name?: string;
18384
19064
  deleted_at?: string | null;
18385
- delivery_date?: string;
19065
+ delivery_date?: string | null;
18386
19066
  id?: string;
19067
+ is_reservation?: boolean;
18387
19068
  notes?: string | null;
18388
19069
  order_date?: string;
18389
19070
  order_number?: string;
@@ -18525,6 +19206,63 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
18525
19206
  };
18526
19207
  Relationships: [];
18527
19208
  };
19209
+ product_bom_items: {
19210
+ Row: {
19211
+ component_product_id: string | null;
19212
+ component_trade_item_floriday_id: string | null;
19213
+ created_at: string;
19214
+ id: string;
19215
+ notes: string | null;
19216
+ parent_product_id: string | null;
19217
+ parent_trade_item_floriday_id: string | null;
19218
+ quantity: number;
19219
+ sort_order: number;
19220
+ tenant_id: string;
19221
+ unit: string;
19222
+ updated_at: string;
19223
+ };
19224
+ Insert: {
19225
+ component_product_id?: string | null;
19226
+ component_trade_item_floriday_id?: string | null;
19227
+ created_at?: string;
19228
+ id?: string;
19229
+ notes?: string | null;
19230
+ parent_product_id?: string | null;
19231
+ parent_trade_item_floriday_id?: string | null;
19232
+ quantity?: number;
19233
+ sort_order?: number;
19234
+ tenant_id: string;
19235
+ unit?: string;
19236
+ updated_at?: string;
19237
+ };
19238
+ Update: {
19239
+ component_product_id?: string | null;
19240
+ component_trade_item_floriday_id?: string | null;
19241
+ created_at?: string;
19242
+ id?: string;
19243
+ notes?: string | null;
19244
+ parent_product_id?: string | null;
19245
+ parent_trade_item_floriday_id?: string | null;
19246
+ quantity?: number;
19247
+ sort_order?: number;
19248
+ tenant_id?: string;
19249
+ unit?: string;
19250
+ updated_at?: string;
19251
+ };
19252
+ Relationships: [{
19253
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
19254
+ columns: ["component_product_id"];
19255
+ isOneToOne: false;
19256
+ referencedRelation: "products";
19257
+ referencedColumns: ["id"];
19258
+ }, {
19259
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
19260
+ columns: ["parent_product_id"];
19261
+ isOneToOne: false;
19262
+ referencedRelation: "products";
19263
+ referencedColumns: ["id"];
19264
+ }];
19265
+ };
18528
19266
  product_categories: {
18529
19267
  Row: {
18530
19268
  color: string;
@@ -18630,6 +19368,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
18630
19368
  id: string;
18631
19369
  product_group_id: string;
18632
19370
  quantity: number;
19371
+ sort_order: number;
18633
19372
  trade_item_id: string;
18634
19373
  };
18635
19374
  Insert: {
@@ -18637,6 +19376,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
18637
19376
  id?: string;
18638
19377
  product_group_id: string;
18639
19378
  quantity?: number;
19379
+ sort_order?: number;
18640
19380
  trade_item_id: string;
18641
19381
  };
18642
19382
  Update: {
@@ -18644,6 +19384,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
18644
19384
  id?: string;
18645
19385
  product_group_id?: string;
18646
19386
  quantity?: number;
19387
+ sort_order?: number;
18647
19388
  trade_item_id?: string;
18648
19389
  };
18649
19390
  Relationships: [{
@@ -18658,6 +19399,8 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
18658
19399
  Row: {
18659
19400
  created_at: string;
18660
19401
  description: string | null;
19402
+ head_product_id: string | null;
19403
+ head_trade_item_floriday_id: string | null;
18661
19404
  id: string;
18662
19405
  is_active: boolean;
18663
19406
  name: string;
@@ -18667,6 +19410,8 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
18667
19410
  Insert: {
18668
19411
  created_at?: string;
18669
19412
  description?: string | null;
19413
+ head_product_id?: string | null;
19414
+ head_trade_item_floriday_id?: string | null;
18670
19415
  id?: string;
18671
19416
  is_active?: boolean;
18672
19417
  name: string;
@@ -18676,16 +19421,85 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
18676
19421
  Update: {
18677
19422
  created_at?: string;
18678
19423
  description?: string | null;
19424
+ head_product_id?: string | null;
19425
+ head_trade_item_floriday_id?: string | null;
18679
19426
  id?: string;
18680
19427
  is_active?: boolean;
18681
19428
  name?: string;
18682
19429
  tenant_id?: string;
18683
19430
  updated_at?: string;
18684
19431
  };
18685
- Relationships: [];
19432
+ Relationships: [{
19433
+ foreignKeyName: "product_groups_head_product_id_fkey";
19434
+ columns: ["head_product_id"];
19435
+ isOneToOne: false;
19436
+ referencedRelation: "products";
19437
+ referencedColumns: ["id"];
19438
+ }];
19439
+ };
19440
+ product_load_settings: {
19441
+ Row: {
19442
+ created_at: string;
19443
+ id: string;
19444
+ is_package: boolean;
19445
+ layers_per_load_carrier: number | null;
19446
+ load_carrier: string | null;
19447
+ package_id: string | null;
19448
+ package_label: string | null;
19449
+ packages_per_layer: number | null;
19450
+ product_id: string | null;
19451
+ tenant_id: string;
19452
+ trade_item_floriday_id: string | null;
19453
+ units_per_package: number | null;
19454
+ updated_at: string;
19455
+ };
19456
+ Insert: {
19457
+ created_at?: string;
19458
+ id?: string;
19459
+ is_package?: boolean;
19460
+ layers_per_load_carrier?: number | null;
19461
+ load_carrier?: string | null;
19462
+ package_id?: string | null;
19463
+ package_label?: string | null;
19464
+ packages_per_layer?: number | null;
19465
+ product_id?: string | null;
19466
+ tenant_id: string;
19467
+ trade_item_floriday_id?: string | null;
19468
+ units_per_package?: number | null;
19469
+ updated_at?: string;
19470
+ };
19471
+ Update: {
19472
+ created_at?: string;
19473
+ id?: string;
19474
+ is_package?: boolean;
19475
+ layers_per_load_carrier?: number | null;
19476
+ load_carrier?: string | null;
19477
+ package_id?: string | null;
19478
+ package_label?: string | null;
19479
+ packages_per_layer?: number | null;
19480
+ product_id?: string | null;
19481
+ tenant_id?: string;
19482
+ trade_item_floriday_id?: string | null;
19483
+ units_per_package?: number | null;
19484
+ updated_at?: string;
19485
+ };
19486
+ Relationships: [{
19487
+ foreignKeyName: "product_load_settings_package_id_fkey";
19488
+ columns: ["package_id"];
19489
+ isOneToOne: false;
19490
+ referencedRelation: "packages";
19491
+ referencedColumns: ["id"];
19492
+ }, {
19493
+ foreignKeyName: "product_load_settings_product_id_fkey";
19494
+ columns: ["product_id"];
19495
+ isOneToOne: false;
19496
+ referencedRelation: "products";
19497
+ referencedColumns: ["id"];
19498
+ }];
18686
19499
  };
18687
19500
  products: {
18688
19501
  Row: {
19502
+ article_number: string | null;
18689
19503
  barcode: string | null;
18690
19504
  batch: string;
18691
19505
  crates_per_layer: number;
@@ -18709,6 +19523,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
18709
19523
  weight: string | null;
18710
19524
  };
18711
19525
  Insert: {
19526
+ article_number?: string | null;
18712
19527
  barcode?: string | null;
18713
19528
  batch: string;
18714
19529
  crates_per_layer?: number;
@@ -18732,6 +19547,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
18732
19547
  weight?: string | null;
18733
19548
  };
18734
19549
  Update: {
19550
+ article_number?: string | null;
18735
19551
  barcode?: string | null;
18736
19552
  batch?: string;
18737
19553
  crates_per_layer?: number;
@@ -19645,8 +20461,10 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
19645
20461
  order_id: string | null;
19646
20462
  order_item_id: string | null;
19647
20463
  order_source: string | null;
20464
+ parent_trade_item_key: string | null;
19648
20465
  physical_after: number | null;
19649
20466
  physical_before: number | null;
20467
+ production_batch_id: string | null;
19650
20468
  qty_delta: number;
19651
20469
  reason: string | null;
19652
20470
  reserved_after: number | null;
@@ -19662,8 +20480,10 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
19662
20480
  order_id?: string | null;
19663
20481
  order_item_id?: string | null;
19664
20482
  order_source?: string | null;
20483
+ parent_trade_item_key?: string | null;
19665
20484
  physical_after?: number | null;
19666
20485
  physical_before?: number | null;
20486
+ production_batch_id?: string | null;
19667
20487
  qty_delta: number;
19668
20488
  reason?: string | null;
19669
20489
  reserved_after?: number | null;
@@ -19679,8 +20499,10 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
19679
20499
  order_id?: string | null;
19680
20500
  order_item_id?: string | null;
19681
20501
  order_source?: string | null;
20502
+ parent_trade_item_key?: string | null;
19682
20503
  physical_after?: number | null;
19683
20504
  physical_before?: number | null;
20505
+ production_batch_id?: string | null;
19684
20506
  qty_delta?: number;
19685
20507
  reason?: string | null;
19686
20508
  reserved_after?: number | null;
@@ -20139,7 +20961,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
20139
20961
  twinfield_connections: {
20140
20962
  Row: {
20141
20963
  access_token: string | null;
20142
- client_id: string;
20964
+ client_id: string | null;
20143
20965
  client_secret: string | null;
20144
20966
  cluster_uri: string | null;
20145
20967
  company_code: string | null;
@@ -20151,7 +20973,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
20151
20973
  is_active: boolean;
20152
20974
  label: string | null;
20153
20975
  office_code: string | null;
20154
- redirect_uri: string;
20976
+ redirect_uri: string | null;
20155
20977
  refresh_token: string | null;
20156
20978
  token_expires_at: string | null;
20157
20979
  updated_at: string;
@@ -20159,7 +20981,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
20159
20981
  };
20160
20982
  Insert: {
20161
20983
  access_token?: string | null;
20162
- client_id: string;
20984
+ client_id?: string | null;
20163
20985
  client_secret?: string | null;
20164
20986
  cluster_uri?: string | null;
20165
20987
  company_code?: string | null;
@@ -20171,7 +20993,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
20171
20993
  is_active?: boolean;
20172
20994
  label?: string | null;
20173
20995
  office_code?: string | null;
20174
- redirect_uri: string;
20996
+ redirect_uri?: string | null;
20175
20997
  refresh_token?: string | null;
20176
20998
  token_expires_at?: string | null;
20177
20999
  updated_at?: string;
@@ -20179,7 +21001,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
20179
21001
  };
20180
21002
  Update: {
20181
21003
  access_token?: string | null;
20182
- client_id?: string;
21004
+ client_id?: string | null;
20183
21005
  client_secret?: string | null;
20184
21006
  cluster_uri?: string | null;
20185
21007
  company_code?: string | null;
@@ -20191,7 +21013,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
20191
21013
  is_active?: boolean;
20192
21014
  label?: string | null;
20193
21015
  office_code?: string | null;
20194
- redirect_uri?: string;
21016
+ redirect_uri?: string | null;
20195
21017
  refresh_token?: string | null;
20196
21018
  token_expires_at?: string | null;
20197
21019
  updated_at?: string;
@@ -21386,25 +22208,6 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
21386
22208
  };
21387
22209
  Relationships: [];
21388
22210
  };
21389
- floriday_customer_discounts: {
21390
- Row: {
21391
- base_price: number | null;
21392
- buyer_organization_id: string | null;
21393
- currency: string | null;
21394
- discount_type: string | null;
21395
- discount_value: number | null;
21396
- min_quantity: number | null;
21397
- net_price: number | null;
21398
- product_group_id: string | null;
21399
- raw: import("../integrations/supabase/types").Json | null;
21400
- source: string | null;
21401
- source_id: string | null;
21402
- trade_item_id: string | null;
21403
- valid_from: string | null;
21404
- valid_until: string | null;
21405
- };
21406
- Relationships: [];
21407
- };
21408
22211
  local_customer_discounts: {
21409
22212
  Row: {
21410
22213
  base_price: number | null;
@@ -21823,6 +22626,28 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
21823
22626
  Args: never;
21824
22627
  Returns: undefined;
21825
22628
  };
22629
+ consume_bom_for_production: {
22630
+ Args: {
22631
+ p_connection_id: string;
22632
+ p_parent_id: string;
22633
+ p_parent_key: string;
22634
+ p_parent_kind: string;
22635
+ p_quantity: number;
22636
+ p_user_id: string;
22637
+ };
22638
+ Returns: import("../integrations/supabase/types").Json;
22639
+ } | {
22640
+ Args: {
22641
+ p_batch_id?: string;
22642
+ p_connection_id: string;
22643
+ p_parent_id: string;
22644
+ p_parent_key: string;
22645
+ p_parent_kind: string;
22646
+ p_quantity: number;
22647
+ p_user_id: string;
22648
+ };
22649
+ Returns: import("../integrations/supabase/types").Json;
22650
+ };
21826
22651
  consume_floriday_rate_limit: {
21827
22652
  Args: {
21828
22653
  p_bucket: string;
@@ -21874,6 +22699,13 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
21874
22699
  table_name: string;
21875
22700
  }[];
21876
22701
  };
22702
+ delete_samenstelling: {
22703
+ Args: {
22704
+ p_parent_id: string;
22705
+ p_parent_kind: string;
22706
+ };
22707
+ Returns: import("../integrations/supabase/types").Json;
22708
+ };
21877
22709
  dispatch_carrier_signups_sql: {
21878
22710
  Args: {
21879
22711
  _catchup?: string;
@@ -22034,19 +22866,6 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
22034
22866
  resource: string;
22035
22867
  }[];
22036
22868
  };
22037
- get_floriday_agreements_active: {
22038
- Args: {
22039
- p_on_date?: string;
22040
- };
22041
- Returns: {
22042
- buyer_organization_id: string;
22043
- data: import("../integrations/supabase/types").Json;
22044
- floriday_id: string;
22045
- status: string;
22046
- valid_from: string;
22047
- valid_until: string;
22048
- }[];
22049
- };
22050
22869
  get_floriday_clock_supplies_window: {
22051
22870
  Args: {
22052
22871
  p_from: string;
@@ -22119,6 +22938,21 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
22119
22938
  minutes_since_success: number;
22120
22939
  }[];
22121
22940
  };
22941
+ get_group_allocation_keys: {
22942
+ Args: {
22943
+ p_product_id: string;
22944
+ };
22945
+ Returns: {
22946
+ k: string;
22947
+ ord: number;
22948
+ }[];
22949
+ };
22950
+ get_group_head_key: {
22951
+ Args: {
22952
+ p_group_id: string;
22953
+ };
22954
+ Returns: string;
22955
+ };
22122
22956
  get_offer_by_link_code: {
22123
22957
  Args: {
22124
22958
  p_code: string;
@@ -22229,6 +23063,18 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
22229
23063
  };
22230
23064
  Returns: undefined;
22231
23065
  };
23066
+ mark_shipment_shipped: {
23067
+ Args: {
23068
+ p_shipment_id: string;
23069
+ };
23070
+ Returns: undefined;
23071
+ };
23072
+ next_manufacture_partij: {
23073
+ Args: {
23074
+ _tenant_id: string;
23075
+ };
23076
+ Returns: string;
23077
+ };
22232
23078
  next_order_number: {
22233
23079
  Args: {
22234
23080
  p_prefix: string;
@@ -22307,6 +23153,14 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
22307
23153
  };
22308
23154
  Returns: undefined;
22309
23155
  };
23156
+ produce_designed_product: {
23157
+ Args: {
23158
+ p_parent_id: string;
23159
+ p_parent_kind: string;
23160
+ p_quantity: number;
23161
+ };
23162
+ Returns: import("../integrations/supabase/types").Json;
23163
+ };
22310
23164
  promote_trade_item_key: {
22311
23165
  Args: {
22312
23166
  p_new: string;
@@ -22314,6 +23168,10 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
22314
23168
  };
22315
23169
  Returns: undefined;
22316
23170
  };
23171
+ recompute_all_reserved_stock: {
23172
+ Args: never;
23173
+ Returns: undefined;
23174
+ };
22317
23175
  recompute_order_status: {
22318
23176
  Args: {
22319
23177
  p_order_id: string;
@@ -22363,27 +23221,45 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
22363
23221
  };
22364
23222
  Returns: undefined;
22365
23223
  };
23224
+ resolve_group_allocation: {
23225
+ Args: {
23226
+ _needed: number;
23227
+ _product_group_id: string;
23228
+ };
23229
+ Returns: {
23230
+ allocated: number;
23231
+ trade_item_id: string;
23232
+ }[];
23233
+ };
23234
+ resolve_group_member_stock_key: {
23235
+ Args: {
23236
+ p_trade_item_id: string;
23237
+ };
23238
+ Returns: string;
23239
+ };
22366
23240
  resolve_product_id_for_item: {
22367
23241
  Args: {
22368
23242
  p_product_name: string;
22369
23243
  };
22370
23244
  Returns: string;
22371
23245
  };
22372
- schedule_floriday_additional_services_sync: {
23246
+ resolve_stock_trade_item_key: {
22373
23247
  Args: {
22374
- p_apikey: string;
22375
- p_url: string;
23248
+ p_product_id: string;
22376
23249
  };
22377
- Returns: number;
23250
+ Returns: string;
22378
23251
  };
22379
- schedule_floriday_agreement_calloffs_sync: {
23252
+ reverse_production: {
22380
23253
  Args: {
22381
- p_apikey: string;
22382
- p_url: string;
23254
+ p_connection_id?: string;
23255
+ p_parent_key: string;
23256
+ p_quantity: number;
23257
+ p_reason?: string;
23258
+ p_user_id?: string;
22383
23259
  };
22384
- Returns: number;
23260
+ Returns: import("../integrations/supabase/types").Json;
22385
23261
  };
22386
- schedule_floriday_agreements_sync: {
23262
+ schedule_floriday_additional_services_sync: {
22387
23263
  Args: {
22388
23264
  p_apikey: string;
22389
23265
  p_url: string;