@flowselections/floriday-verkoop-module 1.0.17 → 1.0.19

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 +436 -149
  21. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  22. package/dist-lib/integrations/supabase/client.d.ts +436 -149
  23. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  24. package/dist-lib/integrations/supabase/client.server.d.ts +436 -149
  25. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  26. package/dist-lib/integrations/supabase/types.d.ts +452 -153
  27. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  28. package/dist-lib/lib/cart-lock.functions.d.ts +436 -149
  29. package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
  30. package/dist-lib/lib/cart-replan.functions.d.ts +884 -310
  31. package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
  32. package/dist-lib/lib/create-order.functions.d.ts +39491 -1379
  33. package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
  34. package/dist-lib/lib/create-order.functions.js +814 -64
  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 +1321 -460
  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 +436 -149
  41. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
  42. package/dist-lib/lib/floriday-public.functions.d.ts +3052 -1043
  43. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  44. package/dist-lib/lib/floriday-writes.functions.d.ts +2180 -745
  45. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  46. package/dist-lib/lib/order-shipments.functions.d.ts +47382 -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 +1321 -460
  52. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  53. package/dist-lib/lib/tradeitems.functions.d.ts +436 -149
  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
@@ -3411,105 +3411,6 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
3411
3411
  referencedColumns: ["id"];
3412
3412
  }];
3413
3413
  };
3414
- floriday_agreement_calloffs_cache: {
3415
- Row: {
3416
- agreement_id: string | null;
3417
- connection_id: string;
3418
- data: import("../integrations/supabase/types").Json;
3419
- delivery_date: string | null;
3420
- fetched_at: string;
3421
- floriday_id: string;
3422
- id: string;
3423
- is_deleted: boolean;
3424
- sequence_number: number;
3425
- status: string | null;
3426
- updated_at: string;
3427
- };
3428
- Insert: {
3429
- agreement_id?: string | null;
3430
- connection_id: string;
3431
- data?: import("../integrations/supabase/types").Json;
3432
- delivery_date?: string | null;
3433
- fetched_at?: string;
3434
- floriday_id: string;
3435
- id?: string;
3436
- is_deleted?: boolean;
3437
- sequence_number?: number;
3438
- status?: string | null;
3439
- updated_at?: string;
3440
- };
3441
- Update: {
3442
- agreement_id?: string | null;
3443
- connection_id?: string;
3444
- data?: import("../integrations/supabase/types").Json;
3445
- delivery_date?: string | null;
3446
- fetched_at?: string;
3447
- floriday_id?: string;
3448
- id?: string;
3449
- is_deleted?: boolean;
3450
- sequence_number?: number;
3451
- status?: string | null;
3452
- updated_at?: string;
3453
- };
3454
- Relationships: [{
3455
- foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
3456
- columns: ["connection_id"];
3457
- isOneToOne: false;
3458
- referencedRelation: "floriday_connections";
3459
- referencedColumns: ["id"];
3460
- }];
3461
- };
3462
- floriday_agreements_cache: {
3463
- Row: {
3464
- buyer_organization_id: string | null;
3465
- connection_id: string;
3466
- data: import("../integrations/supabase/types").Json;
3467
- fetched_at: string;
3468
- floriday_id: string;
3469
- id: string;
3470
- is_deleted: boolean;
3471
- sequence_number: number;
3472
- status: string | null;
3473
- updated_at: string;
3474
- valid_from: string | null;
3475
- valid_until: string | null;
3476
- };
3477
- Insert: {
3478
- buyer_organization_id?: string | null;
3479
- connection_id: string;
3480
- data?: import("../integrations/supabase/types").Json;
3481
- fetched_at?: string;
3482
- floriday_id: string;
3483
- id?: string;
3484
- is_deleted?: boolean;
3485
- sequence_number?: number;
3486
- status?: string | null;
3487
- updated_at?: string;
3488
- valid_from?: string | null;
3489
- valid_until?: string | null;
3490
- };
3491
- Update: {
3492
- buyer_organization_id?: string | null;
3493
- connection_id?: string;
3494
- data?: import("../integrations/supabase/types").Json;
3495
- fetched_at?: string;
3496
- floriday_id?: string;
3497
- id?: string;
3498
- is_deleted?: boolean;
3499
- sequence_number?: number;
3500
- status?: string | null;
3501
- updated_at?: string;
3502
- valid_from?: string | null;
3503
- valid_until?: string | null;
3504
- };
3505
- Relationships: [{
3506
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
3507
- columns: ["connection_id"];
3508
- isOneToOne: false;
3509
- referencedRelation: "floriday_connections";
3510
- referencedColumns: ["id"];
3511
- }];
3512
- };
3513
3414
  floriday_auction_letters_cache: {
3514
3415
  Row: {
3515
3416
  auction_letter_code: string;
@@ -5007,6 +4908,45 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
5007
4908
  referencedColumns: ["id"];
5008
4909
  }];
5009
4910
  };
4911
+ floriday_trade_settings_customers_cache: {
4912
+ Row: {
4913
+ connection_id: string;
4914
+ data: import("../integrations/supabase/types").Json;
4915
+ fetched_at: string;
4916
+ floriday_id: string;
4917
+ id: string;
4918
+ is_deleted: boolean;
4919
+ sequence_number: number;
4920
+ updated_at: string;
4921
+ };
4922
+ Insert: {
4923
+ connection_id: string;
4924
+ data: import("../integrations/supabase/types").Json;
4925
+ fetched_at?: string;
4926
+ floriday_id: string;
4927
+ id?: string;
4928
+ is_deleted?: boolean;
4929
+ sequence_number?: number;
4930
+ updated_at?: string;
4931
+ };
4932
+ Update: {
4933
+ connection_id?: string;
4934
+ data?: import("../integrations/supabase/types").Json;
4935
+ fetched_at?: string;
4936
+ floriday_id?: string;
4937
+ id?: string;
4938
+ is_deleted?: boolean;
4939
+ sequence_number?: number;
4940
+ updated_at?: string;
4941
+ };
4942
+ Relationships: [{
4943
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
4944
+ columns: ["connection_id"];
4945
+ isOneToOne: false;
4946
+ referencedRelation: "floriday_connections";
4947
+ referencedColumns: ["id"];
4948
+ }];
4949
+ };
5010
4950
  floriday_trips_cache: {
5011
4951
  Row: {
5012
4952
  carrier_organization_id: string | null;
@@ -7179,6 +7119,105 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7179
7119
  };
7180
7120
  Relationships: [];
7181
7121
  };
7122
+ order_shipment_items: {
7123
+ Row: {
7124
+ created_at: string;
7125
+ id: string;
7126
+ order_item_id: string;
7127
+ product_id: string | null;
7128
+ product_name: string;
7129
+ quantity: number;
7130
+ shipment_id: string;
7131
+ updated_at: string;
7132
+ };
7133
+ Insert: {
7134
+ created_at?: string;
7135
+ id?: string;
7136
+ order_item_id: string;
7137
+ product_id?: string | null;
7138
+ product_name: string;
7139
+ quantity: number;
7140
+ shipment_id: string;
7141
+ updated_at?: string;
7142
+ };
7143
+ Update: {
7144
+ created_at?: string;
7145
+ id?: string;
7146
+ order_item_id?: string;
7147
+ product_id?: string | null;
7148
+ product_name?: string;
7149
+ quantity?: number;
7150
+ shipment_id?: string;
7151
+ updated_at?: string;
7152
+ };
7153
+ Relationships: [{
7154
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
7155
+ columns: ["order_item_id"];
7156
+ isOneToOne: false;
7157
+ referencedRelation: "order_items";
7158
+ referencedColumns: ["id"];
7159
+ }, {
7160
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
7161
+ columns: ["shipment_id"];
7162
+ isOneToOne: false;
7163
+ referencedRelation: "order_shipments";
7164
+ referencedColumns: ["id"];
7165
+ }];
7166
+ };
7167
+ order_shipments: {
7168
+ Row: {
7169
+ carrier_id: string | null;
7170
+ created_at: string;
7171
+ delivery_date: string | null;
7172
+ delivery_location_id: string | null;
7173
+ id: string;
7174
+ notes: string | null;
7175
+ order_id: string;
7176
+ shipment_number: number;
7177
+ shipped_at: string | null;
7178
+ status: string;
7179
+ updated_at: string;
7180
+ };
7181
+ Insert: {
7182
+ carrier_id?: string | null;
7183
+ created_at?: string;
7184
+ delivery_date?: string | null;
7185
+ delivery_location_id?: string | null;
7186
+ id?: string;
7187
+ notes?: string | null;
7188
+ order_id: string;
7189
+ shipment_number: number;
7190
+ shipped_at?: string | null;
7191
+ status?: string;
7192
+ updated_at?: string;
7193
+ };
7194
+ Update: {
7195
+ carrier_id?: string | null;
7196
+ created_at?: string;
7197
+ delivery_date?: string | null;
7198
+ delivery_location_id?: string | null;
7199
+ id?: string;
7200
+ notes?: string | null;
7201
+ order_id?: string;
7202
+ shipment_number?: number;
7203
+ shipped_at?: string | null;
7204
+ status?: string;
7205
+ updated_at?: string;
7206
+ };
7207
+ Relationships: [{
7208
+ foreignKeyName: "order_shipments_carrier_id_fkey";
7209
+ columns: ["carrier_id"];
7210
+ isOneToOne: false;
7211
+ referencedRelation: "carriers";
7212
+ referencedColumns: ["id"];
7213
+ }, {
7214
+ foreignKeyName: "order_shipments_order_id_fkey";
7215
+ columns: ["order_id"];
7216
+ isOneToOne: false;
7217
+ referencedRelation: "orders";
7218
+ referencedColumns: ["id"];
7219
+ }];
7220
+ };
7182
7221
  orders: {
7183
7222
  Row: {
7184
7223
  created_at: string;
@@ -7186,8 +7225,9 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7186
7225
  customer_id: string | null;
7187
7226
  customer_name: string;
7188
7227
  deleted_at: string | null;
7189
- delivery_date: string;
7228
+ delivery_date: string | null;
7190
7229
  id: string;
7230
+ is_reservation: boolean;
7191
7231
  notes: string | null;
7192
7232
  order_date: string;
7193
7233
  order_number: string;
@@ -7204,8 +7244,9 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7204
7244
  customer_id?: string | null;
7205
7245
  customer_name?: string;
7206
7246
  deleted_at?: string | null;
7207
- delivery_date: string;
7247
+ delivery_date?: string | null;
7208
7248
  id?: string;
7249
+ is_reservation?: boolean;
7209
7250
  notes?: string | null;
7210
7251
  order_date?: string;
7211
7252
  order_number: string;
@@ -7222,8 +7263,9 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7222
7263
  customer_id?: string | null;
7223
7264
  customer_name?: string;
7224
7265
  deleted_at?: string | null;
7225
- delivery_date?: string;
7266
+ delivery_date?: string | null;
7226
7267
  id?: string;
7268
+ is_reservation?: boolean;
7227
7269
  notes?: string | null;
7228
7270
  order_date?: string;
7229
7271
  order_number?: string;
@@ -7365,6 +7407,63 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7365
7407
  };
7366
7408
  Relationships: [];
7367
7409
  };
