@flowselections/mailbox-orders 1.0.5 → 1.0.6

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.
@@ -713,6 +713,7 @@ export declare const listTemplateFields: import("@tanstack/start-client-core").O
713
713
  notes: string | null;
714
714
  performed_at: string;
715
715
  rescheduled_count: number;
716
+ stock_consumed_at: string | null;
716
717
  total_carts: number;
717
718
  updated_at: string;
718
719
  user_id: string;
@@ -726,6 +727,7 @@ export declare const listTemplateFields: import("@tanstack/start-client-core").O
726
727
  notes?: string | null;
727
728
  performed_at?: string;
728
729
  rescheduled_count?: number;
730
+ stock_consumed_at?: string | null;
729
731
  total_carts?: number;
730
732
  updated_at?: string;
731
733
  user_id: string;
@@ -739,6 +741,7 @@ export declare const listTemplateFields: import("@tanstack/start-client-core").O
739
741
  notes?: string | null;
740
742
  performed_at?: string;
741
743
  rescheduled_count?: number;
744
+ stock_consumed_at?: string | null;
742
745
  total_carts?: number;
743
746
  updated_at?: string;
744
747
  user_id?: string;
@@ -6497,6 +6500,7 @@ export declare const listTemplateFields: import("@tanstack/start-client-core").O
6497
6500
  purchase_price: number | null;
6498
6501
  quantity: number;
6499
6502
  sale_price: number | null;
6503
+ trade_item_key: string | null;
6500
6504
  unit: string;
6501
6505
  updated_at: string;
6502
6506
  weight: string | null;
@@ -6519,6 +6523,7 @@ export declare const listTemplateFields: import("@tanstack/start-client-core").O
6519
6523
  purchase_price?: number | null;
6520
6524
  quantity?: number;
6521
6525
  sale_price?: number | null;
6526
+ trade_item_key?: string | null;
6522
6527
  unit?: string;
6523
6528
  updated_at?: string;
6524
6529
  weight?: string | null;
@@ -6541,6 +6546,7 @@ export declare const listTemplateFields: import("@tanstack/start-client-core").O
6541
6546
  purchase_price?: number | null;
6542
6547
  quantity?: number;
6543
6548
  sale_price?: number | null;
6549
+ trade_item_key?: string | null;
6544
6550
  unit?: string;
6545
6551
  updated_at?: string;
6546
6552
  weight?: string | null;
@@ -7360,6 +7366,60 @@ export declare const listTemplateFields: import("@tanstack/start-client-core").O
7360
7366
  };
7361
7367
  Relationships: [];
7362
7368
  };
7369
+ stock_mutation_log: {
7370
+ Row: {
7371
+ connection_id: string | null;
7372
+ created_at: string;
7373
+ created_by: string | null;
7374
+ id: string;
7375
+ mutation_type: string;
7376
+ order_id: string | null;
7377
+ order_item_id: string | null;
7378
+ order_source: string | null;
7379
+ physical_after: number | null;
7380
+ physical_before: number | null;
7381
+ qty_delta: number;
7382
+ reason: string | null;
7383
+ reserved_after: number | null;
7384
+ reserved_before: number | null;
7385
+ trade_item_key: string;
7386
+ };
7387
+ Insert: {
7388
+ connection_id?: string | null;
7389
+ created_at?: string;
7390
+ created_by?: string | null;
7391
+ id?: string;
7392
+ mutation_type: string;
7393
+ order_id?: string | null;
7394
+ order_item_id?: string | null;
7395
+ order_source?: string | null;
7396
+ physical_after?: number | null;
7397
+ physical_before?: number | null;
7398
+ qty_delta: number;
7399
+ reason?: string | null;
7400
+ reserved_after?: number | null;
7401
+ reserved_before?: number | null;
7402
+ trade_item_key: string;
7403
+ };
7404
+ Update: {
7405
+ connection_id?: string | null;
7406
+ created_at?: string;
7407
+ created_by?: string | null;
7408
+ id?: string;
7409
+ mutation_type?: string;
7410
+ order_id?: string | null;
7411
+ order_item_id?: string | null;
7412
+ order_source?: string | null;
7413
+ physical_after?: number | null;
7414
+ physical_before?: number | null;
7415
+ qty_delta?: number;
7416
+ reason?: string | null;
7417
+ reserved_after?: number | null;
7418
+ reserved_before?: number | null;
7419
+ trade_item_key?: string;
7420
+ };
7421
+ Relationships: [];
7422
+ };
7363
7423
  supplier_products: {
7364
7424
  Row: {
7365
7425
  article_number: string | null;
@@ -9221,6 +9281,28 @@ export declare const listTemplateFields: import("@tanstack/start-client-core").O
9221
9281
  };
9222
9282
  Returns: number;
9223
9283
  };
