@flowselections/floriday-verkoop-module 1.0.57 → 1.0.58

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 (127) hide show
  1. package/dist-lib/components/verkoop/AnalyticsCards.d.ts +1 -1
  2. package/dist-lib/components/verkoop/AnalyticsCards.d.ts.map +1 -1
  3. package/dist-lib/components/verkoop/AutoFulfillmentStatusCard.d.ts +1 -1
  4. package/dist-lib/components/verkoop/AutoFulfillmentStatusCard.d.ts.map +1 -1
  5. package/dist-lib/components/verkoop/CartAssignmentWizard.d.ts +1 -1
  6. package/dist-lib/components/verkoop/CartAssignmentWizard.d.ts.map +1 -1
  7. package/dist-lib/components/verkoop/CreateOrderPage.d.ts +1 -1
  8. package/dist-lib/components/verkoop/CreateOrderPage.d.ts.map +1 -1
  9. package/dist-lib/components/verkoop/DiagnoseConnectionDialog.d.ts +1 -1
  10. package/dist-lib/components/verkoop/DiagnoseConnectionDialog.d.ts.map +1 -1
  11. package/dist-lib/components/verkoop/EditLocalOrderDialog.d.ts +1 -1
  12. package/dist-lib/components/verkoop/EditLocalOrderDialog.d.ts.map +1 -1
  13. package/dist-lib/components/verkoop/EngineBufferCard.d.ts +1 -1
  14. package/dist-lib/components/verkoop/EngineBufferCard.d.ts.map +1 -1
  15. package/dist-lib/components/verkoop/InvoiceTimingSettings.d.ts +1 -1
  16. package/dist-lib/components/verkoop/InvoiceTimingSettings.d.ts.map +1 -1
  17. package/dist-lib/components/verkoop/OrderAfleverbrievenCard.d.ts +1 -1
  18. package/dist-lib/components/verkoop/OrderAfleverbrievenCard.d.ts.map +1 -1
  19. package/dist-lib/components/verkoop/OrderCarrierPicker.d.ts +1 -1
  20. package/dist-lib/components/verkoop/OrderCarrierPicker.d.ts.map +1 -1
  21. package/dist-lib/components/verkoop/OrderControlStatusCard.d.ts +1 -1
  22. package/dist-lib/components/verkoop/OrderControlStatusCard.d.ts.map +1 -1
  23. package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts +1 -1
  24. package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts.map +1 -1
  25. package/dist-lib/components/verkoop/OrderPickupMomentPicker.d.ts +1 -1
  26. package/dist-lib/components/verkoop/OrderPickupMomentPicker.d.ts.map +1 -1
  27. package/dist-lib/components/verkoop/OrderShipmentsCard.d.ts +1 -1
  28. package/dist-lib/components/verkoop/OrderShipmentsCard.d.ts.map +1 -1
  29. package/dist-lib/components/verkoop/SalesOrderDetailPage.d.ts +1 -1
  30. package/dist-lib/components/verkoop/SalesOrderDetailPage.d.ts.map +1 -1
  31. package/dist-lib/components/verkoop/SalesOrderDetailPage.js +6 -6
  32. package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts +1 -1
  33. package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts.map +1 -1
  34. package/dist-lib/components/verkoop/SalesOrdersFilterPanel.d.ts +1 -1
  35. package/dist-lib/components/verkoop/SalesOrdersFilterPanel.d.ts.map +1 -1
  36. package/dist-lib/components/verkoop/SalesOrdersFilters.d.ts +1 -1
  37. package/dist-lib/components/verkoop/SalesOrdersFilters.d.ts.map +1 -1
  38. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts +2 -1
  39. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
  40. package/dist-lib/components/verkoop/SearchableSelect.d.ts +1 -1
  41. package/dist-lib/components/verkoop/SearchableSelect.d.ts.map +1 -1
  42. package/dist-lib/components/verkoop/StockConsumptionAlertsBanner.d.ts +1 -1
  43. package/dist-lib/components/verkoop/StockConsumptionAlertsBanner.d.ts.map +1 -1
  44. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts +1 -1
  45. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts.map +1 -1
  46. package/dist-lib/components/verkoop/WeekCalendar.d.ts +1 -1
  47. package/dist-lib/components/verkoop/WeekCalendar.d.ts.map +1 -1
  48. package/dist-lib/integrations/supabase/auth-middleware.d.ts +252 -0
  49. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  50. package/dist-lib/integrations/supabase/client.d.ts +252 -0
  51. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  52. package/dist-lib/integrations/supabase/client.js +1 -1
  53. package/dist-lib/integrations/supabase/client.server.d.ts +252 -0
  54. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  55. package/dist-lib/integrations/supabase/client.server.js +1 -1
  56. package/dist-lib/integrations/supabase/types.d.ts +252 -0
  57. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  58. package/dist-lib/lib/cart-lock.functions.d.ts +252 -0
  59. package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
  60. package/dist-lib/lib/cart-planning-settings.functions.d.ts +2772 -0
  61. package/dist-lib/lib/cart-planning-settings.functions.d.ts.map +1 -1
  62. package/dist-lib/lib/cart-replan.functions.d.ts +756 -0
  63. package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
  64. package/dist-lib/lib/create-order.functions.d.ts +4284 -0
  65. package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
  66. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +756 -0
  67. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
  68. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +504 -0
  69. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
  70. package/dist-lib/lib/floriday-mirror.functions.d.ts +252 -0
  71. package/dist-lib/lib/floriday-mirror.functions.d.ts.map +1 -1
  72. package/dist-lib/lib/floriday-public.functions.d.ts +1764 -0
  73. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  74. package/dist-lib/lib/floriday-writes.functions.d.ts +1260 -0
  75. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  76. package/dist-lib/lib/invoice-timing.functions.d.ts +1008 -0
  77. package/dist-lib/lib/invoice-timing.functions.d.ts.map +1 -1
  78. package/dist-lib/lib/load-carriers.functions.d.ts +252 -0
  79. package/dist-lib/lib/load-carriers.functions.d.ts.map +1 -1
  80. package/dist-lib/lib/logistics-engine.functions.d.ts +1275 -5
  81. package/dist-lib/lib/logistics-engine.functions.d.ts.map +1 -1
  82. package/dist-lib/lib/logistics-stock.functions.d.ts +504 -0
  83. package/dist-lib/lib/logistics-stock.functions.d.ts.map +1 -1
  84. package/dist-lib/lib/order-addresses.functions.d.ts +252 -0
  85. package/dist-lib/lib/order-addresses.functions.d.ts.map +1 -1
  86. package/dist-lib/lib/order-buffers.functions.d.ts +756 -0
  87. package/dist-lib/lib/order-buffers.functions.d.ts.map +1 -1
  88. package/dist-lib/lib/order-carrier.functions.d.ts +504 -0
  89. package/dist-lib/lib/order-carrier.functions.d.ts.map +1 -1
  90. package/dist-lib/lib/order-pickup.functions.d.ts +504 -0
  91. package/dist-lib/lib/order-pickup.functions.d.ts.map +1 -1
  92. package/dist-lib/lib/order-shipments.functions.d.ts +1008 -0
  93. package/dist-lib/lib/order-shipments.functions.d.ts.map +1 -1
  94. package/dist-lib/lib/salesorders-list.functions.d.ts +252 -0
  95. package/dist-lib/lib/salesorders-list.functions.d.ts.map +1 -1
  96. package/dist-lib/lib/salesorders.functions.d.ts +1260 -0
  97. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  98. package/dist-lib/lib/stock-consumption-alerts.functions.d.ts +504 -0
  99. package/dist-lib/lib/stock-consumption-alerts.functions.d.ts.map +1 -1
  100. package/dist-lib/lib/tradeitems.functions.d.ts +252 -0
  101. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  102. package/dist-lib/lib/useSalesOrderDetailQuery.d.ts +1 -1
  103. package/dist-lib/lib/useSalesOrderDetailQuery.d.ts.map +1 -1
  104. package/dist-lib/lib/useSalesOrdersQuery.d.ts +1 -1
  105. package/dist-lib/lib/useSalesOrdersQuery.d.ts.map +1 -1
  106. package/package.json +131 -131
  107. package/dist-lib/components/floriday/FlorydaySyncHealthBanner.d.ts +0 -9
  108. package/dist-lib/components/floriday/FlorydaySyncHealthBanner.d.ts.map +0 -1
  109. package/dist-lib/components/floriday/FlorydaySyncHealthBanner.js +0 -26
  110. package/dist-lib/components/karindeling/AfmetingenTab.d.ts +0 -6
  111. package/dist-lib/components/karindeling/AfmetingenTab.d.ts.map +0 -1
  112. package/dist-lib/components/karindeling/AfmetingenTab.js +0 -128
  113. package/dist-lib/components/karindeling/KarindelingPage.d.ts +0 -2
  114. package/dist-lib/components/karindeling/KarindelingPage.d.ts.map +0 -1
  115. package/dist-lib/components/karindeling/KarindelingPage.js +0 -102
  116. package/dist-lib/components/ui/dropdown-menu.d.ts +0 -9
  117. package/dist-lib/components/ui/dropdown-menu.d.ts.map +0 -1
  118. package/dist-lib/components/ui/dropdown-menu.js +0 -14
  119. package/dist-lib/components/verkoop/CreateOrderDialog.d.ts +0 -5
  120. package/dist-lib/components/verkoop/CreateOrderDialog.d.ts.map +0 -1
  121. package/dist-lib/components/verkoop/CreateOrderDialog.js +0 -33
  122. package/dist-lib/lib/floriday/floriday.server.d.ts +0 -14
  123. package/dist-lib/lib/floriday/floriday.server.d.ts.map +0 -1
  124. package/dist-lib/lib/floriday/floriday.server.js +0 -92
  125. package/dist-lib/lib/floriday/sales-orders.functions.d.ts +0 -4736
  126. package/dist-lib/lib/floriday/sales-orders.functions.d.ts.map +0 -1
  127. package/dist-lib/lib/floriday/sales-orders.functions.js +0 -193
