@flowselections/floriday-afhandeling-module 1.0.11 → 1.0.12

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.
@@ -771,6 +771,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
771
771
  notes: string | null;
772
772
  performed_at: string;
773
773
  rescheduled_count: number;
774
+ stock_consumed_at: string | null;
774
775
  total_carts: number;
775
776
  updated_at: string;
776
777
  user_id: string;
@@ -784,6 +785,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
784
785
  notes?: string | null;
785
786
  performed_at?: string;
786
787
  rescheduled_count?: number;
788
+ stock_consumed_at?: string | null;
787
789
  total_carts?: number;
788
790
  updated_at?: string;
789
791
  user_id: string;
@@ -797,6 +799,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
797
799
  notes?: string | null;
798
800
  performed_at?: string;
799
801
  rescheduled_count?: number;
802
+ stock_consumed_at?: string | null;
800
803
  total_carts?: number;
801
804
  updated_at?: string;
802
805
  user_id?: string;
@@ -6555,6 +6558,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
6555
6558
  purchase_price: number | null;
6556
6559
  quantity: number;
6557
6560
  sale_price: number | null;
6561
+ trade_item_key: string | null;
6558
6562
  unit: string;
6559
6563
  updated_at: string;
6560
6564
  weight: string | null;
@@ -6577,6 +6581,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
6577
6581
  purchase_price?: number | null;
6578
6582
  quantity?: number;
6579
6583
  sale_price?: number | null;
6584
+ trade_item_key?: string | null;
6580
6585
  unit?: string;
6581
6586
  updated_at?: string;
6582
6587
  weight?: string | null;
@@ -6599,6 +6604,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
6599
6604
  purchase_price?: number | null;
6600
6605
  quantity?: number;
6601
6606
  sale_price?: number | null;
6607
+ trade_item_key?: string | null;
6602
6608
  unit?: string;
6603
6609
  updated_at?: string;
6604
6610
  weight?: string | null;
@@ -7418,6 +7424,60 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7418
7424
  };
7419
7425
  Relationships: [];
7420
7426
  };
7427
+ stock_mutation_log: {
7428
+ Row: {
7429
+ connection_id: string | null;
7430
+ created_at: string;
7431
+ created_by: string | null;
7432
+ id: string;
7433
+ mutation_type: string;
7434
+ order_id: string | null;
7435
+ order_item_id: string | null;
7436
+ order_source: string | null;
7437
+ physical_after: number | null;
7438
+ physical_before: number | null;
7439
+ qty_delta: number;
7440
+ reason: string | null;
7441
+ reserved_after: number | null;
7442
+ reserved_before: number | null;
7443
+ trade_item_key: string;
7444
+ };
7445
+ Insert: {
7446
+ connection_id?: string | null;
7447
+ created_at?: string;
7448
+ created_by?: string | null;
7449
+ id?: string;
7450
+ mutation_type: string;
7451
+ order_id?: string | null;
7452
+ order_item_id?: string | null;
7453
+ order_source?: string | null;
7454
+ physical_after?: number | null;
7455
+ physical_before?: number | null;
7456
+ qty_delta: number;
7457
+ reason?: string | null;
7458
+ reserved_after?: number | null;
7459
+ reserved_before?: number | null;
7460
+ trade_item_key: string;
7461
+ };
7462
+ Update: {
7463
+ connection_id?: string | null;
7464
+ created_at?: string;
7465
+ created_by?: string | null;
7466
+ id?: string;
7467
+ mutation_type?: string;
7468
+ order_id?: string | null;
7469
+ order_item_id?: string | null;
7470
+ order_source?: string | null;
7471
+ physical_after?: number | null;
7472
+ physical_before?: number | null;
7473
+ qty_delta?: number;
7474
+ reason?: string | null;
7475
+ reserved_after?: number | null;
7476
+ reserved_before?: number | null;
7477
+ trade_item_key?: string;
7478
+ };
7479
+ Relationships: [];
7480
+ };
7421
7481
  supplier_products: {
7422
7482
  Row: {
7423
7483
  article_number: string | null;
@@ -9279,6 +9339,54 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
9279
9339
  };
9280
9340
  Returns: number;
9281
9341
  };