9284
+ apply_stock_consumption: {
9285
+ Args: {
9286
+ p_order_id: string;
9287
+ p_order_item_id: string;
9288
+ p_qty: number;
9289
+ p_reason: string;
9290
+ p_source: string;
9291
+ p_trade_item_key: string;
9292
+ };
9293
+ Returns: undefined;
9294
+ };
9295
+ apply_stock_reservation: {
9296
+ Args: {
9297
+ p_order_id: string;
9298
+ p_order_item_id: string;
9299
+ p_qty: number;
9300
+ p_reason: string;
9301
+ p_source: string;
9302
+ p_trade_item_key: string;
9303
+ };
9304
+ Returns: undefined;
9305
+ };
9224
9306
  assign_cart_numbers: {
9225
9307
  Args: {
9226
9308
  p_carts: import("../integrations/supabase/types").Json;
@@ -10642,6 +10724,7 @@ export declare const upsertTemplateField: import("@tanstack/start-client-core").
10642
10724
  notes: string | null;
10643
10725
  performed_at: string;
10644
10726
  rescheduled_count: number;
10727
+ stock_consumed_at: string | null;
10645
10728
  total_carts: number;
10646
10729
  updated_at: string;
10647
10730
  user_id: string;
@@ -10655,6 +10738,7 @@ export declare const upsertTemplateField: import("@tanstack/start-client-core").
10655
10738
  notes?: string | null;
10656
10739
  performed_at?: string;
10657
10740
  rescheduled_count?: number;
10741
+ stock_consumed_at?: string | null;
10658
10742
  total_carts?: number;
10659
10743
  updated_at?: string;
10660
10744
  user_id: string;
@@ -10668,6 +10752,7 @@ export declare const upsertTemplateField: import("@tanstack/start-client-core").
10668
10752
  notes?: string | null;
10669
10753
  performed_at?: string;
10670
10754
  rescheduled_count?: number;
10755
+ stock_consumed_at?: string | null;
10671
10756
  total_carts?: number;
10672
10757
  updated_at?: string;
10673
10758
  user_id?: string;
@@ -16426,6 +16511,7 @@ export declare const upsertTemplateField: import("@tanstack/start-client-core").
16426
16511
  purchase_price: number | null;
16427
16512
  quantity: number;
16428
16513
  sale_price: number | null;
16514
+ trade_item_key: string | null;
16429
16515
  unit: string;
16430
16516
  updated_at: string;
16431
16517
  weight: string | null;
@@ -16448,6 +16534,7 @@ export declare const upsertTemplateField: import("@tanstack/start-client-core").
16448
16534
  purchase_price?: number | null;
16449
16535
  quantity?: number;
16450
16536
  sale_price?: number | null;
16537
+ trade_item_key?: string | null;
16451
16538
  unit?: string;
16452
16539
  updated_at?: string;
16453
16540
  weight?: string | null;
@@ -16470,6 +16557,7 @@ export declare const upsertTemplateField: import("@tanstack/start-client-core").
16470
16557
  purchase_price?: number | null;
16471
16558
  quantity?: number;
16472
16559
  sale_price?: number | null;
16560
+ trade_item_key?: string | null;
16473
16561
  unit?: string;
16474
16562
  updated_at?: string;
16475
16563
  weight?: string | null;
@@ -17289,6 +17377,60 @@ export declare const upsertTemplateField: import("@tanstack/start-client-core").
17289
17377
  };
17290
17378
  Relationships: [];
17291
17379
  };