@@ -6097,6 +6097,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
6097
6097
  attempts: number;
6098
6098
  connection_id: string;
6099
6099
  created_at: string;
6100
+ dead_lettered_at: string | null;
6100
6101
  desired_available: boolean | null;
6101
6102
  gateway_attempt_id: string | null;
6102
6103
  id: string;
@@ -6105,9 +6106,13 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
6105
6106
  locked_by: string | null;
6106
6107
  next_attempt_at: string;
6107
6108
  number_of_pieces: number;
6109
+ product_id: string | null;
6108
6110
  sent_at: string | null;
6109
6111
  status: string;
6112
+ stock_mode: string | null;
6110
6113
  superseded_by: string | null;
6114
+ target_week: number | null;
6115
+ target_year: number | null;
6111
6116
  trade_item_id: string;
6112
6117
  updated_at: string;
6113
6118
  user_id: string;
@@ -6116,6 +6121,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
6116
6121
  attempts?: number;
6117
6122
  connection_id: string;
6118
6123
  created_at?: string;
6124
+ dead_lettered_at?: string | null;
6119
6125
  desired_available?: boolean | null;
6120
6126
  gateway_attempt_id?: string | null;
6121
6127
  id?: string;
@@ -6124,9 +6130,13 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
6124
6130
  locked_by?: string | null;
6125
6131
  next_attempt_at?: string;
6126
6132
  number_of_pieces?: number;
6133
+ product_id?: string | null;
6127
6134
  sent_at?: string | null;
6128
6135
  status?: string;
6136
+ stock_mode?: string | null;
6129
6137
  superseded_by?: string | null;
6138
+ target_week?: number | null;
6139
+ target_year?: number | null;
6130
6140
  trade_item_id: string;
6131
6141
  updated_at?: string;
6132
6142
  user_id: string;
@@ -6135,6 +6145,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
6135
6145
  attempts?: number;
6136
6146
  connection_id?: string;
6137
6147
  created_at?: string;
6148
+ dead_lettered_at?: string | null;
6138
6149
  desired_available?: boolean | null;
6139
6150
  gateway_attempt_id?: string | null;
6140
6151
  id?: string;
@@ -6143,9 +6154,13 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
6143
6154
  locked_by?: string | null;
6144
6155
  next_attempt_at?: string;
6145
6156
  number_of_pieces?: number;
6157
+ product_id?: string | null;
6146
6158
  sent_at?: string | null;
6147
6159
  status?: string;
6160
+ stock_mode?: string | null;
6148
6161
  superseded_by?: string | null;
6162
+ target_week?: number | null;
6163
+ target_year?: number | null;
6149
6164
  trade_item_id?: string;
6150
6165
  updated_at?: string;
6151
6166
  user_id?: string;
@@ -6554,6 +6569,87 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
6554
6569
  referencedColumns: ["id"];
6555
6570
  }];
6556
6571
  };
6572
+ floriday_inventory_settings: {
6573
+ Row: {
6574
+ buffer_quantity: number;
6575
+ connection_id: string;
6576
+ created_at: string;
6577
+ desired_availability: boolean;
6578
+ desired_quantity: number;
6579
+ fixed_quantity: number | null;
6580
+ floriday_trade_item_id: string | null;
6581
+ id: string;
6582
+ last_confirmed_at: string | null;
6583
+ last_enqueued_at: string | null;
6584
+ last_published_at: string | null;
6585
+ last_sync_error: string | null;
6586
+ manual_quantity: number | null;
6587
+ maximum_quantity: number | null;
6588
+ product_id: string;
6589
+ quantity_control: string;
6590
+ remote_available: boolean | null;
6591
+ remote_checked_at: string | null;
6592
+ remote_quantity: number | null;
6593
+ stock_mode: string;
6594
+ sync_status: string;
6595
+ updated_at: string;
6596
+ updated_by: string | null;
6597
+ user_id: string;
6598
+ };
6599
+ Insert: {
6600
+ buffer_quantity?: number;
6601
+ connection_id: string;
6602
+ created_at?: string;
6603
+ desired_availability?: boolean;
6604
+ desired_quantity?: number;
6605
+ fixed_quantity?: number | null;
6606
+ floriday_trade_item_id?: string | null;
6607
+ id?: string;
6608
+ last_confirmed_at?: string | null;
6609
+ last_enqueued_at?: string | null;
6610
+ last_published_at?: string | null;
6611
+ last_sync_error?: string | null;
6612
+ manual_quantity?: number | null;
6613
+ maximum_quantity?: number | null;
6614
+ product_id: string;
6615
+ quantity_control?: string;
6616
+ remote_available?: boolean | null;
6617
+ remote_checked_at?: string | null;
6618
+ remote_quantity?: number | null;
6619
+ stock_mode?: string;
6620
+ sync_status?: string;
6621
+ updated_at?: string;
6622
+ updated_by?: string | null;
6623
+ user_id: string;
6624
+ };
6625
+ Update: {
6626
+ buffer_quantity?: number;
6627
+ connection_id?: string;
6628
+ created_at?: string;
6629
+ desired_availability?: boolean;
6630
+ desired_quantity?: number;
6631
+ fixed_quantity?: number | null;
6632
+ floriday_trade_item_id?: string | null;
6633
+ id?: string;
6634
+ last_confirmed_at?: string | null;
6635
+ last_enqueued_at?: string | null;
6636
+ last_published_at?: string | null;
6637
+ last_sync_error?: string | null;
6638
+ manual_quantity?: number | null;
6639
+ maximum_quantity?: number | null;
6640
+ product_id?: string;
6641
+ quantity_control?: string;
6642
+ remote_available?: boolean | null;
6643
+ remote_checked_at?: string | null;
6644
+ remote_quantity?: number | null;
6645
+ stock_mode?: string;
6646
+ sync_status?: string;
6647
+ updated_at?: string;
6648
+ updated_by?: string | null;
6649
+ user_id?: string;
6650
+ };
6651
+ Relationships: [];
6652
+ };
6557
6653
  floriday_invoices_cache: {
6558
6654
  Row: {
6559
6655
  buyer_organization_id: string | null;
@@ -6842,6 +6938,39 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
6842
6938
  };
6843
6939
  Relationships: [];
6844
6940
  };
6941
+ floriday_sales_order_ingest: {
6942
+ Row: {
6943
+ connection_id: string;
6944
+ created_at: string;
6945
+ id: string;
6946
+ impact: import("../integrations/supabase/types").Json;
6947
+ order_status: string | null;
6948
+ order_version: number;
6949
+ processed_at: string;
6950
+ sales_order_id: string;
6951
+ };
6952
+ Insert: {
6953
+ connection_id: string;
6954
+ created_at?: string;
6955
+ id?: string;
6956
+ impact?: import("../integrations/supabase/types").Json;
6957
+ order_status?: string | null;
6958
+ order_version?: number;
6959
+ processed_at?: string;
6960
+ sales_order_id: string;
6961
+ };
6962
+ Update: {
6963
+ connection_id?: string;
6964
+ created_at?: string;
6965
+ id?: string;
6966
+ impact?: import("../integrations/supabase/types").Json;
6967
+ order_status?: string | null;
6968
+ order_version?: number;
6969
+ processed_at?: string;
6970
+ sales_order_id?: string;
6971
+ };
6972
+ Relationships: [];
6973
+ };
6845
6974
  floriday_sales_strategies_cache: {
6846
6975
  Row: {
6847
6976
  connection_id: string;
@@ -6941,6 +7070,39 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
6941
7070
  };
6942
7071
  Relationships: [];
6943
7072
  };
7073
+ floriday_sync_cursors: {
7074
+ Row: {
7075
+ connection_id: string;
7076
+ created_at: string;
7077
+ id: string;
7078
+ last_error: string | null;
7079
+ last_sync_at: string | null;
7080
+ resource_type: string;
7081
+ sequence_number: number;
7082
+ updated_at: string;
7083
+ };
7084
+ Insert: {
7085
+ connection_id: string;
7086
+ created_at?: string;
7087
+ id?: string;
7088
+ last_error?: string | null;
7089
+ last_sync_at?: string | null;
7090
+ resource_type: string;
7091
+ sequence_number?: number;
7092
+ updated_at?: string;
7093
+ };
7094
+ Update: {
7095
+ connection_id?: string;
7096
+ created_at?: string;
7097
+ id?: string;
7098
+ last_error?: string | null;
7099
+ last_sync_at?: string | null;
7100
+ resource_type?: string;
7101
+ sequence_number?: number;
7102
+ updated_at?: string;
7103
+ };
7104
+ Relationships: [];
7105
+ };
6944
7106
  floriday_sync_state: {
6945
7107
  Row: {
6946
7108
  connection_id: string;
@@ -7631,6 +7793,42 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7631
7793
  };
7632
7794
  Relationships: [];
7633
7795
  };