9342
+ afh_city_code: {
9343
+ Args: {
9344
+ _city: string;
9345
+ _country: string;
9346
+ };
9347
+ Returns: string;
9348
+ };
9349
+ afh_normalize_country: {
9350
+ Args: {
9351
+ _raw: string;
9352
+ };
9353
+ Returns: string;
9354
+ };
9355
+ afh_normalize_nl_province: {
9356
+ Args: {
9357
+ _raw: string;
9358
+ };
9359
+ Returns: string;
9360
+ };
9361
+ afh_subtract_workdays: {
9362
+ Args: {
9363
+ _date: string;
9364
+ _days: number;
9365
+ };
9366
+ Returns: string;
9367
+ };
9368
+ apply_stock_consumption: {
9369
+ Args: {
9370
+ p_order_id: string;
9371
+ p_order_item_id: string;
9372
+ p_qty: number;
9373
+ p_reason: string;
9374
+ p_source: string;
9375
+ p_trade_item_key: string;
9376
+ };
9377
+ Returns: undefined;
9378
+ };
9379
+ apply_stock_reservation: {
9380
+ Args: {
9381
+ p_order_id: string;
9382
+ p_order_item_id: string;
9383
+ p_qty: number;
9384
+ p_reason: string;
9385
+ p_source: string;
9386
+ p_trade_item_key: string;
9387
+ };
9388
+ Returns: undefined;
9389
+ };
9282
9390
  assign_cart_numbers: {
9283
9391
  Args: {
9284
9392
  p_carts: import("../integrations/supabase/types").Json;
@@ -9302,6 +9410,12 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
9302
9410
  order_number: string;
9303
9411
  }[];
9304
9412
  };
9413
+ backfill_open_order_reservations: {
9414
+ Args: never;
9415
+ Returns: {
9416
+ processed_items: number;
9417
+ }[];
9418
+ };
9305
9419
  call_exact_route: {
9306
9420
  Args: {
9307
9421
  path: string;
@@ -9351,6 +9465,12 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
9351
9465
  table_name: string;
9352
9466
  }[];
9353
9467
  };
9468
+ dispatch_carrier_signups_sql: {
9469
+ Args: {
9470
+ _catchup?: string;
9471
+ };
9472
+ Returns: import("../integrations/supabase/types").Json;
9473
+ };
9354
9474
  email_auth_decrypt: {
9355
9475
  Args: {
9356
9476
  cipher: string;
@@ -9423,6 +9543,12 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
9423
9543
  };
9424
9544
  Returns: boolean;
9425
9545
  };
9546
+ find_trade_item_key_by_name: {
9547
+ Args: {
9548
+ p_name: string;
9549
+ };
9550
+ Returns: string;
9551
+ };
9426
9552
  format_cart_number: {
9427
9553
  Args: {
9428
9554
  p_pick_date: string;
@@ -10684,6 +10810,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
10684
10810
  notes: string | null;
10685
10811
  performed_at: string;
10686
10812
  rescheduled_count: number;
10813
+ stock_consumed_at: string | null;
10687
10814
  total_carts: number;
10688
10815
  updated_at: string;
10689
10816
  user_id: string;
@@ -10697,6 +10824,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
10697
10824
  notes?: string | null;
10698
10825
  performed_at?: string;
10699
10826
  rescheduled_count?: number;
10827
+ stock_consumed_at?: string | null;
10700
10828
  total_carts?: number;
10701
10829
  updated_at?: string;
10702
10830
  user_id: string;
@@ -10710,6 +10838,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
10710
10838
  notes?: string | null;
10711
10839
  performed_at?: string;
10712
10840
  rescheduled_count?: number;
10841
+ stock_consumed_at?: string | null;
10713
10842
  total_carts?: number;
10714
10843
  updated_at?: string;
10715
10844
  user_id?: string;
@@ -16468,6 +16597,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
16468
16597
  purchase_price: number | null;
16469
16598
  quantity: number;
16470
16599
  sale_price: number | null;
16600
+ trade_item_key: string | null;
16471
16601
  unit: string;
16472
16602
  updated_at: string;
16473
16603
  weight: string | null;
@@ -16490,6 +16620,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
16490
16620
  purchase_price?: number | null;
16491
16621
  quantity?: number;
16492
16622
  sale_price?: number | null;
16623
+ trade_item_key?: string | null;
16493
16624
  unit?: string;
16494
16625
  updated_at?: string;
16495
16626
  weight?: string | null;
@@ -16512,6 +16643,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
16512
16643
  purchase_price?: number | null;
16513
16644
  quantity?: number;
16514
16645
  sale_price?: number | null;
16646
+ trade_item_key?: string | null;
16515
16647
  unit?: string;
16516
16648
  updated_at?: string;
16517
16649
  weight?: string | null;
@@ -17331,6 +17463,60 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
17331
17463
  };
17332
17464
  Relationships: [];
17333
17465
  };
