@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
@@ -241,6 +241,165 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
241
241
  };
242
242
  Relationships: [];
243
243
  };
244
+ ai_credentials: {
245
+ Row: {
246
+ active: boolean;
247
+ api_key: string;
248
+ created_at: string;
249
+ created_by: string | null;
250
+ id: string;
251
+ label: string;
252
+ provider_id: string;
253
+ updated_at: string;
254
+ };
255
+ Insert: {
256
+ active?: boolean;
257
+ api_key: string;
258
+ created_at?: string;
259
+ created_by?: string | null;
260
+ id?: string;
261
+ label: string;
262
+ provider_id: string;
263
+ updated_at?: string;
264
+ };
265
+ Update: {
266
+ active?: boolean;
267
+ api_key?: string;
268
+ created_at?: string;
269
+ created_by?: string | null;
270
+ id?: string;
271
+ label?: string;
272
+ provider_id?: string;
273
+ updated_at?: string;
274
+ };
275
+ Relationships: [{
276
+ foreignKeyName: "ai_credentials_provider_id_fkey";
277
+ columns: ["provider_id"];
278
+ isOneToOne: false;
279
+ referencedRelation: "ai_providers";
280
+ referencedColumns: ["id"];
281
+ }];
282
+ };
283
+ ai_models: {
284
+ Row: {
285
+ active: boolean;
286
+ context_window: number | null;
287
+ created_at: string;
288
+ display_name: string;
289
+ id: string;
290
+ is_default: boolean;
291
+ modality: string;
292
+ provider_id: string;
293
+ slug: string;
294
+ updated_at: string;
295
+ };
296
+ Insert: {
297
+ active?: boolean;
298
+ context_window?: number | null;
299
+ created_at?: string;
300
+ display_name: string;
301
+ id?: string;
302
+ is_default?: boolean;
303
+ modality?: string;
304
+ provider_id: string;
305
+ slug: string;
306
+ updated_at?: string;
307
+ };
308
+ Update: {
309
+ active?: boolean;
310
+ context_window?: number | null;
311
+ created_at?: string;
312
+ display_name?: string;
313
+ id?: string;
314
+ is_default?: boolean;
315
+ modality?: string;
316
+ provider_id?: string;
317
+ slug?: string;
318
+ updated_at?: string;
319
+ };
320
+ Relationships: [{
321
+ foreignKeyName: "ai_models_provider_id_fkey";
322
+ columns: ["provider_id"];
323
+ isOneToOne: false;
324
+ referencedRelation: "ai_providers";
325
+ referencedColumns: ["id"];
326
+ }];
327
+ };
328
+ ai_module_bindings: {
329
+ Row: {
330
+ consumer_module_id: string;
331
+ created_at: string;
332
+ credential_id: string;
333
+ id: string;
334
+ model_id: string;
335
+ notes: string | null;
336
+ updated_at: string;
337
+ };
338
+ Insert: {
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
+ Update: {
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
+ Relationships: [{
357
+ foreignKeyName: "ai_module_bindings_credential_id_fkey";
358
+ columns: ["credential_id"];
359
+ isOneToOne: false;
360
+ referencedRelation: "ai_credentials";
361
+ referencedColumns: ["id"];
362
+ }, {
363
+ foreignKeyName: "ai_module_bindings_model_id_fkey";
364
+ columns: ["model_id"];
365
+ isOneToOne: false;
366
+ referencedRelation: "ai_models";
367
+ referencedColumns: ["id"];
368
+ }];
369
+ };
370
+ ai_providers: {
371
+ Row: {
372
+ active: boolean;
373
+ auth_type: string;
374
+ base_url: string | null;
375
+ created_at: string;
376
+ id: string;
377
+ name: string;
378
+ slug: string;
379
+ updated_at: string;
380
+ };
381
+ Insert: {
382
+ active?: boolean;
383
+ auth_type?: string;
384
+ base_url?: string | null;
385
+ created_at?: string;
386
+ id?: string;
387
+ name: string;
388
+ slug: string;
389
+ updated_at?: string;
390
+ };
391
+ Update: {
392
+ active?: boolean;
393
+ auth_type?: string;
394
+ base_url?: string | null;
395
+ created_at?: string;
396
+ id?: string;
397
+ name?: string;
398
+ slug?: string;
399
+ updated_at?: string;
400
+ };
401
+ Relationships: [];
402
+ };
244
403
  app_settings: {
245
404
  Row: {
246
405
  created_at: string;
@@ -3247,105 +3406,6 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
3247
3406
  referencedColumns: ["id"];
3248
3407
  }];
3249
3408
  };
3250
- floriday_agreement_calloffs_cache: {
3251
- Row: {
3252
- agreement_id: string | null;
3253
- connection_id: string;
3254
- data: import("../integrations/supabase/types").Json;
3255
- delivery_date: string | null;
3256
- fetched_at: string;
3257
- floriday_id: string;
3258
- id: string;
3259
- is_deleted: boolean;
3260
- sequence_number: number;
3261
- status: string | null;
3262
- updated_at: string;
3263
- };
3264
- Insert: {
3265
- agreement_id?: string | null;
3266
- connection_id: string;
3267
- data?: import("../integrations/supabase/types").Json;
3268
- delivery_date?: string | null;
3269
- fetched_at?: string;
3270
- floriday_id: string;
3271
- id?: string;
3272
- is_deleted?: boolean;
3273
- sequence_number?: number;
3274
- status?: string | null;
3275
- updated_at?: string;
3276
- };
3277
- Update: {
3278
- agreement_id?: string | null;
3279
- connection_id?: string;
3280
- data?: import("../integrations/supabase/types").Json;
3281
- delivery_date?: string | null;
3282
- fetched_at?: string;
3283
- floriday_id?: string;
3284
- id?: string;
3285
- is_deleted?: boolean;
3286
- sequence_number?: number;
3287
- status?: string | null;
3288
- updated_at?: string;
3289
- };
3290
- Relationships: [{
3291
- foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
3292
- columns: ["connection_id"];
3293
- isOneToOne: false;
3294
- referencedRelation: "floriday_connections";
3295
- referencedColumns: ["id"];
3296
- }];
3297
- };
3298
- floriday_agreements_cache: {
3299
- Row: {
3300
- buyer_organization_id: string | null;
3301
- connection_id: string;
3302
- data: import("../integrations/supabase/types").Json;
3303
- fetched_at: string;
3304
- floriday_id: string;
3305
- id: string;
3306
- is_deleted: boolean;
3307
- sequence_number: number;
3308
- status: string | null;
3309
- updated_at: string;
3310
- valid_from: string | null;
3311
- valid_until: string | null;
3312
- };
3313
- Insert: {
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
- Update: {
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
- Relationships: [{
3342
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
3343
- columns: ["connection_id"];
3344
- isOneToOne: false;
3345
- referencedRelation: "floriday_connections";
3346
- referencedColumns: ["id"];
3347
- }];
3348
- };
3349
3409
  floriday_auction_letters_cache: {
3350
3410
  Row: {
3351
3411
  auction_letter_code: string;
@@ -3844,6 +3904,27 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
3844
3904
  referencedColumns: ["id"];
3845
3905
  }];
3846
3906
  };
3907
+ floriday_continuous_stock_cache: {
3908
+ Row: {
3909
+ connection_id: string;
3910
+ fetched_at: string;
3911
+ number_of_pieces: number;
3912
+ trade_item_id: string;
3913
+ };
3914
+ Insert: {
3915
+ connection_id: string;
3916
+ fetched_at?: string;
3917
+ number_of_pieces?: number;
3918
+ trade_item_id: string;
3919
+ };
3920
+ Update: {
3921
+ connection_id?: string;
3922
+ fetched_at?: string;
3923
+ number_of_pieces?: number;
3924
+ trade_item_id?: string;
3925
+ };
3926
+ Relationships: [];
3927
+ };
3847
3928
  floriday_continuous_stock_queue: {
3848
3929
  Row: {
3849
3930
  attempts: number;
@@ -4822,6 +4903,45 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
4822
4903
  referencedColumns: ["id"];
4823
4904
  }];
4824
4905
  };
4906
+ floriday_trade_settings_customers_cache: {
4907
+ Row: {
4908
+ connection_id: string;
4909
+ data: import("../integrations/supabase/types").Json;
4910
+ fetched_at: string;
4911
+ floriday_id: string;
4912
+ id: string;
4913
+ is_deleted: boolean;
4914
+ sequence_number: number;
4915
+ updated_at: string;
4916
+ };
4917
+ Insert: {
4918
+ connection_id: string;
4919
+ data: import("../integrations/supabase/types").Json;
4920
+ fetched_at?: string;
4921
+ floriday_id: string;
4922
+ id?: string;
4923
+ is_deleted?: boolean;
4924
+ sequence_number?: number;
4925
+ updated_at?: string;
4926
+ };
4927
+ Update: {
4928
+ connection_id?: string;
4929
+ data?: import("../integrations/supabase/types").Json;
4930
+ fetched_at?: string;
4931
+ floriday_id?: string;
4932
+ id?: string;
4933
+ is_deleted?: boolean;
4934
+ sequence_number?: number;
4935
+ updated_at?: string;
4936
+ };
4937
+ Relationships: [{
4938
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
4939
+ columns: ["connection_id"];
4940
+ isOneToOne: false;
4941
+ referencedRelation: "floriday_connections";
4942
+ referencedColumns: ["id"];
4943
+ }];
4944
+ };
4825
4945
  floriday_trips_cache: {
4826
4946
  Row: {
4827
4947
  carrier_organization_id: string | null;
@@ -5967,39 +6087,60 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
5967
6087
  };
5968
6088
  manufacture_products: {
5969
6089
  Row: {
6090
+ aantal_te_produceren: number;
5970
6091
  created_at: string;
5971
6092
  description: string | null;
5972
6093
  id: string;
5973
6094
  is_active: boolean;
6095
+ location_id: string | null;
5974
6096
  name: string;
6097
+ partij_nummer: string | null;
6098
+ photos: import("../integrations/supabase/types").Json;
5975
6099
  produced_stock: number;
5976
6100
  product_code: string;
5977
6101
  tenant_id: string;
6102
+ unit: string;
5978
6103
  updated_at: string;
5979
6104
  };
5980
6105
  Insert: {
6106
+ aantal_te_produceren?: number;
5981
6107
  created_at?: string;
5982
6108
  description?: string | null;
5983
6109
  id?: string;
5984
6110
  is_active?: boolean;
6111
+ location_id?: string | null;
5985
6112
  name: string;
6113
+ partij_nummer?: string | null;
6114
+ photos?: import("../integrations/supabase/types").Json;
5986
6115
  produced_stock?: number;
5987
6116
  product_code: string;
5988
6117
  tenant_id: string;
6118
+ unit?: string;
5989
6119
  updated_at?: string;
5990
6120
  };
5991
6121
  Update: {
6122
+ aantal_te_produceren?: number;
5992
6123
  created_at?: string;
5993
6124
  description?: string | null;
5994
6125
  id?: string;
5995
6126
  is_active?: boolean;
6127
+ location_id?: string | null;
5996
6128
  name?: string;
6129
+ partij_nummer?: string | null;
6130
+ photos?: import("../integrations/supabase/types").Json;
5997
6131
  produced_stock?: number;
5998
6132
  product_code?: string;
5999
6133
  tenant_id?: string;
6134
+ unit?: string;
6000
6135
  updated_at?: string;
6001
6136
  };
6002
- Relationships: [];
6137
+ Relationships: [{
6138
+ foreignKeyName: "manufacture_products_location_id_fkey";
6139
+ columns: ["location_id"];
6140
+ isOneToOne: false;
6141
+ referencedRelation: "locations";
6142
+ referencedColumns: ["id"];
6143
+ }];
6003
6144
  };
6004
6145
  monteurs: {
6005
6146
  Row: {
@@ -6973,6 +7114,105 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
6973
7114
  };
6974
7115
  Relationships: [];
6975
7116
  };
7117
+ order_shipment_items: {
7118
+ Row: {
7119
+ created_at: string;
7120
+ id: string;
7121
+ order_item_id: string;
7122
+ product_id: string | null;
7123
+ product_name: string;
7124
+ quantity: number;
7125
+ shipment_id: string;
7126
+ updated_at: string;
7127
+ };
7128
+ Insert: {
7129
+ created_at?: string;
7130
+ id?: string;
7131
+ order_item_id: string;
7132
+ product_id?: string | null;
7133
+ product_name: string;
7134
+ quantity: number;
7135
+ shipment_id: string;
7136
+ updated_at?: string;
7137
+ };
7138
+ Update: {
7139
+ created_at?: string;
7140
+ id?: string;
7141
+ order_item_id?: string;
7142
+ product_id?: string | null;
7143
+ product_name?: string;
7144
+ quantity?: number;
7145
+ shipment_id?: string;
7146
+ updated_at?: string;
7147
+ };
7148
+ Relationships: [{
7149
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
7150
+ columns: ["order_item_id"];
7151
+ isOneToOne: false;
7152
+ referencedRelation: "order_items";
7153
+ referencedColumns: ["id"];
7154
+ }, {
7155
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
7156
+ columns: ["shipment_id"];
7157
+ isOneToOne: false;
7158
+ referencedRelation: "order_shipments";
7159
+ referencedColumns: ["id"];
7160
+ }];
7161
+ };
7162
+ order_shipments: {
7163
+ Row: {
7164
+ carrier_id: string | null;
7165
+ created_at: string;
7166
+ delivery_date: string | null;
7167
+ delivery_location_id: string | null;
7168
+ id: string;
7169
+ notes: string | null;
7170
+ order_id: string;
7171
+ shipment_number: number;
7172
+ shipped_at: string | null;
7173
+ status: string;
7174
+ updated_at: string;
7175
+ };
7176
+ Insert: {
7177
+ carrier_id?: string | null;
7178
+ created_at?: string;
7179
+ delivery_date?: string | null;
7180
+ delivery_location_id?: string | null;
7181
+ id?: string;
7182
+ notes?: string | null;
7183
+ order_id: string;
7184
+ shipment_number: number;
7185
+ shipped_at?: string | null;
7186
+ status?: string;
7187
+ updated_at?: string;
7188
+ };
7189
+ Update: {
7190
+ carrier_id?: string | null;
7191
+ created_at?: string;
7192
+ delivery_date?: string | null;
7193
+ delivery_location_id?: string | null;
7194
+ id?: string;
7195
+ notes?: string | null;
7196
+ order_id?: string;
7197
+ shipment_number?: number;
7198
+ shipped_at?: string | null;
7199
+ status?: string;
7200
+ updated_at?: string;
7201
+ };
7202
+ Relationships: [{
7203
+ foreignKeyName: "order_shipments_carrier_id_fkey";
7204
+ columns: ["carrier_id"];
7205
+ isOneToOne: false;
7206
+ referencedRelation: "carriers";
7207
+ referencedColumns: ["id"];
7208
+ }, {
7209
+ foreignKeyName: "order_shipments_order_id_fkey";
7210
+ columns: ["order_id"];
7211
+ isOneToOne: false;
7212
+ referencedRelation: "orders";
7213
+ referencedColumns: ["id"];
7214
+ }];
7215
+ };
6976
7216
  orders: {
6977
7217
  Row: {
6978
7218
  created_at: string;
@@ -6980,8 +7220,9 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
6980
7220
  customer_id: string | null;
6981
7221
  customer_name: string;
6982
7222
  deleted_at: string | null;
6983
- delivery_date: string;
7223
+ delivery_date: string | null;
6984
7224
  id: string;
7225
+ is_reservation: boolean;
6985
7226
  notes: string | null;
6986
7227
  order_date: string;
6987
7228
  order_number: string;
@@ -6998,8 +7239,9 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
6998
7239
  customer_id?: string | null;
6999
7240
  customer_name?: string;
7000
7241
  deleted_at?: string | null;
7001
- delivery_date: string;
7242
+ delivery_date?: string | null;
7002
7243
  id?: string;
7244
+ is_reservation?: boolean;
7003
7245
  notes?: string | null;
7004
7246
  order_date?: string;
7005
7247
  order_number: string;
@@ -7016,8 +7258,9 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7016
7258
  customer_id?: string | null;
7017
7259
  customer_name?: string;
7018
7260
  deleted_at?: string | null;
7019
- delivery_date?: string;
7261
+ delivery_date?: string | null;
7020
7262
  id?: string;
7263
+ is_reservation?: boolean;
7021
7264
  notes?: string | null;
7022
7265
  order_date?: string;
7023
7266
  order_number?: string;
@@ -7159,6 +7402,63 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7159
7402
  };
7160
7403
  Relationships: [];
7161
7404
  };
7405
+ product_bom_items: {
7406
+ Row: {
7407
+ component_product_id: string | null;
7408
+ component_trade_item_floriday_id: string | null;
7409
+ created_at: string;
7410
+ id: string;
7411
+ notes: string | null;
7412
+ parent_product_id: string | null;
7413
+ parent_trade_item_floriday_id: string | null;
7414
+ quantity: number;
7415
+ sort_order: number;
7416
+ tenant_id: string;
7417
+ unit: string;
7418
+ updated_at: string;
7419
+ };
7420
+ Insert: {
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
+ Update: {
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
+ Relationships: [{
7449
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
7450
+ columns: ["component_product_id"];
7451
+ isOneToOne: false;
7452
+ referencedRelation: "products";
7453
+ referencedColumns: ["id"];
7454
+ }, {
7455
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
7456
+ columns: ["parent_product_id"];
7457
+ isOneToOne: false;
7458
+ referencedRelation: "products";
7459
+ referencedColumns: ["id"];
7460
+ }];
7461
+ };
7162
7462
  product_categories: {
7163
7463
  Row: {
7164
7464
  color: string;
@@ -7264,6 +7564,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7264
7564
  id: string;
7265
7565
  product_group_id: string;
7266
7566
  quantity: number;
7567
+ sort_order: number;
7267
7568
  trade_item_id: string;
7268
7569
  };
7269
7570
  Insert: {
@@ -7271,6 +7572,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7271
7572
  id?: string;
7272
7573
  product_group_id: string;
7273
7574
  quantity?: number;
7575
+ sort_order?: number;
7274
7576
  trade_item_id: string;
7275
7577
  };
7276
7578
  Update: {
@@ -7278,6 +7580,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7278
7580
  id?: string;
7279
7581
  product_group_id?: string;
7280
7582
  quantity?: number;
7583
+ sort_order?: number;
7281
7584
  trade_item_id?: string;
7282
7585
  };
7283
7586
  Relationships: [{
@@ -7292,6 +7595,8 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7292
7595
  Row: {
7293
7596
  created_at: string;
7294
7597
  description: string | null;
7598
+ head_product_id: string | null;
7599
+ head_trade_item_floriday_id: string | null;
7295
7600
  id: string;
7296
7601
  is_active: boolean;
7297
7602
  name: string;
@@ -7301,6 +7606,8 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7301
7606
  Insert: {
7302
7607
  created_at?: string;
7303
7608
  description?: string | null;
7609
+ head_product_id?: string | null;
7610
+ head_trade_item_floriday_id?: string | null;
7304
7611
  id?: string;
7305
7612
  is_active?: boolean;
7306
7613
  name: string;
@@ -7310,16 +7617,85 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7310
7617
  Update: {
7311
7618
  created_at?: string;
7312
7619
  description?: string | null;
7620
+ head_product_id?: string | null;
7621
+ head_trade_item_floriday_id?: string | null;
7313
7622
  id?: string;
7314
7623
  is_active?: boolean;
7315
7624
  name?: string;
7316
7625
  tenant_id?: string;
7317
7626
  updated_at?: string;
7318
7627
  };
7319
- Relationships: [];
7628
+ Relationships: [{
7629
+ foreignKeyName: "product_groups_head_product_id_fkey";
7630
+ columns: ["head_product_id"];
7631
+ isOneToOne: false;
7632
+ referencedRelation: "products";
7633
+ referencedColumns: ["id"];
7634
+ }];
7635
+ };
7636
+ product_load_settings: {
7637
+ Row: {
7638
+ created_at: string;
7639
+ id: string;
7640
+ is_package: boolean;
7641
+ layers_per_load_carrier: number | null;
7642
+ load_carrier: string | null;
7643
+ package_id: string | null;
7644
+ package_label: string | null;
7645
+ packages_per_layer: number | null;
7646
+ product_id: string | null;
7647
+ tenant_id: string;
7648
+ trade_item_floriday_id: string | null;
7649
+ units_per_package: number | null;
7650
+ updated_at: string;
7651
+ };
7652
+ Insert: {
7653
+ created_at?: string;
7654
+ id?: string;
7655
+ is_package?: boolean;
7656
+ layers_per_load_carrier?: number | null;
7657
+ load_carrier?: string | null;
7658
+ package_id?: string | null;
7659
+ package_label?: string | null;
7660
+ packages_per_layer?: number | null;
7661
+ product_id?: string | null;
7662
+ tenant_id: string;
7663
+ trade_item_floriday_id?: string | null;
7664
+ units_per_package?: number | null;
7665
+ updated_at?: string;
7666
+ };
7667
+ Update: {
7668
+ created_at?: string;
7669
+ id?: string;
7670
+ is_package?: boolean;
7671
+ layers_per_load_carrier?: number | null;
7672
+ load_carrier?: string | null;
7673
+ package_id?: string | null;
7674
+ package_label?: string | null;
7675
+ packages_per_layer?: number | null;
7676
+ product_id?: string | null;
7677
+ tenant_id?: string;
7678
+ trade_item_floriday_id?: string | null;
7679
+ units_per_package?: number | null;
7680
+ updated_at?: string;
7681
+ };
7682
+ Relationships: [{
7683
+ foreignKeyName: "product_load_settings_package_id_fkey";
7684
+ columns: ["package_id"];
7685
+ isOneToOne: false;
7686
+ referencedRelation: "packages";
7687
+ referencedColumns: ["id"];
7688
+ }, {
7689
+ foreignKeyName: "product_load_settings_product_id_fkey";
7690
+ columns: ["product_id"];
7691
+ isOneToOne: false;
7692
+ referencedRelation: "products";
7693
+ referencedColumns: ["id"];
7694
+ }];
7320
7695
  };
7321
7696
  products: {
7322
7697
  Row: {
7698
+ article_number: string | null;
7323
7699
  barcode: string | null;
7324
7700
  batch: string;
7325
7701
  crates_per_layer: number;
@@ -7343,6 +7719,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7343
7719
  weight: string | null;
7344
7720
  };
7345
7721
  Insert: {
7722
+ article_number?: string | null;
7346
7723
  barcode?: string | null;
7347
7724
  batch: string;
7348
7725
  crates_per_layer?: number;
@@ -7366,6 +7743,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7366
7743
  weight?: string | null;
7367
7744
  };
7368
7745
  Update: {
7746
+ article_number?: string | null;
7369
7747
  barcode?: string | null;
7370
7748
  batch?: string;
7371
7749
  crates_per_layer?: number;
@@ -8279,8 +8657,10 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
8279
8657
  order_id: string | null;
8280
8658
  order_item_id: string | null;
8281
8659
  order_source: string | null;
8660
+ parent_trade_item_key: string | null;
8282
8661
  physical_after: number | null;
8283
8662
  physical_before: number | null;
8663
+ production_batch_id: string | null;
8284
8664
  qty_delta: number;
8285
8665
  reason: string | null;
8286
8666
  reserved_after: number | null;
@@ -8296,8 +8676,10 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
8296
8676
  order_id?: string | null;
8297
8677
  order_item_id?: string | null;
8298
8678
  order_source?: string | null;
8679
+ parent_trade_item_key?: string | null;
8299
8680
  physical_after?: number | null;
8300
8681
  physical_before?: number | null;
8682
+ production_batch_id?: string | null;
8301
8683
  qty_delta: number;
8302
8684
  reason?: string | null;
8303
8685
  reserved_after?: number | null;
@@ -8313,8 +8695,10 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
8313
8695
  order_id?: string | null;
8314
8696
  order_item_id?: string | null;
8315
8697
  order_source?: string | null;
8698
+ parent_trade_item_key?: string | null;
8316
8699
  physical_after?: number | null;
8317
8700
  physical_before?: number | null;
8701
+ production_batch_id?: string | null;
8318
8702
  qty_delta?: number;
8319
8703
  reason?: string | null;
8320
8704
  reserved_after?: number | null;
@@ -8773,7 +9157,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
8773
9157
  twinfield_connections: {
8774
9158
  Row: {
8775
9159
  access_token: string | null;
8776
- client_id: string;
9160
+ client_id: string | null;
8777
9161
  client_secret: string | null;
8778
9162
  cluster_uri: string | null;
8779
9163
  company_code: string | null;
@@ -8785,7 +9169,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
8785
9169
  is_active: boolean;
8786
9170
  label: string | null;
8787
9171
  office_code: string | null;
8788
- redirect_uri: string;
9172
+ redirect_uri: string | null;
8789
9173
  refresh_token: string | null;
8790
9174
  token_expires_at: string | null;
8791
9175
  updated_at: string;
@@ -8793,7 +9177,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
8793
9177
  };
8794
9178
  Insert: {
8795
9179
  access_token?: string | null;
8796
- client_id: string;
9180
+ client_id?: string | null;
8797
9181
  client_secret?: string | null;
8798
9182
  cluster_uri?: string | null;
8799
9183
  company_code?: string | null;
@@ -8805,7 +9189,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
8805
9189
  is_active?: boolean;
8806
9190
  label?: string | null;
8807
9191
  office_code?: string | null;
8808
- redirect_uri: string;
9192
+ redirect_uri?: string | null;
8809
9193
  refresh_token?: string | null;
8810
9194
  token_expires_at?: string | null;
8811
9195
  updated_at?: string;
@@ -8813,7 +9197,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
8813
9197
  };
8814
9198
  Update: {
8815
9199
  access_token?: string | null;
8816
- client_id?: string;
9200
+ client_id?: string | null;
8817
9201
  client_secret?: string | null;
8818
9202
  cluster_uri?: string | null;
8819
9203
  company_code?: string | null;
@@ -8825,7 +9209,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
8825
9209
  is_active?: boolean;
8826
9210
  label?: string | null;
8827
9211
  office_code?: string | null;
8828
- redirect_uri?: string;
9212
+ redirect_uri?: string | null;
8829
9213
  refresh_token?: string | null;
8830
9214
  token_expires_at?: string | null;
8831
9215
  updated_at?: string;
@@ -10020,25 +10404,6 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
10020
10404
  };
10021
10405
  Relationships: [];
10022
10406
  };
10023
- floriday_customer_discounts: {
10024
- Row: {
10025
- base_price: number | null;
10026
- buyer_organization_id: string | null;
10027
- currency: string | null;
10028
- discount_type: string | null;
10029
- discount_value: number | null;
10030
- min_quantity: number | null;
10031
- net_price: number | null;
10032
- product_group_id: string | null;
10033
- raw: import("../integrations/supabase/types").Json | null;
10034
- source: string | null;
10035
- source_id: string | null;
10036
- trade_item_id: string | null;
10037
- valid_from: string | null;
10038
- valid_until: string | null;
10039
- };
10040
- Relationships: [];
10041
- };
10042
10407
  local_customer_discounts: {
10043
10408
  Row: {
10044
10409
  base_price: number | null;
@@ -10457,6 +10822,28 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
10457
10822
  Args: never;
10458
10823
  Returns: undefined;
10459
10824
  };
10825
+ consume_bom_for_production: {
10826
+ Args: {
10827
+ p_connection_id: string;
10828
+ p_parent_id: string;
10829
+ p_parent_key: string;
10830
+ p_parent_kind: string;
10831
+ p_quantity: number;
10832
+ p_user_id: string;
10833
+ };
10834
+ Returns: import("../integrations/supabase/types").Json;
10835
+ } | {
10836
+ Args: {
10837
+ p_batch_id?: string;
10838
+ p_connection_id: string;
10839
+ p_parent_id: string;
10840
+ p_parent_key: string;
10841
+ p_parent_kind: string;
10842
+ p_quantity: number;
10843
+ p_user_id: string;
10844
+ };
10845
+ Returns: import("../integrations/supabase/types").Json;
10846
+ };
10460
10847
  consume_floriday_rate_limit: {
10461
10848
  Args: {
10462
10849
  p_bucket: string;
@@ -10508,6 +10895,13 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
10508
10895
  table_name: string;
10509
10896
  }[];
10510
10897
  };
10898
+ delete_samenstelling: {
10899
+ Args: {
10900
+ p_parent_id: string;
10901
+ p_parent_kind: string;
10902
+ };
10903
+ Returns: import("../integrations/supabase/types").Json;
10904
+ };
10511
10905
  dispatch_carrier_signups_sql: {
10512
10906
  Args: {
10513
10907
  _catchup?: string;
@@ -10668,19 +11062,6 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
10668
11062
  resource: string;
10669
11063
  }[];
10670
11064
  };
10671
- get_floriday_agreements_active: {
10672
- Args: {
10673
- p_on_date?: string;
10674
- };
10675
- Returns: {
10676
- buyer_organization_id: string;
10677
- data: import("../integrations/supabase/types").Json;
10678
- floriday_id: string;
10679
- status: string;
10680
- valid_from: string;
10681
- valid_until: string;
10682
- }[];
10683
- };
10684
11065
  get_floriday_clock_supplies_window: {
10685
11066
  Args: {
10686
11067
  p_from: string;
@@ -10753,6 +11134,21 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
10753
11134
  minutes_since_success: number;
10754
11135
  }[];
10755
11136
  };
11137
+ get_group_allocation_keys: {
11138
+ Args: {
11139
+ p_product_id: string;
11140
+ };
11141
+ Returns: {
11142
+ k: string;
11143
+ ord: number;
11144
+ }[];
11145
+ };
11146
+ get_group_head_key: {
11147
+ Args: {
11148
+ p_group_id: string;
11149
+ };
11150
+ Returns: string;
11151
+ };
10756
11152
  get_offer_by_link_code: {
10757
11153
  Args: {
10758
11154
  p_code: string;
@@ -10863,6 +11259,18 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
10863
11259
  };
10864
11260
  Returns: undefined;
10865
11261
  };
11262
+ mark_shipment_shipped: {
11263
+ Args: {
11264
+ p_shipment_id: string;
11265
+ };
11266
+ Returns: undefined;
11267
+ };
11268
+ next_manufacture_partij: {
11269
+ Args: {
11270
+ _tenant_id: string;
11271
+ };
11272
+ Returns: string;
11273
+ };
10866
11274
  next_order_number: {
10867
11275
  Args: {
10868
11276
  p_prefix: string;
@@ -10941,6 +11349,14 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
10941
11349
  };
10942
11350
  Returns: undefined;
10943
11351
  };
11352
+ produce_designed_product: {
11353
+ Args: {
11354
+ p_parent_id: string;
11355
+ p_parent_kind: string;
11356
+ p_quantity: number;
11357
+ };
11358
+ Returns: import("../integrations/supabase/types").Json;
11359
+ };
10944
11360
  promote_trade_item_key: {
10945
11361
  Args: {
10946
11362
  p_new: string;
@@ -10948,6 +11364,10 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
10948
11364
  };
10949
11365
  Returns: undefined;
10950
11366
  };
11367
+ recompute_all_reserved_stock: {
11368
+ Args: never;
11369
+ Returns: undefined;
11370
+ };
10951
11371
  recompute_order_status: {
10952
11372
  Args: {
10953
11373
  p_order_id: string;
@@ -10997,27 +11417,45 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
10997
11417
  };
10998
11418
  Returns: undefined;
10999
11419
  };
11420
+ resolve_group_allocation: {
11421
+ Args: {
11422
+ _needed: number;
11423
+ _product_group_id: string;
11424
+ };
11425
+ Returns: {
11426
+ allocated: number;
11427
+ trade_item_id: string;
11428
+ }[];
11429
+ };
11430
+ resolve_group_member_stock_key: {
11431
+ Args: {
11432
+ p_trade_item_id: string;
11433
+ };
11434
+ Returns: string;
11435
+ };
11000
11436
  resolve_product_id_for_item: {
11001
11437
  Args: {
11002
11438
  p_product_name: string;
11003
11439
  };
11004
11440
  Returns: string;
11005
11441
  };
11006
- schedule_floriday_additional_services_sync: {
11442
+ resolve_stock_trade_item_key: {
11007
11443
  Args: {
11008
- p_apikey: string;
11009
- p_url: string;
11444
+ p_product_id: string;
11010
11445
  };
11011
- Returns: number;
11446
+ Returns: string;
11012
11447
  };
11013
- schedule_floriday_agreement_calloffs_sync: {
11448
+ reverse_production: {
11014
11449
  Args: {
11015
- p_apikey: string;
11016
- p_url: string;
11450
+ p_connection_id?: string;
11451
+ p_parent_key: string;
11452
+ p_quantity: number;
11453
+ p_reason?: string;
11454
+ p_user_id?: string;
11017
11455
  };
11018
- Returns: number;
11456
+ Returns: import("../integrations/supabase/types").Json;
11019
11457
  };
11020
- schedule_floriday_agreements_sync: {
11458
+ schedule_floriday_additional_services_sync: {
11021
11459
  Args: {
11022
11460
  p_apikey: string;
11023
11461
  p_url: string;
@@ -11581,6 +12019,165 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
11581
12019
  };
11582
12020
  Relationships: [];
11583
12021
  };
12022
+ ai_credentials: {
12023
+ Row: {
12024
+ active: boolean;
12025
+ api_key: string;
12026
+ created_at: string;
12027
+ created_by: string | null;
12028
+ id: string;
12029
+ label: string;
12030
+ provider_id: string;
12031
+ updated_at: string;
12032
+ };
12033
+ Insert: {
12034
+ active?: boolean;
12035
+ api_key: string;
12036
+ created_at?: string;
12037
+ created_by?: string | null;
12038
+ id?: string;
12039
+ label: string;
12040
+ provider_id: string;
12041
+ updated_at?: string;
12042
+ };
12043
+ Update: {
12044
+ active?: boolean;
12045
+ api_key?: string;
12046
+ created_at?: string;
12047
+ created_by?: string | null;
12048
+ id?: string;
12049
+ label?: string;
12050
+ provider_id?: string;
12051
+ updated_at?: string;
12052
+ };
12053
+ Relationships: [{
12054
+ foreignKeyName: "ai_credentials_provider_id_fkey";
12055
+ columns: ["provider_id"];
12056
+ isOneToOne: false;
12057
+ referencedRelation: "ai_providers";
12058
+ referencedColumns: ["id"];
12059
+ }];
12060
+ };
12061
+ ai_models: {
12062
+ Row: {
12063
+ active: boolean;
12064
+ context_window: number | null;
12065
+ created_at: string;
12066
+ display_name: string;
12067
+ id: string;
12068
+ is_default: boolean;
12069
+ modality: string;
12070
+ provider_id: string;
12071
+ slug: string;
12072
+ updated_at: string;
12073
+ };
12074
+ Insert: {
12075
+ active?: boolean;
12076
+ context_window?: number | null;
12077
+ created_at?: string;
12078
+ display_name: string;
12079
+ id?: string;
12080
+ is_default?: boolean;
12081
+ modality?: string;
12082
+ provider_id: string;
12083
+ slug: string;
12084
+ updated_at?: string;
12085
+ };
12086
+ Update: {
12087
+ active?: boolean;
12088
+ context_window?: number | null;
12089
+ created_at?: string;
12090
+ display_name?: string;
12091
+ id?: string;
12092
+ is_default?: boolean;
12093
+ modality?: string;
12094
+ provider_id?: string;
12095
+ slug?: string;
12096
+ updated_at?: string;
12097
+ };
12098
+ Relationships: [{
12099
+ foreignKeyName: "ai_models_provider_id_fkey";
12100
+ columns: ["provider_id"];
12101
+ isOneToOne: false;
12102
+ referencedRelation: "ai_providers";
12103
+ referencedColumns: ["id"];
12104
+ }];
12105
+ };
12106
+ ai_module_bindings: {
12107
+ Row: {
12108
+ consumer_module_id: string;
12109
+ created_at: string;
12110
+ credential_id: string;
12111
+ id: string;
12112
+ model_id: string;
12113
+ notes: string | null;
12114
+ updated_at: string;
12115
+ };
12116
+ Insert: {
12117
+ consumer_module_id: string;
12118
+ created_at?: string;
12119
+ credential_id: string;
12120
+ id?: string;
12121
+ model_id: string;
12122
+ notes?: string | null;
12123
+ updated_at?: string;
12124
+ };
12125
+ Update: {
12126
+ consumer_module_id?: string;
12127
+ created_at?: string;
12128
+ credential_id?: string;
12129
+ id?: string;
12130
+ model_id?: string;
12131
+ notes?: string | null;
12132
+ updated_at?: string;
12133
+ };
12134
+ Relationships: [{
12135
+ foreignKeyName: "ai_module_bindings_credential_id_fkey";
12136
+ columns: ["credential_id"];
12137
+ isOneToOne: false;
12138
+ referencedRelation: "ai_credentials";
12139
+ referencedColumns: ["id"];
12140
+ }, {
12141
+ foreignKeyName: "ai_module_bindings_model_id_fkey";
12142
+ columns: ["model_id"];
12143
+ isOneToOne: false;
12144
+ referencedRelation: "ai_models";
12145
+ referencedColumns: ["id"];
12146
+ }];
12147
+ };
12148
+ ai_providers: {
12149
+ Row: {
12150
+ active: boolean;
12151
+ auth_type: string;
12152
+ base_url: string | null;
12153
+ created_at: string;
12154
+ id: string;
12155
+ name: string;
12156
+ slug: string;
12157
+ updated_at: string;
12158
+ };
12159
+ Insert: {
12160
+ active?: boolean;
12161
+ auth_type?: string;
12162
+ base_url?: string | null;
12163
+ created_at?: string;
12164
+ id?: string;
12165
+ name: string;
12166
+ slug: string;
12167
+ updated_at?: string;
12168
+ };
12169
+ Update: {
12170
+ active?: boolean;
12171
+ auth_type?: string;
12172
+ base_url?: string | null;
12173
+ created_at?: string;
12174
+ id?: string;
12175
+ name?: string;
12176
+ slug?: string;
12177
+ updated_at?: string;
12178
+ };
12179
+ Relationships: [];
12180
+ };
11584
12181
  app_settings: {
11585
12182
  Row: {
11586
12183
  created_at: string;
@@ -14587,105 +15184,6 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
14587
15184
  referencedColumns: ["id"];
14588
15185
  }];
14589
15186
  };
14590
- floriday_agreement_calloffs_cache: {
14591
- Row: {
14592
- agreement_id: string | null;
14593
- connection_id: string;
14594
- data: import("../integrations/supabase/types").Json;
14595
- delivery_date: string | null;
14596
- fetched_at: string;
14597
- floriday_id: string;
14598
- id: string;
14599
- is_deleted: boolean;
14600
- sequence_number: number;
14601
- status: string | null;
14602
- updated_at: string;
14603
- };
14604
- Insert: {
14605
- agreement_id?: string | null;
14606
- connection_id: string;
14607
- data?: import("../integrations/supabase/types").Json;
14608
- delivery_date?: string | null;
14609
- fetched_at?: string;
14610
- floriday_id: string;
14611
- id?: string;
14612
- is_deleted?: boolean;
14613
- sequence_number?: number;
14614
- status?: string | null;
14615
- updated_at?: string;
14616
- };
14617
- Update: {
14618
- agreement_id?: string | null;
14619
- connection_id?: string;
14620
- data?: import("../integrations/supabase/types").Json;
14621
- delivery_date?: string | null;
14622
- fetched_at?: string;
14623
- floriday_id?: string;
14624
- id?: string;
14625
- is_deleted?: boolean;
14626
- sequence_number?: number;
14627
- status?: string | null;
14628
- updated_at?: string;
14629
- };
14630
- Relationships: [{
14631
- foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
14632
- columns: ["connection_id"];
14633
- isOneToOne: false;
14634
- referencedRelation: "floriday_connections";
14635
- referencedColumns: ["id"];
14636
- }];
14637
- };
14638
- floriday_agreements_cache: {
14639
- Row: {
14640
- buyer_organization_id: string | null;
14641
- connection_id: string;
14642
- data: import("../integrations/supabase/types").Json;
14643
- fetched_at: string;
14644
- floriday_id: string;
14645
- id: string;
14646
- is_deleted: boolean;
14647
- sequence_number: number;
14648
- status: string | null;
14649
- updated_at: string;
14650
- valid_from: string | null;
14651
- valid_until: string | null;
14652
- };
14653
- Insert: {
14654
- buyer_organization_id?: string | null;
14655
- connection_id: string;
14656
- data?: import("../integrations/supabase/types").Json;
14657
- fetched_at?: string;
14658
- floriday_id: string;
14659
- id?: string;
14660
- is_deleted?: boolean;
14661
- sequence_number?: number;
14662
- status?: string | null;
14663
- updated_at?: string;
14664
- valid_from?: string | null;
14665
- valid_until?: string | null;
14666
- };
14667
- Update: {
14668
- buyer_organization_id?: string | null;
14669
- connection_id?: string;
14670
- data?: import("../integrations/supabase/types").Json;
14671
- fetched_at?: string;
14672
- floriday_id?: string;
14673
- id?: string;
14674
- is_deleted?: boolean;
14675
- sequence_number?: number;
14676
- status?: string | null;
14677
- updated_at?: string;
14678
- valid_from?: string | null;
14679
- valid_until?: string | null;
14680
- };
14681
- Relationships: [{
14682
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
14683
- columns: ["connection_id"];
14684
- isOneToOne: false;
14685
- referencedRelation: "floriday_connections";
14686
- referencedColumns: ["id"];
14687
- }];
14688
- };
14689
15187
  floriday_auction_letters_cache: {
14690
15188
  Row: {
14691
15189
  auction_letter_code: string;
@@ -15184,6 +15682,27 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
15184
15682
  referencedColumns: ["id"];
15185
15683
  }];
15186
15684
  };
15685
+ floriday_continuous_stock_cache: {
15686
+ Row: {
15687
+ connection_id: string;
15688
+ fetched_at: string;
15689
+ number_of_pieces: number;
15690
+ trade_item_id: string;
15691
+ };
15692
+ Insert: {
15693
+ connection_id: string;
15694
+ fetched_at?: string;
15695
+ number_of_pieces?: number;
15696
+ trade_item_id: string;
15697
+ };
15698
+ Update: {
15699
+ connection_id?: string;
15700
+ fetched_at?: string;
15701
+ number_of_pieces?: number;
15702
+ trade_item_id?: string;
15703
+ };
15704
+ Relationships: [];
15705
+ };
15187
15706
  floriday_continuous_stock_queue: {
15188
15707
  Row: {
15189
15708
  attempts: number;
@@ -16162,6 +16681,45 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
16162
16681
  referencedColumns: ["id"];
16163
16682
  }];
16164
16683
  };
16684
+ floriday_trade_settings_customers_cache: {
16685
+ Row: {
16686
+ connection_id: string;
16687
+ data: import("../integrations/supabase/types").Json;
16688
+ fetched_at: string;
16689
+ floriday_id: string;
16690
+ id: string;
16691
+ is_deleted: boolean;
16692
+ sequence_number: number;
16693
+ updated_at: string;
16694
+ };
16695
+ Insert: {
16696
+ connection_id: string;
16697
+ data: import("../integrations/supabase/types").Json;
16698
+ fetched_at?: string;
16699
+ floriday_id: string;
16700
+ id?: string;
16701
+ is_deleted?: boolean;
16702
+ sequence_number?: number;
16703
+ updated_at?: string;
16704
+ };
16705
+ Update: {
16706
+ connection_id?: string;
16707
+ data?: import("../integrations/supabase/types").Json;
16708
+ fetched_at?: string;
16709
+ floriday_id?: string;
16710
+ id?: string;
16711
+ is_deleted?: boolean;
16712
+ sequence_number?: number;
16713
+ updated_at?: string;
16714
+ };
16715
+ Relationships: [{
16716
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
16717
+ columns: ["connection_id"];
16718
+ isOneToOne: false;
16719
+ referencedRelation: "floriday_connections";
16720
+ referencedColumns: ["id"];
16721
+ }];
16722
+ };
16165
16723
  floriday_trips_cache: {
16166
16724
  Row: {
16167
16725
  carrier_organization_id: string | null;
@@ -17307,39 +17865,60 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
17307
17865
  };
17308
17866
  manufacture_products: {
17309
17867
  Row: {
17868
+ aantal_te_produceren: number;
17310
17869
  created_at: string;
17311
17870
  description: string | null;
17312
17871
  id: string;
17313
17872
  is_active: boolean;
17873
+ location_id: string | null;
17314
17874
  name: string;
17875
+ partij_nummer: string | null;
17876
+ photos: import("../integrations/supabase/types").Json;
17315
17877
  produced_stock: number;
17316
17878
  product_code: string;
17317
17879
  tenant_id: string;
17880
+ unit: string;
17318
17881
  updated_at: string;
17319
17882
  };
17320
17883
  Insert: {
17884
+ aantal_te_produceren?: number;
17321
17885
  created_at?: string;
17322
17886
  description?: string | null;
17323
17887
  id?: string;
17324
17888
  is_active?: boolean;
17889
+ location_id?: string | null;
17325
17890
  name: string;
17891
+ partij_nummer?: string | null;
17892
+ photos?: import("../integrations/supabase/types").Json;
17326
17893
  produced_stock?: number;
17327
17894
  product_code: string;
17328
17895
  tenant_id: string;
17896
+ unit?: string;
17329
17897
  updated_at?: string;
17330
17898
  };
17331
17899
  Update: {
17900
+ aantal_te_produceren?: number;
17332
17901
  created_at?: string;
17333
17902
  description?: string | null;
17334
17903
  id?: string;
17335
17904
  is_active?: boolean;
17905
+ location_id?: string | null;
17336
17906
  name?: string;
17907
+ partij_nummer?: string | null;
17908
+ photos?: import("../integrations/supabase/types").Json;
17337
17909
  produced_stock?: number;
17338
17910
  product_code?: string;
17339
17911
  tenant_id?: string;
17912
+ unit?: string;
17340
17913
  updated_at?: string;
17341
17914
  };
17342
- Relationships: [];
17915
+ Relationships: [{
17916
+ foreignKeyName: "manufacture_products_location_id_fkey";
17917
+ columns: ["location_id"];
17918
+ isOneToOne: false;
17919
+ referencedRelation: "locations";
17920
+ referencedColumns: ["id"];
17921
+ }];
17343
17922
  };
17344
17923
  monteurs: {
17345
17924
  Row: {
@@ -18313,6 +18892,105 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
18313
18892
  };
18314
18893
  Relationships: [];
18315
18894
  };
18895
+ order_shipment_items: {
18896
+ Row: {
18897
+ created_at: string;
18898
+ id: string;
18899
+ order_item_id: string;
18900
+ product_id: string | null;
18901
+ product_name: string;
18902
+ quantity: number;
18903
+ shipment_id: string;
18904
+ updated_at: string;
18905
+ };
18906
+ Insert: {
18907
+ created_at?: string;
18908
+ id?: string;
18909
+ order_item_id: string;
18910
+ product_id?: string | null;
18911
+ product_name: string;
18912
+ quantity: number;
18913
+ shipment_id: string;
18914
+ updated_at?: string;
18915
+ };
18916
+ Update: {
18917
+ created_at?: string;
18918
+ id?: string;
18919
+ order_item_id?: string;
18920
+ product_id?: string | null;
18921
+ product_name?: string;
18922
+ quantity?: number;
18923
+ shipment_id?: string;
18924
+ updated_at?: string;
18925
+ };
18926
+ Relationships: [{
18927
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
18928
+ columns: ["order_item_id"];
18929
+ isOneToOne: false;
18930
+ referencedRelation: "order_items";
18931
+ referencedColumns: ["id"];
18932
+ }, {
18933
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
18934
+ columns: ["shipment_id"];
18935
+ isOneToOne: false;
18936
+ referencedRelation: "order_shipments";
18937
+ referencedColumns: ["id"];
18938
+ }];
18939
+ };
18940
+ order_shipments: {
18941
+ Row: {
18942
+ carrier_id: string | null;
18943
+ created_at: string;
18944
+ delivery_date: string | null;
18945
+ delivery_location_id: string | null;
18946
+ id: string;
18947
+ notes: string | null;
18948
+ order_id: string;
18949
+ shipment_number: number;
18950
+ shipped_at: string | null;
18951
+ status: string;
18952
+ updated_at: string;
18953
+ };
18954
+ Insert: {
18955
+ carrier_id?: string | null;
18956
+ created_at?: string;
18957
+ delivery_date?: string | null;
18958
+ delivery_location_id?: string | null;
18959
+ id?: string;
18960
+ notes?: string | null;
18961
+ order_id: string;
18962
+ shipment_number: number;
18963
+ shipped_at?: string | null;
18964
+ status?: string;
18965
+ updated_at?: string;
18966
+ };
18967
+ Update: {
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
+ Relationships: [{
18981
+ foreignKeyName: "order_shipments_carrier_id_fkey";
18982
+ columns: ["carrier_id"];
18983
+ isOneToOne: false;
18984
+ referencedRelation: "carriers";
18985
+ referencedColumns: ["id"];
18986
+ }, {
18987
+ foreignKeyName: "order_shipments_order_id_fkey";
18988
+ columns: ["order_id"];
18989
+ isOneToOne: false;
18990
+ referencedRelation: "orders";
18991
+ referencedColumns: ["id"];
18992
+ }];
18993
+ };
18316
18994
  orders: {
18317
18995
  Row: {
18318
18996
  created_at: string;
@@ -18320,8 +18998,9 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
18320
18998
  customer_id: string | null;
18321
18999
  customer_name: string;
18322
19000
  deleted_at: string | null;
18323
- delivery_date: string;
19001
+ delivery_date: string | null;
18324
19002
  id: string;
19003
+ is_reservation: boolean;
18325
19004
  notes: string | null;
18326
19005
  order_date: string;
18327
19006
  order_number: string;
@@ -18338,8 +19017,9 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
18338
19017
  customer_id?: string | null;
18339
19018
  customer_name?: string;
18340
19019
  deleted_at?: string | null;
18341
- delivery_date: string;
19020
+ delivery_date?: string | null;
18342
19021
  id?: string;
19022
+ is_reservation?: boolean;
18343
19023
  notes?: string | null;
18344
19024
  order_date?: string;
18345
19025
  order_number: string;
@@ -18356,8 +19036,9 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
18356
19036
  customer_id?: string | null;
18357
19037
  customer_name?: string;
18358
19038
  deleted_at?: string | null;
18359
- delivery_date?: string;
19039
+ delivery_date?: string | null;
18360
19040
  id?: string;
19041
+ is_reservation?: boolean;
18361
19042
  notes?: string | null;
18362
19043
  order_date?: string;
18363
19044
  order_number?: string;
@@ -18499,6 +19180,63 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
18499
19180
  };
18500
19181
  Relationships: [];
18501
19182
  };
19183
+ product_bom_items: {
19184
+ Row: {
19185
+ component_product_id: string | null;
19186
+ component_trade_item_floriday_id: string | null;
19187
+ created_at: string;
19188
+ id: string;
19189
+ notes: string | null;
19190
+ parent_product_id: string | null;
19191
+ parent_trade_item_floriday_id: string | null;
19192
+ quantity: number;
19193
+ sort_order: number;
19194
+ tenant_id: string;
19195
+ unit: string;
19196
+ updated_at: string;
19197
+ };
19198
+ Insert: {
19199
+ component_product_id?: string | null;
19200
+ component_trade_item_floriday_id?: string | null;
19201
+ created_at?: string;
19202
+ id?: string;
19203
+ notes?: string | null;
19204
+ parent_product_id?: string | null;
19205
+ parent_trade_item_floriday_id?: string | null;
19206
+ quantity?: number;
19207
+ sort_order?: number;
19208
+ tenant_id: string;
19209
+ unit?: string;
19210
+ updated_at?: string;
19211
+ };
19212
+ Update: {
19213
+ component_product_id?: string | null;
19214
+ component_trade_item_floriday_id?: string | null;
19215
+ created_at?: string;
19216
+ id?: string;
19217
+ notes?: string | null;
19218
+ parent_product_id?: string | null;
19219
+ parent_trade_item_floriday_id?: string | null;
19220
+ quantity?: number;
19221
+ sort_order?: number;
19222
+ tenant_id?: string;
19223
+ unit?: string;
19224
+ updated_at?: string;
19225
+ };
19226
+ Relationships: [{
19227
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
19228
+ columns: ["component_product_id"];
19229
+ isOneToOne: false;
19230
+ referencedRelation: "products";
19231
+ referencedColumns: ["id"];
19232
+ }, {
19233
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
19234
+ columns: ["parent_product_id"];
19235
+ isOneToOne: false;
19236
+ referencedRelation: "products";
19237
+ referencedColumns: ["id"];
19238
+ }];
19239
+ };
18502
19240
  product_categories: {
18503
19241
  Row: {
18504
19242
  color: string;
@@ -18604,6 +19342,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
18604
19342
  id: string;
18605
19343
  product_group_id: string;
18606
19344
  quantity: number;
19345
+ sort_order: number;
18607
19346
  trade_item_id: string;
18608
19347
  };
18609
19348
  Insert: {
@@ -18611,6 +19350,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
18611
19350
  id?: string;
18612
19351
  product_group_id: string;
18613
19352
  quantity?: number;
19353
+ sort_order?: number;
18614
19354
  trade_item_id: string;
18615
19355
  };
18616
19356
  Update: {
@@ -18618,6 +19358,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
18618
19358
  id?: string;
18619
19359
  product_group_id?: string;
18620
19360
  quantity?: number;
19361
+ sort_order?: number;
18621
19362
  trade_item_id?: string;
18622
19363
  };
18623
19364
  Relationships: [{
@@ -18632,6 +19373,8 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
18632
19373
  Row: {
18633
19374
  created_at: string;
18634
19375
  description: string | null;
19376
+ head_product_id: string | null;
19377
+ head_trade_item_floriday_id: string | null;
18635
19378
  id: string;
18636
19379
  is_active: boolean;
18637
19380
  name: string;
@@ -18641,6 +19384,8 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
18641
19384
  Insert: {
18642
19385
  created_at?: string;
18643
19386
  description?: string | null;
19387
+ head_product_id?: string | null;
19388
+ head_trade_item_floriday_id?: string | null;
18644
19389
  id?: string;
18645
19390
  is_active?: boolean;
18646
19391
  name: string;
@@ -18650,16 +19395,85 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
18650
19395
  Update: {
18651
19396
  created_at?: string;
18652
19397
  description?: string | null;
19398
+ head_product_id?: string | null;
19399
+ head_trade_item_floriday_id?: string | null;
18653
19400
  id?: string;
18654
19401
  is_active?: boolean;
18655
19402
  name?: string;
18656
19403
  tenant_id?: string;
18657
19404
  updated_at?: string;
18658
19405
  };
18659
- Relationships: [];
19406
+ Relationships: [{
19407
+ foreignKeyName: "product_groups_head_product_id_fkey";
19408
+ columns: ["head_product_id"];
19409
+ isOneToOne: false;
19410
+ referencedRelation: "products";
19411
+ referencedColumns: ["id"];
19412
+ }];
19413
+ };
19414
+ product_load_settings: {
19415
+ Row: {
19416
+ created_at: string;
19417
+ id: string;
19418
+ is_package: boolean;
19419
+ layers_per_load_carrier: number | null;
19420
+ load_carrier: string | null;
19421
+ package_id: string | null;
19422
+ package_label: string | null;
19423
+ packages_per_layer: number | null;
19424
+ product_id: string | null;
19425
+ tenant_id: string;
19426
+ trade_item_floriday_id: string | null;
19427
+ units_per_package: number | null;
19428
+ updated_at: string;
19429
+ };
19430
+ Insert: {
19431
+ created_at?: string;
19432
+ id?: string;
19433
+ is_package?: boolean;
19434
+ layers_per_load_carrier?: number | null;
19435
+ load_carrier?: string | null;
19436
+ package_id?: string | null;
19437
+ package_label?: string | null;
19438
+ packages_per_layer?: number | null;
19439
+ product_id?: string | null;
19440
+ tenant_id: string;
19441
+ trade_item_floriday_id?: string | null;
19442
+ units_per_package?: number | null;
19443
+ updated_at?: string;
19444
+ };
19445
+ Update: {
19446
+ created_at?: string;
19447
+ id?: string;
19448
+ is_package?: boolean;
19449
+ layers_per_load_carrier?: number | null;
19450
+ load_carrier?: string | null;
19451
+ package_id?: string | null;
19452
+ package_label?: string | null;
19453
+ packages_per_layer?: number | null;
19454
+ product_id?: string | null;
19455
+ tenant_id?: string;
19456
+ trade_item_floriday_id?: string | null;
19457
+ units_per_package?: number | null;
19458
+ updated_at?: string;
19459
+ };
19460
+ Relationships: [{
19461
+ foreignKeyName: "product_load_settings_package_id_fkey";
19462
+ columns: ["package_id"];
19463
+ isOneToOne: false;
19464
+ referencedRelation: "packages";
19465
+ referencedColumns: ["id"];
19466
+ }, {
19467
+ foreignKeyName: "product_load_settings_product_id_fkey";
19468
+ columns: ["product_id"];
19469
+ isOneToOne: false;
19470
+ referencedRelation: "products";
19471
+ referencedColumns: ["id"];
19472
+ }];
18660
19473
  };
18661
19474
  products: {
18662
19475
  Row: {
19476
+ article_number: string | null;
18663
19477
  barcode: string | null;
18664
19478
  batch: string;
18665
19479
  crates_per_layer: number;
@@ -18683,6 +19497,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
18683
19497
  weight: string | null;
18684
19498
  };
18685
19499
  Insert: {
19500
+ article_number?: string | null;
18686
19501
  barcode?: string | null;
18687
19502
  batch: string;
18688
19503
  crates_per_layer?: number;
@@ -18706,6 +19521,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
18706
19521
  weight?: string | null;
18707
19522
  };
18708
19523
  Update: {
19524
+ article_number?: string | null;
18709
19525
  barcode?: string | null;
18710
19526
  batch?: string;
18711
19527
  crates_per_layer?: number;
@@ -19619,8 +20435,10 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
19619
20435
  order_id: string | null;
19620
20436
  order_item_id: string | null;
19621
20437
  order_source: string | null;
20438
+ parent_trade_item_key: string | null;
19622
20439
  physical_after: number | null;
19623
20440
  physical_before: number | null;
20441
+ production_batch_id: string | null;
19624
20442
  qty_delta: number;
19625
20443
  reason: string | null;
19626
20444
  reserved_after: number | null;
@@ -19636,8 +20454,10 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
19636
20454
  order_id?: string | null;
19637
20455
  order_item_id?: string | null;
19638
20456
  order_source?: string | null;
20457
+ parent_trade_item_key?: string | null;
19639
20458
  physical_after?: number | null;
19640
20459
  physical_before?: number | null;
20460
+ production_batch_id?: string | null;
19641
20461
  qty_delta: number;
19642
20462
  reason?: string | null;
19643
20463
  reserved_after?: number | null;
@@ -19653,8 +20473,10 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
19653
20473
  order_id?: string | null;
19654
20474
  order_item_id?: string | null;
19655
20475
  order_source?: string | null;
20476
+ parent_trade_item_key?: string | null;
19656
20477
  physical_after?: number | null;
19657
20478
  physical_before?: number | null;
20479
+ production_batch_id?: string | null;
19658
20480
  qty_delta?: number;
19659
20481
  reason?: string | null;
19660
20482
  reserved_after?: number | null;
@@ -20113,7 +20935,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
20113
20935
  twinfield_connections: {
20114
20936
  Row: {
20115
20937
  access_token: string | null;
20116
- client_id: string;
20938
+ client_id: string | null;
20117
20939
  client_secret: string | null;
20118
20940
  cluster_uri: string | null;
20119
20941
  company_code: string | null;
@@ -20125,7 +20947,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
20125
20947
  is_active: boolean;
20126
20948
  label: string | null;
20127
20949
  office_code: string | null;
20128
- redirect_uri: string;
20950
+ redirect_uri: string | null;
20129
20951
  refresh_token: string | null;
20130
20952
  token_expires_at: string | null;
20131
20953
  updated_at: string;
@@ -20133,7 +20955,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
20133
20955
  };
20134
20956
  Insert: {
20135
20957
  access_token?: string | null;
20136
- client_id: string;
20958
+ client_id?: string | null;
20137
20959
  client_secret?: string | null;
20138
20960
  cluster_uri?: string | null;
20139
20961
  company_code?: string | null;
@@ -20145,7 +20967,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
20145
20967
  is_active?: boolean;
20146
20968
  label?: string | null;
20147
20969
  office_code?: string | null;
20148
- redirect_uri: string;
20970
+ redirect_uri?: string | null;
20149
20971
  refresh_token?: string | null;
20150
20972
  token_expires_at?: string | null;
20151
20973
  updated_at?: string;
@@ -20153,7 +20975,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
20153
20975
  };
20154
20976
  Update: {
20155
20977
  access_token?: string | null;
20156
- client_id?: string;
20978
+ client_id?: string | null;
20157
20979
  client_secret?: string | null;
20158
20980
  cluster_uri?: string | null;
20159
20981
  company_code?: string | null;
@@ -20165,7 +20987,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
20165
20987
  is_active?: boolean;
20166
20988
  label?: string | null;
20167
20989
  office_code?: string | null;
20168
- redirect_uri?: string;
20990
+ redirect_uri?: string | null;
20169
20991
  refresh_token?: string | null;
20170
20992
  token_expires_at?: string | null;
20171
20993
  updated_at?: string;
@@ -21360,25 +22182,6 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
21360
22182
  };
21361
22183
  Relationships: [];
21362
22184
  };
21363
- floriday_customer_discounts: {
21364
- Row: {
21365
- base_price: number | null;
21366
- buyer_organization_id: string | null;
21367
- currency: string | null;
21368
- discount_type: string | null;
21369
- discount_value: number | null;
21370
- min_quantity: number | null;
21371
- net_price: number | null;
21372
- product_group_id: string | null;
21373
- raw: import("../integrations/supabase/types").Json | null;
21374
- source: string | null;
21375
- source_id: string | null;
21376
- trade_item_id: string | null;
21377
- valid_from: string | null;
21378
- valid_until: string | null;
21379
- };
21380
- Relationships: [];
21381
- };
21382
22185
  local_customer_discounts: {
21383
22186
  Row: {
21384
22187
  base_price: number | null;
@@ -21797,6 +22600,28 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
21797
22600
  Args: never;
21798
22601
  Returns: undefined;
21799
22602
  };
22603
+ consume_bom_for_production: {
22604
+ Args: {
22605
+ p_connection_id: string;
22606
+ p_parent_id: string;
22607
+ p_parent_key: string;
22608
+ p_parent_kind: string;
22609
+ p_quantity: number;
22610
+ p_user_id: string;
22611
+ };
22612
+ Returns: import("../integrations/supabase/types").Json;
22613
+ } | {
22614
+ Args: {
22615
+ p_batch_id?: string;
22616
+ p_connection_id: string;
22617
+ p_parent_id: string;
22618
+ p_parent_key: string;
22619
+ p_parent_kind: string;
22620
+ p_quantity: number;
22621
+ p_user_id: string;
22622
+ };
22623
+ Returns: import("../integrations/supabase/types").Json;
22624
+ };
21800
22625
  consume_floriday_rate_limit: {
21801
22626
  Args: {
21802
22627
  p_bucket: string;
@@ -21848,6 +22673,13 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
21848
22673
  table_name: string;
21849
22674
  }[];
21850
22675
  };
22676
+ delete_samenstelling: {
22677
+ Args: {
22678
+ p_parent_id: string;
22679
+ p_parent_kind: string;
22680
+ };
22681
+ Returns: import("../integrations/supabase/types").Json;
22682
+ };
21851
22683
  dispatch_carrier_signups_sql: {
21852
22684
  Args: {
21853
22685
  _catchup?: string;
@@ -22008,19 +22840,6 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
22008
22840
  resource: string;
22009
22841
  }[];
22010
22842
  };
22011
- get_floriday_agreements_active: {
22012
- Args: {
22013
- p_on_date?: string;
22014
- };
22015
- Returns: {
22016
- buyer_organization_id: string;
22017
- data: import("../integrations/supabase/types").Json;
22018
- floriday_id: string;
22019
- status: string;
22020
- valid_from: string;
22021
- valid_until: string;
22022
- }[];
22023
- };
22024
22843
  get_floriday_clock_supplies_window: {
22025
22844
  Args: {
22026
22845
  p_from: string;
@@ -22093,6 +22912,21 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
22093
22912
  minutes_since_success: number;
22094
22913
  }[];
22095
22914
  };
22915
+ get_group_allocation_keys: {
22916
+ Args: {
22917
+ p_product_id: string;
22918
+ };
22919
+ Returns: {
22920
+ k: string;
22921
+ ord: number;
22922
+ }[];
22923
+ };
22924
+ get_group_head_key: {
22925
+ Args: {
22926
+ p_group_id: string;
22927
+ };
22928
+ Returns: string;
22929
+ };
22096
22930
  get_offer_by_link_code: {
22097
22931
  Args: {
22098
22932
  p_code: string;
@@ -22203,6 +23037,18 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
22203
23037
  };
22204
23038
  Returns: undefined;
22205
23039
  };
23040
+ mark_shipment_shipped: {
23041
+ Args: {
23042
+ p_shipment_id: string;
23043
+ };
23044
+ Returns: undefined;
23045
+ };
23046
+ next_manufacture_partij: {
23047
+ Args: {
23048
+ _tenant_id: string;
23049
+ };
23050
+ Returns: string;
23051
+ };
22206
23052
  next_order_number: {
22207
23053
  Args: {
22208
23054
  p_prefix: string;
@@ -22281,6 +23127,14 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
22281
23127
  };
22282
23128
  Returns: undefined;
22283
23129
  };
23130
+ produce_designed_product: {
23131
+ Args: {
23132
+ p_parent_id: string;
23133
+ p_parent_kind: string;
23134
+ p_quantity: number;
23135
+ };
23136
+ Returns: import("../integrations/supabase/types").Json;
23137
+ };
22284
23138
  promote_trade_item_key: {
22285
23139
  Args: {
22286
23140
  p_new: string;
@@ -22288,6 +23142,10 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
22288
23142
  };
22289
23143
  Returns: undefined;
22290
23144
  };
23145
+ recompute_all_reserved_stock: {
23146
+ Args: never;
23147
+ Returns: undefined;
23148
+ };
22291
23149
  recompute_order_status: {
22292
23150
  Args: {
22293
23151
  p_order_id: string;
@@ -22337,27 +23195,45 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
22337
23195
  };
22338
23196
  Returns: undefined;
22339
23197
  };
23198
+ resolve_group_allocation: {
23199
+ Args: {
23200
+ _needed: number;
23201
+ _product_group_id: string;
23202
+ };
23203
+ Returns: {
23204
+ allocated: number;
23205
+ trade_item_id: string;
23206
+ }[];
23207
+ };
23208
+ resolve_group_member_stock_key: {
23209
+ Args: {
23210
+ p_trade_item_id: string;
23211
+ };
23212
+ Returns: string;
23213
+ };
22340
23214
  resolve_product_id_for_item: {
22341
23215
  Args: {
22342
23216
  p_product_name: string;
22343
23217
  };
22344
23218
  Returns: string;
22345
23219
  };
22346
- schedule_floriday_additional_services_sync: {
23220
+ resolve_stock_trade_item_key: {
22347
23221
  Args: {
22348
- p_apikey: string;
22349
- p_url: string;
23222
+ p_product_id: string;
22350
23223
  };
22351
- Returns: number;
23224
+ Returns: string;
22352
23225
  };
22353
- schedule_floriday_agreement_calloffs_sync: {
23226
+ reverse_production: {
22354
23227
  Args: {
22355
- p_apikey: string;
22356
- p_url: string;
23228
+ p_connection_id?: string;
23229
+ p_parent_key: string;
23230
+ p_quantity: number;
23231
+ p_reason?: string;
23232
+ p_user_id?: string;
22357
23233
  };
22358
- Returns: number;
23234
+ Returns: import("../integrations/supabase/types").Json;
22359
23235
  };
22360
- schedule_floriday_agreements_sync: {
23236
+ schedule_floriday_additional_services_sync: {
22361
23237
  Args: {
22362
23238
  p_apikey: string;
22363
23239
  p_url: string;
@@ -22930,6 +23806,165 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
22930
23806
  };
22931
23807
  Relationships: [];
22932
23808
  };
23809
+ ai_credentials: {
23810
+ Row: {
23811
+ active: boolean;
23812
+ api_key: string;
23813
+ created_at: string;
23814
+ created_by: string | null;
23815
+ id: string;
23816
+ label: string;
23817
+ provider_id: string;
23818
+ updated_at: string;
23819
+ };
23820
+ Insert: {
23821
+ active?: boolean;
23822
+ api_key: string;
23823
+ created_at?: string;
23824
+ created_by?: string | null;
23825
+ id?: string;
23826
+ label: string;
23827
+ provider_id: string;
23828
+ updated_at?: string;
23829
+ };
23830
+ Update: {
23831
+ active?: boolean;
23832
+ api_key?: string;
23833
+ created_at?: string;
23834
+ created_by?: string | null;
23835
+ id?: string;
23836
+ label?: string;
23837
+ provider_id?: string;
23838
+ updated_at?: string;
23839
+ };
23840
+ Relationships: [{
23841
+ foreignKeyName: "ai_credentials_provider_id_fkey";
23842
+ columns: ["provider_id"];
23843
+ isOneToOne: false;
23844
+ referencedRelation: "ai_providers";
23845
+ referencedColumns: ["id"];
23846
+ }];
23847
+ };
23848
+ ai_models: {
23849
+ Row: {
23850
+ active: boolean;
23851
+ context_window: number | null;
23852
+ created_at: string;
23853
+ display_name: string;
23854
+ id: string;
23855
+ is_default: boolean;
23856
+ modality: string;
23857
+ provider_id: string;
23858
+ slug: string;
23859
+ updated_at: string;
23860
+ };
23861
+ Insert: {
23862
+ active?: boolean;
23863
+ context_window?: number | null;
23864
+ created_at?: string;
23865
+ display_name: string;
23866
+ id?: string;
23867
+ is_default?: boolean;
23868
+ modality?: string;
23869
+ provider_id: string;
23870
+ slug: string;
23871
+ updated_at?: string;
23872
+ };
23873
+ Update: {
23874
+ active?: boolean;
23875
+ context_window?: number | null;
23876
+ created_at?: string;
23877
+ display_name?: string;
23878
+ id?: string;
23879
+ is_default?: boolean;
23880
+ modality?: string;
23881
+ provider_id?: string;
23882
+ slug?: string;
23883
+ updated_at?: string;
23884
+ };
23885
+ Relationships: [{
23886
+ foreignKeyName: "ai_models_provider_id_fkey";
23887
+ columns: ["provider_id"];
23888
+ isOneToOne: false;
23889
+ referencedRelation: "ai_providers";
23890
+ referencedColumns: ["id"];
23891
+ }];
23892
+ };
23893
+ ai_module_bindings: {
23894
+ Row: {
23895
+ consumer_module_id: string;
23896
+ created_at: string;
23897
+ credential_id: string;
23898
+ id: string;
23899
+ model_id: string;
23900
+ notes: string | null;
23901
+ updated_at: string;
23902
+ };
23903
+ Insert: {
23904
+ consumer_module_id: string;
23905
+ created_at?: string;
23906
+ credential_id: string;
23907
+ id?: string;
23908
+ model_id: string;
23909
+ notes?: string | null;
23910
+ updated_at?: string;
23911
+ };
23912
+ Update: {
23913
+ consumer_module_id?: string;
23914
+ created_at?: string;
23915
+ credential_id?: string;
23916
+ id?: string;
23917
+ model_id?: string;
23918
+ notes?: string | null;
23919
+ updated_at?: string;
23920
+ };
23921
+ Relationships: [{
23922
+ foreignKeyName: "ai_module_bindings_credential_id_fkey";
23923
+ columns: ["credential_id"];
23924
+ isOneToOne: false;
23925
+ referencedRelation: "ai_credentials";
23926
+ referencedColumns: ["id"];
23927
+ }, {
23928
+ foreignKeyName: "ai_module_bindings_model_id_fkey";
23929
+ columns: ["model_id"];
23930
+ isOneToOne: false;
23931
+ referencedRelation: "ai_models";
23932
+ referencedColumns: ["id"];
23933
+ }];
23934
+ };
23935
+ ai_providers: {
23936
+ Row: {
23937
+ active: boolean;
23938
+ auth_type: string;
23939
+ base_url: string | null;
23940
+ created_at: string;
23941
+ id: string;
23942
+ name: string;
23943
+ slug: string;
23944
+ updated_at: string;
23945
+ };
23946
+ Insert: {
23947
+ active?: boolean;
23948
+ auth_type?: string;
23949
+ base_url?: string | null;
23950
+ created_at?: string;
23951
+ id?: string;
23952
+ name: string;
23953
+ slug: string;
23954
+ updated_at?: string;
23955
+ };
23956
+ Update: {
23957
+ active?: boolean;
23958
+ auth_type?: string;
23959
+ base_url?: string | null;
23960
+ created_at?: string;
23961
+ id?: string;
23962
+ name?: string;
23963
+ slug?: string;
23964
+ updated_at?: string;
23965
+ };
23966
+ Relationships: [];
23967
+ };
22933
23968
  app_settings: {
22934
23969
  Row: {
22935
23970
  created_at: string;
@@ -25936,105 +26971,6 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
25936
26971
  referencedColumns: ["id"];
25937
26972
  }];
25938
26973
  };
25939
- floriday_agreement_calloffs_cache: {
25940
- Row: {
25941
- agreement_id: string | null;
25942
- connection_id: string;
25943
- data: import("../integrations/supabase/types").Json;
25944
- delivery_date: string | null;
25945
- fetched_at: string;
25946
- floriday_id: string;
25947
- id: string;
25948
- is_deleted: boolean;
25949
- sequence_number: number;
25950
- status: string | null;
25951
- updated_at: string;
25952
- };
25953
- Insert: {
25954
- agreement_id?: string | null;
25955
- connection_id: string;
25956
- data?: import("../integrations/supabase/types").Json;
25957
- delivery_date?: string | null;
25958
- fetched_at?: string;
25959
- floriday_id: string;
25960
- id?: string;
25961
- is_deleted?: boolean;
25962
- sequence_number?: number;
25963
- status?: string | null;
25964
- updated_at?: string;
25965
- };
25966
- Update: {
25967
- agreement_id?: string | null;
25968
- connection_id?: string;
25969
- data?: import("../integrations/supabase/types").Json;
25970
- delivery_date?: string | null;
25971
- fetched_at?: string;
25972
- floriday_id?: string;
25973
- id?: string;
25974
- is_deleted?: boolean;
25975
- sequence_number?: number;
25976
- status?: string | null;
25977
- updated_at?: string;
25978
- };
25979
- Relationships: [{
25980
- foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
25981
- columns: ["connection_id"];
25982
- isOneToOne: false;
25983
- referencedRelation: "floriday_connections";
25984
- referencedColumns: ["id"];
25985
- }];
25986
- };
25987
- floriday_agreements_cache: {
25988
- Row: {
25989
- buyer_organization_id: string | null;
25990
- connection_id: string;
25991
- data: import("../integrations/supabase/types").Json;
25992
- fetched_at: string;
25993
- floriday_id: string;
25994
- id: string;
25995
- is_deleted: boolean;
25996
- sequence_number: number;
25997
- status: string | null;
25998
- updated_at: string;
25999
- valid_from: string | null;
26000
- valid_until: string | null;
26001
- };
26002
- Insert: {
26003
- buyer_organization_id?: string | null;
26004
- connection_id: string;
26005
- data?: import("../integrations/supabase/types").Json;
26006
- fetched_at?: string;
26007
- floriday_id: string;
26008
- id?: string;
26009
- is_deleted?: boolean;
26010
- sequence_number?: number;
26011
- status?: string | null;
26012
- updated_at?: string;
26013
- valid_from?: string | null;
26014
- valid_until?: string | null;
26015
- };
26016
- Update: {
26017
- buyer_organization_id?: string | null;
26018
- connection_id?: string;
26019
- data?: import("../integrations/supabase/types").Json;
26020
- fetched_at?: string;
26021
- floriday_id?: string;
26022
- id?: string;
26023
- is_deleted?: boolean;
26024
- sequence_number?: number;
26025
- status?: string | null;
26026
- updated_at?: string;
26027
- valid_from?: string | null;
26028
- valid_until?: string | null;
26029
- };
26030
- Relationships: [{
26031
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
26032
- columns: ["connection_id"];
26033
- isOneToOne: false;
26034
- referencedRelation: "floriday_connections";
26035
- referencedColumns: ["id"];
26036
- }];
26037
- };
26038
26974
  floriday_auction_letters_cache: {
26039
26975
  Row: {
26040
26976
  auction_letter_code: string;
@@ -26533,6 +27469,27 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
26533
27469
  referencedColumns: ["id"];
26534
27470
  }];
26535
27471
  };
27472
+ floriday_continuous_stock_cache: {
27473
+ Row: {
27474
+ connection_id: string;
27475
+ fetched_at: string;
27476
+ number_of_pieces: number;
27477
+ trade_item_id: string;
27478
+ };
27479
+ Insert: {
27480
+ connection_id: string;
27481
+ fetched_at?: string;
27482
+ number_of_pieces?: number;
27483
+ trade_item_id: string;
27484
+ };
27485
+ Update: {
27486
+ connection_id?: string;
27487
+ fetched_at?: string;
27488
+ number_of_pieces?: number;
27489
+ trade_item_id?: string;
27490
+ };
27491
+ Relationships: [];
27492
+ };
26536
27493
  floriday_continuous_stock_queue: {
26537
27494
  Row: {
26538
27495
  attempts: number;
@@ -27511,6 +28468,45 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
27511
28468
  referencedColumns: ["id"];
27512
28469
  }];
27513
28470
  };
28471
+ floriday_trade_settings_customers_cache: {
28472
+ Row: {
28473
+ connection_id: string;
28474
+ data: import("../integrations/supabase/types").Json;
28475
+ fetched_at: string;
28476
+ floriday_id: string;
28477
+ id: string;
28478
+ is_deleted: boolean;
28479
+ sequence_number: number;
28480
+ updated_at: string;
28481
+ };
28482
+ Insert: {
28483
+ connection_id: string;
28484
+ data: import("../integrations/supabase/types").Json;
28485
+ fetched_at?: string;
28486
+ floriday_id: string;
28487
+ id?: string;
28488
+ is_deleted?: boolean;
28489
+ sequence_number?: number;
28490
+ updated_at?: string;
28491
+ };
28492
+ Update: {
28493
+ connection_id?: string;
28494
+ data?: import("../integrations/supabase/types").Json;
28495
+ fetched_at?: string;
28496
+ floriday_id?: string;
28497
+ id?: string;
28498
+ is_deleted?: boolean;
28499
+ sequence_number?: number;
28500
+ updated_at?: string;
28501
+ };
28502
+ Relationships: [{
28503
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
28504
+ columns: ["connection_id"];
28505
+ isOneToOne: false;
28506
+ referencedRelation: "floriday_connections";
28507
+ referencedColumns: ["id"];
28508
+ }];
28509
+ };
27514
28510
  floriday_trips_cache: {
27515
28511
  Row: {
27516
28512
  carrier_organization_id: string | null;
@@ -28656,39 +29652,60 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
28656
29652
  };
28657
29653
  manufacture_products: {
28658
29654
  Row: {
29655
+ aantal_te_produceren: number;
28659
29656
  created_at: string;
28660
29657
  description: string | null;
28661
29658
  id: string;
28662
29659
  is_active: boolean;
29660
+ location_id: string | null;
28663
29661
  name: string;
29662
+ partij_nummer: string | null;
29663
+ photos: import("../integrations/supabase/types").Json;
28664
29664
  produced_stock: number;
28665
29665
  product_code: string;
28666
29666
  tenant_id: string;
29667
+ unit: string;
28667
29668
  updated_at: string;
28668
29669
  };
28669
29670
  Insert: {
29671
+ aantal_te_produceren?: number;
28670
29672
  created_at?: string;
28671
29673
  description?: string | null;
28672
29674
  id?: string;
28673
29675
  is_active?: boolean;
29676
+ location_id?: string | null;
28674
29677
  name: string;
29678
+ partij_nummer?: string | null;
29679
+ photos?: import("../integrations/supabase/types").Json;
28675
29680
  produced_stock?: number;
28676
29681
  product_code: string;
28677
29682
  tenant_id: string;
29683
+ unit?: string;
28678
29684
  updated_at?: string;
28679
29685
  };
28680
29686
  Update: {
29687
+ aantal_te_produceren?: number;
28681
29688
  created_at?: string;
28682
29689
  description?: string | null;
28683
29690
  id?: string;
28684
29691
  is_active?: boolean;
29692
+ location_id?: string | null;
28685
29693
  name?: string;
29694
+ partij_nummer?: string | null;
29695
+ photos?: import("../integrations/supabase/types").Json;
28686
29696
  produced_stock?: number;
28687
29697
  product_code?: string;
28688
29698
  tenant_id?: string;
29699
+ unit?: string;
28689
29700
  updated_at?: string;
28690
29701
  };
28691
- Relationships: [];
29702
+ Relationships: [{
29703
+ foreignKeyName: "manufacture_products_location_id_fkey";
29704
+ columns: ["location_id"];
29705
+ isOneToOne: false;
29706
+ referencedRelation: "locations";
29707
+ referencedColumns: ["id"];
29708
+ }];
28692
29709
  };
28693
29710
  monteurs: {
28694
29711
  Row: {
@@ -29662,6 +30679,105 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
29662
30679
  };
29663
30680
  Relationships: [];
29664
30681
  };
30682
+ order_shipment_items: {
30683
+ Row: {
30684
+ created_at: string;
30685
+ id: string;
30686
+ order_item_id: string;
30687
+ product_id: string | null;
30688
+ product_name: string;
30689
+ quantity: number;
30690
+ shipment_id: string;
30691
+ updated_at: string;
30692
+ };
30693
+ Insert: {
30694
+ created_at?: string;
30695
+ id?: string;
30696
+ order_item_id: string;
30697
+ product_id?: string | null;
30698
+ product_name: string;
30699
+ quantity: number;
30700
+ shipment_id: string;
30701
+ updated_at?: string;
30702
+ };
30703
+ Update: {
30704
+ created_at?: string;
30705
+ id?: string;
30706
+ order_item_id?: string;
30707
+ product_id?: string | null;
30708
+ product_name?: string;
30709
+ quantity?: number;
30710
+ shipment_id?: string;
30711
+ updated_at?: string;
30712
+ };
30713
+ Relationships: [{
30714
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
30715
+ columns: ["order_item_id"];
30716
+ isOneToOne: false;
30717
+ referencedRelation: "order_items";
30718
+ referencedColumns: ["id"];
30719
+ }, {
30720
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
30721
+ columns: ["shipment_id"];
30722
+ isOneToOne: false;
30723
+ referencedRelation: "order_shipments";
30724
+ referencedColumns: ["id"];
30725
+ }];
30726
+ };
30727
+ order_shipments: {
30728
+ Row: {
30729
+ carrier_id: string | null;
30730
+ created_at: string;
30731
+ delivery_date: string | null;
30732
+ delivery_location_id: string | null;
30733
+ id: string;
30734
+ notes: string | null;
30735
+ order_id: string;
30736
+ shipment_number: number;
30737
+ shipped_at: string | null;
30738
+ status: string;
30739
+ updated_at: string;
30740
+ };
30741
+ Insert: {
30742
+ carrier_id?: string | null;
30743
+ created_at?: string;
30744
+ delivery_date?: string | null;
30745
+ delivery_location_id?: string | null;
30746
+ id?: string;
30747
+ notes?: string | null;
30748
+ order_id: string;
30749
+ shipment_number: number;
30750
+ shipped_at?: string | null;
30751
+ status?: string;
30752
+ updated_at?: string;
30753
+ };
30754
+ Update: {
30755
+ carrier_id?: string | null;
30756
+ created_at?: string;
30757
+ delivery_date?: string | null;
30758
+ delivery_location_id?: string | null;
30759
+ id?: string;
30760
+ notes?: string | null;
30761
+ order_id?: string;
30762
+ shipment_number?: number;
30763
+ shipped_at?: string | null;
30764
+ status?: string;
30765
+ updated_at?: string;
30766
+ };
30767
+ Relationships: [{
30768
+ foreignKeyName: "order_shipments_carrier_id_fkey";
30769
+ columns: ["carrier_id"];
30770
+ isOneToOne: false;
30771
+ referencedRelation: "carriers";
30772
+ referencedColumns: ["id"];
30773
+ }, {
30774
+ foreignKeyName: "order_shipments_order_id_fkey";
30775
+ columns: ["order_id"];
30776
+ isOneToOne: false;
30777
+ referencedRelation: "orders";
30778
+ referencedColumns: ["id"];
30779
+ }];
30780
+ };
29665
30781
  orders: {
29666
30782
  Row: {
29667
30783
  created_at: string;
@@ -29669,8 +30785,9 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
29669
30785
  customer_id: string | null;
29670
30786
  customer_name: string;
29671
30787
  deleted_at: string | null;
29672
- delivery_date: string;
30788
+ delivery_date: string | null;
29673
30789
  id: string;
30790
+ is_reservation: boolean;
29674
30791
  notes: string | null;
29675
30792
  order_date: string;
29676
30793
  order_number: string;
@@ -29687,8 +30804,9 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
29687
30804
  customer_id?: string | null;
29688
30805
  customer_name?: string;
29689
30806
  deleted_at?: string | null;
29690
- delivery_date: string;
30807
+ delivery_date?: string | null;
29691
30808
  id?: string;
30809
+ is_reservation?: boolean;
29692
30810
  notes?: string | null;
29693
30811
  order_date?: string;
29694
30812
  order_number: string;
@@ -29705,8 +30823,9 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
29705
30823
  customer_id?: string | null;
29706
30824
  customer_name?: string;
29707
30825
  deleted_at?: string | null;
29708
- delivery_date?: string;
30826
+ delivery_date?: string | null;
29709
30827
  id?: string;
30828
+ is_reservation?: boolean;
29710
30829
  notes?: string | null;
29711
30830
  order_date?: string;
29712
30831
  order_number?: string;
@@ -29848,6 +30967,63 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
29848
30967
  };
29849
30968
  Relationships: [];
29850
30969
  };
30970
+ product_bom_items: {
30971
+ Row: {
30972
+ component_product_id: string | null;
30973
+ component_trade_item_floriday_id: string | null;
30974
+ created_at: string;
30975
+ id: string;
30976
+ notes: string | null;
30977
+ parent_product_id: string | null;
30978
+ parent_trade_item_floriday_id: string | null;
30979
+ quantity: number;
30980
+ sort_order: number;
30981
+ tenant_id: string;
30982
+ unit: string;
30983
+ updated_at: string;
30984
+ };
30985
+ Insert: {
30986
+ component_product_id?: string | null;
30987
+ component_trade_item_floriday_id?: string | null;
30988
+ created_at?: string;
30989
+ id?: string;
30990
+ notes?: string | null;
30991
+ parent_product_id?: string | null;
30992
+ parent_trade_item_floriday_id?: string | null;
30993
+ quantity?: number;
30994
+ sort_order?: number;
30995
+ tenant_id: string;
30996
+ unit?: string;
30997
+ updated_at?: string;
30998
+ };
30999
+ Update: {
31000
+ component_product_id?: string | null;
31001
+ component_trade_item_floriday_id?: string | null;
31002
+ created_at?: string;
31003
+ id?: string;
31004
+ notes?: string | null;
31005
+ parent_product_id?: string | null;
31006
+ parent_trade_item_floriday_id?: string | null;
31007
+ quantity?: number;
31008
+ sort_order?: number;
31009
+ tenant_id?: string;
31010
+ unit?: string;
31011
+ updated_at?: string;
31012
+ };
31013
+ Relationships: [{
31014
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
31015
+ columns: ["component_product_id"];
31016
+ isOneToOne: false;
31017
+ referencedRelation: "products";
31018
+ referencedColumns: ["id"];
31019
+ }, {
31020
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
31021
+ columns: ["parent_product_id"];
31022
+ isOneToOne: false;
31023
+ referencedRelation: "products";
31024
+ referencedColumns: ["id"];
31025
+ }];
31026
+ };
29851
31027
  product_categories: {
29852
31028
  Row: {
29853
31029
  color: string;
@@ -29953,6 +31129,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
29953
31129
  id: string;
29954
31130
  product_group_id: string;
29955
31131
  quantity: number;
31132
+ sort_order: number;
29956
31133
  trade_item_id: string;
29957
31134
  };
29958
31135
  Insert: {
@@ -29960,6 +31137,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
29960
31137
  id?: string;
29961
31138
  product_group_id: string;
29962
31139
  quantity?: number;
31140
+ sort_order?: number;
29963
31141
  trade_item_id: string;
29964
31142
  };
29965
31143
  Update: {
@@ -29967,6 +31145,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
29967
31145
  id?: string;
29968
31146
  product_group_id?: string;
29969
31147
  quantity?: number;
31148
+ sort_order?: number;
29970
31149
  trade_item_id?: string;
29971
31150
  };
29972
31151
  Relationships: [{
@@ -29981,6 +31160,8 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
29981
31160
  Row: {
29982
31161
  created_at: string;
29983
31162
  description: string | null;
31163
+ head_product_id: string | null;
31164
+ head_trade_item_floriday_id: string | null;
29984
31165
  id: string;
29985
31166
  is_active: boolean;
29986
31167
  name: string;
@@ -29990,6 +31171,8 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
29990
31171
  Insert: {
29991
31172
  created_at?: string;
29992
31173
  description?: string | null;
31174
+ head_product_id?: string | null;
31175
+ head_trade_item_floriday_id?: string | null;
29993
31176
  id?: string;
29994
31177
  is_active?: boolean;
29995
31178
  name: string;
@@ -29999,16 +31182,85 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
29999
31182
  Update: {
30000
31183
  created_at?: string;
30001
31184
  description?: string | null;
31185
+ head_product_id?: string | null;
31186
+ head_trade_item_floriday_id?: string | null;
30002
31187
  id?: string;
30003
31188
  is_active?: boolean;
30004
31189
  name?: string;
30005
31190
  tenant_id?: string;
30006
31191
  updated_at?: string;
30007
31192
  };
30008
- Relationships: [];
31193
+ Relationships: [{
31194
+ foreignKeyName: "product_groups_head_product_id_fkey";
31195
+ columns: ["head_product_id"];
31196
+ isOneToOne: false;
31197
+ referencedRelation: "products";
31198
+ referencedColumns: ["id"];
31199
+ }];
31200
+ };
31201
+ product_load_settings: {
31202
+ Row: {
31203
+ created_at: string;
31204
+ id: string;
31205
+ is_package: boolean;
31206
+ layers_per_load_carrier: number | null;
31207
+ load_carrier: string | null;
31208
+ package_id: string | null;
31209
+ package_label: string | null;
31210
+ packages_per_layer: number | null;
31211
+ product_id: string | null;
31212
+ tenant_id: string;
31213
+ trade_item_floriday_id: string | null;
31214
+ units_per_package: number | null;
31215
+ updated_at: string;
31216
+ };
31217
+ Insert: {
31218
+ created_at?: string;
31219
+ id?: string;
31220
+ is_package?: boolean;
31221
+ layers_per_load_carrier?: number | null;
31222
+ load_carrier?: string | null;
31223
+ package_id?: string | null;
31224
+ package_label?: string | null;
31225
+ packages_per_layer?: number | null;
31226
+ product_id?: string | null;
31227
+ tenant_id: string;
31228
+ trade_item_floriday_id?: string | null;
31229
+ units_per_package?: number | null;
31230
+ updated_at?: string;
31231
+ };
31232
+ Update: {
31233
+ created_at?: string;
31234
+ id?: string;
31235
+ is_package?: boolean;
31236
+ layers_per_load_carrier?: number | null;
31237
+ load_carrier?: string | null;
31238
+ package_id?: string | null;
31239
+ package_label?: string | null;
31240
+ packages_per_layer?: number | null;
31241
+ product_id?: string | null;
31242
+ tenant_id?: string;
31243
+ trade_item_floriday_id?: string | null;
31244
+ units_per_package?: number | null;
31245
+ updated_at?: string;
31246
+ };
31247
+ Relationships: [{
31248
+ foreignKeyName: "product_load_settings_package_id_fkey";
31249
+ columns: ["package_id"];
31250
+ isOneToOne: false;
31251
+ referencedRelation: "packages";
31252
+ referencedColumns: ["id"];
31253
+ }, {
31254
+ foreignKeyName: "product_load_settings_product_id_fkey";
31255
+ columns: ["product_id"];
31256
+ isOneToOne: false;
31257
+ referencedRelation: "products";
31258
+ referencedColumns: ["id"];
31259
+ }];
30009
31260
  };
30010
31261
  products: {
30011
31262
  Row: {
31263
+ article_number: string | null;
30012
31264
  barcode: string | null;
30013
31265
  batch: string;
30014
31266
  crates_per_layer: number;
@@ -30032,6 +31284,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
30032
31284
  weight: string | null;
30033
31285
  };
30034
31286
  Insert: {
31287
+ article_number?: string | null;
30035
31288
  barcode?: string | null;
30036
31289
  batch: string;
30037
31290
  crates_per_layer?: number;
@@ -30055,6 +31308,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
30055
31308
  weight?: string | null;
30056
31309
  };
30057
31310
  Update: {
31311
+ article_number?: string | null;
30058
31312
  barcode?: string | null;
30059
31313
  batch?: string;
30060
31314
  crates_per_layer?: number;
@@ -30968,8 +32222,10 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
30968
32222
  order_id: string | null;
30969
32223
  order_item_id: string | null;
30970
32224
  order_source: string | null;
32225
+ parent_trade_item_key: string | null;
30971
32226
  physical_after: number | null;
30972
32227
  physical_before: number | null;
32228
+ production_batch_id: string | null;
30973
32229
  qty_delta: number;
30974
32230
  reason: string | null;
30975
32231
  reserved_after: number | null;
@@ -30985,8 +32241,10 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
30985
32241
  order_id?: string | null;
30986
32242
  order_item_id?: string | null;
30987
32243
  order_source?: string | null;
32244
+ parent_trade_item_key?: string | null;
30988
32245
  physical_after?: number | null;
30989
32246
  physical_before?: number | null;
32247
+ production_batch_id?: string | null;
30990
32248
  qty_delta: number;
30991
32249
  reason?: string | null;
30992
32250
  reserved_after?: number | null;
@@ -31002,8 +32260,10 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
31002
32260
  order_id?: string | null;
31003
32261
  order_item_id?: string | null;
31004
32262
  order_source?: string | null;
32263
+ parent_trade_item_key?: string | null;
31005
32264
  physical_after?: number | null;
31006
32265
  physical_before?: number | null;
32266
+ production_batch_id?: string | null;
31007
32267
  qty_delta?: number;
31008
32268
  reason?: string | null;
31009
32269
  reserved_after?: number | null;
@@ -31462,7 +32722,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
31462
32722
  twinfield_connections: {
31463
32723
  Row: {
31464
32724
  access_token: string | null;
31465
- client_id: string;
32725
+ client_id: string | null;
31466
32726
  client_secret: string | null;
31467
32727
  cluster_uri: string | null;
31468
32728
  company_code: string | null;
@@ -31474,7 +32734,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
31474
32734
  is_active: boolean;
31475
32735
  label: string | null;
31476
32736
  office_code: string | null;
31477
- redirect_uri: string;
32737
+ redirect_uri: string | null;
31478
32738
  refresh_token: string | null;
31479
32739
  token_expires_at: string | null;
31480
32740
  updated_at: string;
@@ -31482,7 +32742,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
31482
32742
  };
31483
32743
  Insert: {
31484
32744
  access_token?: string | null;
31485
- client_id: string;
32745
+ client_id?: string | null;
31486
32746
  client_secret?: string | null;
31487
32747
  cluster_uri?: string | null;
31488
32748
  company_code?: string | null;
@@ -31494,7 +32754,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
31494
32754
  is_active?: boolean;
31495
32755
  label?: string | null;
31496
32756
  office_code?: string | null;
31497
- redirect_uri: string;
32757
+ redirect_uri?: string | null;
31498
32758
  refresh_token?: string | null;
31499
32759
  token_expires_at?: string | null;
31500
32760
  updated_at?: string;
@@ -31502,7 +32762,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
31502
32762
  };
31503
32763
  Update: {
31504
32764
  access_token?: string | null;
31505
- client_id?: string;
32765
+ client_id?: string | null;
31506
32766
  client_secret?: string | null;
31507
32767
  cluster_uri?: string | null;
31508
32768
  company_code?: string | null;
@@ -31514,7 +32774,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
31514
32774
  is_active?: boolean;
31515
32775
  label?: string | null;
31516
32776
  office_code?: string | null;
31517
- redirect_uri?: string;
32777
+ redirect_uri?: string | null;
31518
32778
  refresh_token?: string | null;
31519
32779
  token_expires_at?: string | null;
31520
32780
  updated_at?: string;
@@ -32709,25 +33969,6 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
32709
33969
  };
32710
33970
  Relationships: [];
32711
33971
  };
32712
- floriday_customer_discounts: {
32713
- Row: {
32714
- base_price: number | null;
32715
- buyer_organization_id: string | null;
32716
- currency: string | null;
32717
- discount_type: string | null;
32718
- discount_value: number | null;
32719
- min_quantity: number | null;
32720
- net_price: number | null;
32721
- product_group_id: string | null;
32722
- raw: import("../integrations/supabase/types").Json | null;
32723
- source: string | null;
32724
- source_id: string | null;
32725
- trade_item_id: string | null;
32726
- valid_from: string | null;
32727
- valid_until: string | null;
32728
- };
32729
- Relationships: [];
32730
- };
32731
33972
  local_customer_discounts: {
32732
33973
  Row: {
32733
33974
  base_price: number | null;
@@ -33146,6 +34387,28 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
33146
34387
  Args: never;
33147
34388
  Returns: undefined;
33148
34389
  };
34390
+ consume_bom_for_production: {
34391
+ Args: {
34392
+ p_connection_id: string;
34393
+ p_parent_id: string;
34394
+ p_parent_key: string;
34395
+ p_parent_kind: string;
34396
+ p_quantity: number;
34397
+ p_user_id: string;
34398
+ };
34399
+ Returns: import("../integrations/supabase/types").Json;
34400
+ } | {
34401
+ Args: {
34402
+ p_batch_id?: string;
34403
+ p_connection_id: string;
34404
+ p_parent_id: string;
34405
+ p_parent_key: string;
34406
+ p_parent_kind: string;
34407
+ p_quantity: number;
34408
+ p_user_id: string;
34409
+ };
34410
+ Returns: import("../integrations/supabase/types").Json;
34411
+ };
33149
34412
  consume_floriday_rate_limit: {
33150
34413
  Args: {
33151
34414
  p_bucket: string;
@@ -33197,6 +34460,13 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
33197
34460
  table_name: string;
33198
34461
  }[];
33199
34462
  };
34463
+ delete_samenstelling: {
34464
+ Args: {
34465
+ p_parent_id: string;
34466
+ p_parent_kind: string;
34467
+ };
34468
+ Returns: import("../integrations/supabase/types").Json;
34469
+ };
33200
34470
  dispatch_carrier_signups_sql: {
33201
34471
  Args: {
33202
34472
  _catchup?: string;
@@ -33357,19 +34627,6 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
33357
34627
  resource: string;
33358
34628
  }[];
33359
34629
  };
33360
- get_floriday_agreements_active: {
33361
- Args: {
33362
- p_on_date?: string;
33363
- };
33364
- Returns: {
33365
- buyer_organization_id: string;
33366
- data: import("../integrations/supabase/types").Json;
33367
- floriday_id: string;
33368
- status: string;
33369
- valid_from: string;
33370
- valid_until: string;
33371
- }[];
33372
- };
33373
34630
  get_floriday_clock_supplies_window: {
33374
34631
  Args: {
33375
34632
  p_from: string;
@@ -33442,6 +34699,21 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
33442
34699
  minutes_since_success: number;
33443
34700
  }[];
33444
34701
  };
34702
+ get_group_allocation_keys: {
34703
+ Args: {
34704
+ p_product_id: string;
34705
+ };
34706
+ Returns: {
34707
+ k: string;
34708
+ ord: number;
34709
+ }[];
34710
+ };
34711
+ get_group_head_key: {
34712
+ Args: {
34713
+ p_group_id: string;
34714
+ };
34715
+ Returns: string;
34716
+ };
33445
34717
  get_offer_by_link_code: {
33446
34718
  Args: {
33447
34719
  p_code: string;
@@ -33552,6 +34824,18 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
33552
34824
  };
33553
34825
  Returns: undefined;
33554
34826
  };
34827
+ mark_shipment_shipped: {
34828
+ Args: {
34829
+ p_shipment_id: string;
34830
+ };
34831
+ Returns: undefined;
34832
+ };
34833
+ next_manufacture_partij: {
34834
+ Args: {
34835
+ _tenant_id: string;
34836
+ };
34837
+ Returns: string;
34838
+ };
33555
34839
  next_order_number: {
33556
34840
  Args: {
33557
34841
  p_prefix: string;
@@ -33630,6 +34914,14 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
33630
34914
  };
33631
34915
  Returns: undefined;
33632
34916
  };
34917
+ produce_designed_product: {
34918
+ Args: {
34919
+ p_parent_id: string;
34920
+ p_parent_kind: string;
34921
+ p_quantity: number;
34922
+ };
34923
+ Returns: import("../integrations/supabase/types").Json;
34924
+ };
33633
34925
  promote_trade_item_key: {
33634
34926
  Args: {
33635
34927
  p_new: string;
@@ -33637,6 +34929,10 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
33637
34929
  };
33638
34930
  Returns: undefined;
33639
34931
  };
34932
+ recompute_all_reserved_stock: {
34933
+ Args: never;
34934
+ Returns: undefined;
34935
+ };
33640
34936
  recompute_order_status: {
33641
34937
  Args: {
33642
34938
  p_order_id: string;
@@ -33686,27 +34982,45 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
33686
34982
  };
33687
34983
  Returns: undefined;
33688
34984
  };
34985
+ resolve_group_allocation: {
34986
+ Args: {
34987
+ _needed: number;
34988
+ _product_group_id: string;
34989
+ };
34990
+ Returns: {
34991
+ allocated: number;
34992
+ trade_item_id: string;
34993
+ }[];
34994
+ };
34995
+ resolve_group_member_stock_key: {
34996
+ Args: {
34997
+ p_trade_item_id: string;
34998
+ };
34999
+ Returns: string;
35000
+ };
33689
35001
  resolve_product_id_for_item: {
33690
35002
  Args: {
33691
35003
  p_product_name: string;
33692
35004
  };
33693
35005
  Returns: string;
33694
35006
  };
33695
- schedule_floriday_additional_services_sync: {
35007
+ resolve_stock_trade_item_key: {
33696
35008
  Args: {
33697
- p_apikey: string;
33698
- p_url: string;
35009
+ p_product_id: string;
33699
35010
  };
33700
- Returns: number;
35011
+ Returns: string;
33701
35012
  };
33702
- schedule_floriday_agreement_calloffs_sync: {
35013
+ reverse_production: {
33703
35014
  Args: {
33704
- p_apikey: string;
33705
- p_url: string;
35015
+ p_connection_id?: string;
35016
+ p_parent_key: string;
35017
+ p_quantity: number;
35018
+ p_reason?: string;
35019
+ p_user_id?: string;
33706
35020
  };
33707
- Returns: number;
35021
+ Returns: import("../integrations/supabase/types").Json;
33708
35022
  };
33709
- schedule_floriday_agreements_sync: {
35023
+ schedule_floriday_additional_services_sync: {
33710
35024
  Args: {
33711
35025
  p_apikey: string;
33712
35026
  p_url: string;