@flowselections/mailbox-orders 1.0.5 → 1.0.7

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.
@@ -730,6 +730,7 @@ export type Database = {
730
730
  notes: string | null;
731
731
  performed_at: string;
732
732
  rescheduled_count: number;
733
+ stock_consumed_at: string | null;
733
734
  total_carts: number;
734
735
  updated_at: string;
735
736
  user_id: string;
@@ -743,6 +744,7 @@ export type Database = {
743
744
  notes?: string | null;
744
745
  performed_at?: string;
745
746
  rescheduled_count?: number;
747
+ stock_consumed_at?: string | null;
746
748
  total_carts?: number;
747
749
  updated_at?: string;
748
750
  user_id: string;
@@ -756,6 +758,7 @@ export type Database = {
756
758
  notes?: string | null;
757
759
  performed_at?: string;
758
760
  rescheduled_count?: number;
761
+ stock_consumed_at?: string | null;
759
762
  total_carts?: number;
760
763
  updated_at?: string;
761
764
  user_id?: string;
@@ -6699,6 +6702,7 @@ export type Database = {
6699
6702
  purchase_price: number | null;
6700
6703
  quantity: number;
6701
6704
  sale_price: number | null;
6705
+ trade_item_key: string | null;
6702
6706
  unit: string;
6703
6707
  updated_at: string;
6704
6708
  weight: string | null;
@@ -6721,6 +6725,7 @@ export type Database = {
6721
6725
  purchase_price?: number | null;
6722
6726
  quantity?: number;
6723
6727
  sale_price?: number | null;
6728
+ trade_item_key?: string | null;
6724
6729
  unit?: string;
6725
6730
  updated_at?: string;
6726
6731
  weight?: string | null;
@@ -6743,6 +6748,7 @@ export type Database = {
6743
6748
  purchase_price?: number | null;
6744
6749
  quantity?: number;
6745
6750
  sale_price?: number | null;
6751
+ trade_item_key?: string | null;
6746
6752
  unit?: string;
6747
6753
  updated_at?: string;
6748
6754
  weight?: string | null;
@@ -7594,6 +7600,60 @@ export type Database = {
7594
7600
  };
7595
7601
  Relationships: [];
7596
7602
  };
7603
+ stock_mutation_log: {
7604
+ Row: {
7605
+ connection_id: string | null;
7606
+ created_at: string;
7607
+ created_by: string | null;
7608
+ id: string;
7609
+ mutation_type: string;
7610
+ order_id: string | null;
7611
+ order_item_id: string | null;
7612
+ order_source: string | null;
7613
+ physical_after: number | null;
7614
+ physical_before: number | null;
7615
+ qty_delta: number;
7616
+ reason: string | null;
7617
+ reserved_after: number | null;
7618
+ reserved_before: number | null;
7619
+ trade_item_key: string;
7620
+ };
7621
+ Insert: {
7622
+ connection_id?: string | null;
7623
+ created_at?: string;
7624
+ created_by?: string | null;
7625
+ id?: string;
7626
+ mutation_type: string;
7627
+ order_id?: string | null;
7628
+ order_item_id?: string | null;
7629
+ order_source?: string | null;
7630
+ physical_after?: number | null;
7631
+ physical_before?: number | null;
7632
+ qty_delta: number;
7633
+ reason?: string | null;
7634
+ reserved_after?: number | null;
7635
+ reserved_before?: number | null;
7636
+ trade_item_key: string;
7637
+ };
7638
+ Update: {
7639
+ connection_id?: string | null;
7640
+ created_at?: string;
7641
+ created_by?: string | null;
7642
+ id?: string;
7643
+ mutation_type?: string;
7644
+ order_id?: string | null;
7645
+ order_item_id?: string | null;
7646
+ order_source?: string | null;
7647
+ physical_after?: number | null;
7648
+ physical_before?: number | null;
7649
+ qty_delta?: number;
7650
+ reason?: string | null;
7651
+ reserved_after?: number | null;
7652
+ reserved_before?: number | null;
7653
+ trade_item_key?: string;
7654
+ };
7655
+ Relationships: [];
7656
+ };
7597
7657
  supplier_products: {
7598
7658
  Row: {
7599
7659
  article_number: string | null;
@@ -9497,6 +9557,54 @@ export type Database = {
9497
9557
  };
9498
9558
  Returns: number;
9499
9559
  };
9560
+ afh_city_code: {
9561
+ Args: {
9562
+ _city: string;
9563
+ _country: string;
9564
+ };
9565
+ Returns: string;
9566
+ };
9567
+ afh_normalize_country: {
9568
+ Args: {
9569
+ _raw: string;
9570
+ };
9571
+ Returns: string;
9572
+ };
9573
+ afh_normalize_nl_province: {
9574
+ Args: {
9575
+ _raw: string;
9576
+ };
9577
+ Returns: string;
9578
+ };
9579
+ afh_subtract_workdays: {
9580
+ Args: {
9581
+ _date: string;
9582
+ _days: number;
9583
+ };
9584
+ Returns: string;
9585
+ };
9586
+ apply_stock_consumption: {
9587
+ Args: {
9588
+ p_order_id: string;
9589
+ p_order_item_id: string;
9590
+ p_qty: number;
9591
+ p_reason: string;
9592
+ p_source: string;
9593
+ p_trade_item_key: string;
9594
+ };
9595
+ Returns: undefined;
9596
+ };
9597
+ apply_stock_reservation: {
9598
+ Args: {
9599
+ p_order_id: string;
9600
+ p_order_item_id: string;
9601
+ p_qty: number;
9602
+ p_reason: string;
9603
+ p_source: string;
9604
+ p_trade_item_key: string;
9605
+ };
9606
+ Returns: undefined;
9607
+ };
9500
9608
  assign_cart_numbers: {
9501
9609
  Args: {
9502
9610
  p_carts: Json;
@@ -9520,12 +9628,40 @@ export type Database = {
9520
9628
  order_number: string;
9521
9629
  }[];
9522
9630
  };
9631
+ backfill_open_order_reservations: {
9632
+ Args: never;
9633
+ Returns: {
9634
+ processed_items: number;
9635
+ }[];
9636
+ };
9523
9637
  call_exact_route: {
9524
9638
  Args: {
9525
9639
  path: string;
9526
9640
  };
9527
9641
  Returns: number;
9528
9642
  };
9643
+ check_offer_product_available_stock: {
9644
+ Args: {
9645
+ p_campaign_product_id: string;
9646
+ p_code: string;
9647
+ p_needed_qty?: number;
9648
+ p_product_name?: string;
9649
+ };
9650
+ Returns: Json;
9651
+ };
9652
+ check_trade_item_available_stock: {
9653
+ Args: {
9654
+ p_connection_id?: string;
9655
+ p_context?: string;
9656
+ p_needed_qty?: number;
9657
+ p_order_id?: string;
9658
+ p_order_item_id?: string;
9659
+ p_owner_id?: string;
9660
+ p_product_name?: string;
9661
+ p_trade_item_key: string;
9662
+ };
9663
+ Returns: Json;
9664
+ };
9529
9665
  cleanup_old_bookings: {
9530
9666
  Args: never;
9531
9667
  Returns: number;
@@ -9569,6 +9705,12 @@ export type Database = {
9569
9705
  table_name: string;
9570
9706
  }[];
9571
9707
  };
9708
+ dispatch_carrier_signups_sql: {
9709
+ Args: {
9710
+ _catchup?: string;
9711
+ };
9712
+ Returns: Json;
9713
+ };
9572
9714
  email_auth_decrypt: {
9573
9715
  Args: {
9574
9716
  cipher: string;
@@ -9641,6 +9783,12 @@ export type Database = {
9641
9783
  };
9642
9784
  Returns: boolean;
9643
9785
  };
9786
+ find_trade_item_key_by_name: {
9787
+ Args: {
9788
+ p_name: string;
9789
+ };
9790
+ Returns: string;
9791
+ };
9644
9792
  format_cart_number: {
9645
9793
  Args: {
9646
9794
  p_pick_date: string;