17466
+ stock_mutation_log: {
17467
+ Row: {
17468
+ connection_id: string | null;
17469
+ created_at: string;
17470
+ created_by: string | null;
17471
+ id: string;
17472
+ mutation_type: string;
17473
+ order_id: string | null;
17474
+ order_item_id: string | null;
17475
+ order_source: string | null;
17476
+ physical_after: number | null;
17477
+ physical_before: number | null;
17478
+ qty_delta: number;
17479
+ reason: string | null;
17480
+ reserved_after: number | null;
17481
+ reserved_before: number | null;
17482
+ trade_item_key: string;
17483
+ };
17484
+ Insert: {
17485
+ connection_id?: string | null;
17486
+ created_at?: string;
17487
+ created_by?: string | null;
17488
+ id?: string;
17489
+ mutation_type: string;
17490
+ order_id?: string | null;
17491
+ order_item_id?: string | null;
17492
+ order_source?: string | null;
17493
+ physical_after?: number | null;
17494
+ physical_before?: number | null;
17495
+ qty_delta: number;
17496
+ reason?: string | null;
17497
+ reserved_after?: number | null;
17498
+ reserved_before?: number | null;
17499
+ trade_item_key: string;
17500
+ };
17501
+ Update: {
17502
+ connection_id?: string | null;
17503
+ created_at?: string;
17504
+ created_by?: string | null;
17505
+ id?: string;
17506
+ mutation_type?: string;
17507
+ order_id?: string | null;
17508
+ order_item_id?: string | null;
17509
+ order_source?: string | null;
17510
+ physical_after?: number | null;
17511
+ physical_before?: number | null;
17512
+ qty_delta?: number;
17513
+ reason?: string | null;
17514
+ reserved_after?: number | null;
17515
+ reserved_before?: number | null;
17516
+ trade_item_key?: string;
17517
+ };
17518
+ Relationships: [];
17519
+ };
17334
17520
  supplier_products: {
17335
17521
  Row: {
17336
17522
  article_number: string | null;
@@ -19192,6 +19378,54 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
19192
19378
  };
19193
19379
  Returns: number;
19194
19380
  };
19381
+ afh_city_code: {
19382
+ Args: {
19383
+ _city: string;
19384
+ _country: string;
19385
+ };
19386
+ Returns: string;
19387
+ };
19388
+ afh_normalize_country: {
19389
+ Args: {
19390
+ _raw: string;
19391
+ };
19392
+ Returns: string;
19393
+ };
19394
+ afh_normalize_nl_province: {
19395
+ Args: {
19396
+ _raw: string;
19397
+ };
19398
+ Returns: string;
19399
+ };
19400
+ afh_subtract_workdays: {
19401
+ Args: {
19402
+ _date: string;
19403
+ _days: number;
19404
+ };
19405
+ Returns: string;
19406
+ };
19407
+ apply_stock_consumption: {
19408
+ Args: {
19409
+ p_order_id: string;
19410
+ p_order_item_id: string;
19411
+ p_qty: number;
19412
+ p_reason: string;
19413
+ p_source: string;
19414
+ p_trade_item_key: string;
19415
+ };
19416
+ Returns: undefined;
19417
+ };
19418
+ apply_stock_reservation: {
19419
+ Args: {
19420
+ p_order_id: string;
19421
+ p_order_item_id: string;
19422
+ p_qty: number;
19423
+ p_reason: string;
19424
+ p_source: string;
19425
+ p_trade_item_key: string;
19426
+ };
19427
+ Returns: undefined;
19428
+ };
19195
19429
  assign_cart_numbers: {
19196
19430
  Args: {
19197
19431
  p_carts: import("../integrations/supabase/types").Json;
@@ -19215,6 +19449,12 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
19215
19449
  order_number: string;
19216
19450
  }[];
19217
19451
  };
19452
+ backfill_open_order_reservations: {
19453
+ Args: never;
19454
+ Returns: {
19455
+ processed_items: number;
19456
+ }[];
19457
+ };
19218
19458
  call_exact_route: {
19219
19459
  Args: {
19220
19460
  path: string;
@@ -19264,6 +19504,12 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
19264
19504
  table_name: string;
19265
19505
  }[];
19266
19506
  };
