@flowselections/floriday-verkoop-module 1.0.17 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist-lib/components/verkoop/CreateOrderPage.d.ts.map +1 -1
  2. package/dist-lib/components/verkoop/CreateOrderPage.js +6 -4
  3. package/dist-lib/components/verkoop/EditLocalOrderDialog.d.ts +6 -0
  4. package/dist-lib/components/verkoop/EditLocalOrderDialog.d.ts.map +1 -0
  5. package/dist-lib/components/verkoop/EditLocalOrderDialog.js +102 -0
  6. package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts.map +1 -1
  7. package/dist-lib/components/verkoop/OrderKarindelingCard.js +26 -28
  8. package/dist-lib/components/verkoop/OrderShipmentsCard.d.ts +5 -0
  9. package/dist-lib/components/verkoop/OrderShipmentsCard.d.ts.map +1 -0
  10. package/dist-lib/components/verkoop/OrderShipmentsCard.js +137 -0
  11. package/dist-lib/components/verkoop/SalesOrderDetailPage.d.ts.map +1 -1
  12. package/dist-lib/components/verkoop/SalesOrderDetailPage.js +8 -2
  13. package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts.map +1 -1
  14. package/dist-lib/components/verkoop/SalesOrderDetailView.js +2 -1
  15. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts +4 -1
  16. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
  17. package/dist-lib/components/verkoop/SalesOrdersTable.js +2 -2
  18. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts.map +1 -1
  19. package/dist-lib/components/verkoop/VerkoopOrdersPage.js +43 -1
  20. package/dist-lib/integrations/supabase/auth-middleware.d.ts +381 -150
  21. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  22. package/dist-lib/integrations/supabase/client.d.ts +381 -150
  23. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  24. package/dist-lib/integrations/supabase/client.server.d.ts +381 -150
  25. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  26. package/dist-lib/integrations/supabase/types.d.ts +397 -154
  27. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  28. package/dist-lib/lib/cart-lock.functions.d.ts +381 -150
  29. package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
  30. package/dist-lib/lib/cart-replan.functions.d.ts +789 -327
  31. package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
  32. package/dist-lib/lib/create-order.functions.d.ts +38897 -1457
  33. package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
  34. package/dist-lib/lib/create-order.functions.js +792 -52
  35. package/dist-lib/lib/expand-group-order-items.d.ts +13 -0
  36. package/dist-lib/lib/expand-group-order-items.d.ts.map +1 -0
  37. package/dist-lib/lib/expand-group-order-items.js +216 -0
  38. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +1174 -481
  39. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
  40. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +381 -150
  41. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
  42. package/dist-lib/lib/floriday-public.functions.d.ts +2701 -1084
  43. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  44. package/dist-lib/lib/floriday-writes.functions.d.ts +1939 -784
  45. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  46. package/dist-lib/lib/order-shipments.functions.d.ts +47158 -0
  47. package/dist-lib/lib/order-shipments.functions.d.ts.map +1 -0
  48. package/dist-lib/lib/order-shipments.functions.js +178 -0
  49. package/dist-lib/lib/salesorders-mapping.d.ts +1 -0
  50. package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
  51. package/dist-lib/lib/salesorders.functions.d.ts +1174 -481
  52. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  53. package/dist-lib/lib/tradeitems.functions.d.ts +381 -150
  54. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  55. package/dist-lib/lib/useSalesOrdersQuery.d.ts.map +1 -1
  56. package/dist-lib/lib/useSalesOrdersQuery.js +39 -2
  57. package/package.json +2 -2
@@ -3406,105 +3406,6 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
3406
3406
  referencedColumns: ["id"];
3407
3407
  }];
3408
3408
  };
3409
- floriday_agreement_calloffs_cache: {
3410
- Row: {
3411
- agreement_id: string | null;
3412
- connection_id: string;
3413
- data: import("../integrations/supabase/types").Json;
3414
- delivery_date: string | null;
3415
- fetched_at: string;
3416
- floriday_id: string;
3417
- id: string;
3418
- is_deleted: boolean;
3419
- sequence_number: number;
3420
- status: string | null;
3421
- updated_at: string;
3422
- };
3423
- Insert: {
3424
- agreement_id?: string | null;
3425
- connection_id: string;
3426
- data?: import("../integrations/supabase/types").Json;
3427
- delivery_date?: string | null;
3428
- fetched_at?: string;
3429
- floriday_id: string;
3430
- id?: string;
3431
- is_deleted?: boolean;
3432
- sequence_number?: number;
3433
- status?: string | null;
3434
- updated_at?: string;
3435
- };
3436
- Update: {
3437
- agreement_id?: string | null;
3438
- connection_id?: string;
3439
- data?: import("../integrations/supabase/types").Json;
3440
- delivery_date?: string | null;
3441
- fetched_at?: string;
3442
- floriday_id?: string;
3443
- id?: string;
3444
- is_deleted?: boolean;
3445
- sequence_number?: number;
3446
- status?: string | null;
3447
- updated_at?: string;
3448
- };
3449
- Relationships: [{
3450
- foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
3451
- columns: ["connection_id"];
3452
- isOneToOne: false;
3453
- referencedRelation: "floriday_connections";
3454
- referencedColumns: ["id"];
3455
- }];
3456
- };
3457
- floriday_agreements_cache: {
3458
- Row: {
3459
- buyer_organization_id: string | null;
3460
- connection_id: string;
3461
- data: import("../integrations/supabase/types").Json;
3462
- fetched_at: string;
3463
- floriday_id: string;
3464
- id: string;
3465
- is_deleted: boolean;
3466
- sequence_number: number;
3467
- status: string | null;
3468
- updated_at: string;
3469
- valid_from: string | null;
3470
- valid_until: string | null;
3471
- };
3472
- Insert: {
3473
- buyer_organization_id?: string | null;
3474
- connection_id: string;
3475
- data?: import("../integrations/supabase/types").Json;
3476
- fetched_at?: string;
3477
- floriday_id: string;
3478
- id?: string;
3479
- is_deleted?: boolean;
3480
- sequence_number?: number;
3481
- status?: string | null;
3482
- updated_at?: string;
3483
- valid_from?: string | null;
3484
- valid_until?: string | null;
3485
- };
3486
- Update: {
3487
- buyer_organization_id?: string | null;
3488
- connection_id?: string;
3489
- data?: import("../integrations/supabase/types").Json;
3490
- fetched_at?: string;
3491
- floriday_id?: string;
3492
- id?: string;
3493
- is_deleted?: boolean;
3494
- sequence_number?: number;
3495
- status?: string | null;
3496
- updated_at?: string;
3497
- valid_from?: string | null;
3498
- valid_until?: string | null;
3499
- };
3500
- Relationships: [{
3501
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
3502
- columns: ["connection_id"];
3503
- isOneToOne: false;
3504
- referencedRelation: "floriday_connections";
3505
- referencedColumns: ["id"];
3506
- }];
3507
- };
3508
3409
  floriday_auction_letters_cache: {
3509
3410
  Row: {
3510
3411
  auction_letter_code: string;
@@ -5002,6 +4903,45 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
5002
4903
  referencedColumns: ["id"];
5003
4904
  }];
5004
4905
  };
4906
+ floriday_trade_settings_customers_cache: {
4907
+ Row: {
4908
+ connection_id: string;
4909
+ data: import("../integrations/supabase/types").Json;
4910
+ fetched_at: string;
4911
+ floriday_id: string;
4912
+ id: string;
4913
+ is_deleted: boolean;
4914
+ sequence_number: number;
4915
+ updated_at: string;
4916
+ };
4917
+ Insert: {
4918
+ connection_id: string;
4919
+ data: import("../integrations/supabase/types").Json;
4920
+ fetched_at?: string;
4921
+ floriday_id: string;
4922
+ id?: string;
4923
+ is_deleted?: boolean;
4924
+ sequence_number?: number;
4925
+ updated_at?: string;
4926
+ };
4927
+ Update: {
4928
+ connection_id?: string;
4929
+ data?: import("../integrations/supabase/types").Json;
4930
+ fetched_at?: string;
4931
+ floriday_id?: string;
4932
+ id?: string;
4933
+ is_deleted?: boolean;
4934
+ sequence_number?: number;
4935
+ updated_at?: string;
4936
+ };
4937
+ Relationships: [{
4938
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
4939
+ columns: ["connection_id"];
4940
+ isOneToOne: false;
4941
+ referencedRelation: "floriday_connections";
4942
+ referencedColumns: ["id"];
4943
+ }];
4944
+ };
5005
4945
  floriday_trips_cache: {
5006
4946
  Row: {
5007
4947
  carrier_organization_id: string | null;
@@ -7174,6 +7114,105 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7174
7114
  };
7175
7115
  Relationships: [];
7176
7116
  };
7117
+ order_shipment_items: {
7118
+ Row: {
7119
+ created_at: string;
7120
+ id: string;
7121
+ order_item_id: string;
7122
+ product_id: string | null;
7123
+ product_name: string;
7124
+ quantity: number;
7125
+ shipment_id: string;
7126
+ updated_at: string;
7127
+ };
7128
+ Insert: {
7129
+ created_at?: string;
7130
+ id?: string;
7131
+ order_item_id: string;
7132
+ product_id?: string | null;
7133
+ product_name: string;
7134
+ quantity: number;
7135
+ shipment_id: string;
7136
+ updated_at?: string;
7137
+ };
7138
+ Update: {
7139
+ created_at?: string;
7140
+ id?: string;
7141
+ order_item_id?: string;
7142
+ product_id?: string | null;
7143
+ product_name?: string;
7144
+ quantity?: number;
7145
+ shipment_id?: string;
7146
+ updated_at?: string;
7147
+ };
7148
+ Relationships: [{
7149
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
7150
+ columns: ["order_item_id"];
7151
+ isOneToOne: false;
7152
+ referencedRelation: "order_items";
7153
+ referencedColumns: ["id"];
7154
+ }, {
7155
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
7156
+ columns: ["shipment_id"];
7157
+ isOneToOne: false;
7158
+ referencedRelation: "order_shipments";
7159
+ referencedColumns: ["id"];
7160
+ }];
7161
+ };
7162
+ order_shipments: {
7163
+ Row: {
7164
+ carrier_id: string | null;
7165
+ created_at: string;
7166
+ delivery_date: string | null;
7167
+ delivery_location_id: string | null;
7168
+ id: string;
7169
+ notes: string | null;
7170
+ order_id: string;
7171
+ shipment_number: number;
7172
+ shipped_at: string | null;
7173
+ status: string;
7174
+ updated_at: string;
7175
+ };
7176
+ Insert: {
7177
+ carrier_id?: string | null;
7178
+ created_at?: string;
7179
+ delivery_date?: string | null;
7180
+ delivery_location_id?: string | null;
7181
+ id?: string;
7182
+ notes?: string | null;
7183
+ order_id: string;
7184
+ shipment_number: number;
7185
+ shipped_at?: string | null;
7186
+ status?: string;
7187
+ updated_at?: string;
7188
+ };
7189
+ Update: {
7190
+ carrier_id?: string | null;
7191
+ created_at?: string;
7192
+ delivery_date?: string | null;
7193
+ delivery_location_id?: string | null;
7194
+ id?: string;
7195
+ notes?: string | null;
7196
+ order_id?: string;
7197
+ shipment_number?: number;
7198
+ shipped_at?: string | null;
7199
+ status?: string;
7200
+ updated_at?: string;
7201
+ };
7202
+ Relationships: [{
7203
+ foreignKeyName: "order_shipments_carrier_id_fkey";
7204
+ columns: ["carrier_id"];
7205
+ isOneToOne: false;
7206
+ referencedRelation: "carriers";
7207
+ referencedColumns: ["id"];
7208
+ }, {
7209
+ foreignKeyName: "order_shipments_order_id_fkey";
7210
+ columns: ["order_id"];
7211
+ isOneToOne: false;
7212
+ referencedRelation: "orders";
7213
+ referencedColumns: ["id"];
7214
+ }];
7215
+ };
7177
7216
  orders: {
7178
7217
  Row: {
7179
7218
  created_at: string;
@@ -7181,8 +7220,9 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7181
7220
  customer_id: string | null;
7182
7221
  customer_name: string;
7183
7222
  deleted_at: string | null;
7184
- delivery_date: string;
7223
+ delivery_date: string | null;
7185
7224
  id: string;
7225
+ is_reservation: boolean;
7186
7226
  notes: string | null;
7187
7227
  order_date: string;
7188
7228
  order_number: string;
@@ -7199,8 +7239,9 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7199
7239
  customer_id?: string | null;
7200
7240
  customer_name?: string;
7201
7241
  deleted_at?: string | null;
7202
- delivery_date: string;
7242
+ delivery_date?: string | null;
7203
7243
  id?: string;
7244
+ is_reservation?: boolean;
7204
7245
  notes?: string | null;
7205
7246
  order_date?: string;
7206
7247
  order_number: string;
@@ -7217,8 +7258,9 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7217
7258
  customer_id?: string | null;
7218
7259
  customer_name?: string;
7219
7260
  deleted_at?: string | null;
7220
- delivery_date?: string;
7261
+ delivery_date?: string | null;
7221
7262
  id?: string;
7263
+ is_reservation?: boolean;
7222
7264
  notes?: string | null;
7223
7265
  order_date?: string;
7224
7266
  order_number?: string;
@@ -7360,6 +7402,63 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7360
7402
  };
7361
7403
  Relationships: [];
7362
7404
  };