17380
+ stock_mutation_log: {
17381
+ Row: {
17382
+ connection_id: string | null;
17383
+ created_at: string;
17384
+ created_by: string | null;
17385
+ id: string;
17386
+ mutation_type: string;
17387
+ order_id: string | null;
17388
+ order_item_id: string | null;
17389
+ order_source: string | null;
17390
+ physical_after: number | null;
17391
+ physical_before: number | null;
17392
+ qty_delta: number;
17393
+ reason: string | null;
17394
+ reserved_after: number | null;
17395
+ reserved_before: number | null;
17396
+ trade_item_key: string;
17397
+ };
17398
+ Insert: {
17399
+ connection_id?: string | null;
17400
+ created_at?: string;
17401
+ created_by?: string | null;
17402
+ id?: string;
17403
+ mutation_type: string;
17404
+ order_id?: string | null;
17405
+ order_item_id?: string | null;
17406
+ order_source?: string | null;
17407
+ physical_after?: number | null;
17408
+ physical_before?: number | null;
17409
+ qty_delta: number;
17410
+ reason?: string | null;
17411
+ reserved_after?: number | null;
17412
+ reserved_before?: number | null;
17413
+ trade_item_key: string;
17414
+ };
17415
+ Update: {
17416
+ connection_id?: string | null;
17417
+ created_at?: string;
17418
+ created_by?: string | null;
17419
+ id?: string;
17420
+ mutation_type?: string;
17421
+ order_id?: string | null;
17422
+ order_item_id?: string | null;
17423
+ order_source?: string | null;
17424
+ physical_after?: number | null;
17425
+ physical_before?: number | null;
17426
+ qty_delta?: number;
17427
+ reason?: string | null;
17428
+ reserved_after?: number | null;
17429
+ reserved_before?: number | null;
17430
+ trade_item_key?: string;
17431
+ };
17432
+ Relationships: [];
17433
+ };
17292
17434
  supplier_products: {
17293
17435
  Row: {
17294
17436
  article_number: string | null;
@@ -19150,6 +19292,28 @@ export declare const upsertTemplateField: import("@tanstack/start-client-core").
19150
19292
  };
19151
19293
  Returns: number;
19152
19294
  };
19295
+ apply_stock_consumption: {
19296
+ Args: {
19297
+ p_order_id: string;
19298
+ p_order_item_id: string;
19299
+ p_qty: number;
19300
+ p_reason: string;
19301
+ p_source: string;
19302
+ p_trade_item_key: string;
19303
+ };
19304
+ Returns: undefined;
19305
+ };
19306
+ apply_stock_reservation: {
19307
+ Args: {
19308
+ p_order_id: string;
19309
+ p_order_item_id: string;
19310
+ p_qty: number;
19311
+ p_reason: string;
19312
+ p_source: string;
19313
+ p_trade_item_key: string;
19314
+ };
19315
+ Returns: undefined;
19316
+ };
19153
19317
  assign_cart_numbers: {
19154
19318
  Args: {
19155
19319
  p_carts: import("../integrations/supabase/types").Json;
@@ -20573,6 +20737,7 @@ export declare const deleteTemplateField: import("@tanstack/start-client-core").
20573
20737
  notes: string | null;
20574
20738
  performed_at: string;
20575
20739
  rescheduled_count: number;
20740
+ stock_consumed_at: string | null;
20576
20741
  total_carts: number;
20577
20742
  updated_at: string;
20578
20743
  user_id: string;
@@ -20586,6 +20751,7 @@ export declare const deleteTemplateField: import("@tanstack/start-client-core").
20586
20751
  notes?: string | null;
20587
20752
  performed_at?: string;
20588
20753
  rescheduled_count?: number;
20754
+ stock_consumed_at?: string | null;
20589
20755
  total_carts?: number;
20590
20756
  updated_at?: string;
20591
20757
  user_id: string;
@@ -20599,6 +20765,7 @@ export declare const deleteTemplateField: import("@tanstack/start-client-core").
20599
20765
  notes?: string | null;
20600
20766
  performed_at?: string;
20601
20767
  rescheduled_count?: number;
20768
+ stock_consumed_at?: string | null;
20602
20769
  total_carts?: number;
20603
20770
  updated_at?: string;
20604
20771
  user_id?: string;
@@ -26357,6 +26524,7 @@ export declare const deleteTemplateField: import("@tanstack/start-client-core").
26357
26524
  purchase_price: number | null;
26358
26525
  quantity: number;
26359
26526
  sale_price: number | null;
26527
+ trade_item_key: string | null;
26360
26528
  unit: string;
26361
26529
  updated_at: string;
26362
26530
  weight: string | null;
@@ -26379,6 +26547,7 @@ export declare const deleteTemplateField: import("@tanstack/start-client-core").
26379
26547
  purchase_price?: number | null;
26380
26548
  quantity?: number;
26381
26549
  sale_price?: number | null;
26550
+ trade_item_key?: string | null;
26382
26551
  unit?: string;
26383
26552
  updated_at?: string;
26384
26553
  weight?: string | null;
@@ -26401,6 +26570,7 @@ export declare const deleteTemplateField: import("@tanstack/start-client-core").
26401
26570
  purchase_price?: number | null;
26402
26571
  quantity?: number;
26403
26572
  sale_price?: number | null;
26573
+ trade_item_key?: string | null;
26404
26574
  unit?: string;
26405
26575
  updated_at?: string;
26406
26576
  weight?: string | null;
@@ -27220,6 +27390,60 @@ export declare const deleteTemplateField: import("@tanstack/start-client-core").
27220
27390
  };
27221
27391
  Relationships: [];
27222
27392
  };
