@flowselections/floriday-verkoop-module 1.0.17 → 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 (57) hide show
  1. package/dist-lib/components/verkoop/CreateOrderPage.d.ts.map +1 -1
  2. package/dist-lib/components/verkoop/CreateOrderPage.js +6 -4
  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/SalesOrdersTable.d.ts +4 -1
  16. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
  17. package/dist-lib/components/verkoop/SalesOrdersTable.js +2 -2
  18. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts.map +1 -1
  19. package/dist-lib/components/verkoop/VerkoopOrdersPage.js +43 -1
  20. package/dist-lib/integrations/supabase/auth-middleware.d.ts +381 -150
  21. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  22. package/dist-lib/integrations/supabase/client.d.ts +381 -150
  23. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  24. package/dist-lib/integrations/supabase/client.server.d.ts +381 -150
  25. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  26. package/dist-lib/integrations/supabase/types.d.ts +397 -154
  27. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  28. package/dist-lib/lib/cart-lock.functions.d.ts +381 -150
  29. package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
  30. package/dist-lib/lib/cart-replan.functions.d.ts +789 -327
  31. package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
  32. package/dist-lib/lib/create-order.functions.d.ts +38897 -1457
  33. package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
  34. package/dist-lib/lib/create-order.functions.js +792 -52
  35. package/dist-lib/lib/expand-group-order-items.d.ts +13 -0
  36. package/dist-lib/lib/expand-group-order-items.d.ts.map +1 -0
  37. package/dist-lib/lib/expand-group-order-items.js +216 -0
  38. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +1174 -481
  39. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
  40. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +381 -150
  41. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
  42. package/dist-lib/lib/floriday-public.functions.d.ts +2701 -1084
  43. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  44. package/dist-lib/lib/floriday-writes.functions.d.ts +1939 -784
  45. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  46. package/dist-lib/lib/order-shipments.functions.d.ts +47158 -0
  47. package/dist-lib/lib/order-shipments.functions.d.ts.map +1 -0
  48. package/dist-lib/lib/order-shipments.functions.js +178 -0
  49. package/dist-lib/lib/salesorders-mapping.d.ts +1 -0
  50. package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
  51. package/dist-lib/lib/salesorders.functions.d.ts +1174 -481
  52. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  53. package/dist-lib/lib/tradeitems.functions.d.ts +381 -150
  54. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  55. package/dist-lib/lib/useSalesOrdersQuery.d.ts.map +1 -1
  56. package/dist-lib/lib/useSalesOrdersQuery.js +39 -2
  57. package/package.json +2 -2
@@ -3407,105 +3407,6 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
3407
3407
  referencedColumns: ["id"];
3408
3408
  }];
3409
3409
  };
3410
- floriday_agreement_calloffs_cache: {
3411
- Row: {
3412
- agreement_id: string | null;
3413
- connection_id: string;
3414
- data: import("../integrations/supabase/types").Json;
3415
- delivery_date: string | null;
3416
- fetched_at: string;
3417
- floriday_id: string;
3418
- id: string;
3419
- is_deleted: boolean;
3420
- sequence_number: number;
3421
- status: string | null;
3422
- updated_at: string;
3423
- };
3424
- Insert: {
3425
- agreement_id?: string | null;
3426
- connection_id: string;
3427
- data?: import("../integrations/supabase/types").Json;
3428
- delivery_date?: string | null;
3429
- fetched_at?: string;
3430
- floriday_id: string;
3431
- id?: string;
3432
- is_deleted?: boolean;
3433
- sequence_number?: number;
3434
- status?: string | null;
3435
- updated_at?: string;
3436
- };
3437
- Update: {
3438
- agreement_id?: string | null;
3439
- connection_id?: string;
3440
- data?: import("../integrations/supabase/types").Json;
3441
- delivery_date?: string | null;
3442
- fetched_at?: string;
3443
- floriday_id?: string;
3444
- id?: string;
3445
- is_deleted?: boolean;
3446
- sequence_number?: number;
3447
- status?: string | null;
3448
- updated_at?: string;
3449
- };
3450
- Relationships: [{
3451
- foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
3452
- columns: ["connection_id"];
3453
- isOneToOne: false;
3454
- referencedRelation: "floriday_connections";
3455
- referencedColumns: ["id"];
3456
- }];
3457
- };
3458
- floriday_agreements_cache: {
3459
- Row: {
3460
- buyer_organization_id: string | null;
3461
- connection_id: string;
3462
- data: import("../integrations/supabase/types").Json;
3463
- fetched_at: string;
3464
- floriday_id: string;
3465
- id: string;
3466
- is_deleted: boolean;
3467
- sequence_number: number;
3468
- status: string | null;
3469
- updated_at: string;
3470
- valid_from: string | null;
3471
- valid_until: string | null;
3472
- };
3473
- Insert: {
3474
- buyer_organization_id?: string | null;
3475
- connection_id: string;
3476
- data?: import("../integrations/supabase/types").Json;
3477
- fetched_at?: string;
3478
- floriday_id: string;
3479
- id?: string;
3480
- is_deleted?: boolean;
3481
- sequence_number?: number;
3482
- status?: string | null;
3483
- updated_at?: string;
3484
- valid_from?: string | null;
3485
- valid_until?: string | null;
3486
- };
3487
- Update: {
3488
- buyer_organization_id?: string | null;
3489
- connection_id?: string;
3490
- data?: import("../integrations/supabase/types").Json;
3491
- fetched_at?: string;
3492
- floriday_id?: string;
3493
- id?: string;
3494
- is_deleted?: boolean;
3495
- sequence_number?: number;
3496
- status?: string | null;
3497
- updated_at?: string;
3498
- valid_from?: string | null;
3499
- valid_until?: string | null;
3500
- };
3501
- Relationships: [{
3502
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
3503
- columns: ["connection_id"];
3504
- isOneToOne: false;
3505
- referencedRelation: "floriday_connections";
3506
- referencedColumns: ["id"];
3507
- }];
3508
- };
3509
3410
  floriday_auction_letters_cache: {
3510
3411
  Row: {
3511
3412
  auction_letter_code: string;
@@ -5003,6 +4904,45 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
5003
4904
  referencedColumns: ["id"];
5004
4905
  }];
5005
4906
  };
4907
+ floriday_trade_settings_customers_cache: {
4908
+ Row: {
4909
+ connection_id: string;
4910
+ data: import("../integrations/supabase/types").Json;
4911
+ fetched_at: string;
4912
+ floriday_id: string;
4913
+ id: string;
4914
+ is_deleted: boolean;
4915
+ sequence_number: number;
4916
+ updated_at: string;
4917
+ };
4918
+ Insert: {
4919
+ connection_id: string;
4920
+ data: import("../integrations/supabase/types").Json;
4921
+ fetched_at?: string;
4922
+ floriday_id: string;
4923
+ id?: string;
4924
+ is_deleted?: boolean;
4925
+ sequence_number?: number;
4926
+ updated_at?: string;
4927
+ };
4928
+ Update: {
4929
+ connection_id?: string;
4930
+ data?: import("../integrations/supabase/types").Json;
4931
+ fetched_at?: string;
4932
+ floriday_id?: string;
4933
+ id?: string;
4934
+ is_deleted?: boolean;
4935
+ sequence_number?: number;
4936
+ updated_at?: string;
4937
+ };
4938
+ Relationships: [{
4939
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
4940
+ columns: ["connection_id"];
4941
+ isOneToOne: false;
4942
+ referencedRelation: "floriday_connections";
4943
+ referencedColumns: ["id"];
4944
+ }];
4945
+ };
5006
4946
  floriday_trips_cache: {
5007
4947
  Row: {
5008
4948
  carrier_organization_id: string | null;
@@ -7175,6 +7115,105 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7175
7115
  };
7176
7116
  Relationships: [];
7177
7117
  };
7118
+ order_shipment_items: {
7119
+ Row: {
7120
+ created_at: string;
7121
+ id: string;
7122
+ order_item_id: string;
7123
+ product_id: string | null;
7124
+ product_name: string;
7125
+ quantity: number;
7126
+ shipment_id: string;
7127
+ updated_at: string;
7128
+ };
7129
+ Insert: {
7130
+ created_at?: string;
7131
+ id?: string;
7132
+ order_item_id: string;
7133
+ product_id?: string | null;
7134
+ product_name: string;
7135
+ quantity: number;
7136
+ shipment_id: string;
7137
+ updated_at?: string;
7138
+ };
7139
+ Update: {
7140
+ created_at?: string;
7141
+ id?: string;
7142
+ order_item_id?: string;
7143
+ product_id?: string | null;
7144
+ product_name?: string;
7145
+ quantity?: number;
7146
+ shipment_id?: string;
7147
+ updated_at?: string;
7148
+ };
7149
+ Relationships: [{
7150
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
7151
+ columns: ["order_item_id"];
7152
+ isOneToOne: false;
7153
+ referencedRelation: "order_items";
7154
+ referencedColumns: ["id"];
7155
+ }, {
7156
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
7157
+ columns: ["shipment_id"];
7158
+ isOneToOne: false;
7159
+ referencedRelation: "order_shipments";
7160
+ referencedColumns: ["id"];
7161
+ }];
7162
+ };
7163
+ order_shipments: {
7164
+ Row: {
7165
+ carrier_id: string | null;
7166
+ created_at: string;
7167
+ delivery_date: string | null;
7168
+ delivery_location_id: string | null;
7169
+ id: string;
7170
+ notes: string | null;
7171
+ order_id: string;
7172
+ shipment_number: number;
7173
+ shipped_at: string | null;
7174
+ status: string;
7175
+ updated_at: string;
7176
+ };
7177
+ Insert: {
7178
+ carrier_id?: string | null;
7179
+ created_at?: string;
7180
+ delivery_date?: string | null;
7181
+ delivery_location_id?: string | null;
7182
+ id?: string;
7183
+ notes?: string | null;
7184
+ order_id: string;
7185
+ shipment_number: number;
7186
+ shipped_at?: string | null;
7187
+ status?: string;
7188
+ updated_at?: string;
7189
+ };
7190
+ Update: {
7191
+ carrier_id?: string | null;
7192
+ created_at?: string;
7193
+ delivery_date?: string | null;
7194
+ delivery_location_id?: string | null;
7195
+ id?: string;
7196
+ notes?: string | null;
7197
+ order_id?: string;
7198
+ shipment_number?: number;
7199
+ shipped_at?: string | null;
7200
+ status?: string;
7201
+ updated_at?: string;
7202
+ };
7203
+ Relationships: [{
7204
+ foreignKeyName: "order_shipments_carrier_id_fkey";
7205
+ columns: ["carrier_id"];
7206
+ isOneToOne: false;
7207
+ referencedRelation: "carriers";
7208
+ referencedColumns: ["id"];
7209
+ }, {
7210
+ foreignKeyName: "order_shipments_order_id_fkey";
7211
+ columns: ["order_id"];
7212
+ isOneToOne: false;
7213
+ referencedRelation: "orders";
7214
+ referencedColumns: ["id"];
7215
+ }];
7216
+ };
7178
7217
  orders: {
7179
7218
  Row: {
7180
7219
  created_at: string;
@@ -7182,8 +7221,9 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7182
7221
  customer_id: string | null;
7183
7222
  customer_name: string;
7184
7223
  deleted_at: string | null;
7185
- delivery_date: string;
7224
+ delivery_date: string | null;
7186
7225
  id: string;
7226
+ is_reservation: boolean;
7187
7227
  notes: string | null;
7188
7228
  order_date: string;
7189
7229
  order_number: string;
@@ -7200,8 +7240,9 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7200
7240
  customer_id?: string | null;
7201
7241
  customer_name?: string;
7202
7242
  deleted_at?: string | null;
7203
- delivery_date: string;
7243
+ delivery_date?: string | null;
7204
7244
  id?: string;
7245
+ is_reservation?: boolean;
7205
7246
  notes?: string | null;
7206
7247
  order_date?: string;
7207
7248
  order_number: string;
@@ -7218,8 +7259,9 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7218
7259
  customer_id?: string | null;
7219
7260
  customer_name?: string;
7220
7261
  deleted_at?: string | null;
7221
- delivery_date?: string;
7262
+ delivery_date?: string | null;
7222
7263
  id?: string;
7264
+ is_reservation?: boolean;
7223
7265
  notes?: string | null;
7224
7266
  order_date?: string;
7225
7267
  order_number?: string;
@@ -7361,6 +7403,63 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7361
7403
  };
7362
7404
  Relationships: [];
7363
7405
  };