7405
+ product_bom_items: {
7406
+ Row: {
7407
+ component_product_id: string | null;
7408
+ component_trade_item_floriday_id: string | null;
7409
+ created_at: string;
7410
+ id: string;
7411
+ notes: string | null;
7412
+ parent_product_id: string | null;
7413
+ parent_trade_item_floriday_id: string | null;
7414
+ quantity: number;
7415
+ sort_order: number;
7416
+ tenant_id: string;
7417
+ unit: string;
7418
+ updated_at: string;
7419
+ };
7420
+ Insert: {
7421
+ component_product_id?: string | null;
7422
+ component_trade_item_floriday_id?: string | null;
7423
+ created_at?: string;
7424
+ id?: string;
7425
+ notes?: string | null;
7426
+ parent_product_id?: string | null;
7427
+ parent_trade_item_floriday_id?: string | null;
7428
+ quantity?: number;
7429
+ sort_order?: number;
7430
+ tenant_id: string;
7431
+ unit?: string;
7432
+ updated_at?: string;
7433
+ };
7434
+ Update: {
7435
+ component_product_id?: string | null;
7436
+ component_trade_item_floriday_id?: string | null;
7437
+ created_at?: string;
7438
+ id?: string;
7439
+ notes?: string | null;
7440
+ parent_product_id?: string | null;
7441
+ parent_trade_item_floriday_id?: string | null;
7442
+ quantity?: number;
7443
+ sort_order?: number;
7444
+ tenant_id?: string;
7445
+ unit?: string;
7446
+ updated_at?: string;
7447
+ };
7448
+ Relationships: [{
7449
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
7450
+ columns: ["component_product_id"];
7451
+ isOneToOne: false;
7452
+ referencedRelation: "products";
7453
+ referencedColumns: ["id"];
7454
+ }, {
7455
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
7456
+ columns: ["parent_product_id"];
7457
+ isOneToOne: false;
7458
+ referencedRelation: "products";
7459
+ referencedColumns: ["id"];
7460
+ }];
7461
+ };
7363
7462
  product_categories: {
7364
7463
  Row: {
7365
7464
  color: string;
@@ -7465,6 +7564,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7465
7564
  id: string;
7466
7565
  product_group_id: string;
7467
7566
  quantity: number;
7567
+ sort_order: number;
7468
7568
  trade_item_id: string;
7469
7569
  };
7470
7570
  Insert: {
@@ -7472,6 +7572,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7472
7572
  id?: string;
7473
7573
  product_group_id: string;
7474
7574
  quantity?: number;
7575
+ sort_order?: number;
7475
7576
  trade_item_id: string;
7476
7577
  };
7477
7578
  Update: {
@@ -7479,6 +7580,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7479
7580
  id?: string;
7480
7581
  product_group_id?: string;
7481
7582
  quantity?: number;
7583
+ sort_order?: number;
7482
7584
  trade_item_id?: string;
7483
7585
  };
7484
7586
  Relationships: [{
@@ -7493,6 +7595,8 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7493
7595
  Row: {
7494
7596
  created_at: string;
7495
7597
  description: string | null;
7598
+ head_product_id: string | null;
7599
+ head_trade_item_floriday_id: string | null;
7496
7600
  id: string;
7497
7601
  is_active: boolean;
7498
7602
  name: string;
@@ -7502,6 +7606,8 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7502
7606
  Insert: {
7503
7607
  created_at?: string;
7504
7608
  description?: string | null;
7609
+ head_product_id?: string | null;
7610
+ head_trade_item_floriday_id?: string | null;
7505
7611
  id?: string;
7506
7612
  is_active?: boolean;
7507
7613
  name: string;
@@ -7511,16 +7617,85 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7511
7617
  Update: {
7512
7618
  created_at?: string;
7513
7619
  description?: string | null;
7620
+ head_product_id?: string | null;
7621
+ head_trade_item_floriday_id?: string | null;
7514
7622
  id?: string;
7515
7623
  is_active?: boolean;
7516
7624
  name?: string;
7517
7625
  tenant_id?: string;
7518
7626
  updated_at?: string;
7519
7627
  };
7520
- Relationships: [];
7628
+ Relationships: [{
7629
+ foreignKeyName: "product_groups_head_product_id_fkey";
7630
+ columns: ["head_product_id"];
7631
+ isOneToOne: false;
7632
+ referencedRelation: "products";
7633
+ referencedColumns: ["id"];
7634
+ }];
7635
+ };
7636
+ product_load_settings: {
7637
+ Row: {
7638
+ created_at: string;
7639
+ id: string;
7640
+ is_package: boolean;
7641
+ layers_per_load_carrier: number | null;
7642
+ load_carrier: string | null;
7643
+ package_id: string | null;
7644
+ package_label: string | null;
7645
+ packages_per_layer: number | null;
7646
+ product_id: string | null;
7647
+ tenant_id: string;
7648
+ trade_item_floriday_id: string | null;
7649
+ units_per_package: number | null;
7650
+ updated_at: string;
7651
+ };
7652
+ Insert: {
7653
+ created_at?: string;
7654
+ id?: string;
7655
+ is_package?: boolean;
7656
+ layers_per_load_carrier?: number | null;
7657
+ load_carrier?: string | null;
7658
+ package_id?: string | null;
7659
+ package_label?: string | null;
7660
+ packages_per_layer?: number | null;
7661
+ product_id?: string | null;
7662
+ tenant_id: string;
7663
+ trade_item_floriday_id?: string | null;
7664
+ units_per_package?: number | null;
7665
+ updated_at?: string;
7666
+ };
7667
+ Update: {
7668
+ created_at?: string;
7669
+ id?: string;
7670
+ is_package?: boolean;
7671
+ layers_per_load_carrier?: number | null;
7672
+ load_carrier?: string | null;
7673
+ package_id?: string | null;
7674
+ package_label?: string | null;
7675
+ packages_per_layer?: number | null;
7676
+ product_id?: string | null;
7677
+ tenant_id?: string;
7678
+ trade_item_floriday_id?: string | null;
7679
+ units_per_package?: number | null;
7680
+ updated_at?: string;
7681
+ };
7682
+ Relationships: [{
7683
+ foreignKeyName: "product_load_settings_package_id_fkey";
7684
+ columns: ["package_id"];
7685
+ isOneToOne: false;
7686
+ referencedRelation: "packages";
7687
+ referencedColumns: ["id"];
7688
+ }, {
7689
+ foreignKeyName: "product_load_settings_product_id_fkey";
7690
+ columns: ["product_id"];
7691
+ isOneToOne: false;
7692
+ referencedRelation: "products";
7693
+ referencedColumns: ["id"];
7694
+ }];
7521
7695
  };
7522
7696
  products: {
7523
7697
  Row: {
7698
+ article_number: string | null;
7524
7699
  barcode: string | null;
7525
7700
  batch: string;
7526
7701
  crates_per_layer: number;
@@ -7544,6 +7719,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7544
7719
  weight: string | null;
7545
7720
  };
7546
7721
  Insert: {
7722
+ article_number?: string | null;
7547
7723
  barcode?: string | null;
7548
7724
  batch: string;
7549
7725
  crates_per_layer?: number;
@@ -7567,6 +7743,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
7567
7743
  weight?: string | null;
7568
7744
  };
7569
7745
  Update: {
7746
+ article_number?: string | null;
7570
7747
  barcode?: string | null;
7571
7748
  batch?: string;
7572
7749
  crates_per_layer?: number;
@@ -8480,8 +8657,10 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
8480
8657
  order_id: string | null;
8481
8658
  order_item_id: string | null;
8482
8659
  order_source: string | null;
8660
+ parent_trade_item_key: string | null;
8483
8661
  physical_after: number | null;
8484
8662
  physical_before: number | null;
8663
+ production_batch_id: string | null;
8485
8664
  qty_delta: number;
8486
8665
  reason: string | null;
8487
8666
  reserved_after: number | null;
@@ -8497,8 +8676,10 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
8497
8676
  order_id?: string | null;
8498
8677
  order_item_id?: string | null;
8499
8678
  order_source?: string | null;
8679
+ parent_trade_item_key?: string | null;
8500
8680
  physical_after?: number | null;
8501
8681
  physical_before?: number | null;
8682
+ production_batch_id?: string | null;
8502
8683
  qty_delta: number;
8503
8684
  reason?: string | null;
8504
8685
  reserved_after?: number | null;
@@ -8514,8 +8695,10 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
8514
8695
  order_id?: string | null;
8515
8696
  order_item_id?: string | null;
8516
8697
  order_source?: string | null;
8698
+ parent_trade_item_key?: string | null;
8517
8699
  physical_after?: number | null;
8518
8700
  physical_before?: number | null;
8701
+ production_batch_id?: string | null;
8519
8702
  qty_delta?: number;
8520
8703
  reason?: string | null;
8521
8704
  reserved_after?: number | null;
@@ -8974,7 +9157,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
8974
9157
  twinfield_connections: {
8975
9158
  Row: {
8976
9159
  access_token: string | null;
8977
- client_id: string;
9160
+ client_id: string | null;
8978
9161
  client_secret: string | null;
8979
9162
  cluster_uri: string | null;
8980
9163
  company_code: string | null;
@@ -8986,7 +9169,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
8986
9169
  is_active: boolean;
8987
9170
  label: string | null;
8988
9171
  office_code: string | null;
8989
- redirect_uri: string;
9172
+ redirect_uri: string | null;
8990
9173
  refresh_token: string | null;
8991
9174
  token_expires_at: string | null;
8992
9175
  updated_at: string;
@@ -8994,7 +9177,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
8994
9177
  };
8995
9178
  Insert: {
8996
9179
  access_token?: string | null;
8997
- client_id: string;
9180
+ client_id?: string | null;
8998
9181
  client_secret?: string | null;
8999
9182
  cluster_uri?: string | null;
9000
9183
  company_code?: string | null;
@@ -9006,7 +9189,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
9006
9189
  is_active?: boolean;
9007
9190
  label?: string | null;
9008
9191
  office_code?: string | null;
9009
- redirect_uri: string;
9192
+ redirect_uri?: string | null;
9010
9193
  refresh_token?: string | null;
9011
9194
  token_expires_at?: string | null;
9012
9195
  updated_at?: string;
@@ -9014,7 +9197,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
9014
9197
  };
9015
9198
  Update: {
9016
9199
  access_token?: string | null;
9017
- client_id?: string;
9200
+ client_id?: string | null;
9018
9201
  client_secret?: string | null;
9019
9202
  cluster_uri?: string | null;
9020
9203
  company_code?: string | null;
@@ -9026,7 +9209,7 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
9026
9209
  is_active?: boolean;
9027
9210
  label?: string | null;
9028
9211
  office_code?: string | null;
9029
- redirect_uri?: string;
9212
+ redirect_uri?: string | null;
9030
9213
  refresh_token?: string | null;
9031
9214
  token_expires_at?: string | null;
9032
9215
  updated_at?: string;
@@ -10221,25 +10404,6 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
10221
10404
  };
10222
10405
  Relationships: [];
10223
10406
  };
10224
- floriday_customer_discounts: {
10225
- Row: {
10226
- base_price: number | null;
10227
- buyer_organization_id: string | null;
10228
- currency: string | null;
10229
- discount_type: string | null;
10230
- discount_value: number | null;
10231
- min_quantity: number | null;
10232
- net_price: number | null;
10233
- product_group_id: string | null;
10234
- raw: import("../integrations/supabase/types").Json | null;
10235
- source: string | null;
10236
- source_id: string | null;
10237
- trade_item_id: string | null;
10238
- valid_from: string | null;
10239
- valid_until: string | null;
10240
- };
10241
- Relationships: [];
10242
- };
10243
10407
  local_customer_discounts: {
10244
10408
  Row: {
10245
10409
  base_price: number | null;
@@ -10658,6 +10822,28 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
10658
10822
  Args: never;
10659
10823
  Returns: undefined;
10660
10824
  };
10825
+ consume_bom_for_production: {
10826
+ Args: {
10827
+ p_connection_id: string;
10828
+ p_parent_id: string;
10829
+ p_parent_key: string;
10830
+ p_parent_kind: string;
10831
+ p_quantity: number;
10832
+ p_user_id: string;
10833
+ };
10834
+ Returns: import("../integrations/supabase/types").Json;
10835
+ } | {
10836
+ Args: {
10837
+ p_batch_id?: string;
10838
+ p_connection_id: string;
10839
+ p_parent_id: string;
10840
+ p_parent_key: string;
10841
+ p_parent_kind: string;
10842
+ p_quantity: number;
10843
+ p_user_id: string;
10844
+ };
10845
+ Returns: import("../integrations/supabase/types").Json;
10846
+ };
10661
10847
  consume_floriday_rate_limit: {
10662
10848
  Args: {
10663
10849
  p_bucket: string;
@@ -10709,6 +10895,13 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
10709
10895
  table_name: string;
10710
10896
  }[];
10711
10897
  };
10898
+ delete_samenstelling: {
10899
+ Args: {
10900
+ p_parent_id: string;
10901
+ p_parent_kind: string;
10902
+ };
10903
+ Returns: import("../integrations/supabase/types").Json;
10904
+ };
10712
10905
  dispatch_carrier_signups_sql: {
10713
10906
  Args: {
10714
10907
  _catchup?: string;
@@ -10869,19 +11062,6 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
10869
11062
  resource: string;
10870
11063
  }[];
10871
11064
  };
10872
- get_floriday_agreements_active: {
10873
- Args: {
10874
- p_on_date?: string;
10875
- };
10876
- Returns: {
10877
- buyer_organization_id: string;
10878
- data: import("../integrations/supabase/types").Json;
10879
- floriday_id: string;
10880
- status: string;
10881
- valid_from: string;
10882
- valid_until: string;
10883
- }[];
10884
- };
10885
11065
  get_floriday_clock_supplies_window: {
10886
11066
  Args: {
10887
11067
  p_from: string;
@@ -10954,6 +11134,21 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
10954
11134
  minutes_since_success: number;
10955
11135
  }[];
10956
11136
  };
11137
+ get_group_allocation_keys: {
11138
+ Args: {
11139
+ p_product_id: string;
11140
+ };
11141
+ Returns: {
11142
+ k: string;
11143
+ ord: number;
11144
+ }[];
11145
+ };
11146
+ get_group_head_key: {
11147
+ Args: {
11148
+ p_group_id: string;
11149
+ };
11150
+ Returns: string;
11151
+ };
10957
11152
  get_offer_by_link_code: {
10958
11153
  Args: {
10959
11154
  p_code: string;
@@ -11064,6 +11259,12 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
11064
11259
  };
11065
11260
  Returns: undefined;
11066
11261
  };
11262
+ mark_shipment_shipped: {
11263
+ Args: {
11264
+ p_shipment_id: string;
11265
+ };
11266
+ Returns: undefined;
11267
+ };
11067
11268
  next_manufacture_partij: {
11068
11269
  Args: {
11069
11270
  _tenant_id: string;
@@ -11148,6 +11349,14 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
11148
11349
  };
11149
11350
  Returns: undefined;
11150
11351
  };
11352
+ produce_designed_product: {
11353
+ Args: {
11354
+ p_parent_id: string;
11355
+ p_parent_kind: string;
11356
+ p_quantity: number;
11357
+ };
11358
+ Returns: import("../integrations/supabase/types").Json;
11359
+ };
11151
11360
  promote_trade_item_key: {
11152
11361
  Args: {
11153
11362
  p_new: string;
@@ -11155,6 +11364,10 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
11155
11364
  };
11156
11365
  Returns: undefined;
11157
11366
  };
11367
+ recompute_all_reserved_stock: {
11368
+ Args: never;
11369
+ Returns: undefined;
11370
+ };
11158
11371
  recompute_order_status: {
11159
11372
  Args: {
11160
11373
  p_order_id: string;
@@ -11204,27 +11417,45 @@ export declare const getPreferredWarehouseStatus: import("@tanstack/start-client
11204
11417
  };
11205
11418
  Returns: undefined;
11206
11419
  };
11420
+ resolve_group_allocation: {
11421
+ Args: {
11422
+ _needed: number;
11423
+ _product_group_id: string;
11424
+ };
11425
+ Returns: {
11426
+ allocated: number;
11427
+ trade_item_id: string;
11428
+ }[];
11429
+ };
11430
+ resolve_group_member_stock_key: {
11431
+ Args: {
11432
+ p_trade_item_id: string;
11433
+ };
11434
+ Returns: string;
11435
+ };
11207
11436
  resolve_product_id_for_item: {
11208
11437
  Args: {
11209
11438
  p_product_name: string;
11210
11439
  };
11211
11440
  Returns: string;
11212
11441
  };
11213
- schedule_floriday_additional_services_sync: {
11442
+ resolve_stock_trade_item_key: {
11214
11443
  Args: {
11215
- p_apikey: string;
11216
- p_url: string;
11444
+ p_product_id: string;
11217
11445
  };
11218
- Returns: number;
11446
+ Returns: string;
11219
11447
  };
11220
- schedule_floriday_agreement_calloffs_sync: {
11448
+ reverse_production: {
11221
11449
  Args: {
11222
- p_apikey: string;
11223
- p_url: string;
11450
+ p_connection_id?: string;
11451
+ p_parent_key: string;
11452
+ p_quantity: number;
11453
+ p_reason?: string;
11454
+ p_user_id?: string;
11224
11455
  };
11225
- Returns: number;
11456
+ Returns: import("../integrations/supabase/types").Json;
11226
11457
  };
11227
- schedule_floriday_agreements_sync: {
11458
+ schedule_floriday_additional_services_sync: {
11228
11459
  Args: {
11229
11460
  p_apikey: string;
11230
11461
  p_url: string;
@@ -14915,137 +15146,38 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
14915
15146
  status?: string;
14916
15147
  updated_at?: string;
14917
15148
  };
14918
- Relationships: [];
14919
- };
14920
- floriday_additional_services_cache: {
14921
- Row: {
14922
- connection_id: string;
14923
- data: import("../integrations/supabase/types").Json;
14924
- fetched_at: string;
14925
- floriday_id: string;
14926
- is_deleted: boolean;
14927
- sequence_number: number;
14928
- updated_at: string;
14929
- };
14930
- Insert: {
14931
- connection_id: string;
14932
- data: import("../integrations/supabase/types").Json;
14933
- fetched_at?: string;
14934
- floriday_id: string;
14935
- is_deleted?: boolean;
14936
- sequence_number?: number;
14937
- updated_at?: string;
14938
- };
14939
- Update: {
14940
- connection_id?: string;
14941
- data?: import("../integrations/supabase/types").Json;
14942
- fetched_at?: string;
14943
- floriday_id?: string;
14944
- is_deleted?: boolean;
14945
- sequence_number?: number;
14946
- updated_at?: string;
14947
- };
14948
- Relationships: [{
14949
- foreignKeyName: "floriday_additional_services_cache_connection_id_fkey";
14950
- columns: ["connection_id"];
14951
- isOneToOne: false;
14952
- referencedRelation: "floriday_connections";
14953
- referencedColumns: ["id"];
14954
- }];
14955
- };
14956
- floriday_agreement_calloffs_cache: {
14957
- Row: {
14958
- agreement_id: string | null;
14959
- connection_id: string;
14960
- data: import("../integrations/supabase/types").Json;
14961
- delivery_date: string | null;
14962
- fetched_at: string;
14963
- floriday_id: string;
14964
- id: string;
14965
- is_deleted: boolean;
14966
- sequence_number: number;
14967
- status: string | null;
14968
- updated_at: string;
14969
- };
14970
- Insert: {
14971
- agreement_id?: string | null;
14972
- connection_id: string;
14973
- data?: import("../integrations/supabase/types").Json;
14974
- delivery_date?: string | null;
14975
- fetched_at?: string;
14976
- floriday_id: string;
14977
- id?: string;
14978
- is_deleted?: boolean;
14979
- sequence_number?: number;
14980
- status?: string | null;
14981
- updated_at?: string;
14982
- };
14983
- Update: {
14984
- agreement_id?: string | null;
14985
- connection_id?: string;
14986
- data?: import("../integrations/supabase/types").Json;
14987
- delivery_date?: string | null;
14988
- fetched_at?: string;
14989
- floriday_id?: string;
14990
- id?: string;
14991
- is_deleted?: boolean;
14992
- sequence_number?: number;
14993
- status?: string | null;
14994
- updated_at?: string;
14995
- };
14996
- Relationships: [{
14997
- foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
14998
- columns: ["connection_id"];
14999
- isOneToOne: false;
15000
- referencedRelation: "floriday_connections";
15001
- referencedColumns: ["id"];
15002
- }];
15149
+ Relationships: [];
15003
15150
  };
15004
- floriday_agreements_cache: {
15151
+ floriday_additional_services_cache: {
15005
15152
  Row: {
15006
- buyer_organization_id: string | null;
15007
15153
  connection_id: string;
15008
15154
  data: import("../integrations/supabase/types").Json;
15009
15155
  fetched_at: string;
15010
15156
  floriday_id: string;
15011
- id: string;
15012
15157
  is_deleted: boolean;
15013
15158
  sequence_number: number;
15014
- status: string | null;
15015
15159
  updated_at: string;
15016
- valid_from: string | null;
15017
- valid_until: string | null;
15018
15160
  };
15019
15161
  Insert: {
15020
- buyer_organization_id?: string | null;
15021
15162
  connection_id: string;
15022
- data?: import("../integrations/supabase/types").Json;
15163
+ data: import("../integrations/supabase/types").Json;
15023
15164
  fetched_at?: string;
15024
15165
  floriday_id: string;
15025
- id?: string;
15026
15166
  is_deleted?: boolean;
15027
15167
  sequence_number?: number;
15028
- status?: string | null;
15029
15168
  updated_at?: string;
15030
- valid_from?: string | null;
15031
- valid_until?: string | null;
15032
15169
  };
15033
15170
  Update: {
15034
- buyer_organization_id?: string | null;
15035
15171
  connection_id?: string;
15036
15172
  data?: import("../integrations/supabase/types").Json;
15037
15173
  fetched_at?: string;
15038
15174
  floriday_id?: string;
15039
- id?: string;
15040
15175
  is_deleted?: boolean;
15041
15176
  sequence_number?: number;
15042
- status?: string | null;
15043
15177
  updated_at?: string;
15044
- valid_from?: string | null;
15045
- valid_until?: string | null;
15046
15178
  };
15047
15179
  Relationships: [{
15048
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
15180
+ foreignKeyName: "floriday_additional_services_cache_connection_id_fkey";
15049
15181
  columns: ["connection_id"];
15050
15182
  isOneToOne: false;
15051
15183
  referencedRelation: "floriday_connections";
@@ -16549,6 +16681,45 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
16549
16681
  referencedColumns: ["id"];
16550
16682
  }];
16551
16683
  };
16684
+ floriday_trade_settings_customers_cache: {
16685
+ Row: {
16686
+ connection_id: string;
16687
+ data: import("../integrations/supabase/types").Json;
16688
+ fetched_at: string;
16689
+ floriday_id: string;
16690
+ id: string;
16691
+ is_deleted: boolean;
16692
+ sequence_number: number;
16693
+ updated_at: string;
16694
+ };
16695
+ Insert: {
16696
+ connection_id: string;
16697
+ data: import("../integrations/supabase/types").Json;
16698
+ fetched_at?: string;
16699
+ floriday_id: string;
16700
+ id?: string;
16701
+ is_deleted?: boolean;
16702
+ sequence_number?: number;
16703
+ updated_at?: string;
16704
+ };
16705
+ Update: {
16706
+ connection_id?: string;
16707
+ data?: import("../integrations/supabase/types").Json;
16708
+ fetched_at?: string;
16709
+ floriday_id?: string;
16710
+ id?: string;
16711
+ is_deleted?: boolean;
16712
+ sequence_number?: number;
16713
+ updated_at?: string;
16714
+ };
16715
+ Relationships: [{
16716
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
16717
+ columns: ["connection_id"];
16718
+ isOneToOne: false;
16719
+ referencedRelation: "floriday_connections";
16720
+ referencedColumns: ["id"];
16721
+ }];
16722
+ };
16552
16723
  floriday_trips_cache: {
16553
16724
  Row: {
16554
16725
  carrier_organization_id: string | null;
@@ -18721,6 +18892,105 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
18721
18892
  };
18722
18893
  Relationships: [];
18723
18894
  };
18895
+ order_shipment_items: {
18896
+ Row: {
18897
+ created_at: string;
18898
+ id: string;
18899
+ order_item_id: string;
18900
+ product_id: string | null;
18901
+ product_name: string;
18902
+ quantity: number;
18903
+ shipment_id: string;
18904
+ updated_at: string;
18905
+ };
18906
+ Insert: {
18907
+ created_at?: string;
18908
+ id?: string;
18909
+ order_item_id: string;
18910
+ product_id?: string | null;
18911
+ product_name: string;
18912
+ quantity: number;
18913
+ shipment_id: string;
18914
+ updated_at?: string;
18915
+ };
18916
+ Update: {
18917
+ created_at?: string;
18918
+ id?: string;
18919
+ order_item_id?: string;
18920
+ product_id?: string | null;
18921
+ product_name?: string;
18922
+ quantity?: number;
18923
+ shipment_id?: string;
18924
+ updated_at?: string;
18925
+ };
18926
+ Relationships: [{
18927
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
18928
+ columns: ["order_item_id"];
18929
+ isOneToOne: false;
18930
+ referencedRelation: "order_items";
18931
+ referencedColumns: ["id"];
18932
+ }, {
18933
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
18934
+ columns: ["shipment_id"];
18935
+ isOneToOne: false;
18936
+ referencedRelation: "order_shipments";
18937
+ referencedColumns: ["id"];
18938
+ }];
18939
+ };
18940
+ order_shipments: {
18941
+ Row: {
18942
+ carrier_id: string | null;
18943
+ created_at: string;
18944
+ delivery_date: string | null;
18945
+ delivery_location_id: string | null;
18946
+ id: string;
18947
+ notes: string | null;
18948
+ order_id: string;
18949
+ shipment_number: number;
18950
+ shipped_at: string | null;
18951
+ status: string;
18952
+ updated_at: string;
18953
+ };
18954
+ Insert: {
18955
+ carrier_id?: string | null;
18956
+ created_at?: string;
18957
+ delivery_date?: string | null;
18958
+ delivery_location_id?: string | null;
18959
+ id?: string;
18960
+ notes?: string | null;
18961
+ order_id: string;
18962
+ shipment_number: number;
18963
+ shipped_at?: string | null;
18964
+ status?: string;
18965
+ updated_at?: string;
18966
+ };
18967
+ Update: {
18968
+ carrier_id?: string | null;
18969
+ created_at?: string;
18970
+ delivery_date?: string | null;
18971
+ delivery_location_id?: string | null;
18972
+ id?: string;
18973
+ notes?: string | null;
18974
+ order_id?: string;
18975
+ shipment_number?: number;
18976
+ shipped_at?: string | null;
18977
+ status?: string;
18978
+ updated_at?: string;
18979
+ };
18980
+ Relationships: [{
18981
+ foreignKeyName: "order_shipments_carrier_id_fkey";
18982
+ columns: ["carrier_id"];
18983
+ isOneToOne: false;
18984
+ referencedRelation: "carriers";
18985
+ referencedColumns: ["id"];
18986
+ }, {
18987
+ foreignKeyName: "order_shipments_order_id_fkey";
18988
+ columns: ["order_id"];
18989
+ isOneToOne: false;
18990
+ referencedRelation: "orders";
18991
+ referencedColumns: ["id"];
18992
+ }];
18993
+ };
18724
18994
  orders: {
18725
18995
  Row: {
18726
18996
  created_at: string;
@@ -18728,8 +18998,9 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
18728
18998
  customer_id: string | null;
18729
18999
  customer_name: string;
18730
19000
  deleted_at: string | null;
18731
- delivery_date: string;
19001
+ delivery_date: string | null;
18732
19002
  id: string;
19003
+ is_reservation: boolean;
18733
19004
  notes: string | null;
18734
19005
  order_date: string;
18735
19006
  order_number: string;
@@ -18746,8 +19017,9 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
18746
19017
  customer_id?: string | null;
18747
19018
  customer_name?: string;
18748
19019
  deleted_at?: string | null;
18749
- delivery_date: string;
19020
+ delivery_date?: string | null;
18750
19021
  id?: string;
19022
+ is_reservation?: boolean;
18751
19023
  notes?: string | null;
18752
19024
  order_date?: string;
18753
19025
  order_number: string;
@@ -18764,8 +19036,9 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
18764
19036
  customer_id?: string | null;
18765
19037
  customer_name?: string;
18766
19038
  deleted_at?: string | null;
18767
- delivery_date?: string;
19039
+ delivery_date?: string | null;
18768
19040
  id?: string;
19041
+ is_reservation?: boolean;
18769
19042
  notes?: string | null;
18770
19043
  order_date?: string;
18771
19044
  order_number?: string;
@@ -18907,6 +19180,63 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
18907
19180
  };
18908
19181
  Relationships: [];
18909
19182
  };
19183
+ product_bom_items: {
19184
+ Row: {
19185
+ component_product_id: string | null;
19186
+ component_trade_item_floriday_id: string | null;
19187
+ created_at: string;
19188
+ id: string;
19189
+ notes: string | null;
19190
+ parent_product_id: string | null;
19191
+ parent_trade_item_floriday_id: string | null;
19192
+ quantity: number;
19193
+ sort_order: number;
19194
+ tenant_id: string;
19195
+ unit: string;
19196
+ updated_at: string;
19197
+ };
19198
+ Insert: {
19199
+ component_product_id?: string | null;
19200
+ component_trade_item_floriday_id?: string | null;
19201
+ created_at?: string;
19202
+ id?: string;
19203
+ notes?: string | null;
19204
+ parent_product_id?: string | null;
19205
+ parent_trade_item_floriday_id?: string | null;
19206
+ quantity?: number;
19207
+ sort_order?: number;
19208
+ tenant_id: string;
19209
+ unit?: string;
19210
+ updated_at?: string;
19211
+ };
19212
+ Update: {
19213
+ component_product_id?: string | null;
19214
+ component_trade_item_floriday_id?: string | null;
19215
+ created_at?: string;
19216
+ id?: string;
19217
+ notes?: string | null;
19218
+ parent_product_id?: string | null;
19219
+ parent_trade_item_floriday_id?: string | null;
19220
+ quantity?: number;
19221
+ sort_order?: number;
19222
+ tenant_id?: string;
19223
+ unit?: string;
19224
+ updated_at?: string;
19225
+ };
19226
+ Relationships: [{
19227
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
19228
+ columns: ["component_product_id"];
19229
+ isOneToOne: false;
19230
+ referencedRelation: "products";
19231
+ referencedColumns: ["id"];
19232
+ }, {
19233
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
19234
+ columns: ["parent_product_id"];
19235
+ isOneToOne: false;
19236
+ referencedRelation: "products";
19237
+ referencedColumns: ["id"];
19238
+ }];
19239
+ };
18910
19240
  product_categories: {
18911
19241
  Row: {
18912
19242
  color: string;
@@ -19012,6 +19342,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
19012
19342
  id: string;
19013
19343
  product_group_id: string;
19014
19344
  quantity: number;
19345
+ sort_order: number;
19015
19346
  trade_item_id: string;
19016
19347
  };
19017
19348
  Insert: {
@@ -19019,6 +19350,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
19019
19350
  id?: string;
19020
19351
  product_group_id: string;
19021
19352
  quantity?: number;
19353
+ sort_order?: number;
19022
19354
  trade_item_id: string;
19023
19355
  };
19024
19356
  Update: {
@@ -19026,6 +19358,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
19026
19358
  id?: string;
19027
19359
  product_group_id?: string;
19028
19360
  quantity?: number;
19361
+ sort_order?: number;
19029
19362
  trade_item_id?: string;
19030
19363
  };
19031
19364
  Relationships: [{
@@ -19040,6 +19373,8 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
19040
19373
  Row: {
19041
19374
  created_at: string;
19042
19375
  description: string | null;
19376
+ head_product_id: string | null;
19377
+ head_trade_item_floriday_id: string | null;
19043
19378
  id: string;
19044
19379
  is_active: boolean;
19045
19380
  name: string;
@@ -19049,6 +19384,8 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
19049
19384
  Insert: {
19050
19385
  created_at?: string;
19051
19386
  description?: string | null;
19387
+ head_product_id?: string | null;
19388
+ head_trade_item_floriday_id?: string | null;
19052
19389
  id?: string;
19053
19390
  is_active?: boolean;
19054
19391
  name: string;
@@ -19058,16 +19395,85 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
19058
19395
  Update: {
19059
19396
  created_at?: string;
19060
19397
  description?: string | null;
19398
+ head_product_id?: string | null;
19399
+ head_trade_item_floriday_id?: string | null;
19061
19400
  id?: string;
19062
19401
  is_active?: boolean;
19063
19402
  name?: string;
19064
19403
  tenant_id?: string;
19065
19404
  updated_at?: string;
19066
19405
  };
19067
- Relationships: [];
19406
+ Relationships: [{
19407
+ foreignKeyName: "product_groups_head_product_id_fkey";
19408
+ columns: ["head_product_id"];
19409
+ isOneToOne: false;
19410
+ referencedRelation: "products";
19411
+ referencedColumns: ["id"];
19412
+ }];
19413
+ };
19414
+ product_load_settings: {
19415
+ Row: {
19416
+ created_at: string;
19417
+ id: string;
19418
+ is_package: boolean;
19419
+ layers_per_load_carrier: number | null;
19420
+ load_carrier: string | null;
19421
+ package_id: string | null;
19422
+ package_label: string | null;
19423
+ packages_per_layer: number | null;
19424
+ product_id: string | null;
19425
+ tenant_id: string;
19426
+ trade_item_floriday_id: string | null;
19427
+ units_per_package: number | null;
19428
+ updated_at: string;
19429
+ };
19430
+ Insert: {
19431
+ created_at?: string;
19432
+ id?: string;
19433
+ is_package?: boolean;
19434
+ layers_per_load_carrier?: number | null;
19435
+ load_carrier?: string | null;
19436
+ package_id?: string | null;
19437
+ package_label?: string | null;
19438
+ packages_per_layer?: number | null;
19439
+ product_id?: string | null;
19440
+ tenant_id: string;
19441
+ trade_item_floriday_id?: string | null;
19442
+ units_per_package?: number | null;
19443
+ updated_at?: string;
19444
+ };
19445
+ Update: {
19446
+ created_at?: string;
19447
+ id?: string;
19448
+ is_package?: boolean;
19449
+ layers_per_load_carrier?: number | null;
19450
+ load_carrier?: string | null;
19451
+ package_id?: string | null;
19452
+ package_label?: string | null;
19453
+ packages_per_layer?: number | null;
19454
+ product_id?: string | null;
19455
+ tenant_id?: string;
19456
+ trade_item_floriday_id?: string | null;
19457
+ units_per_package?: number | null;
19458
+ updated_at?: string;
19459
+ };
19460
+ Relationships: [{
19461
+ foreignKeyName: "product_load_settings_package_id_fkey";
19462
+ columns: ["package_id"];
19463
+ isOneToOne: false;
19464
+ referencedRelation: "packages";
19465
+ referencedColumns: ["id"];
19466
+ }, {
19467
+ foreignKeyName: "product_load_settings_product_id_fkey";
19468
+ columns: ["product_id"];
19469
+ isOneToOne: false;
19470
+ referencedRelation: "products";
19471
+ referencedColumns: ["id"];
19472
+ }];
19068
19473
  };
19069
19474
  products: {
19070
19475
  Row: {
19476
+ article_number: string | null;
19071
19477
  barcode: string | null;
19072
19478
  batch: string;
19073
19479
  crates_per_layer: number;
@@ -19091,6 +19497,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
19091
19497
  weight: string | null;
19092
19498
  };
19093
19499
  Insert: {
19500
+ article_number?: string | null;
19094
19501
  barcode?: string | null;
19095
19502
  batch: string;
19096
19503
  crates_per_layer?: number;
@@ -19114,6 +19521,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
19114
19521
  weight?: string | null;
19115
19522
  };
19116
19523
  Update: {
19524
+ article_number?: string | null;
19117
19525
  barcode?: string | null;
19118
19526
  batch?: string;
19119
19527
  crates_per_layer?: number;
@@ -20027,8 +20435,10 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
20027
20435
  order_id: string | null;
20028
20436
  order_item_id: string | null;
20029
20437
  order_source: string | null;
20438
+ parent_trade_item_key: string | null;
20030
20439
  physical_after: number | null;
20031
20440
  physical_before: number | null;
20441
+ production_batch_id: string | null;
20032
20442
  qty_delta: number;
20033
20443
  reason: string | null;
20034
20444
  reserved_after: number | null;
@@ -20044,8 +20454,10 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
20044
20454
  order_id?: string | null;
20045
20455
  order_item_id?: string | null;
20046
20456
  order_source?: string | null;
20457
+ parent_trade_item_key?: string | null;
20047
20458
  physical_after?: number | null;
20048
20459
  physical_before?: number | null;
20460
+ production_batch_id?: string | null;
20049
20461
  qty_delta: number;
20050
20462
  reason?: string | null;
20051
20463
  reserved_after?: number | null;
@@ -20061,8 +20473,10 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
20061
20473
  order_id?: string | null;
20062
20474
  order_item_id?: string | null;
20063
20475
  order_source?: string | null;
20476
+ parent_trade_item_key?: string | null;
20064
20477
  physical_after?: number | null;
20065
20478
  physical_before?: number | null;
20479
+ production_batch_id?: string | null;
20066
20480
  qty_delta?: number;
20067
20481
  reason?: string | null;
20068
20482
  reserved_after?: number | null;
@@ -20521,7 +20935,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
20521
20935
  twinfield_connections: {
20522
20936
  Row: {
20523
20937
  access_token: string | null;
20524
- client_id: string;
20938
+ client_id: string | null;
20525
20939
  client_secret: string | null;
20526
20940
  cluster_uri: string | null;
20527
20941
  company_code: string | null;
@@ -20533,7 +20947,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
20533
20947
  is_active: boolean;
20534
20948
  label: string | null;
20535
20949
  office_code: string | null;
20536
- redirect_uri: string;
20950
+ redirect_uri: string | null;
20537
20951
  refresh_token: string | null;
20538
20952
  token_expires_at: string | null;
20539
20953
  updated_at: string;
@@ -20541,7 +20955,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
20541
20955
  };
20542
20956
  Insert: {
20543
20957
  access_token?: string | null;
20544
- client_id: string;
20958
+ client_id?: string | null;
20545
20959
  client_secret?: string | null;
20546
20960
  cluster_uri?: string | null;
20547
20961
  company_code?: string | null;
@@ -20553,7 +20967,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
20553
20967
  is_active?: boolean;
20554
20968
  label?: string | null;
20555
20969
  office_code?: string | null;
20556
- redirect_uri: string;
20970
+ redirect_uri?: string | null;
20557
20971
  refresh_token?: string | null;
20558
20972
  token_expires_at?: string | null;
20559
20973
  updated_at?: string;
@@ -20561,7 +20975,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
20561
20975
  };
20562
20976
  Update: {
20563
20977
  access_token?: string | null;
20564
- client_id?: string;
20978
+ client_id?: string | null;
20565
20979
  client_secret?: string | null;
20566
20980
  cluster_uri?: string | null;
20567
20981
  company_code?: string | null;
@@ -20573,7 +20987,7 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
20573
20987
  is_active?: boolean;
20574
20988
  label?: string | null;
20575
20989
  office_code?: string | null;
20576
- redirect_uri?: string;
20990
+ redirect_uri?: string | null;
20577
20991
  refresh_token?: string | null;
20578
20992
  token_expires_at?: string | null;
20579
20993
  updated_at?: string;
@@ -21763,27 +22177,8 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
21763
22177
  status: string | null;
21764
22178
  synced_at: string | null;
21765
22179
  total_excl: number | null;
21766
- total_incl: number | null;
21767
- total_vat: number | null;
21768
- };
21769
- Relationships: [];
21770
- };
21771
- floriday_customer_discounts: {
21772
- Row: {
21773
- base_price: number | null;
21774
- buyer_organization_id: string | null;
21775
- currency: string | null;
21776
- discount_type: string | null;
21777
- discount_value: number | null;
21778
- min_quantity: number | null;
21779
- net_price: number | null;
21780
- product_group_id: string | null;
21781
- raw: import("../integrations/supabase/types").Json | null;
21782
- source: string | null;
21783
- source_id: string | null;
21784
- trade_item_id: string | null;
21785
- valid_from: string | null;
21786
- valid_until: string | null;
22180
+ total_incl: number | null;
22181
+ total_vat: number | null;
21787
22182
  };
21788
22183
  Relationships: [];
21789
22184
  };
@@ -22205,6 +22600,28 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
22205
22600
  Args: never;
22206
22601
  Returns: undefined;
22207
22602
  };
22603
+ consume_bom_for_production: {
22604
+ Args: {
22605
+ p_connection_id: string;
22606
+ p_parent_id: string;
22607
+ p_parent_key: string;
22608
+ p_parent_kind: string;
22609
+ p_quantity: number;
22610
+ p_user_id: string;
22611
+ };
22612
+ Returns: import("../integrations/supabase/types").Json;
22613
+ } | {
22614
+ Args: {
22615
+ p_batch_id?: string;
22616
+ p_connection_id: string;
22617
+ p_parent_id: string;
22618
+ p_parent_key: string;
22619
+ p_parent_kind: string;
22620
+ p_quantity: number;
22621
+ p_user_id: string;
22622
+ };
22623
+ Returns: import("../integrations/supabase/types").Json;
22624
+ };
22208
22625
  consume_floriday_rate_limit: {
22209
22626
  Args: {
22210
22627
  p_bucket: string;
@@ -22256,6 +22673,13 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
22256
22673
  table_name: string;
22257
22674
  }[];
22258
22675
  };
22676
+ delete_samenstelling: {
22677
+ Args: {
22678
+ p_parent_id: string;
22679
+ p_parent_kind: string;
22680
+ };
22681
+ Returns: import("../integrations/supabase/types").Json;
22682
+ };
22259
22683
  dispatch_carrier_signups_sql: {
22260
22684
  Args: {
22261
22685
  _catchup?: string;
@@ -22416,19 +22840,6 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
22416
22840
  resource: string;
22417
22841
  }[];
22418
22842
  };
22419
- get_floriday_agreements_active: {
22420
- Args: {
22421
- p_on_date?: string;
22422
- };
22423
- Returns: {
22424
- buyer_organization_id: string;
22425
- data: import("../integrations/supabase/types").Json;
22426
- floriday_id: string;
22427
- status: string;
22428
- valid_from: string;
22429
- valid_until: string;
22430
- }[];
22431
- };
22432
22843
  get_floriday_clock_supplies_window: {
22433
22844
  Args: {
22434
22845
  p_from: string;
@@ -22501,6 +22912,21 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
22501
22912
  minutes_since_success: number;
22502
22913
  }[];
22503
22914
  };
22915
+ get_group_allocation_keys: {
22916
+ Args: {
22917
+ p_product_id: string;
22918
+ };
22919
+ Returns: {
22920
+ k: string;
22921
+ ord: number;
22922
+ }[];
22923
+ };
22924
+ get_group_head_key: {
22925
+ Args: {
22926
+ p_group_id: string;
22927
+ };
22928
+ Returns: string;
22929
+ };
22504
22930
  get_offer_by_link_code: {
22505
22931
  Args: {
22506
22932
  p_code: string;
@@ -22611,6 +23037,12 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
22611
23037
  };
22612
23038
  Returns: undefined;
22613
23039
  };
23040
+ mark_shipment_shipped: {
23041
+ Args: {
23042
+ p_shipment_id: string;
23043
+ };
23044
+ Returns: undefined;
23045
+ };
22614
23046
  next_manufacture_partij: {
22615
23047
  Args: {
22616
23048
  _tenant_id: string;
@@ -22695,6 +23127,14 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
22695
23127
  };
22696
23128
  Returns: undefined;
22697
23129
  };
23130
+ produce_designed_product: {
23131
+ Args: {
23132
+ p_parent_id: string;
23133
+ p_parent_kind: string;
23134
+ p_quantity: number;
23135
+ };
23136
+ Returns: import("../integrations/supabase/types").Json;
23137
+ };
22698
23138
  promote_trade_item_key: {
22699
23139
  Args: {
22700
23140
  p_new: string;
@@ -22702,6 +23142,10 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
22702
23142
  };
22703
23143
  Returns: undefined;
22704
23144
  };
23145
+ recompute_all_reserved_stock: {
23146
+ Args: never;
23147
+ Returns: undefined;
23148
+ };
22705
23149
  recompute_order_status: {
22706
23150
  Args: {
22707
23151
  p_order_id: string;
@@ -22751,27 +23195,45 @@ export declare const getAutoFulfillmentStatus: import("@tanstack/start-client-co
22751
23195
  };
22752
23196
  Returns: undefined;
22753
23197
  };
23198
+ resolve_group_allocation: {
23199
+ Args: {
23200
+ _needed: number;
23201
+ _product_group_id: string;
23202
+ };
23203
+ Returns: {
23204
+ allocated: number;
23205
+ trade_item_id: string;
23206
+ }[];
23207
+ };
23208
+ resolve_group_member_stock_key: {
23209
+ Args: {
23210
+ p_trade_item_id: string;
23211
+ };
23212
+ Returns: string;
23213
+ };
22754
23214
  resolve_product_id_for_item: {
22755
23215
  Args: {
22756
23216
  p_product_name: string;
22757
23217
  };
22758
23218
  Returns: string;
22759
23219
  };
22760
- schedule_floriday_additional_services_sync: {
23220
+ resolve_stock_trade_item_key: {
22761
23221
  Args: {
22762
- p_apikey: string;
22763
- p_url: string;
23222
+ p_product_id: string;
22764
23223
  };
22765
- Returns: number;
23224
+ Returns: string;
22766
23225
  };
22767
- schedule_floriday_agreement_calloffs_sync: {
23226
+ reverse_production: {
22768
23227
  Args: {
22769
- p_apikey: string;
22770
- p_url: string;
23228
+ p_connection_id?: string;
23229
+ p_parent_key: string;
23230
+ p_quantity: number;
23231
+ p_reason?: string;
23232
+ p_user_id?: string;
22771
23233
  };
22772
- Returns: number;
23234
+ Returns: import("../integrations/supabase/types").Json;
22773
23235
  };
22774
- schedule_floriday_agreements_sync: {
23236
+ schedule_floriday_additional_services_sync: {
22775
23237
  Args: {
22776
23238
  p_apikey: string;
22777
23239
  p_url: string;
@@ -26509,105 +26971,6 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
26509
26971
  referencedColumns: ["id"];
26510
26972
  }];
26511
26973
  };
26512
- floriday_agreement_calloffs_cache: {
26513
- Row: {
26514
- agreement_id: string | null;
26515
- connection_id: string;
26516
- data: import("../integrations/supabase/types").Json;
26517
- delivery_date: string | null;
26518
- fetched_at: string;
26519
- floriday_id: string;
26520
- id: string;
26521
- is_deleted: boolean;
26522
- sequence_number: number;
26523
- status: string | null;
26524
- updated_at: string;
26525
- };
26526
- Insert: {
26527
- agreement_id?: string | null;
26528
- connection_id: string;
26529
- data?: import("../integrations/supabase/types").Json;
26530
- delivery_date?: string | null;
26531
- fetched_at?: string;
26532
- floriday_id: string;
26533
- id?: string;
26534
- is_deleted?: boolean;
26535
- sequence_number?: number;
26536
- status?: string | null;
26537
- updated_at?: string;
26538
- };
26539
- Update: {
26540
- agreement_id?: string | null;
26541
- connection_id?: string;
26542
- data?: import("../integrations/supabase/types").Json;
26543
- delivery_date?: string | null;
26544
- fetched_at?: string;
26545
- floriday_id?: string;
26546
- id?: string;
26547
- is_deleted?: boolean;
26548
- sequence_number?: number;
26549
- status?: string | null;
26550
- updated_at?: string;
26551
- };
26552
- Relationships: [{
26553
- foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
26554
- columns: ["connection_id"];
26555
- isOneToOne: false;
26556
- referencedRelation: "floriday_connections";
26557
- referencedColumns: ["id"];
26558
- }];
26559
- };
26560
- floriday_agreements_cache: {
26561
- Row: {
26562
- buyer_organization_id: string | null;
26563
- connection_id: string;
26564
- data: import("../integrations/supabase/types").Json;
26565
- fetched_at: string;
26566
- floriday_id: string;
26567
- id: string;
26568
- is_deleted: boolean;
26569
- sequence_number: number;
26570
- status: string | null;
26571
- updated_at: string;
26572
- valid_from: string | null;
26573
- valid_until: string | null;
26574
- };
26575
- Insert: {
26576
- buyer_organization_id?: string | null;
26577
- connection_id: string;
26578
- data?: import("../integrations/supabase/types").Json;
26579
- fetched_at?: string;
26580
- floriday_id: string;
26581
- id?: string;
26582
- is_deleted?: boolean;
26583
- sequence_number?: number;
26584
- status?: string | null;
26585
- updated_at?: string;
26586
- valid_from?: string | null;
26587
- valid_until?: string | null;
26588
- };
26589
- Update: {
26590
- buyer_organization_id?: string | null;
26591
- connection_id?: string;
26592
- data?: import("../integrations/supabase/types").Json;
26593
- fetched_at?: string;
26594
- floriday_id?: string;
26595
- id?: string;
26596
- is_deleted?: boolean;
26597
- sequence_number?: number;
26598
- status?: string | null;
26599
- updated_at?: string;
26600
- valid_from?: string | null;
26601
- valid_until?: string | null;
26602
- };
26603
- Relationships: [{
26604
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
26605
- columns: ["connection_id"];
26606
- isOneToOne: false;
26607
- referencedRelation: "floriday_connections";
26608
- referencedColumns: ["id"];
26609
- }];
26610
- };
26611
26974
  floriday_auction_letters_cache: {
26612
26975
  Row: {
26613
26976
  auction_letter_code: string;
@@ -28105,6 +28468,45 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
28105
28468
  referencedColumns: ["id"];
28106
28469
  }];
28107
28470
  };
28471
+ floriday_trade_settings_customers_cache: {
28472
+ Row: {
28473
+ connection_id: string;
28474
+ data: import("../integrations/supabase/types").Json;
28475
+ fetched_at: string;
28476
+ floriday_id: string;
28477
+ id: string;
28478
+ is_deleted: boolean;
28479
+ sequence_number: number;
28480
+ updated_at: string;
28481
+ };
28482
+ Insert: {
28483
+ connection_id: string;
28484
+ data: import("../integrations/supabase/types").Json;
28485
+ fetched_at?: string;
28486
+ floriday_id: string;
28487
+ id?: string;
28488
+ is_deleted?: boolean;
28489
+ sequence_number?: number;
28490
+ updated_at?: string;
28491
+ };
28492
+ Update: {
28493
+ connection_id?: string;
28494
+ data?: import("../integrations/supabase/types").Json;
28495
+ fetched_at?: string;
28496
+ floriday_id?: string;
28497
+ id?: string;
28498
+ is_deleted?: boolean;
28499
+ sequence_number?: number;
28500
+ updated_at?: string;
28501
+ };
28502
+ Relationships: [{
28503
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
28504
+ columns: ["connection_id"];
28505
+ isOneToOne: false;
28506
+ referencedRelation: "floriday_connections";
28507
+ referencedColumns: ["id"];
28508
+ }];
28509
+ };
28108
28510
  floriday_trips_cache: {
28109
28511
  Row: {
28110
28512
  carrier_organization_id: string | null;
@@ -30214,68 +30616,167 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
30214
30616
  };
30215
30617
  Relationships: [];
30216
30618
  };
30217
- order_items: {
30619
+ order_items: {
30620
+ Row: {
30621
+ created_at: string;
30622
+ id: string;
30623
+ order_id: string;
30624
+ product_id: string | null;
30625
+ product_name: string;
30626
+ quantity: number;
30627
+ unit: string;
30628
+ unit_price: number | null;
30629
+ };
30630
+ Insert: {
30631
+ created_at?: string;
30632
+ id?: string;
30633
+ order_id: string;
30634
+ product_id?: string | null;
30635
+ product_name: string;
30636
+ quantity?: number;
30637
+ unit?: string;
30638
+ unit_price?: number | null;
30639
+ };
30640
+ Update: {
30641
+ created_at?: string;
30642
+ id?: string;
30643
+ order_id?: string;
30644
+ product_id?: string | null;
30645
+ product_name?: string;
30646
+ quantity?: number;
30647
+ unit?: string;
30648
+ unit_price?: number | null;
30649
+ };
30650
+ Relationships: [{
30651
+ foreignKeyName: "order_items_order_id_fkey";
30652
+ columns: ["order_id"];
30653
+ isOneToOne: false;
30654
+ referencedRelation: "orders";
30655
+ referencedColumns: ["id"];
30656
+ }, {
30657
+ foreignKeyName: "order_items_product_id_fkey";
30658
+ columns: ["product_id"];
30659
+ isOneToOne: false;
30660
+ referencedRelation: "products";
30661
+ referencedColumns: ["id"];
30662
+ }];
30663
+ };
30664
+ order_number_counters: {
30665
+ Row: {
30666
+ last_value: number;
30667
+ updated_at: string;
30668
+ year: number;
30669
+ };
30670
+ Insert: {
30671
+ last_value?: number;
30672
+ updated_at?: string;
30673
+ year: number;
30674
+ };
30675
+ Update: {
30676
+ last_value?: number;
30677
+ updated_at?: string;
30678
+ year?: number;
30679
+ };
30680
+ Relationships: [];
30681
+ };
30682
+ order_shipment_items: {
30218
30683
  Row: {
30219
30684
  created_at: string;
30220
30685
  id: string;
30221
- order_id: string;
30686
+ order_item_id: string;
30222
30687
  product_id: string | null;
30223
30688
  product_name: string;
30224
30689
  quantity: number;
30225
- unit: string;
30226
- unit_price: number | null;
30690
+ shipment_id: string;
30691
+ updated_at: string;
30227
30692
  };
30228
30693
  Insert: {
30229
30694
  created_at?: string;
30230
30695
  id?: string;
30231
- order_id: string;
30696
+ order_item_id: string;
30232
30697
  product_id?: string | null;
30233
30698
  product_name: string;
30234
- quantity?: number;
30235
- unit?: string;
30236
- unit_price?: number | null;
30699
+ quantity: number;
30700
+ shipment_id: string;
30701
+ updated_at?: string;
30237
30702
  };
30238
30703
  Update: {
30239
30704
  created_at?: string;
30240
30705
  id?: string;
30241
- order_id?: string;
30706
+ order_item_id?: string;
30242
30707
  product_id?: string | null;
30243
30708
  product_name?: string;
30244
30709
  quantity?: number;
30245
- unit?: string;
30246
- unit_price?: number | null;
30710
+ shipment_id?: string;
30711
+ updated_at?: string;
30247
30712
  };
30248
30713
  Relationships: [{
30249
- foreignKeyName: "order_items_order_id_fkey";
30250
- columns: ["order_id"];
30714
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
30715
+ columns: ["order_item_id"];
30251
30716
  isOneToOne: false;
30252
- referencedRelation: "orders";
30717
+ referencedRelation: "order_items";
30253
30718
  referencedColumns: ["id"];
30254
30719
  }, {
30255
- foreignKeyName: "order_items_product_id_fkey";
30256
- columns: ["product_id"];
30720
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
30721
+ columns: ["shipment_id"];
30257
30722
  isOneToOne: false;
30258
- referencedRelation: "products";
30723
+ referencedRelation: "order_shipments";
30259
30724
  referencedColumns: ["id"];
30260
30725
  }];
30261
30726
  };
30262
- order_number_counters: {
30727
+ order_shipments: {
30263
30728
  Row: {
30264
- last_value: number;
30729
+ carrier_id: string | null;
30730
+ created_at: string;
30731
+ delivery_date: string | null;
30732
+ delivery_location_id: string | null;
30733
+ id: string;
30734
+ notes: string | null;
30735
+ order_id: string;
30736
+ shipment_number: number;
30737
+ shipped_at: string | null;
30738
+ status: string;
30265
30739
  updated_at: string;
30266
- year: number;
30267
30740
  };
30268
30741
  Insert: {
30269
- last_value?: number;
30742
+ carrier_id?: string | null;
30743
+ created_at?: string;
30744
+ delivery_date?: string | null;
30745
+ delivery_location_id?: string | null;
30746
+ id?: string;
30747
+ notes?: string | null;
30748
+ order_id: string;
30749
+ shipment_number: number;
30750
+ shipped_at?: string | null;
30751
+ status?: string;
30270
30752
  updated_at?: string;
30271
- year: number;
30272
30753
  };
30273
30754
  Update: {
30274
- last_value?: number;
30755
+ carrier_id?: string | null;
30756
+ created_at?: string;
30757
+ delivery_date?: string | null;
30758
+ delivery_location_id?: string | null;
30759
+ id?: string;
30760
+ notes?: string | null;
30761
+ order_id?: string;
30762
+ shipment_number?: number;
30763
+ shipped_at?: string | null;
30764
+ status?: string;
30275
30765
  updated_at?: string;
30276
- year?: number;
30277
30766
  };
30278
- Relationships: [];
30767
+ Relationships: [{
30768
+ foreignKeyName: "order_shipments_carrier_id_fkey";
30769
+ columns: ["carrier_id"];
30770
+ isOneToOne: false;
30771
+ referencedRelation: "carriers";
30772
+ referencedColumns: ["id"];
30773
+ }, {
30774
+ foreignKeyName: "order_shipments_order_id_fkey";
30775
+ columns: ["order_id"];
30776
+ isOneToOne: false;
30777
+ referencedRelation: "orders";
30778
+ referencedColumns: ["id"];
30779
+ }];
30279
30780
  };
30280
30781
  orders: {
30281
30782
  Row: {
@@ -30284,8 +30785,9 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
30284
30785
  customer_id: string | null;
30285
30786
  customer_name: string;
30286
30787
  deleted_at: string | null;
30287
- delivery_date: string;
30788
+ delivery_date: string | null;
30288
30789
  id: string;
30790
+ is_reservation: boolean;
30289
30791
  notes: string | null;
30290
30792
  order_date: string;
30291
30793
  order_number: string;
@@ -30302,8 +30804,9 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
30302
30804
  customer_id?: string | null;
30303
30805
  customer_name?: string;
30304
30806
  deleted_at?: string | null;
30305
- delivery_date: string;
30807
+ delivery_date?: string | null;
30306
30808
  id?: string;
30809
+ is_reservation?: boolean;
30307
30810
  notes?: string | null;
30308
30811
  order_date?: string;
30309
30812
  order_number: string;
@@ -30320,8 +30823,9 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
30320
30823
  customer_id?: string | null;
30321
30824
  customer_name?: string;
30322
30825
  deleted_at?: string | null;
30323
- delivery_date?: string;
30826
+ delivery_date?: string | null;
30324
30827
  id?: string;
30828
+ is_reservation?: boolean;
30325
30829
  notes?: string | null;
30326
30830
  order_date?: string;
30327
30831
  order_number?: string;
@@ -30463,6 +30967,63 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
30463
30967
  };
30464
30968
  Relationships: [];
30465
30969
  };
30970
+ product_bom_items: {
30971
+ Row: {
30972
+ component_product_id: string | null;
30973
+ component_trade_item_floriday_id: string | null;
30974
+ created_at: string;
30975
+ id: string;
30976
+ notes: string | null;
30977
+ parent_product_id: string | null;
30978
+ parent_trade_item_floriday_id: string | null;
30979
+ quantity: number;
30980
+ sort_order: number;
30981
+ tenant_id: string;
30982
+ unit: string;
30983
+ updated_at: string;
30984
+ };
30985
+ Insert: {
30986
+ component_product_id?: string | null;
30987
+ component_trade_item_floriday_id?: string | null;
30988
+ created_at?: string;
30989
+ id?: string;
30990
+ notes?: string | null;
30991
+ parent_product_id?: string | null;
30992
+ parent_trade_item_floriday_id?: string | null;
30993
+ quantity?: number;
30994
+ sort_order?: number;
30995
+ tenant_id: string;
30996
+ unit?: string;
30997
+ updated_at?: string;
30998
+ };
30999
+ Update: {
31000
+ component_product_id?: string | null;
31001
+ component_trade_item_floriday_id?: string | null;
31002
+ created_at?: string;
31003
+ id?: string;
31004
+ notes?: string | null;
31005
+ parent_product_id?: string | null;
31006
+ parent_trade_item_floriday_id?: string | null;
31007
+ quantity?: number;
31008
+ sort_order?: number;
31009
+ tenant_id?: string;
31010
+ unit?: string;
31011
+ updated_at?: string;
31012
+ };
31013
+ Relationships: [{
31014
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
31015
+ columns: ["component_product_id"];
31016
+ isOneToOne: false;
31017
+ referencedRelation: "products";
31018
+ referencedColumns: ["id"];
31019
+ }, {
31020
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
31021
+ columns: ["parent_product_id"];
31022
+ isOneToOne: false;
31023
+ referencedRelation: "products";
31024
+ referencedColumns: ["id"];
31025
+ }];
31026
+ };
30466
31027
  product_categories: {
30467
31028
  Row: {
30468
31029
  color: string;
@@ -30568,6 +31129,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
30568
31129
  id: string;
30569
31130
  product_group_id: string;
30570
31131
  quantity: number;
31132
+ sort_order: number;
30571
31133
  trade_item_id: string;
30572
31134
  };
30573
31135
  Insert: {
@@ -30575,6 +31137,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
30575
31137
  id?: string;
30576
31138
  product_group_id: string;
30577
31139
  quantity?: number;
31140
+ sort_order?: number;
30578
31141
  trade_item_id: string;
30579
31142
  };
30580
31143
  Update: {
@@ -30582,6 +31145,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
30582
31145
  id?: string;
30583
31146
  product_group_id?: string;
30584
31147
  quantity?: number;
31148
+ sort_order?: number;
30585
31149
  trade_item_id?: string;
30586
31150
  };
30587
31151
  Relationships: [{
@@ -30596,6 +31160,8 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
30596
31160
  Row: {
30597
31161
  created_at: string;
30598
31162
  description: string | null;
31163
+ head_product_id: string | null;
31164
+ head_trade_item_floriday_id: string | null;
30599
31165
  id: string;
30600
31166
  is_active: boolean;
30601
31167
  name: string;
@@ -30605,6 +31171,8 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
30605
31171
  Insert: {
30606
31172
  created_at?: string;
30607
31173
  description?: string | null;
31174
+ head_product_id?: string | null;
31175
+ head_trade_item_floriday_id?: string | null;
30608
31176
  id?: string;
30609
31177
  is_active?: boolean;
30610
31178
  name: string;
@@ -30614,16 +31182,85 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
30614
31182
  Update: {
30615
31183
  created_at?: string;
30616
31184
  description?: string | null;
31185
+ head_product_id?: string | null;
31186
+ head_trade_item_floriday_id?: string | null;
30617
31187
  id?: string;
30618
31188
  is_active?: boolean;
30619
31189
  name?: string;
30620
31190
  tenant_id?: string;
30621
31191
  updated_at?: string;
30622
31192
  };
30623
- Relationships: [];
31193
+ Relationships: [{
31194
+ foreignKeyName: "product_groups_head_product_id_fkey";
31195
+ columns: ["head_product_id"];
31196
+ isOneToOne: false;
31197
+ referencedRelation: "products";
31198
+ referencedColumns: ["id"];
31199
+ }];
31200
+ };
31201
+ product_load_settings: {
31202
+ Row: {
31203
+ created_at: string;
31204
+ id: string;
31205
+ is_package: boolean;
31206
+ layers_per_load_carrier: number | null;
31207
+ load_carrier: string | null;
31208
+ package_id: string | null;
31209
+ package_label: string | null;
31210
+ packages_per_layer: number | null;
31211
+ product_id: string | null;
31212
+ tenant_id: string;
31213
+ trade_item_floriday_id: string | null;
31214
+ units_per_package: number | null;
31215
+ updated_at: string;
31216
+ };
31217
+ Insert: {
31218
+ created_at?: string;
31219
+ id?: string;
31220
+ is_package?: boolean;
31221
+ layers_per_load_carrier?: number | null;
31222
+ load_carrier?: string | null;
31223
+ package_id?: string | null;
31224
+ package_label?: string | null;
31225
+ packages_per_layer?: number | null;
31226
+ product_id?: string | null;
31227
+ tenant_id: string;
31228
+ trade_item_floriday_id?: string | null;
31229
+ units_per_package?: number | null;
31230
+ updated_at?: string;
31231
+ };
31232
+ Update: {
31233
+ created_at?: string;
31234
+ id?: string;
31235
+ is_package?: boolean;
31236
+ layers_per_load_carrier?: number | null;
31237
+ load_carrier?: string | null;
31238
+ package_id?: string | null;
31239
+ package_label?: string | null;
31240
+ packages_per_layer?: number | null;
31241
+ product_id?: string | null;
31242
+ tenant_id?: string;
31243
+ trade_item_floriday_id?: string | null;
31244
+ units_per_package?: number | null;
31245
+ updated_at?: string;
31246
+ };
31247
+ Relationships: [{
31248
+ foreignKeyName: "product_load_settings_package_id_fkey";
31249
+ columns: ["package_id"];
31250
+ isOneToOne: false;
31251
+ referencedRelation: "packages";
31252
+ referencedColumns: ["id"];
31253
+ }, {
31254
+ foreignKeyName: "product_load_settings_product_id_fkey";
31255
+ columns: ["product_id"];
31256
+ isOneToOne: false;
31257
+ referencedRelation: "products";
31258
+ referencedColumns: ["id"];
31259
+ }];
30624
31260
  };
30625
31261
  products: {
30626
31262
  Row: {
31263
+ article_number: string | null;
30627
31264
  barcode: string | null;
30628
31265
  batch: string;
30629
31266
  crates_per_layer: number;
@@ -30647,6 +31284,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
30647
31284
  weight: string | null;
30648
31285
  };
30649
31286
  Insert: {
31287
+ article_number?: string | null;
30650
31288
  barcode?: string | null;
30651
31289
  batch: string;
30652
31290
  crates_per_layer?: number;
@@ -30670,6 +31308,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
30670
31308
  weight?: string | null;
30671
31309
  };
30672
31310
  Update: {
31311
+ article_number?: string | null;
30673
31312
  barcode?: string | null;
30674
31313
  batch?: string;
30675
31314
  crates_per_layer?: number;
@@ -31583,8 +32222,10 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
31583
32222
  order_id: string | null;
31584
32223
  order_item_id: string | null;
31585
32224
  order_source: string | null;
32225
+ parent_trade_item_key: string | null;
31586
32226
  physical_after: number | null;
31587
32227
  physical_before: number | null;
32228
+ production_batch_id: string | null;
31588
32229
  qty_delta: number;
31589
32230
  reason: string | null;
31590
32231
  reserved_after: number | null;
@@ -31600,8 +32241,10 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
31600
32241
  order_id?: string | null;
31601
32242
  order_item_id?: string | null;
31602
32243
  order_source?: string | null;
32244
+ parent_trade_item_key?: string | null;
31603
32245
  physical_after?: number | null;
31604
32246
  physical_before?: number | null;
32247
+ production_batch_id?: string | null;
31605
32248
  qty_delta: number;
31606
32249
  reason?: string | null;
31607
32250
  reserved_after?: number | null;
@@ -31617,8 +32260,10 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
31617
32260
  order_id?: string | null;
31618
32261
  order_item_id?: string | null;
31619
32262
  order_source?: string | null;
32263
+ parent_trade_item_key?: string | null;
31620
32264
  physical_after?: number | null;
31621
32265
  physical_before?: number | null;
32266
+ production_batch_id?: string | null;
31622
32267
  qty_delta?: number;
31623
32268
  reason?: string | null;
31624
32269
  reserved_after?: number | null;
@@ -32077,7 +32722,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
32077
32722
  twinfield_connections: {
32078
32723
  Row: {
32079
32724
  access_token: string | null;
32080
- client_id: string;
32725
+ client_id: string | null;
32081
32726
  client_secret: string | null;
32082
32727
  cluster_uri: string | null;
32083
32728
  company_code: string | null;
@@ -32089,7 +32734,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
32089
32734
  is_active: boolean;
32090
32735
  label: string | null;
32091
32736
  office_code: string | null;
32092
- redirect_uri: string;
32737
+ redirect_uri: string | null;
32093
32738
  refresh_token: string | null;
32094
32739
  token_expires_at: string | null;
32095
32740
  updated_at: string;
@@ -32097,7 +32742,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
32097
32742
  };
32098
32743
  Insert: {
32099
32744
  access_token?: string | null;
32100
- client_id: string;
32745
+ client_id?: string | null;
32101
32746
  client_secret?: string | null;
32102
32747
  cluster_uri?: string | null;
32103
32748
  company_code?: string | null;
@@ -32109,7 +32754,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
32109
32754
  is_active?: boolean;
32110
32755
  label?: string | null;
32111
32756
  office_code?: string | null;
32112
- redirect_uri: string;
32757
+ redirect_uri?: string | null;
32113
32758
  refresh_token?: string | null;
32114
32759
  token_expires_at?: string | null;
32115
32760
  updated_at?: string;
@@ -32117,7 +32762,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
32117
32762
  };
32118
32763
  Update: {
32119
32764
  access_token?: string | null;
32120
- client_id?: string;
32765
+ client_id?: string | null;
32121
32766
  client_secret?: string | null;
32122
32767
  cluster_uri?: string | null;
32123
32768
  company_code?: string | null;
@@ -32129,7 +32774,7 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
32129
32774
  is_active?: boolean;
32130
32775
  label?: string | null;
32131
32776
  office_code?: string | null;
32132
- redirect_uri?: string;
32777
+ redirect_uri?: string | null;
32133
32778
  refresh_token?: string | null;
32134
32779
  token_expires_at?: string | null;
32135
32780
  updated_at?: string;
@@ -33324,25 +33969,6 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
33324
33969
  };
33325
33970
  Relationships: [];
33326
33971
  };
33327
- floriday_customer_discounts: {
33328
- Row: {
33329
- base_price: number | null;
33330
- buyer_organization_id: string | null;
33331
- currency: string | null;
33332
- discount_type: string | null;
33333
- discount_value: number | null;
33334
- min_quantity: number | null;
33335
- net_price: number | null;
33336
- product_group_id: string | null;
33337
- raw: import("../integrations/supabase/types").Json | null;
33338
- source: string | null;
33339
- source_id: string | null;
33340
- trade_item_id: string | null;
33341
- valid_from: string | null;
33342
- valid_until: string | null;
33343
- };
33344
- Relationships: [];
33345
- };
33346
33972
  local_customer_discounts: {
33347
33973
  Row: {
33348
33974
  base_price: number | null;
@@ -33761,6 +34387,28 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
33761
34387
  Args: never;
33762
34388
  Returns: undefined;
33763
34389
  };
34390
+ consume_bom_for_production: {
34391
+ Args: {
34392
+ p_connection_id: string;
34393
+ p_parent_id: string;
34394
+ p_parent_key: string;
34395
+ p_parent_kind: string;
34396
+ p_quantity: number;
34397
+ p_user_id: string;
34398
+ };
34399
+ Returns: import("../integrations/supabase/types").Json;
34400
+ } | {
34401
+ Args: {
34402
+ p_batch_id?: string;
34403
+ p_connection_id: string;
34404
+ p_parent_id: string;
34405
+ p_parent_key: string;
34406
+ p_parent_kind: string;
34407
+ p_quantity: number;
34408
+ p_user_id: string;
34409
+ };
34410
+ Returns: import("../integrations/supabase/types").Json;
34411
+ };
33764
34412
  consume_floriday_rate_limit: {
33765
34413
  Args: {
33766
34414
  p_bucket: string;
@@ -33812,6 +34460,13 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
33812
34460
  table_name: string;
33813
34461
  }[];
33814
34462
  };
34463
+ delete_samenstelling: {
34464
+ Args: {
34465
+ p_parent_id: string;
34466
+ p_parent_kind: string;
34467
+ };
34468
+ Returns: import("../integrations/supabase/types").Json;
34469
+ };
33815
34470
  dispatch_carrier_signups_sql: {
33816
34471
  Args: {
33817
34472
  _catchup?: string;
@@ -33972,19 +34627,6 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
33972
34627
  resource: string;
33973
34628
  }[];
33974
34629
  };
33975
- get_floriday_agreements_active: {
33976
- Args: {
33977
- p_on_date?: string;
33978
- };
33979
- Returns: {
33980
- buyer_organization_id: string;
33981
- data: import("../integrations/supabase/types").Json;
33982
- floriday_id: string;
33983
- status: string;
33984
- valid_from: string;
33985
- valid_until: string;
33986
- }[];
33987
- };
33988
34630
  get_floriday_clock_supplies_window: {
33989
34631
  Args: {
33990
34632
  p_from: string;
@@ -34057,6 +34699,21 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
34057
34699
  minutes_since_success: number;
34058
34700
  }[];
34059
34701
  };
34702
+ get_group_allocation_keys: {
34703
+ Args: {
34704
+ p_product_id: string;
34705
+ };
34706
+ Returns: {
34707
+ k: string;
34708
+ ord: number;
34709
+ }[];
34710
+ };
34711
+ get_group_head_key: {
34712
+ Args: {
34713
+ p_group_id: string;
34714
+ };
34715
+ Returns: string;
34716
+ };
34060
34717
  get_offer_by_link_code: {
34061
34718
  Args: {
34062
34719
  p_code: string;
@@ -34167,6 +34824,12 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
34167
34824
  };
34168
34825
  Returns: undefined;
34169
34826
  };
34827
+ mark_shipment_shipped: {
34828
+ Args: {
34829
+ p_shipment_id: string;
34830
+ };
34831
+ Returns: undefined;
34832
+ };
34170
34833
  next_manufacture_partij: {
34171
34834
  Args: {
34172
34835
  _tenant_id: string;
@@ -34251,6 +34914,14 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
34251
34914
  };
34252
34915
  Returns: undefined;
34253
34916
  };
34917
+ produce_designed_product: {
34918
+ Args: {
34919
+ p_parent_id: string;
34920
+ p_parent_kind: string;
34921
+ p_quantity: number;
34922
+ };
34923
+ Returns: import("../integrations/supabase/types").Json;
34924
+ };
34254
34925
  promote_trade_item_key: {
34255
34926
  Args: {
34256
34927
  p_new: string;
@@ -34258,6 +34929,10 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
34258
34929
  };
34259
34930
  Returns: undefined;
34260
34931
  };
34932
+ recompute_all_reserved_stock: {
34933
+ Args: never;
34934
+ Returns: undefined;
34935
+ };
34261
34936
  recompute_order_status: {
34262
34937
  Args: {
34263
34938
  p_order_id: string;
@@ -34307,27 +34982,45 @@ export declare const retryAutoFulfillment: import("@tanstack/start-client-core")
34307
34982
  };
34308
34983
  Returns: undefined;
34309
34984
  };
34985
+ resolve_group_allocation: {
34986
+ Args: {
34987
+ _needed: number;
34988
+ _product_group_id: string;
34989
+ };
34990
+ Returns: {
34991
+ allocated: number;
34992
+ trade_item_id: string;
34993
+ }[];
34994
+ };
34995
+ resolve_group_member_stock_key: {
34996
+ Args: {
34997
+ p_trade_item_id: string;
34998
+ };
34999
+ Returns: string;
35000
+ };
34310
35001
  resolve_product_id_for_item: {
34311
35002
  Args: {
34312
35003
  p_product_name: string;
34313
35004
  };
34314
35005
  Returns: string;
34315
35006
  };
34316
- schedule_floriday_additional_services_sync: {
35007
+ resolve_stock_trade_item_key: {
34317
35008
  Args: {
34318
- p_apikey: string;
34319
- p_url: string;
35009
+ p_product_id: string;
34320
35010
  };
34321
- Returns: number;
35011
+ Returns: string;
34322
35012
  };
34323
- schedule_floriday_agreement_calloffs_sync: {
35013
+ reverse_production: {
34324
35014
  Args: {
34325
- p_apikey: string;
34326
- p_url: string;
35015
+ p_connection_id?: string;
35016
+ p_parent_key: string;
35017
+ p_quantity: number;
35018
+ p_reason?: string;
35019
+ p_user_id?: string;
34327
35020
  };
34328
- Returns: number;
35021
+ Returns: import("../integrations/supabase/types").Json;
34329
35022
  };
34330
- schedule_floriday_agreements_sync: {
35023
+ schedule_floriday_additional_services_sync: {
34331
35024
  Args: {
34332
35025
  p_apikey: string;
34333
35026
  p_url: string;