19507
+ dispatch_carrier_signups_sql: {
19508
+ Args: {
19509
+ _catchup?: string;
19510
+ };
19511
+ Returns: import("../integrations/supabase/types").Json;
19512
+ };
19267
19513
  email_auth_decrypt: {
19268
19514
  Args: {
19269
19515
  cipher: string;
@@ -19336,6 +19582,12 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
19336
19582
  };
19337
19583
  Returns: boolean;
19338
19584
  };
19585
+ find_trade_item_key_by_name: {
19586
+ Args: {
19587
+ p_name: string;
19588
+ };
19589
+ Returns: string;
19590
+ };
19339
19591
  format_cart_number: {
19340
19592
  Args: {
19341
19593
  p_pick_date: string;
@@ -20601,6 +20853,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
20601
20853
  notes: string | null;
20602
20854
  performed_at: string;
20603
20855
  rescheduled_count: number;
20856
+ stock_consumed_at: string | null;
20604
20857
  total_carts: number;
20605
20858
  updated_at: string;
20606
20859
  user_id: string;
@@ -20614,6 +20867,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
20614
20867
  notes?: string | null;
20615
20868
  performed_at?: string;
20616
20869
  rescheduled_count?: number;
20870
+ stock_consumed_at?: string | null;
20617
20871
  total_carts?: number;
20618
20872
  updated_at?: string;
20619
20873
  user_id: string;
@@ -20627,6 +20881,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
20627
20881
  notes?: string | null;
20628
20882
  performed_at?: string;
20629
20883
  rescheduled_count?: number;
20884
+ stock_consumed_at?: string | null;
20630
20885
  total_carts?: number;
20631
20886
  updated_at?: string;
20632
20887
  user_id?: string;
@@ -26385,6 +26640,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
26385
26640
  purchase_price: number | null;
26386
26641
  quantity: number;
26387
26642
  sale_price: number | null;
26643
+ trade_item_key: string | null;
26388
26644
  unit: string;
26389
26645
  updated_at: string;
26390
26646
  weight: string | null;
@@ -26407,6 +26663,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
26407
26663
  purchase_price?: number | null;
26408
26664
  quantity?: number;
26409
26665
  sale_price?: number | null;
26666
+ trade_item_key?: string | null;
26410
26667
  unit?: string;
26411
26668
  updated_at?: string;
26412
26669
  weight?: string | null;
@@ -26429,6 +26686,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
26429
26686
  purchase_price?: number | null;
26430
26687
  quantity?: number;
26431
26688
  sale_price?: number | null;
26689
+ trade_item_key?: string | null;
26432
26690
  unit?: string;
26433
26691
  updated_at?: string;
26434
26692
  weight?: string | null;
@@ -27248,6 +27506,60 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
27248
27506
  };
27249
27507
  Relationships: [];
27250
27508
  };
27509
+ stock_mutation_log: {
27510
+ Row: {
27511
+ connection_id: string | null;
27512
+ created_at: string;
27513
+ created_by: string | null;
27514
+ id: string;
27515
+ mutation_type: string;
27516
+ order_id: string | null;
27517
+ order_item_id: string | null;
27518
+ order_source: string | null;
27519
+ physical_after: number | null;
27520
+ physical_before: number | null;
27521
+ qty_delta: number;
27522
+ reason: string | null;
27523
+ reserved_after: number | null;
27524
+ reserved_before: number | null;
27525
+ trade_item_key: string;
27526
+ };
27527
+ Insert: {
27528
+ connection_id?: string | null;
27529
+ created_at?: string;
27530
+ created_by?: string | null;
27531
+ id?: string;
27532
+ mutation_type: string;
27533
+ order_id?: string | null;
27534
+ order_item_id?: string | null;
27535
+ order_source?: string | null;
27536
+ physical_after?: number | null;
27537
+ physical_before?: number | null;
27538
+ qty_delta: number;
27539
+ reason?: string | null;
27540
+ reserved_after?: number | null;
27541
+ reserved_before?: number | null;
27542
+ trade_item_key: string;
27543
+ };
27544
+ Update: {
27545
+ connection_id?: string | null;
27546
+ created_at?: string;
27547
+ created_by?: string | null;
27548
+ id?: string;
27549
+ mutation_type?: string;
27550
+ order_id?: string | null;
27551
+ order_item_id?: string | null;
27552
+ order_source?: string | null;
27553
+ physical_after?: number | null;
27554
+ physical_before?: number | null;
27555
+ qty_delta?: number;
27556
+ reason?: string | null;
27557
+ reserved_after?: number | null;
27558
+ reserved_before?: number | null;
27559
+ trade_item_key?: string;
27560
+ };
27561
+ Relationships: [];
27562
+ };
27251
27563
  supplier_products: {
27252
27564
  Row: {
27253
27565
  article_number: string | null;
@@ -29109,6 +29421,54 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29109
29421
  };
29110
29422
  Returns: number;
29111
29423
  };