7410
+ product_bom_items: {
7411
+ Row: {
7412
+ component_product_id: string | null;
7413
+ component_trade_item_floriday_id: string | null;
7414
+ created_at: string;
7415
+ id: string;
7416
+ notes: string | null;
7417
+ parent_product_id: string | null;
7418
+ parent_trade_item_floriday_id: string | null;
7419
+ quantity: number;
7420
+ sort_order: number;
7421
+ tenant_id: string;
7422
+ unit: string;
7423
+ updated_at: string;
7424
+ };
7425
+ Insert: {
7426
+ component_product_id?: string | null;
7427
+ component_trade_item_floriday_id?: string | null;
7428
+ created_at?: string;
7429
+ id?: string;
7430
+ notes?: string | null;
7431
+ parent_product_id?: string | null;
7432
+ parent_trade_item_floriday_id?: string | null;
7433
+ quantity?: number;
7434
+ sort_order?: number;
7435
+ tenant_id: string;
7436
+ unit?: string;
7437
+ updated_at?: string;
7438
+ };
7439
+ Update: {
7440
+ component_product_id?: string | null;
7441
+ component_trade_item_floriday_id?: string | null;
7442
+ created_at?: string;
7443
+ id?: string;
7444
+ notes?: string | null;
7445
+ parent_product_id?: string | null;
7446
+ parent_trade_item_floriday_id?: string | null;
7447
+ quantity?: number;
7448
+ sort_order?: number;
7449
+ tenant_id?: string;
7450
+ unit?: string;
7451
+ updated_at?: string;
7452
+ };
7453
+ Relationships: [{
7454
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
7455
+ columns: ["component_product_id"];
7456
+ isOneToOne: false;
7457
+ referencedRelation: "products";
7458
+ referencedColumns: ["id"];
7459
+ }, {
7460
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
7461
+ columns: ["parent_product_id"];
7462
+ isOneToOne: false;
7463
+ referencedRelation: "products";
7464
+ referencedColumns: ["id"];
7465
+ }];
7466
+ };
7368
7467
  product_categories: {
7369
7468
  Row: {
7370
7469
  color: string;
@@ -7470,6 +7569,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7470
7569
  id: string;
7471
7570
  product_group_id: string;
7472
7571
  quantity: number;
7572
+ sort_order: number;
7473
7573
  trade_item_id: string;
7474
7574
  };
7475
7575
  Insert: {
@@ -7477,6 +7577,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7477
7577
  id?: string;
7478
7578
  product_group_id: string;
7479
7579
  quantity?: number;
7580
+ sort_order?: number;
7480
7581
  trade_item_id: string;
7481
7582
  };
7482
7583
  Update: {
@@ -7484,6 +7585,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7484
7585
  id?: string;
7485
7586
  product_group_id?: string;
7486
7587
  quantity?: number;
7588
+ sort_order?: number;
7487
7589
  trade_item_id?: string;
7488
7590
  };
7489
7591
  Relationships: [{
@@ -7498,6 +7600,8 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7498
7600
  Row: {
7499
7601
  created_at: string;
7500
7602
  description: string | null;
7603
+ head_product_id: string | null;
7604
+ head_trade_item_floriday_id: string | null;
7501
7605
  id: string;
7502
7606
  is_active: boolean;
7503
7607
  name: string;
@@ -7507,6 +7611,8 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7507
7611
  Insert: {
7508
7612
  created_at?: string;
7509
7613
  description?: string | null;
7614
+ head_product_id?: string | null;
7615
+ head_trade_item_floriday_id?: string | null;
7510
7616
  id?: string;
7511
7617
  is_active?: boolean;
7512
7618
  name: string;
@@ -7516,21 +7622,126 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7516
7622
  Update: {
7517
7623
  created_at?: string;
7518
7624
  description?: string | null;
7625
+ head_product_id?: string | null;
7626
+ head_trade_item_floriday_id?: string | null;
7519
7627
  id?: string;
7520
7628
  is_active?: boolean;
7521
7629
  name?: string;
7522
7630
  tenant_id?: string;
7523
7631
  updated_at?: string;
7524
7632
  };
7633
+ Relationships: [{
7634
+ foreignKeyName: "product_groups_head_product_id_fkey";
7635
+ columns: ["head_product_id"];
7636
+ isOneToOne: false;
7637
+ referencedRelation: "products";
7638
+ referencedColumns: ["id"];
7639
+ }];
7640
+ };
7641
+ product_load_settings: {
7642
+ Row: {
7643
+ created_at: string;
7644
+ id: string;
7645
+ is_package: boolean;
7646
+ layers_per_load_carrier: number | null;
7647
+ load_carrier: string | null;
7648
+ package_id: string | null;
7649
+ package_label: string | null;
7650
+ packages_per_layer: number | null;
7651
+ product_id: string | null;
7652
+ tenant_id: string;
7653
+ trade_item_floriday_id: string | null;
7654
+ units_per_package: number | null;
7655
+ updated_at: string;
7656
+ };
7657
+ Insert: {
7658
+ created_at?: string;
7659
+ id?: string;
7660
+ is_package?: boolean;
7661
+ layers_per_load_carrier?: number | null;
7662
+ load_carrier?: string | null;
7663
+ package_id?: string | null;
7664
+ package_label?: string | null;
7665
+ packages_per_layer?: number | null;
7666
+ product_id?: string | null;
7667
+ tenant_id: string;
7668
+ trade_item_floriday_id?: string | null;
7669
+ units_per_package?: number | null;
7670
+ updated_at?: string;
7671
+ };
7672
+ Update: {
7673
+ created_at?: string;
7674
+ id?: string;
7675
+ is_package?: boolean;
7676
+ layers_per_load_carrier?: number | null;
7677
+ load_carrier?: string | null;
7678
+ package_id?: string | null;
7679
+ package_label?: string | null;
7680
+ packages_per_layer?: number | null;
7681
+ product_id?: string | null;
7682
+ tenant_id?: string;
7683
+ trade_item_floriday_id?: string | null;
7684
+ units_per_package?: number | null;
7685
+ updated_at?: string;
7686
+ };
7687
+ Relationships: [{
7688
+ foreignKeyName: "product_load_settings_package_id_fkey";
7689
+ columns: ["package_id"];
7690
+ isOneToOne: false;
7691
+ referencedRelation: "packages";
7692
+ referencedColumns: ["id"];
7693
+ }, {
7694
+ foreignKeyName: "product_load_settings_product_id_fkey";
7695
+ columns: ["product_id"];
7696
+ isOneToOne: false;
7697
+ referencedRelation: "products";
7698
+ referencedColumns: ["id"];
7699
+ }];
7700
+ };
7701
+ product_merge_log: {
7702
+ Row: {
7703
+ canonical_product_id: string | null;
7704
+ id: string;
7705
+ merged_at: string;
7706
+ merged_from_id: string;
7707
+ notes: string | null;
7708
+ snapshot: import("../integrations/supabase/types").Json;
7709
+ source_table: string;
7710
+ status: string;
7711
+ };
7712
+ Insert: {
7713
+ canonical_product_id?: string | null;
7714
+ id?: string;
7715
+ merged_at?: string;
7716
+ merged_from_id: string;
7717
+ notes?: string | null;
7718
+ snapshot?: import("../integrations/supabase/types").Json;
7719
+ source_table: string;
7720
+ status?: string;
7721
+ };
7722
+ Update: {
7723
+ canonical_product_id?: string | null;
7724
+ id?: string;
7725
+ merged_at?: string;
7726
+ merged_from_id?: string;
7727
+ notes?: string | null;
7728
+ snapshot?: import("../integrations/supabase/types").Json;
7729
+ source_table?: string;
7730
+ status?: string;
7731
+ };
7525
7732
  Relationships: [];
7526
7733
  };
7527
7734
  products: {
7528
7735
  Row: {
7736
+ article_number: string | null;
7529
7737
  barcode: string | null;
7530
7738
  batch: string;
7531
7739
  crates_per_layer: number;
7532
7740
  created_at: string;
7533
7741
  custom_fields: import("../integrations/supabase/types").Json;
7742
+ floriday_active: boolean;
7743
+ floriday_payload: import("../integrations/supabase/types").Json;
7744
+ floriday_trade_item_id: string | null;
7534
7745
  id: string;
7535
7746
  image_url: string | null;
7536
7747
  incoming_quantity: number;
@@ -7549,11 +7760,15 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7549
7760
  weight: string | null;
7550
7761
  };
7551
7762
  Insert: {
7763
+ article_number?: string | null;
7552
7764
  barcode?: string | null;
7553
7765
  batch: string;
7554
7766
  crates_per_layer?: number;
7555
7767
  created_at?: string;
7556
7768
  custom_fields?: import("../integrations/supabase/types").Json;
7769
+ floriday_active?: boolean;
7770
+ floriday_payload?: import("../integrations/supabase/types").Json;
7771
+ floriday_trade_item_id?: string | null;
7557
7772
  id?: string;
7558
7773
  image_url?: string | null;
7559
7774
  incoming_quantity?: number;
@@ -7572,11 +7787,15 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7572
7787
  weight?: string | null;
7573
7788
  };
7574
7789
  Update: {
7790
+ article_number?: string | null;
7575
7791
  barcode?: string | null;
7576
7792
  batch?: string;
7577
7793
  crates_per_layer?: number;
7578
7794
  created_at?: string;
7579
7795
  custom_fields?: import("../integrations/supabase/types").Json;
7796
+ floriday_active?: boolean;
7797
+ floriday_payload?: import("../integrations/supabase/types").Json;
7798
+ floriday_trade_item_id?: string | null;
7580
7799
  id?: string;
7581
7800
  image_url?: string | null;
7582
7801
  incoming_quantity?: number;
@@ -8485,8 +8704,10 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
8485
8704
  order_id: string | null;
8486
8705
  order_item_id: string | null;
8487
8706
  order_source: string | null;
8707
+ parent_trade_item_key: string | null;
8488
8708
  physical_after: number | null;
8489
8709
  physical_before: number | null;
8710
+ production_batch_id: string | null;
8490
8711
  qty_delta: number;
8491
8712
  reason: string | null;
8492
8713
  reserved_after: number | null;
@@ -8502,8 +8723,10 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
8502
8723
  order_id?: string | null;
8503
8724
  order_item_id?: string | null;
8504
8725
  order_source?: string | null;
8726
+ parent_trade_item_key?: string | null;
8505
8727
  physical_after?: number | null;
8506
8728
  physical_before?: number | null;
8729
+ production_batch_id?: string | null;
8507
8730
  qty_delta: number;
8508
8731
  reason?: string | null;
8509
8732
  reserved_after?: number | null;
@@ -8519,8 +8742,10 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
8519
8742
  order_id?: string | null;
8520
8743
  order_item_id?: string | null;
8521
8744
  order_source?: string | null;
8745
+ parent_trade_item_key?: string | null;
8522
8746
  physical_after?: number | null;
8523
8747
  physical_before?: number | null;
8748
+ production_batch_id?: string | null;
8524
8749
  qty_delta?: number;
8525
8750
  reason?: string | null;
8526
8751
  reserved_after?: number | null;
@@ -8979,7 +9204,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
8979
9204
  twinfield_connections: {
8980
9205
  Row: {
8981
9206
  access_token: string | null;
8982
- client_id: string;
9207
+ client_id: string | null;
8983
9208
  client_secret: string | null;
8984
9209
  cluster_uri: string | null;
8985
9210
  company_code: string | null;
@@ -8991,7 +9216,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
8991
9216
  is_active: boolean;
8992
9217
  label: string | null;
8993
9218
  office_code: string | null;
8994
- redirect_uri: string;
9219
+ redirect_uri: string | null;
8995
9220
  refresh_token: string | null;
8996
9221
  token_expires_at: string | null;
8997
9222
  updated_at: string;
@@ -8999,7 +9224,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
8999
9224
  };
9000
9225
  Insert: {
9001
9226
  access_token?: string | null;
9002
- client_id: string;
9227
+ client_id?: string | null;
9003
9228
  client_secret?: string | null;
9004
9229
  cluster_uri?: string | null;
9005
9230
  company_code?: string | null;
@@ -9011,7 +9236,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
9011
9236
  is_active?: boolean;
9012
9237
  label?: string | null;
9013
9238
  office_code?: string | null;
9014
- redirect_uri: string;
9239
+ redirect_uri?: string | null;
9015
9240
  refresh_token?: string | null;
9016
9241
  token_expires_at?: string | null;
9017
9242
  updated_at?: string;
@@ -9019,7 +9244,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
9019
9244
  };
9020
9245
  Update: {
9021
9246
  access_token?: string | null;
9022
- client_id?: string;
9247
+ client_id?: string | null;
9023
9248
  client_secret?: string | null;
9024
9249
  cluster_uri?: string | null;
9025
9250
  company_code?: string | null;
@@ -9031,7 +9256,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
9031
9256
  is_active?: boolean;
9032
9257
  label?: string | null;
9033
9258
  office_code?: string | null;
9034
- redirect_uri?: string;
9259
+ redirect_uri?: string | null;
9035
9260
  refresh_token?: string | null;
9036
9261
  token_expires_at?: string | null;
9037
9262
  updated_at?: string;
@@ -10226,25 +10451,6 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10226
10451
  };
10227
10452
  Relationships: [];
10228
10453
  };
10229
- floriday_customer_discounts: {
10230
- Row: {
10231
- base_price: number | null;
10232
- buyer_organization_id: string | null;
10233
- currency: string | null;
10234
- discount_type: string | null;
10235
- discount_value: number | null;
10236
- min_quantity: number | null;
10237
- net_price: number | null;
10238
- product_group_id: string | null;
10239
- raw: import("../integrations/supabase/types").Json | null;
10240
- source: string | null;
10241
- source_id: string | null;
10242
- trade_item_id: string | null;
10243
- valid_from: string | null;
10244
- valid_until: string | null;
10245
- };
10246
- Relationships: [];
10247
- };
10248
10454
  local_customer_discounts: {
10249
10455
  Row: {
10250
10456
  base_price: number | null;
@@ -10548,6 +10754,13 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10548
10754
  };
10549
10755
  Returns: number;
10550
10756
  };
10757
+ _migrate_rewrite_stock_key: {
10758
+ Args: {
10759
+ _from_key: string;
10760
+ _to_key: string;
10761
+ };
10762
+ Returns: undefined;
10763
+ };
10551
10764
  afh_city_code: {
10552
10765
  Args: {
10553
10766
  _city: string;
@@ -10663,6 +10876,28 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10663
10876
  Args: never;
10664
10877
  Returns: undefined;
10665
10878
  };
10879
+ consume_bom_for_production: {
10880
+ Args: {
10881
+ p_connection_id: string;
10882
+ p_parent_id: string;
10883
+ p_parent_key: string;
10884
+ p_parent_kind: string;
10885
+ p_quantity: number;
10886
+ p_user_id: string;
10887
+ };
10888
+ Returns: import("../integrations/supabase/types").Json;
10889
+ } | {
10890
+ Args: {
10891
+ p_batch_id?: string;
10892
+ p_connection_id: string;
10893
+ p_parent_id: string;
10894
+ p_parent_key: string;
10895
+ p_parent_kind: string;
10896
+ p_quantity: number;
10897
+ p_user_id: string;
10898
+ };
10899
+ Returns: import("../integrations/supabase/types").Json;
10900
+ };
10666
10901
  consume_floriday_rate_limit: {
10667
10902
  Args: {
10668
10903
  p_bucket: string;
@@ -10714,6 +10949,13 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10714
10949
  table_name: string;
10715
10950
  }[];
10716
10951
  };
10952
+ delete_samenstelling: {
10953
+ Args: {
10954
+ p_parent_id: string;
10955
+ p_parent_kind: string;
10956
+ };
10957
+ Returns: import("../integrations/supabase/types").Json;
10958
+ };
10717
10959
  dispatch_carrier_signups_sql: {
10718
10960
  Args: {
10719
10961
  _catchup?: string;
@@ -10874,19 +11116,6 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10874
11116
  resource: string;
10875
11117
  }[];
10876
11118
  };
10877
- get_floriday_agreements_active: {
10878
- Args: {
10879
- p_on_date?: string;
10880
- };
10881
- Returns: {
10882
- buyer_organization_id: string;
10883
- data: import("../integrations/supabase/types").Json;
10884
- floriday_id: string;
10885
- status: string;
10886
- valid_from: string;
10887
- valid_until: string;
10888
- }[];
10889
- };
10890
11119
  get_floriday_clock_supplies_window: {
10891
11120
  Args: {
10892
11121
  p_from: string;
@@ -10959,6 +11188,21 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10959
11188
  minutes_since_success: number;
10960
11189
  }[];
10961
11190
  };
11191
+ get_group_allocation_keys: {
11192
+ Args: {
11193
+ p_product_id: string;
11194
+ };
11195
+ Returns: {
11196
+ k: string;
11197
+ ord: number;
11198
+ }[];
11199
+ };
11200
+ get_group_head_key: {
11201
+ Args: {
11202
+ p_group_id: string;
11203
+ };
11204
+ Returns: string;
11205
+ };
10962
11206
  get_offer_by_link_code: {
10963
11207
  Args: {
10964
11208
  p_code: string;
@@ -11069,6 +11313,19 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
11069
11313
  };
11070
11314
  Returns: undefined;
11071
11315
  };
11316
+ mark_shipment_shipped: {
11317
+ Args: {
11318
+ p_shipment_id: string;
11319
+ };
11320
+ Returns: undefined;
11321
+ };
11322
+ merge_products: {
11323
+ Args: {
11324
+ _canonical: string;
11325
+ _loser: string;
11326
+ };
11327
+ Returns: undefined;
11328
+ };
11072
11329
  next_manufacture_partij: {
11073
11330
  Args: {
11074
11331
  _tenant_id: string;
@@ -11153,6 +11410,14 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
11153
11410
  };
11154
11411
  Returns: undefined;
11155
11412
  };
11413
+ produce_designed_product: {
11414
+ Args: {
11415
+ p_parent_id: string;
11416
+ p_parent_kind: string;
11417
+ p_quantity: number;
11418
+ };
11419
+ Returns: import("../integrations/supabase/types").Json;
11420
+ };
11156
11421
  promote_trade_item_key: {
11157
11422
  Args: {
11158
11423
  p_new: string;
@@ -11160,6 +11425,10 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
11160
11425
  };
11161
11426
  Returns: undefined;
11162
11427
  };
11428
+ recompute_all_reserved_stock: {
11429
+ Args: never;
11430
+ Returns: undefined;
11431
+ };
11163
11432
  recompute_order_status: {
11164
11433
  Args: {
11165
11434
  p_order_id: string;
@@ -11209,27 +11478,45 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
11209
11478
  };
11210
11479
  Returns: undefined;
11211
11480
  };
11481
+ resolve_group_allocation: {
11482
+ Args: {
11483
+ _needed: number;
11484
+ _product_group_id: string;
11485
+ };
11486
+ Returns: {
11487
+ allocated: number;
11488
+ trade_item_id: string;
11489
+ }[];
11490
+ };
11491
+ resolve_group_member_stock_key: {
11492
+ Args: {
11493
+ p_trade_item_id: string;
11494
+ };
11495
+ Returns: string;
11496
+ };
11212
11497
  resolve_product_id_for_item: {
11213
11498
  Args: {
11214
11499
  p_product_name: string;
11215
11500
  };
11216
11501
  Returns: string;
11217
11502
  };
11218
- schedule_floriday_additional_services_sync: {
11503
+ resolve_stock_trade_item_key: {
11219
11504
  Args: {
11220
- p_apikey: string;
11221
- p_url: string;
11505
+ p_product_id: string;
11222
11506
  };
11223
- Returns: number;
11507
+ Returns: string;
11224
11508
  };
11225
- schedule_floriday_agreement_calloffs_sync: {
11509
+ reverse_production: {
11226
11510
  Args: {
11227
- p_apikey: string;
11228
- p_url: string;
11511
+ p_connection_id?: string;
11512
+ p_parent_key: string;
11513
+ p_quantity: number;
11514
+ p_reason?: string;
11515
+ p_user_id?: string;
11229
11516
  };
11230
- Returns: number;
11517
+ Returns: import("../integrations/supabase/types").Json;
11231
11518
  };
11232
- schedule_floriday_agreements_sync: {
11519
+ schedule_floriday_additional_services_sync: {
11233
11520
  Args: {
11234
11521
  p_apikey: string;
11235
11522
  p_url: string;
@@ -14951,106 +15238,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
14951
15238
  updated_at?: string;
14952
15239
  };
14953
15240
  Relationships: [{
14954
- foreignKeyName: "floriday_additional_services_cache_connection_id_fkey";
14955
- columns: ["connection_id"];
14956
- isOneToOne: false;
14957
- referencedRelation: "floriday_connections";
14958
- referencedColumns: ["id"];
14959
- }];
14960
- };
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";
15241
+ foreignKeyName: "floriday_additional_services_cache_connection_id_fkey";
15054
15242
  columns: ["connection_id"];
15055
15243
  isOneToOne: false;
15056
15244
  referencedRelation: "floriday_connections";
@@ -16554,6 +16742,45 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
16554
16742
  referencedColumns: ["id"];
16555
16743
  }];
16556
16744
  };
16745
+ floriday_trade_settings_customers_cache: {
16746
+ Row: {
16747
+ connection_id: string;
16748
+ data: import("../integrations/supabase/types").Json;
16749
+ fetched_at: string;
16750
+ floriday_id: string;
16751
+ id: string;
16752
+ is_deleted: boolean;
16753
+ sequence_number: number;
16754
+ updated_at: string;
16755
+ };
16756
+ Insert: {
16757
+ connection_id: string;
16758
+ data: import("../integrations/supabase/types").Json;
16759
+ fetched_at?: string;
16760
+ floriday_id: string;
16761
+ id?: string;
16762
+ is_deleted?: boolean;
16763
+ sequence_number?: number;
16764
+ updated_at?: string;
16765
+ };
16766
+ Update: {
16767
+ connection_id?: string;
16768
+ data?: import("../integrations/supabase/types").Json;
16769
+ fetched_at?: string;
16770
+ floriday_id?: string;
16771
+ id?: string;
16772
+ is_deleted?: boolean;
16773
+ sequence_number?: number;
16774
+ updated_at?: string;
16775
+ };
16776
+ Relationships: [{
16777
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
16778
+ columns: ["connection_id"];
16779
+ isOneToOne: false;
16780
+ referencedRelation: "floriday_connections";
16781
+ referencedColumns: ["id"];
16782
+ }];
16783
+ };
16557
16784
  floriday_trips_cache: {
16558
16785
  Row: {
16559
16786
  carrier_organization_id: string | null;
@@ -18726,6 +18953,105 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
18726
18953
  };
18727
18954
  Relationships: [];
18728
18955
  };
18956
+ order_shipment_items: {
18957
+ Row: {
18958
+ created_at: string;
18959
+ id: string;
18960
+ order_item_id: string;
18961
+ product_id: string | null;
18962
+ product_name: string;
18963
+ quantity: number;
18964
+ shipment_id: string;
18965
+ updated_at: string;
18966
+ };
18967
+ Insert: {
18968
+ created_at?: string;
18969
+ id?: string;
18970
+ order_item_id: string;
18971
+ product_id?: string | null;
18972
+ product_name: string;
18973
+ quantity: number;
18974
+ shipment_id: string;
18975
+ updated_at?: string;
18976
+ };
18977
+ Update: {
18978
+ created_at?: string;
18979
+ id?: string;
18980
+ order_item_id?: string;
18981
+ product_id?: string | null;
18982
+ product_name?: string;
18983
+ quantity?: number;
18984
+ shipment_id?: string;
18985
+ updated_at?: string;
18986
+ };
18987
+ Relationships: [{
18988
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
18989
+ columns: ["order_item_id"];
18990
+ isOneToOne: false;
18991
+ referencedRelation: "order_items";
18992
+ referencedColumns: ["id"];
18993
+ }, {
18994
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
18995
+ columns: ["shipment_id"];
18996
+ isOneToOne: false;
18997
+ referencedRelation: "order_shipments";
18998
+ referencedColumns: ["id"];
18999
+ }];
19000
+ };
19001
+ order_shipments: {
19002
+ Row: {
19003
+ carrier_id: string | null;
19004
+ created_at: string;
19005
+ delivery_date: string | null;
19006
+ delivery_location_id: string | null;
19007
+ id: string;
19008
+ notes: string | null;
19009
+ order_id: string;
19010
+ shipment_number: number;
19011
+ shipped_at: string | null;
19012
+ status: string;
19013
+ updated_at: string;
19014
+ };
19015
+ Insert: {
19016
+ carrier_id?: string | null;
19017
+ created_at?: string;
19018
+ delivery_date?: string | null;
19019
+ delivery_location_id?: string | null;
19020
+ id?: string;
19021
+ notes?: string | null;
19022
+ order_id: string;
19023
+ shipment_number: number;
19024
+ shipped_at?: string | null;
19025
+ status?: string;
19026
+ updated_at?: string;
19027
+ };
19028
+ Update: {
19029
+ carrier_id?: string | null;
19030
+ created_at?: string;
19031
+ delivery_date?: string | null;
19032
+ delivery_location_id?: string | null;
19033
+ id?: string;
19034
+ notes?: string | null;
19035
+ order_id?: string;
19036
+ shipment_number?: number;
19037
+ shipped_at?: string | null;
19038
+ status?: string;
19039
+ updated_at?: string;
19040
+ };
19041
+ Relationships: [{
19042
+ foreignKeyName: "order_shipments_carrier_id_fkey";
19043
+ columns: ["carrier_id"];
19044
+ isOneToOne: false;
19045
+ referencedRelation: "carriers";
19046
+ referencedColumns: ["id"];
19047
+ }, {
19048
+ foreignKeyName: "order_shipments_order_id_fkey";
19049
+ columns: ["order_id"];
19050
+ isOneToOne: false;
19051
+ referencedRelation: "orders";
19052
+ referencedColumns: ["id"];
19053
+ }];
19054
+ };
18729
19055
  orders: {
18730
19056
  Row: {
18731
19057
  created_at: string;
@@ -18733,8 +19059,9 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
18733
19059
  customer_id: string | null;
18734
19060
  customer_name: string;
18735
19061
  deleted_at: string | null;
18736
- delivery_date: string;
19062
+ delivery_date: string | null;
18737
19063
  id: string;
19064
+ is_reservation: boolean;
18738
19065
  notes: string | null;
18739
19066
  order_date: string;
18740
19067
  order_number: string;
@@ -18751,8 +19078,9 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
18751
19078
  customer_id?: string | null;
18752
19079
  customer_name?: string;
18753
19080
  deleted_at?: string | null;
18754
- delivery_date: string;
19081
+ delivery_date?: string | null;
18755
19082
  id?: string;
19083
+ is_reservation?: boolean;
18756
19084
  notes?: string | null;
18757
19085
  order_date?: string;
18758
19086
  order_number: string;
@@ -18769,8 +19097,9 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
18769
19097
  customer_id?: string | null;
18770
19098
  customer_name?: string;
18771
19099
  deleted_at?: string | null;
18772
- delivery_date?: string;
19100
+ delivery_date?: string | null;
18773
19101
  id?: string;
19102
+ is_reservation?: boolean;
18774
19103
  notes?: string | null;
18775
19104
  order_date?: string;
18776
19105
  order_number?: string;
@@ -18912,6 +19241,63 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
18912
19241
  };
18913
19242
  Relationships: [];
18914
19243
  };
19244
+ product_bom_items: {
19245
+ Row: {
19246
+ component_product_id: string | null;
19247
+ component_trade_item_floriday_id: string | null;
19248
+ created_at: string;
19249
+ id: string;
19250
+ notes: string | null;
19251
+ parent_product_id: string | null;
19252
+ parent_trade_item_floriday_id: string | null;
19253
+ quantity: number;
19254
+ sort_order: number;
19255
+ tenant_id: string;
19256
+ unit: string;
19257
+ updated_at: string;
19258
+ };
19259
+ Insert: {
19260
+ component_product_id?: string | null;
19261
+ component_trade_item_floriday_id?: string | null;
19262
+ created_at?: string;
19263
+ id?: string;
19264
+ notes?: string | null;
19265
+ parent_product_id?: string | null;
19266
+ parent_trade_item_floriday_id?: string | null;
19267
+ quantity?: number;
19268
+ sort_order?: number;
19269
+ tenant_id: string;
19270
+ unit?: string;
19271
+ updated_at?: string;
19272
+ };
19273
+ Update: {
19274
+ component_product_id?: string | null;
19275
+ component_trade_item_floriday_id?: string | null;
19276
+ created_at?: string;
19277
+ id?: string;
19278
+ notes?: string | null;
19279
+ parent_product_id?: string | null;
19280
+ parent_trade_item_floriday_id?: string | null;
19281
+ quantity?: number;
19282
+ sort_order?: number;
19283
+ tenant_id?: string;
19284
+ unit?: string;
19285
+ updated_at?: string;
19286
+ };
19287
+ Relationships: [{
19288
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
19289
+ columns: ["component_product_id"];
19290
+ isOneToOne: false;
19291
+ referencedRelation: "products";
19292
+ referencedColumns: ["id"];
19293
+ }, {
19294
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
19295
+ columns: ["parent_product_id"];
19296
+ isOneToOne: false;
19297
+ referencedRelation: "products";
19298
+ referencedColumns: ["id"];
19299
+ }];
19300
+ };
18915
19301
  product_categories: {
18916
19302
  Row: {
18917
19303
  color: string;
@@ -19017,6 +19403,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19017
19403
  id: string;
19018
19404
  product_group_id: string;
19019
19405
  quantity: number;
19406
+ sort_order: number;
19020
19407
  trade_item_id: string;
19021
19408
  };
19022
19409
  Insert: {
@@ -19024,6 +19411,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19024
19411
  id?: string;
19025
19412
  product_group_id: string;
19026
19413
  quantity?: number;
19414
+ sort_order?: number;
19027
19415
  trade_item_id: string;
19028
19416
  };
19029
19417
  Update: {
@@ -19031,6 +19419,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19031
19419
  id?: string;
19032
19420
  product_group_id?: string;
19033
19421
  quantity?: number;
19422
+ sort_order?: number;
19034
19423
  trade_item_id?: string;
19035
19424
  };
19036
19425
  Relationships: [{
@@ -19045,6 +19434,8 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19045
19434
  Row: {
19046
19435
  created_at: string;
19047
19436
  description: string | null;
19437
+ head_product_id: string | null;
19438
+ head_trade_item_floriday_id: string | null;
19048
19439
  id: string;
19049
19440
  is_active: boolean;
19050
19441
  name: string;
@@ -19054,6 +19445,8 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19054
19445
  Insert: {
19055
19446
  created_at?: string;
19056
19447
  description?: string | null;
19448
+ head_product_id?: string | null;
19449
+ head_trade_item_floriday_id?: string | null;
19057
19450
  id?: string;
19058
19451
  is_active?: boolean;
19059
19452
  name: string;
@@ -19063,21 +19456,126 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19063
19456
  Update: {
19064
19457
  created_at?: string;
19065
19458
  description?: string | null;
19459
+ head_product_id?: string | null;
19460
+ head_trade_item_floriday_id?: string | null;
19066
19461
  id?: string;
19067
19462
  is_active?: boolean;
19068
19463
  name?: string;
19069
19464
  tenant_id?: string;
19070
19465
  updated_at?: string;
19071
19466
  };
19467
+ Relationships: [{
19468
+ foreignKeyName: "product_groups_head_product_id_fkey";
19469
+ columns: ["head_product_id"];
19470
+ isOneToOne: false;
19471
+ referencedRelation: "products";
19472
+ referencedColumns: ["id"];
19473
+ }];
19474
+ };
19475
+ product_load_settings: {
19476
+ Row: {
19477
+ created_at: string;
19478
+ id: string;
19479
+ is_package: boolean;
19480
+ layers_per_load_carrier: number | null;
19481
+ load_carrier: string | null;
19482
+ package_id: string | null;
19483
+ package_label: string | null;
19484
+ packages_per_layer: number | null;
19485
+ product_id: string | null;
19486
+ tenant_id: string;
19487
+ trade_item_floriday_id: string | null;
19488
+ units_per_package: number | null;
19489
+ updated_at: string;
19490
+ };
19491
+ Insert: {
19492
+ created_at?: string;
19493
+ id?: string;
19494
+ is_package?: boolean;
19495
+ layers_per_load_carrier?: number | null;
19496
+ load_carrier?: string | null;
19497
+ package_id?: string | null;
19498
+ package_label?: string | null;
19499
+ packages_per_layer?: number | null;
19500
+ product_id?: string | null;
19501
+ tenant_id: string;
19502
+ trade_item_floriday_id?: string | null;
19503
+ units_per_package?: number | null;
19504
+ updated_at?: string;
19505
+ };
19506
+ Update: {
19507
+ created_at?: string;
19508
+ id?: string;
19509
+ is_package?: boolean;
19510
+ layers_per_load_carrier?: number | null;
19511
+ load_carrier?: string | null;
19512
+ package_id?: string | null;
19513
+ package_label?: string | null;
19514
+ packages_per_layer?: number | null;
19515
+ product_id?: string | null;
19516
+ tenant_id?: string;
19517
+ trade_item_floriday_id?: string | null;
19518
+ units_per_package?: number | null;
19519
+ updated_at?: string;
19520
+ };
19521
+ Relationships: [{
19522
+ foreignKeyName: "product_load_settings_package_id_fkey";
19523
+ columns: ["package_id"];
19524
+ isOneToOne: false;
19525
+ referencedRelation: "packages";
19526
+ referencedColumns: ["id"];
19527
+ }, {
19528
+ foreignKeyName: "product_load_settings_product_id_fkey";
19529
+ columns: ["product_id"];
19530
+ isOneToOne: false;
19531
+ referencedRelation: "products";
19532
+ referencedColumns: ["id"];
19533
+ }];
19534
+ };
19535
+ product_merge_log: {
19536
+ Row: {
19537
+ canonical_product_id: string | null;
19538
+ id: string;
19539
+ merged_at: string;
19540
+ merged_from_id: string;
19541
+ notes: string | null;
19542
+ snapshot: import("../integrations/supabase/types").Json;
19543
+ source_table: string;
19544
+ status: string;
19545
+ };
19546
+ Insert: {
19547
+ canonical_product_id?: string | null;
19548
+ id?: string;
19549
+ merged_at?: string;
19550
+ merged_from_id: string;
19551
+ notes?: string | null;
19552
+ snapshot?: import("../integrations/supabase/types").Json;
19553
+ source_table: string;
19554
+ status?: string;
19555
+ };
19556
+ Update: {
19557
+ canonical_product_id?: string | null;
19558
+ id?: string;
19559
+ merged_at?: string;
19560
+ merged_from_id?: string;
19561
+ notes?: string | null;
19562
+ snapshot?: import("../integrations/supabase/types").Json;
19563
+ source_table?: string;
19564
+ status?: string;
19565
+ };
19072
19566
  Relationships: [];
19073
19567
  };
19074
19568
  products: {
19075
19569
  Row: {
19570
+ article_number: string | null;
19076
19571
  barcode: string | null;
19077
19572
  batch: string;
19078
19573
  crates_per_layer: number;
19079
19574
  created_at: string;
19080
19575
  custom_fields: import("../integrations/supabase/types").Json;
19576
+ floriday_active: boolean;
19577
+ floriday_payload: import("../integrations/supabase/types").Json;
19578
+ floriday_trade_item_id: string | null;
19081
19579
  id: string;
19082
19580
  image_url: string | null;
19083
19581
  incoming_quantity: number;
@@ -19096,11 +19594,15 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19096
19594
  weight: string | null;
19097
19595
  };
19098
19596
  Insert: {
19597
+ article_number?: string | null;
19099
19598
  barcode?: string | null;
19100
19599
  batch: string;
19101
19600
  crates_per_layer?: number;
19102
19601
  created_at?: string;
19103
19602
  custom_fields?: import("../integrations/supabase/types").Json;
19603
+ floriday_active?: boolean;
19604
+ floriday_payload?: import("../integrations/supabase/types").Json;
19605
+ floriday_trade_item_id?: string | null;
19104
19606
  id?: string;
19105
19607
  image_url?: string | null;
19106
19608
  incoming_quantity?: number;
@@ -19119,11 +19621,15 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19119
19621
  weight?: string | null;
19120
19622
  };
19121
19623
  Update: {
19624
+ article_number?: string | null;
19122
19625
  barcode?: string | null;
19123
19626
  batch?: string;
19124
19627
  crates_per_layer?: number;
19125
19628
  created_at?: string;
19126
19629
  custom_fields?: import("../integrations/supabase/types").Json;
19630
+ floriday_active?: boolean;
19631
+ floriday_payload?: import("../integrations/supabase/types").Json;
19632
+ floriday_trade_item_id?: string | null;
19127
19633
  id?: string;
19128
19634
  image_url?: string | null;
19129
19635
  incoming_quantity?: number;
@@ -20032,8 +20538,10 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20032
20538
  order_id: string | null;
20033
20539
  order_item_id: string | null;
20034
20540
  order_source: string | null;
20541
+ parent_trade_item_key: string | null;
20035
20542
  physical_after: number | null;
20036
20543
  physical_before: number | null;
20544
+ production_batch_id: string | null;
20037
20545
  qty_delta: number;
20038
20546
  reason: string | null;
20039
20547
  reserved_after: number | null;
@@ -20049,8 +20557,10 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20049
20557
  order_id?: string | null;
20050
20558
  order_item_id?: string | null;
20051
20559
  order_source?: string | null;
20560
+ parent_trade_item_key?: string | null;
20052
20561
  physical_after?: number | null;
20053
20562
  physical_before?: number | null;
20563
+ production_batch_id?: string | null;
20054
20564
  qty_delta: number;
20055
20565
  reason?: string | null;
20056
20566
  reserved_after?: number | null;
@@ -20066,8 +20576,10 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20066
20576
  order_id?: string | null;
20067
20577
  order_item_id?: string | null;
20068
20578
  order_source?: string | null;
20579
+ parent_trade_item_key?: string | null;
20069
20580
  physical_after?: number | null;
20070
20581
  physical_before?: number | null;
20582
+ production_batch_id?: string | null;
20071
20583
  qty_delta?: number;
20072
20584
  reason?: string | null;
20073
20585
  reserved_after?: number | null;
@@ -20526,7 +21038,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20526
21038
  twinfield_connections: {
20527
21039
  Row: {
20528
21040
  access_token: string | null;
20529
- client_id: string;
21041
+ client_id: string | null;
20530
21042
  client_secret: string | null;
20531
21043
  cluster_uri: string | null;
20532
21044
  company_code: string | null;
@@ -20538,7 +21050,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20538
21050
  is_active: boolean;
20539
21051
  label: string | null;
20540
21052
  office_code: string | null;
20541
- redirect_uri: string;
21053
+ redirect_uri: string | null;
20542
21054
  refresh_token: string | null;
20543
21055
  token_expires_at: string | null;
20544
21056
  updated_at: string;
@@ -20546,7 +21058,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20546
21058
  };
20547
21059
  Insert: {
20548
21060
  access_token?: string | null;
20549
- client_id: string;
21061
+ client_id?: string | null;
20550
21062
  client_secret?: string | null;
20551
21063
  cluster_uri?: string | null;
20552
21064
  company_code?: string | null;
@@ -20558,7 +21070,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20558
21070
  is_active?: boolean;
20559
21071
  label?: string | null;
20560
21072
  office_code?: string | null;
20561
- redirect_uri: string;
21073
+ redirect_uri?: string | null;
20562
21074
  refresh_token?: string | null;
20563
21075
  token_expires_at?: string | null;
20564
21076
  updated_at?: string;
@@ -20566,7 +21078,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20566
21078
  };
20567
21079
  Update: {
20568
21080
  access_token?: string | null;
20569
- client_id?: string;
21081
+ client_id?: string | null;
20570
21082
  client_secret?: string | null;
20571
21083
  cluster_uri?: string | null;
20572
21084
  company_code?: string | null;
@@ -20578,7 +21090,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20578
21090
  is_active?: boolean;
20579
21091
  label?: string | null;
20580
21092
  office_code?: string | null;
20581
- redirect_uri?: string;
21093
+ redirect_uri?: string | null;
20582
21094
  refresh_token?: string | null;
20583
21095
  token_expires_at?: string | null;
20584
21096
  updated_at?: string;
@@ -21773,25 +22285,6 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
21773
22285
  };
21774
22286
  Relationships: [];
21775
22287
  };
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
22288
  local_customer_discounts: {
21796
22289
  Row: {
21797
22290
  base_price: number | null;
@@ -22095,6 +22588,13 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
22095
22588
  };
22096
22589
  Returns: number;
22097
22590
  };
22591
+ _migrate_rewrite_stock_key: {
22592
+ Args: {
22593
+ _from_key: string;
22594
+ _to_key: string;
22595
+ };
22596
+ Returns: undefined;
22597
+ };
22098
22598
  afh_city_code: {
22099
22599
  Args: {
22100
22600
  _city: string;
@@ -22210,6 +22710,28 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
22210
22710
  Args: never;
22211
22711
  Returns: undefined;
22212
22712
  };
22713
+ consume_bom_for_production: {
22714
+ Args: {
22715
+ p_connection_id: string;
22716
+ p_parent_id: string;
22717
+ p_parent_key: string;
22718
+ p_parent_kind: string;
22719
+ p_quantity: number;
22720
+ p_user_id: string;
22721
+ };
22722
+ Returns: import("../integrations/supabase/types").Json;
22723
+ } | {
22724
+ Args: {
22725
+ p_batch_id?: string;
22726
+ p_connection_id: string;
22727
+ p_parent_id: string;
22728
+ p_parent_key: string;
22729
+ p_parent_kind: string;
22730
+ p_quantity: number;
22731
+ p_user_id: string;
22732
+ };
22733
+ Returns: import("../integrations/supabase/types").Json;
22734
+ };
22213
22735
  consume_floriday_rate_limit: {
22214
22736
  Args: {
22215
22737
  p_bucket: string;
@@ -22261,6 +22783,13 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
22261
22783
  table_name: string;
22262
22784
  }[];
22263
22785
  };
22786
+ delete_samenstelling: {
22787
+ Args: {
22788
+ p_parent_id: string;
22789
+ p_parent_kind: string;
22790
+ };
22791
+ Returns: import("../integrations/supabase/types").Json;
22792
+ };
22264
22793
  dispatch_carrier_signups_sql: {
22265
22794
  Args: {
22266
22795
  _catchup?: string;
@@ -22421,19 +22950,6 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
22421
22950
  resource: string;
22422
22951
  }[];
22423
22952
  };
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
22953
  get_floriday_clock_supplies_window: {
22438
22954
  Args: {
22439
22955
  p_from: string;
@@ -22506,6 +23022,21 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
22506
23022
  minutes_since_success: number;
22507
23023
  }[];
22508
23024
  };
23025
+ get_group_allocation_keys: {
23026
+ Args: {
23027
+ p_product_id: string;
23028
+ };
23029
+ Returns: {
23030
+ k: string;
23031
+ ord: number;
23032
+ }[];
23033
+ };
23034
+ get_group_head_key: {
23035
+ Args: {
23036
+ p_group_id: string;
23037
+ };
23038
+ Returns: string;
23039
+ };
22509
23040
  get_offer_by_link_code: {
22510
23041
  Args: {
22511
23042
  p_code: string;
@@ -22616,6 +23147,19 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
22616
23147
  };
22617
23148
  Returns: undefined;
22618
23149
  };
23150
+ mark_shipment_shipped: {
23151
+ Args: {
23152
+ p_shipment_id: string;
23153
+ };
23154
+ Returns: undefined;
23155
+ };
23156
+ merge_products: {
23157
+ Args: {
23158
+ _canonical: string;
23159
+ _loser: string;
23160
+ };
23161
+ Returns: undefined;
23162
+ };
22619
23163
  next_manufacture_partij: {
22620
23164
  Args: {
22621
23165
  _tenant_id: string;
@@ -22700,6 +23244,14 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
22700
23244
  };
22701
23245
  Returns: undefined;
22702
23246
  };
23247
+ produce_designed_product: {
23248
+ Args: {
23249
+ p_parent_id: string;
23250
+ p_parent_kind: string;
23251
+ p_quantity: number;
23252
+ };
23253
+ Returns: import("../integrations/supabase/types").Json;
23254
+ };
22703
23255
  promote_trade_item_key: {
22704
23256
  Args: {
22705
23257
  p_new: string;
@@ -22707,6 +23259,10 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
22707
23259
  };
22708
23260
  Returns: undefined;
22709
23261
  };
23262
+ recompute_all_reserved_stock: {
23263
+ Args: never;
23264
+ Returns: undefined;
23265
+ };
22710
23266
  recompute_order_status: {
22711
23267
  Args: {
22712
23268
  p_order_id: string;
@@ -22756,27 +23312,45 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
22756
23312
  };
22757
23313
  Returns: undefined;
22758
23314
  };
23315
+ resolve_group_allocation: {
23316
+ Args: {
23317
+ _needed: number;
23318
+ _product_group_id: string;
23319
+ };
23320
+ Returns: {
23321
+ allocated: number;
23322
+ trade_item_id: string;
23323
+ }[];
23324
+ };
23325
+ resolve_group_member_stock_key: {
23326
+ Args: {
23327
+ p_trade_item_id: string;
23328
+ };
23329
+ Returns: string;
23330
+ };
22759
23331
  resolve_product_id_for_item: {
22760
23332
  Args: {
22761
23333
  p_product_name: string;
22762
23334
  };
22763
23335
  Returns: string;
22764
23336
  };
22765
- schedule_floriday_additional_services_sync: {
23337
+ resolve_stock_trade_item_key: {
22766
23338
  Args: {
22767
- p_apikey: string;
22768
- p_url: string;
23339
+ p_product_id: string;
22769
23340
  };
22770
- Returns: number;
23341
+ Returns: string;
22771
23342
  };
22772
- schedule_floriday_agreement_calloffs_sync: {
23343
+ reverse_production: {
22773
23344
  Args: {
22774
- p_apikey: string;
22775
- p_url: string;
23345
+ p_connection_id?: string;
23346
+ p_parent_key: string;
23347
+ p_quantity: number;
23348
+ p_reason?: string;
23349
+ p_user_id?: string;
22776
23350
  };
22777
- Returns: number;
23351
+ Returns: import("../integrations/supabase/types").Json;
22778
23352
  };
22779
- schedule_floriday_agreements_sync: {
23353
+ schedule_floriday_additional_services_sync: {
22780
23354
  Args: {
22781
23355
  p_apikey: string;
22782
23356
  p_url: string;
@@ -26515,105 +27089,6 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
26515
27089
  referencedColumns: ["id"];
26516
27090
  }];
26517
27091
  };
26518
- floriday_agreement_calloffs_cache: {
26519
- Row: {
26520
- agreement_id: string | null;
26521
- connection_id: string;
26522
- data: import("../integrations/supabase/types").Json;
26523
- delivery_date: string | null;
26524
- fetched_at: string;
26525
- floriday_id: string;
26526
- id: string;
26527
- is_deleted: boolean;
26528
- sequence_number: number;
26529
- status: string | null;
26530
- updated_at: string;
26531
- };
26532
- Insert: {
26533
- agreement_id?: string | null;
26534
- connection_id: string;
26535
- data?: import("../integrations/supabase/types").Json;
26536
- delivery_date?: string | null;
26537
- fetched_at?: string;
26538
- floriday_id: string;
26539
- id?: string;
26540
- is_deleted?: boolean;
26541
- sequence_number?: number;
26542
- status?: string | null;
26543
- updated_at?: string;
26544
- };
26545
- Update: {
26546
- agreement_id?: string | null;
26547
- connection_id?: string;
26548
- data?: import("../integrations/supabase/types").Json;
26549
- delivery_date?: string | null;
26550
- fetched_at?: string;
26551
- floriday_id?: string;
26552
- id?: string;
26553
- is_deleted?: boolean;
26554
- sequence_number?: number;
26555
- status?: string | null;
26556
- updated_at?: string;
26557
- };
26558
- Relationships: [{
26559
- foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
26560
- columns: ["connection_id"];
26561
- isOneToOne: false;
26562
- referencedRelation: "floriday_connections";
26563
- referencedColumns: ["id"];
26564
- }];
26565
- };
26566
- floriday_agreements_cache: {
26567
- Row: {
26568
- buyer_organization_id: string | null;
26569
- connection_id: string;
26570
- data: import("../integrations/supabase/types").Json;
26571
- fetched_at: string;
26572
- floriday_id: string;
26573
- id: string;
26574
- is_deleted: boolean;
26575
- sequence_number: number;
26576
- status: string | null;
26577
- updated_at: string;
26578
- valid_from: string | null;
26579
- valid_until: string | null;
26580
- };
26581
- Insert: {
26582
- buyer_organization_id?: string | null;
26583
- connection_id: string;
26584
- data?: import("../integrations/supabase/types").Json;
26585
- fetched_at?: string;
26586
- floriday_id: string;
26587
- id?: string;
26588
- is_deleted?: boolean;
26589
- sequence_number?: number;
26590
- status?: string | null;
26591
- updated_at?: string;
26592
- valid_from?: string | null;
26593
- valid_until?: string | null;
26594
- };
26595
- Update: {
26596
- buyer_organization_id?: string | null;
26597
- connection_id?: string;
26598
- data?: import("../integrations/supabase/types").Json;
26599
- fetched_at?: string;
26600
- floriday_id?: string;
26601
- id?: string;
26602
- is_deleted?: boolean;
26603
- sequence_number?: number;
26604
- status?: string | null;
26605
- updated_at?: string;
26606
- valid_from?: string | null;
26607
- valid_until?: string | null;
26608
- };
26609
- Relationships: [{
26610
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
26611
- columns: ["connection_id"];
26612
- isOneToOne: false;
26613
- referencedRelation: "floriday_connections";
26614
- referencedColumns: ["id"];
26615
- }];
26616
- };
26617
27092
  floriday_auction_letters_cache: {
26618
27093
  Row: {
26619
27094
  auction_letter_code: string;
@@ -28111,6 +28586,45 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
28111
28586
  referencedColumns: ["id"];
28112
28587
  }];
28113
28588
  };
28589
+ floriday_trade_settings_customers_cache: {
28590
+ Row: {
28591
+ connection_id: string;
28592
+ data: import("../integrations/supabase/types").Json;
28593
+ fetched_at: string;
28594
+ floriday_id: string;
28595
+ id: string;
28596
+ is_deleted: boolean;
28597
+ sequence_number: number;
28598
+ updated_at: string;
28599
+ };
28600
+ Insert: {
28601
+ connection_id: string;
28602
+ data: import("../integrations/supabase/types").Json;
28603
+ fetched_at?: string;
28604
+ floriday_id: string;
28605
+ id?: string;
28606
+ is_deleted?: boolean;
28607
+ sequence_number?: number;
28608
+ updated_at?: string;
28609
+ };
28610
+ Update: {
28611
+ connection_id?: string;
28612
+ data?: import("../integrations/supabase/types").Json;
28613
+ fetched_at?: string;
28614
+ floriday_id?: string;
28615
+ id?: string;
28616
+ is_deleted?: boolean;
28617
+ sequence_number?: number;
28618
+ updated_at?: string;
28619
+ };
28620
+ Relationships: [{
28621
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
28622
+ columns: ["connection_id"];
28623
+ isOneToOne: false;
28624
+ referencedRelation: "floriday_connections";
28625
+ referencedColumns: ["id"];
28626
+ }];
28627
+ };
28114
28628
  floriday_trips_cache: {
28115
28629
  Row: {
28116
28630
  carrier_organization_id: string | null;
@@ -30255,33 +30769,132 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30255
30769
  foreignKeyName: "order_items_order_id_fkey";
30256
30770
  columns: ["order_id"];
30257
30771
  isOneToOne: false;
30258
- referencedRelation: "orders";
30772
+ referencedRelation: "orders";
30773
+ referencedColumns: ["id"];
30774
+ }, {
30775
+ foreignKeyName: "order_items_product_id_fkey";
30776
+ columns: ["product_id"];
30777
+ isOneToOne: false;
30778
+ referencedRelation: "products";
30779
+ referencedColumns: ["id"];
30780
+ }];
30781
+ };
30782
+ order_number_counters: {
30783
+ Row: {
30784
+ last_value: number;
30785
+ updated_at: string;
30786
+ year: number;
30787
+ };
30788
+ Insert: {
30789
+ last_value?: number;
30790
+ updated_at?: string;
30791
+ year: number;
30792
+ };
30793
+ Update: {
30794
+ last_value?: number;
30795
+ updated_at?: string;
30796
+ year?: number;
30797
+ };
30798
+ Relationships: [];
30799
+ };
30800
+ order_shipment_items: {
30801
+ Row: {
30802
+ created_at: string;
30803
+ id: string;
30804
+ order_item_id: string;
30805
+ product_id: string | null;
30806
+ product_name: string;
30807
+ quantity: number;
30808
+ shipment_id: string;
30809
+ updated_at: string;
30810
+ };
30811
+ Insert: {
30812
+ created_at?: string;
30813
+ id?: string;
30814
+ order_item_id: string;
30815
+ product_id?: string | null;
30816
+ product_name: string;
30817
+ quantity: number;
30818
+ shipment_id: string;
30819
+ updated_at?: string;
30820
+ };
30821
+ Update: {
30822
+ created_at?: string;
30823
+ id?: string;
30824
+ order_item_id?: string;
30825
+ product_id?: string | null;
30826
+ product_name?: string;
30827
+ quantity?: number;
30828
+ shipment_id?: string;
30829
+ updated_at?: string;
30830
+ };
30831
+ Relationships: [{
30832
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
30833
+ columns: ["order_item_id"];
30834
+ isOneToOne: false;
30835
+ referencedRelation: "order_items";
30259
30836
  referencedColumns: ["id"];
30260
30837
  }, {
30261
- foreignKeyName: "order_items_product_id_fkey";
30262
- columns: ["product_id"];
30838
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
30839
+ columns: ["shipment_id"];
30263
30840
  isOneToOne: false;
30264
- referencedRelation: "products";
30841
+ referencedRelation: "order_shipments";
30265
30842
  referencedColumns: ["id"];
30266
30843
  }];
30267
30844
  };
30268
- order_number_counters: {
30845
+ order_shipments: {
30269
30846
  Row: {
30270
- last_value: number;
30847
+ carrier_id: string | null;
30848
+ created_at: string;
30849
+ delivery_date: string | null;
30850
+ delivery_location_id: string | null;
30851
+ id: string;
30852
+ notes: string | null;
30853
+ order_id: string;
30854
+ shipment_number: number;
30855
+ shipped_at: string | null;
30856
+ status: string;
30271
30857
  updated_at: string;
30272
- year: number;
30273
30858
  };
30274
30859
  Insert: {
30275
- last_value?: number;
30860
+ carrier_id?: string | null;
30861
+ created_at?: string;
30862
+ delivery_date?: string | null;
30863
+ delivery_location_id?: string | null;
30864
+ id?: string;
30865
+ notes?: string | null;
30866
+ order_id: string;
30867
+ shipment_number: number;
30868
+ shipped_at?: string | null;
30869
+ status?: string;
30276
30870
  updated_at?: string;
30277
- year: number;
30278
30871
  };
30279
30872
  Update: {
30280
- last_value?: number;
30873
+ carrier_id?: string | null;
30874
+ created_at?: string;
30875
+ delivery_date?: string | null;
30876
+ delivery_location_id?: string | null;
30877
+ id?: string;
30878
+ notes?: string | null;
30879
+ order_id?: string;
30880
+ shipment_number?: number;
30881
+ shipped_at?: string | null;
30882
+ status?: string;
30281
30883
  updated_at?: string;
30282
- year?: number;
30283
30884
  };
30284
- Relationships: [];
30885
+ Relationships: [{
30886
+ foreignKeyName: "order_shipments_carrier_id_fkey";
30887
+ columns: ["carrier_id"];
30888
+ isOneToOne: false;
30889
+ referencedRelation: "carriers";
30890
+ referencedColumns: ["id"];
30891
+ }, {
30892
+ foreignKeyName: "order_shipments_order_id_fkey";
30893
+ columns: ["order_id"];
30894
+ isOneToOne: false;
30895
+ referencedRelation: "orders";
30896
+ referencedColumns: ["id"];
30897
+ }];
30285
30898
  };
30286
30899
  orders: {
30287
30900
  Row: {
@@ -30290,8 +30903,9 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30290
30903
  customer_id: string | null;
30291
30904
  customer_name: string;
30292
30905
  deleted_at: string | null;
30293
- delivery_date: string;
30906
+ delivery_date: string | null;
30294
30907
  id: string;
30908
+ is_reservation: boolean;
30295
30909
  notes: string | null;
30296
30910
  order_date: string;
30297
30911
  order_number: string;
@@ -30308,8 +30922,9 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30308
30922
  customer_id?: string | null;
30309
30923
  customer_name?: string;
30310
30924
  deleted_at?: string | null;
30311
- delivery_date: string;
30925
+ delivery_date?: string | null;
30312
30926
  id?: string;
30927
+ is_reservation?: boolean;
30313
30928
  notes?: string | null;
30314
30929
  order_date?: string;
30315
30930
  order_number: string;
@@ -30326,8 +30941,9 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30326
30941
  customer_id?: string | null;
30327
30942
  customer_name?: string;
30328
30943
  deleted_at?: string | null;
30329
- delivery_date?: string;
30944
+ delivery_date?: string | null;
30330
30945
  id?: string;
30946
+ is_reservation?: boolean;
30331
30947
  notes?: string | null;
30332
30948
  order_date?: string;
30333
30949
  order_number?: string;
@@ -30469,6 +31085,63 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30469
31085
  };
30470
31086
  Relationships: [];
30471
31087
  };
31088
+ product_bom_items: {
31089
+ Row: {
31090
+ component_product_id: string | null;
31091
+ component_trade_item_floriday_id: string | null;
31092
+ created_at: string;
31093
+ id: string;
31094
+ notes: string | null;
31095
+ parent_product_id: string | null;
31096
+ parent_trade_item_floriday_id: string | null;
31097
+ quantity: number;
31098
+ sort_order: number;
31099
+ tenant_id: string;
31100
+ unit: string;
31101
+ updated_at: string;
31102
+ };
31103
+ Insert: {
31104
+ component_product_id?: string | null;
31105
+ component_trade_item_floriday_id?: string | null;
31106
+ created_at?: string;
31107
+ id?: string;
31108
+ notes?: string | null;
31109
+ parent_product_id?: string | null;
31110
+ parent_trade_item_floriday_id?: string | null;
31111
+ quantity?: number;
31112
+ sort_order?: number;
31113
+ tenant_id: string;
31114
+ unit?: string;
31115
+ updated_at?: string;
31116
+ };
31117
+ Update: {
31118
+ component_product_id?: string | null;
31119
+ component_trade_item_floriday_id?: string | null;
31120
+ created_at?: string;
31121
+ id?: string;
31122
+ notes?: string | null;
31123
+ parent_product_id?: string | null;
31124
+ parent_trade_item_floriday_id?: string | null;
31125
+ quantity?: number;
31126
+ sort_order?: number;
31127
+ tenant_id?: string;
31128
+ unit?: string;
31129
+ updated_at?: string;
31130
+ };
31131
+ Relationships: [{
31132
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
31133
+ columns: ["component_product_id"];
31134
+ isOneToOne: false;
31135
+ referencedRelation: "products";
31136
+ referencedColumns: ["id"];
31137
+ }, {
31138
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
31139
+ columns: ["parent_product_id"];
31140
+ isOneToOne: false;
31141
+ referencedRelation: "products";
31142
+ referencedColumns: ["id"];
31143
+ }];
31144
+ };
30472
31145
  product_categories: {
30473
31146
  Row: {
30474
31147
  color: string;
@@ -30574,6 +31247,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30574
31247
  id: string;
30575
31248
  product_group_id: string;
30576
31249
  quantity: number;
31250
+ sort_order: number;
30577
31251
  trade_item_id: string;
30578
31252
  };
30579
31253
  Insert: {
@@ -30581,6 +31255,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30581
31255
  id?: string;
30582
31256
  product_group_id: string;
30583
31257
  quantity?: number;
31258
+ sort_order?: number;
30584
31259
  trade_item_id: string;
30585
31260
  };
30586
31261
  Update: {
@@ -30588,6 +31263,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30588
31263
  id?: string;
30589
31264
  product_group_id?: string;
30590
31265
  quantity?: number;
31266
+ sort_order?: number;
30591
31267
  trade_item_id?: string;
30592
31268
  };
30593
31269
  Relationships: [{
@@ -30602,6 +31278,8 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30602
31278
  Row: {
30603
31279
  created_at: string;
30604
31280
  description: string | null;
31281
+ head_product_id: string | null;
31282
+ head_trade_item_floriday_id: string | null;
30605
31283
  id: string;
30606
31284
  is_active: boolean;
30607
31285
  name: string;
@@ -30611,6 +31289,8 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30611
31289
  Insert: {
30612
31290
  created_at?: string;
30613
31291
  description?: string | null;
31292
+ head_product_id?: string | null;
31293
+ head_trade_item_floriday_id?: string | null;
30614
31294
  id?: string;
30615
31295
  is_active?: boolean;
30616
31296
  name: string;
@@ -30620,21 +31300,126 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30620
31300
  Update: {
30621
31301
  created_at?: string;
30622
31302
  description?: string | null;
31303
+ head_product_id?: string | null;
31304
+ head_trade_item_floriday_id?: string | null;
30623
31305
  id?: string;
30624
31306
  is_active?: boolean;
30625
31307
  name?: string;
30626
31308
  tenant_id?: string;
30627
31309
  updated_at?: string;
30628
31310
  };
31311
+ Relationships: [{
31312
+ foreignKeyName: "product_groups_head_product_id_fkey";
31313
+ columns: ["head_product_id"];
31314
+ isOneToOne: false;
31315
+ referencedRelation: "products";
31316
+ referencedColumns: ["id"];
31317
+ }];
31318
+ };
31319
+ product_load_settings: {
31320
+ Row: {
31321
+ created_at: string;
31322
+ id: string;
31323
+ is_package: boolean;
31324
+ layers_per_load_carrier: number | null;
31325
+ load_carrier: string | null;
31326
+ package_id: string | null;
31327
+ package_label: string | null;
31328
+ packages_per_layer: number | null;
31329
+ product_id: string | null;
31330
+ tenant_id: string;
31331
+ trade_item_floriday_id: string | null;
31332
+ units_per_package: number | null;
31333
+ updated_at: string;
31334
+ };
31335
+ Insert: {
31336
+ created_at?: string;
31337
+ id?: string;
31338
+ is_package?: boolean;
31339
+ layers_per_load_carrier?: number | null;
31340
+ load_carrier?: string | null;
31341
+ package_id?: string | null;
31342
+ package_label?: string | null;
31343
+ packages_per_layer?: number | null;
31344
+ product_id?: string | null;
31345
+ tenant_id: string;
31346
+ trade_item_floriday_id?: string | null;
31347
+ units_per_package?: number | null;
31348
+ updated_at?: string;
31349
+ };
31350
+ Update: {
31351
+ created_at?: string;
31352
+ id?: string;
31353
+ is_package?: boolean;
31354
+ layers_per_load_carrier?: number | null;
31355
+ load_carrier?: string | null;
31356
+ package_id?: string | null;
31357
+ package_label?: string | null;
31358
+ packages_per_layer?: number | null;
31359
+ product_id?: string | null;
31360
+ tenant_id?: string;
31361
+ trade_item_floriday_id?: string | null;
31362
+ units_per_package?: number | null;
31363
+ updated_at?: string;
31364
+ };
31365
+ Relationships: [{
31366
+ foreignKeyName: "product_load_settings_package_id_fkey";
31367
+ columns: ["package_id"];
31368
+ isOneToOne: false;
31369
+ referencedRelation: "packages";
31370
+ referencedColumns: ["id"];
31371
+ }, {
31372
+ foreignKeyName: "product_load_settings_product_id_fkey";
31373
+ columns: ["product_id"];
31374
+ isOneToOne: false;
31375
+ referencedRelation: "products";
31376
+ referencedColumns: ["id"];
31377
+ }];
31378
+ };
31379
+ product_merge_log: {
31380
+ Row: {
31381
+ canonical_product_id: string | null;
31382
+ id: string;
31383
+ merged_at: string;
31384
+ merged_from_id: string;
31385
+ notes: string | null;
31386
+ snapshot: import("../integrations/supabase/types").Json;
31387
+ source_table: string;
31388
+ status: string;
31389
+ };
31390
+ Insert: {
31391
+ canonical_product_id?: string | null;
31392
+ id?: string;
31393
+ merged_at?: string;
31394
+ merged_from_id: string;
31395
+ notes?: string | null;
31396
+ snapshot?: import("../integrations/supabase/types").Json;
31397
+ source_table: string;
31398
+ status?: string;
31399
+ };
31400
+ Update: {
31401
+ canonical_product_id?: string | null;
31402
+ id?: string;
31403
+ merged_at?: string;
31404
+ merged_from_id?: string;
31405
+ notes?: string | null;
31406
+ snapshot?: import("../integrations/supabase/types").Json;
31407
+ source_table?: string;
31408
+ status?: string;
31409
+ };
30629
31410
  Relationships: [];
30630
31411
  };
30631
31412
  products: {
30632
31413
  Row: {
31414
+ article_number: string | null;
30633
31415
  barcode: string | null;
30634
31416
  batch: string;
30635
31417
  crates_per_layer: number;
30636
31418
  created_at: string;
30637
31419
  custom_fields: import("../integrations/supabase/types").Json;
31420
+ floriday_active: boolean;
31421
+ floriday_payload: import("../integrations/supabase/types").Json;
31422
+ floriday_trade_item_id: string | null;
30638
31423
  id: string;
30639
31424
  image_url: string | null;
30640
31425
  incoming_quantity: number;
@@ -30653,11 +31438,15 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30653
31438
  weight: string | null;
30654
31439
  };
30655
31440
  Insert: {
31441
+ article_number?: string | null;
30656
31442
  barcode?: string | null;
30657
31443
  batch: string;
30658
31444
  crates_per_layer?: number;
30659
31445
  created_at?: string;
30660
31446
  custom_fields?: import("../integrations/supabase/types").Json;
31447
+ floriday_active?: boolean;
31448
+ floriday_payload?: import("../integrations/supabase/types").Json;
31449
+ floriday_trade_item_id?: string | null;
30661
31450
  id?: string;
30662
31451
  image_url?: string | null;
30663
31452
  incoming_quantity?: number;
@@ -30676,11 +31465,15 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30676
31465
  weight?: string | null;
30677
31466
  };
30678
31467
  Update: {
31468
+ article_number?: string | null;
30679
31469
  barcode?: string | null;
30680
31470
  batch?: string;
30681
31471
  crates_per_layer?: number;
30682
31472
  created_at?: string;
30683
31473
  custom_fields?: import("../integrations/supabase/types").Json;
31474
+ floriday_active?: boolean;
31475
+ floriday_payload?: import("../integrations/supabase/types").Json;
31476
+ floriday_trade_item_id?: string | null;
30684
31477
  id?: string;
30685
31478
  image_url?: string | null;
30686
31479
  incoming_quantity?: number;
@@ -31589,8 +32382,10 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
31589
32382
  order_id: string | null;
31590
32383
  order_item_id: string | null;
31591
32384
  order_source: string | null;
32385
+ parent_trade_item_key: string | null;
31592
32386
  physical_after: number | null;
31593
32387
  physical_before: number | null;
32388
+ production_batch_id: string | null;
31594
32389
  qty_delta: number;
31595
32390
  reason: string | null;
31596
32391
  reserved_after: number | null;
@@ -31606,8 +32401,10 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
31606
32401
  order_id?: string | null;
31607
32402
  order_item_id?: string | null;
31608
32403
  order_source?: string | null;
32404
+ parent_trade_item_key?: string | null;
31609
32405
  physical_after?: number | null;
31610
32406
  physical_before?: number | null;
32407
+ production_batch_id?: string | null;
31611
32408
  qty_delta: number;
31612
32409
  reason?: string | null;
31613
32410
  reserved_after?: number | null;
@@ -31623,8 +32420,10 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
31623
32420
  order_id?: string | null;
31624
32421
  order_item_id?: string | null;
31625
32422
  order_source?: string | null;
32423
+ parent_trade_item_key?: string | null;
31626
32424
  physical_after?: number | null;
31627
32425
  physical_before?: number | null;
32426
+ production_batch_id?: string | null;
31628
32427
  qty_delta?: number;
31629
32428
  reason?: string | null;
31630
32429
  reserved_after?: number | null;
@@ -32083,7 +32882,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
32083
32882
  twinfield_connections: {
32084
32883
  Row: {
32085
32884
  access_token: string | null;
32086
- client_id: string;
32885
+ client_id: string | null;
32087
32886
  client_secret: string | null;
32088
32887
  cluster_uri: string | null;
32089
32888
  company_code: string | null;
@@ -32095,7 +32894,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
32095
32894
  is_active: boolean;
32096
32895
  label: string | null;
32097
32896
  office_code: string | null;
32098
- redirect_uri: string;
32897
+ redirect_uri: string | null;
32099
32898
  refresh_token: string | null;
32100
32899
  token_expires_at: string | null;
32101
32900
  updated_at: string;
@@ -32103,7 +32902,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
32103
32902
  };
32104
32903
  Insert: {
32105
32904
  access_token?: string | null;
32106
- client_id: string;
32905
+ client_id?: string | null;
32107
32906
  client_secret?: string | null;
32108
32907
  cluster_uri?: string | null;
32109
32908
  company_code?: string | null;
@@ -32115,7 +32914,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
32115
32914
  is_active?: boolean;
32116
32915
  label?: string | null;
32117
32916
  office_code?: string | null;
32118
- redirect_uri: string;
32917
+ redirect_uri?: string | null;
32119
32918
  refresh_token?: string | null;
32120
32919
  token_expires_at?: string | null;
32121
32920
  updated_at?: string;
@@ -32123,7 +32922,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
32123
32922
  };
32124
32923
  Update: {
32125
32924
  access_token?: string | null;
32126
- client_id?: string;
32925
+ client_id?: string | null;
32127
32926
  client_secret?: string | null;
32128
32927
  cluster_uri?: string | null;
32129
32928
  company_code?: string | null;
@@ -32135,7 +32934,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
32135
32934
  is_active?: boolean;
32136
32935
  label?: string | null;
32137
32936
  office_code?: string | null;
32138
- redirect_uri?: string;
32937
+ redirect_uri?: string | null;
32139
32938
  refresh_token?: string | null;
32140
32939
  token_expires_at?: string | null;
32141
32940
  updated_at?: string;
@@ -33330,25 +34129,6 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
33330
34129
  };
33331
34130
  Relationships: [];
33332
34131
  };
33333
- floriday_customer_discounts: {
33334
- Row: {
33335
- base_price: number | null;
33336
- buyer_organization_id: string | null;
33337
- currency: string | null;
33338
- discount_type: string | null;
33339
- discount_value: number | null;
33340
- min_quantity: number | null;
33341
- net_price: number | null;
33342
- product_group_id: string | null;
33343
- raw: import("../integrations/supabase/types").Json | null;
33344
- source: string | null;
33345
- source_id: string | null;
33346
- trade_item_id: string | null;
33347
- valid_from: string | null;
33348
- valid_until: string | null;
33349
- };
33350
- Relationships: [];
33351
- };
33352
34132
  local_customer_discounts: {
33353
34133
  Row: {
33354
34134
  base_price: number | null;
@@ -33652,6 +34432,13 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
33652
34432
  };
33653
34433
  Returns: number;
33654
34434
  };
34435
+ _migrate_rewrite_stock_key: {
34436
+ Args: {
34437
+ _from_key: string;
34438
+ _to_key: string;
34439
+ };
34440
+ Returns: undefined;
34441
+ };
33655
34442
  afh_city_code: {
33656
34443
  Args: {
33657
34444
  _city: string;
@@ -33767,6 +34554,28 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
33767
34554
  Args: never;
33768
34555
  Returns: undefined;
33769
34556
  };
34557
+ consume_bom_for_production: {
34558
+ Args: {
34559
+ p_connection_id: string;
34560
+ p_parent_id: string;
34561
+ p_parent_key: string;
34562
+ p_parent_kind: string;
34563
+ p_quantity: number;
34564
+ p_user_id: string;
34565
+ };
34566
+ Returns: import("../integrations/supabase/types").Json;
34567
+ } | {
34568
+ Args: {
34569
+ p_batch_id?: string;
34570
+ p_connection_id: string;
34571
+ p_parent_id: string;
34572
+ p_parent_key: string;
34573
+ p_parent_kind: string;
34574
+ p_quantity: number;
34575
+ p_user_id: string;
34576
+ };
34577
+ Returns: import("../integrations/supabase/types").Json;
34578
+ };
33770
34579
  consume_floriday_rate_limit: {
33771
34580
  Args: {
33772
34581
  p_bucket: string;
@@ -33818,6 +34627,13 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
33818
34627
  table_name: string;
33819
34628
  }[];
33820
34629
  };
34630
+ delete_samenstelling: {
34631
+ Args: {
34632
+ p_parent_id: string;
34633
+ p_parent_kind: string;
34634
+ };
34635
+ Returns: import("../integrations/supabase/types").Json;
34636
+ };
33821
34637
  dispatch_carrier_signups_sql: {
33822
34638
  Args: {
33823
34639
  _catchup?: string;
@@ -33978,19 +34794,6 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
33978
34794
  resource: string;
33979
34795
  }[];
33980
34796
  };
33981
- get_floriday_agreements_active: {
33982
- Args: {
33983
- p_on_date?: string;
33984
- };
33985
- Returns: {
33986
- buyer_organization_id: string;
33987
- data: import("../integrations/supabase/types").Json;
33988
- floriday_id: string;
33989
- status: string;
33990
- valid_from: string;
33991
- valid_until: string;
33992
- }[];
33993
- };
33994
34797
  get_floriday_clock_supplies_window: {
33995
34798
  Args: {
33996
34799
  p_from: string;
@@ -34063,6 +34866,21 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
34063
34866
  minutes_since_success: number;
34064
34867
  }[];
34065
34868
  };
34869
+ get_group_allocation_keys: {
34870
+ Args: {
34871
+ p_product_id: string;
34872
+ };
34873
+ Returns: {
34874
+ k: string;
34875
+ ord: number;
34876
+ }[];
34877
+ };
34878
+ get_group_head_key: {
34879
+ Args: {
34880
+ p_group_id: string;
34881
+ };
34882
+ Returns: string;
34883
+ };
34066
34884
  get_offer_by_link_code: {
34067
34885
  Args: {
34068
34886
  p_code: string;
@@ -34173,6 +34991,19 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
34173
34991
  };
34174
34992
  Returns: undefined;
34175
34993
  };
34994
+ mark_shipment_shipped: {
34995
+ Args: {
34996
+ p_shipment_id: string;
34997
+ };
34998
+ Returns: undefined;
34999
+ };
35000
+ merge_products: {
35001
+ Args: {
35002
+ _canonical: string;
35003
+ _loser: string;
35004
+ };
35005
+ Returns: undefined;
35006
+ };
34176
35007
  next_manufacture_partij: {
34177
35008
  Args: {
34178
35009
  _tenant_id: string;
@@ -34257,6 +35088,14 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
34257
35088
  };
34258
35089
  Returns: undefined;
34259
35090
  };
35091
+ produce_designed_product: {
35092
+ Args: {
35093
+ p_parent_id: string;
35094
+ p_parent_kind: string;
35095
+ p_quantity: number;
35096
+ };
35097
+ Returns: import("../integrations/supabase/types").Json;
35098
+ };
34260
35099
  promote_trade_item_key: {
34261
35100
  Args: {
34262
35101
  p_new: string;
@@ -34264,6 +35103,10 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
34264
35103
  };
34265
35104
  Returns: undefined;
34266
35105
  };
35106
+ recompute_all_reserved_stock: {
35107
+ Args: never;
35108
+ Returns: undefined;
35109
+ };
34267
35110
  recompute_order_status: {
34268
35111
  Args: {
34269
35112
  p_order_id: string;
@@ -34313,27 +35156,45 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
34313
35156
  };
34314
35157
  Returns: undefined;
34315
35158
  };
35159
+ resolve_group_allocation: {
35160
+ Args: {
35161
+ _needed: number;
35162
+ _product_group_id: string;
35163
+ };
35164
+ Returns: {
35165
+ allocated: number;
35166
+ trade_item_id: string;
35167
+ }[];
35168
+ };
35169
+ resolve_group_member_stock_key: {
35170
+ Args: {
35171
+ p_trade_item_id: string;
35172
+ };
35173
+ Returns: string;
35174
+ };
34316
35175
  resolve_product_id_for_item: {
34317
35176
  Args: {
34318
35177
  p_product_name: string;
34319
35178
  };
34320
35179
  Returns: string;
34321
35180
  };
34322
- schedule_floriday_additional_services_sync: {
35181
+ resolve_stock_trade_item_key: {
34323
35182
  Args: {
34324
- p_apikey: string;
34325
- p_url: string;
35183
+ p_product_id: string;
34326
35184
  };
34327
- Returns: number;
35185
+ Returns: string;
34328
35186
  };
34329
- schedule_floriday_agreement_calloffs_sync: {
35187
+ reverse_production: {
34330
35188
  Args: {
34331
- p_apikey: string;
34332
- p_url: string;
35189
+ p_connection_id?: string;
35190
+ p_parent_key: string;
35191
+ p_quantity: number;
35192
+ p_reason?: string;
35193
+ p_user_id?: string;
34333
35194
  };
34334
- Returns: number;
35195
+ Returns: import("../integrations/supabase/types").Json;
34335
35196
  };
34336
- schedule_floriday_agreements_sync: {
35197
+ schedule_floriday_additional_services_sync: {
34337
35198
  Args: {
34338
35199
  p_apikey: string;
34339
35200
  p_url: string;