27393
+ stock_mutation_log: {
27394
+ Row: {
27395
+ connection_id: string | null;
27396
+ created_at: string;
27397
+ created_by: string | null;
27398
+ id: string;
27399
+ mutation_type: string;
27400
+ order_id: string | null;
27401
+ order_item_id: string | null;
27402
+ order_source: string | null;
27403
+ physical_after: number | null;
27404
+ physical_before: number | null;
27405
+ qty_delta: number;
27406
+ reason: string | null;
27407
+ reserved_after: number | null;
27408
+ reserved_before: number | null;
27409
+ trade_item_key: string;
27410
+ };
27411
+ Insert: {
27412
+ connection_id?: string | null;
27413
+ created_at?: string;
27414
+ created_by?: string | null;
27415
+ id?: string;
27416
+ mutation_type: string;
27417
+ order_id?: string | null;
27418
+ order_item_id?: string | null;
27419
+ order_source?: string | null;
27420
+ physical_after?: number | null;
27421
+ physical_before?: number | null;
27422
+ qty_delta: number;
27423
+ reason?: string | null;
27424
+ reserved_after?: number | null;
27425
+ reserved_before?: number | null;
27426
+ trade_item_key: string;
27427
+ };
27428
+ Update: {
27429
+ connection_id?: string | null;
27430
+ created_at?: string;
27431
+ created_by?: string | null;
27432
+ id?: string;
27433
+ mutation_type?: string;
27434
+ order_id?: string | null;
27435
+ order_item_id?: string | null;
27436
+ order_source?: string | null;
27437
+ physical_after?: number | null;
27438
+ physical_before?: number | null;
27439
+ qty_delta?: number;
27440
+ reason?: string | null;
27441
+ reserved_after?: number | null;
27442
+ reserved_before?: number | null;
27443
+ trade_item_key?: string;
27444
+ };
27445
+ Relationships: [];
27446
+ };
27223
27447
  supplier_products: {
27224
27448
  Row: {
27225
27449
  article_number: string | null;
@@ -29081,6 +29305,28 @@ export declare const deleteTemplateField: import("@tanstack/start-client-core").
29081
29305
  };
29082
29306
  Returns: number;
29083
29307
  };