29424
+ afh_city_code: {
29425
+ Args: {
29426
+ _city: string;
29427
+ _country: string;
29428
+ };
29429
+ Returns: string;
29430
+ };
29431
+ afh_normalize_country: {
29432
+ Args: {
29433
+ _raw: string;
29434
+ };
29435
+ Returns: string;
29436
+ };
29437
+ afh_normalize_nl_province: {
29438
+ Args: {
29439
+ _raw: string;
29440
+ };
29441
+ Returns: string;
29442
+ };
29443
+ afh_subtract_workdays: {
29444
+ Args: {
29445
+ _date: string;
29446
+ _days: number;
29447
+ };
29448
+ Returns: string;
29449
+ };
29450
+ apply_stock_consumption: {
29451
+ Args: {
29452
+ p_order_id: string;
29453
+ p_order_item_id: string;
29454
+ p_qty: number;
29455
+ p_reason: string;
29456
+ p_source: string;
29457
+ p_trade_item_key: string;
29458
+ };
29459
+ Returns: undefined;
29460
+ };
29461
+ apply_stock_reservation: {
29462
+ Args: {
29463
+ p_order_id: string;
29464
+ p_order_item_id: string;
29465
+ p_qty: number;
29466
+ p_reason: string;
29467
+ p_source: string;
29468
+ p_trade_item_key: string;
29469
+ };
29470
+ Returns: undefined;
29471
+ };
29112
29472
  assign_cart_numbers: {
29113
29473
  Args: {
29114
29474
  p_carts: import("../integrations/supabase/types").Json;
@@ -29132,6 +29492,12 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29132
29492
  order_number: string;
29133
29493
  }[];
29134
29494
  };
29495
+ backfill_open_order_reservations: {
29496
+ Args: never;
29497
+ Returns: {
29498
+ processed_items: number;
29499
+ }[];
29500
+ };
29135
29501
  call_exact_route: {
29136
29502
  Args: {
29137
29503
  path: string;
@@ -29181,6 +29547,12 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29181
29547
  table_name: string;
29182
29548
  }[];
29183
29549
  };
29550
+ dispatch_carrier_signups_sql: {
29551
+ Args: {
29552
+ _catchup?: string;
29553
+ };
29554
+ Returns: import("../integrations/supabase/types").Json;
29555
+ };
29184
29556
  email_auth_decrypt: {
29185
29557
  Args: {
29186
29558
  cipher: string;
@@ -29253,6 +29625,12 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29253
29625
  };
29254
29626
  Returns: boolean;
29255
29627
  };
