@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
@@ -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,16 +7622,85 @@ 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
  };
7525
- Relationships: [];
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
+ }];
7526
7700
  };
7527
7701
  products: {
7528
7702
  Row: {
7703
+ article_number: string | null;
7529
7704
  barcode: string | null;
7530
7705
  batch: string;
7531
7706
  crates_per_layer: number;
@@ -7549,6 +7724,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7549
7724
  weight: string | null;
7550
7725
  };
7551
7726
  Insert: {
7727
+ article_number?: string | null;
7552
7728
  barcode?: string | null;
7553
7729
  batch: string;
7554
7730
  crates_per_layer?: number;
@@ -7572,6 +7748,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7572
7748
  weight?: string | null;
7573
7749
  };
7574
7750
  Update: {
7751
+ article_number?: string | null;
7575
7752
  barcode?: string | null;
7576
7753
  batch?: string;
7577
7754
  crates_per_layer?: number;
@@ -8485,8 +8662,10 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
8485
8662
  order_id: string | null;
8486
8663
  order_item_id: string | null;
8487
8664
  order_source: string | null;
8665
+ parent_trade_item_key: string | null;
8488
8666
  physical_after: number | null;
8489
8667
  physical_before: number | null;
8668
+ production_batch_id: string | null;
8490
8669
  qty_delta: number;
8491
8670
  reason: string | null;
8492
8671
  reserved_after: number | null;
@@ -8502,8 +8681,10 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
8502
8681
  order_id?: string | null;
8503
8682
  order_item_id?: string | null;
8504
8683
  order_source?: string | null;
8684
+ parent_trade_item_key?: string | null;
8505
8685
  physical_after?: number | null;
8506
8686
  physical_before?: number | null;
8687
+ production_batch_id?: string | null;
8507
8688
  qty_delta: number;
8508
8689
  reason?: string | null;
8509
8690
  reserved_after?: number | null;
@@ -8519,8 +8700,10 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
8519
8700
  order_id?: string | null;
8520
8701
  order_item_id?: string | null;
8521
8702
  order_source?: string | null;
8703
+ parent_trade_item_key?: string | null;
8522
8704
  physical_after?: number | null;
8523
8705
  physical_before?: number | null;
8706
+ production_batch_id?: string | null;
8524
8707
  qty_delta?: number;
8525
8708
  reason?: string | null;
8526
8709
  reserved_after?: number | null;
@@ -8979,7 +9162,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
8979
9162
  twinfield_connections: {
8980
9163
  Row: {
8981
9164
  access_token: string | null;
8982
- client_id: string;
9165
+ client_id: string | null;
8983
9166
  client_secret: string | null;
8984
9167
  cluster_uri: string | null;
8985
9168
  company_code: string | null;
@@ -8991,7 +9174,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
8991
9174
  is_active: boolean;
8992
9175
  label: string | null;
8993
9176
  office_code: string | null;
8994
- redirect_uri: string;
9177
+ redirect_uri: string | null;
8995
9178
  refresh_token: string | null;
8996
9179
  token_expires_at: string | null;
8997
9180
  updated_at: string;
@@ -8999,7 +9182,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
8999
9182
  };
9000
9183
  Insert: {
9001
9184
  access_token?: string | null;
9002
- client_id: string;
9185
+ client_id?: string | null;
9003
9186
  client_secret?: string | null;
9004
9187
  cluster_uri?: string | null;
9005
9188
  company_code?: string | null;
@@ -9011,7 +9194,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
9011
9194
  is_active?: boolean;
9012
9195
  label?: string | null;
9013
9196
  office_code?: string | null;
9014
- redirect_uri: string;
9197
+ redirect_uri?: string | null;
9015
9198
  refresh_token?: string | null;
9016
9199
  token_expires_at?: string | null;
9017
9200
  updated_at?: string;
@@ -9019,7 +9202,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
9019
9202
  };
9020
9203
  Update: {
9021
9204
  access_token?: string | null;
9022
- client_id?: string;
9205
+ client_id?: string | null;
9023
9206
  client_secret?: string | null;
9024
9207
  cluster_uri?: string | null;
9025
9208
  company_code?: string | null;
@@ -9031,7 +9214,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
9031
9214
  is_active?: boolean;
9032
9215
  label?: string | null;
9033
9216
  office_code?: string | null;
9034
- redirect_uri?: string;
9217
+ redirect_uri?: string | null;
9035
9218
  refresh_token?: string | null;
9036
9219
  token_expires_at?: string | null;
9037
9220
  updated_at?: string;
@@ -10226,25 +10409,6 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10226
10409
  };
10227
10410
  Relationships: [];
10228
10411
  };
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
10412
  local_customer_discounts: {
10249
10413
  Row: {
10250
10414
  base_price: number | null;
@@ -10663,6 +10827,28 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10663
10827
  Args: never;
10664
10828
  Returns: undefined;
10665
10829
  };
10830
+ consume_bom_for_production: {
10831
+ Args: {
10832
+ p_connection_id: string;
10833
+ p_parent_id: string;
10834
+ p_parent_key: string;
10835
+ p_parent_kind: string;
10836
+ p_quantity: number;
10837
+ p_user_id: string;
10838
+ };
10839
+ Returns: import("../integrations/supabase/types").Json;
10840
+ } | {
10841
+ Args: {
10842
+ p_batch_id?: string;
10843
+ p_connection_id: string;
10844
+ p_parent_id: string;
10845
+ p_parent_key: string;
10846
+ p_parent_kind: string;
10847
+ p_quantity: number;
10848
+ p_user_id: string;
10849
+ };
10850
+ Returns: import("../integrations/supabase/types").Json;
10851
+ };
10666
10852
  consume_floriday_rate_limit: {
10667
10853
  Args: {
10668
10854
  p_bucket: string;
@@ -10714,6 +10900,13 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10714
10900
  table_name: string;
10715
10901
  }[];
10716
10902
  };
10903
+ delete_samenstelling: {
10904
+ Args: {
10905
+ p_parent_id: string;
10906
+ p_parent_kind: string;
10907
+ };
10908
+ Returns: import("../integrations/supabase/types").Json;
10909
+ };
10717
10910
  dispatch_carrier_signups_sql: {
10718
10911
  Args: {
10719
10912
  _catchup?: string;
@@ -10874,19 +11067,6 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10874
11067
  resource: string;
10875
11068
  }[];
10876
11069
  };
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
11070
  get_floriday_clock_supplies_window: {
10891
11071
  Args: {
10892
11072
  p_from: string;
@@ -10959,6 +11139,21 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10959
11139
  minutes_since_success: number;
10960
11140
  }[];
10961
11141
  };
11142
+ get_group_allocation_keys: {
11143
+ Args: {
11144
+ p_product_id: string;
11145
+ };
11146
+ Returns: {
11147
+ k: string;
11148
+ ord: number;
11149
+ }[];
11150
+ };
11151
+ get_group_head_key: {
11152
+ Args: {
11153
+ p_group_id: string;
11154
+ };
11155
+ Returns: string;
11156
+ };
10962
11157
  get_offer_by_link_code: {
10963
11158
  Args: {
10964
11159
  p_code: string;
@@ -11069,6 +11264,12 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
11069
11264
  };
11070
11265
  Returns: undefined;
11071
11266
  };
11267
+ mark_shipment_shipped: {
11268
+ Args: {
11269
+ p_shipment_id: string;
11270
+ };
11271
+ Returns: undefined;
11272
+ };
11072
11273
  next_manufacture_partij: {
11073
11274
  Args: {
11074
11275
  _tenant_id: string;
@@ -11153,6 +11354,14 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
11153
11354
  };
11154
11355
  Returns: undefined;
11155
11356
  };
11357
+ produce_designed_product: {
11358
+ Args: {
11359
+ p_parent_id: string;
11360
+ p_parent_kind: string;
11361
+ p_quantity: number;
11362
+ };
11363
+ Returns: import("../integrations/supabase/types").Json;
11364
+ };
11156
11365
  promote_trade_item_key: {
11157
11366
  Args: {
11158
11367
  p_new: string;
@@ -11160,6 +11369,10 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
11160
11369
  };
11161
11370
  Returns: undefined;
11162
11371
  };
11372
+ recompute_all_reserved_stock: {
11373
+ Args: never;
11374
+ Returns: undefined;
11375
+ };
11163
11376
  recompute_order_status: {
11164
11377
  Args: {
11165
11378
  p_order_id: string;
@@ -11209,27 +11422,45 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
11209
11422
  };
11210
11423
  Returns: undefined;
11211
11424
  };
11425
+ resolve_group_allocation: {
11426
+ Args: {
11427
+ _needed: number;
11428
+ _product_group_id: string;
11429
+ };
11430
+ Returns: {
11431
+ allocated: number;
11432
+ trade_item_id: string;
11433
+ }[];
11434
+ };
11435
+ resolve_group_member_stock_key: {
11436
+ Args: {
11437
+ p_trade_item_id: string;
11438
+ };
11439
+ Returns: string;
11440
+ };
11212
11441
  resolve_product_id_for_item: {
11213
11442
  Args: {
11214
11443
  p_product_name: string;
11215
11444
  };
11216
11445
  Returns: string;
11217
11446
  };
11218
- schedule_floriday_additional_services_sync: {
11447
+ resolve_stock_trade_item_key: {
11219
11448
  Args: {
11220
- p_apikey: string;
11221
- p_url: string;
11449
+ p_product_id: string;
11222
11450
  };
11223
- Returns: number;
11451
+ Returns: string;
11224
11452
  };
11225
- schedule_floriday_agreement_calloffs_sync: {
11453
+ reverse_production: {
11226
11454
  Args: {
11227
- p_apikey: string;
11228
- p_url: string;
11455
+ p_connection_id?: string;
11456
+ p_parent_key: string;
11457
+ p_quantity: number;
11458
+ p_reason?: string;
11459
+ p_user_id?: string;
11229
11460
  };
11230
- Returns: number;
11461
+ Returns: import("../integrations/supabase/types").Json;
11231
11462
  };
11232
- schedule_floriday_agreements_sync: {
11463
+ schedule_floriday_additional_services_sync: {
11233
11464
  Args: {
11234
11465
  p_apikey: string;
11235
11466
  p_url: string;
@@ -14920,137 +15151,38 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
14920
15151
  status?: string;
14921
15152
  updated_at?: string;
14922
15153
  };
14923
- Relationships: [];
14924
- };
14925
- floriday_additional_services_cache: {
14926
- Row: {
14927
- connection_id: string;
14928
- data: import("../integrations/supabase/types").Json;
14929
- fetched_at: string;
14930
- floriday_id: string;
14931
- is_deleted: boolean;
14932
- sequence_number: number;
14933
- updated_at: string;
14934
- };
14935
- Insert: {
14936
- connection_id: string;
14937
- data: import("../integrations/supabase/types").Json;
14938
- fetched_at?: string;
14939
- floriday_id: string;
14940
- is_deleted?: boolean;
14941
- sequence_number?: number;
14942
- updated_at?: string;
14943
- };
14944
- Update: {
14945
- connection_id?: string;
14946
- data?: import("../integrations/supabase/types").Json;
14947
- fetched_at?: string;
14948
- floriday_id?: string;
14949
- is_deleted?: boolean;
14950
- sequence_number?: number;
14951
- updated_at?: string;
14952
- };
14953
- 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
- }];
15154
+ Relationships: [];
15008
15155
  };
15009
- floriday_agreements_cache: {
15156
+ floriday_additional_services_cache: {
15010
15157
  Row: {
15011
- buyer_organization_id: string | null;
15012
15158
  connection_id: string;
15013
15159
  data: import("../integrations/supabase/types").Json;
15014
15160
  fetched_at: string;
15015
15161
  floriday_id: string;
15016
- id: string;
15017
15162
  is_deleted: boolean;
15018
15163
  sequence_number: number;
15019
- status: string | null;
15020
15164
  updated_at: string;
15021
- valid_from: string | null;
15022
- valid_until: string | null;
15023
15165
  };
15024
15166
  Insert: {
15025
- buyer_organization_id?: string | null;
15026
15167
  connection_id: string;
15027
- data?: import("../integrations/supabase/types").Json;
15168
+ data: import("../integrations/supabase/types").Json;
15028
15169
  fetched_at?: string;
15029
15170
  floriday_id: string;
15030
- id?: string;
15031
15171
  is_deleted?: boolean;
15032
15172
  sequence_number?: number;
15033
- status?: string | null;
15034
15173
  updated_at?: string;
15035
- valid_from?: string | null;
15036
- valid_until?: string | null;
15037
15174
  };
15038
15175
  Update: {
15039
- buyer_organization_id?: string | null;
15040
15176
  connection_id?: string;
15041
15177
  data?: import("../integrations/supabase/types").Json;
15042
15178
  fetched_at?: string;
15043
15179
  floriday_id?: string;
15044
- id?: string;
15045
15180
  is_deleted?: boolean;
15046
15181
  sequence_number?: number;
15047
- status?: string | null;
15048
15182
  updated_at?: string;
15049
- valid_from?: string | null;
15050
- valid_until?: string | null;
15051
15183
  };
15052
15184
  Relationships: [{
15053
- foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
15185
+ foreignKeyName: "floriday_additional_services_cache_connection_id_fkey";
15054
15186
  columns: ["connection_id"];
15055
15187
  isOneToOne: false;
15056
15188
  referencedRelation: "floriday_connections";
@@ -16554,6 +16686,45 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
16554
16686
  referencedColumns: ["id"];
16555
16687
  }];
16556
16688
  };
16689
+ floriday_trade_settings_customers_cache: {
16690
+ Row: {
16691
+ connection_id: string;
16692
+ data: import("../integrations/supabase/types").Json;
16693
+ fetched_at: string;
16694
+ floriday_id: string;
16695
+ id: string;
16696
+ is_deleted: boolean;
16697
+ sequence_number: number;
16698
+ updated_at: string;
16699
+ };
16700
+ Insert: {
16701
+ connection_id: string;
16702
+ data: import("../integrations/supabase/types").Json;
16703
+ fetched_at?: string;
16704
+ floriday_id: string;
16705
+ id?: string;
16706
+ is_deleted?: boolean;
16707
+ sequence_number?: number;
16708
+ updated_at?: string;
16709
+ };
16710
+ Update: {
16711
+ connection_id?: string;
16712
+ data?: import("../integrations/supabase/types").Json;
16713
+ fetched_at?: string;
16714
+ floriday_id?: string;
16715
+ id?: string;
16716
+ is_deleted?: boolean;
16717
+ sequence_number?: number;
16718
+ updated_at?: string;
16719
+ };
16720
+ Relationships: [{
16721
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
16722
+ columns: ["connection_id"];
16723
+ isOneToOne: false;
16724
+ referencedRelation: "floriday_connections";
16725
+ referencedColumns: ["id"];
16726
+ }];
16727
+ };
16557
16728
  floriday_trips_cache: {
16558
16729
  Row: {
16559
16730
  carrier_organization_id: string | null;
@@ -18726,6 +18897,105 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
18726
18897
  };
18727
18898
  Relationships: [];
18728
18899
  };
18900
+ order_shipment_items: {
18901
+ Row: {
18902
+ created_at: string;
18903
+ id: string;
18904
+ order_item_id: string;
18905
+ product_id: string | null;
18906
+ product_name: string;
18907
+ quantity: number;
18908
+ shipment_id: string;
18909
+ updated_at: string;
18910
+ };
18911
+ Insert: {
18912
+ created_at?: string;
18913
+ id?: string;
18914
+ order_item_id: string;
18915
+ product_id?: string | null;
18916
+ product_name: string;
18917
+ quantity: number;
18918
+ shipment_id: string;
18919
+ updated_at?: string;
18920
+ };
18921
+ Update: {
18922
+ created_at?: string;
18923
+ id?: string;
18924
+ order_item_id?: string;
18925
+ product_id?: string | null;
18926
+ product_name?: string;
18927
+ quantity?: number;
18928
+ shipment_id?: string;
18929
+ updated_at?: string;
18930
+ };
18931
+ Relationships: [{
18932
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
18933
+ columns: ["order_item_id"];
18934
+ isOneToOne: false;
18935
+ referencedRelation: "order_items";
18936
+ referencedColumns: ["id"];
18937
+ }, {
18938
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
18939
+ columns: ["shipment_id"];
18940
+ isOneToOne: false;
18941
+ referencedRelation: "order_shipments";
18942
+ referencedColumns: ["id"];
18943
+ }];
18944
+ };
18945
+ order_shipments: {
18946
+ Row: {
18947
+ carrier_id: string | null;
18948
+ created_at: string;
18949
+ delivery_date: string | null;
18950
+ delivery_location_id: string | null;
18951
+ id: string;
18952
+ notes: string | null;
18953
+ order_id: string;
18954
+ shipment_number: number;
18955
+ shipped_at: string | null;
18956
+ status: string;
18957
+ updated_at: string;
18958
+ };
18959
+ Insert: {
18960
+ carrier_id?: string | null;
18961
+ created_at?: string;
18962
+ delivery_date?: string | null;
18963
+ delivery_location_id?: string | null;
18964
+ id?: string;
18965
+ notes?: string | null;
18966
+ order_id: string;
18967
+ shipment_number: number;
18968
+ shipped_at?: string | null;
18969
+ status?: string;
18970
+ updated_at?: string;
18971
+ };
18972
+ Update: {
18973
+ carrier_id?: string | null;
18974
+ created_at?: string;
18975
+ delivery_date?: string | null;
18976
+ delivery_location_id?: string | null;
18977
+ id?: string;
18978
+ notes?: string | null;
18979
+ order_id?: string;
18980
+ shipment_number?: number;
18981
+ shipped_at?: string | null;
18982
+ status?: string;
18983
+ updated_at?: string;
18984
+ };
18985
+ Relationships: [{
18986
+ foreignKeyName: "order_shipments_carrier_id_fkey";
18987
+ columns: ["carrier_id"];
18988
+ isOneToOne: false;
18989
+ referencedRelation: "carriers";
18990
+ referencedColumns: ["id"];
18991
+ }, {
18992
+ foreignKeyName: "order_shipments_order_id_fkey";
18993
+ columns: ["order_id"];
18994
+ isOneToOne: false;
18995
+ referencedRelation: "orders";
18996
+ referencedColumns: ["id"];
18997
+ }];
18998
+ };
18729
18999
  orders: {
18730
19000
  Row: {
18731
19001
  created_at: string;
@@ -18733,8 +19003,9 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
18733
19003
  customer_id: string | null;
18734
19004
  customer_name: string;
18735
19005
  deleted_at: string | null;
18736
- delivery_date: string;
19006
+ delivery_date: string | null;
18737
19007
  id: string;
19008
+ is_reservation: boolean;
18738
19009
  notes: string | null;
18739
19010
  order_date: string;
18740
19011
  order_number: string;
@@ -18751,8 +19022,9 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
18751
19022
  customer_id?: string | null;
18752
19023
  customer_name?: string;
18753
19024
  deleted_at?: string | null;
18754
- delivery_date: string;
19025
+ delivery_date?: string | null;
18755
19026
  id?: string;
19027
+ is_reservation?: boolean;
18756
19028
  notes?: string | null;
18757
19029
  order_date?: string;
18758
19030
  order_number: string;
@@ -18769,8 +19041,9 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
18769
19041
  customer_id?: string | null;
18770
19042
  customer_name?: string;
18771
19043
  deleted_at?: string | null;
18772
- delivery_date?: string;
19044
+ delivery_date?: string | null;
18773
19045
  id?: string;
19046
+ is_reservation?: boolean;
18774
19047
  notes?: string | null;
18775
19048
  order_date?: string;
18776
19049
  order_number?: string;
@@ -18912,6 +19185,63 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
18912
19185
  };
18913
19186
  Relationships: [];
18914
19187
  };
19188
+ product_bom_items: {
19189
+ Row: {
19190
+ component_product_id: string | null;
19191
+ component_trade_item_floriday_id: string | null;
19192
+ created_at: string;
19193
+ id: string;
19194
+ notes: string | null;
19195
+ parent_product_id: string | null;
19196
+ parent_trade_item_floriday_id: string | null;
19197
+ quantity: number;
19198
+ sort_order: number;
19199
+ tenant_id: string;
19200
+ unit: string;
19201
+ updated_at: string;
19202
+ };
19203
+ Insert: {
19204
+ component_product_id?: string | null;
19205
+ component_trade_item_floriday_id?: string | null;
19206
+ created_at?: string;
19207
+ id?: string;
19208
+ notes?: string | null;
19209
+ parent_product_id?: string | null;
19210
+ parent_trade_item_floriday_id?: string | null;
19211
+ quantity?: number;
19212
+ sort_order?: number;
19213
+ tenant_id: string;
19214
+ unit?: string;
19215
+ updated_at?: string;
19216
+ };
19217
+ Update: {
19218
+ component_product_id?: string | null;
19219
+ component_trade_item_floriday_id?: string | null;
19220
+ created_at?: string;
19221
+ id?: string;
19222
+ notes?: string | null;
19223
+ parent_product_id?: string | null;
19224
+ parent_trade_item_floriday_id?: string | null;
19225
+ quantity?: number;
19226
+ sort_order?: number;
19227
+ tenant_id?: string;
19228
+ unit?: string;
19229
+ updated_at?: string;
19230
+ };
19231
+ Relationships: [{
19232
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
19233
+ columns: ["component_product_id"];
19234
+ isOneToOne: false;
19235
+ referencedRelation: "products";
19236
+ referencedColumns: ["id"];
19237
+ }, {
19238
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
19239
+ columns: ["parent_product_id"];
19240
+ isOneToOne: false;
19241
+ referencedRelation: "products";
19242
+ referencedColumns: ["id"];
19243
+ }];
19244
+ };
18915
19245
  product_categories: {
18916
19246
  Row: {
18917
19247
  color: string;
@@ -19017,6 +19347,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19017
19347
  id: string;
19018
19348
  product_group_id: string;
19019
19349
  quantity: number;
19350
+ sort_order: number;
19020
19351
  trade_item_id: string;
19021
19352
  };
19022
19353
  Insert: {
@@ -19024,6 +19355,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19024
19355
  id?: string;
19025
19356
  product_group_id: string;
19026
19357
  quantity?: number;
19358
+ sort_order?: number;
19027
19359
  trade_item_id: string;
19028
19360
  };
19029
19361
  Update: {
@@ -19031,6 +19363,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19031
19363
  id?: string;
19032
19364
  product_group_id?: string;
19033
19365
  quantity?: number;
19366
+ sort_order?: number;
19034
19367
  trade_item_id?: string;
19035
19368
  };
19036
19369
  Relationships: [{
@@ -19045,6 +19378,8 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19045
19378
  Row: {
19046
19379
  created_at: string;
19047
19380
  description: string | null;
19381
+ head_product_id: string | null;
19382
+ head_trade_item_floriday_id: string | null;
19048
19383
  id: string;
19049
19384
  is_active: boolean;
19050
19385
  name: string;
@@ -19054,6 +19389,8 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19054
19389
  Insert: {
19055
19390
  created_at?: string;
19056
19391
  description?: string | null;
19392
+ head_product_id?: string | null;
19393
+ head_trade_item_floriday_id?: string | null;
19057
19394
  id?: string;
19058
19395
  is_active?: boolean;
19059
19396
  name: string;
@@ -19063,16 +19400,85 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19063
19400
  Update: {
19064
19401
  created_at?: string;
19065
19402
  description?: string | null;
19403
+ head_product_id?: string | null;
19404
+ head_trade_item_floriday_id?: string | null;
19066
19405
  id?: string;
19067
19406
  is_active?: boolean;
19068
19407
  name?: string;
19069
19408
  tenant_id?: string;
19070
19409
  updated_at?: string;
19071
19410
  };
19072
- Relationships: [];
19411
+ Relationships: [{
19412
+ foreignKeyName: "product_groups_head_product_id_fkey";
19413
+ columns: ["head_product_id"];
19414
+ isOneToOne: false;
19415
+ referencedRelation: "products";
19416
+ referencedColumns: ["id"];
19417
+ }];
19418
+ };
19419
+ product_load_settings: {
19420
+ Row: {
19421
+ created_at: string;
19422
+ id: string;
19423
+ is_package: boolean;
19424
+ layers_per_load_carrier: number | null;
19425
+ load_carrier: string | null;
19426
+ package_id: string | null;
19427
+ package_label: string | null;
19428
+ packages_per_layer: number | null;
19429
+ product_id: string | null;
19430
+ tenant_id: string;
19431
+ trade_item_floriday_id: string | null;
19432
+ units_per_package: number | null;
19433
+ updated_at: string;
19434
+ };
19435
+ Insert: {
19436
+ created_at?: string;
19437
+ id?: string;
19438
+ is_package?: boolean;
19439
+ layers_per_load_carrier?: number | null;
19440
+ load_carrier?: string | null;
19441
+ package_id?: string | null;
19442
+ package_label?: string | null;
19443
+ packages_per_layer?: number | null;
19444
+ product_id?: string | null;
19445
+ tenant_id: string;
19446
+ trade_item_floriday_id?: string | null;
19447
+ units_per_package?: number | null;
19448
+ updated_at?: string;
19449
+ };
19450
+ Update: {
19451
+ created_at?: string;
19452
+ id?: string;
19453
+ is_package?: boolean;
19454
+ layers_per_load_carrier?: number | null;
19455
+ load_carrier?: string | null;
19456
+ package_id?: string | null;
19457
+ package_label?: string | null;
19458
+ packages_per_layer?: number | null;
19459
+ product_id?: string | null;
19460
+ tenant_id?: string;
19461
+ trade_item_floriday_id?: string | null;
19462
+ units_per_package?: number | null;
19463
+ updated_at?: string;
19464
+ };
19465
+ Relationships: [{
19466
+ foreignKeyName: "product_load_settings_package_id_fkey";
19467
+ columns: ["package_id"];
19468
+ isOneToOne: false;
19469
+ referencedRelation: "packages";
19470
+ referencedColumns: ["id"];
19471
+ }, {
19472
+ foreignKeyName: "product_load_settings_product_id_fkey";
19473
+ columns: ["product_id"];
19474
+ isOneToOne: false;
19475
+ referencedRelation: "products";
19476
+ referencedColumns: ["id"];
19477
+ }];
19073
19478
  };
19074
19479
  products: {
19075
19480
  Row: {
19481
+ article_number: string | null;
19076
19482
  barcode: string | null;
19077
19483
  batch: string;
19078
19484
  crates_per_layer: number;
@@ -19096,6 +19502,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19096
19502
  weight: string | null;
19097
19503
  };
19098
19504
  Insert: {
19505
+ article_number?: string | null;
19099
19506
  barcode?: string | null;
19100
19507
  batch: string;
19101
19508
  crates_per_layer?: number;
@@ -19119,6 +19526,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19119
19526
  weight?: string | null;
19120
19527
  };
19121
19528
  Update: {
19529
+ article_number?: string | null;
19122
19530
  barcode?: string | null;
19123
19531
  batch?: string;
19124
19532
  crates_per_layer?: number;
@@ -20032,8 +20440,10 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20032
20440
  order_id: string | null;
20033
20441
  order_item_id: string | null;
20034
20442
  order_source: string | null;
20443
+ parent_trade_item_key: string | null;
20035
20444
  physical_after: number | null;
20036
20445
  physical_before: number | null;
20446
+ production_batch_id: string | null;
20037
20447
  qty_delta: number;
20038
20448
  reason: string | null;
20039
20449
  reserved_after: number | null;
@@ -20049,8 +20459,10 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20049
20459
  order_id?: string | null;
20050
20460
  order_item_id?: string | null;
20051
20461
  order_source?: string | null;
20462
+ parent_trade_item_key?: string | null;
20052
20463
  physical_after?: number | null;
20053
20464
  physical_before?: number | null;
20465
+ production_batch_id?: string | null;
20054
20466
  qty_delta: number;
20055
20467
  reason?: string | null;
20056
20468
  reserved_after?: number | null;
@@ -20066,8 +20478,10 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20066
20478
  order_id?: string | null;
20067
20479
  order_item_id?: string | null;
20068
20480
  order_source?: string | null;
20481
+ parent_trade_item_key?: string | null;
20069
20482
  physical_after?: number | null;
20070
20483
  physical_before?: number | null;
20484
+ production_batch_id?: string | null;
20071
20485
  qty_delta?: number;
20072
20486
  reason?: string | null;
20073
20487
  reserved_after?: number | null;
@@ -20526,7 +20940,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20526
20940
  twinfield_connections: {
20527
20941
  Row: {
20528
20942
  access_token: string | null;
20529
- client_id: string;
20943
+ client_id: string | null;
20530
20944
  client_secret: string | null;
20531
20945
  cluster_uri: string | null;
20532
20946
  company_code: string | null;
@@ -20538,7 +20952,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20538
20952
  is_active: boolean;
20539
20953
  label: string | null;
20540
20954
  office_code: string | null;
20541
- redirect_uri: string;
20955
+ redirect_uri: string | null;
20542
20956
  refresh_token: string | null;
20543
20957
  token_expires_at: string | null;
20544
20958
  updated_at: string;
@@ -20546,7 +20960,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20546
20960
  };
20547
20961
  Insert: {
20548
20962
  access_token?: string | null;
20549
- client_id: string;
20963
+ client_id?: string | null;
20550
20964
  client_secret?: string | null;
20551
20965
  cluster_uri?: string | null;
20552
20966
  company_code?: string | null;
@@ -20558,7 +20972,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20558
20972
  is_active?: boolean;
20559
20973
  label?: string | null;
20560
20974
  office_code?: string | null;
20561
- redirect_uri: string;
20975
+ redirect_uri?: string | null;
20562
20976
  refresh_token?: string | null;
20563
20977
  token_expires_at?: string | null;
20564
20978
  updated_at?: string;
@@ -20566,7 +20980,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20566
20980
  };
20567
20981
  Update: {
20568
20982
  access_token?: string | null;
20569
- client_id?: string;
20983
+ client_id?: string | null;
20570
20984
  client_secret?: string | null;
20571
20985
  cluster_uri?: string | null;
20572
20986
  company_code?: string | null;
@@ -20578,7 +20992,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20578
20992
  is_active?: boolean;
20579
20993
  label?: string | null;
20580
20994
  office_code?: string | null;
20581
- redirect_uri?: string;
20995
+ redirect_uri?: string | null;
20582
20996
  refresh_token?: string | null;
20583
20997
  token_expires_at?: string | null;
20584
20998
  updated_at?: string;
@@ -21768,27 +22182,8 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
21768
22182
  status: string | null;
21769
22183
  synced_at: string | null;
21770
22184
  total_excl: number | null;
21771
- total_incl: number | null;
21772
- total_vat: number | null;
21773
- };
21774
- Relationships: [];
21775
- };
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;
22185
+ total_incl: number | null;
22186
+ total_vat: number | null;
21792
22187
  };
21793
22188
  Relationships: [];
21794
22189
  };
@@ -22210,6 +22605,28 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
22210
22605
  Args: never;
22211
22606
  Returns: undefined;
22212
22607
  };
22608
+ consume_bom_for_production: {
22609
+ Args: {
22610
+ p_connection_id: string;
22611
+ p_parent_id: string;
22612
+ p_parent_key: string;
22613
+ p_parent_kind: string;
22614
+ p_quantity: number;
22615
+ p_user_id: string;
22616
+ };
22617
+ Returns: import("../integrations/supabase/types").Json;
22618
+ } | {
22619
+ Args: {
22620
+ p_batch_id?: string;
22621
+ p_connection_id: string;
22622
+ p_parent_id: string;
22623
+ p_parent_key: string;
22624
+ p_parent_kind: string;
22625
+ p_quantity: number;
22626
+ p_user_id: string;
22627
+ };
22628
+ Returns: import("../integrations/supabase/types").Json;
22629
+ };
22213
22630
  consume_floriday_rate_limit: {
22214
22631
  Args: {
22215
22632
  p_bucket: string;
@@ -22261,6 +22678,13 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
22261
22678
  table_name: string;
22262
22679
  }[];
22263
22680
  };
22681
+ delete_samenstelling: {
22682
+ Args: {
22683
+ p_parent_id: string;
22684
+ p_parent_kind: string;
22685
+ };
22686
+ Returns: import("../integrations/supabase/types").Json;
22687
+ };
22264
22688
  dispatch_carrier_signups_sql: {
22265
22689
  Args: {
22266
22690
  _catchup?: string;
@@ -22421,19 +22845,6 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
22421
22845
  resource: string;
22422
22846
  }[];
22423
22847
  };
22424
- get_floriday_agreements_active: {
22425
- Args: {
22426
- p_on_date?: string;
22427
- };
22428
- Returns: {
22429
- buyer_organization_id: string;
22430
- data: import("../integrations/supabase/types").Json;
22431
- floriday_id: string;
22432
- status: string;
22433
- valid_from: string;
22434
- valid_until: string;
22435
- }[];
22436
- };
22437
22848
  get_floriday_clock_supplies_window: {
22438
22849
  Args: {
22439
22850
  p_from: string;
@@ -22506,6 +22917,21 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
22506
22917
  minutes_since_success: number;
22507
22918
  }[];
22508
22919
  };
22920
+ get_group_allocation_keys: {
22921
+ Args: {
22922
+ p_product_id: string;
22923
+ };
22924
+ Returns: {
22925
+ k: string;
22926
+ ord: number;
22927
+ }[];
22928
+ };
22929
+ get_group_head_key: {
22930
+ Args: {
22931
+ p_group_id: string;
22932
+ };
22933
+ Returns: string;
22934
+ };
22509
22935
  get_offer_by_link_code: {
22510
22936
  Args: {
22511
22937
  p_code: string;
@@ -22616,6 +23042,12 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
22616
23042
  };
22617
23043
  Returns: undefined;
22618
23044
  };
23045
+ mark_shipment_shipped: {
23046
+ Args: {
23047
+ p_shipment_id: string;
23048
+ };
23049
+ Returns: undefined;
23050
+ };
22619
23051
  next_manufacture_partij: {
22620
23052
  Args: {
22621
23053
  _tenant_id: string;
@@ -22700,6 +23132,14 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
22700
23132
  };
22701
23133
  Returns: undefined;
22702
23134
  };
23135
+ produce_designed_product: {
23136
+ Args: {
23137
+ p_parent_id: string;
23138
+ p_parent_kind: string;
23139
+ p_quantity: number;
23140
+ };
23141
+ Returns: import("../integrations/supabase/types").Json;
23142
+ };
22703
23143
  promote_trade_item_key: {
22704
23144
  Args: {
22705
23145
  p_new: string;
@@ -22707,6 +23147,10 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
22707
23147
  };
22708
23148
  Returns: undefined;
22709
23149
  };
23150
+ recompute_all_reserved_stock: {
23151
+ Args: never;
23152
+ Returns: undefined;
23153
+ };
22710
23154
  recompute_order_status: {
22711
23155
  Args: {
22712
23156
  p_order_id: string;
@@ -22756,27 +23200,45 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
22756
23200
  };
22757
23201
  Returns: undefined;
22758
23202
  };
23203
+ resolve_group_allocation: {
23204
+ Args: {
23205
+ _needed: number;
23206
+ _product_group_id: string;
23207
+ };
23208
+ Returns: {
23209
+ allocated: number;
23210
+ trade_item_id: string;
23211
+ }[];
23212
+ };
23213
+ resolve_group_member_stock_key: {
23214
+ Args: {
23215
+ p_trade_item_id: string;
23216
+ };
23217
+ Returns: string;
23218
+ };
22759
23219
  resolve_product_id_for_item: {
22760
23220
  Args: {
22761
23221
  p_product_name: string;
22762
23222
  };
22763
23223
  Returns: string;
22764
23224
  };
22765
- schedule_floriday_additional_services_sync: {
23225
+ resolve_stock_trade_item_key: {
22766
23226
  Args: {
22767
- p_apikey: string;
22768
- p_url: string;
23227
+ p_product_id: string;
22769
23228
  };
22770
- Returns: number;
23229
+ Returns: string;
22771
23230
  };
22772
- schedule_floriday_agreement_calloffs_sync: {
23231
+ reverse_production: {
22773
23232
  Args: {
22774
- p_apikey: string;
22775
- p_url: string;
23233
+ p_connection_id?: string;
23234
+ p_parent_key: string;
23235
+ p_quantity: number;
23236
+ p_reason?: string;
23237
+ p_user_id?: string;
22776
23238
  };
22777
- Returns: number;
23239
+ Returns: import("../integrations/supabase/types").Json;
22778
23240
  };
22779
- schedule_floriday_agreements_sync: {
23241
+ schedule_floriday_additional_services_sync: {
22780
23242
  Args: {
22781
23243
  p_apikey: string;
22782
23244
  p_url: string;
@@ -26515,105 +26977,6 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
26515
26977
  referencedColumns: ["id"];
26516
26978
  }];
26517
26979
  };
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
26980
  floriday_auction_letters_cache: {
26618
26981
  Row: {
26619
26982
  auction_letter_code: string;
@@ -28111,6 +28474,45 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
28111
28474
  referencedColumns: ["id"];
28112
28475
  }];
28113
28476
  };
28477
+ floriday_trade_settings_customers_cache: {
28478
+ Row: {
28479
+ connection_id: string;
28480
+ data: import("../integrations/supabase/types").Json;
28481
+ fetched_at: string;
28482
+ floriday_id: string;
28483
+ id: string;
28484
+ is_deleted: boolean;
28485
+ sequence_number: number;
28486
+ updated_at: string;
28487
+ };
28488
+ Insert: {
28489
+ connection_id: string;
28490
+ data: import("../integrations/supabase/types").Json;
28491
+ fetched_at?: string;
28492
+ floriday_id: string;
28493
+ id?: string;
28494
+ is_deleted?: boolean;
28495
+ sequence_number?: number;
28496
+ updated_at?: string;
28497
+ };
28498
+ Update: {
28499
+ connection_id?: string;
28500
+ data?: import("../integrations/supabase/types").Json;
28501
+ fetched_at?: string;
28502
+ floriday_id?: string;
28503
+ id?: string;
28504
+ is_deleted?: boolean;
28505
+ sequence_number?: number;
28506
+ updated_at?: string;
28507
+ };
28508
+ Relationships: [{
28509
+ foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
28510
+ columns: ["connection_id"];
28511
+ isOneToOne: false;
28512
+ referencedRelation: "floriday_connections";
28513
+ referencedColumns: ["id"];
28514
+ }];
28515
+ };
28114
28516
  floriday_trips_cache: {
28115
28517
  Row: {
28116
28518
  carrier_organization_id: string | null;
@@ -30220,68 +30622,167 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30220
30622
  };
30221
30623
  Relationships: [];
30222
30624
  };
30223
- order_items: {
30625
+ order_items: {
30626
+ Row: {
30627
+ created_at: string;
30628
+ id: string;
30629
+ order_id: string;
30630
+ product_id: string | null;
30631
+ product_name: string;
30632
+ quantity: number;
30633
+ unit: string;
30634
+ unit_price: number | null;
30635
+ };
30636
+ Insert: {
30637
+ created_at?: string;
30638
+ id?: string;
30639
+ order_id: string;
30640
+ product_id?: string | null;
30641
+ product_name: string;
30642
+ quantity?: number;
30643
+ unit?: string;
30644
+ unit_price?: number | null;
30645
+ };
30646
+ Update: {
30647
+ created_at?: string;
30648
+ id?: string;
30649
+ order_id?: string;
30650
+ product_id?: string | null;
30651
+ product_name?: string;
30652
+ quantity?: number;
30653
+ unit?: string;
30654
+ unit_price?: number | null;
30655
+ };
30656
+ Relationships: [{
30657
+ foreignKeyName: "order_items_order_id_fkey";
30658
+ columns: ["order_id"];
30659
+ isOneToOne: false;
30660
+ referencedRelation: "orders";
30661
+ referencedColumns: ["id"];
30662
+ }, {
30663
+ foreignKeyName: "order_items_product_id_fkey";
30664
+ columns: ["product_id"];
30665
+ isOneToOne: false;
30666
+ referencedRelation: "products";
30667
+ referencedColumns: ["id"];
30668
+ }];
30669
+ };
30670
+ order_number_counters: {
30671
+ Row: {
30672
+ last_value: number;
30673
+ updated_at: string;
30674
+ year: number;
30675
+ };
30676
+ Insert: {
30677
+ last_value?: number;
30678
+ updated_at?: string;
30679
+ year: number;
30680
+ };
30681
+ Update: {
30682
+ last_value?: number;
30683
+ updated_at?: string;
30684
+ year?: number;
30685
+ };
30686
+ Relationships: [];
30687
+ };
30688
+ order_shipment_items: {
30224
30689
  Row: {
30225
30690
  created_at: string;
30226
30691
  id: string;
30227
- order_id: string;
30692
+ order_item_id: string;
30228
30693
  product_id: string | null;
30229
30694
  product_name: string;
30230
30695
  quantity: number;
30231
- unit: string;
30232
- unit_price: number | null;
30696
+ shipment_id: string;
30697
+ updated_at: string;
30233
30698
  };
30234
30699
  Insert: {
30235
30700
  created_at?: string;
30236
30701
  id?: string;
30237
- order_id: string;
30702
+ order_item_id: string;
30238
30703
  product_id?: string | null;
30239
30704
  product_name: string;
30240
- quantity?: number;
30241
- unit?: string;
30242
- unit_price?: number | null;
30705
+ quantity: number;
30706
+ shipment_id: string;
30707
+ updated_at?: string;
30243
30708
  };
30244
30709
  Update: {
30245
30710
  created_at?: string;
30246
30711
  id?: string;
30247
- order_id?: string;
30712
+ order_item_id?: string;
30248
30713
  product_id?: string | null;
30249
30714
  product_name?: string;
30250
30715
  quantity?: number;
30251
- unit?: string;
30252
- unit_price?: number | null;
30716
+ shipment_id?: string;
30717
+ updated_at?: string;
30253
30718
  };
30254
30719
  Relationships: [{
30255
- foreignKeyName: "order_items_order_id_fkey";
30256
- columns: ["order_id"];
30720
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
30721
+ columns: ["order_item_id"];
30257
30722
  isOneToOne: false;
30258
- referencedRelation: "orders";
30723
+ referencedRelation: "order_items";
30259
30724
  referencedColumns: ["id"];
30260
30725
  }, {
30261
- foreignKeyName: "order_items_product_id_fkey";
30262
- columns: ["product_id"];
30726
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
30727
+ columns: ["shipment_id"];
30263
30728
  isOneToOne: false;
30264
- referencedRelation: "products";
30729
+ referencedRelation: "order_shipments";
30265
30730
  referencedColumns: ["id"];
30266
30731
  }];
30267
30732
  };
30268
- order_number_counters: {
30733
+ order_shipments: {
30269
30734
  Row: {
30270
- last_value: number;
30735
+ carrier_id: string | null;
30736
+ created_at: string;
30737
+ delivery_date: string | null;
30738
+ delivery_location_id: string | null;
30739
+ id: string;
30740
+ notes: string | null;
30741
+ order_id: string;
30742
+ shipment_number: number;
30743
+ shipped_at: string | null;
30744
+ status: string;
30271
30745
  updated_at: string;
30272
- year: number;
30273
30746
  };
30274
30747
  Insert: {
30275
- last_value?: number;
30748
+ carrier_id?: string | null;
30749
+ created_at?: string;
30750
+ delivery_date?: string | null;
30751
+ delivery_location_id?: string | null;
30752
+ id?: string;
30753
+ notes?: string | null;
30754
+ order_id: string;
30755
+ shipment_number: number;
30756
+ shipped_at?: string | null;
30757
+ status?: string;
30276
30758
  updated_at?: string;
30277
- year: number;
30278
30759
  };
30279
30760
  Update: {
30280
- last_value?: number;
30761
+ carrier_id?: string | null;
30762
+ created_at?: string;
30763
+ delivery_date?: string | null;
30764
+ delivery_location_id?: string | null;
30765
+ id?: string;
30766
+ notes?: string | null;
30767
+ order_id?: string;
30768
+ shipment_number?: number;
30769
+ shipped_at?: string | null;
30770
+ status?: string;
30281
30771
  updated_at?: string;
30282
- year?: number;
30283
30772
  };
30284
- Relationships: [];
30773
+ Relationships: [{
30774
+ foreignKeyName: "order_shipments_carrier_id_fkey";
30775
+ columns: ["carrier_id"];
30776
+ isOneToOne: false;
30777
+ referencedRelation: "carriers";
30778
+ referencedColumns: ["id"];
30779
+ }, {
30780
+ foreignKeyName: "order_shipments_order_id_fkey";
30781
+ columns: ["order_id"];
30782
+ isOneToOne: false;
30783
+ referencedRelation: "orders";
30784
+ referencedColumns: ["id"];
30785
+ }];
30285
30786
  };
30286
30787
  orders: {
30287
30788
  Row: {
@@ -30290,8 +30791,9 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30290
30791
  customer_id: string | null;
30291
30792
  customer_name: string;
30292
30793
  deleted_at: string | null;
30293
- delivery_date: string;
30794
+ delivery_date: string | null;
30294
30795
  id: string;
30796
+ is_reservation: boolean;
30295
30797
  notes: string | null;
30296
30798
  order_date: string;
30297
30799
  order_number: string;
@@ -30308,8 +30810,9 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30308
30810
  customer_id?: string | null;
30309
30811
  customer_name?: string;
30310
30812
  deleted_at?: string | null;
30311
- delivery_date: string;
30813
+ delivery_date?: string | null;
30312
30814
  id?: string;
30815
+ is_reservation?: boolean;
30313
30816
  notes?: string | null;
30314
30817
  order_date?: string;
30315
30818
  order_number: string;
@@ -30326,8 +30829,9 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30326
30829
  customer_id?: string | null;
30327
30830
  customer_name?: string;
30328
30831
  deleted_at?: string | null;
30329
- delivery_date?: string;
30832
+ delivery_date?: string | null;
30330
30833
  id?: string;
30834
+ is_reservation?: boolean;
30331
30835
  notes?: string | null;
30332
30836
  order_date?: string;
30333
30837
  order_number?: string;
@@ -30469,6 +30973,63 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30469
30973
  };
30470
30974
  Relationships: [];
30471
30975
  };
30976
+ product_bom_items: {
30977
+ Row: {
30978
+ component_product_id: string | null;
30979
+ component_trade_item_floriday_id: string | null;
30980
+ created_at: string;
30981
+ id: string;
30982
+ notes: string | null;
30983
+ parent_product_id: string | null;
30984
+ parent_trade_item_floriday_id: string | null;
30985
+ quantity: number;
30986
+ sort_order: number;
30987
+ tenant_id: string;
30988
+ unit: string;
30989
+ updated_at: string;
30990
+ };
30991
+ Insert: {
30992
+ component_product_id?: string | null;
30993
+ component_trade_item_floriday_id?: string | null;
30994
+ created_at?: string;
30995
+ id?: string;
30996
+ notes?: string | null;
30997
+ parent_product_id?: string | null;
30998
+ parent_trade_item_floriday_id?: string | null;
30999
+ quantity?: number;
31000
+ sort_order?: number;
31001
+ tenant_id: string;
31002
+ unit?: string;
31003
+ updated_at?: string;
31004
+ };
31005
+ Update: {
31006
+ component_product_id?: string | null;
31007
+ component_trade_item_floriday_id?: string | null;
31008
+ created_at?: string;
31009
+ id?: string;
31010
+ notes?: string | null;
31011
+ parent_product_id?: string | null;
31012
+ parent_trade_item_floriday_id?: string | null;
31013
+ quantity?: number;
31014
+ sort_order?: number;
31015
+ tenant_id?: string;
31016
+ unit?: string;
31017
+ updated_at?: string;
31018
+ };
31019
+ Relationships: [{
31020
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
31021
+ columns: ["component_product_id"];
31022
+ isOneToOne: false;
31023
+ referencedRelation: "products";
31024
+ referencedColumns: ["id"];
31025
+ }, {
31026
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
31027
+ columns: ["parent_product_id"];
31028
+ isOneToOne: false;
31029
+ referencedRelation: "products";
31030
+ referencedColumns: ["id"];
31031
+ }];
31032
+ };
30472
31033
  product_categories: {
30473
31034
  Row: {
30474
31035
  color: string;
@@ -30574,6 +31135,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30574
31135
  id: string;
30575
31136
  product_group_id: string;
30576
31137
  quantity: number;
31138
+ sort_order: number;
30577
31139
  trade_item_id: string;
30578
31140
  };
30579
31141
  Insert: {
@@ -30581,6 +31143,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30581
31143
  id?: string;
30582
31144
  product_group_id: string;
30583
31145
  quantity?: number;
31146
+ sort_order?: number;
30584
31147
  trade_item_id: string;
30585
31148
  };
30586
31149
  Update: {
@@ -30588,6 +31151,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30588
31151
  id?: string;
30589
31152
  product_group_id?: string;
30590
31153
  quantity?: number;
31154
+ sort_order?: number;
30591
31155
  trade_item_id?: string;
30592
31156
  };
30593
31157
  Relationships: [{
@@ -30602,6 +31166,8 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30602
31166
  Row: {
30603
31167
  created_at: string;
30604
31168
  description: string | null;
31169
+ head_product_id: string | null;
31170
+ head_trade_item_floriday_id: string | null;
30605
31171
  id: string;
30606
31172
  is_active: boolean;
30607
31173
  name: string;
@@ -30611,6 +31177,8 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30611
31177
  Insert: {
30612
31178
  created_at?: string;
30613
31179
  description?: string | null;
31180
+ head_product_id?: string | null;
31181
+ head_trade_item_floriday_id?: string | null;
30614
31182
  id?: string;
30615
31183
  is_active?: boolean;
30616
31184
  name: string;
@@ -30620,16 +31188,85 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30620
31188
  Update: {
30621
31189
  created_at?: string;
30622
31190
  description?: string | null;
31191
+ head_product_id?: string | null;
31192
+ head_trade_item_floriday_id?: string | null;
30623
31193
  id?: string;
30624
31194
  is_active?: boolean;
30625
31195
  name?: string;
30626
31196
  tenant_id?: string;
30627
31197
  updated_at?: string;
30628
31198
  };
30629
- Relationships: [];
31199
+ Relationships: [{
31200
+ foreignKeyName: "product_groups_head_product_id_fkey";
31201
+ columns: ["head_product_id"];
31202
+ isOneToOne: false;
31203
+ referencedRelation: "products";
31204
+ referencedColumns: ["id"];
31205
+ }];
31206
+ };
31207
+ product_load_settings: {
31208
+ Row: {
31209
+ created_at: string;
31210
+ id: string;
31211
+ is_package: boolean;
31212
+ layers_per_load_carrier: number | null;
31213
+ load_carrier: string | null;
31214
+ package_id: string | null;
31215
+ package_label: string | null;
31216
+ packages_per_layer: number | null;
31217
+ product_id: string | null;
31218
+ tenant_id: string;
31219
+ trade_item_floriday_id: string | null;
31220
+ units_per_package: number | null;
31221
+ updated_at: string;
31222
+ };
31223
+ Insert: {
31224
+ created_at?: string;
31225
+ id?: string;
31226
+ is_package?: boolean;
31227
+ layers_per_load_carrier?: number | null;
31228
+ load_carrier?: string | null;
31229
+ package_id?: string | null;
31230
+ package_label?: string | null;
31231
+ packages_per_layer?: number | null;
31232
+ product_id?: string | null;
31233
+ tenant_id: string;
31234
+ trade_item_floriday_id?: string | null;
31235
+ units_per_package?: number | null;
31236
+ updated_at?: string;
31237
+ };
31238
+ Update: {
31239
+ created_at?: string;
31240
+ id?: string;
31241
+ is_package?: boolean;
31242
+ layers_per_load_carrier?: number | null;
31243
+ load_carrier?: string | null;
31244
+ package_id?: string | null;
31245
+ package_label?: string | null;
31246
+ packages_per_layer?: number | null;
31247
+ product_id?: string | null;
31248
+ tenant_id?: string;
31249
+ trade_item_floriday_id?: string | null;
31250
+ units_per_package?: number | null;
31251
+ updated_at?: string;
31252
+ };
31253
+ Relationships: [{
31254
+ foreignKeyName: "product_load_settings_package_id_fkey";
31255
+ columns: ["package_id"];
31256
+ isOneToOne: false;
31257
+ referencedRelation: "packages";
31258
+ referencedColumns: ["id"];
31259
+ }, {
31260
+ foreignKeyName: "product_load_settings_product_id_fkey";
31261
+ columns: ["product_id"];
31262
+ isOneToOne: false;
31263
+ referencedRelation: "products";
31264
+ referencedColumns: ["id"];
31265
+ }];
30630
31266
  };
30631
31267
  products: {
30632
31268
  Row: {
31269
+ article_number: string | null;
30633
31270
  barcode: string | null;
30634
31271
  batch: string;
30635
31272
  crates_per_layer: number;
@@ -30653,6 +31290,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30653
31290
  weight: string | null;
30654
31291
  };
30655
31292
  Insert: {
31293
+ article_number?: string | null;
30656
31294
  barcode?: string | null;
30657
31295
  batch: string;
30658
31296
  crates_per_layer?: number;
@@ -30676,6 +31314,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30676
31314
  weight?: string | null;
30677
31315
  };
30678
31316
  Update: {
31317
+ article_number?: string | null;
30679
31318
  barcode?: string | null;
30680
31319
  batch?: string;
30681
31320
  crates_per_layer?: number;
@@ -31589,8 +32228,10 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
31589
32228
  order_id: string | null;
31590
32229
  order_item_id: string | null;
31591
32230
  order_source: string | null;
32231
+ parent_trade_item_key: string | null;
31592
32232
  physical_after: number | null;
31593
32233
  physical_before: number | null;
32234
+ production_batch_id: string | null;
31594
32235
  qty_delta: number;
31595
32236
  reason: string | null;
31596
32237
  reserved_after: number | null;
@@ -31606,8 +32247,10 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
31606
32247
  order_id?: string | null;
31607
32248
  order_item_id?: string | null;
31608
32249
  order_source?: string | null;
32250
+ parent_trade_item_key?: string | null;
31609
32251
  physical_after?: number | null;
31610
32252
  physical_before?: number | null;
32253
+ production_batch_id?: string | null;
31611
32254
  qty_delta: number;
31612
32255
  reason?: string | null;
31613
32256
  reserved_after?: number | null;
@@ -31623,8 +32266,10 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
31623
32266
  order_id?: string | null;
31624
32267
  order_item_id?: string | null;
31625
32268
  order_source?: string | null;
32269
+ parent_trade_item_key?: string | null;
31626
32270
  physical_after?: number | null;
31627
32271
  physical_before?: number | null;
32272
+ production_batch_id?: string | null;
31628
32273
  qty_delta?: number;
31629
32274
  reason?: string | null;
31630
32275
  reserved_after?: number | null;
@@ -32083,7 +32728,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
32083
32728
  twinfield_connections: {
32084
32729
  Row: {
32085
32730
  access_token: string | null;
32086
- client_id: string;
32731
+ client_id: string | null;
32087
32732
  client_secret: string | null;
32088
32733
  cluster_uri: string | null;
32089
32734
  company_code: string | null;
@@ -32095,7 +32740,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
32095
32740
  is_active: boolean;
32096
32741
  label: string | null;
32097
32742
  office_code: string | null;
32098
- redirect_uri: string;
32743
+ redirect_uri: string | null;
32099
32744
  refresh_token: string | null;
32100
32745
  token_expires_at: string | null;
32101
32746
  updated_at: string;
@@ -32103,7 +32748,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
32103
32748
  };
32104
32749
  Insert: {
32105
32750
  access_token?: string | null;
32106
- client_id: string;
32751
+ client_id?: string | null;
32107
32752
  client_secret?: string | null;
32108
32753
  cluster_uri?: string | null;
32109
32754
  company_code?: string | null;
@@ -32115,7 +32760,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
32115
32760
  is_active?: boolean;
32116
32761
  label?: string | null;
32117
32762
  office_code?: string | null;
32118
- redirect_uri: string;
32763
+ redirect_uri?: string | null;
32119
32764
  refresh_token?: string | null;
32120
32765
  token_expires_at?: string | null;
32121
32766
  updated_at?: string;
@@ -32123,7 +32768,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
32123
32768
  };
32124
32769
  Update: {
32125
32770
  access_token?: string | null;
32126
- client_id?: string;
32771
+ client_id?: string | null;
32127
32772
  client_secret?: string | null;
32128
32773
  cluster_uri?: string | null;
32129
32774
  company_code?: string | null;
@@ -32135,7 +32780,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
32135
32780
  is_active?: boolean;
32136
32781
  label?: string | null;
32137
32782
  office_code?: string | null;
32138
- redirect_uri?: string;
32783
+ redirect_uri?: string | null;
32139
32784
  refresh_token?: string | null;
32140
32785
  token_expires_at?: string | null;
32141
32786
  updated_at?: string;
@@ -33330,25 +33975,6 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
33330
33975
  };
33331
33976
  Relationships: [];
33332
33977
  };
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
33978
  local_customer_discounts: {
33353
33979
  Row: {
33354
33980
  base_price: number | null;
@@ -33767,6 +34393,28 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
33767
34393
  Args: never;
33768
34394
  Returns: undefined;
33769
34395
  };
34396
+ consume_bom_for_production: {
34397
+ Args: {
34398
+ p_connection_id: string;
34399
+ p_parent_id: string;
34400
+ p_parent_key: string;
34401
+ p_parent_kind: string;
34402
+ p_quantity: number;
34403
+ p_user_id: string;
34404
+ };
34405
+ Returns: import("../integrations/supabase/types").Json;
34406
+ } | {
34407
+ Args: {
34408
+ p_batch_id?: string;
34409
+ p_connection_id: string;
34410
+ p_parent_id: string;
34411
+ p_parent_key: string;
34412
+ p_parent_kind: string;
34413
+ p_quantity: number;
34414
+ p_user_id: string;
34415
+ };
34416
+ Returns: import("../integrations/supabase/types").Json;
34417
+ };
33770
34418
  consume_floriday_rate_limit: {
33771
34419
  Args: {
33772
34420
  p_bucket: string;
@@ -33818,6 +34466,13 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
33818
34466
  table_name: string;
33819
34467
  }[];
33820
34468
  };
34469
+ delete_samenstelling: {
34470
+ Args: {
34471
+ p_parent_id: string;
34472
+ p_parent_kind: string;
34473
+ };
34474
+ Returns: import("../integrations/supabase/types").Json;
34475
+ };
33821
34476
  dispatch_carrier_signups_sql: {
33822
34477
  Args: {
33823
34478
  _catchup?: string;
@@ -33978,19 +34633,6 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
33978
34633
  resource: string;
33979
34634
  }[];
33980
34635
  };
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
34636
  get_floriday_clock_supplies_window: {
33995
34637
  Args: {
33996
34638
  p_from: string;
@@ -34063,6 +34705,21 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
34063
34705
  minutes_since_success: number;
34064
34706
  }[];
34065
34707
  };
34708
+ get_group_allocation_keys: {
34709
+ Args: {
34710
+ p_product_id: string;
34711
+ };
34712
+ Returns: {
34713
+ k: string;
34714
+ ord: number;
34715
+ }[];
34716
+ };
34717
+ get_group_head_key: {
34718
+ Args: {
34719
+ p_group_id: string;
34720
+ };
34721
+ Returns: string;
34722
+ };
34066
34723
  get_offer_by_link_code: {
34067
34724
  Args: {
34068
34725
  p_code: string;
@@ -34173,6 +34830,12 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
34173
34830
  };
34174
34831
  Returns: undefined;
34175
34832
  };
34833
+ mark_shipment_shipped: {
34834
+ Args: {
34835
+ p_shipment_id: string;
34836
+ };
34837
+ Returns: undefined;
34838
+ };
34176
34839
  next_manufacture_partij: {
34177
34840
  Args: {
34178
34841
  _tenant_id: string;
@@ -34257,6 +34920,14 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
34257
34920
  };
34258
34921
  Returns: undefined;
34259
34922
  };
34923
+ produce_designed_product: {
34924
+ Args: {
34925
+ p_parent_id: string;
34926
+ p_parent_kind: string;
34927
+ p_quantity: number;
34928
+ };
34929
+ Returns: import("../integrations/supabase/types").Json;
34930
+ };
34260
34931
  promote_trade_item_key: {
34261
34932
  Args: {
34262
34933
  p_new: string;
@@ -34264,6 +34935,10 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
34264
34935
  };
34265
34936
  Returns: undefined;
34266
34937
  };
34938
+ recompute_all_reserved_stock: {
34939
+ Args: never;
34940
+ Returns: undefined;
34941
+ };
34267
34942
  recompute_order_status: {
34268
34943
  Args: {
34269
34944
  p_order_id: string;
@@ -34313,27 +34988,45 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
34313
34988
  };
34314
34989
  Returns: undefined;
34315
34990
  };
34991
+ resolve_group_allocation: {
34992
+ Args: {
34993
+ _needed: number;
34994
+ _product_group_id: string;
34995
+ };
34996
+ Returns: {
34997
+ allocated: number;
34998
+ trade_item_id: string;
34999
+ }[];
35000
+ };
35001
+ resolve_group_member_stock_key: {
35002
+ Args: {
35003
+ p_trade_item_id: string;
35004
+ };
35005
+ Returns: string;
35006
+ };
34316
35007
  resolve_product_id_for_item: {
34317
35008
  Args: {
34318
35009
  p_product_name: string;
34319
35010
  };
34320
35011
  Returns: string;
34321
35012
  };
34322
- schedule_floriday_additional_services_sync: {
35013
+ resolve_stock_trade_item_key: {
34323
35014
  Args: {
34324
- p_apikey: string;
34325
- p_url: string;
35015
+ p_product_id: string;
34326
35016
  };
34327
- Returns: number;
35017
+ Returns: string;
34328
35018
  };
34329
- schedule_floriday_agreement_calloffs_sync: {
35019
+ reverse_production: {
34330
35020
  Args: {
34331
- p_apikey: string;
34332
- p_url: string;
35021
+ p_connection_id?: string;
35022
+ p_parent_key: string;
35023
+ p_quantity: number;
35024
+ p_reason?: string;
35025
+ p_user_id?: string;
34333
35026
  };
34334
- Returns: number;
35027
+ Returns: import("../integrations/supabase/types").Json;
34335
35028
  };
34336
- schedule_floriday_agreements_sync: {
35029
+ schedule_floriday_additional_services_sync: {
34337
35030
  Args: {
34338
35031
  p_apikey: string;
34339
35032
  p_url: string;