29308
+ apply_stock_consumption: {
29309
+ Args: {
29310
+ p_order_id: string;
29311
+ p_order_item_id: string;
29312
+ p_qty: number;
29313
+ p_reason: string;
29314
+ p_source: string;
29315
+ p_trade_item_key: string;
29316
+ };
29317
+ Returns: undefined;
29318
+ };
29319
+ apply_stock_reservation: {
29320
+ Args: {
29321
+ p_order_id: string;
29322
+ p_order_item_id: string;
29323
+ p_qty: number;
29324
+ p_reason: string;
29325
+ p_source: string;
29326
+ p_trade_item_key: string;
29327
+ };
29328
+ Returns: undefined;
29329
+ };
29084
29330
  assign_cart_numbers: {
29085
29331
  Args: {
29086
29332
  p_carts: import("../integrations/supabase/types").Json;
@@ -30488,6 +30734,7 @@ export declare const reorderTemplateFields: import("@tanstack/start-client-core"
30488
30734
  notes: string | null;
30489
30735
  performed_at: string;
30490
30736
  rescheduled_count: number;
30737
+ stock_consumed_at: string | null;
30491
30738
  total_carts: number;
30492
30739
  updated_at: string;
30493
30740
  user_id: string;
@@ -30501,6 +30748,7 @@ export declare const reorderTemplateFields: import("@tanstack/start-client-core"
30501
30748
  notes?: string | null;
30502
30749
  performed_at?: string;
30503
30750
  rescheduled_count?: number;
30751
+ stock_consumed_at?: string | null;
30504
30752
  total_carts?: number;
30505
30753
  updated_at?: string;
30506
30754
  user_id: string;
@@ -30514,6 +30762,7 @@ export declare const reorderTemplateFields: import("@tanstack/start-client-core"
30514
30762
  notes?: string | null;
30515
30763
  performed_at?: string;
30516
30764
  rescheduled_count?: number;
30765
+ stock_consumed_at?: string | null;
30517
30766
  total_carts?: number;
30518
30767
  updated_at?: string;
30519
30768
  user_id?: string;
@@ -36272,6 +36521,7 @@ export declare const reorderTemplateFields: import("@tanstack/start-client-core"
36272
36521
  purchase_price: number | null;
36273
36522
  quantity: number;
36274
36523
  sale_price: number | null;
36524
+ trade_item_key: string | null;
36275
36525
  unit: string;
36276
36526
  updated_at: string;
36277
36527
  weight: string | null;
@@ -36294,6 +36544,7 @@ export declare const reorderTemplateFields: import("@tanstack/start-client-core"
36294
36544
  purchase_price?: number | null;
36295
36545
  quantity?: number;
36296
36546
  sale_price?: number | null;
36547
+ trade_item_key?: string | null;
36297
36548
  unit?: string;
36298
36549
  updated_at?: string;
36299
36550
  weight?: string | null;
@@ -36316,6 +36567,7 @@ export declare const reorderTemplateFields: import("@tanstack/start-client-core"
36316
36567
  purchase_price?: number | null;
36317
36568
  quantity?: number;
36318
36569
  sale_price?: number | null;
36570
+ trade_item_key?: string | null;
36319
36571
  unit?: string;
36320
36572
  updated_at?: string;
36321
36573
  weight?: string | null;
@@ -37135,6 +37387,60 @@ export declare const reorderTemplateFields: import("@tanstack/start-client-core"
37135
37387
  };
37136
37388
  Relationships: [];
37137
37389
  };
37390
+ stock_mutation_log: {
37391
+ Row: {
37392
+ connection_id: string | null;
37393
+ created_at: string;
37394
+ created_by: string | null;
37395
+ id: string;
37396
+ mutation_type: string;
37397
+ order_id: string | null;
37398
+ order_item_id: string | null;
37399
+ order_source: string | null;
37400
+ physical_after: number | null;
37401
+ physical_before: number | null;
37402
+ qty_delta: number;
37403
+ reason: string | null;
37404
+ reserved_after: number | null;
37405
+ reserved_before: number | null;
37406
+ trade_item_key: string;
37407
+ };
37408
+ Insert: {
37409
+ connection_id?: string | null;
37410
+ created_at?: string;
37411
+ created_by?: string | null;
37412
+ id?: string;
37413
+ mutation_type: string;
37414
+ order_id?: string | null;
37415
+ order_item_id?: string | null;
37416
+ order_source?: string | null;
37417
+ physical_after?: number | null;
37418
+ physical_before?: number | null;
37419
+ qty_delta: number;
37420
+ reason?: string | null;
37421
+ reserved_after?: number | null;
37422
+ reserved_before?: number | null;
37423
+ trade_item_key: string;
37424
+ };
37425
+ Update: {
37426
+ connection_id?: string | null;
37427
+ created_at?: string;
37428
+ created_by?: string | null;
37429
+ id?: string;
37430
+ mutation_type?: string;
37431
+ order_id?: string | null;
37432
+ order_item_id?: string | null;
37433
+ order_source?: string | null;
37434
+ physical_after?: number | null;
37435
+ physical_before?: number | null;
37436
+ qty_delta?: number;
37437
+ reason?: string | null;
37438
+ reserved_after?: number | null;
37439
+ reserved_before?: number | null;
37440
+ trade_item_key?: string;
37441
+ };
37442
+ Relationships: [];
37443
+ };
37138
37444
  supplier_products: {
37139
37445
  Row: {
37140
37446
  article_number: string | null;
@@ -38996,6 +39302,28 @@ export declare const reorderTemplateFields: import("@tanstack/start-client-core"
38996
39302
  };
38997
39303
  Returns: number;
38998
39304
  };
39305
+ apply_stock_consumption: {
39306
+ Args: {
39307
+ p_order_id: string;
39308
+ p_order_item_id: string;
39309
+ p_qty: number;
39310
+ p_reason: string;
39311
+ p_source: string;
39312
+ p_trade_item_key: string;
39313
+ };
39314
+ Returns: undefined;
39315
+ };
39316
+ apply_stock_reservation: {
39317
+ Args: {
39318
+ p_order_id: string;
39319
+ p_order_item_id: string;
39320
+ p_qty: number;
39321
+ p_reason: string;
39322
+ p_source: string;
39323
+ p_trade_item_key: string;
39324
+ };
39325
+ Returns: undefined;
39326
+ };
38999
39327
  assign_cart_numbers: {
39000
39328
  Args: {
39001
39329
  p_carts: import("../integrations/supabase/types").Json;
@@ -40403,6 +40731,7 @@ export declare const listPlantTypesForPicker: import("@tanstack/start-client-cor
40403
40731
  notes: string | null;
40404
40732
  performed_at: string;
40405
40733
  rescheduled_count: number;
40734
+ stock_consumed_at: string | null;
40406
40735
  total_carts: number;
40407
40736
  updated_at: string;
40408
40737
  user_id: string;
@@ -40416,6 +40745,7 @@ export declare const listPlantTypesForPicker: import("@tanstack/start-client-cor
40416
40745
  notes?: string | null;
40417
40746
  performed_at?: string;
40418
40747
  rescheduled_count?: number;
40748
+ stock_consumed_at?: string | null;
40419
40749
  total_carts?: number;
40420
40750
  updated_at?: string;
40421
40751
  user_id: string;
@@ -40429,6 +40759,7 @@ export declare const listPlantTypesForPicker: import("@tanstack/start-client-cor
40429
40759
  notes?: string | null;
40430
40760
  performed_at?: string;
40431
40761
  rescheduled_count?: number;
40762
+ stock_consumed_at?: string | null;
40432
40763
  total_carts?: number;
40433
40764
  updated_at?: string;
40434
40765
  user_id?: string;
@@ -46187,6 +46518,7 @@ export declare const listPlantTypesForPicker: import("@tanstack/start-client-cor
46187
46518
  purchase_price: number | null;
46188
46519
  quantity: number;
46189
46520
  sale_price: number | null;
46521
+ trade_item_key: string | null;
46190
46522
  unit: string;
46191
46523
  updated_at: string;
46192
46524
  weight: string | null;
@@ -46209,6 +46541,7 @@ export declare const listPlantTypesForPicker: import("@tanstack/start-client-cor
46209
46541
  purchase_price?: number | null;
46210
46542
  quantity?: number;
46211
46543
  sale_price?: number | null;
46544
+ trade_item_key?: string | null;
46212
46545
  unit?: string;
46213
46546
  updated_at?: string;
46214
46547
  weight?: string | null;
@@ -46231,6 +46564,7 @@ export declare const listPlantTypesForPicker: import("@tanstack/start-client-cor
46231
46564
  purchase_price?: number | null;
46232
46565
  quantity?: number;
46233
46566
  sale_price?: number | null;
46567
+ trade_item_key?: string | null;
46234
46568
  unit?: string;
46235
46569
  updated_at?: string;
46236
46570
  weight?: string | null;
@@ -47050,6 +47384,60 @@ export declare const listPlantTypesForPicker: import("@tanstack/start-client-cor
47050
47384
  };
47051
47385
  Relationships: [];
47052
47386
  };
47387
+ stock_mutation_log: {
47388
+ Row: {
47389
+ connection_id: string | null;
47390
+ created_at: string;
47391
+ created_by: string | null;
47392
+ id: string;
47393
+ mutation_type: string;
47394
+ order_id: string | null;
47395
+ order_item_id: string | null;
47396
+ order_source: string | null;
47397
+ physical_after: number | null;
47398
+ physical_before: number | null;
47399
+ qty_delta: number;
47400
+ reason: string | null;
47401
+ reserved_after: number | null;
47402
+ reserved_before: number | null;
47403
+ trade_item_key: string;
47404
+ };
47405
+ Insert: {
47406
+ connection_id?: string | null;
47407
+ created_at?: string;
47408
+ created_by?: string | null;
47409
+ id?: string;
47410
+ mutation_type: string;
47411
+ order_id?: string | null;
47412
+ order_item_id?: string | null;
47413
+ order_source?: string | null;
47414
+ physical_after?: number | null;
47415
+ physical_before?: number | null;
47416
+ qty_delta: number;
47417
+ reason?: string | null;
47418
+ reserved_after?: number | null;
47419
+ reserved_before?: number | null;
47420
+ trade_item_key: string;
47421
+ };
47422
+ Update: {
47423
+ connection_id?: string | null;
47424
+ created_at?: string;
47425
+ created_by?: string | null;
47426
+ id?: string;
47427
+ mutation_type?: string;
47428
+ order_id?: string | null;
47429
+ order_item_id?: string | null;
47430
+ order_source?: string | null;
47431
+ physical_after?: number | null;
47432
+ physical_before?: number | null;
47433
+ qty_delta?: number;
47434
+ reason?: string | null;
47435
+ reserved_after?: number | null;
47436
+ reserved_before?: number | null;
47437
+ trade_item_key?: string;
47438
+ };
47439
+ Relationships: [];
47440
+ };
47053
47441
  supplier_products: {
47054
47442
  Row: {
47055
47443
  article_number: string | null;
@@ -48911,6 +49299,28 @@ export declare const listPlantTypesForPicker: import("@tanstack/start-client-cor
48911
49299
  };
48912
49300
  Returns: number;
48913
49301
  };
49302
+ apply_stock_consumption: {
49303
+ Args: {
49304
+ p_order_id: string;
49305
+ p_order_item_id: string;
49306
+ p_qty: number;
49307
+ p_reason: string;
49308
+ p_source: string;
49309
+ p_trade_item_key: string;
49310
+ };
49311
+ Returns: undefined;
49312
+ };
49313
+ apply_stock_reservation: {
49314
+ Args: {
49315
+ p_order_id: string;
49316
+ p_order_item_id: string;
49317
+ p_qty: number;
49318
+ p_reason: string;
49319
+ p_source: string;
49320
+ p_trade_item_key: string;
49321
+ };
49322
+ Returns: undefined;
49323
+ };
48914
49324
  assign_cart_numbers: {
48915
49325
  Args: {
48916
49326
  p_carts: import("../integrations/supabase/types").Json;
@@ -50319,6 +50729,7 @@ export declare const listSuppliersForPicker: import("@tanstack/start-client-core
50319
50729
  notes: string | null;
50320
50730
  performed_at: string;
50321
50731
  rescheduled_count: number;
50732
+ stock_consumed_at: string | null;
50322
50733
  total_carts: number;
50323
50734
  updated_at: string;
50324
50735
  user_id: string;
@@ -50332,6 +50743,7 @@ export declare const listSuppliersForPicker: import("@tanstack/start-client-core
50332
50743
  notes?: string | null;
50333
50744
  performed_at?: string;
50334
50745
  rescheduled_count?: number;
50746
+ stock_consumed_at?: string | null;
50335
50747
  total_carts?: number;
50336
50748
  updated_at?: string;
50337
50749
  user_id: string;
@@ -50345,6 +50757,7 @@ export declare const listSuppliersForPicker: import("@tanstack/start-client-core
50345
50757
  notes?: string | null;
50346
50758
  performed_at?: string;
50347
50759
  rescheduled_count?: number;
50760
+ stock_consumed_at?: string | null;
50348
50761
  total_carts?: number;
50349
50762
  updated_at?: string;
50350
50763
  user_id?: string;
@@ -56103,6 +56516,7 @@ export declare const listSuppliersForPicker: import("@tanstack/start-client-core
56103
56516
  purchase_price: number | null;
56104
56517
  quantity: number;
56105
56518
  sale_price: number | null;
56519
+ trade_item_key: string | null;
56106
56520
  unit: string;
56107
56521
  updated_at: string;
56108
56522
  weight: string | null;
@@ -56125,6 +56539,7 @@ export declare const listSuppliersForPicker: import("@tanstack/start-client-core
56125
56539
  purchase_price?: number | null;
56126
56540
  quantity?: number;
56127
56541
  sale_price?: number | null;
56542
+ trade_item_key?: string | null;
56128
56543
  unit?: string;
56129
56544
  updated_at?: string;
56130
56545
  weight?: string | null;
@@ -56147,6 +56562,7 @@ export declare const listSuppliersForPicker: import("@tanstack/start-client-core
56147
56562
  purchase_price?: number | null;
56148
56563
  quantity?: number;
56149
56564
  sale_price?: number | null;
56565
+ trade_item_key?: string | null;
56150
56566
  unit?: string;
56151
56567
  updated_at?: string;
56152
56568
  weight?: string | null;
@@ -56966,6 +57382,60 @@ export declare const listSuppliersForPicker: import("@tanstack/start-client-core
56966
57382
  };
56967
57383
  Relationships: [];
56968
57384
  };
57385
+ stock_mutation_log: {
57386
+ Row: {
57387
+ connection_id: string | null;
57388
+ created_at: string;
57389
+ created_by: string | null;
57390
+ id: string;
57391
+ mutation_type: string;
57392
+ order_id: string | null;
57393
+ order_item_id: string | null;
57394
+ order_source: string | null;
57395
+ physical_after: number | null;
57396
+ physical_before: number | null;
57397
+ qty_delta: number;
57398
+ reason: string | null;
57399
+ reserved_after: number | null;
57400
+ reserved_before: number | null;
57401
+ trade_item_key: string;
57402
+ };
57403
+ Insert: {
57404
+ connection_id?: string | null;
57405
+ created_at?: string;
57406
+ created_by?: string | null;
57407
+ id?: string;
57408
+ mutation_type: string;
57409
+ order_id?: string | null;
57410
+ order_item_id?: string | null;
57411
+ order_source?: string | null;
57412
+ physical_after?: number | null;
57413
+ physical_before?: number | null;
57414
+ qty_delta: number;
57415
+ reason?: string | null;
57416
+ reserved_after?: number | null;
57417
+ reserved_before?: number | null;
57418
+ trade_item_key: string;
57419
+ };
57420
+ Update: {
57421
+ connection_id?: string | null;
57422
+ created_at?: string;
57423
+ created_by?: string | null;
57424
+ id?: string;
57425
+ mutation_type?: string;
57426
+ order_id?: string | null;
57427
+ order_item_id?: string | null;
57428
+ order_source?: string | null;
57429
+ physical_after?: number | null;
57430
+ physical_before?: number | null;
57431
+ qty_delta?: number;
57432
+ reason?: string | null;
57433
+ reserved_after?: number | null;
57434
+ reserved_before?: number | null;
57435
+ trade_item_key?: string;
57436
+ };
57437
+ Relationships: [];
57438
+ };
56969
57439
  supplier_products: {
56970
57440
  Row: {
56971
57441
  article_number: string | null;
@@ -58827,6 +59297,28 @@ export declare const listSuppliersForPicker: import("@tanstack/start-client-core
58827
59297
  };
58828
59298
  Returns: number;
58829
59299
  };
59300
+ apply_stock_consumption: {
59301
+ Args: {
59302
+ p_order_id: string;
59303
+ p_order_item_id: string;
59304
+ p_qty: number;
59305
+ p_reason: string;
59306
+ p_source: string;
59307
+ p_trade_item_key: string;
59308
+ };
59309
+ Returns: undefined;
59310
+ };
59311
+ apply_stock_reservation: {
59312
+ Args: {
59313
+ p_order_id: string;
59314
+ p_order_item_id: string;
59315
+ p_qty: number;
59316
+ p_reason: string;
59317
+ p_source: string;
59318
+ p_trade_item_key: string;
59319
+ };
59320
+ Returns: undefined;
59321
+ };
58830
59322
  assign_cart_numbers: {
58831
59323
  Args: {
58832
59324
  p_carts: import("../integrations/supabase/types").Json;