7796
+ inventory_stock_snapshots: {
7797
+ Row: {
7798
+ connection_id: string;
7799
+ created_at: string;
7800
+ erp_available_quantity: number;
7801
+ floriday_desired_quantity: number;
7802
+ floriday_remote_quantity: number | null;
7803
+ granularity: string;
7804
+ id: string;
7805
+ snapshot_at: string;
7806
+ user_id: string | null;
7807
+ };
7808
+ Insert: {
7809
+ connection_id: string;
7810
+ created_at?: string;
7811
+ erp_available_quantity?: number;
7812
+ floriday_desired_quantity?: number;
7813
+ floriday_remote_quantity?: number | null;
7814
+ granularity?: string;
7815
+ id?: string;
7816
+ snapshot_at?: string;
7817
+ user_id?: string | null;
7818
+ };
7819
+ Update: {
7820
+ connection_id?: string;
7821
+ created_at?: string;
7822
+ erp_available_quantity?: number;
7823
+ floriday_desired_quantity?: number;
7824
+ floriday_remote_quantity?: number | null;
7825
+ granularity?: string;
7826
+ id?: string;
7827
+ snapshot_at?: string;
7828
+ user_id?: string | null;
7829
+ };
7830
+ Relationships: [];
7831
+ };
7634
7832
  invoice_items: {
7635
7833
  Row: {
7636
7834
  created_at: string;
@@ -16825,6 +17023,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
16825
17023
  };
16826
17024
  trade_item_stock: {
16827
17025
  Row: {
17026
+ change_source: string;
16828
17027
  connection_id: string;
16829
17028
  created_at: string;
16830
17029
  id: string;
@@ -16838,6 +17037,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
16838
17037
  user_id: string;
16839
17038
  };
16840
17039
  Insert: {
17040
+ change_source?: string;
16841
17041
  connection_id: string;
16842
17042
  created_at?: string;
16843
17043
  id?: string;
@@ -16851,6 +17051,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
16851
17051
  user_id: string;
16852
17052
  };
16853
17053
  Update: {
17054
+ change_source?: string;
16854
17055
  connection_id?: string;
16855
17056
  created_at?: string;
16856
17057
  id?: string;
@@ -20451,6 +20652,18 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
20451
20652
  Args: never;
20452
20653
  Returns: number;
20453
20654
  };
20655
+ calculate_floriday_desired_stock: {
20656
+ Args: {
20657
+ p_connection_id: string;
20658
+ p_product_id: string;
20659
+ };
20660
+ Returns: {
20661
+ desired_availability: boolean;
20662
+ desired_quantity: number;
20663
+ erp_available: number;
20664
+ stock_mode: string;
20665
+ }[];
20666
+ };
20454
20667
  calculate_layer_stock: {
20455
20668
  Args: {
20456
20669
  p_product_id: string;
@@ -20545,6 +20758,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
20545
20758
  attempts: number;
20546
20759
  connection_id: string;
20547
20760
  created_at: string;
20761
+ dead_lettered_at: string | null;
20548
20762
  desired_available: boolean | null;
20549
20763
  gateway_attempt_id: string | null;
20550
20764
  id: string;
@@ -20553,9 +20767,13 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
20553
20767
  locked_by: string | null;
20554
20768
  next_attempt_at: string;
20555
20769
  number_of_pieces: number;
20770
+ product_id: string | null;
20556
20771
  sent_at: string | null;
20557
20772
  status: string;
20773
+ stock_mode: string | null;
20558
20774
  superseded_by: string | null;
20775
+ target_week: number | null;
20776
+ target_year: number | null;
20559
20777
  trade_item_id: string;
20560
20778
  updated_at: string;
20561
20779
  user_id: string;
@@ -21036,6 +21254,24 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
21036
21254
  };
21037
21255
  Returns: string;
21038
21256
  };
21257
+ floriday_capture_stock_snapshot: {
21258
+ Args: never;
21259
+ Returns: number;
21260
+ };
21261
+ floriday_cleanup_stock_queue_v2: {
21262
+ Args: never;
21263
+ Returns: undefined;
21264
+ };
21265
+ floriday_compact_stock_snapshots: {
21266
+ Args: never;
21267
+ Returns: undefined;
21268
+ };
21269
+ floriday_default_owner: {
21270
+ Args: {
21271
+ p_connection_id: string;
21272
+ };
21273
+ Returns: string;
21274
+ };
21039
21275
  floriday_effective_price: {
21040
21276
  Args: {
21041
21277
  _buyer_id: string;
@@ -21053,6 +21289,22 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
21053
21289
  source_id: string;
21054
21290
  }[];
21055
21291
  };
21292
+ floriday_fill_publish_horizon: {
21293
+ Args: never;
21294
+ Returns: number;
21295
+ };
21296
+ floriday_publish_horizon_weeks: {
21297
+ Args: never;
21298
+ Returns: number;
21299
+ };
21300
+ floriday_recompute_inventory: {
21301
+ Args: {
21302
+ p_connection_id: string;
21303
+ p_force?: boolean;
21304
+ p_product_id: string;
21305
+ };
21306
+ Returns: undefined;
21307
+ };
21056
21308
  format_cart_number: {
21057
21309
  Args: {
21058
21310
  p_pick_date: string;
@@ -29692,6 +29944,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
29692
29944
  attempts: number;
29693
29945
  connection_id: string;
29694
29946
  created_at: string;
29947
+ dead_lettered_at: string | null;
29695
29948
  desired_available: boolean | null;
29696
29949
  gateway_attempt_id: string | null;
29697
29950
  id: string;
@@ -29700,9 +29953,13 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
29700
29953
  locked_by: string | null;
29701
29954
  next_attempt_at: string;
29702
29955
  number_of_pieces: number;
29956
+ product_id: string | null;
29703
29957
  sent_at: string | null;
29704
29958
  status: string;
29959
+ stock_mode: string | null;
29705
29960
  superseded_by: string | null;
29961
+ target_week: number | null;
29962
+ target_year: number | null;
29706
29963
  trade_item_id: string;
29707
29964
  updated_at: string;
29708
29965
  user_id: string;
@@ -29711,6 +29968,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
29711
29968
  attempts?: number;
29712
29969
  connection_id: string;
29713
29970
  created_at?: string;
29971
+ dead_lettered_at?: string | null;
29714
29972
  desired_available?: boolean | null;
29715
29973
  gateway_attempt_id?: string | null;
29716
29974
  id?: string;
@@ -29719,9 +29977,13 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
29719
29977
  locked_by?: string | null;
29720
29978
  next_attempt_at?: string;
29721
29979
  number_of_pieces?: number;
29980
+ product_id?: string | null;
29722
29981
  sent_at?: string | null;
29723
29982
  status?: string;
29983
+ stock_mode?: string | null;
29724
29984
  superseded_by?: string | null;
29985
+ target_week?: number | null;
29986
+ target_year?: number | null;
29725
29987
  trade_item_id: string;
29726
29988
  updated_at?: string;
29727
29989
  user_id: string;
@@ -29730,6 +29992,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
29730
29992
  attempts?: number;
29731
29993
  connection_id?: string;
29732
29994
  created_at?: string;
29995
+ dead_lettered_at?: string | null;
29733
29996
  desired_available?: boolean | null;
29734
29997
  gateway_attempt_id?: string | null;
29735
29998
  id?: string;
@@ -29738,9 +30001,13 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
29738
30001
  locked_by?: string | null;
29739
30002
  next_attempt_at?: string;
29740
30003
  number_of_pieces?: number;
30004
+ product_id?: string | null;
29741
30005
  sent_at?: string | null;
29742
30006
  status?: string;
30007
+ stock_mode?: string | null;
29743
30008
  superseded_by?: string | null;
30009
+ target_week?: number | null;
30010
+ target_year?: number | null;
29744
30011
  trade_item_id?: string;
29745
30012
  updated_at?: string;
29746
30013
  user_id?: string;
@@ -30149,6 +30416,87 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
30149
30416
  referencedColumns: ["id"];
30150
30417
  }];
30151
30418
  };
30419
+ floriday_inventory_settings: {
30420
+ Row: {
30421
+ buffer_quantity: number;
30422
+ connection_id: string;
30423
+ created_at: string;
30424
+ desired_availability: boolean;
30425
+ desired_quantity: number;
30426
+ fixed_quantity: number | null;
30427
+ floriday_trade_item_id: string | null;
30428
+ id: string;
30429
+ last_confirmed_at: string | null;
30430
+ last_enqueued_at: string | null;
30431
+ last_published_at: string | null;
30432
+ last_sync_error: string | null;
30433
+ manual_quantity: number | null;
30434
+ maximum_quantity: number | null;
30435
+ product_id: string;
30436
+ quantity_control: string;
30437
+ remote_available: boolean | null;
30438
+ remote_checked_at: string | null;
30439
+ remote_quantity: number | null;
30440
+ stock_mode: string;
30441
+ sync_status: string;
30442
+ updated_at: string;
30443
+ updated_by: string | null;
30444
+ user_id: string;
30445
+ };
30446
+ Insert: {
30447
+ buffer_quantity?: number;
30448
+ connection_id: string;
30449
+ created_at?: string;
30450
+ desired_availability?: boolean;
30451
+ desired_quantity?: number;
30452
+ fixed_quantity?: number | null;
30453
+ floriday_trade_item_id?: string | null;
30454
+ id?: string;
30455
+ last_confirmed_at?: string | null;
30456
+ last_enqueued_at?: string | null;
30457
+ last_published_at?: string | null;
30458
+ last_sync_error?: string | null;
30459
+ manual_quantity?: number | null;
30460
+ maximum_quantity?: number | null;
30461
+ product_id: string;
30462
+ quantity_control?: string;
30463
+ remote_available?: boolean | null;
30464
+ remote_checked_at?: string | null;
30465
+ remote_quantity?: number | null;
30466
+ stock_mode?: string;
30467
+ sync_status?: string;
30468
+ updated_at?: string;
30469
+ updated_by?: string | null;
30470
+ user_id: string;
30471
+ };
30472
+ Update: {
30473
+ buffer_quantity?: number;
30474
+ connection_id?: string;
30475
+ created_at?: string;
30476
+ desired_availability?: boolean;
30477
+ desired_quantity?: number;
30478
+ fixed_quantity?: number | null;
30479
+ floriday_trade_item_id?: string | null;
30480
+ id?: string;
30481
+ last_confirmed_at?: string | null;
30482
+ last_enqueued_at?: string | null;
30483
+ last_published_at?: string | null;
30484
+ last_sync_error?: string | null;
30485
+ manual_quantity?: number | null;
30486
+ maximum_quantity?: number | null;
30487
+ product_id?: string;
30488
+ quantity_control?: string;
30489
+ remote_available?: boolean | null;
30490
+ remote_checked_at?: string | null;
30491
+ remote_quantity?: number | null;
30492
+ stock_mode?: string;
30493
+ sync_status?: string;
30494
+ updated_at?: string;
30495
+ updated_by?: string | null;
30496
+ user_id?: string;
30497
+ };
30498
+ Relationships: [];
30499
+ };
30152
30500
  floriday_invoices_cache: {
30153
30501
  Row: {
30154
30502
  buyer_organization_id: string | null;
@@ -30437,6 +30785,39 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
30437
30785
  };
30438
30786
  Relationships: [];
30439
30787
  };
30788
+ floriday_sales_order_ingest: {
30789
+ Row: {
30790
+ connection_id: string;
30791
+ created_at: string;
30792
+ id: string;
30793
+ impact: import("../integrations/supabase/types").Json;
30794
+ order_status: string | null;
30795
+ order_version: number;
30796
+ processed_at: string;
30797
+ sales_order_id: string;
30798
+ };
30799
+ Insert: {
30800
+ connection_id: string;
30801
+ created_at?: string;
30802
+ id?: string;
30803
+ impact?: import("../integrations/supabase/types").Json;
30804
+ order_status?: string | null;
30805
+ order_version?: number;
30806
+ processed_at?: string;
30807
+ sales_order_id: string;
30808
+ };
30809
+ Update: {
30810
+ connection_id?: string;
30811
+ created_at?: string;
30812
+ id?: string;
30813
+ impact?: import("../integrations/supabase/types").Json;
30814
+ order_status?: string | null;
30815
+ order_version?: number;
30816
+ processed_at?: string;
30817
+ sales_order_id?: string;
30818
+ };
30819
+ Relationships: [];
30820
+ };
30440
30821
  floriday_sales_strategies_cache: {
30441
30822
  Row: {
30442
30823
  connection_id: string;
@@ -30536,6 +30917,39 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
30536
30917
  };
30537
30918
  Relationships: [];
30538
30919
  };
30920
+ floriday_sync_cursors: {
30921
+ Row: {
30922
+ connection_id: string;
30923
+ created_at: string;
30924
+ id: string;
30925
+ last_error: string | null;
30926
+ last_sync_at: string | null;
30927
+ resource_type: string;
30928
+ sequence_number: number;
30929
+ updated_at: string;
30930
+ };
30931
+ Insert: {
30932
+ connection_id: string;
30933
+ created_at?: string;
30934
+ id?: string;
30935
+ last_error?: string | null;
30936
+ last_sync_at?: string | null;
30937
+ resource_type: string;
30938
+ sequence_number?: number;
30939
+ updated_at?: string;
30940
+ };
30941
+ Update: {
30942
+ connection_id?: string;
30943
+ created_at?: string;
30944
+ id?: string;
30945
+ last_error?: string | null;
30946
+ last_sync_at?: string | null;
30947
+ resource_type?: string;
30948
+ sequence_number?: number;
30949
+ updated_at?: string;
30950
+ };
30951
+ Relationships: [];
30952
+ };
30539
30953
  floriday_sync_state: {
30540
30954
  Row: {
30541
30955
  connection_id: string;
@@ -31226,6 +31640,42 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
31226
31640
  };
31227
31641
  Relationships: [];
31228
31642
  };
31643
+ inventory_stock_snapshots: {
31644
+ Row: {
31645
+ connection_id: string;
31646
+ created_at: string;
31647
+ erp_available_quantity: number;
31648
+ floriday_desired_quantity: number;
31649
+ floriday_remote_quantity: number | null;
31650
+ granularity: string;
31651
+ id: string;
31652
+ snapshot_at: string;
31653
+ user_id: string | null;
31654
+ };
31655
+ Insert: {
31656
+ connection_id: string;
31657
+ created_at?: string;
31658
+ erp_available_quantity?: number;
31659
+ floriday_desired_quantity?: number;
31660
+ floriday_remote_quantity?: number | null;
31661
+ granularity?: string;
31662
+ id?: string;
31663
+ snapshot_at?: string;
31664
+ user_id?: string | null;
31665
+ };
31666
+ Update: {
31667
+ connection_id?: string;
31668
+ created_at?: string;
31669
+ erp_available_quantity?: number;
31670
+ floriday_desired_quantity?: number;
31671
+ floriday_remote_quantity?: number | null;
31672
+ granularity?: string;
31673
+ id?: string;
31674
+ snapshot_at?: string;
31675
+ user_id?: string | null;
31676
+ };
31677
+ Relationships: [];
31678
+ };
31229
31679
  invoice_items: {
31230
31680
  Row: {
31231
31681
  created_at: string;
@@ -40420,6 +40870,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
40420
40870
  };
40421
40871
  trade_item_stock: {
40422
40872
  Row: {
40873
+ change_source: string;
40423
40874
  connection_id: string;
40424
40875
  created_at: string;
40425
40876
  id: string;
@@ -40433,6 +40884,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
40433
40884
  user_id: string;
40434
40885
  };
40435
40886
  Insert: {
40887
+ change_source?: string;
40436
40888
  connection_id: string;
40437
40889
  created_at?: string;
40438
40890
  id?: string;
@@ -40446,6 +40898,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
40446
40898
  user_id: string;
40447
40899
  };
40448
40900
  Update: {
40901
+ change_source?: string;
40449
40902
  connection_id?: string;
40450
40903
  created_at?: string;
40451
40904
  id?: string;
@@ -44046,6 +44499,18 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
44046
44499
  Args: never;
44047
44500
  Returns: number;
44048
44501
  };
44502
+ calculate_floriday_desired_stock: {
44503
+ Args: {
44504
+ p_connection_id: string;
44505
+ p_product_id: string;
44506
+ };
44507
+ Returns: {
44508
+ desired_availability: boolean;
44509
+ desired_quantity: number;
44510
+ erp_available: number;
44511
+ stock_mode: string;
44512
+ }[];
44513
+ };
44049
44514
  calculate_layer_stock: {
44050
44515
  Args: {
44051
44516
  p_product_id: string;
@@ -44140,6 +44605,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
44140
44605
  attempts: number;
44141
44606
  connection_id: string;
44142
44607
  created_at: string;
44608
+ dead_lettered_at: string | null;
44143
44609
  desired_available: boolean | null;
44144
44610
  gateway_attempt_id: string | null;
44145
44611
  id: string;
@@ -44148,9 +44614,13 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
44148
44614
  locked_by: string | null;
44149
44615
  next_attempt_at: string;
44150
44616
  number_of_pieces: number;
44617
+ product_id: string | null;
44151
44618
  sent_at: string | null;
44152
44619
  status: string;
44620
+ stock_mode: string | null;
44153
44621
  superseded_by: string | null;
44622
+ target_week: number | null;
44623
+ target_year: number | null;
44154
44624
  trade_item_id: string;
44155
44625
  updated_at: string;
44156
44626
  user_id: string;
@@ -44631,6 +45101,24 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
44631
45101
  };
44632
45102
  Returns: string;
44633
45103
  };
45104
+ floriday_capture_stock_snapshot: {
45105
+ Args: never;
45106
+ Returns: number;
45107
+ };
45108
+ floriday_cleanup_stock_queue_v2: {
45109
+ Args: never;
45110
+ Returns: undefined;
45111
+ };
45112
+ floriday_compact_stock_snapshots: {
45113
+ Args: never;
45114
+ Returns: undefined;
45115
+ };
45116
+ floriday_default_owner: {
45117
+ Args: {
45118
+ p_connection_id: string;
45119
+ };
45120
+ Returns: string;
45121
+ };
44634
45122
  floriday_effective_price: {
44635
45123
  Args: {
44636
45124
  _buyer_id: string;
@@ -44648,6 +45136,22 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
44648
45136
  source_id: string;
44649
45137
  }[];
44650
45138
  };
45139
+ floriday_fill_publish_horizon: {
45140
+ Args: never;
45141
+ Returns: number;
45142
+ };
45143
+ floriday_publish_horizon_weeks: {
45144
+ Args: never;
45145
+ Returns: number;
45146
+ };
45147
+ floriday_recompute_inventory: {
45148
+ Args: {
45149
+ p_connection_id: string;
45150
+ p_force?: boolean;
45151
+ p_product_id: string;
45152
+ };
45153
+ Returns: undefined;
45154
+ };
44651
45155
  format_cart_number: {
44652
45156
  Args: {
44653
45157
  p_pick_date: string;
@@ -53284,6 +53788,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
53284
53788
  attempts: number;
53285
53789
  connection_id: string;
53286
53790
  created_at: string;
53791
+ dead_lettered_at: string | null;
53287
53792
  desired_available: boolean | null;
53288
53793
  gateway_attempt_id: string | null;
53289
53794
  id: string;
@@ -53292,9 +53797,13 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
53292
53797
  locked_by: string | null;
53293
53798
  next_attempt_at: string;
53294
53799
  number_of_pieces: number;
53800
+ product_id: string | null;
53295
53801
  sent_at: string | null;
53296
53802
  status: string;
53803
+ stock_mode: string | null;
53297
53804
  superseded_by: string | null;
53805
+ target_week: number | null;
53806
+ target_year: number | null;
53298
53807
  trade_item_id: string;
53299
53808
  updated_at: string;
53300
53809
  user_id: string;
@@ -53303,6 +53812,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
53303
53812
  attempts?: number;
53304
53813
  connection_id: string;
53305
53814
  created_at?: string;
53815
+ dead_lettered_at?: string | null;
53306
53816
  desired_available?: boolean | null;
53307
53817
  gateway_attempt_id?: string | null;
53308
53818
  id?: string;
@@ -53311,9 +53821,13 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
53311
53821
  locked_by?: string | null;
53312
53822
  next_attempt_at?: string;
53313
53823
  number_of_pieces?: number;
53824
+ product_id?: string | null;
53314
53825
  sent_at?: string | null;
53315
53826
  status?: string;
53827
+ stock_mode?: string | null;
53316
53828
  superseded_by?: string | null;
53829
+ target_week?: number | null;
53830
+ target_year?: number | null;
53317
53831
  trade_item_id: string;
53318
53832
  updated_at?: string;
53319
53833
  user_id: string;
@@ -53322,6 +53836,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
53322
53836
  attempts?: number;
53323
53837
  connection_id?: string;
53324
53838
  created_at?: string;
53839
+ dead_lettered_at?: string | null;
53325
53840
  desired_available?: boolean | null;
53326
53841
  gateway_attempt_id?: string | null;
53327
53842
  id?: string;
@@ -53330,9 +53845,13 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
53330
53845
  locked_by?: string | null;
53331
53846
  next_attempt_at?: string;
53332
53847
  number_of_pieces?: number;
53848
+ product_id?: string | null;
53333
53849
  sent_at?: string | null;
53334
53850
  status?: string;
53851
+ stock_mode?: string | null;
53335
53852
  superseded_by?: string | null;
53853
+ target_week?: number | null;
53854
+ target_year?: number | null;
53336
53855
  trade_item_id?: string;
53337
53856
  updated_at?: string;
53338
53857
  user_id?: string;
@@ -53741,6 +54260,87 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
53741
54260
  referencedColumns: ["id"];
53742
54261
  }];
53743
54262
  };
54263
+ floriday_inventory_settings: {
54264
+ Row: {
54265
+ buffer_quantity: number;
54266
+ connection_id: string;
54267
+ created_at: string;
54268
+ desired_availability: boolean;
54269
+ desired_quantity: number;
54270
+ fixed_quantity: number | null;
54271
+ floriday_trade_item_id: string | null;
54272
+ id: string;
54273
+ last_confirmed_at: string | null;
54274
+ last_enqueued_at: string | null;
54275
+ last_published_at: string | null;
54276
+ last_sync_error: string | null;
54277
+ manual_quantity: number | null;
54278
+ maximum_quantity: number | null;
54279
+ product_id: string;
54280
+ quantity_control: string;
54281
+ remote_available: boolean | null;
54282
+ remote_checked_at: string | null;
54283
+ remote_quantity: number | null;
54284
+ stock_mode: string;
54285
+ sync_status: string;
54286
+ updated_at: string;
54287
+ updated_by: string | null;
54288
+ user_id: string;
54289
+ };
54290
+ Insert: {
54291
+ buffer_quantity?: number;
54292
+ connection_id: string;
54293
+ created_at?: string;
54294
+ desired_availability?: boolean;
54295
+ desired_quantity?: number;
54296
+ fixed_quantity?: number | null;
54297
+ floriday_trade_item_id?: string | null;
54298
+ id?: string;
54299
+ last_confirmed_at?: string | null;
54300
+ last_enqueued_at?: string | null;
54301
+ last_published_at?: string | null;
54302
+ last_sync_error?: string | null;
54303
+ manual_quantity?: number | null;
54304
+ maximum_quantity?: number | null;
54305
+ product_id: string;
54306
+ quantity_control?: string;
54307
+ remote_available?: boolean | null;
54308
+ remote_checked_at?: string | null;
54309
+ remote_quantity?: number | null;
54310
+ stock_mode?: string;
54311
+ sync_status?: string;
54312
+ updated_at?: string;
54313
+ updated_by?: string | null;
54314
+ user_id: string;
54315
+ };
54316
+ Update: {
54317
+ buffer_quantity?: number;
54318
+ connection_id?: string;
54319
+ created_at?: string;
54320
+ desired_availability?: boolean;
54321
+ desired_quantity?: number;
54322
+ fixed_quantity?: number | null;
54323
+ floriday_trade_item_id?: string | null;
54324
+ id?: string;
54325
+ last_confirmed_at?: string | null;
54326
+ last_enqueued_at?: string | null;
54327
+ last_published_at?: string | null;
54328
+ last_sync_error?: string | null;
54329
+ manual_quantity?: number | null;
54330
+ maximum_quantity?: number | null;
54331
+ product_id?: string;
54332
+ quantity_control?: string;
54333
+ remote_available?: boolean | null;
54334
+ remote_checked_at?: string | null;
54335
+ remote_quantity?: number | null;
54336
+ stock_mode?: string;
54337
+ sync_status?: string;
54338
+ updated_at?: string;
54339
+ updated_by?: string | null;
54340
+ user_id?: string;
54341
+ };
54342
+ Relationships: [];
54343
+ };
53744
54344
  floriday_invoices_cache: {
53745
54345
  Row: {
53746
54346
  buyer_organization_id: string | null;
@@ -54029,6 +54629,39 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
54029
54629
  };
54030
54630
  Relationships: [];
54031
54631
  };
54632
+ floriday_sales_order_ingest: {
54633
+ Row: {
54634
+ connection_id: string;
54635
+ created_at: string;
54636
+ id: string;
54637
+ impact: import("../integrations/supabase/types").Json;
54638
+ order_status: string | null;
54639
+ order_version: number;
54640
+ processed_at: string;
54641
+ sales_order_id: string;
54642
+ };
54643
+ Insert: {
54644
+ connection_id: string;
54645
+ created_at?: string;
54646
+ id?: string;
54647
+ impact?: import("../integrations/supabase/types").Json;
54648
+ order_status?: string | null;
54649
+ order_version?: number;
54650
+ processed_at?: string;
54651
+ sales_order_id: string;
54652
+ };
54653
+ Update: {
54654
+ connection_id?: string;
54655
+ created_at?: string;
54656
+ id?: string;
54657
+ impact?: import("../integrations/supabase/types").Json;
54658
+ order_status?: string | null;
54659
+ order_version?: number;
54660
+ processed_at?: string;
54661
+ sales_order_id?: string;
54662
+ };
54663
+ Relationships: [];
54664
+ };
54032
54665
  floriday_sales_strategies_cache: {
54033
54666
  Row: {
54034
54667
  connection_id: string;
@@ -54128,6 +54761,39 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
54128
54761
  };
54129
54762
  Relationships: [];
54130
54763
  };
54764
+ floriday_sync_cursors: {
54765
+ Row: {
54766
+ connection_id: string;
54767
+ created_at: string;
54768
+ id: string;
54769
+ last_error: string | null;
54770
+ last_sync_at: string | null;
54771
+ resource_type: string;
54772
+ sequence_number: number;
54773
+ updated_at: string;
54774
+ };
54775
+ Insert: {
54776
+ connection_id: string;
54777
+ created_at?: string;
54778
+ id?: string;
54779
+ last_error?: string | null;
54780
+ last_sync_at?: string | null;
54781
+ resource_type: string;
54782
+ sequence_number?: number;
54783
+ updated_at?: string;
54784
+ };
54785
+ Update: {
54786
+ connection_id?: string;
54787
+ created_at?: string;
54788
+ id?: string;
54789
+ last_error?: string | null;
54790
+ last_sync_at?: string | null;
54791
+ resource_type?: string;
54792
+ sequence_number?: number;
54793
+ updated_at?: string;
54794
+ };
54795
+ Relationships: [];
54796
+ };
54131
54797
  floriday_sync_state: {
54132
54798
  Row: {
54133
54799
  connection_id: string;
@@ -54818,6 +55484,42 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
54818
55484
  };
54819
55485
  Relationships: [];
54820
55486
  };
55487
+ inventory_stock_snapshots: {
55488
+ Row: {
55489
+ connection_id: string;
55490
+ created_at: string;
55491
+ erp_available_quantity: number;
55492
+ floriday_desired_quantity: number;
55493
+ floriday_remote_quantity: number | null;
55494
+ granularity: string;
55495
+ id: string;
55496
+ snapshot_at: string;
55497
+ user_id: string | null;
55498
+ };
55499
+ Insert: {
55500
+ connection_id: string;
55501
+ created_at?: string;
55502
+ erp_available_quantity?: number;
55503
+ floriday_desired_quantity?: number;
55504
+ floriday_remote_quantity?: number | null;
55505
+ granularity?: string;
55506
+ id?: string;
55507
+ snapshot_at?: string;
55508
+ user_id?: string | null;
55509
+ };
55510
+ Update: {
55511
+ connection_id?: string;
55512
+ created_at?: string;
55513
+ erp_available_quantity?: number;
55514
+ floriday_desired_quantity?: number;
55515
+ floriday_remote_quantity?: number | null;
55516
+ granularity?: string;
55517
+ id?: string;
55518
+ snapshot_at?: string;
55519
+ user_id?: string | null;
55520
+ };
55521
+ Relationships: [];
55522
+ };
54821
55523
  invoice_items: {
54822
55524
  Row: {
54823
55525
  created_at: string;
@@ -64012,6 +64714,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
64012
64714
  };
64013
64715
  trade_item_stock: {
64014
64716
  Row: {
64717
+ change_source: string;
64015
64718
  connection_id: string;
64016
64719
  created_at: string;
64017
64720
  id: string;
@@ -64025,6 +64728,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
64025
64728
  user_id: string;
64026
64729
  };
64027
64730
  Insert: {
64731
+ change_source?: string;
64028
64732
  connection_id: string;
64029
64733
  created_at?: string;
64030
64734
  id?: string;
@@ -64038,6 +64742,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
64038
64742
  user_id: string;
64039
64743
  };
64040
64744
  Update: {
64745
+ change_source?: string;
64041
64746
  connection_id?: string;
64042
64747
  created_at?: string;
64043
64748
  id?: string;
@@ -67638,6 +68343,18 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
67638
68343
  Args: never;
67639
68344
  Returns: number;
67640
68345
  };
68346
+ calculate_floriday_desired_stock: {
68347
+ Args: {
68348
+ p_connection_id: string;
68349
+ p_product_id: string;
68350
+ };
68351
+ Returns: {
68352
+ desired_availability: boolean;
68353
+ desired_quantity: number;
68354
+ erp_available: number;
68355
+ stock_mode: string;
68356
+ }[];
68357
+ };
67641
68358
  calculate_layer_stock: {
67642
68359
  Args: {
67643
68360
  p_product_id: string;
@@ -67732,6 +68449,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
67732
68449
  attempts: number;
67733
68450
  connection_id: string;
67734
68451
  created_at: string;
68452
+ dead_lettered_at: string | null;
67735
68453
  desired_available: boolean | null;
67736
68454
  gateway_attempt_id: string | null;
67737
68455
  id: string;
@@ -67740,9 +68458,13 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
67740
68458
  locked_by: string | null;
67741
68459
  next_attempt_at: string;
67742
68460
  number_of_pieces: number;
68461
+ product_id: string | null;
67743
68462
  sent_at: string | null;
67744
68463
  status: string;
68464
+ stock_mode: string | null;
67745
68465
  superseded_by: string | null;
68466
+ target_week: number | null;
68467
+ target_year: number | null;
67746
68468
  trade_item_id: string;
67747
68469
  updated_at: string;
67748
68470
  user_id: string;
@@ -68223,6 +68945,24 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
68223
68945
  };
68224
68946
  Returns: string;
68225
68947
  };
68948
+ floriday_capture_stock_snapshot: {
68949
+ Args: never;
68950
+ Returns: number;
68951
+ };
68952
+ floriday_cleanup_stock_queue_v2: {
68953
+ Args: never;
68954
+ Returns: undefined;
68955
+ };
68956
+ floriday_compact_stock_snapshots: {
68957
+ Args: never;
68958
+ Returns: undefined;
68959
+ };
68960
+ floriday_default_owner: {
68961
+ Args: {
68962
+ p_connection_id: string;
68963
+ };
68964
+ Returns: string;
68965
+ };
68226
68966
  floriday_effective_price: {
68227
68967
  Args: {
68228
68968
  _buyer_id: string;
@@ -68240,6 +68980,22 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
68240
68980
  source_id: string;
68241
68981
  }[];
68242
68982
  };
68983
+ floriday_fill_publish_horizon: {
68984
+ Args: never;
68985
+ Returns: number;
68986
+ };
68987
+ floriday_publish_horizon_weeks: {
68988
+ Args: never;
68989
+ Returns: number;
68990
+ };
68991
+ floriday_recompute_inventory: {
68992
+ Args: {
68993
+ p_connection_id: string;
68994
+ p_force?: boolean;
68995
+ p_product_id: string;
68996
+ };
68997
+ Returns: undefined;
68998
+ };
68243
68999
  format_cart_number: {
68244
69000
  Args: {
68245
69001
  p_pick_date: string;
@@ -76879,6 +77635,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
76879
77635
  attempts: number;
76880
77636
  connection_id: string;
76881
77637
  created_at: string;
77638
+ dead_lettered_at: string | null;
76882
77639
  desired_available: boolean | null;
76883
77640
  gateway_attempt_id: string | null;
76884
77641
  id: string;
@@ -76887,9 +77644,13 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
76887
77644
  locked_by: string | null;
76888
77645
  next_attempt_at: string;
76889
77646
  number_of_pieces: number;
77647
+ product_id: string | null;
76890
77648
  sent_at: string | null;
76891
77649
  status: string;
77650
+ stock_mode: string | null;
76892
77651
  superseded_by: string | null;
77652
+ target_week: number | null;
77653
+ target_year: number | null;
76893
77654
  trade_item_id: string;
76894
77655
  updated_at: string;
76895
77656
  user_id: string;
@@ -76898,6 +77659,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
76898
77659
  attempts?: number;
76899
77660
  connection_id: string;
76900
77661
  created_at?: string;
77662
+ dead_lettered_at?: string | null;
76901
77663
  desired_available?: boolean | null;
76902
77664
  gateway_attempt_id?: string | null;
76903
77665
  id?: string;
@@ -76906,9 +77668,13 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
76906
77668
  locked_by?: string | null;
76907
77669
  next_attempt_at?: string;
76908
77670
  number_of_pieces?: number;
77671
+ product_id?: string | null;
76909
77672
  sent_at?: string | null;
76910
77673
  status?: string;
77674
+ stock_mode?: string | null;
76911
77675
  superseded_by?: string | null;
77676
+ target_week?: number | null;
77677
+ target_year?: number | null;
76912
77678
  trade_item_id: string;
76913
77679
  updated_at?: string;
76914
77680
  user_id: string;
@@ -76917,6 +77683,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
76917
77683
  attempts?: number;
76918
77684
  connection_id?: string;
76919
77685
  created_at?: string;
77686
+ dead_lettered_at?: string | null;
76920
77687
  desired_available?: boolean | null;
76921
77688
  gateway_attempt_id?: string | null;
76922
77689
  id?: string;
@@ -76925,9 +77692,13 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
76925
77692
  locked_by?: string | null;
76926
77693
  next_attempt_at?: string;
76927
77694
  number_of_pieces?: number;
77695
+ product_id?: string | null;
76928
77696
  sent_at?: string | null;
76929
77697
  status?: string;
77698
+ stock_mode?: string | null;
76930
77699
  superseded_by?: string | null;
77700
+ target_week?: number | null;
77701
+ target_year?: number | null;
76931
77702
  trade_item_id?: string;
76932
77703
  updated_at?: string;
76933
77704
  user_id?: string;
@@ -77336,6 +78107,87 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
77336
78107
  referencedColumns: ["id"];
77337
78108
  }];
77338
78109
  };
78110
+ floriday_inventory_settings: {
78111
+ Row: {
78112
+ buffer_quantity: number;
78113
+ connection_id: string;
78114
+ created_at: string;
78115
+ desired_availability: boolean;
78116
+ desired_quantity: number;
78117
+ fixed_quantity: number | null;
78118
+ floriday_trade_item_id: string | null;
78119
+ id: string;
78120
+ last_confirmed_at: string | null;
78121
+ last_enqueued_at: string | null;
78122
+ last_published_at: string | null;
78123
+ last_sync_error: string | null;
78124
+ manual_quantity: number | null;
78125
+ maximum_quantity: number | null;
78126
+ product_id: string;
78127
+ quantity_control: string;
78128
+ remote_available: boolean | null;
78129
+ remote_checked_at: string | null;
78130
+ remote_quantity: number | null;
78131
+ stock_mode: string;
78132
+ sync_status: string;
78133
+ updated_at: string;
78134
+ updated_by: string | null;
78135
+ user_id: string;
78136
+ };
78137
+ Insert: {
78138
+ buffer_quantity?: number;
78139
+ connection_id: string;
78140
+ created_at?: string;
78141
+ desired_availability?: boolean;
78142
+ desired_quantity?: number;
78143
+ fixed_quantity?: number | null;
78144
+ floriday_trade_item_id?: string | null;
78145
+ id?: string;
78146
+ last_confirmed_at?: string | null;
78147
+ last_enqueued_at?: string | null;
78148
+ last_published_at?: string | null;
78149
+ last_sync_error?: string | null;
78150
+ manual_quantity?: number | null;
78151
+ maximum_quantity?: number | null;
78152
+ product_id: string;
78153
+ quantity_control?: string;
78154
+ remote_available?: boolean | null;
78155
+ remote_checked_at?: string | null;
78156
+ remote_quantity?: number | null;
78157
+ stock_mode?: string;
78158
+ sync_status?: string;
78159
+ updated_at?: string;
78160
+ updated_by?: string | null;
78161
+ user_id: string;
78162
+ };
78163
+ Update: {
78164
+ buffer_quantity?: number;
78165
+ connection_id?: string;
78166
+ created_at?: string;
78167
+ desired_availability?: boolean;
78168
+ desired_quantity?: number;
78169
+ fixed_quantity?: number | null;
78170
+ floriday_trade_item_id?: string | null;
78171
+ id?: string;
78172
+ last_confirmed_at?: string | null;
78173
+ last_enqueued_at?: string | null;
78174
+ last_published_at?: string | null;
78175
+ last_sync_error?: string | null;
78176
+ manual_quantity?: number | null;
78177
+ maximum_quantity?: number | null;
78178
+ product_id?: string;
78179
+ quantity_control?: string;
78180
+ remote_available?: boolean | null;
78181
+ remote_checked_at?: string | null;
78182
+ remote_quantity?: number | null;
78183
+ stock_mode?: string;
78184
+ sync_status?: string;
78185
+ updated_at?: string;
78186
+ updated_by?: string | null;
78187
+ user_id?: string;
78188
+ };
78189
+ Relationships: [];
78190
+ };
77339
78191
  floriday_invoices_cache: {
77340
78192
  Row: {
77341
78193
  buyer_organization_id: string | null;
@@ -77624,6 +78476,39 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
77624
78476
  };
77625
78477
  Relationships: [];
77626
78478
  };
78479
+ floriday_sales_order_ingest: {
78480
+ Row: {
78481
+ connection_id: string;
78482
+ created_at: string;
78483
+ id: string;
78484
+ impact: import("../integrations/supabase/types").Json;
78485
+ order_status: string | null;
78486
+ order_version: number;
78487
+ processed_at: string;
78488
+ sales_order_id: string;
78489
+ };
78490
+ Insert: {
78491
+ connection_id: string;
78492
+ created_at?: string;
78493
+ id?: string;
78494
+ impact?: import("../integrations/supabase/types").Json;
78495
+ order_status?: string | null;
78496
+ order_version?: number;
78497
+ processed_at?: string;
78498
+ sales_order_id: string;
78499
+ };
78500
+ Update: {
78501
+ connection_id?: string;
78502
+ created_at?: string;
78503
+ id?: string;
78504
+ impact?: import("../integrations/supabase/types").Json;
78505
+ order_status?: string | null;
78506
+ order_version?: number;
78507
+ processed_at?: string;
78508
+ sales_order_id?: string;
78509
+ };
78510
+ Relationships: [];
78511
+ };
77627
78512
  floriday_sales_strategies_cache: {
77628
78513
  Row: {
77629
78514
  connection_id: string;
@@ -77723,6 +78608,39 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
77723
78608
  };
77724
78609
  Relationships: [];
77725
78610
  };
78611
+ floriday_sync_cursors: {
78612
+ Row: {
78613
+ connection_id: string;
78614
+ created_at: string;
78615
+ id: string;
78616
+ last_error: string | null;
78617
+ last_sync_at: string | null;
78618
+ resource_type: string;
78619
+ sequence_number: number;
78620
+ updated_at: string;
78621
+ };
78622
+ Insert: {
78623
+ connection_id: string;
78624
+ created_at?: string;
78625
+ id?: string;
78626
+ last_error?: string | null;
78627
+ last_sync_at?: string | null;
78628
+ resource_type: string;
78629
+ sequence_number?: number;
78630
+ updated_at?: string;
78631
+ };
78632
+ Update: {
78633
+ connection_id?: string;
78634
+ created_at?: string;
78635
+ id?: string;
78636
+ last_error?: string | null;
78637
+ last_sync_at?: string | null;
78638
+ resource_type?: string;
78639
+ sequence_number?: number;
78640
+ updated_at?: string;
78641
+ };
78642
+ Relationships: [];
78643
+ };
77726
78644
  floriday_sync_state: {
77727
78645
  Row: {
77728
78646
  connection_id: string;
@@ -78413,6 +79331,42 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
78413
79331
  };
78414
79332
  Relationships: [];
78415
79333
  };
79334
+ inventory_stock_snapshots: {
79335
+ Row: {
79336
+ connection_id: string;
79337
+ created_at: string;
79338
+ erp_available_quantity: number;
79339
+ floriday_desired_quantity: number;
79340
+ floriday_remote_quantity: number | null;
79341
+ granularity: string;
79342
+ id: string;
79343
+ snapshot_at: string;
79344
+ user_id: string | null;
79345
+ };
79346
+ Insert: {
79347
+ connection_id: string;
79348
+ created_at?: string;
79349
+ erp_available_quantity?: number;
79350
+ floriday_desired_quantity?: number;
79351
+ floriday_remote_quantity?: number | null;
79352
+ granularity?: string;
79353
+ id?: string;
79354
+ snapshot_at?: string;
79355
+ user_id?: string | null;
79356
+ };
79357
+ Update: {
79358
+ connection_id?: string;
79359
+ created_at?: string;
79360
+ erp_available_quantity?: number;
79361
+ floriday_desired_quantity?: number;
79362
+ floriday_remote_quantity?: number | null;
79363
+ granularity?: string;
79364
+ id?: string;
79365
+ snapshot_at?: string;
79366
+ user_id?: string | null;
79367
+ };
79368
+ Relationships: [];
79369
+ };
78416
79370
  invoice_items: {
78417
79371
  Row: {
78418
79372
  created_at: string;
@@ -87607,6 +88561,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
87607
88561
  };
87608
88562
  trade_item_stock: {
87609
88563
  Row: {
88564
+ change_source: string;
87610
88565
  connection_id: string;
87611
88566
  created_at: string;
87612
88567
  id: string;
@@ -87620,6 +88575,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
87620
88575
  user_id: string;
87621
88576
  };
87622
88577
  Insert: {
88578
+ change_source?: string;
87623
88579
  connection_id: string;
87624
88580
  created_at?: string;
87625
88581
  id?: string;
@@ -87633,6 +88589,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
87633
88589
  user_id: string;
87634
88590
  };
87635
88591
  Update: {
88592
+ change_source?: string;
87636
88593
  connection_id?: string;
87637
88594
  created_at?: string;
87638
88595
  id?: string;
@@ -91233,6 +92190,18 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
91233
92190
  Args: never;
91234
92191
  Returns: number;
91235
92192
  };
92193
+ calculate_floriday_desired_stock: {
92194
+ Args: {
92195
+ p_connection_id: string;
92196
+ p_product_id: string;
92197
+ };
92198
+ Returns: {
92199
+ desired_availability: boolean;
92200
+ desired_quantity: number;
92201
+ erp_available: number;
92202
+ stock_mode: string;
92203
+ }[];
92204
+ };
91236
92205
  calculate_layer_stock: {
91237
92206
  Args: {
91238
92207
  p_product_id: string;
@@ -91327,6 +92296,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
91327
92296
  attempts: number;
91328
92297
  connection_id: string;
91329
92298
  created_at: string;
92299
+ dead_lettered_at: string | null;
91330
92300
  desired_available: boolean | null;
91331
92301
  gateway_attempt_id: string | null;
91332
92302
  id: string;
@@ -91335,9 +92305,13 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
91335
92305
  locked_by: string | null;
91336
92306
  next_attempt_at: string;
91337
92307
  number_of_pieces: number;
92308
+ product_id: string | null;
91338
92309
  sent_at: string | null;
91339
92310
  status: string;
92311
+ stock_mode: string | null;
91340
92312
  superseded_by: string | null;
92313
+ target_week: number | null;
92314
+ target_year: number | null;
91341
92315
  trade_item_id: string;
91342
92316
  updated_at: string;
91343
92317
  user_id: string;
@@ -91818,6 +92792,24 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
91818
92792
  };
91819
92793
  Returns: string;
91820
92794
  };
92795
+ floriday_capture_stock_snapshot: {
92796
+ Args: never;
92797
+ Returns: number;
92798
+ };
92799
+ floriday_cleanup_stock_queue_v2: {
92800
+ Args: never;
92801
+ Returns: undefined;
92802
+ };
92803
+ floriday_compact_stock_snapshots: {
92804
+ Args: never;
92805
+ Returns: undefined;
92806
+ };
92807
+ floriday_default_owner: {
92808
+ Args: {
92809
+ p_connection_id: string;
92810
+ };
92811
+ Returns: string;
92812
+ };
91821
92813
  floriday_effective_price: {
91822
92814
  Args: {
91823
92815
  _buyer_id: string;
@@ -91835,6 +92827,22 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
91835
92827
  source_id: string;
91836
92828
  }[];
91837
92829
  };
92830
+ floriday_fill_publish_horizon: {
92831
+ Args: never;
92832
+ Returns: number;
92833
+ };
92834
+ floriday_publish_horizon_weeks: {
92835
+ Args: never;
92836
+ Returns: number;
92837
+ };
92838
+ floriday_recompute_inventory: {
92839
+ Args: {
92840
+ p_connection_id: string;
92841
+ p_force?: boolean;
92842
+ p_product_id: string;
92843
+ };
92844
+ Returns: undefined;
92845
+ };
91838
92846
  format_cart_number: {
91839
92847
  Args: {
91840
92848
  p_pick_date: string;
@@ -100471,6 +101479,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
100471
101479
  attempts: number;
100472
101480
  connection_id: string;
100473
101481
  created_at: string;
101482
+ dead_lettered_at: string | null;
100474
101483
  desired_available: boolean | null;
100475
101484
  gateway_attempt_id: string | null;
100476
101485
  id: string;
@@ -100479,9 +101488,13 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
100479
101488
  locked_by: string | null;
100480
101489
  next_attempt_at: string;
100481
101490
  number_of_pieces: number;
101491
+ product_id: string | null;
100482
101492
  sent_at: string | null;
100483
101493
  status: string;
101494
+ stock_mode: string | null;
100484
101495
  superseded_by: string | null;
101496
+ target_week: number | null;
101497
+ target_year: number | null;
100485
101498
  trade_item_id: string;
100486
101499
  updated_at: string;
100487
101500
  user_id: string;
@@ -100490,6 +101503,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
100490
101503
  attempts?: number;
100491
101504
  connection_id: string;
100492
101505
  created_at?: string;
101506
+ dead_lettered_at?: string | null;
100493
101507
  desired_available?: boolean | null;
100494
101508
  gateway_attempt_id?: string | null;
100495
101509
  id?: string;
@@ -100498,9 +101512,13 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
100498
101512
  locked_by?: string | null;
100499
101513
  next_attempt_at?: string;
100500
101514
  number_of_pieces?: number;
101515
+ product_id?: string | null;
100501
101516
  sent_at?: string | null;
100502
101517
  status?: string;
101518
+ stock_mode?: string | null;
100503
101519
  superseded_by?: string | null;
101520
+ target_week?: number | null;
101521
+ target_year?: number | null;
100504
101522
  trade_item_id: string;
100505
101523
  updated_at?: string;
100506
101524
  user_id: string;
@@ -100509,6 +101527,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
100509
101527
  attempts?: number;
100510
101528
  connection_id?: string;
100511
101529
  created_at?: string;
101530
+ dead_lettered_at?: string | null;
100512
101531
  desired_available?: boolean | null;
100513
101532
  gateway_attempt_id?: string | null;
100514
101533
  id?: string;
@@ -100517,9 +101536,13 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
100517
101536
  locked_by?: string | null;
100518
101537
  next_attempt_at?: string;
100519
101538
  number_of_pieces?: number;
101539
+ product_id?: string | null;
100520
101540
  sent_at?: string | null;
100521
101541
  status?: string;
101542
+ stock_mode?: string | null;
100522
101543
  superseded_by?: string | null;
101544
+ target_week?: number | null;
101545
+ target_year?: number | null;
100523
101546
  trade_item_id?: string;
100524
101547
  updated_at?: string;
100525
101548
  user_id?: string;
@@ -100928,6 +101951,87 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
100928
101951
  referencedColumns: ["id"];
100929
101952
  }];
100930
101953
  };
101954
+ floriday_inventory_settings: {
101955
+ Row: {
101956
+ buffer_quantity: number;
101957
+ connection_id: string;
101958
+ created_at: string;
101959
+ desired_availability: boolean;
101960
+ desired_quantity: number;
101961
+ fixed_quantity: number | null;
101962
+ floriday_trade_item_id: string | null;
101963
+ id: string;
101964
+ last_confirmed_at: string | null;
101965
+ last_enqueued_at: string | null;
101966
+ last_published_at: string | null;
101967
+ last_sync_error: string | null;
101968
+ manual_quantity: number | null;
101969
+ maximum_quantity: number | null;
101970
+ product_id: string;
101971
+ quantity_control: string;
101972
+ remote_available: boolean | null;
101973
+ remote_checked_at: string | null;
101974
+ remote_quantity: number | null;
101975
+ stock_mode: string;
101976
+ sync_status: string;
101977
+ updated_at: string;
101978
+ updated_by: string | null;
101979
+ user_id: string;
101980
+ };
101981
+ Insert: {
101982
+ buffer_quantity?: number;
101983
+ connection_id: string;
101984
+ created_at?: string;
101985
+ desired_availability?: boolean;
101986
+ desired_quantity?: number;
101987
+ fixed_quantity?: number | null;
101988
+ floriday_trade_item_id?: string | null;
101989
+ id?: string;
101990
+ last_confirmed_at?: string | null;
101991
+ last_enqueued_at?: string | null;
101992
+ last_published_at?: string | null;
101993
+ last_sync_error?: string | null;
101994
+ manual_quantity?: number | null;
101995
+ maximum_quantity?: number | null;
101996
+ product_id: string;
101997
+ quantity_control?: string;
101998
+ remote_available?: boolean | null;
101999
+ remote_checked_at?: string | null;
102000
+ remote_quantity?: number | null;
102001
+ stock_mode?: string;
102002
+ sync_status?: string;
102003
+ updated_at?: string;
102004
+ updated_by?: string | null;
102005
+ user_id: string;
102006
+ };
102007
+ Update: {
102008
+ buffer_quantity?: number;
102009
+ connection_id?: string;
102010
+ created_at?: string;
102011
+ desired_availability?: boolean;
102012
+ desired_quantity?: number;
102013
+ fixed_quantity?: number | null;
102014
+ floriday_trade_item_id?: string | null;
102015
+ id?: string;
102016
+ last_confirmed_at?: string | null;
102017
+ last_enqueued_at?: string | null;
102018
+ last_published_at?: string | null;
102019
+ last_sync_error?: string | null;
102020
+ manual_quantity?: number | null;
102021
+ maximum_quantity?: number | null;
102022
+ product_id?: string;
102023
+ quantity_control?: string;
102024
+ remote_available?: boolean | null;
102025
+ remote_checked_at?: string | null;
102026
+ remote_quantity?: number | null;
102027
+ stock_mode?: string;
102028
+ sync_status?: string;
102029
+ updated_at?: string;
102030
+ updated_by?: string | null;
102031
+ user_id?: string;
102032
+ };
102033
+ Relationships: [];
102034
+ };
100931
102035
  floriday_invoices_cache: {
100932
102036
  Row: {
100933
102037
  buyer_organization_id: string | null;
@@ -101216,6 +102320,39 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
101216
102320
  };
101217
102321
  Relationships: [];
101218
102322
  };
102323
+ floriday_sales_order_ingest: {
102324
+ Row: {
102325
+ connection_id: string;
102326
+ created_at: string;
102327
+ id: string;
102328
+ impact: import("../integrations/supabase/types").Json;
102329
+ order_status: string | null;
102330
+ order_version: number;
102331
+ processed_at: string;
102332
+ sales_order_id: string;
102333
+ };
102334
+ Insert: {
102335
+ connection_id: string;
102336
+ created_at?: string;
102337
+ id?: string;
102338
+ impact?: import("../integrations/supabase/types").Json;
102339
+ order_status?: string | null;
102340
+ order_version?: number;
102341
+ processed_at?: string;
102342
+ sales_order_id: string;
102343
+ };
102344
+ Update: {
102345
+ connection_id?: string;
102346
+ created_at?: string;
102347
+ id?: string;
102348
+ impact?: import("../integrations/supabase/types").Json;
102349
+ order_status?: string | null;
102350
+ order_version?: number;
102351
+ processed_at?: string;
102352
+ sales_order_id?: string;
102353
+ };
102354
+ Relationships: [];
102355
+ };
101219
102356
  floriday_sales_strategies_cache: {
101220
102357
  Row: {
101221
102358
  connection_id: string;
@@ -101315,6 +102452,39 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
101315
102452
  };
101316
102453
  Relationships: [];
101317
102454
  };
102455
+ floriday_sync_cursors: {
102456
+ Row: {
102457
+ connection_id: string;
102458
+ created_at: string;
102459
+ id: string;
102460
+ last_error: string | null;
102461
+ last_sync_at: string | null;
102462
+ resource_type: string;
102463
+ sequence_number: number;
102464
+ updated_at: string;
102465
+ };
102466
+ Insert: {
102467
+ connection_id: string;
102468
+ created_at?: string;
102469
+ id?: string;
102470
+ last_error?: string | null;
102471
+ last_sync_at?: string | null;
102472
+ resource_type: string;
102473
+ sequence_number?: number;
102474
+ updated_at?: string;
102475
+ };
102476
+ Update: {
102477
+ connection_id?: string;
102478
+ created_at?: string;
102479
+ id?: string;
102480
+ last_error?: string | null;
102481
+ last_sync_at?: string | null;
102482
+ resource_type?: string;
102483
+ sequence_number?: number;
102484
+ updated_at?: string;
102485
+ };
102486
+ Relationships: [];
102487
+ };
101318
102488
  floriday_sync_state: {
101319
102489
  Row: {
101320
102490
  connection_id: string;
@@ -102005,6 +103175,42 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
102005
103175
  };
102006
103176
  Relationships: [];
102007
103177
  };
103178
+ inventory_stock_snapshots: {
103179
+ Row: {
103180
+ connection_id: string;
103181
+ created_at: string;
103182
+ erp_available_quantity: number;
103183
+ floriday_desired_quantity: number;
103184
+ floriday_remote_quantity: number | null;
103185
+ granularity: string;
103186
+ id: string;
103187
+ snapshot_at: string;
103188
+ user_id: string | null;
103189
+ };
103190
+ Insert: {
103191
+ connection_id: string;
103192
+ created_at?: string;
103193
+ erp_available_quantity?: number;
103194
+ floriday_desired_quantity?: number;
103195
+ floriday_remote_quantity?: number | null;
103196
+ granularity?: string;
103197
+ id?: string;
103198
+ snapshot_at?: string;
103199
+ user_id?: string | null;
103200
+ };
103201
+ Update: {
103202
+ connection_id?: string;
103203
+ created_at?: string;
103204
+ erp_available_quantity?: number;
103205
+ floriday_desired_quantity?: number;
103206
+ floriday_remote_quantity?: number | null;
103207
+ granularity?: string;
103208
+ id?: string;
103209
+ snapshot_at?: string;
103210
+ user_id?: string | null;
103211
+ };
103212
+ Relationships: [];
103213
+ };
102008
103214
  invoice_items: {
102009
103215
  Row: {
102010
103216
  created_at: string;
@@ -111199,6 +112405,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
111199
112405
  };
111200
112406
  trade_item_stock: {
111201
112407
  Row: {
112408
+ change_source: string;
111202
112409
  connection_id: string;
111203
112410
  created_at: string;
111204
112411
  id: string;
@@ -111212,6 +112419,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
111212
112419
  user_id: string;
111213
112420
  };
111214
112421
  Insert: {
112422
+ change_source?: string;
111215
112423
  connection_id: string;
111216
112424
  created_at?: string;
111217
112425
  id?: string;
@@ -111225,6 +112433,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
111225
112433
  user_id: string;
111226
112434
  };
111227
112435
  Update: {
112436
+ change_source?: string;
111228
112437
  connection_id?: string;
111229
112438
  created_at?: string;
111230
112439
  id?: string;
@@ -114825,6 +116034,18 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
114825
116034
  Args: never;
114826
116035
  Returns: number;
114827
116036
  };
116037
+ calculate_floriday_desired_stock: {
116038
+ Args: {
116039
+ p_connection_id: string;
116040
+ p_product_id: string;
116041
+ };
116042
+ Returns: {
116043
+ desired_availability: boolean;
116044
+ desired_quantity: number;
116045
+ erp_available: number;
116046
+ stock_mode: string;
116047
+ }[];
116048
+ };
114828
116049
  calculate_layer_stock: {
114829
116050
  Args: {
114830
116051
  p_product_id: string;
@@ -114919,6 +116140,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
114919
116140
  attempts: number;
114920
116141
  connection_id: string;
114921
116142
  created_at: string;
116143
+ dead_lettered_at: string | null;
114922
116144
  desired_available: boolean | null;
114923
116145
  gateway_attempt_id: string | null;
114924
116146
  id: string;
@@ -114927,9 +116149,13 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
114927
116149
  locked_by: string | null;
114928
116150
  next_attempt_at: string;
114929
116151
  number_of_pieces: number;
116152
+ product_id: string | null;
114930
116153
  sent_at: string | null;
114931
116154
  status: string;
116155
+ stock_mode: string | null;
114932
116156
  superseded_by: string | null;
116157
+ target_week: number | null;
116158
+ target_year: number | null;
114933
116159
  trade_item_id: string;
114934
116160
  updated_at: string;
114935
116161
  user_id: string;
@@ -115410,6 +116636,24 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
115410
116636
  };
115411
116637
  Returns: string;
115412
116638
  };
116639
+ floriday_capture_stock_snapshot: {
116640
+ Args: never;
116641
+ Returns: number;
116642
+ };
116643
+ floriday_cleanup_stock_queue_v2: {
116644
+ Args: never;
116645
+ Returns: undefined;
116646
+ };
116647
+ floriday_compact_stock_snapshots: {
116648
+ Args: never;
116649
+ Returns: undefined;
116650
+ };
116651
+ floriday_default_owner: {
116652
+ Args: {
116653
+ p_connection_id: string;
116654
+ };
116655
+ Returns: string;
116656
+ };
115413
116657
  floriday_effective_price: {
115414
116658
  Args: {
115415
116659
  _buyer_id: string;
@@ -115427,6 +116671,22 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
115427
116671
  source_id: string;
115428
116672
  }[];
115429
116673
  };
116674
+ floriday_fill_publish_horizon: {
116675
+ Args: never;
116676
+ Returns: number;
116677
+ };
116678
+ floriday_publish_horizon_weeks: {
116679
+ Args: never;
116680
+ Returns: number;
116681
+ };
116682
+ floriday_recompute_inventory: {
116683
+ Args: {
116684
+ p_connection_id: string;
116685
+ p_force?: boolean;
116686
+ p_product_id: string;
116687
+ };
116688
+ Returns: undefined;
116689
+ };
115430
116690
  format_cart_number: {
115431
116691
  Args: {
115432
116692
  p_pick_date: string;