29628
+ find_trade_item_key_by_name: {
29629
+ Args: {
29630
+ p_name: string;
29631
+ };
29632
+ Returns: string;
29633
+ };
29256
29634
  format_cart_number: {
29257
29635
  Args: {
29258
29636
  p_pick_date: string;
@@ -30520,6 +30898,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
30520
30898
  notes: string | null;
30521
30899
  performed_at: string;
30522
30900
  rescheduled_count: number;
30901
+ stock_consumed_at: string | null;
30523
30902
  total_carts: number;
30524
30903
  updated_at: string;
30525
30904
  user_id: string;
@@ -30533,6 +30912,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
30533
30912
  notes?: string | null;
30534
30913
  performed_at?: string;
30535
30914
  rescheduled_count?: number;
30915
+ stock_consumed_at?: string | null;
30536
30916
  total_carts?: number;
30537
30917
  updated_at?: string;
30538
30918
  user_id: string;
@@ -30546,6 +30926,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
30546
30926
  notes?: string | null;
30547
30927
  performed_at?: string;
30548
30928
  rescheduled_count?: number;
30929
+ stock_consumed_at?: string | null;
30549
30930
  total_carts?: number;
30550
30931
  updated_at?: string;
30551
30932
  user_id?: string;
@@ -36304,6 +36685,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
36304
36685
  purchase_price: number | null;
36305
36686
  quantity: number;
36306
36687
  sale_price: number | null;
36688
+ trade_item_key: string | null;
36307
36689
  unit: string;
36308
36690
  updated_at: string;
36309
36691
  weight: string | null;
@@ -36326,6 +36708,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
36326
36708
  purchase_price?: number | null;
36327
36709
  quantity?: number;
36328
36710
  sale_price?: number | null;
36711
+ trade_item_key?: string | null;
36329
36712
  unit?: string;
36330
36713
  updated_at?: string;
36331
36714
  weight?: string | null;
@@ -36348,6 +36731,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
36348
36731
  purchase_price?: number | null;
36349
36732
  quantity?: number;
36350
36733
  sale_price?: number | null;
36734
+ trade_item_key?: string | null;
36351
36735
  unit?: string;
36352
36736
  updated_at?: string;
36353
36737
  weight?: string | null;
@@ -37167,6 +37551,60 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
37167
37551
  };
37168
37552
  Relationships: [];
37169
37553
  };
37554
+ stock_mutation_log: {
37555
+ Row: {
37556
+ connection_id: string | null;
37557
+ created_at: string;
37558
+ created_by: string | null;
37559
+ id: string;
37560
+ mutation_type: string;
37561
+ order_id: string | null;
37562
+ order_item_id: string | null;
37563
+ order_source: string | null;
37564
+ physical_after: number | null;
37565
+ physical_before: number | null;
37566
+ qty_delta: number;
37567
+ reason: string | null;
37568
+ reserved_after: number | null;
37569
+ reserved_before: number | null;
37570
+ trade_item_key: string;
37571
+ };
37572
+ Insert: {
37573
+ connection_id?: string | null;
37574
+ created_at?: string;
37575
+ created_by?: string | null;
37576
+ id?: string;
37577
+ mutation_type: string;
37578
+ order_id?: string | null;
37579
+ order_item_id?: string | null;
37580
+ order_source?: string | null;
37581
+ physical_after?: number | null;
37582
+ physical_before?: number | null;
37583
+ qty_delta: number;
37584
+ reason?: string | null;
37585
+ reserved_after?: number | null;
37586
+ reserved_before?: number | null;
37587
+ trade_item_key: string;
37588
+ };
37589
+ Update: {
37590
+ connection_id?: string | null;
37591
+ created_at?: string;
37592
+ created_by?: string | null;
37593
+ id?: string;
37594
+ mutation_type?: string;
37595
+ order_id?: string | null;
37596
+ order_item_id?: string | null;
37597
+ order_source?: string | null;
37598
+ physical_after?: number | null;
37599
+ physical_before?: number | null;
37600
+ qty_delta?: number;
37601
+ reason?: string | null;
37602
+ reserved_after?: number | null;
37603
+ reserved_before?: number | null;
37604
+ trade_item_key?: string;
37605
+ };
37606
+ Relationships: [];
37607
+ };
37170
37608
  supplier_products: {
37171
37609
  Row: {
37172
37610
  article_number: string | null;
@@ -39028,6 +39466,54 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
39028
39466
  };
39029
39467
  Returns: number;
39030
39468
  };
39469
+ afh_city_code: {
39470
+ Args: {
39471
+ _city: string;
39472
+ _country: string;
39473
+ };
39474
+ Returns: string;
39475
+ };
39476
+ afh_normalize_country: {
39477
+ Args: {
39478
+ _raw: string;
39479
+ };
39480
+ Returns: string;
39481
+ };
39482
+ afh_normalize_nl_province: {
39483
+ Args: {
39484
+ _raw: string;
39485
+ };
39486
+ Returns: string;
39487
+ };
39488
+ afh_subtract_workdays: {
39489
+ Args: {
39490
+ _date: string;
39491
+ _days: number;
39492
+ };
39493
+ Returns: string;
39494
+ };
39495
+ apply_stock_consumption: {
39496
+ Args: {
39497
+ p_order_id: string;
39498
+ p_order_item_id: string;
39499
+ p_qty: number;
39500
+ p_reason: string;
39501
+ p_source: string;
39502
+ p_trade_item_key: string;
39503
+ };
39504
+ Returns: undefined;
39505
+ };
39506
+ apply_stock_reservation: {
39507
+ Args: {
39508
+ p_order_id: string;
39509
+ p_order_item_id: string;
39510
+ p_qty: number;
39511
+ p_reason: string;
39512
+ p_source: string;
39513
+ p_trade_item_key: string;
39514
+ };
39515
+ Returns: undefined;
39516
+ };
39031
39517
  assign_cart_numbers: {
39032
39518
  Args: {
39033
39519
  p_carts: import("../integrations/supabase/types").Json;
@@ -39051,6 +39537,12 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
39051
39537
  order_number: string;
39052
39538
  }[];
39053
39539
  };