7406
+ product_bom_items: {
7407
+ Row: {
7408
+ component_product_id: string | null;
7409
+ component_trade_item_floriday_id: string | null;
7410
+ created_at: string;
7411
+ id: string;
7412
+ notes: string | null;
7413
+ parent_product_id: string | null;
7414
+ parent_trade_item_floriday_id: string | null;
7415
+ quantity: number;
7416
+ sort_order: number;
7417
+ tenant_id: string;
7418
+ unit: string;
7419
+ updated_at: string;
7420
+ };
7421
+ Insert: {
7422
+ component_product_id?: string | null;
7423
+ component_trade_item_floriday_id?: string | null;
7424
+ created_at?: string;
7425
+ id?: string;
7426
+ notes?: string | null;
7427
+ parent_product_id?: string | null;
7428
+ parent_trade_item_floriday_id?: string | null;
7429
+ quantity?: number;
7430
+ sort_order?: number;
7431
+ tenant_id: string;
7432
+ unit?: string;
7433
+ updated_at?: string;
7434
+ };
7435
+ Update: {
7436
+ component_product_id?: string | null;
7437
+ component_trade_item_floriday_id?: string | null;
7438
+ created_at?: string;
7439
+ id?: string;
7440
+ notes?: string | null;
7441
+ parent_product_id?: string | null;
7442
+ parent_trade_item_floriday_id?: string | null;
7443
+ quantity?: number;
7444
+ sort_order?: number;
7445
+ tenant_id?: string;
7446
+ unit?: string;
7447
+ updated_at?: string;
7448
+ };
7449
+ Relationships: [{
7450
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
7451
+ columns: ["component_product_id"];
7452
+ isOneToOne: false;
7453
+ referencedRelation: "products";
7454
+ referencedColumns: ["id"];
7455
+ }, {
7456
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
7457
+ columns: ["parent_product_id"];
7458
+ isOneToOne: false;
7459
+ referencedRelation: "products";
7460
+ referencedColumns: ["id"];
7461
+ }];
7462
+ };
7364
7463
  product_categories: {
7365
7464
  Row: {
7366
7465
  color: string;
@@ -7466,6 +7565,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7466
7565
  id: string;
7467
7566
  product_group_id: string;
7468
7567
  quantity: number;
7568
+ sort_order: number;
7469
7569
  trade_item_id: string;
7470
7570
  };
7471
7571
  Insert: {
@@ -7473,6 +7573,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7473
7573
  id?: string;
7474
7574
  product_group_id: string;
7475
7575
  quantity?: number;
7576
+ sort_order?: number;
7476
7577
  trade_item_id: string;
7477
7578
  };
7478
7579
  Update: {
@@ -7480,6 +7581,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7480
7581
  id?: string;
7481
7582
  product_group_id?: string;
7482
7583
  quantity?: number;
7584
+ sort_order?: number;
7483
7585
  trade_item_id?: string;
7484
7586
  };
7485
7587
  Relationships: [{
@@ -7494,6 +7596,8 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7494
7596
  Row: {
7495
7597
  created_at: string;
7496
7598
  description: string | null;
7599
+ head_product_id: string | null;
7600
+ head_trade_item_floriday_id: string | null;
7497
7601
  id: string;
7498
7602
  is_active: boolean;
7499
7603
  name: string;
@@ -7503,6 +7607,8 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7503
7607
  Insert: {
7504
7608
  created_at?: string;
7505
7609
  description?: string | null;
7610
+ head_product_id?: string | null;
7611
+ head_trade_item_floriday_id?: string | null;
7506
7612
  id?: string;
7507
7613
  is_active?: boolean;
7508
7614
  name: string;
@@ -7512,16 +7618,85 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7512
7618
  Update: {
7513
7619
  created_at?: string;
7514
7620
  description?: string | null;
7621
+ head_product_id?: string | null;
7622
+ head_trade_item_floriday_id?: string | null;
7515
7623
  id?: string;
7516
7624
  is_active?: boolean;
7517
7625
  name?: string;
7518
7626
  tenant_id?: string;
7519
7627
  updated_at?: string;
7520
7628
  };
7521
- Relationships: [];
7629
+ Relationships: [{
7630
+ foreignKeyName: "product_groups_head_product_id_fkey";
7631
+ columns: ["head_product_id"];
7632
+ isOneToOne: false;
7633
+ referencedRelation: "products";
7634
+ referencedColumns: ["id"];
7635
+ }];
7636
+ };
7637
+ product_load_settings: {
7638
+ Row: {
7639
+ created_at: string;
7640
+ id: string;
7641
+ is_package: boolean;
7642
+ layers_per_load_carrier: number | null;
7643
+ load_carrier: string | null;
7644
+ package_id: string | null;
7645
+ package_label: string | null;
7646
+ packages_per_layer: number | null;
7647
+ product_id: string | null;
7648
+ tenant_id: string;
7649
+ trade_item_floriday_id: string | null;
7650
+ units_per_package: number | null;
7651
+ updated_at: string;
7652
+ };
7653
+ Insert: {
7654
+ created_at?: string;
7655
+ id?: string;
7656
+ is_package?: boolean;
7657
+ layers_per_load_carrier?: number | null;
7658
+ load_carrier?: string | null;
7659
+ package_id?: string | null;
7660
+ package_label?: string | null;
7661
+ packages_per_layer?: number | null;
7662
+ product_id?: string | null;
7663
+ tenant_id: string;
7664
+ trade_item_floriday_id?: string | null;
7665
+ units_per_package?: number | null;
7666
+ updated_at?: string;
7667
+ };
7668
+ Update: {
7669
+ created_at?: string;
7670
+ id?: string;
7671
+ is_package?: boolean;
7672
+ layers_per_load_carrier?: number | null;
7673
+ load_carrier?: string | null;
7674
+ package_id?: string | null;
7675
+ package_label?: string | null;
7676
+ packages_per_layer?: number | null;
7677
+ product_id?: string | null;
7678
+ tenant_id?: string;
7679
+ trade_item_floriday_id?: string | null;
7680
+ units_per_package?: number | null;
7681
+ updated_at?: string;
7682
+ };
7683
+ Relationships: [{
7684
+ foreignKeyName: "product_load_settings_package_id_fkey";
7685
+ columns: ["package_id"];
7686
+ isOneToOne: false;
7687
+ referencedRelation: "packages";
7688
+ referencedColumns: ["id"];
7689
+ }, {
7690
+ foreignKeyName: "product_load_settings_product_id_fkey";
7691
+ columns: ["product_id"];
7692
+ isOneToOne: false;
7693
+ referencedRelation: "products";
7694
+ referencedColumns: ["id"];
7695
+ }];
7522
7696
  };
7523
7697
  products: {
7524
7698
  Row: {
7699
+ article_number: string | null;
7525
7700
  barcode: string | null;
7526
7701
  batch: string;
7527
7702
  crates_per_layer: number;
@@ -7545,6 +7720,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7545
7720
  weight: string | null;
7546
7721
  };
7547
7722
  Insert: {
7723
+ article_number?: string | null;
7548
7724
  barcode?: string | null;
7549
7725
  batch: string;
7550
7726
  crates_per_layer?: number;
@@ -7568,6 +7744,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7568
7744
  weight?: string | null;
7569
7745
  };
7570
7746
  Update: {
7747
+ article_number?: string | null;
7571
7748
  barcode?: string | null;
7572
7749
  batch?: string;
7573
7750
  crates_per_layer?: number;
@@ -8481,8 +8658,10 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
8481
8658
  order_id: string | null;
8482
8659
  order_item_id: string | null;
8483
8660
  order_source: string | null;
8661
+ parent_trade_item_key: string | null;
8484
8662
  physical_after: number | null;
8485
8663
  physical_before: number | null;
8664
+ production_batch_id: string | null;
8486
8665
  qty_delta: number;
8487
8666
  reason: string | null;
8488
8667
  reserved_after: number | null;
@@ -8498,8 +8677,10 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
8498
8677
  order_id?: string | null;
8499
8678
  order_item_id?: string | null;
8500
8679
  order_source?: string | null;
8680
+ parent_trade_item_key?: string | null;
8501
8681
  physical_after?: number | null;
8502
8682
  physical_before?: number | null;
8683
+ production_batch_id?: string | null;
8503
8684
  qty_delta: number;
8504
8685
  reason?: string | null;
8505
8686
  reserved_after?: number | null;
@@ -8515,8 +8696,10 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
8515
8696
  order_id?: string | null;
8516
8697
  order_item_id?: string | null;
8517
8698
  order_source?: string | null;
8699
+ parent_trade_item_key?: string | null;
8518
8700
  physical_after?: number | null;
8519
8701
  physical_before?: number | null;
8702
+ production_batch_id?: string | null;
8520
8703
  qty_delta?: number;
8521
8704
  reason?: string | null;
8522
8705
  reserved_after?: number | null;
@@ -8975,7 +9158,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
8975
9158
  twinfield_connections: {
8976
9159
  Row: {
8977
9160
  access_token: string | null;
8978
- client_id: string;
9161
+ client_id: string | null;
8979
9162
  client_secret: string | null;
8980
9163
  cluster_uri: string | null;
8981
9164
  company_code: string | null;
@@ -8987,7 +9170,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
8987
9170
  is_active: boolean;
8988
9171
  label: string | null;
8989
9172
  office_code: string | null;
8990
- redirect_uri: string;
9173
+ redirect_uri: string | null;
8991
9174
  refresh_token: string | null;
8992
9175
  token_expires_at: string | null;
8993
9176
  updated_at: string;
@@ -8995,7 +9178,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
8995
9178
  };
8996
9179
  Insert: {
8997
9180
  access_token?: string | null;
8998
- client_id: string;
9181
+ client_id?: string | null;
8999
9182
  client_secret?: string | null;
9000
9183
  cluster_uri?: string | null;
9001
9184
  company_code?: string | null;
@@ -9007,7 +9190,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
9007
9190
  is_active?: boolean;
9008
9191
  label?: string | null;
9009
9192
  office_code?: string | null;
9010
- redirect_uri: string;
9193
+ redirect_uri?: string | null;
9011
9194
  refresh_token?: string | null;
9012
9195
  token_expires_at?: string | null;
9013
9196
  updated_at?: string;
@@ -9015,7 +9198,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
9015
9198
  };
9016
9199
  Update: {
9017
9200
  access_token?: string | null;
9018
- client_id?: string;
9201
+ client_id?: string | null;
9019
9202
  client_secret?: string | null;
9020
9203
  cluster_uri?: string | null;
9021
9204
  company_code?: string | null;
@@ -9027,7 +9210,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
9027
9210
  is_active?: boolean;
9028
9211
  label?: string | null;
9029
9212
  office_code?: string | null;
9030
- redirect_uri?: string;
9213
+ redirect_uri?: string | null;
9031
9214
  refresh_token?: string | null;
9032
9215
  token_expires_at?: string | null;
9033
9216
  updated_at?: string;
@@ -10222,25 +10405,6 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
10222
10405
  };
10223
10406
  Relationships: [];
10224
10407
  };
10225
- floriday_customer_discounts: {
10226
- Row: {
10227
- base_price: number | null;
10228
- buyer_organization_id: string | null;
10229
- currency: string | null;
10230
- discount_type: string | null;
10231
- discount_value: number | null;
10232
- min_quantity: number | null;
10233
- net_price: number | null;
10234
- product_group_id: string | null;
10235
- raw: import("../integrations/supabase/types").Json | null;
10236
- source: string | null;
10237
- source_id: string | null;
10238
- trade_item_id: string | null;
10239
- valid_from: string | null;
10240
- valid_until: string | null;
10241
- };
10242
- Relationships: [];
10243
- };
10244
10408
  local_customer_discounts: {
10245
10409
  Row: {
10246
10410
  base_price: number | null;
@@ -10659,6 +10823,28 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
10659
10823
  Args: never;
10660
10824
  Returns: undefined;
10661
10825
  };
10826
+ consume_bom_for_production: {
10827
+ Args: {
10828
+ p_connection_id: string;
10829
+ p_parent_id: string;
10830
+ p_parent_key: string;
10831
+ p_parent_kind: string;
10832
+ p_quantity: number;
10833
+ p_user_id: string;
10834
+ };
10835
+ Returns: import("../integrations/supabase/types").Json;
10836
+ } | {
10837
+ Args: {
10838
+ p_batch_id?: string;
10839
+ p_connection_id: string;
10840
+ p_parent_id: string;
10841
+ p_parent_key: string;
10842
+ p_parent_kind: string;
10843
+ p_quantity: number;
10844
+ p_user_id: string;
10845
+ };
10846
+ Returns: import("../integrations/supabase/types").Json;
10847
+ };
10662
10848
  consume_floriday_rate_limit: {
10663
10849
  Args: {
10664
10850
  p_bucket: string;
@@ -10710,6 +10896,13 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
10710
10896
  table_name: string;
10711
10897
  }[];
10712
10898
  };
10899
+ delete_samenstelling: {
10900
+ Args: {
10901
+ p_parent_id: string;
10902
+ p_parent_kind: string;
10903
+ };
10904
+ Returns: import("../integrations/supabase/types").Json;
10905
+ };
10713
10906
  dispatch_carrier_signups_sql: {
10714
10907
  Args: {
10715
10908
  _catchup?: string;
@@ -10870,19 +11063,6 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
10870
11063
  resource: string;
10871
11064
  }[];
10872
11065
  };
10873
- get_floriday_agreements_active: {
10874
- Args: {
10875
- p_on_date?: string;
10876
- };
10877
- Returns: {
10878
- buyer_organization_id: string;
10879
- data: import("../integrations/supabase/types").Json;
10880
- floriday_id: string;
10881
- status: string;
10882
- valid_from: string;
10883
- valid_until: string;
10884
- }[];
10885
- };
10886
11066
  get_floriday_clock_supplies_window: {
10887
11067
  Args: {
10888
11068
  p_from: string;
@@ -10955,6 +11135,21 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
10955
11135
  minutes_since_success: number;
10956
11136
  }[];
10957
11137
  };
11138
+ get_group_allocation_keys: {
11139
+ Args: {
11140
+ p_product_id: string;
11141
+ };
11142
+ Returns: {
11143
+ k: string;
11144
+ ord: number;
11145
+ }[];
11146
+ };
11147
+ get_group_head_key: {
11148
+ Args: {
11149
+ p_group_id: string;
11150
+ };
11151
+ Returns: string;
11152
+ };
10958
11153
  get_offer_by_link_code: {
10959
11154
  Args: {
10960
11155
  p_code: string;
@@ -11065,6 +11260,12 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
11065
11260
  };
11066
11261
  Returns: undefined;
11067
11262
  };
11263
+ mark_shipment_shipped: {
11264
+ Args: {
11265
+ p_shipment_id: string;
11266
+ };
11267
+ Returns: undefined;
11268
+ };
11068
11269
  next_manufacture_partij: {
11069
11270
  Args: {
11070
11271
  _tenant_id: string;
@@ -11149,6 +11350,14 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
11149
11350
  };
11150
11351
  Returns: undefined;
11151
11352
  };
11353
+ produce_designed_product: {
11354
+ Args: {
11355
+ p_parent_id: string;
11356
+ p_parent_kind: string;
11357
+ p_quantity: number;
11358
+ };
11359
+ Returns: import("../integrations/supabase/types").Json;
11360
+ };
11152
11361
  promote_trade_item_key: {
11153
11362
  Args: {
11154
11363
  p_new: string;
@@ -11156,6 +11365,10 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
11156
11365
  };
11157
11366
  Returns: undefined;
11158
11367
  };
11368
+ recompute_all_reserved_stock: {
11369
+ Args: never;
11370
+ Returns: undefined;
11371
+ };
11159
11372
  recompute_order_status: {
11160
11373
  Args: {
11161
11374
  p_order_id: string;
@@ -11205,27 +11418,45 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
11205
11418
  };
11206
11419
  Returns: undefined;
11207
11420
  };
11421
+ resolve_group_allocation: {
11422
+ Args: {
11423
+ _needed: number;
11424
+ _product_group_id: string;
11425
+ };
11426
+ Returns: {
11427
+ allocated: number;
11428
+ trade_item_id: string;
11429
+ }[];
11430
+ };
11431
+ resolve_group_member_stock_key: {
11432
+ Args: {
11433
+ p_trade_item_id: string;
11434
+ };
11435
+ Returns: string;
11436
+ };
11208
11437
  resolve_product_id_for_item: {
11209
11438
  Args: {
11210
11439
  p_product_name: string;
11211
11440
  };
11212
11441
  Returns: string;
11213
11442
  };
11214
- schedule_floriday_additional_services_sync: {
11443
+ resolve_stock_trade_item_key: {
11215
11444
  Args: {
11216
- p_apikey: string;
11217
- p_url: string;
11445
+ p_product_id: string;
11218
11446
  };
11219
- Returns: number;
11447
+ Returns: string;
11220
11448
  };
11221
- schedule_floriday_agreement_calloffs_sync: {
11449
+ reverse_production: {
11222
11450
  Args: {
11223
- p_apikey: string;
11224
- p_url: string;
11451
+ p_connection_id?: string;
11452
+ p_parent_key: string;
11453
+ p_quantity: number;
11454
+ p_reason?: string;
11455
+ p_user_id?: string;
11225
11456
  };
11226
- Returns: number;
11457
+ Returns: import("../integrations/supabase/types").Json;
11227
11458
  };
11228
- schedule_floriday_agreements_sync: {
11459
+ schedule_floriday_additional_services_sync: {
11229
11460
  Args: {
11230
11461
  p_apikey: string;
11231
11462
  p_url: string;
@@ -14958,105 +15189,6 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
14958
15189
  referencedColumns: ["id"];
14959
15190
  }];
14960
15191
  };
14961
- floriday_agreement_calloffs_cache: {
14962
- Row: {
14963
- agreement_id: string | null;
14964
- connection_id: string;
14965
- data: import("../integrations/supabase/types").Json;
14966
- delivery_date: string | null;
14967
- fetched_at: string;
14968
- floriday_id: string;
14969
- id: string;
14970
- is_deleted: boolean;
14971
- sequence_number: number;
14972
- status: string | null;
14973
- updated_at: string;
14974
- };
14975
- Insert: {
14976
- agreement_id?: string | null;
14977
- connection_id: string;
14978
- data?: import("../integrations/supabase/types").Json;
14979
- delivery_date?: string | null;
14980
- fetched_at?: string;
14981
- floriday_id: string;
14982
- id?: string;
14983
- is_deleted?: boolean;
14984
- sequence_number?: number;
14985
- status?: string | null;
14986
- updated_at?: string;
14987
- };
14988
- Update: {
14989
- agreement_id?: string | null;
14990
- connection_id?: string;
14991
- data?: import("../integrations/supabase/types").Json;
14992
- delivery_date?: string | null;
14993
- fetched_at?: string;
14994
- floriday_id?: string;
14995
- id?: string;
14996
- is_deleted?: boolean;
14997
- sequence_number?: number;
14998
- status?: string | null;
14999
- updated_at?: string;
15000
- };
15001
- Relationships: [{
15002
- foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
15003
- columns: ["connection_id"];
15004
- isOneToOne: false;
15005
- referencedRelation: "floriday_connections";
15006
- referencedColumns: ["id"];
15007
- }];
15008
- };
15009
- floriday_agreements_cache: {
15010
- Row: {
15011
- buyer_organization_id: string | null;
15012
- connection_id: string;
15013
- data: import("../integrations/supabase/types").Json;
15014
- fetched_at: string;
15015
- floriday_id: string;
15016
- id: string;
15017
- is_deleted: boolean;
15018
- sequence_number: number;
15019
- status: string | null;
15020
- updated_at: string;
15021
- valid_from: string | null;
15022
- valid_until: string | null;
15023
- };
15024
- Insert: {
15025
- buyer_organization_id?: string | null;
15026
- connection_id: string;
15027
- data?: import("../integrations/supabase/types").Json;
15028
- fetched_at?: string;
15029
- floriday_id: string;
15030
- id?: string;
15031
- is_deleted?: boolean;
15032
- sequence_number?: number;
15033
- status?: string | null;
15034
- updated_at?: string;
15035
- valid_from?: string | null;
15036
- valid_until?: string | null;
15037
- };
15038
- Update: {
15039
- buyer_organization_id?: string | null;
15040
- connection_id?: string;
15041
- data?: import("../integrations/supabase/types").Json;
15042
- fetched_at?: string;
15043
- floriday_id?: string;
15044
- id?: string;
15045
- is_deleted?: boolean;
15046
- sequence_number?: number;
15047
- status?: string | null;
15048
- updated_at?: string;
15049
- valid_from?: string | null;
15050
- valid_until?: string | null;
15051
- };
15052
- Relationships: [{
15053
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
15054
- columns: ["connection_id"];
15055
- isOneToOne: false;
15056
- referencedRelation: "floriday_connections";
15057
- referencedColumns: ["id"];
15058
- }];
15059
- };
15060
15192
  floriday_auction_letters_cache: {
15061
15193
  Row: {
15062
15194
  auction_letter_code: string;
@@ -16554,6 +16686,45 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
16554
16686
  referencedColumns: ["id"];
16555
16687
  }];
16556
16688
  };
16689
+ floriday_trade_settings_customers_cache: {
16690
+ Row: {
16691
+ connection_id: string;
16692
+ data: import("../integrations/supabase/types").Json;
16693
+ fetched_at: string;
16694
+ floriday_id: string;
16695
+ id: string;
16696
+ is_deleted: boolean;
16697
+ sequence_number: number;
16698
+ updated_at: string;
16699
+ };
16700
+ Insert: {
16701
+ connection_id: string;
16702
+ data: import("../integrations/supabase/types").Json;
16703
+ fetched_at?: string;
16704
+ floriday_id: string;
16705
+ id?: string;
16706
+ is_deleted?: boolean;
16707
+ sequence_number?: number;
16708
+ updated_at?: string;
16709
+ };
16710
+ Update: {
16711
+ connection_id?: string;
16712
+ data?: import("../integrations/supabase/types").Json;
16713
+ fetched_at?: string;
16714
+ floriday_id?: string;
16715
+ id?: string;
16716
+ is_deleted?: boolean;
16717
+ sequence_number?: number;
16718
+ updated_at?: string;
16719
+ };
16720
+ Relationships: [{
16721
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
16722
+ columns: ["connection_id"];
16723
+ isOneToOne: false;
16724
+ referencedRelation: "floriday_connections";
16725
+ referencedColumns: ["id"];
16726
+ }];
16727
+ };
16557
16728
  floriday_trips_cache: {
16558
16729
  Row: {
16559
16730
  carrier_organization_id: string | null;
@@ -18726,6 +18897,105 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
18726
18897
  };
18727
18898
  Relationships: [];
18728
18899
  };
18900
+ order_shipment_items: {
18901
+ Row: {
18902
+ created_at: string;
18903
+ id: string;
18904
+ order_item_id: string;
18905
+ product_id: string | null;
18906
+ product_name: string;
18907
+ quantity: number;
18908
+ shipment_id: string;
18909
+ updated_at: string;
18910
+ };
18911
+ Insert: {
18912
+ created_at?: string;
18913
+ id?: string;
18914
+ order_item_id: string;
18915
+ product_id?: string | null;
18916
+ product_name: string;
18917
+ quantity: number;
18918
+ shipment_id: string;
18919
+ updated_at?: string;
18920
+ };
18921
+ Update: {
18922
+ created_at?: string;
18923
+ id?: string;
18924
+ order_item_id?: string;
18925
+ product_id?: string | null;
18926
+ product_name?: string;
18927
+ quantity?: number;
18928
+ shipment_id?: string;
18929
+ updated_at?: string;
18930
+ };
18931
+ Relationships: [{
18932
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
18933
+ columns: ["order_item_id"];
18934
+ isOneToOne: false;
18935
+ referencedRelation: "order_items";
18936
+ referencedColumns: ["id"];
18937
+ }, {
18938
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
18939
+ columns: ["shipment_id"];
18940
+ isOneToOne: false;
18941
+ referencedRelation: "order_shipments";
18942
+ referencedColumns: ["id"];
18943
+ }];
18944
+ };
18945
+ order_shipments: {
18946
+ Row: {
18947
+ carrier_id: string | null;
18948
+ created_at: string;
18949
+ delivery_date: string | null;
18950
+ delivery_location_id: string | null;
18951
+ id: string;
18952
+ notes: string | null;
18953
+ order_id: string;
18954
+ shipment_number: number;
18955
+ shipped_at: string | null;
18956
+ status: string;
18957
+ updated_at: string;
18958
+ };
18959
+ Insert: {
18960
+ carrier_id?: string | null;
18961
+ created_at?: string;
18962
+ delivery_date?: string | null;
18963
+ delivery_location_id?: string | null;
18964
+ id?: string;
18965
+ notes?: string | null;
18966
+ order_id: string;
18967
+ shipment_number: number;
18968
+ shipped_at?: string | null;
18969
+ status?: string;
18970
+ updated_at?: string;
18971
+ };
18972
+ Update: {
18973
+ carrier_id?: string | null;
18974
+ created_at?: string;
18975
+ delivery_date?: string | null;
18976
+ delivery_location_id?: string | null;
18977
+ id?: string;
18978
+ notes?: string | null;
18979
+ order_id?: string;
18980
+ shipment_number?: number;
18981
+ shipped_at?: string | null;
18982
+ status?: string;
18983
+ updated_at?: string;
18984
+ };
18985
+ Relationships: [{
18986
+ foreignKeyName: "order_shipments_carrier_id_fkey";
18987
+ columns: ["carrier_id"];
18988
+ isOneToOne: false;
18989
+ referencedRelation: "carriers";
18990
+ referencedColumns: ["id"];
18991
+ }, {
18992
+ foreignKeyName: "order_shipments_order_id_fkey";
18993
+ columns: ["order_id"];
18994
+ isOneToOne: false;
18995
+ referencedRelation: "orders";
18996
+ referencedColumns: ["id"];
18997
+ }];
18998
+ };
18729
18999
  orders: {
18730
19000
  Row: {
18731
19001
  created_at: string;
@@ -18733,8 +19003,9 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
18733
19003
  customer_id: string | null;
18734
19004
  customer_name: string;
18735
19005
  deleted_at: string | null;
18736
- delivery_date: string;
19006
+ delivery_date: string | null;
18737
19007
  id: string;
19008
+ is_reservation: boolean;
18738
19009
  notes: string | null;
18739
19010
  order_date: string;
18740
19011
  order_number: string;
@@ -18751,8 +19022,9 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
18751
19022
  customer_id?: string | null;
18752
19023
  customer_name?: string;
18753
19024
  deleted_at?: string | null;
18754
- delivery_date: string;
19025
+ delivery_date?: string | null;
18755
19026
  id?: string;
19027
+ is_reservation?: boolean;
18756
19028
  notes?: string | null;
18757
19029
  order_date?: string;
18758
19030
  order_number: string;
@@ -18769,8 +19041,9 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
18769
19041
  customer_id?: string | null;
18770
19042
  customer_name?: string;
18771
19043
  deleted_at?: string | null;
18772
- delivery_date?: string;
19044
+ delivery_date?: string | null;
18773
19045
  id?: string;
19046
+ is_reservation?: boolean;
18774
19047
  notes?: string | null;
18775
19048
  order_date?: string;
18776
19049
  order_number?: string;
@@ -18912,6 +19185,63 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
18912
19185
  };
18913
19186
  Relationships: [];
18914
19187
  };
19188
+ product_bom_items: {
19189
+ Row: {
19190
+ component_product_id: string | null;
19191
+ component_trade_item_floriday_id: string | null;
19192
+ created_at: string;
19193
+ id: string;
19194
+ notes: string | null;
19195
+ parent_product_id: string | null;
19196
+ parent_trade_item_floriday_id: string | null;
19197
+ quantity: number;
19198
+ sort_order: number;
19199
+ tenant_id: string;
19200
+ unit: string;
19201
+ updated_at: string;
19202
+ };
19203
+ Insert: {
19204
+ component_product_id?: string | null;
19205
+ component_trade_item_floriday_id?: string | null;
19206
+ created_at?: string;
19207
+ id?: string;
19208
+ notes?: string | null;
19209
+ parent_product_id?: string | null;
19210
+ parent_trade_item_floriday_id?: string | null;
19211
+ quantity?: number;
19212
+ sort_order?: number;
19213
+ tenant_id: string;
19214
+ unit?: string;
19215
+ updated_at?: string;
19216
+ };
19217
+ Update: {
19218
+ component_product_id?: string | null;
19219
+ component_trade_item_floriday_id?: string | null;
19220
+ created_at?: string;
19221
+ id?: string;
19222
+ notes?: string | null;
19223
+ parent_product_id?: string | null;
19224
+ parent_trade_item_floriday_id?: string | null;
19225
+ quantity?: number;
19226
+ sort_order?: number;
19227
+ tenant_id?: string;
19228
+ unit?: string;
19229
+ updated_at?: string;
19230
+ };
19231
+ Relationships: [{
19232
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
19233
+ columns: ["component_product_id"];
19234
+ isOneToOne: false;
19235
+ referencedRelation: "products";
19236
+ referencedColumns: ["id"];
19237
+ }, {
19238
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
19239
+ columns: ["parent_product_id"];
19240
+ isOneToOne: false;
19241
+ referencedRelation: "products";
19242
+ referencedColumns: ["id"];
19243
+ }];
19244
+ };
18915
19245
  product_categories: {
18916
19246
  Row: {
18917
19247
  color: string;
@@ -19017,6 +19347,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
19017
19347
  id: string;
19018
19348
  product_group_id: string;
19019
19349
  quantity: number;
19350
+ sort_order: number;
19020
19351
  trade_item_id: string;
19021
19352
  };
19022
19353
  Insert: {
@@ -19024,6 +19355,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
19024
19355
  id?: string;
19025
19356
  product_group_id: string;
19026
19357
  quantity?: number;
19358
+ sort_order?: number;
19027
19359
  trade_item_id: string;
19028
19360
  };
19029
19361
  Update: {
@@ -19031,6 +19363,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
19031
19363
  id?: string;
19032
19364
  product_group_id?: string;
19033
19365
  quantity?: number;
19366
+ sort_order?: number;
19034
19367
  trade_item_id?: string;
19035
19368
  };
19036
19369
  Relationships: [{
@@ -19045,6 +19378,8 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
19045
19378
  Row: {
19046
19379
  created_at: string;
19047
19380
  description: string | null;
19381
+ head_product_id: string | null;
19382
+ head_trade_item_floriday_id: string | null;
19048
19383
  id: string;
19049
19384
  is_active: boolean;
19050
19385
  name: string;
@@ -19054,6 +19389,8 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
19054
19389
  Insert: {
19055
19390
  created_at?: string;
19056
19391
  description?: string | null;
19392
+ head_product_id?: string | null;
19393
+ head_trade_item_floriday_id?: string | null;
19057
19394
  id?: string;
19058
19395
  is_active?: boolean;
19059
19396
  name: string;
@@ -19063,16 +19400,85 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
19063
19400
  Update: {
19064
19401
  created_at?: string;
19065
19402
  description?: string | null;
19403
+ head_product_id?: string | null;
19404
+ head_trade_item_floriday_id?: string | null;
19066
19405
  id?: string;
19067
19406
  is_active?: boolean;
19068
19407
  name?: string;
19069
19408
  tenant_id?: string;
19070
19409
  updated_at?: string;
19071
19410
  };
19072
- Relationships: [];
19411
+ Relationships: [{
19412
+ foreignKeyName: "product_groups_head_product_id_fkey";
19413
+ columns: ["head_product_id"];
19414
+ isOneToOne: false;
19415
+ referencedRelation: "products";
19416
+ referencedColumns: ["id"];
19417
+ }];
19418
+ };
19419
+ product_load_settings: {
19420
+ Row: {
19421
+ created_at: string;
19422
+ id: string;
19423
+ is_package: boolean;
19424
+ layers_per_load_carrier: number | null;
19425
+ load_carrier: string | null;
19426
+ package_id: string | null;
19427
+ package_label: string | null;
19428
+ packages_per_layer: number | null;
19429
+ product_id: string | null;
19430
+ tenant_id: string;
19431
+ trade_item_floriday_id: string | null;
19432
+ units_per_package: number | null;
19433
+ updated_at: string;
19434
+ };
19435
+ Insert: {
19436
+ created_at?: string;
19437
+ id?: string;
19438
+ is_package?: boolean;
19439
+ layers_per_load_carrier?: number | null;
19440
+ load_carrier?: string | null;
19441
+ package_id?: string | null;
19442
+ package_label?: string | null;
19443
+ packages_per_layer?: number | null;
19444
+ product_id?: string | null;
19445
+ tenant_id: string;
19446
+ trade_item_floriday_id?: string | null;
19447
+ units_per_package?: number | null;
19448
+ updated_at?: string;
19449
+ };
19450
+ Update: {
19451
+ created_at?: string;
19452
+ id?: string;
19453
+ is_package?: boolean;
19454
+ layers_per_load_carrier?: number | null;
19455
+ load_carrier?: string | null;
19456
+ package_id?: string | null;
19457
+ package_label?: string | null;
19458
+ packages_per_layer?: number | null;
19459
+ product_id?: string | null;
19460
+ tenant_id?: string;
19461
+ trade_item_floriday_id?: string | null;
19462
+ units_per_package?: number | null;
19463
+ updated_at?: string;
19464
+ };
19465
+ Relationships: [{
19466
+ foreignKeyName: "product_load_settings_package_id_fkey";
19467
+ columns: ["package_id"];
19468
+ isOneToOne: false;
19469
+ referencedRelation: "packages";
19470
+ referencedColumns: ["id"];
19471
+ }, {
19472
+ foreignKeyName: "product_load_settings_product_id_fkey";
19473
+ columns: ["product_id"];
19474
+ isOneToOne: false;
19475
+ referencedRelation: "products";
19476
+ referencedColumns: ["id"];
19477
+ }];
19073
19478
  };
19074
19479
  products: {
19075
19480
  Row: {
19481
+ article_number: string | null;
19076
19482
  barcode: string | null;
19077
19483
  batch: string;
19078
19484
  crates_per_layer: number;
@@ -19096,6 +19502,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
19096
19502
  weight: string | null;
19097
19503
  };
19098
19504
  Insert: {
19505
+ article_number?: string | null;
19099
19506
  barcode?: string | null;
19100
19507
  batch: string;
19101
19508
  crates_per_layer?: number;
@@ -19119,6 +19526,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
19119
19526
  weight?: string | null;
19120
19527
  };
19121
19528
  Update: {
19529
+ article_number?: string | null;
19122
19530
  barcode?: string | null;
19123
19531
  batch?: string;
19124
19532
  crates_per_layer?: number;
@@ -20032,8 +20440,10 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
20032
20440
  order_id: string | null;
20033
20441
  order_item_id: string | null;
20034
20442
  order_source: string | null;
20443
+ parent_trade_item_key: string | null;
20035
20444
  physical_after: number | null;
20036
20445
  physical_before: number | null;
20446
+ production_batch_id: string | null;
20037
20447
  qty_delta: number;
20038
20448
  reason: string | null;
20039
20449
  reserved_after: number | null;
@@ -20049,8 +20459,10 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
20049
20459
  order_id?: string | null;
20050
20460
  order_item_id?: string | null;
20051
20461
  order_source?: string | null;
20462
+ parent_trade_item_key?: string | null;
20052
20463
  physical_after?: number | null;
20053
20464
  physical_before?: number | null;
20465
+ production_batch_id?: string | null;
20054
20466
  qty_delta: number;
20055
20467
  reason?: string | null;
20056
20468
  reserved_after?: number | null;
@@ -20066,8 +20478,10 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
20066
20478
  order_id?: string | null;
20067
20479
  order_item_id?: string | null;
20068
20480
  order_source?: string | null;
20481
+ parent_trade_item_key?: string | null;
20069
20482
  physical_after?: number | null;
20070
20483
  physical_before?: number | null;
20484
+ production_batch_id?: string | null;
20071
20485
  qty_delta?: number;
20072
20486
  reason?: string | null;
20073
20487
  reserved_after?: number | null;
@@ -20526,7 +20940,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
20526
20940
  twinfield_connections: {
20527
20941
  Row: {
20528
20942
  access_token: string | null;
20529
- client_id: string;
20943
+ client_id: string | null;
20530
20944
  client_secret: string | null;
20531
20945
  cluster_uri: string | null;
20532
20946
  company_code: string | null;
@@ -20538,7 +20952,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
20538
20952
  is_active: boolean;
20539
20953
  label: string | null;
20540
20954
  office_code: string | null;
20541
- redirect_uri: string;
20955
+ redirect_uri: string | null;
20542
20956
  refresh_token: string | null;
20543
20957
  token_expires_at: string | null;
20544
20958
  updated_at: string;
@@ -20546,7 +20960,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
20546
20960
  };
20547
20961
  Insert: {
20548
20962
  access_token?: string | null;
20549
- client_id: string;
20963
+ client_id?: string | null;
20550
20964
  client_secret?: string | null;
20551
20965
  cluster_uri?: string | null;
20552
20966
  company_code?: string | null;
@@ -20558,7 +20972,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
20558
20972
  is_active?: boolean;
20559
20973
  label?: string | null;
20560
20974
  office_code?: string | null;
20561
- redirect_uri: string;
20975
+ redirect_uri?: string | null;
20562
20976
  refresh_token?: string | null;
20563
20977
  token_expires_at?: string | null;
20564
20978
  updated_at?: string;
@@ -20566,7 +20980,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
20566
20980
  };
20567
20981
  Update: {
20568
20982
  access_token?: string | null;
20569
- client_id?: string;
20983
+ client_id?: string | null;
20570
20984
  client_secret?: string | null;
20571
20985
  cluster_uri?: string | null;
20572
20986
  company_code?: string | null;
@@ -20578,7 +20992,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
20578
20992
  is_active?: boolean;
20579
20993
  label?: string | null;
20580
20994
  office_code?: string | null;
20581
- redirect_uri?: string;
20995
+ redirect_uri?: string | null;
20582
20996
  refresh_token?: string | null;
20583
20997
  token_expires_at?: string | null;
20584
20998
  updated_at?: string;
@@ -21773,25 +22187,6 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
21773
22187
  };
21774
22188
  Relationships: [];
21775
22189
  };
21776
- floriday_customer_discounts: {
21777
- Row: {
21778
- base_price: number | null;
21779
- buyer_organization_id: string | null;
21780
- currency: string | null;
21781
- discount_type: string | null;
21782
- discount_value: number | null;
21783
- min_quantity: number | null;
21784
- net_price: number | null;
21785
- product_group_id: string | null;
21786
- raw: import("../integrations/supabase/types").Json | null;
21787
- source: string | null;
21788
- source_id: string | null;
21789
- trade_item_id: string | null;
21790
- valid_from: string | null;
21791
- valid_until: string | null;
21792
- };
21793
- Relationships: [];
21794
- };
21795
22190
  local_customer_discounts: {
21796
22191
  Row: {
21797
22192
  base_price: number | null;
@@ -22210,6 +22605,28 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
22210
22605
  Args: never;
22211
22606
  Returns: undefined;
22212
22607
  };
22608
+ consume_bom_for_production: {
22609
+ Args: {
22610
+ p_connection_id: string;
22611
+ p_parent_id: string;
22612
+ p_parent_key: string;
22613
+ p_parent_kind: string;
22614
+ p_quantity: number;
22615
+ p_user_id: string;
22616
+ };
22617
+ Returns: import("../integrations/supabase/types").Json;
22618
+ } | {
22619
+ Args: {
22620
+ p_batch_id?: string;
22621
+ p_connection_id: string;
22622
+ p_parent_id: string;
22623
+ p_parent_key: string;
22624
+ p_parent_kind: string;
22625
+ p_quantity: number;
22626
+ p_user_id: string;
22627
+ };
22628
+ Returns: import("../integrations/supabase/types").Json;
22629
+ };
22213
22630
  consume_floriday_rate_limit: {
22214
22631
  Args: {
22215
22632
  p_bucket: string;
@@ -22261,6 +22678,13 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
22261
22678
  table_name: string;
22262
22679
  }[];
22263
22680
  };
22681
+ delete_samenstelling: {
22682
+ Args: {
22683
+ p_parent_id: string;
22684
+ p_parent_kind: string;
22685
+ };
22686
+ Returns: import("../integrations/supabase/types").Json;
22687
+ };
22264
22688
  dispatch_carrier_signups_sql: {
22265
22689
  Args: {
22266
22690
  _catchup?: string;
@@ -22421,19 +22845,6 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
22421
22845
  resource: string;
22422
22846
  }[];
22423
22847
  };
22424
- get_floriday_agreements_active: {
22425
- Args: {
22426
- p_on_date?: string;
22427
- };
22428
- Returns: {
22429
- buyer_organization_id: string;
22430
- data: import("../integrations/supabase/types").Json;
22431
- floriday_id: string;
22432
- status: string;
22433
- valid_from: string;
22434
- valid_until: string;
22435
- }[];
22436
- };
22437
22848
  get_floriday_clock_supplies_window: {
22438
22849
  Args: {
22439
22850
  p_from: string;
@@ -22506,6 +22917,21 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
22506
22917
  minutes_since_success: number;
22507
22918
  }[];
22508
22919
  };
22920
+ get_group_allocation_keys: {
22921
+ Args: {
22922
+ p_product_id: string;
22923
+ };
22924
+ Returns: {
22925
+ k: string;
22926
+ ord: number;
22927
+ }[];
22928
+ };
22929
+ get_group_head_key: {
22930
+ Args: {
22931
+ p_group_id: string;
22932
+ };
22933
+ Returns: string;
22934
+ };
22509
22935
  get_offer_by_link_code: {
22510
22936
  Args: {
22511
22937
  p_code: string;
@@ -22616,6 +23042,12 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
22616
23042
  };
22617
23043
  Returns: undefined;
22618
23044
  };
23045
+ mark_shipment_shipped: {
23046
+ Args: {
23047
+ p_shipment_id: string;
23048
+ };
23049
+ Returns: undefined;
23050
+ };
22619
23051
  next_manufacture_partij: {
22620
23052
  Args: {
22621
23053
  _tenant_id: string;
@@ -22700,6 +23132,14 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
22700
23132
  };
22701
23133
  Returns: undefined;
22702
23134
  };
23135
+ produce_designed_product: {
23136
+ Args: {
23137
+ p_parent_id: string;
23138
+ p_parent_kind: string;
23139
+ p_quantity: number;
23140
+ };
23141
+ Returns: import("../integrations/supabase/types").Json;
23142
+ };
22703
23143
  promote_trade_item_key: {
22704
23144
  Args: {
22705
23145
  p_new: string;
@@ -22707,6 +23147,10 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
22707
23147
  };
22708
23148
  Returns: undefined;
22709
23149
  };
23150
+ recompute_all_reserved_stock: {
23151
+ Args: never;
23152
+ Returns: undefined;
23153
+ };
22710
23154
  recompute_order_status: {
22711
23155
  Args: {
22712
23156
  p_order_id: string;
@@ -22756,27 +23200,45 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
22756
23200
  };
22757
23201
  Returns: undefined;
22758
23202
  };
23203
+ resolve_group_allocation: {
23204
+ Args: {
23205
+ _needed: number;
23206
+ _product_group_id: string;
23207
+ };
23208
+ Returns: {
23209
+ allocated: number;
23210
+ trade_item_id: string;
23211
+ }[];
23212
+ };
23213
+ resolve_group_member_stock_key: {
23214
+ Args: {
23215
+ p_trade_item_id: string;
23216
+ };
23217
+ Returns: string;
23218
+ };
22759
23219
  resolve_product_id_for_item: {
22760
23220
  Args: {
22761
23221
  p_product_name: string;
22762
23222
  };
22763
23223
  Returns: string;
22764
23224
  };
22765
- schedule_floriday_additional_services_sync: {
23225
+ resolve_stock_trade_item_key: {
22766
23226
  Args: {
22767
- p_apikey: string;
22768
- p_url: string;
23227
+ p_product_id: string;
22769
23228
  };
22770
- Returns: number;
23229
+ Returns: string;
22771
23230
  };
22772
- schedule_floriday_agreement_calloffs_sync: {
23231
+ reverse_production: {
22773
23232
  Args: {
22774
- p_apikey: string;
22775
- p_url: string;
23233
+ p_connection_id?: string;
23234
+ p_parent_key: string;
23235
+ p_quantity: number;
23236
+ p_reason?: string;
23237
+ p_user_id?: string;
22776
23238
  };
22777
- Returns: number;
23239
+ Returns: import("../integrations/supabase/types").Json;
22778
23240
  };
22779
- schedule_floriday_agreements_sync: {
23241
+ schedule_floriday_additional_services_sync: {
22780
23242
  Args: {
22781
23243
  p_apikey: string;
22782
23244
  p_url: string;
@@ -26506,105 +26968,6 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
26506
26968
  referencedColumns: ["id"];
26507
26969
  }];
26508
26970
  };
26509
- floriday_agreement_calloffs_cache: {
26510
- Row: {
26511
- agreement_id: string | null;
26512
- connection_id: string;
26513
- data: import("../integrations/supabase/types").Json;
26514
- delivery_date: string | null;
26515
- fetched_at: string;
26516
- floriday_id: string;
26517
- id: string;
26518
- is_deleted: boolean;
26519
- sequence_number: number;
26520
- status: string | null;
26521
- updated_at: string;
26522
- };
26523
- Insert: {
26524
- agreement_id?: string | null;
26525
- connection_id: string;
26526
- data?: import("../integrations/supabase/types").Json;
26527
- delivery_date?: string | null;
26528
- fetched_at?: string;
26529
- floriday_id: string;
26530
- id?: string;
26531
- is_deleted?: boolean;
26532
- sequence_number?: number;
26533
- status?: string | null;
26534
- updated_at?: string;
26535
- };
26536
- Update: {
26537
- agreement_id?: string | null;
26538
- connection_id?: string;
26539
- data?: import("../integrations/supabase/types").Json;
26540
- delivery_date?: string | null;
26541
- fetched_at?: string;
26542
- floriday_id?: string;
26543
- id?: string;
26544
- is_deleted?: boolean;
26545
- sequence_number?: number;
26546
- status?: string | null;
26547
- updated_at?: string;
26548
- };
26549
- Relationships: [{
26550
- foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
26551
- columns: ["connection_id"];
26552
- isOneToOne: false;
26553
- referencedRelation: "floriday_connections";
26554
- referencedColumns: ["id"];
26555
- }];
26556
- };
26557
- floriday_agreements_cache: {
26558
- Row: {
26559
- buyer_organization_id: string | null;
26560
- connection_id: string;
26561
- data: import("../integrations/supabase/types").Json;
26562
- fetched_at: string;
26563
- floriday_id: string;
26564
- id: string;
26565
- is_deleted: boolean;
26566
- sequence_number: number;
26567
- status: string | null;
26568
- updated_at: string;
26569
- valid_from: string | null;
26570
- valid_until: string | null;
26571
- };
26572
- Insert: {
26573
- buyer_organization_id?: string | null;
26574
- connection_id: string;
26575
- data?: import("../integrations/supabase/types").Json;
26576
- fetched_at?: string;
26577
- floriday_id: string;
26578
- id?: string;
26579
- is_deleted?: boolean;
26580
- sequence_number?: number;
26581
- status?: string | null;
26582
- updated_at?: string;
26583
- valid_from?: string | null;
26584
- valid_until?: string | null;
26585
- };
26586
- Update: {
26587
- buyer_organization_id?: string | null;
26588
- connection_id?: string;
26589
- data?: import("../integrations/supabase/types").Json;
26590
- fetched_at?: string;
26591
- floriday_id?: string;
26592
- id?: string;
26593
- is_deleted?: boolean;
26594
- sequence_number?: number;
26595
- status?: string | null;
26596
- updated_at?: string;
26597
- valid_from?: string | null;
26598
- valid_until?: string | null;
26599
- };
26600
- Relationships: [{
26601
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
26602
- columns: ["connection_id"];
26603
- isOneToOne: false;
26604
- referencedRelation: "floriday_connections";
26605
- referencedColumns: ["id"];
26606
- }];
26607
- };
26608
26971
  floriday_auction_letters_cache: {
26609
26972
  Row: {
26610
26973
  auction_letter_code: string;
@@ -28062,40 +28425,79 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
28062
28425
  updated_at?: string;
28063
28426
  };
28064
28427
  Relationships: [{
28065
- foreignKeyName: "floriday_trade_item_classifications_cache_connection_id_fkey";
28066
- columns: ["connection_id"];
28067
- isOneToOne: false;
28068
- referencedRelation: "floriday_connections";
28069
- referencedColumns: ["id"];
28070
- }];
28071
- };
28072
- floriday_trade_items_cache: {
28073
- Row: {
28074
- connection_id: string;
28075
- data: import("../integrations/supabase/types").Json;
28076
- fetched_at: string;
28077
- floriday_id: string;
28078
- is_deleted: boolean;
28079
- sequence_number: number;
28080
- };
28081
- Insert: {
28082
- connection_id: string;
28083
- data?: import("../integrations/supabase/types").Json;
28084
- fetched_at?: string;
28085
- floriday_id: string;
28086
- is_deleted?: boolean;
28087
- sequence_number?: number;
28088
- };
28089
- Update: {
28090
- connection_id?: string;
28091
- data?: import("../integrations/supabase/types").Json;
28092
- fetched_at?: string;
28093
- floriday_id?: string;
28094
- is_deleted?: boolean;
28095
- sequence_number?: number;
28096
- };
28097
- Relationships: [{
28098
- foreignKeyName: "floriday_trade_items_cache_connection_id_fkey";
28428
+ foreignKeyName: "floriday_trade_item_classifications_cache_connection_id_fkey";
28429
+ columns: ["connection_id"];
28430
+ isOneToOne: false;
28431
+ referencedRelation: "floriday_connections";
28432
+ referencedColumns: ["id"];
28433
+ }];
28434
+ };
28435
+ floriday_trade_items_cache: {
28436
+ Row: {
28437
+ connection_id: string;
28438
+ data: import("../integrations/supabase/types").Json;
28439
+ fetched_at: string;
28440
+ floriday_id: string;
28441
+ is_deleted: boolean;
28442
+ sequence_number: number;
28443
+ };
28444
+ Insert: {
28445
+ connection_id: string;
28446
+ data?: import("../integrations/supabase/types").Json;
28447
+ fetched_at?: string;
28448
+ floriday_id: string;
28449
+ is_deleted?: boolean;
28450
+ sequence_number?: number;
28451
+ };
28452
+ Update: {
28453
+ connection_id?: string;
28454
+ data?: import("../integrations/supabase/types").Json;
28455
+ fetched_at?: string;
28456
+ floriday_id?: string;
28457
+ is_deleted?: boolean;
28458
+ sequence_number?: number;
28459
+ };
28460
+ Relationships: [{
28461
+ foreignKeyName: "floriday_trade_items_cache_connection_id_fkey";
28462
+ columns: ["connection_id"];
28463
+ isOneToOne: false;
28464
+ referencedRelation: "floriday_connections";
28465
+ referencedColumns: ["id"];
28466
+ }];
28467
+ };
28468
+ floriday_trade_settings_customers_cache: {
28469
+ Row: {
28470
+ connection_id: string;
28471
+ data: import("../integrations/supabase/types").Json;
28472
+ fetched_at: string;
28473
+ floriday_id: string;
28474
+ id: string;
28475
+ is_deleted: boolean;
28476
+ sequence_number: number;
28477
+ updated_at: string;
28478
+ };
28479
+ Insert: {
28480
+ connection_id: string;
28481
+ data: import("../integrations/supabase/types").Json;
28482
+ fetched_at?: string;
28483
+ floriday_id: string;
28484
+ id?: string;
28485
+ is_deleted?: boolean;
28486
+ sequence_number?: number;
28487
+ updated_at?: string;
28488
+ };
28489
+ Update: {
28490
+ connection_id?: string;
28491
+ data?: import("../integrations/supabase/types").Json;
28492
+ fetched_at?: string;
28493
+ floriday_id?: string;
28494
+ id?: string;
28495
+ is_deleted?: boolean;
28496
+ sequence_number?: number;
28497
+ updated_at?: string;
28498
+ };
28499
+ Relationships: [{
28500
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
28099
28501
  columns: ["connection_id"];
28100
28502
  isOneToOne: false;
28101
28503
  referencedRelation: "floriday_connections";
@@ -30274,6 +30676,105 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
30274
30676
  };
30275
30677
  Relationships: [];
30276
30678
  };
30679
+ order_shipment_items: {
30680
+ Row: {
30681
+ created_at: string;
30682
+ id: string;
30683
+ order_item_id: string;
30684
+ product_id: string | null;
30685
+ product_name: string;
30686
+ quantity: number;
30687
+ shipment_id: string;
30688
+ updated_at: string;
30689
+ };
30690
+ Insert: {
30691
+ created_at?: string;
30692
+ id?: string;
30693
+ order_item_id: string;
30694
+ product_id?: string | null;
30695
+ product_name: string;
30696
+ quantity: number;
30697
+ shipment_id: string;
30698
+ updated_at?: string;
30699
+ };
30700
+ Update: {
30701
+ created_at?: string;
30702
+ id?: string;
30703
+ order_item_id?: string;
30704
+ product_id?: string | null;
30705
+ product_name?: string;
30706
+ quantity?: number;
30707
+ shipment_id?: string;
30708
+ updated_at?: string;
30709
+ };
30710
+ Relationships: [{
30711
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
30712
+ columns: ["order_item_id"];
30713
+ isOneToOne: false;
30714
+ referencedRelation: "order_items";
30715
+ referencedColumns: ["id"];
30716
+ }, {
30717
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
30718
+ columns: ["shipment_id"];
30719
+ isOneToOne: false;
30720
+ referencedRelation: "order_shipments";
30721
+ referencedColumns: ["id"];
30722
+ }];
30723
+ };
30724
+ order_shipments: {
30725
+ Row: {
30726
+ carrier_id: string | null;
30727
+ created_at: string;
30728
+ delivery_date: string | null;
30729
+ delivery_location_id: string | null;
30730
+ id: string;
30731
+ notes: string | null;
30732
+ order_id: string;
30733
+ shipment_number: number;
30734
+ shipped_at: string | null;
30735
+ status: string;
30736
+ updated_at: string;
30737
+ };
30738
+ Insert: {
30739
+ carrier_id?: string | null;
30740
+ created_at?: string;
30741
+ delivery_date?: string | null;
30742
+ delivery_location_id?: string | null;
30743
+ id?: string;
30744
+ notes?: string | null;
30745
+ order_id: string;
30746
+ shipment_number: number;
30747
+ shipped_at?: string | null;
30748
+ status?: string;
30749
+ updated_at?: string;
30750
+ };
30751
+ Update: {
30752
+ carrier_id?: string | null;
30753
+ created_at?: string;
30754
+ delivery_date?: string | null;
30755
+ delivery_location_id?: string | null;
30756
+ id?: string;
30757
+ notes?: string | null;
30758
+ order_id?: string;
30759
+ shipment_number?: number;
30760
+ shipped_at?: string | null;
30761
+ status?: string;
30762
+ updated_at?: string;
30763
+ };
30764
+ Relationships: [{
30765
+ foreignKeyName: "order_shipments_carrier_id_fkey";
30766
+ columns: ["carrier_id"];
30767
+ isOneToOne: false;
30768
+ referencedRelation: "carriers";
30769
+ referencedColumns: ["id"];
30770
+ }, {
30771
+ foreignKeyName: "order_shipments_order_id_fkey";
30772
+ columns: ["order_id"];
30773
+ isOneToOne: false;
30774
+ referencedRelation: "orders";
30775
+ referencedColumns: ["id"];
30776
+ }];
30777
+ };
30277
30778
  orders: {
30278
30779
  Row: {
30279
30780
  created_at: string;
@@ -30281,8 +30782,9 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
30281
30782
  customer_id: string | null;
30282
30783
  customer_name: string;
30283
30784
  deleted_at: string | null;
30284
- delivery_date: string;
30785
+ delivery_date: string | null;
30285
30786
  id: string;
30787
+ is_reservation: boolean;
30286
30788
  notes: string | null;
30287
30789
  order_date: string;
30288
30790
  order_number: string;
@@ -30299,8 +30801,9 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
30299
30801
  customer_id?: string | null;
30300
30802
  customer_name?: string;
30301
30803
  deleted_at?: string | null;
30302
- delivery_date: string;
30804
+ delivery_date?: string | null;
30303
30805
  id?: string;
30806
+ is_reservation?: boolean;
30304
30807
  notes?: string | null;
30305
30808
  order_date?: string;
30306
30809
  order_number: string;
@@ -30317,8 +30820,9 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
30317
30820
  customer_id?: string | null;
30318
30821
  customer_name?: string;
30319
30822
  deleted_at?: string | null;
30320
- delivery_date?: string;
30823
+ delivery_date?: string | null;
30321
30824
  id?: string;
30825
+ is_reservation?: boolean;
30322
30826
  notes?: string | null;
30323
30827
  order_date?: string;
30324
30828
  order_number?: string;
@@ -30460,6 +30964,63 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
30460
30964
  };
30461
30965
  Relationships: [];
30462
30966
  };
30967
+ product_bom_items: {
30968
+ Row: {
30969
+ component_product_id: string | null;
30970
+ component_trade_item_floriday_id: string | null;
30971
+ created_at: string;
30972
+ id: string;
30973
+ notes: string | null;
30974
+ parent_product_id: string | null;
30975
+ parent_trade_item_floriday_id: string | null;
30976
+ quantity: number;
30977
+ sort_order: number;
30978
+ tenant_id: string;
30979
+ unit: string;
30980
+ updated_at: string;
30981
+ };
30982
+ Insert: {
30983
+ component_product_id?: string | null;
30984
+ component_trade_item_floriday_id?: string | null;
30985
+ created_at?: string;
30986
+ id?: string;
30987
+ notes?: string | null;
30988
+ parent_product_id?: string | null;
30989
+ parent_trade_item_floriday_id?: string | null;
30990
+ quantity?: number;
30991
+ sort_order?: number;
30992
+ tenant_id: string;
30993
+ unit?: string;
30994
+ updated_at?: string;
30995
+ };
30996
+ Update: {
30997
+ component_product_id?: string | null;
30998
+ component_trade_item_floriday_id?: string | null;
30999
+ created_at?: string;
31000
+ id?: string;
31001
+ notes?: string | null;
31002
+ parent_product_id?: string | null;
31003
+ parent_trade_item_floriday_id?: string | null;
31004
+ quantity?: number;
31005
+ sort_order?: number;
31006
+ tenant_id?: string;
31007
+ unit?: string;
31008
+ updated_at?: string;
31009
+ };
31010
+ Relationships: [{
31011
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
31012
+ columns: ["component_product_id"];
31013
+ isOneToOne: false;
31014
+ referencedRelation: "products";
31015
+ referencedColumns: ["id"];
31016
+ }, {
31017
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
31018
+ columns: ["parent_product_id"];
31019
+ isOneToOne: false;
31020
+ referencedRelation: "products";
31021
+ referencedColumns: ["id"];
31022
+ }];
31023
+ };
30463
31024
  product_categories: {
30464
31025
  Row: {
30465
31026
  color: string;
@@ -30565,6 +31126,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
30565
31126
  id: string;
30566
31127
  product_group_id: string;
30567
31128
  quantity: number;
31129
+ sort_order: number;
30568
31130
  trade_item_id: string;
30569
31131
  };
30570
31132
  Insert: {
@@ -30572,6 +31134,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
30572
31134
  id?: string;
30573
31135
  product_group_id: string;
30574
31136
  quantity?: number;
31137
+ sort_order?: number;
30575
31138
  trade_item_id: string;
30576
31139
  };
30577
31140
  Update: {
@@ -30579,6 +31142,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
30579
31142
  id?: string;
30580
31143
  product_group_id?: string;
30581
31144
  quantity?: number;
31145
+ sort_order?: number;
30582
31146
  trade_item_id?: string;
30583
31147
  };
30584
31148
  Relationships: [{
@@ -30593,6 +31157,8 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
30593
31157
  Row: {
30594
31158
  created_at: string;
30595
31159
  description: string | null;
31160
+ head_product_id: string | null;
31161
+ head_trade_item_floriday_id: string | null;
30596
31162
  id: string;
30597
31163
  is_active: boolean;
30598
31164
  name: string;
@@ -30602,6 +31168,8 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
30602
31168
  Insert: {
30603
31169
  created_at?: string;
30604
31170
  description?: string | null;
31171
+ head_product_id?: string | null;
31172
+ head_trade_item_floriday_id?: string | null;
30605
31173
  id?: string;
30606
31174
  is_active?: boolean;
30607
31175
  name: string;
@@ -30611,16 +31179,85 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
30611
31179
  Update: {
30612
31180
  created_at?: string;
30613
31181
  description?: string | null;
31182
+ head_product_id?: string | null;
31183
+ head_trade_item_floriday_id?: string | null;
30614
31184
  id?: string;
30615
31185
  is_active?: boolean;
30616
31186
  name?: string;
30617
31187
  tenant_id?: string;
30618
31188
  updated_at?: string;
30619
31189
  };
30620
- Relationships: [];
31190
+ Relationships: [{
31191
+ foreignKeyName: "product_groups_head_product_id_fkey";
31192
+ columns: ["head_product_id"];
31193
+ isOneToOne: false;
31194
+ referencedRelation: "products";
31195
+ referencedColumns: ["id"];
31196
+ }];
31197
+ };
31198
+ product_load_settings: {
31199
+ Row: {
31200
+ created_at: string;
31201
+ id: string;
31202
+ is_package: boolean;
31203
+ layers_per_load_carrier: number | null;
31204
+ load_carrier: string | null;
31205
+ package_id: string | null;
31206
+ package_label: string | null;
31207
+ packages_per_layer: number | null;
31208
+ product_id: string | null;
31209
+ tenant_id: string;
31210
+ trade_item_floriday_id: string | null;
31211
+ units_per_package: number | null;
31212
+ updated_at: string;
31213
+ };
31214
+ Insert: {
31215
+ created_at?: string;
31216
+ id?: string;
31217
+ is_package?: boolean;
31218
+ layers_per_load_carrier?: number | null;
31219
+ load_carrier?: string | null;
31220
+ package_id?: string | null;
31221
+ package_label?: string | null;
31222
+ packages_per_layer?: number | null;
31223
+ product_id?: string | null;
31224
+ tenant_id: string;
31225
+ trade_item_floriday_id?: string | null;
31226
+ units_per_package?: number | null;
31227
+ updated_at?: string;
31228
+ };
31229
+ Update: {
31230
+ created_at?: string;
31231
+ id?: string;
31232
+ is_package?: boolean;
31233
+ layers_per_load_carrier?: number | null;
31234
+ load_carrier?: string | null;
31235
+ package_id?: string | null;
31236
+ package_label?: string | null;
31237
+ packages_per_layer?: number | null;
31238
+ product_id?: string | null;
31239
+ tenant_id?: string;
31240
+ trade_item_floriday_id?: string | null;
31241
+ units_per_package?: number | null;
31242
+ updated_at?: string;
31243
+ };
31244
+ Relationships: [{
31245
+ foreignKeyName: "product_load_settings_package_id_fkey";
31246
+ columns: ["package_id"];
31247
+ isOneToOne: false;
31248
+ referencedRelation: "packages";
31249
+ referencedColumns: ["id"];
31250
+ }, {
31251
+ foreignKeyName: "product_load_settings_product_id_fkey";
31252
+ columns: ["product_id"];
31253
+ isOneToOne: false;
31254
+ referencedRelation: "products";
31255
+ referencedColumns: ["id"];
31256
+ }];
30621
31257
  };
30622
31258
  products: {
30623
31259
  Row: {
31260
+ article_number: string | null;
30624
31261
  barcode: string | null;
30625
31262
  batch: string;
30626
31263
  crates_per_layer: number;
@@ -30644,6 +31281,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
30644
31281
  weight: string | null;
30645
31282
  };
30646
31283
  Insert: {
31284
+ article_number?: string | null;
30647
31285
  barcode?: string | null;
30648
31286
  batch: string;
30649
31287
  crates_per_layer?: number;
@@ -30667,6 +31305,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
30667
31305
  weight?: string | null;
30668
31306
  };
30669
31307
  Update: {
31308
+ article_number?: string | null;
30670
31309
  barcode?: string | null;
30671
31310
  batch?: string;
30672
31311
  crates_per_layer?: number;
@@ -31580,8 +32219,10 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
31580
32219
  order_id: string | null;
31581
32220
  order_item_id: string | null;
31582
32221
  order_source: string | null;
32222
+ parent_trade_item_key: string | null;
31583
32223
  physical_after: number | null;
31584
32224
  physical_before: number | null;
32225
+ production_batch_id: string | null;
31585
32226
  qty_delta: number;
31586
32227
  reason: string | null;
31587
32228
  reserved_after: number | null;
@@ -31597,8 +32238,10 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
31597
32238
  order_id?: string | null;
31598
32239
  order_item_id?: string | null;
31599
32240
  order_source?: string | null;
32241
+ parent_trade_item_key?: string | null;
31600
32242
  physical_after?: number | null;
31601
32243
  physical_before?: number | null;
32244
+ production_batch_id?: string | null;
31602
32245
  qty_delta: number;
31603
32246
  reason?: string | null;
31604
32247
  reserved_after?: number | null;
@@ -31614,8 +32257,10 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
31614
32257
  order_id?: string | null;
31615
32258
  order_item_id?: string | null;
31616
32259
  order_source?: string | null;
32260
+ parent_trade_item_key?: string | null;
31617
32261
  physical_after?: number | null;
31618
32262
  physical_before?: number | null;
32263
+ production_batch_id?: string | null;
31619
32264
  qty_delta?: number;
31620
32265
  reason?: string | null;
31621
32266
  reserved_after?: number | null;
@@ -32074,7 +32719,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
32074
32719
  twinfield_connections: {
32075
32720
  Row: {
32076
32721
  access_token: string | null;
32077
- client_id: string;
32722
+ client_id: string | null;
32078
32723
  client_secret: string | null;
32079
32724
  cluster_uri: string | null;
32080
32725
  company_code: string | null;
@@ -32086,7 +32731,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
32086
32731
  is_active: boolean;
32087
32732
  label: string | null;
32088
32733
  office_code: string | null;
32089
- redirect_uri: string;
32734
+ redirect_uri: string | null;
32090
32735
  refresh_token: string | null;
32091
32736
  token_expires_at: string | null;
32092
32737
  updated_at: string;
@@ -32094,7 +32739,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
32094
32739
  };
32095
32740
  Insert: {
32096
32741
  access_token?: string | null;
32097
- client_id: string;
32742
+ client_id?: string | null;
32098
32743
  client_secret?: string | null;
32099
32744
  cluster_uri?: string | null;
32100
32745
  company_code?: string | null;
@@ -32106,7 +32751,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
32106
32751
  is_active?: boolean;
32107
32752
  label?: string | null;
32108
32753
  office_code?: string | null;
32109
- redirect_uri: string;
32754
+ redirect_uri?: string | null;
32110
32755
  refresh_token?: string | null;
32111
32756
  token_expires_at?: string | null;
32112
32757
  updated_at?: string;
@@ -32114,7 +32759,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
32114
32759
  };
32115
32760
  Update: {
32116
32761
  access_token?: string | null;
32117
- client_id?: string;
32762
+ client_id?: string | null;
32118
32763
  client_secret?: string | null;
32119
32764
  cluster_uri?: string | null;
32120
32765
  company_code?: string | null;
@@ -32126,7 +32771,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
32126
32771
  is_active?: boolean;
32127
32772
  label?: string | null;
32128
32773
  office_code?: string | null;
32129
- redirect_uri?: string;
32774
+ redirect_uri?: string | null;
32130
32775
  refresh_token?: string | null;
32131
32776
  token_expires_at?: string | null;
32132
32777
  updated_at?: string;
@@ -33321,25 +33966,6 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
33321
33966
  };
33322
33967
  Relationships: [];
33323
33968
  };
33324
- floriday_customer_discounts: {
33325
- Row: {
33326
- base_price: number | null;
33327
- buyer_organization_id: string | null;
33328
- currency: string | null;
33329
- discount_type: string | null;
33330
- discount_value: number | null;
33331
- min_quantity: number | null;
33332
- net_price: number | null;
33333
- product_group_id: string | null;
33334
- raw: import("../integrations/supabase/types").Json | null;
33335
- source: string | null;
33336
- source_id: string | null;
33337
- trade_item_id: string | null;
33338
- valid_from: string | null;
33339
- valid_until: string | null;
33340
- };
33341
- Relationships: [];
33342
- };
33343
33969
  local_customer_discounts: {
33344
33970
  Row: {
33345
33971
  base_price: number | null;
@@ -33758,6 +34384,28 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
33758
34384
  Args: never;
33759
34385
  Returns: undefined;
33760
34386
  };
34387
+ consume_bom_for_production: {
34388
+ Args: {
34389
+ p_connection_id: string;
34390
+ p_parent_id: string;
34391
+ p_parent_key: string;
34392
+ p_parent_kind: string;
34393
+ p_quantity: number;
34394
+ p_user_id: string;
34395
+ };
34396
+ Returns: import("../integrations/supabase/types").Json;
34397
+ } | {
34398
+ Args: {
34399
+ p_batch_id?: string;
34400
+ p_connection_id: string;
34401
+ p_parent_id: string;
34402
+ p_parent_key: string;
34403
+ p_parent_kind: string;
34404
+ p_quantity: number;
34405
+ p_user_id: string;
34406
+ };
34407
+ Returns: import("../integrations/supabase/types").Json;
34408
+ };
33761
34409
  consume_floriday_rate_limit: {
33762
34410
  Args: {
33763
34411
  p_bucket: string;
@@ -33809,6 +34457,13 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
33809
34457
  table_name: string;
33810
34458
  }[];
33811
34459
  };
34460
+ delete_samenstelling: {
34461
+ Args: {
34462
+ p_parent_id: string;
34463
+ p_parent_kind: string;
34464
+ };
34465
+ Returns: import("../integrations/supabase/types").Json;
34466
+ };
33812
34467
  dispatch_carrier_signups_sql: {
33813
34468
  Args: {
33814
34469
  _catchup?: string;
@@ -33969,19 +34624,6 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
33969
34624
  resource: string;
33970
34625
  }[];
33971
34626
  };
33972
- get_floriday_agreements_active: {
33973
- Args: {
33974
- p_on_date?: string;
33975
- };
33976
- Returns: {
33977
- buyer_organization_id: string;
33978
- data: import("../integrations/supabase/types").Json;
33979
- floriday_id: string;
33980
- status: string;
33981
- valid_from: string;
33982
- valid_until: string;
33983
- }[];
33984
- };
33985
34627
  get_floriday_clock_supplies_window: {
33986
34628
  Args: {
33987
34629
  p_from: string;
@@ -34054,6 +34696,21 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
34054
34696
  minutes_since_success: number;
34055
34697
  }[];
34056
34698
  };
34699
+ get_group_allocation_keys: {
34700
+ Args: {
34701
+ p_product_id: string;
34702
+ };
34703
+ Returns: {
34704
+ k: string;
34705
+ ord: number;
34706
+ }[];
34707
+ };
34708
+ get_group_head_key: {
34709
+ Args: {
34710
+ p_group_id: string;
34711
+ };
34712
+ Returns: string;
34713
+ };
34057
34714
  get_offer_by_link_code: {
34058
34715
  Args: {
34059
34716
  p_code: string;
@@ -34164,6 +34821,12 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
34164
34821
  };
34165
34822
  Returns: undefined;
34166
34823
  };
34824
+ mark_shipment_shipped: {
34825
+ Args: {
34826
+ p_shipment_id: string;
34827
+ };
34828
+ Returns: undefined;
34829
+ };
34167
34830
  next_manufacture_partij: {
34168
34831
  Args: {
34169
34832
  _tenant_id: string;
@@ -34248,6 +34911,14 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
34248
34911
  };
34249
34912
  Returns: undefined;
34250
34913
  };
34914
+ produce_designed_product: {
34915
+ Args: {
34916
+ p_parent_id: string;
34917
+ p_parent_kind: string;
34918
+ p_quantity: number;
34919
+ };
34920
+ Returns: import("../integrations/supabase/types").Json;
34921
+ };
34251
34922
  promote_trade_item_key: {
34252
34923
  Args: {
34253
34924
  p_new: string;
@@ -34255,6 +34926,10 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
34255
34926
  };
34256
34927
  Returns: undefined;
34257
34928
  };
34929
+ recompute_all_reserved_stock: {
34930
+ Args: never;
34931
+ Returns: undefined;
34932
+ };
34258
34933
  recompute_order_status: {
34259
34934
  Args: {
34260
34935
  p_order_id: string;
@@ -34304,27 +34979,45 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
34304
34979
  };
34305
34980
  Returns: undefined;
34306
34981
  };
34982
+ resolve_group_allocation: {
34983
+ Args: {
34984
+ _needed: number;
34985
+ _product_group_id: string;
34986
+ };
34987
+ Returns: {
34988
+ allocated: number;
34989
+ trade_item_id: string;
34990
+ }[];
34991
+ };
34992
+ resolve_group_member_stock_key: {
34993
+ Args: {
34994
+ p_trade_item_id: string;
34995
+ };
34996
+ Returns: string;
34997
+ };
34307
34998
  resolve_product_id_for_item: {
34308
34999
  Args: {
34309
35000
  p_product_name: string;
34310
35001
  };
34311
35002
  Returns: string;
34312
35003
  };
34313
- schedule_floriday_additional_services_sync: {
35004
+ resolve_stock_trade_item_key: {
34314
35005
  Args: {
34315
- p_apikey: string;
34316
- p_url: string;
35006
+ p_product_id: string;
34317
35007
  };
34318
- Returns: number;
35008
+ Returns: string;
34319
35009
  };
34320
- schedule_floriday_agreement_calloffs_sync: {
35010
+ reverse_production: {
34321
35011
  Args: {
34322
- p_apikey: string;
34323
- p_url: string;
35012
+ p_connection_id?: string;
35013
+ p_parent_key: string;
35014
+ p_quantity: number;
35015
+ p_reason?: string;
35016
+ p_user_id?: string;
34324
35017
  };
34325
- Returns: number;
35018
+ Returns: import("../integrations/supabase/types").Json;
34326
35019
  };
34327
- schedule_floriday_agreements_sync: {
35020
+ schedule_floriday_additional_services_sync: {
34328
35021
  Args: {
34329
35022
  p_apikey: string;
34330
35023
  p_url: string;
@@ -38057,105 +38750,6 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
38057
38750
  referencedColumns: ["id"];
38058
38751
  }];
38059
38752
  };
38060
- floriday_agreement_calloffs_cache: {
38061
- Row: {
38062
- agreement_id: string | null;
38063
- connection_id: string;
38064
- data: import("../integrations/supabase/types").Json;
38065
- delivery_date: string | null;
38066
- fetched_at: string;
38067
- floriday_id: string;
38068
- id: string;
38069
- is_deleted: boolean;
38070
- sequence_number: number;
38071
- status: string | null;
38072
- updated_at: string;
38073
- };
38074
- Insert: {
38075
- agreement_id?: string | null;
38076
- connection_id: string;
38077
- data?: import("../integrations/supabase/types").Json;
38078
- delivery_date?: string | null;
38079
- fetched_at?: string;
38080
- floriday_id: string;
38081
- id?: string;
38082
- is_deleted?: boolean;
38083
- sequence_number?: number;
38084
- status?: string | null;
38085
- updated_at?: string;
38086
- };
38087
- Update: {
38088
- agreement_id?: string | null;
38089
- connection_id?: string;
38090
- data?: import("../integrations/supabase/types").Json;
38091
- delivery_date?: string | null;
38092
- fetched_at?: string;
38093
- floriday_id?: string;
38094
- id?: string;
38095
- is_deleted?: boolean;
38096
- sequence_number?: number;
38097
- status?: string | null;
38098
- updated_at?: string;
38099
- };
38100
- Relationships: [{
38101
- foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
38102
- columns: ["connection_id"];
38103
- isOneToOne: false;
38104
- referencedRelation: "floriday_connections";
38105
- referencedColumns: ["id"];
38106
- }];
38107
- };
38108
- floriday_agreements_cache: {
38109
- Row: {
38110
- buyer_organization_id: string | null;
38111
- connection_id: string;
38112
- data: import("../integrations/supabase/types").Json;
38113
- fetched_at: string;
38114
- floriday_id: string;
38115
- id: string;
38116
- is_deleted: boolean;
38117
- sequence_number: number;
38118
- status: string | null;
38119
- updated_at: string;
38120
- valid_from: string | null;
38121
- valid_until: string | null;
38122
- };
38123
- Insert: {
38124
- buyer_organization_id?: string | null;
38125
- connection_id: string;
38126
- data?: import("../integrations/supabase/types").Json;
38127
- fetched_at?: string;
38128
- floriday_id: string;
38129
- id?: string;
38130
- is_deleted?: boolean;
38131
- sequence_number?: number;
38132
- status?: string | null;
38133
- updated_at?: string;
38134
- valid_from?: string | null;
38135
- valid_until?: string | null;
38136
- };
38137
- Update: {
38138
- buyer_organization_id?: string | null;
38139
- connection_id?: string;
38140
- data?: import("../integrations/supabase/types").Json;
38141
- fetched_at?: string;
38142
- floriday_id?: string;
38143
- id?: string;
38144
- is_deleted?: boolean;
38145
- sequence_number?: number;
38146
- status?: string | null;
38147
- updated_at?: string;
38148
- valid_from?: string | null;
38149
- valid_until?: string | null;
38150
- };
38151
- Relationships: [{
38152
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
38153
- columns: ["connection_id"];
38154
- isOneToOne: false;
38155
- referencedRelation: "floriday_connections";
38156
- referencedColumns: ["id"];
38157
- }];
38158
- };
38159
38753
  floriday_auction_letters_cache: {
38160
38754
  Row: {
38161
38755
  auction_letter_code: string;
@@ -39653,6 +40247,45 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
39653
40247
  referencedColumns: ["id"];
39654
40248
  }];
39655
40249
  };
40250
+ floriday_trade_settings_customers_cache: {
40251
+ Row: {
40252
+ connection_id: string;
40253
+ data: import("../integrations/supabase/types").Json;
40254
+ fetched_at: string;
40255
+ floriday_id: string;
40256
+ id: string;
40257
+ is_deleted: boolean;
40258
+ sequence_number: number;
40259
+ updated_at: string;
40260
+ };
40261
+ Insert: {
40262
+ connection_id: string;
40263
+ data: import("../integrations/supabase/types").Json;
40264
+ fetched_at?: string;
40265
+ floriday_id: string;
40266
+ id?: string;
40267
+ is_deleted?: boolean;
40268
+ sequence_number?: number;
40269
+ updated_at?: string;
40270
+ };
40271
+ Update: {
40272
+ connection_id?: string;
40273
+ data?: import("../integrations/supabase/types").Json;
40274
+ fetched_at?: string;
40275
+ floriday_id?: string;
40276
+ id?: string;
40277
+ is_deleted?: boolean;
40278
+ sequence_number?: number;
40279
+ updated_at?: string;
40280
+ };
40281
+ Relationships: [{
40282
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
40283
+ columns: ["connection_id"];
40284
+ isOneToOne: false;
40285
+ referencedRelation: "floriday_connections";
40286
+ referencedColumns: ["id"];
40287
+ }];
40288
+ };
39656
40289
  floriday_trips_cache: {
39657
40290
  Row: {
39658
40291
  carrier_organization_id: string | null;
@@ -41825,6 +42458,105 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
41825
42458
  };
41826
42459
  Relationships: [];
41827
42460
  };
42461
+ order_shipment_items: {
42462
+ Row: {
42463
+ created_at: string;
42464
+ id: string;
42465
+ order_item_id: string;
42466
+ product_id: string | null;
42467
+ product_name: string;
42468
+ quantity: number;
42469
+ shipment_id: string;
42470
+ updated_at: string;
42471
+ };
42472
+ Insert: {
42473
+ created_at?: string;
42474
+ id?: string;
42475
+ order_item_id: string;
42476
+ product_id?: string | null;
42477
+ product_name: string;
42478
+ quantity: number;
42479
+ shipment_id: string;
42480
+ updated_at?: string;
42481
+ };
42482
+ Update: {
42483
+ created_at?: string;
42484
+ id?: string;
42485
+ order_item_id?: string;
42486
+ product_id?: string | null;
42487
+ product_name?: string;
42488
+ quantity?: number;
42489
+ shipment_id?: string;
42490
+ updated_at?: string;
42491
+ };
42492
+ Relationships: [{
42493
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
42494
+ columns: ["order_item_id"];
42495
+ isOneToOne: false;
42496
+ referencedRelation: "order_items";
42497
+ referencedColumns: ["id"];
42498
+ }, {
42499
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
42500
+ columns: ["shipment_id"];
42501
+ isOneToOne: false;
42502
+ referencedRelation: "order_shipments";
42503
+ referencedColumns: ["id"];
42504
+ }];
42505
+ };
42506
+ order_shipments: {
42507
+ Row: {
42508
+ carrier_id: string | null;
42509
+ created_at: string;
42510
+ delivery_date: string | null;
42511
+ delivery_location_id: string | null;
42512
+ id: string;
42513
+ notes: string | null;
42514
+ order_id: string;
42515
+ shipment_number: number;
42516
+ shipped_at: string | null;
42517
+ status: string;
42518
+ updated_at: string;
42519
+ };
42520
+ Insert: {
42521
+ carrier_id?: string | null;
42522
+ created_at?: string;
42523
+ delivery_date?: string | null;
42524
+ delivery_location_id?: string | null;
42525
+ id?: string;
42526
+ notes?: string | null;
42527
+ order_id: string;
42528
+ shipment_number: number;
42529
+ shipped_at?: string | null;
42530
+ status?: string;
42531
+ updated_at?: string;
42532
+ };
42533
+ Update: {
42534
+ carrier_id?: string | null;
42535
+ created_at?: string;
42536
+ delivery_date?: string | null;
42537
+ delivery_location_id?: string | null;
42538
+ id?: string;
42539
+ notes?: string | null;
42540
+ order_id?: string;
42541
+ shipment_number?: number;
42542
+ shipped_at?: string | null;
42543
+ status?: string;
42544
+ updated_at?: string;
42545
+ };
42546
+ Relationships: [{
42547
+ foreignKeyName: "order_shipments_carrier_id_fkey";
42548
+ columns: ["carrier_id"];
42549
+ isOneToOne: false;
42550
+ referencedRelation: "carriers";
42551
+ referencedColumns: ["id"];
42552
+ }, {
42553
+ foreignKeyName: "order_shipments_order_id_fkey";
42554
+ columns: ["order_id"];
42555
+ isOneToOne: false;
42556
+ referencedRelation: "orders";
42557
+ referencedColumns: ["id"];
42558
+ }];
42559
+ };
41828
42560
  orders: {
41829
42561
  Row: {
41830
42562
  created_at: string;
@@ -41832,8 +42564,9 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
41832
42564
  customer_id: string | null;
41833
42565
  customer_name: string;
41834
42566
  deleted_at: string | null;
41835
- delivery_date: string;
42567
+ delivery_date: string | null;
41836
42568
  id: string;
42569
+ is_reservation: boolean;
41837
42570
  notes: string | null;
41838
42571
  order_date: string;
41839
42572
  order_number: string;
@@ -41850,8 +42583,9 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
41850
42583
  customer_id?: string | null;
41851
42584
  customer_name?: string;
41852
42585
  deleted_at?: string | null;
41853
- delivery_date: string;
42586
+ delivery_date?: string | null;
41854
42587
  id?: string;
42588
+ is_reservation?: boolean;
41855
42589
  notes?: string | null;
41856
42590
  order_date?: string;
41857
42591
  order_number: string;
@@ -41868,8 +42602,9 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
41868
42602
  customer_id?: string | null;
41869
42603
  customer_name?: string;
41870
42604
  deleted_at?: string | null;
41871
- delivery_date?: string;
42605
+ delivery_date?: string | null;
41872
42606
  id?: string;
42607
+ is_reservation?: boolean;
41873
42608
  notes?: string | null;
41874
42609
  order_date?: string;
41875
42610
  order_number?: string;
@@ -42011,6 +42746,63 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
42011
42746
  };
42012
42747
  Relationships: [];
42013
42748
  };
42749
+ product_bom_items: {
42750
+ Row: {
42751
+ component_product_id: string | null;
42752
+ component_trade_item_floriday_id: string | null;
42753
+ created_at: string;
42754
+ id: string;
42755
+ notes: string | null;
42756
+ parent_product_id: string | null;
42757
+ parent_trade_item_floriday_id: string | null;
42758
+ quantity: number;
42759
+ sort_order: number;
42760
+ tenant_id: string;
42761
+ unit: string;
42762
+ updated_at: string;
42763
+ };
42764
+ Insert: {
42765
+ component_product_id?: string | null;
42766
+ component_trade_item_floriday_id?: string | null;
42767
+ created_at?: string;
42768
+ id?: string;
42769
+ notes?: string | null;
42770
+ parent_product_id?: string | null;
42771
+ parent_trade_item_floriday_id?: string | null;
42772
+ quantity?: number;
42773
+ sort_order?: number;
42774
+ tenant_id: string;
42775
+ unit?: string;
42776
+ updated_at?: string;
42777
+ };
42778
+ Update: {
42779
+ component_product_id?: string | null;
42780
+ component_trade_item_floriday_id?: string | null;
42781
+ created_at?: string;
42782
+ id?: string;
42783
+ notes?: string | null;
42784
+ parent_product_id?: string | null;
42785
+ parent_trade_item_floriday_id?: string | null;
42786
+ quantity?: number;
42787
+ sort_order?: number;
42788
+ tenant_id?: string;
42789
+ unit?: string;
42790
+ updated_at?: string;
42791
+ };
42792
+ Relationships: [{
42793
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
42794
+ columns: ["component_product_id"];
42795
+ isOneToOne: false;
42796
+ referencedRelation: "products";
42797
+ referencedColumns: ["id"];
42798
+ }, {
42799
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
42800
+ columns: ["parent_product_id"];
42801
+ isOneToOne: false;
42802
+ referencedRelation: "products";
42803
+ referencedColumns: ["id"];
42804
+ }];
42805
+ };
42014
42806
  product_categories: {
42015
42807
  Row: {
42016
42808
  color: string;
@@ -42116,6 +42908,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
42116
42908
  id: string;
42117
42909
  product_group_id: string;
42118
42910
  quantity: number;
42911
+ sort_order: number;
42119
42912
  trade_item_id: string;
42120
42913
  };
42121
42914
  Insert: {
@@ -42123,6 +42916,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
42123
42916
  id?: string;
42124
42917
  product_group_id: string;
42125
42918
  quantity?: number;
42919
+ sort_order?: number;
42126
42920
  trade_item_id: string;
42127
42921
  };
42128
42922
  Update: {
@@ -42130,6 +42924,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
42130
42924
  id?: string;
42131
42925
  product_group_id?: string;
42132
42926
  quantity?: number;
42927
+ sort_order?: number;
42133
42928
  trade_item_id?: string;
42134
42929
  };
42135
42930
  Relationships: [{
@@ -42144,6 +42939,8 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
42144
42939
  Row: {
42145
42940
  created_at: string;
42146
42941
  description: string | null;
42942
+ head_product_id: string | null;
42943
+ head_trade_item_floriday_id: string | null;
42147
42944
  id: string;
42148
42945
  is_active: boolean;
42149
42946
  name: string;
@@ -42153,6 +42950,8 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
42153
42950
  Insert: {
42154
42951
  created_at?: string;
42155
42952
  description?: string | null;
42953
+ head_product_id?: string | null;
42954
+ head_trade_item_floriday_id?: string | null;
42156
42955
  id?: string;
42157
42956
  is_active?: boolean;
42158
42957
  name: string;
@@ -42162,16 +42961,85 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
42162
42961
  Update: {
42163
42962
  created_at?: string;
42164
42963
  description?: string | null;
42964
+ head_product_id?: string | null;
42965
+ head_trade_item_floriday_id?: string | null;
42165
42966
  id?: string;
42166
42967
  is_active?: boolean;
42167
42968
  name?: string;
42168
42969
  tenant_id?: string;
42169
42970
  updated_at?: string;
42170
42971
  };
42171
- Relationships: [];
42972
+ Relationships: [{
42973
+ foreignKeyName: "product_groups_head_product_id_fkey";
42974
+ columns: ["head_product_id"];
42975
+ isOneToOne: false;
42976
+ referencedRelation: "products";
42977
+ referencedColumns: ["id"];
42978
+ }];
42979
+ };
42980
+ product_load_settings: {
42981
+ Row: {
42982
+ created_at: string;
42983
+ id: string;
42984
+ is_package: boolean;
42985
+ layers_per_load_carrier: number | null;
42986
+ load_carrier: string | null;
42987
+ package_id: string | null;
42988
+ package_label: string | null;
42989
+ packages_per_layer: number | null;
42990
+ product_id: string | null;
42991
+ tenant_id: string;
42992
+ trade_item_floriday_id: string | null;
42993
+ units_per_package: number | null;
42994
+ updated_at: string;
42995
+ };
42996
+ Insert: {
42997
+ created_at?: string;
42998
+ id?: string;
42999
+ is_package?: boolean;
43000
+ layers_per_load_carrier?: number | null;
43001
+ load_carrier?: string | null;
43002
+ package_id?: string | null;
43003
+ package_label?: string | null;
43004
+ packages_per_layer?: number | null;
43005
+ product_id?: string | null;
43006
+ tenant_id: string;
43007
+ trade_item_floriday_id?: string | null;
43008
+ units_per_package?: number | null;
43009
+ updated_at?: string;
43010
+ };
43011
+ Update: {
43012
+ created_at?: string;
43013
+ id?: string;
43014
+ is_package?: boolean;
43015
+ layers_per_load_carrier?: number | null;
43016
+ load_carrier?: string | null;
43017
+ package_id?: string | null;
43018
+ package_label?: string | null;
43019
+ packages_per_layer?: number | null;
43020
+ product_id?: string | null;
43021
+ tenant_id?: string;
43022
+ trade_item_floriday_id?: string | null;
43023
+ units_per_package?: number | null;
43024
+ updated_at?: string;
43025
+ };
43026
+ Relationships: [{
43027
+ foreignKeyName: "product_load_settings_package_id_fkey";
43028
+ columns: ["package_id"];
43029
+ isOneToOne: false;
43030
+ referencedRelation: "packages";
43031
+ referencedColumns: ["id"];
43032
+ }, {
43033
+ foreignKeyName: "product_load_settings_product_id_fkey";
43034
+ columns: ["product_id"];
43035
+ isOneToOne: false;
43036
+ referencedRelation: "products";
43037
+ referencedColumns: ["id"];
43038
+ }];
42172
43039
  };
42173
43040
  products: {
42174
43041
  Row: {
43042
+ article_number: string | null;
42175
43043
  barcode: string | null;
42176
43044
  batch: string;
42177
43045
  crates_per_layer: number;
@@ -42195,6 +43063,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
42195
43063
  weight: string | null;
42196
43064
  };
42197
43065
  Insert: {
43066
+ article_number?: string | null;
42198
43067
  barcode?: string | null;
42199
43068
  batch: string;
42200
43069
  crates_per_layer?: number;
@@ -42218,6 +43087,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
42218
43087
  weight?: string | null;
42219
43088
  };
42220
43089
  Update: {
43090
+ article_number?: string | null;
42221
43091
  barcode?: string | null;
42222
43092
  batch?: string;
42223
43093
  crates_per_layer?: number;
@@ -43131,8 +44001,10 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
43131
44001
  order_id: string | null;
43132
44002
  order_item_id: string | null;
43133
44003
  order_source: string | null;
44004
+ parent_trade_item_key: string | null;
43134
44005
  physical_after: number | null;
43135
44006
  physical_before: number | null;
44007
+ production_batch_id: string | null;
43136
44008
  qty_delta: number;
43137
44009
  reason: string | null;
43138
44010
  reserved_after: number | null;
@@ -43148,8 +44020,10 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
43148
44020
  order_id?: string | null;
43149
44021
  order_item_id?: string | null;
43150
44022
  order_source?: string | null;
44023
+ parent_trade_item_key?: string | null;
43151
44024
  physical_after?: number | null;
43152
44025
  physical_before?: number | null;
44026
+ production_batch_id?: string | null;
43153
44027
  qty_delta: number;
43154
44028
  reason?: string | null;
43155
44029
  reserved_after?: number | null;
@@ -43165,8 +44039,10 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
43165
44039
  order_id?: string | null;
43166
44040
  order_item_id?: string | null;
43167
44041
  order_source?: string | null;
44042
+ parent_trade_item_key?: string | null;
43168
44043
  physical_after?: number | null;
43169
44044
  physical_before?: number | null;
44045
+ production_batch_id?: string | null;
43170
44046
  qty_delta?: number;
43171
44047
  reason?: string | null;
43172
44048
  reserved_after?: number | null;
@@ -43625,7 +44501,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
43625
44501
  twinfield_connections: {
43626
44502
  Row: {
43627
44503
  access_token: string | null;
43628
- client_id: string;
44504
+ client_id: string | null;
43629
44505
  client_secret: string | null;
43630
44506
  cluster_uri: string | null;
43631
44507
  company_code: string | null;
@@ -43637,7 +44513,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
43637
44513
  is_active: boolean;
43638
44514
  label: string | null;
43639
44515
  office_code: string | null;
43640
- redirect_uri: string;
44516
+ redirect_uri: string | null;
43641
44517
  refresh_token: string | null;
43642
44518
  token_expires_at: string | null;
43643
44519
  updated_at: string;
@@ -43645,7 +44521,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
43645
44521
  };
43646
44522
  Insert: {
43647
44523
  access_token?: string | null;
43648
- client_id: string;
44524
+ client_id?: string | null;
43649
44525
  client_secret?: string | null;
43650
44526
  cluster_uri?: string | null;
43651
44527
  company_code?: string | null;
@@ -43657,7 +44533,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
43657
44533
  is_active?: boolean;
43658
44534
  label?: string | null;
43659
44535
  office_code?: string | null;
43660
- redirect_uri: string;
44536
+ redirect_uri?: string | null;
43661
44537
  refresh_token?: string | null;
43662
44538
  token_expires_at?: string | null;
43663
44539
  updated_at?: string;
@@ -43665,7 +44541,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
43665
44541
  };
43666
44542
  Update: {
43667
44543
  access_token?: string | null;
43668
- client_id?: string;
44544
+ client_id?: string | null;
43669
44545
  client_secret?: string | null;
43670
44546
  cluster_uri?: string | null;
43671
44547
  company_code?: string | null;
@@ -43677,7 +44553,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
43677
44553
  is_active?: boolean;
43678
44554
  label?: string | null;
43679
44555
  office_code?: string | null;
43680
- redirect_uri?: string;
44556
+ redirect_uri?: string | null;
43681
44557
  refresh_token?: string | null;
43682
44558
  token_expires_at?: string | null;
43683
44559
  updated_at?: string;
@@ -44872,25 +45748,6 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
44872
45748
  };
44873
45749
  Relationships: [];
44874
45750
  };
44875
- floriday_customer_discounts: {
44876
- Row: {
44877
- base_price: number | null;
44878
- buyer_organization_id: string | null;
44879
- currency: string | null;
44880
- discount_type: string | null;
44881
- discount_value: number | null;
44882
- min_quantity: number | null;
44883
- net_price: number | null;
44884
- product_group_id: string | null;
44885
- raw: import("../integrations/supabase/types").Json | null;
44886
- source: string | null;
44887
- source_id: string | null;
44888
- trade_item_id: string | null;
44889
- valid_from: string | null;
44890
- valid_until: string | null;
44891
- };
44892
- Relationships: [];
44893
- };
44894
45751
  local_customer_discounts: {
44895
45752
  Row: {
44896
45753
  base_price: number | null;
@@ -45309,6 +46166,28 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
45309
46166
  Args: never;
45310
46167
  Returns: undefined;
45311
46168
  };
46169
+ consume_bom_for_production: {
46170
+ Args: {
46171
+ p_connection_id: string;
46172
+ p_parent_id: string;
46173
+ p_parent_key: string;
46174
+ p_parent_kind: string;
46175
+ p_quantity: number;
46176
+ p_user_id: string;
46177
+ };
46178
+ Returns: import("../integrations/supabase/types").Json;
46179
+ } | {
46180
+ Args: {
46181
+ p_batch_id?: string;
46182
+ p_connection_id: string;
46183
+ p_parent_id: string;
46184
+ p_parent_key: string;
46185
+ p_parent_kind: string;
46186
+ p_quantity: number;
46187
+ p_user_id: string;
46188
+ };
46189
+ Returns: import("../integrations/supabase/types").Json;
46190
+ };
45312
46191
  consume_floriday_rate_limit: {
45313
46192
  Args: {
45314
46193
  p_bucket: string;
@@ -45360,6 +46239,13 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
45360
46239
  table_name: string;
45361
46240
  }[];
45362
46241
  };
46242
+ delete_samenstelling: {
46243
+ Args: {
46244
+ p_parent_id: string;
46245
+ p_parent_kind: string;
46246
+ };
46247
+ Returns: import("../integrations/supabase/types").Json;
46248
+ };
45363
46249
  dispatch_carrier_signups_sql: {
45364
46250
  Args: {
45365
46251
  _catchup?: string;
@@ -45520,19 +46406,6 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
45520
46406
  resource: string;
45521
46407
  }[];
45522
46408
  };
45523
- get_floriday_agreements_active: {
45524
- Args: {
45525
- p_on_date?: string;
45526
- };
45527
- Returns: {
45528
- buyer_organization_id: string;
45529
- data: import("../integrations/supabase/types").Json;
45530
- floriday_id: string;
45531
- status: string;
45532
- valid_from: string;
45533
- valid_until: string;
45534
- }[];
45535
- };
45536
46409
  get_floriday_clock_supplies_window: {
45537
46410
  Args: {
45538
46411
  p_from: string;
@@ -45605,6 +46478,21 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
45605
46478
  minutes_since_success: number;
45606
46479
  }[];
45607
46480
  };
46481
+ get_group_allocation_keys: {
46482
+ Args: {
46483
+ p_product_id: string;
46484
+ };
46485
+ Returns: {
46486
+ k: string;
46487
+ ord: number;
46488
+ }[];
46489
+ };
46490
+ get_group_head_key: {
46491
+ Args: {
46492
+ p_group_id: string;
46493
+ };
46494
+ Returns: string;
46495
+ };
45608
46496
  get_offer_by_link_code: {
45609
46497
  Args: {
45610
46498
  p_code: string;
@@ -45715,6 +46603,12 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
45715
46603
  };
45716
46604
  Returns: undefined;
45717
46605
  };
46606
+ mark_shipment_shipped: {
46607
+ Args: {
46608
+ p_shipment_id: string;
46609
+ };
46610
+ Returns: undefined;
46611
+ };
45718
46612
  next_manufacture_partij: {
45719
46613
  Args: {
45720
46614
  _tenant_id: string;
@@ -45799,6 +46693,14 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
45799
46693
  };
45800
46694
  Returns: undefined;
45801
46695
  };
46696
+ produce_designed_product: {
46697
+ Args: {
46698
+ p_parent_id: string;
46699
+ p_parent_kind: string;
46700
+ p_quantity: number;
46701
+ };
46702
+ Returns: import("../integrations/supabase/types").Json;
46703
+ };
45802
46704
  promote_trade_item_key: {
45803
46705
  Args: {
45804
46706
  p_new: string;
@@ -45806,6 +46708,10 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
45806
46708
  };
45807
46709
  Returns: undefined;
45808
46710
  };
46711
+ recompute_all_reserved_stock: {
46712
+ Args: never;
46713
+ Returns: undefined;
46714
+ };
45809
46715
  recompute_order_status: {
45810
46716
  Args: {
45811
46717
  p_order_id: string;
@@ -45855,27 +46761,45 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
45855
46761
  };
45856
46762
  Returns: undefined;
45857
46763
  };
46764
+ resolve_group_allocation: {
46765
+ Args: {
46766
+ _needed: number;
46767
+ _product_group_id: string;
46768
+ };
46769
+ Returns: {
46770
+ allocated: number;
46771
+ trade_item_id: string;
46772
+ }[];
46773
+ };
46774
+ resolve_group_member_stock_key: {
46775
+ Args: {
46776
+ p_trade_item_id: string;
46777
+ };
46778
+ Returns: string;
46779
+ };
45858
46780
  resolve_product_id_for_item: {
45859
46781
  Args: {
45860
46782
  p_product_name: string;
45861
46783
  };
45862
46784
  Returns: string;
45863
46785
  };
45864
- schedule_floriday_additional_services_sync: {
46786
+ resolve_stock_trade_item_key: {
45865
46787
  Args: {
45866
- p_apikey: string;
45867
- p_url: string;
46788
+ p_product_id: string;
45868
46789
  };
45869
- Returns: number;
46790
+ Returns: string;
45870
46791
  };
45871
- schedule_floriday_agreement_calloffs_sync: {
46792
+ reverse_production: {
45872
46793
  Args: {
45873
- p_apikey: string;
45874
- p_url: string;
46794
+ p_connection_id?: string;
46795
+ p_parent_key: string;
46796
+ p_quantity: number;
46797
+ p_reason?: string;
46798
+ p_user_id?: string;
45875
46799
  };
45876
- Returns: number;
46800
+ Returns: import("../integrations/supabase/types").Json;
45877
46801
  };
45878
- schedule_floriday_agreements_sync: {
46802
+ schedule_floriday_additional_services_sync: {
45879
46803
  Args: {
45880
46804
  p_apikey: string;
45881
46805
  p_url: string;
@@ -49605,105 +50529,6 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
49605
50529
  referencedColumns: ["id"];
49606
50530
  }];
49607
50531
  };
49608
- floriday_agreement_calloffs_cache: {
49609
- Row: {
49610
- agreement_id: string | null;
49611
- connection_id: string;
49612
- data: import("../integrations/supabase/types").Json;
49613
- delivery_date: string | null;
49614
- fetched_at: string;
49615
- floriday_id: string;
49616
- id: string;
49617
- is_deleted: boolean;
49618
- sequence_number: number;
49619
- status: string | null;
49620
- updated_at: string;
49621
- };
49622
- Insert: {
49623
- agreement_id?: string | null;
49624
- connection_id: string;
49625
- data?: import("../integrations/supabase/types").Json;
49626
- delivery_date?: string | null;
49627
- fetched_at?: string;
49628
- floriday_id: string;
49629
- id?: string;
49630
- is_deleted?: boolean;
49631
- sequence_number?: number;
49632
- status?: string | null;
49633
- updated_at?: string;
49634
- };
49635
- Update: {
49636
- agreement_id?: string | null;
49637
- connection_id?: string;
49638
- data?: import("../integrations/supabase/types").Json;
49639
- delivery_date?: string | null;
49640
- fetched_at?: string;
49641
- floriday_id?: string;
49642
- id?: string;
49643
- is_deleted?: boolean;
49644
- sequence_number?: number;
49645
- status?: string | null;
49646
- updated_at?: string;
49647
- };
49648
- Relationships: [{
49649
- foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
49650
- columns: ["connection_id"];
49651
- isOneToOne: false;
49652
- referencedRelation: "floriday_connections";
49653
- referencedColumns: ["id"];
49654
- }];
49655
- };
49656
- floriday_agreements_cache: {
49657
- Row: {
49658
- buyer_organization_id: string | null;
49659
- connection_id: string;
49660
- data: import("../integrations/supabase/types").Json;
49661
- fetched_at: string;
49662
- floriday_id: string;
49663
- id: string;
49664
- is_deleted: boolean;
49665
- sequence_number: number;
49666
- status: string | null;
49667
- updated_at: string;
49668
- valid_from: string | null;
49669
- valid_until: string | null;
49670
- };
49671
- Insert: {
49672
- buyer_organization_id?: string | null;
49673
- connection_id: string;
49674
- data?: import("../integrations/supabase/types").Json;
49675
- fetched_at?: string;
49676
- floriday_id: string;
49677
- id?: string;
49678
- is_deleted?: boolean;
49679
- sequence_number?: number;
49680
- status?: string | null;
49681
- updated_at?: string;
49682
- valid_from?: string | null;
49683
- valid_until?: string | null;
49684
- };
49685
- Update: {
49686
- buyer_organization_id?: string | null;
49687
- connection_id?: string;
49688
- data?: import("../integrations/supabase/types").Json;
49689
- fetched_at?: string;
49690
- floriday_id?: string;
49691
- id?: string;
49692
- is_deleted?: boolean;
49693
- sequence_number?: number;
49694
- status?: string | null;
49695
- updated_at?: string;
49696
- valid_from?: string | null;
49697
- valid_until?: string | null;
49698
- };
49699
- Relationships: [{
49700
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
49701
- columns: ["connection_id"];
49702
- isOneToOne: false;
49703
- referencedRelation: "floriday_connections";
49704
- referencedColumns: ["id"];
49705
- }];
49706
- };
49707
50532
  floriday_auction_letters_cache: {
49708
50533
  Row: {
49709
50534
  auction_letter_code: string;
@@ -51201,6 +52026,45 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
51201
52026
  referencedColumns: ["id"];
51202
52027
  }];
51203
52028
  };
52029
+ floriday_trade_settings_customers_cache: {
52030
+ Row: {
52031
+ connection_id: string;
52032
+ data: import("../integrations/supabase/types").Json;
52033
+ fetched_at: string;
52034
+ floriday_id: string;
52035
+ id: string;
52036
+ is_deleted: boolean;
52037
+ sequence_number: number;
52038
+ updated_at: string;
52039
+ };
52040
+ Insert: {
52041
+ connection_id: string;
52042
+ data: import("../integrations/supabase/types").Json;
52043
+ fetched_at?: string;
52044
+ floriday_id: string;
52045
+ id?: string;
52046
+ is_deleted?: boolean;
52047
+ sequence_number?: number;
52048
+ updated_at?: string;
52049
+ };
52050
+ Update: {
52051
+ connection_id?: string;
52052
+ data?: import("../integrations/supabase/types").Json;
52053
+ fetched_at?: string;
52054
+ floriday_id?: string;
52055
+ id?: string;
52056
+ is_deleted?: boolean;
52057
+ sequence_number?: number;
52058
+ updated_at?: string;
52059
+ };
52060
+ Relationships: [{
52061
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
52062
+ columns: ["connection_id"];
52063
+ isOneToOne: false;
52064
+ referencedRelation: "floriday_connections";
52065
+ referencedColumns: ["id"];
52066
+ }];
52067
+ };
51204
52068
  floriday_trips_cache: {
51205
52069
  Row: {
51206
52070
  carrier_organization_id: string | null;
@@ -53373,6 +54237,105 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
53373
54237
  };
53374
54238
  Relationships: [];
53375
54239
  };
54240
+ order_shipment_items: {
54241
+ Row: {
54242
+ created_at: string;
54243
+ id: string;
54244
+ order_item_id: string;
54245
+ product_id: string | null;
54246
+ product_name: string;
54247
+ quantity: number;
54248
+ shipment_id: string;
54249
+ updated_at: string;
54250
+ };
54251
+ Insert: {
54252
+ created_at?: string;
54253
+ id?: string;
54254
+ order_item_id: string;
54255
+ product_id?: string | null;
54256
+ product_name: string;
54257
+ quantity: number;
54258
+ shipment_id: string;
54259
+ updated_at?: string;
54260
+ };
54261
+ Update: {
54262
+ created_at?: string;
54263
+ id?: string;
54264
+ order_item_id?: string;
54265
+ product_id?: string | null;
54266
+ product_name?: string;
54267
+ quantity?: number;
54268
+ shipment_id?: string;
54269
+ updated_at?: string;
54270
+ };
54271
+ Relationships: [{
54272
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
54273
+ columns: ["order_item_id"];
54274
+ isOneToOne: false;
54275
+ referencedRelation: "order_items";
54276
+ referencedColumns: ["id"];
54277
+ }, {
54278
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
54279
+ columns: ["shipment_id"];
54280
+ isOneToOne: false;
54281
+ referencedRelation: "order_shipments";
54282
+ referencedColumns: ["id"];
54283
+ }];
54284
+ };
54285
+ order_shipments: {
54286
+ Row: {
54287
+ carrier_id: string | null;
54288
+ created_at: string;
54289
+ delivery_date: string | null;
54290
+ delivery_location_id: string | null;
54291
+ id: string;
54292
+ notes: string | null;
54293
+ order_id: string;
54294
+ shipment_number: number;
54295
+ shipped_at: string | null;
54296
+ status: string;
54297
+ updated_at: string;
54298
+ };
54299
+ Insert: {
54300
+ carrier_id?: string | null;
54301
+ created_at?: string;
54302
+ delivery_date?: string | null;
54303
+ delivery_location_id?: string | null;
54304
+ id?: string;
54305
+ notes?: string | null;
54306
+ order_id: string;
54307
+ shipment_number: number;
54308
+ shipped_at?: string | null;
54309
+ status?: string;
54310
+ updated_at?: string;
54311
+ };
54312
+ Update: {
54313
+ carrier_id?: string | null;
54314
+ created_at?: string;
54315
+ delivery_date?: string | null;
54316
+ delivery_location_id?: string | null;
54317
+ id?: string;
54318
+ notes?: string | null;
54319
+ order_id?: string;
54320
+ shipment_number?: number;
54321
+ shipped_at?: string | null;
54322
+ status?: string;
54323
+ updated_at?: string;
54324
+ };
54325
+ Relationships: [{
54326
+ foreignKeyName: "order_shipments_carrier_id_fkey";
54327
+ columns: ["carrier_id"];
54328
+ isOneToOne: false;
54329
+ referencedRelation: "carriers";
54330
+ referencedColumns: ["id"];
54331
+ }, {
54332
+ foreignKeyName: "order_shipments_order_id_fkey";
54333
+ columns: ["order_id"];
54334
+ isOneToOne: false;
54335
+ referencedRelation: "orders";
54336
+ referencedColumns: ["id"];
54337
+ }];
54338
+ };
53376
54339
  orders: {
53377
54340
  Row: {
53378
54341
  created_at: string;
@@ -53380,8 +54343,9 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
53380
54343
  customer_id: string | null;
53381
54344
  customer_name: string;
53382
54345
  deleted_at: string | null;
53383
- delivery_date: string;
54346
+ delivery_date: string | null;
53384
54347
  id: string;
54348
+ is_reservation: boolean;
53385
54349
  notes: string | null;
53386
54350
  order_date: string;
53387
54351
  order_number: string;
@@ -53398,8 +54362,9 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
53398
54362
  customer_id?: string | null;
53399
54363
  customer_name?: string;
53400
54364
  deleted_at?: string | null;
53401
- delivery_date: string;
54365
+ delivery_date?: string | null;
53402
54366
  id?: string;
54367
+ is_reservation?: boolean;
53403
54368
  notes?: string | null;
53404
54369
  order_date?: string;
53405
54370
  order_number: string;
@@ -53416,8 +54381,9 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
53416
54381
  customer_id?: string | null;
53417
54382
  customer_name?: string;
53418
54383
  deleted_at?: string | null;
53419
- delivery_date?: string;
54384
+ delivery_date?: string | null;
53420
54385
  id?: string;
54386
+ is_reservation?: boolean;
53421
54387
  notes?: string | null;
53422
54388
  order_date?: string;
53423
54389
  order_number?: string;
@@ -53559,6 +54525,63 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
53559
54525
  };
53560
54526
  Relationships: [];
53561
54527
  };
54528
+ product_bom_items: {
54529
+ Row: {
54530
+ component_product_id: string | null;
54531
+ component_trade_item_floriday_id: string | null;
54532
+ created_at: string;
54533
+ id: string;
54534
+ notes: string | null;
54535
+ parent_product_id: string | null;
54536
+ parent_trade_item_floriday_id: string | null;
54537
+ quantity: number;
54538
+ sort_order: number;
54539
+ tenant_id: string;
54540
+ unit: string;
54541
+ updated_at: string;
54542
+ };
54543
+ Insert: {
54544
+ component_product_id?: string | null;
54545
+ component_trade_item_floriday_id?: string | null;
54546
+ created_at?: string;
54547
+ id?: string;
54548
+ notes?: string | null;
54549
+ parent_product_id?: string | null;
54550
+ parent_trade_item_floriday_id?: string | null;
54551
+ quantity?: number;
54552
+ sort_order?: number;
54553
+ tenant_id: string;
54554
+ unit?: string;
54555
+ updated_at?: string;
54556
+ };
54557
+ Update: {
54558
+ component_product_id?: string | null;
54559
+ component_trade_item_floriday_id?: string | null;
54560
+ created_at?: string;
54561
+ id?: string;
54562
+ notes?: string | null;
54563
+ parent_product_id?: string | null;
54564
+ parent_trade_item_floriday_id?: string | null;
54565
+ quantity?: number;
54566
+ sort_order?: number;
54567
+ tenant_id?: string;
54568
+ unit?: string;
54569
+ updated_at?: string;
54570
+ };
54571
+ Relationships: [{
54572
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
54573
+ columns: ["component_product_id"];
54574
+ isOneToOne: false;
54575
+ referencedRelation: "products";
54576
+ referencedColumns: ["id"];
54577
+ }, {
54578
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
54579
+ columns: ["parent_product_id"];
54580
+ isOneToOne: false;
54581
+ referencedRelation: "products";
54582
+ referencedColumns: ["id"];
54583
+ }];
54584
+ };
53562
54585
  product_categories: {
53563
54586
  Row: {
53564
54587
  color: string;
@@ -53664,6 +54687,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
53664
54687
  id: string;
53665
54688
  product_group_id: string;
53666
54689
  quantity: number;
54690
+ sort_order: number;
53667
54691
  trade_item_id: string;
53668
54692
  };
53669
54693
  Insert: {
@@ -53671,6 +54695,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
53671
54695
  id?: string;
53672
54696
  product_group_id: string;
53673
54697
  quantity?: number;
54698
+ sort_order?: number;
53674
54699
  trade_item_id: string;
53675
54700
  };
53676
54701
  Update: {
@@ -53678,6 +54703,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
53678
54703
  id?: string;
53679
54704
  product_group_id?: string;
53680
54705
  quantity?: number;
54706
+ sort_order?: number;
53681
54707
  trade_item_id?: string;
53682
54708
  };
53683
54709
  Relationships: [{
@@ -53692,6 +54718,8 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
53692
54718
  Row: {
53693
54719
  created_at: string;
53694
54720
  description: string | null;
54721
+ head_product_id: string | null;
54722
+ head_trade_item_floriday_id: string | null;
53695
54723
  id: string;
53696
54724
  is_active: boolean;
53697
54725
  name: string;
@@ -53701,6 +54729,8 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
53701
54729
  Insert: {
53702
54730
  created_at?: string;
53703
54731
  description?: string | null;
54732
+ head_product_id?: string | null;
54733
+ head_trade_item_floriday_id?: string | null;
53704
54734
  id?: string;
53705
54735
  is_active?: boolean;
53706
54736
  name: string;
@@ -53710,16 +54740,85 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
53710
54740
  Update: {
53711
54741
  created_at?: string;
53712
54742
  description?: string | null;
54743
+ head_product_id?: string | null;
54744
+ head_trade_item_floriday_id?: string | null;
53713
54745
  id?: string;
53714
54746
  is_active?: boolean;
53715
54747
  name?: string;
53716
54748
  tenant_id?: string;
53717
54749
  updated_at?: string;
53718
54750
  };
53719
- Relationships: [];
54751
+ Relationships: [{
54752
+ foreignKeyName: "product_groups_head_product_id_fkey";
54753
+ columns: ["head_product_id"];
54754
+ isOneToOne: false;
54755
+ referencedRelation: "products";
54756
+ referencedColumns: ["id"];
54757
+ }];
54758
+ };
54759
+ product_load_settings: {
54760
+ Row: {
54761
+ created_at: string;
54762
+ id: string;
54763
+ is_package: boolean;
54764
+ layers_per_load_carrier: number | null;
54765
+ load_carrier: string | null;
54766
+ package_id: string | null;
54767
+ package_label: string | null;
54768
+ packages_per_layer: number | null;
54769
+ product_id: string | null;
54770
+ tenant_id: string;
54771
+ trade_item_floriday_id: string | null;
54772
+ units_per_package: number | null;
54773
+ updated_at: string;
54774
+ };
54775
+ Insert: {
54776
+ created_at?: string;
54777
+ id?: string;
54778
+ is_package?: boolean;
54779
+ layers_per_load_carrier?: number | null;
54780
+ load_carrier?: string | null;
54781
+ package_id?: string | null;
54782
+ package_label?: string | null;
54783
+ packages_per_layer?: number | null;
54784
+ product_id?: string | null;
54785
+ tenant_id: string;
54786
+ trade_item_floriday_id?: string | null;
54787
+ units_per_package?: number | null;
54788
+ updated_at?: string;
54789
+ };
54790
+ Update: {
54791
+ created_at?: string;
54792
+ id?: string;
54793
+ is_package?: boolean;
54794
+ layers_per_load_carrier?: number | null;
54795
+ load_carrier?: string | null;
54796
+ package_id?: string | null;
54797
+ package_label?: string | null;
54798
+ packages_per_layer?: number | null;
54799
+ product_id?: string | null;
54800
+ tenant_id?: string;
54801
+ trade_item_floriday_id?: string | null;
54802
+ units_per_package?: number | null;
54803
+ updated_at?: string;
54804
+ };
54805
+ Relationships: [{
54806
+ foreignKeyName: "product_load_settings_package_id_fkey";
54807
+ columns: ["package_id"];
54808
+ isOneToOne: false;
54809
+ referencedRelation: "packages";
54810
+ referencedColumns: ["id"];
54811
+ }, {
54812
+ foreignKeyName: "product_load_settings_product_id_fkey";
54813
+ columns: ["product_id"];
54814
+ isOneToOne: false;
54815
+ referencedRelation: "products";
54816
+ referencedColumns: ["id"];
54817
+ }];
53720
54818
  };
53721
54819
  products: {
53722
54820
  Row: {
54821
+ article_number: string | null;
53723
54822
  barcode: string | null;
53724
54823
  batch: string;
53725
54824
  crates_per_layer: number;
@@ -53743,6 +54842,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
53743
54842
  weight: string | null;
53744
54843
  };
53745
54844
  Insert: {
54845
+ article_number?: string | null;
53746
54846
  barcode?: string | null;
53747
54847
  batch: string;
53748
54848
  crates_per_layer?: number;
@@ -53766,6 +54866,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
53766
54866
  weight?: string | null;
53767
54867
  };
53768
54868
  Update: {
54869
+ article_number?: string | null;
53769
54870
  barcode?: string | null;
53770
54871
  batch?: string;
53771
54872
  crates_per_layer?: number;
@@ -54679,8 +55780,10 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
54679
55780
  order_id: string | null;
54680
55781
  order_item_id: string | null;
54681
55782
  order_source: string | null;
55783
+ parent_trade_item_key: string | null;
54682
55784
  physical_after: number | null;
54683
55785
  physical_before: number | null;
55786
+ production_batch_id: string | null;
54684
55787
  qty_delta: number;
54685
55788
  reason: string | null;
54686
55789
  reserved_after: number | null;
@@ -54696,8 +55799,10 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
54696
55799
  order_id?: string | null;
54697
55800
  order_item_id?: string | null;
54698
55801
  order_source?: string | null;
55802
+ parent_trade_item_key?: string | null;
54699
55803
  physical_after?: number | null;
54700
55804
  physical_before?: number | null;
55805
+ production_batch_id?: string | null;
54701
55806
  qty_delta: number;
54702
55807
  reason?: string | null;
54703
55808
  reserved_after?: number | null;
@@ -54713,8 +55818,10 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
54713
55818
  order_id?: string | null;
54714
55819
  order_item_id?: string | null;
54715
55820
  order_source?: string | null;
55821
+ parent_trade_item_key?: string | null;
54716
55822
  physical_after?: number | null;
54717
55823
  physical_before?: number | null;
55824
+ production_batch_id?: string | null;
54718
55825
  qty_delta?: number;
54719
55826
  reason?: string | null;
54720
55827
  reserved_after?: number | null;
@@ -55173,7 +56280,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
55173
56280
  twinfield_connections: {
55174
56281
  Row: {
55175
56282
  access_token: string | null;
55176
- client_id: string;
56283
+ client_id: string | null;
55177
56284
  client_secret: string | null;
55178
56285
  cluster_uri: string | null;
55179
56286
  company_code: string | null;
@@ -55185,7 +56292,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
55185
56292
  is_active: boolean;
55186
56293
  label: string | null;
55187
56294
  office_code: string | null;
55188
- redirect_uri: string;
56295
+ redirect_uri: string | null;
55189
56296
  refresh_token: string | null;
55190
56297
  token_expires_at: string | null;
55191
56298
  updated_at: string;
@@ -55193,7 +56300,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
55193
56300
  };
55194
56301
  Insert: {
55195
56302
  access_token?: string | null;
55196
- client_id: string;
56303
+ client_id?: string | null;
55197
56304
  client_secret?: string | null;
55198
56305
  cluster_uri?: string | null;
55199
56306
  company_code?: string | null;
@@ -55205,7 +56312,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
55205
56312
  is_active?: boolean;
55206
56313
  label?: string | null;
55207
56314
  office_code?: string | null;
55208
- redirect_uri: string;
56315
+ redirect_uri?: string | null;
55209
56316
  refresh_token?: string | null;
55210
56317
  token_expires_at?: string | null;
55211
56318
  updated_at?: string;
@@ -55213,7 +56320,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
55213
56320
  };
55214
56321
  Update: {
55215
56322
  access_token?: string | null;
55216
- client_id?: string;
56323
+ client_id?: string | null;
55217
56324
  client_secret?: string | null;
55218
56325
  cluster_uri?: string | null;
55219
56326
  company_code?: string | null;
@@ -55225,7 +56332,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
55225
56332
  is_active?: boolean;
55226
56333
  label?: string | null;
55227
56334
  office_code?: string | null;
55228
- redirect_uri?: string;
56335
+ redirect_uri?: string | null;
55229
56336
  refresh_token?: string | null;
55230
56337
  token_expires_at?: string | null;
55231
56338
  updated_at?: string;
@@ -56420,25 +57527,6 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
56420
57527
  };
56421
57528
  Relationships: [];
56422
57529
  };
56423
- floriday_customer_discounts: {
56424
- Row: {
56425
- base_price: number | null;
56426
- buyer_organization_id: string | null;
56427
- currency: string | null;
56428
- discount_type: string | null;
56429
- discount_value: number | null;
56430
- min_quantity: number | null;
56431
- net_price: number | null;
56432
- product_group_id: string | null;
56433
- raw: import("../integrations/supabase/types").Json | null;
56434
- source: string | null;
56435
- source_id: string | null;
56436
- trade_item_id: string | null;
56437
- valid_from: string | null;
56438
- valid_until: string | null;
56439
- };
56440
- Relationships: [];
56441
- };
56442
57530
  local_customer_discounts: {
56443
57531
  Row: {
56444
57532
  base_price: number | null;
@@ -56857,6 +57945,28 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
56857
57945
  Args: never;
56858
57946
  Returns: undefined;
56859
57947
  };
57948
+ consume_bom_for_production: {
57949
+ Args: {
57950
+ p_connection_id: string;
57951
+ p_parent_id: string;
57952
+ p_parent_key: string;
57953
+ p_parent_kind: string;
57954
+ p_quantity: number;
57955
+ p_user_id: string;
57956
+ };
57957
+ Returns: import("../integrations/supabase/types").Json;
57958
+ } | {
57959
+ Args: {
57960
+ p_batch_id?: string;
57961
+ p_connection_id: string;
57962
+ p_parent_id: string;
57963
+ p_parent_key: string;
57964
+ p_parent_kind: string;
57965
+ p_quantity: number;
57966
+ p_user_id: string;
57967
+ };
57968
+ Returns: import("../integrations/supabase/types").Json;
57969
+ };
56860
57970
  consume_floriday_rate_limit: {
56861
57971
  Args: {
56862
57972
  p_bucket: string;
@@ -56908,6 +58018,13 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
56908
58018
  table_name: string;
56909
58019
  }[];
56910
58020
  };
58021
+ delete_samenstelling: {
58022
+ Args: {
58023
+ p_parent_id: string;
58024
+ p_parent_kind: string;
58025
+ };
58026
+ Returns: import("../integrations/supabase/types").Json;
58027
+ };
56911
58028
  dispatch_carrier_signups_sql: {
56912
58029
  Args: {
56913
58030
  _catchup?: string;
@@ -57068,19 +58185,6 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
57068
58185
  resource: string;
57069
58186
  }[];
57070
58187
  };
57071
- get_floriday_agreements_active: {
57072
- Args: {
57073
- p_on_date?: string;
57074
- };
57075
- Returns: {
57076
- buyer_organization_id: string;
57077
- data: import("../integrations/supabase/types").Json;
57078
- floriday_id: string;
57079
- status: string;
57080
- valid_from: string;
57081
- valid_until: string;
57082
- }[];
57083
- };
57084
58188
  get_floriday_clock_supplies_window: {
57085
58189
  Args: {
57086
58190
  p_from: string;
@@ -57153,6 +58257,21 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
57153
58257
  minutes_since_success: number;
57154
58258
  }[];
57155
58259
  };
58260
+ get_group_allocation_keys: {
58261
+ Args: {
58262
+ p_product_id: string;
58263
+ };
58264
+ Returns: {
58265
+ k: string;
58266
+ ord: number;
58267
+ }[];
58268
+ };
58269
+ get_group_head_key: {
58270
+ Args: {
58271
+ p_group_id: string;
58272
+ };
58273
+ Returns: string;
58274
+ };
57156
58275
  get_offer_by_link_code: {
57157
58276
  Args: {
57158
58277
  p_code: string;
@@ -57263,6 +58382,12 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
57263
58382
  };
57264
58383
  Returns: undefined;
57265
58384
  };
58385
+ mark_shipment_shipped: {
58386
+ Args: {
58387
+ p_shipment_id: string;
58388
+ };
58389
+ Returns: undefined;
58390
+ };
57266
58391
  next_manufacture_partij: {
57267
58392
  Args: {
57268
58393
  _tenant_id: string;
@@ -57347,6 +58472,14 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
57347
58472
  };
57348
58473
  Returns: undefined;
57349
58474
  };
58475
+ produce_designed_product: {
58476
+ Args: {
58477
+ p_parent_id: string;
58478
+ p_parent_kind: string;
58479
+ p_quantity: number;
58480
+ };
58481
+ Returns: import("../integrations/supabase/types").Json;
58482
+ };
57350
58483
  promote_trade_item_key: {
57351
58484
  Args: {
57352
58485
  p_new: string;
@@ -57354,6 +58487,10 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
57354
58487
  };
57355
58488
  Returns: undefined;
57356
58489
  };
58490
+ recompute_all_reserved_stock: {
58491
+ Args: never;
58492
+ Returns: undefined;
58493
+ };
57357
58494
  recompute_order_status: {
57358
58495
  Args: {
57359
58496
  p_order_id: string;
@@ -57403,27 +58540,45 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
57403
58540
  };
57404
58541
  Returns: undefined;
57405
58542
  };
58543
+ resolve_group_allocation: {
58544
+ Args: {
58545
+ _needed: number;
58546
+ _product_group_id: string;
58547
+ };
58548
+ Returns: {
58549
+ allocated: number;
58550
+ trade_item_id: string;
58551
+ }[];
58552
+ };
58553
+ resolve_group_member_stock_key: {
58554
+ Args: {
58555
+ p_trade_item_id: string;
58556
+ };
58557
+ Returns: string;
58558
+ };
57406
58559
  resolve_product_id_for_item: {
57407
58560
  Args: {
57408
58561
  p_product_name: string;
57409
58562
  };
57410
58563
  Returns: string;
57411
58564
  };
57412
- schedule_floriday_additional_services_sync: {
58565
+ resolve_stock_trade_item_key: {
57413
58566
  Args: {
57414
- p_apikey: string;
57415
- p_url: string;
58567
+ p_product_id: string;
57416
58568
  };
57417
- Returns: number;
58569
+ Returns: string;
57418
58570
  };
57419
- schedule_floriday_agreement_calloffs_sync: {
58571
+ reverse_production: {
57420
58572
  Args: {
57421
- p_apikey: string;
57422
- p_url: string;
58573
+ p_connection_id?: string;
58574
+ p_parent_key: string;
58575
+ p_quantity: number;
58576
+ p_reason?: string;
58577
+ p_user_id?: string;
57423
58578
  };
57424
- Returns: number;
58579
+ Returns: import("../integrations/supabase/types").Json;
57425
58580
  };
57426
- schedule_floriday_agreements_sync: {
58581
+ schedule_floriday_additional_services_sync: {
57427
58582
  Args: {
57428
58583
  p_apikey: string;
57429
58584
  p_url: string;