39540
+ backfill_open_order_reservations: {
39541
+ Args: never;
39542
+ Returns: {
39543
+ processed_items: number;
39544
+ }[];
39545
+ };
39054
39546
  call_exact_route: {
39055
39547
  Args: {
39056
39548
  path: string;
@@ -39100,6 +39592,12 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
39100
39592
  table_name: string;
39101
39593
  }[];
39102
39594
  };
39595
+ dispatch_carrier_signups_sql: {
39596
+ Args: {
39597
+ _catchup?: string;
39598
+ };
39599
+ Returns: import("../integrations/supabase/types").Json;
39600
+ };
39103
39601
  email_auth_decrypt: {
39104
39602
  Args: {
39105
39603
  cipher: string;
@@ -39172,6 +39670,12 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
39172
39670
  };
39173
39671
  Returns: boolean;
39174
39672
  };
39673
+ find_trade_item_key_by_name: {
39674
+ Args: {
39675
+ p_name: string;
39676
+ };
39677
+ Returns: string;
39678
+ };
39175
39679
  format_cart_number: {
39176
39680
  Args: {
39177
39681
  p_pick_date: string;
@@ -40437,6 +40941,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
40437
40941
  notes: string | null;
40438
40942
  performed_at: string;
40439
40943
  rescheduled_count: number;
40944
+ stock_consumed_at: string | null;
40440
40945
  total_carts: number;
40441
40946
  updated_at: string;
40442
40947
  user_id: string;
@@ -40450,6 +40955,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
40450
40955
  notes?: string | null;
40451
40956
  performed_at?: string;
40452
40957
  rescheduled_count?: number;
40958
+ stock_consumed_at?: string | null;
40453
40959
  total_carts?: number;
40454
40960
  updated_at?: string;
40455
40961
  user_id: string;
@@ -40463,6 +40969,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
40463
40969
  notes?: string | null;
40464
40970
  performed_at?: string;
40465
40971
  rescheduled_count?: number;
40972
+ stock_consumed_at?: string | null;
40466
40973
  total_carts?: number;
40467
40974
  updated_at?: string;
40468
40975
  user_id?: string;
@@ -46221,6 +46728,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
46221
46728
  purchase_price: number | null;
46222
46729
  quantity: number;
46223
46730
  sale_price: number | null;
46731
+ trade_item_key: string | null;
46224
46732
  unit: string;
46225
46733
  updated_at: string;
46226
46734
  weight: string | null;
@@ -46243,6 +46751,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
46243
46751
  purchase_price?: number | null;
46244
46752
  quantity?: number;
46245
46753
  sale_price?: number | null;
46754
+ trade_item_key?: string | null;
46246
46755
  unit?: string;
46247
46756
  updated_at?: string;
46248
46757
  weight?: string | null;
@@ -46265,6 +46774,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
46265
46774
  purchase_price?: number | null;
46266
46775
  quantity?: number;
46267
46776
  sale_price?: number | null;
46777
+ trade_item_key?: string | null;
46268
46778
  unit?: string;
46269
46779
  updated_at?: string;
46270
46780
  weight?: string | null;
@@ -47084,6 +47594,60 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
47084
47594
  };
47085
47595
  Relationships: [];
47086
47596
  };
47597
+ stock_mutation_log: {
47598
+ Row: {
47599
+ connection_id: string | null;
47600
+ created_at: string;
47601
+ created_by: string | null;
47602
+ id: string;
47603
+ mutation_type: string;
47604
+ order_id: string | null;
47605
+ order_item_id: string | null;
47606
+ order_source: string | null;
47607
+ physical_after: number | null;
47608
+ physical_before: number | null;
47609
+ qty_delta: number;
47610
+ reason: string | null;
47611
+ reserved_after: number | null;
47612
+ reserved_before: number | null;
47613
+ trade_item_key: string;
47614
+ };
47615
+ Insert: {
47616
+ connection_id?: string | null;
47617
+ created_at?: string;
47618
+ created_by?: string | null;
47619
+ id?: string;
47620
+ mutation_type: string;
47621
+ order_id?: string | null;
47622
+ order_item_id?: string | null;
47623
+ order_source?: string | null;
47624
+ physical_after?: number | null;
47625
+ physical_before?: number | null;
47626
+ qty_delta: number;
47627
+ reason?: string | null;
47628
+ reserved_after?: number | null;
47629
+ reserved_before?: number | null;
47630
+ trade_item_key: string;
47631
+ };
47632
+ Update: {
47633
+ connection_id?: string | null;
47634
+ created_at?: string;
47635
+ created_by?: string | null;
47636
+ id?: string;
47637
+ mutation_type?: string;
47638
+ order_id?: string | null;
47639
+ order_item_id?: string | null;
47640
+ order_source?: string | null;
47641
+ physical_after?: number | null;
47642
+ physical_before?: number | null;
47643
+ qty_delta?: number;
47644
+ reason?: string | null;
47645
+ reserved_after?: number | null;
47646
+ reserved_before?: number | null;
47647
+ trade_item_key?: string;
47648
+ };
47649
+ Relationships: [];
47650
+ };
47087
47651
  supplier_products: {
47088
47652
  Row: {
47089
47653
  article_number: string | null;
@@ -48945,6 +49509,54 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
48945
49509
  };
48946
49510
  Returns: number;
48947
49511
  };
49512
+ afh_city_code: {
49513
+ Args: {
49514
+ _city: string;
49515
+ _country: string;
49516
+ };
49517
+ Returns: string;
49518
+ };
49519
+ afh_normalize_country: {
49520
+ Args: {
49521
+ _raw: string;
49522
+ };
49523
+ Returns: string;
49524
+ };
49525
+ afh_normalize_nl_province: {
49526
+ Args: {
49527
+ _raw: string;
49528
+ };
49529
+ Returns: string;
49530
+ };
49531
+ afh_subtract_workdays: {
49532
+ Args: {
49533
+ _date: string;
49534
+ _days: number;
49535
+ };
49536
+ Returns: string;
49537
+ };
49538
+ apply_stock_consumption: {
49539
+ Args: {
49540
+ p_order_id: string;
49541
+ p_order_item_id: string;
49542
+ p_qty: number;
49543
+ p_reason: string;
49544
+ p_source: string;
49545
+ p_trade_item_key: string;
49546
+ };
49547
+ Returns: undefined;
49548
+ };
49549
+ apply_stock_reservation: {
49550
+ Args: {
49551
+ p_order_id: string;
49552
+ p_order_item_id: string;
49553
+ p_qty: number;
49554
+ p_reason: string;
49555
+ p_source: string;
49556
+ p_trade_item_key: string;
49557
+ };
49558
+ Returns: undefined;
49559
+ };
48948
49560
  assign_cart_numbers: {
48949
49561
  Args: {
48950
49562
  p_carts: import("../integrations/supabase/types").Json;
@@ -48968,6 +49580,12 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
48968
49580
  order_number: string;
48969
49581
  }[];
48970
49582
  };
49583
+ backfill_open_order_reservations: {
49584
+ Args: never;
49585
+ Returns: {
49586
+ processed_items: number;
49587
+ }[];
49588
+ };
48971
49589
  call_exact_route: {
48972
49590
  Args: {
48973
49591
  path: string;
@@ -49017,6 +49635,12 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49017
49635
  table_name: string;
49018
49636
  }[];
49019
49637
  };
49638
+ dispatch_carrier_signups_sql: {
49639
+ Args: {
49640
+ _catchup?: string;
49641
+ };
49642
+ Returns: import("../integrations/supabase/types").Json;
49643
+ };
49020
49644
  email_auth_decrypt: {
49021
49645
  Args: {
49022
49646
  cipher: string;
@@ -49089,6 +49713,12 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49089
49713
  };
49090
49714
  Returns: boolean;
49091
49715
  };
49716
+ find_trade_item_key_by_name: {
49717
+ Args: {
49718
+ p_name: string;
49719
+ };
49720
+ Returns: string;
49721
+ };
49092
49722
  format_cart_number: {
49093
49723
  Args: {
49094
49724
  p_pick_date: string;