@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 getInvoiceTimingSettings: import("@tanstack/start-client-co
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 getInvoiceTimingSettings: import("@tanstack/start-client-co
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 getInvoiceTimingSettings: import("@tanstack/start-client-co
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 getInvoiceTimingSettings: import("@tanstack/start-client-co
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 getInvoiceTimingSettings: import("@tanstack/start-client-co
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 getInvoiceTimingSettings: import("@tanstack/start-client-co
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 getInvoiceTimingSettings: import("@tanstack/start-client-co
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 getInvoiceTimingSettings: import("@tanstack/start-client-co
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 getInvoiceTimingSettings: import("@tanstack/start-client-co
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 getInvoiceTimingSettings: import("@tanstack/start-client-co
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 getInvoiceTimingSettings: import("@tanstack/start-client-co
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 getInvoiceTimingSettings: import("@tanstack/start-client-co
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 getInvoiceTimingSettings: import("@tanstack/start-client-co
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 getInvoiceTimingSettings: import("@tanstack/start-client-co
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 getInvoiceTimingSettings: import("@tanstack/start-client-co
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 getInvoiceTimingSettings: import("@tanstack/start-client-co
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 getInvoiceTimingSettings: import("@tanstack/start-client-co
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 getInvoiceTimingSettings: import("@tanstack/start-client-co
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;
@@ -29685,6 +29937,7 @@ export declare const saveInvoiceTimingSettings: import("@tanstack/start-client-c
29685
29937
  attempts: number;
29686
29938
  connection_id: string;
29687
29939
  created_at: string;
29940
+ dead_lettered_at: string | null;
29688
29941
  desired_available: boolean | null;
29689
29942
  gateway_attempt_id: string | null;
29690
29943
  id: string;
@@ -29693,9 +29946,13 @@ export declare const saveInvoiceTimingSettings: import("@tanstack/start-client-c
29693
29946
  locked_by: string | null;
29694
29947
  next_attempt_at: string;
29695
29948
  number_of_pieces: number;
29949
+ product_id: string | null;
29696
29950
  sent_at: string | null;
29697
29951
  status: string;
29952
+ stock_mode: string | null;
29698
29953
  superseded_by: string | null;
29954
+ target_week: number | null;
29955
+ target_year: number | null;
29699
29956
  trade_item_id: string;
29700
29957
  updated_at: string;
29701
29958
  user_id: string;
@@ -29704,6 +29961,7 @@ export declare const saveInvoiceTimingSettings: import("@tanstack/start-client-c
29704
29961
  attempts?: number;
29705
29962
  connection_id: string;
29706
29963
  created_at?: string;
29964
+ dead_lettered_at?: string | null;
29707
29965
  desired_available?: boolean | null;
29708
29966
  gateway_attempt_id?: string | null;
29709
29967
  id?: string;
@@ -29712,9 +29970,13 @@ export declare const saveInvoiceTimingSettings: import("@tanstack/start-client-c
29712
29970
  locked_by?: string | null;
29713
29971
  next_attempt_at?: string;
29714
29972
  number_of_pieces?: number;
29973
+ product_id?: string | null;
29715
29974
  sent_at?: string | null;
29716
29975
  status?: string;
29976
+ stock_mode?: string | null;
29717
29977
  superseded_by?: string | null;
29978
+ target_week?: number | null;
29979
+ target_year?: number | null;
29718
29980
  trade_item_id: string;
29719
29981
  updated_at?: string;
29720
29982
  user_id: string;
@@ -29723,6 +29985,7 @@ export declare const saveInvoiceTimingSettings: import("@tanstack/start-client-c
29723
29985
  attempts?: number;
29724
29986
  connection_id?: string;
29725
29987
  created_at?: string;
29988
+ dead_lettered_at?: string | null;
29726
29989
  desired_available?: boolean | null;
29727
29990
  gateway_attempt_id?: string | null;
29728
29991
  id?: string;
@@ -29731,9 +29994,13 @@ export declare const saveInvoiceTimingSettings: import("@tanstack/start-client-c
29731
29994
  locked_by?: string | null;
29732
29995
  next_attempt_at?: string;
29733
29996
  number_of_pieces?: number;
29997
+ product_id?: string | null;
29734
29998
  sent_at?: string | null;
29735
29999
  status?: string;
30000
+ stock_mode?: string | null;
29736
30001
  superseded_by?: string | null;
30002
+ target_week?: number | null;
30003
+ target_year?: number | null;
29737
30004
  trade_item_id?: string;
29738
30005
  updated_at?: string;
29739
30006
  user_id?: string;
@@ -30142,6 +30409,87 @@ export declare const saveInvoiceTimingSettings: import("@tanstack/start-client-c
30142
30409
  referencedColumns: ["id"];
30143
30410
  }];
30144
30411
  };
30412
+ floriday_inventory_settings: {
30413
+ Row: {
30414
+ buffer_quantity: number;
30415
+ connection_id: string;
30416
+ created_at: string;
30417
+ desired_availability: boolean;
30418
+ desired_quantity: number;
30419
+ fixed_quantity: number | null;
30420
+ floriday_trade_item_id: string | null;
30421
+ id: string;
30422
+ last_confirmed_at: string | null;
30423
+ last_enqueued_at: string | null;
30424
+ last_published_at: string | null;
30425
+ last_sync_error: string | null;
30426
+ manual_quantity: number | null;
30427
+ maximum_quantity: number | null;
30428
+ product_id: string;
30429
+ quantity_control: string;
30430
+ remote_available: boolean | null;
30431
+ remote_checked_at: string | null;
30432
+ remote_quantity: number | null;
30433
+ stock_mode: string;
30434
+ sync_status: string;
30435
+ updated_at: string;
30436
+ updated_by: string | null;
30437
+ user_id: string;
30438
+ };
30439
+ Insert: {
30440
+ buffer_quantity?: number;
30441
+ connection_id: string;
30442
+ created_at?: string;
30443
+ desired_availability?: boolean;
30444
+ desired_quantity?: number;
30445
+ fixed_quantity?: number | null;
30446
+ floriday_trade_item_id?: string | null;
30447
+ id?: string;
30448
+ last_confirmed_at?: string | null;
30449
+ last_enqueued_at?: string | null;
30450
+ last_published_at?: string | null;
30451
+ last_sync_error?: string | null;
30452
+ manual_quantity?: number | null;
30453
+ maximum_quantity?: number | null;
30454
+ product_id: string;
30455
+ quantity_control?: string;
30456
+ remote_available?: boolean | null;
30457
+ remote_checked_at?: string | null;
30458
+ remote_quantity?: number | null;
30459
+ stock_mode?: string;
30460
+ sync_status?: string;
30461
+ updated_at?: string;
30462
+ updated_by?: string | null;
30463
+ user_id: string;
30464
+ };
30465
+ Update: {
30466
+ buffer_quantity?: number;
30467
+ connection_id?: string;
30468
+ created_at?: string;
30469
+ desired_availability?: boolean;
30470
+ desired_quantity?: number;
30471
+ fixed_quantity?: number | null;
30472
+ floriday_trade_item_id?: string | null;
30473
+ id?: string;
30474
+ last_confirmed_at?: string | null;
30475
+ last_enqueued_at?: string | null;
30476
+ last_published_at?: string | null;
30477
+ last_sync_error?: string | null;
30478
+ manual_quantity?: number | null;
30479
+ maximum_quantity?: number | null;
30480
+ product_id?: string;
30481
+ quantity_control?: string;
30482
+ remote_available?: boolean | null;
30483
+ remote_checked_at?: string | null;
30484
+ remote_quantity?: number | null;
30485
+ stock_mode?: string;
30486
+ sync_status?: string;
30487
+ updated_at?: string;
30488
+ updated_by?: string | null;
30489
+ user_id?: string;
30490
+ };
30491
+ Relationships: [];
30492
+ };
30145
30493
  floriday_invoices_cache: {
30146
30494
  Row: {
30147
30495
  buyer_organization_id: string | null;
@@ -30430,6 +30778,39 @@ export declare const saveInvoiceTimingSettings: import("@tanstack/start-client-c
30430
30778
  };
30431
30779
  Relationships: [];
30432
30780
  };
30781
+ floriday_sales_order_ingest: {
30782
+ Row: {
30783
+ connection_id: string;
30784
+ created_at: string;
30785
+ id: string;
30786
+ impact: import("../integrations/supabase/types").Json;
30787
+ order_status: string | null;
30788
+ order_version: number;
30789
+ processed_at: string;
30790
+ sales_order_id: string;
30791
+ };
30792
+ Insert: {
30793
+ connection_id: string;
30794
+ created_at?: string;
30795
+ id?: string;
30796
+ impact?: import("../integrations/supabase/types").Json;
30797
+ order_status?: string | null;
30798
+ order_version?: number;
30799
+ processed_at?: string;
30800
+ sales_order_id: string;
30801
+ };
30802
+ Update: {
30803
+ connection_id?: string;
30804
+ created_at?: string;
30805
+ id?: string;
30806
+ impact?: import("../integrations/supabase/types").Json;
30807
+ order_status?: string | null;
30808
+ order_version?: number;
30809
+ processed_at?: string;
30810
+ sales_order_id?: string;
30811
+ };
30812
+ Relationships: [];
30813
+ };
30433
30814
  floriday_sales_strategies_cache: {
30434
30815
  Row: {
30435
30816
  connection_id: string;
@@ -30529,6 +30910,39 @@ export declare const saveInvoiceTimingSettings: import("@tanstack/start-client-c
30529
30910
  };
30530
30911
  Relationships: [];
30531
30912
  };
30913
+ floriday_sync_cursors: {
30914
+ Row: {
30915
+ connection_id: string;
30916
+ created_at: string;
30917
+ id: string;
30918
+ last_error: string | null;
30919
+ last_sync_at: string | null;
30920
+ resource_type: string;
30921
+ sequence_number: number;
30922
+ updated_at: string;
30923
+ };
30924
+ Insert: {
30925
+ connection_id: string;
30926
+ created_at?: string;
30927
+ id?: string;
30928
+ last_error?: string | null;
30929
+ last_sync_at?: string | null;
30930
+ resource_type: string;
30931
+ sequence_number?: number;
30932
+ updated_at?: string;
30933
+ };
30934
+ Update: {
30935
+ connection_id?: string;
30936
+ created_at?: string;
30937
+ id?: string;
30938
+ last_error?: string | null;
30939
+ last_sync_at?: string | null;
30940
+ resource_type?: string;
30941
+ sequence_number?: number;
30942
+ updated_at?: string;
30943
+ };
30944
+ Relationships: [];
30945
+ };
30532
30946
  floriday_sync_state: {
30533
30947
  Row: {
30534
30948
  connection_id: string;
@@ -31219,6 +31633,42 @@ export declare const saveInvoiceTimingSettings: import("@tanstack/start-client-c
31219
31633
  };
31220
31634
  Relationships: [];
31221
31635
  };
31636
+ inventory_stock_snapshots: {
31637
+ Row: {
31638
+ connection_id: string;
31639
+ created_at: string;
31640
+ erp_available_quantity: number;
31641
+ floriday_desired_quantity: number;
31642
+ floriday_remote_quantity: number | null;
31643
+ granularity: string;
31644
+ id: string;
31645
+ snapshot_at: string;
31646
+ user_id: string | null;
31647
+ };
31648
+ Insert: {
31649
+ connection_id: string;
31650
+ created_at?: string;
31651
+ erp_available_quantity?: number;
31652
+ floriday_desired_quantity?: number;
31653
+ floriday_remote_quantity?: number | null;
31654
+ granularity?: string;
31655
+ id?: string;
31656
+ snapshot_at?: string;
31657
+ user_id?: string | null;
31658
+ };
31659
+ Update: {
31660
+ connection_id?: string;
31661
+ created_at?: string;
31662
+ erp_available_quantity?: number;
31663
+ floriday_desired_quantity?: number;
31664
+ floriday_remote_quantity?: number | null;
31665
+ granularity?: string;
31666
+ id?: string;
31667
+ snapshot_at?: string;
31668
+ user_id?: string | null;
31669
+ };
31670
+ Relationships: [];
31671
+ };
31222
31672
  invoice_items: {
31223
31673
  Row: {
31224
31674
  created_at: string;
@@ -40413,6 +40863,7 @@ export declare const saveInvoiceTimingSettings: import("@tanstack/start-client-c
40413
40863
  };
40414
40864
  trade_item_stock: {
40415
40865
  Row: {
40866
+ change_source: string;
40416
40867
  connection_id: string;
40417
40868
  created_at: string;
40418
40869
  id: string;
@@ -40426,6 +40877,7 @@ export declare const saveInvoiceTimingSettings: import("@tanstack/start-client-c
40426
40877
  user_id: string;
40427
40878
  };
40428
40879
  Insert: {
40880
+ change_source?: string;
40429
40881
  connection_id: string;
40430
40882
  created_at?: string;
40431
40883
  id?: string;
@@ -40439,6 +40891,7 @@ export declare const saveInvoiceTimingSettings: import("@tanstack/start-client-c
40439
40891
  user_id: string;
40440
40892
  };
40441
40893
  Update: {
40894
+ change_source?: string;
40442
40895
  connection_id?: string;
40443
40896
  created_at?: string;
40444
40897
  id?: string;
@@ -44039,6 +44492,18 @@ export declare const saveInvoiceTimingSettings: import("@tanstack/start-client-c
44039
44492
  Args: never;
44040
44493
  Returns: number;
44041
44494
  };
44495
+ calculate_floriday_desired_stock: {
44496
+ Args: {
44497
+ p_connection_id: string;
44498
+ p_product_id: string;
44499
+ };
44500
+ Returns: {
44501
+ desired_availability: boolean;
44502
+ desired_quantity: number;
44503
+ erp_available: number;
44504
+ stock_mode: string;
44505
+ }[];
44506
+ };
44042
44507
  calculate_layer_stock: {
44043
44508
  Args: {
44044
44509
  p_product_id: string;
@@ -44133,6 +44598,7 @@ export declare const saveInvoiceTimingSettings: import("@tanstack/start-client-c
44133
44598
  attempts: number;
44134
44599
  connection_id: string;
44135
44600
  created_at: string;
44601
+ dead_lettered_at: string | null;
44136
44602
  desired_available: boolean | null;
44137
44603
  gateway_attempt_id: string | null;
44138
44604
  id: string;
@@ -44141,9 +44607,13 @@ export declare const saveInvoiceTimingSettings: import("@tanstack/start-client-c
44141
44607
  locked_by: string | null;
44142
44608
  next_attempt_at: string;
44143
44609
  number_of_pieces: number;
44610
+ product_id: string | null;
44144
44611
  sent_at: string | null;
44145
44612
  status: string;
44613
+ stock_mode: string | null;
44146
44614
  superseded_by: string | null;
44615
+ target_week: number | null;
44616
+ target_year: number | null;
44147
44617
  trade_item_id: string;
44148
44618
  updated_at: string;
44149
44619
  user_id: string;
@@ -44624,6 +45094,24 @@ export declare const saveInvoiceTimingSettings: import("@tanstack/start-client-c
44624
45094
  };
44625
45095
  Returns: string;
44626
45096
  };
45097
+ floriday_capture_stock_snapshot: {
45098
+ Args: never;
45099
+ Returns: number;
45100
+ };
45101
+ floriday_cleanup_stock_queue_v2: {
45102
+ Args: never;
45103
+ Returns: undefined;
45104
+ };
45105
+ floriday_compact_stock_snapshots: {
45106
+ Args: never;
45107
+ Returns: undefined;
45108
+ };
45109
+ floriday_default_owner: {
45110
+ Args: {
45111
+ p_connection_id: string;
45112
+ };
45113
+ Returns: string;
45114
+ };
44627
45115
  floriday_effective_price: {
44628
45116
  Args: {
44629
45117
  _buyer_id: string;
@@ -44641,6 +45129,22 @@ export declare const saveInvoiceTimingSettings: import("@tanstack/start-client-c
44641
45129
  source_id: string;
44642
45130
  }[];
44643
45131
  };
45132
+ floriday_fill_publish_horizon: {
45133
+ Args: never;
45134
+ Returns: number;
45135
+ };
45136
+ floriday_publish_horizon_weeks: {
45137
+ Args: never;
45138
+ Returns: number;
45139
+ };
45140
+ floriday_recompute_inventory: {
45141
+ Args: {
45142
+ p_connection_id: string;
45143
+ p_force?: boolean;
45144
+ p_product_id: string;
45145
+ };
45146
+ Returns: undefined;
45147
+ };
44644
45148
  format_cart_number: {
44645
45149
  Args: {
44646
45150
  p_pick_date: string;
@@ -53286,6 +53790,7 @@ export declare const recomputeInvoiceDueForOrder: import("@tanstack/start-client
53286
53790
  attempts: number;
53287
53791
  connection_id: string;
53288
53792
  created_at: string;
53793
+ dead_lettered_at: string | null;
53289
53794
  desired_available: boolean | null;
53290
53795
  gateway_attempt_id: string | null;
53291
53796
  id: string;
@@ -53294,9 +53799,13 @@ export declare const recomputeInvoiceDueForOrder: import("@tanstack/start-client
53294
53799
  locked_by: string | null;
53295
53800
  next_attempt_at: string;
53296
53801
  number_of_pieces: number;
53802
+ product_id: string | null;
53297
53803
  sent_at: string | null;
53298
53804
  status: string;
53805
+ stock_mode: string | null;
53299
53806
  superseded_by: string | null;
53807
+ target_week: number | null;
53808
+ target_year: number | null;
53300
53809
  trade_item_id: string;
53301
53810
  updated_at: string;
53302
53811
  user_id: string;
@@ -53305,6 +53814,7 @@ export declare const recomputeInvoiceDueForOrder: import("@tanstack/start-client
53305
53814
  attempts?: number;
53306
53815
  connection_id: string;
53307
53816
  created_at?: string;
53817
+ dead_lettered_at?: string | null;
53308
53818
  desired_available?: boolean | null;
53309
53819
  gateway_attempt_id?: string | null;
53310
53820
  id?: string;
@@ -53313,9 +53823,13 @@ export declare const recomputeInvoiceDueForOrder: import("@tanstack/start-client
53313
53823
  locked_by?: string | null;
53314
53824
  next_attempt_at?: string;
53315
53825
  number_of_pieces?: number;
53826
+ product_id?: string | null;
53316
53827
  sent_at?: string | null;
53317
53828
  status?: string;
53829
+ stock_mode?: string | null;
53318
53830
  superseded_by?: string | null;
53831
+ target_week?: number | null;
53832
+ target_year?: number | null;
53319
53833
  trade_item_id: string;
53320
53834
  updated_at?: string;
53321
53835
  user_id: string;
@@ -53324,6 +53838,7 @@ export declare const recomputeInvoiceDueForOrder: import("@tanstack/start-client
53324
53838
  attempts?: number;
53325
53839
  connection_id?: string;
53326
53840
  created_at?: string;
53841
+ dead_lettered_at?: string | null;
53327
53842
  desired_available?: boolean | null;
53328
53843
  gateway_attempt_id?: string | null;
53329
53844
  id?: string;
@@ -53332,9 +53847,13 @@ export declare const recomputeInvoiceDueForOrder: import("@tanstack/start-client
53332
53847
  locked_by?: string | null;
53333
53848
  next_attempt_at?: string;
53334
53849
  number_of_pieces?: number;
53850
+ product_id?: string | null;
53335
53851
  sent_at?: string | null;
53336
53852
  status?: string;
53853
+ stock_mode?: string | null;
53337
53854
  superseded_by?: string | null;
53855
+ target_week?: number | null;
53856
+ target_year?: number | null;
53338
53857
  trade_item_id?: string;
53339
53858
  updated_at?: string;
53340
53859
  user_id?: string;
@@ -53743,6 +54262,87 @@ export declare const recomputeInvoiceDueForOrder: import("@tanstack/start-client
53743
54262
  referencedColumns: ["id"];
53744
54263
  }];
53745
54264
  };
54265
+ floriday_inventory_settings: {
54266
+ Row: {
54267
+ buffer_quantity: number;
54268
+ connection_id: string;
54269
+ created_at: string;
54270
+ desired_availability: boolean;
54271
+ desired_quantity: number;
54272
+ fixed_quantity: number | null;
54273
+ floriday_trade_item_id: string | null;
54274
+ id: string;
54275
+ last_confirmed_at: string | null;
54276
+ last_enqueued_at: string | null;
54277
+ last_published_at: string | null;
54278
+ last_sync_error: string | null;
54279
+ manual_quantity: number | null;
54280
+ maximum_quantity: number | null;
54281
+ product_id: string;
54282
+ quantity_control: string;
54283
+ remote_available: boolean | null;
54284
+ remote_checked_at: string | null;
54285
+ remote_quantity: number | null;
54286
+ stock_mode: string;
54287
+ sync_status: string;
54288
+ updated_at: string;
54289
+ updated_by: string | null;
54290
+ user_id: string;
54291
+ };
54292
+ Insert: {
54293
+ buffer_quantity?: number;
54294
+ connection_id: string;
54295
+ created_at?: string;
54296
+ desired_availability?: boolean;
54297
+ desired_quantity?: number;
54298
+ fixed_quantity?: number | null;
54299
+ floriday_trade_item_id?: string | null;
54300
+ id?: string;
54301
+ last_confirmed_at?: string | null;
54302
+ last_enqueued_at?: string | null;
54303
+ last_published_at?: string | null;
54304
+ last_sync_error?: string | null;
54305
+ manual_quantity?: number | null;
54306
+ maximum_quantity?: number | null;
54307
+ product_id: string;
54308
+ quantity_control?: string;
54309
+ remote_available?: boolean | null;
54310
+ remote_checked_at?: string | null;
54311
+ remote_quantity?: number | null;
54312
+ stock_mode?: string;
54313
+ sync_status?: string;
54314
+ updated_at?: string;
54315
+ updated_by?: string | null;
54316
+ user_id: string;
54317
+ };
54318
+ Update: {
54319
+ buffer_quantity?: number;
54320
+ connection_id?: string;
54321
+ created_at?: string;
54322
+ desired_availability?: boolean;
54323
+ desired_quantity?: number;
54324
+ fixed_quantity?: number | null;
54325
+ floriday_trade_item_id?: string | null;
54326
+ id?: string;
54327
+ last_confirmed_at?: string | null;
54328
+ last_enqueued_at?: string | null;
54329
+ last_published_at?: string | null;
54330
+ last_sync_error?: string | null;
54331
+ manual_quantity?: number | null;
54332
+ maximum_quantity?: number | null;
54333
+ product_id?: string;
54334
+ quantity_control?: string;
54335
+ remote_available?: boolean | null;
54336
+ remote_checked_at?: string | null;
54337
+ remote_quantity?: number | null;
54338
+ stock_mode?: string;
54339
+ sync_status?: string;
54340
+ updated_at?: string;
54341
+ updated_by?: string | null;
54342
+ user_id?: string;
54343
+ };
54344
+ Relationships: [];
54345
+ };
53746
54346
  floriday_invoices_cache: {
53747
54347
  Row: {
53748
54348
  buyer_organization_id: string | null;
@@ -54031,6 +54631,39 @@ export declare const recomputeInvoiceDueForOrder: import("@tanstack/start-client
54031
54631
  };
54032
54632
  Relationships: [];
54033
54633
  };
54634
+ floriday_sales_order_ingest: {
54635
+ Row: {
54636
+ connection_id: string;
54637
+ created_at: string;
54638
+ id: string;
54639
+ impact: import("../integrations/supabase/types").Json;
54640
+ order_status: string | null;
54641
+ order_version: number;
54642
+ processed_at: string;
54643
+ sales_order_id: string;
54644
+ };
54645
+ Insert: {
54646
+ connection_id: string;
54647
+ created_at?: string;
54648
+ id?: string;
54649
+ impact?: import("../integrations/supabase/types").Json;
54650
+ order_status?: string | null;
54651
+ order_version?: number;
54652
+ processed_at?: string;
54653
+ sales_order_id: string;
54654
+ };
54655
+ Update: {
54656
+ connection_id?: string;
54657
+ created_at?: string;
54658
+ id?: string;
54659
+ impact?: import("../integrations/supabase/types").Json;
54660
+ order_status?: string | null;
54661
+ order_version?: number;
54662
+ processed_at?: string;
54663
+ sales_order_id?: string;
54664
+ };
54665
+ Relationships: [];
54666
+ };
54034
54667
  floriday_sales_strategies_cache: {
54035
54668
  Row: {
54036
54669
  connection_id: string;
@@ -54130,6 +54763,39 @@ export declare const recomputeInvoiceDueForOrder: import("@tanstack/start-client
54130
54763
  };
54131
54764
  Relationships: [];
54132
54765
  };
54766
+ floriday_sync_cursors: {
54767
+ Row: {
54768
+ connection_id: string;
54769
+ created_at: string;
54770
+ id: string;
54771
+ last_error: string | null;
54772
+ last_sync_at: string | null;
54773
+ resource_type: string;
54774
+ sequence_number: number;
54775
+ updated_at: string;
54776
+ };
54777
+ Insert: {
54778
+ connection_id: string;
54779
+ created_at?: string;
54780
+ id?: string;
54781
+ last_error?: string | null;
54782
+ last_sync_at?: string | null;
54783
+ resource_type: string;
54784
+ sequence_number?: number;
54785
+ updated_at?: string;
54786
+ };
54787
+ Update: {
54788
+ connection_id?: string;
54789
+ created_at?: string;
54790
+ id?: string;
54791
+ last_error?: string | null;
54792
+ last_sync_at?: string | null;
54793
+ resource_type?: string;
54794
+ sequence_number?: number;
54795
+ updated_at?: string;
54796
+ };
54797
+ Relationships: [];
54798
+ };
54133
54799
  floriday_sync_state: {
54134
54800
  Row: {
54135
54801
  connection_id: string;
@@ -54820,6 +55486,42 @@ export declare const recomputeInvoiceDueForOrder: import("@tanstack/start-client
54820
55486
  };
54821
55487
  Relationships: [];
54822
55488
  };
55489
+ inventory_stock_snapshots: {
55490
+ Row: {
55491
+ connection_id: string;
55492
+ created_at: string;
55493
+ erp_available_quantity: number;
55494
+ floriday_desired_quantity: number;
55495
+ floriday_remote_quantity: number | null;
55496
+ granularity: string;
55497
+ id: string;
55498
+ snapshot_at: string;
55499
+ user_id: string | null;
55500
+ };
55501
+ Insert: {
55502
+ connection_id: string;
55503
+ created_at?: string;
55504
+ erp_available_quantity?: number;
55505
+ floriday_desired_quantity?: number;
55506
+ floriday_remote_quantity?: number | null;
55507
+ granularity?: string;
55508
+ id?: string;
55509
+ snapshot_at?: string;
55510
+ user_id?: string | null;
55511
+ };
55512
+ Update: {
55513
+ connection_id?: string;
55514
+ created_at?: string;
55515
+ erp_available_quantity?: number;
55516
+ floriday_desired_quantity?: number;
55517
+ floriday_remote_quantity?: number | null;
55518
+ granularity?: string;
55519
+ id?: string;
55520
+ snapshot_at?: string;
55521
+ user_id?: string | null;
55522
+ };
55523
+ Relationships: [];
55524
+ };
54823
55525
  invoice_items: {
54824
55526
  Row: {
54825
55527
  created_at: string;
@@ -64014,6 +64716,7 @@ export declare const recomputeInvoiceDueForOrder: import("@tanstack/start-client
64014
64716
  };
64015
64717
  trade_item_stock: {
64016
64718
  Row: {
64719
+ change_source: string;
64017
64720
  connection_id: string;
64018
64721
  created_at: string;
64019
64722
  id: string;
@@ -64027,6 +64730,7 @@ export declare const recomputeInvoiceDueForOrder: import("@tanstack/start-client
64027
64730
  user_id: string;
64028
64731
  };
64029
64732
  Insert: {
64733
+ change_source?: string;
64030
64734
  connection_id: string;
64031
64735
  created_at?: string;
64032
64736
  id?: string;
@@ -64040,6 +64744,7 @@ export declare const recomputeInvoiceDueForOrder: import("@tanstack/start-client
64040
64744
  user_id: string;
64041
64745
  };
64042
64746
  Update: {
64747
+ change_source?: string;
64043
64748
  connection_id?: string;
64044
64749
  created_at?: string;
64045
64750
  id?: string;
@@ -67640,6 +68345,18 @@ export declare const recomputeInvoiceDueForOrder: import("@tanstack/start-client
67640
68345
  Args: never;
67641
68346
  Returns: number;
67642
68347
  };
68348
+ calculate_floriday_desired_stock: {
68349
+ Args: {
68350
+ p_connection_id: string;
68351
+ p_product_id: string;
68352
+ };
68353
+ Returns: {
68354
+ desired_availability: boolean;
68355
+ desired_quantity: number;
68356
+ erp_available: number;
68357
+ stock_mode: string;
68358
+ }[];
68359
+ };
67643
68360
  calculate_layer_stock: {
67644
68361
  Args: {
67645
68362
  p_product_id: string;
@@ -67734,6 +68451,7 @@ export declare const recomputeInvoiceDueForOrder: import("@tanstack/start-client
67734
68451
  attempts: number;
67735
68452
  connection_id: string;
67736
68453
  created_at: string;
68454
+ dead_lettered_at: string | null;
67737
68455
  desired_available: boolean | null;
67738
68456
  gateway_attempt_id: string | null;
67739
68457
  id: string;
@@ -67742,9 +68460,13 @@ export declare const recomputeInvoiceDueForOrder: import("@tanstack/start-client
67742
68460
  locked_by: string | null;
67743
68461
  next_attempt_at: string;
67744
68462
  number_of_pieces: number;
68463
+ product_id: string | null;
67745
68464
  sent_at: string | null;
67746
68465
  status: string;
68466
+ stock_mode: string | null;
67747
68467
  superseded_by: string | null;
68468
+ target_week: number | null;
68469
+ target_year: number | null;
67748
68470
  trade_item_id: string;
67749
68471
  updated_at: string;
67750
68472
  user_id: string;
@@ -68225,6 +68947,24 @@ export declare const recomputeInvoiceDueForOrder: import("@tanstack/start-client
68225
68947
  };
68226
68948
  Returns: string;
68227
68949
  };
68950
+ floriday_capture_stock_snapshot: {
68951
+ Args: never;
68952
+ Returns: number;
68953
+ };
68954
+ floriday_cleanup_stock_queue_v2: {
68955
+ Args: never;
68956
+ Returns: undefined;
68957
+ };
68958
+ floriday_compact_stock_snapshots: {
68959
+ Args: never;
68960
+ Returns: undefined;
68961
+ };
68962
+ floriday_default_owner: {
68963
+ Args: {
68964
+ p_connection_id: string;
68965
+ };
68966
+ Returns: string;
68967
+ };
68228
68968
  floriday_effective_price: {
68229
68969
  Args: {
68230
68970
  _buyer_id: string;
@@ -68242,6 +68982,22 @@ export declare const recomputeInvoiceDueForOrder: import("@tanstack/start-client
68242
68982
  source_id: string;
68243
68983
  }[];
68244
68984
  };
68985
+ floriday_fill_publish_horizon: {
68986
+ Args: never;
68987
+ Returns: number;
68988
+ };
68989
+ floriday_publish_horizon_weeks: {
68990
+ Args: never;
68991
+ Returns: number;
68992
+ };
68993
+ floriday_recompute_inventory: {
68994
+ Args: {
68995
+ p_connection_id: string;
68996
+ p_force?: boolean;
68997
+ p_product_id: string;
68998
+ };
68999
+ Returns: undefined;
69000
+ };
68245
69001
  format_cart_number: {
68246
69002
  Args: {
68247
69003
  p_pick_date: string;
@@ -76878,6 +77634,7 @@ export declare const getOrderInvoiceMoment: import("@tanstack/start-client-core"
76878
77634
  attempts: number;
76879
77635
  connection_id: string;
76880
77636
  created_at: string;
77637
+ dead_lettered_at: string | null;
76881
77638
  desired_available: boolean | null;
76882
77639
  gateway_attempt_id: string | null;
76883
77640
  id: string;
@@ -76886,9 +77643,13 @@ export declare const getOrderInvoiceMoment: import("@tanstack/start-client-core"
76886
77643
  locked_by: string | null;
76887
77644
  next_attempt_at: string;
76888
77645
  number_of_pieces: number;
77646
+ product_id: string | null;
76889
77647
  sent_at: string | null;
76890
77648
  status: string;
77649
+ stock_mode: string | null;
76891
77650
  superseded_by: string | null;
77651
+ target_week: number | null;
77652
+ target_year: number | null;
76892
77653
  trade_item_id: string;
76893
77654
  updated_at: string;
76894
77655
  user_id: string;
@@ -76897,6 +77658,7 @@ export declare const getOrderInvoiceMoment: import("@tanstack/start-client-core"
76897
77658
  attempts?: number;
76898
77659
  connection_id: string;
76899
77660
  created_at?: string;
77661
+ dead_lettered_at?: string | null;
76900
77662
  desired_available?: boolean | null;
76901
77663
  gateway_attempt_id?: string | null;
76902
77664
  id?: string;
@@ -76905,9 +77667,13 @@ export declare const getOrderInvoiceMoment: import("@tanstack/start-client-core"
76905
77667
  locked_by?: string | null;
76906
77668
  next_attempt_at?: string;
76907
77669
  number_of_pieces?: number;
77670
+ product_id?: string | null;
76908
77671
  sent_at?: string | null;
76909
77672
  status?: string;
77673
+ stock_mode?: string | null;
76910
77674
  superseded_by?: string | null;
77675
+ target_week?: number | null;
77676
+ target_year?: number | null;
76911
77677
  trade_item_id: string;
76912
77678
  updated_at?: string;
76913
77679
  user_id: string;
@@ -76916,6 +77682,7 @@ export declare const getOrderInvoiceMoment: import("@tanstack/start-client-core"
76916
77682
  attempts?: number;
76917
77683
  connection_id?: string;
76918
77684
  created_at?: string;
77685
+ dead_lettered_at?: string | null;
76919
77686
  desired_available?: boolean | null;
76920
77687
  gateway_attempt_id?: string | null;
76921
77688
  id?: string;
@@ -76924,9 +77691,13 @@ export declare const getOrderInvoiceMoment: import("@tanstack/start-client-core"
76924
77691
  locked_by?: string | null;
76925
77692
  next_attempt_at?: string;
76926
77693
  number_of_pieces?: number;
77694
+ product_id?: string | null;
76927
77695
  sent_at?: string | null;
76928
77696
  status?: string;
77697
+ stock_mode?: string | null;
76929
77698
  superseded_by?: string | null;
77699
+ target_week?: number | null;
77700
+ target_year?: number | null;
76930
77701
  trade_item_id?: string;
76931
77702
  updated_at?: string;
76932
77703
  user_id?: string;
@@ -77335,6 +78106,87 @@ export declare const getOrderInvoiceMoment: import("@tanstack/start-client-core"
77335
78106
  referencedColumns: ["id"];
77336
78107
  }];
77337
78108
  };
78109
+ floriday_inventory_settings: {
78110
+ Row: {
78111
+ buffer_quantity: number;
78112
+ connection_id: string;
78113
+ created_at: string;
78114
+ desired_availability: boolean;
78115
+ desired_quantity: number;
78116
+ fixed_quantity: number | null;
78117
+ floriday_trade_item_id: string | null;
78118
+ id: string;
78119
+ last_confirmed_at: string | null;
78120
+ last_enqueued_at: string | null;
78121
+ last_published_at: string | null;
78122
+ last_sync_error: string | null;
78123
+ manual_quantity: number | null;
78124
+ maximum_quantity: number | null;
78125
+ product_id: string;
78126
+ quantity_control: string;
78127
+ remote_available: boolean | null;
78128
+ remote_checked_at: string | null;
78129
+ remote_quantity: number | null;
78130
+ stock_mode: string;
78131
+ sync_status: string;
78132
+ updated_at: string;
78133
+ updated_by: string | null;
78134
+ user_id: string;
78135
+ };
78136
+ Insert: {
78137
+ buffer_quantity?: number;
78138
+ connection_id: string;
78139
+ created_at?: string;
78140
+ desired_availability?: boolean;
78141
+ desired_quantity?: number;
78142
+ fixed_quantity?: number | null;
78143
+ floriday_trade_item_id?: string | null;
78144
+ id?: string;
78145
+ last_confirmed_at?: string | null;
78146
+ last_enqueued_at?: string | null;
78147
+ last_published_at?: string | null;
78148
+ last_sync_error?: string | null;
78149
+ manual_quantity?: number | null;
78150
+ maximum_quantity?: number | null;
78151
+ product_id: string;
78152
+ quantity_control?: string;
78153
+ remote_available?: boolean | null;
78154
+ remote_checked_at?: string | null;
78155
+ remote_quantity?: number | null;
78156
+ stock_mode?: string;
78157
+ sync_status?: string;
78158
+ updated_at?: string;
78159
+ updated_by?: string | null;
78160
+ user_id: string;
78161
+ };
78162
+ Update: {
78163
+ buffer_quantity?: number;
78164
+ connection_id?: string;
78165
+ created_at?: string;
78166
+ desired_availability?: boolean;
78167
+ desired_quantity?: number;
78168
+ fixed_quantity?: number | null;
78169
+ floriday_trade_item_id?: string | null;
78170
+ id?: string;
78171
+ last_confirmed_at?: string | null;
78172
+ last_enqueued_at?: string | null;
78173
+ last_published_at?: string | null;
78174
+ last_sync_error?: string | null;
78175
+ manual_quantity?: number | null;
78176
+ maximum_quantity?: number | null;
78177
+ product_id?: string;
78178
+ quantity_control?: string;
78179
+ remote_available?: boolean | null;
78180
+ remote_checked_at?: string | null;
78181
+ remote_quantity?: number | null;
78182
+ stock_mode?: string;
78183
+ sync_status?: string;
78184
+ updated_at?: string;
78185
+ updated_by?: string | null;
78186
+ user_id?: string;
78187
+ };
78188
+ Relationships: [];
78189
+ };
77338
78190
  floriday_invoices_cache: {
77339
78191
  Row: {
77340
78192
  buyer_organization_id: string | null;
@@ -77623,6 +78475,39 @@ export declare const getOrderInvoiceMoment: import("@tanstack/start-client-core"
77623
78475
  };
77624
78476
  Relationships: [];
77625
78477
  };
78478
+ floriday_sales_order_ingest: {
78479
+ Row: {
78480
+ connection_id: string;
78481
+ created_at: string;
78482
+ id: string;
78483
+ impact: import("../integrations/supabase/types").Json;
78484
+ order_status: string | null;
78485
+ order_version: number;
78486
+ processed_at: string;
78487
+ sales_order_id: string;
78488
+ };
78489
+ Insert: {
78490
+ connection_id: string;
78491
+ created_at?: string;
78492
+ id?: string;
78493
+ impact?: import("../integrations/supabase/types").Json;
78494
+ order_status?: string | null;
78495
+ order_version?: number;
78496
+ processed_at?: string;
78497
+ sales_order_id: string;
78498
+ };
78499
+ Update: {
78500
+ connection_id?: string;
78501
+ created_at?: string;
78502
+ id?: string;
78503
+ impact?: import("../integrations/supabase/types").Json;
78504
+ order_status?: string | null;
78505
+ order_version?: number;
78506
+ processed_at?: string;
78507
+ sales_order_id?: string;
78508
+ };
78509
+ Relationships: [];
78510
+ };
77626
78511
  floriday_sales_strategies_cache: {
77627
78512
  Row: {
77628
78513
  connection_id: string;
@@ -77722,6 +78607,39 @@ export declare const getOrderInvoiceMoment: import("@tanstack/start-client-core"
77722
78607
  };
77723
78608
  Relationships: [];
77724
78609
  };
78610
+ floriday_sync_cursors: {
78611
+ Row: {
78612
+ connection_id: string;
78613
+ created_at: string;
78614
+ id: string;
78615
+ last_error: string | null;
78616
+ last_sync_at: string | null;
78617
+ resource_type: string;
78618
+ sequence_number: number;
78619
+ updated_at: string;
78620
+ };
78621
+ Insert: {
78622
+ connection_id: string;
78623
+ created_at?: string;
78624
+ id?: string;
78625
+ last_error?: string | null;
78626
+ last_sync_at?: string | null;
78627
+ resource_type: string;
78628
+ sequence_number?: number;
78629
+ updated_at?: string;
78630
+ };
78631
+ Update: {
78632
+ connection_id?: string;
78633
+ created_at?: string;
78634
+ id?: string;
78635
+ last_error?: string | null;
78636
+ last_sync_at?: string | null;
78637
+ resource_type?: string;
78638
+ sequence_number?: number;
78639
+ updated_at?: string;
78640
+ };
78641
+ Relationships: [];
78642
+ };
77725
78643
  floriday_sync_state: {
77726
78644
  Row: {
77727
78645
  connection_id: string;
@@ -78412,6 +79330,42 @@ export declare const getOrderInvoiceMoment: import("@tanstack/start-client-core"
78412
79330
  };
78413
79331
  Relationships: [];
78414
79332
  };
79333
+ inventory_stock_snapshots: {
79334
+ Row: {
79335
+ connection_id: string;
79336
+ created_at: string;
79337
+ erp_available_quantity: number;
79338
+ floriday_desired_quantity: number;
79339
+ floriday_remote_quantity: number | null;
79340
+ granularity: string;
79341
+ id: string;
79342
+ snapshot_at: string;
79343
+ user_id: string | null;
79344
+ };
79345
+ Insert: {
79346
+ connection_id: string;
79347
+ created_at?: string;
79348
+ erp_available_quantity?: number;
79349
+ floriday_desired_quantity?: number;
79350
+ floriday_remote_quantity?: number | null;
79351
+ granularity?: string;
79352
+ id?: string;
79353
+ snapshot_at?: string;
79354
+ user_id?: string | null;
79355
+ };
79356
+ Update: {
79357
+ connection_id?: string;
79358
+ created_at?: string;
79359
+ erp_available_quantity?: number;
79360
+ floriday_desired_quantity?: number;
79361
+ floriday_remote_quantity?: number | null;
79362
+ granularity?: string;
79363
+ id?: string;
79364
+ snapshot_at?: string;
79365
+ user_id?: string | null;
79366
+ };
79367
+ Relationships: [];
79368
+ };
78415
79369
  invoice_items: {
78416
79370
  Row: {
78417
79371
  created_at: string;
@@ -87606,6 +88560,7 @@ export declare const getOrderInvoiceMoment: import("@tanstack/start-client-core"
87606
88560
  };
87607
88561
  trade_item_stock: {
87608
88562
  Row: {
88563
+ change_source: string;
87609
88564
  connection_id: string;
87610
88565
  created_at: string;
87611
88566
  id: string;
@@ -87619,6 +88574,7 @@ export declare const getOrderInvoiceMoment: import("@tanstack/start-client-core"
87619
88574
  user_id: string;
87620
88575
  };
87621
88576
  Insert: {
88577
+ change_source?: string;
87622
88578
  connection_id: string;
87623
88579
  created_at?: string;
87624
88580
  id?: string;
@@ -87632,6 +88588,7 @@ export declare const getOrderInvoiceMoment: import("@tanstack/start-client-core"
87632
88588
  user_id: string;
87633
88589
  };
87634
88590
  Update: {
88591
+ change_source?: string;
87635
88592
  connection_id?: string;
87636
88593
  created_at?: string;
87637
88594
  id?: string;
@@ -91232,6 +92189,18 @@ export declare const getOrderInvoiceMoment: import("@tanstack/start-client-core"
91232
92189
  Args: never;
91233
92190
  Returns: number;
91234
92191
  };
92192
+ calculate_floriday_desired_stock: {
92193
+ Args: {
92194
+ p_connection_id: string;
92195
+ p_product_id: string;
92196
+ };
92197
+ Returns: {
92198
+ desired_availability: boolean;
92199
+ desired_quantity: number;
92200
+ erp_available: number;
92201
+ stock_mode: string;
92202
+ }[];
92203
+ };
91235
92204
  calculate_layer_stock: {
91236
92205
  Args: {
91237
92206
  p_product_id: string;
@@ -91326,6 +92295,7 @@ export declare const getOrderInvoiceMoment: import("@tanstack/start-client-core"
91326
92295
  attempts: number;
91327
92296
  connection_id: string;
91328
92297
  created_at: string;
92298
+ dead_lettered_at: string | null;
91329
92299
  desired_available: boolean | null;
91330
92300
  gateway_attempt_id: string | null;
91331
92301
  id: string;
@@ -91334,9 +92304,13 @@ export declare const getOrderInvoiceMoment: import("@tanstack/start-client-core"
91334
92304
  locked_by: string | null;
91335
92305
  next_attempt_at: string;
91336
92306
  number_of_pieces: number;
92307
+ product_id: string | null;
91337
92308
  sent_at: string | null;
91338
92309
  status: string;
92310
+ stock_mode: string | null;
91339
92311
  superseded_by: string | null;
92312
+ target_week: number | null;
92313
+ target_year: number | null;
91340
92314
  trade_item_id: string;
91341
92315
  updated_at: string;
91342
92316
  user_id: string;
@@ -91817,6 +92791,24 @@ export declare const getOrderInvoiceMoment: import("@tanstack/start-client-core"
91817
92791
  };
91818
92792
  Returns: string;
91819
92793
  };
92794
+ floriday_capture_stock_snapshot: {
92795
+ Args: never;
92796
+ Returns: number;
92797
+ };
92798
+ floriday_cleanup_stock_queue_v2: {
92799
+ Args: never;
92800
+ Returns: undefined;
92801
+ };
92802
+ floriday_compact_stock_snapshots: {
92803
+ Args: never;
92804
+ Returns: undefined;
92805
+ };
92806
+ floriday_default_owner: {
92807
+ Args: {
92808
+ p_connection_id: string;
92809
+ };
92810
+ Returns: string;
92811
+ };
91820
92812
  floriday_effective_price: {
91821
92813
  Args: {
91822
92814
  _buyer_id: string;
@@ -91834,6 +92826,22 @@ export declare const getOrderInvoiceMoment: import("@tanstack/start-client-core"
91834
92826
  source_id: string;
91835
92827
  }[];
91836
92828
  };
92829
+ floriday_fill_publish_horizon: {
92830
+ Args: never;
92831
+ Returns: number;
92832
+ };
92833
+ floriday_publish_horizon_weeks: {
92834
+ Args: never;
92835
+ Returns: number;
92836
+ };
92837
+ floriday_recompute_inventory: {
92838
+ Args: {
92839
+ p_connection_id: string;
92840
+ p_force?: boolean;
92841
+ p_product_id: string;
92842
+ };
92843
+ Returns: undefined;
92844
+ };
91837
92845
  format_cart_number: {
91838
92846
  Args: {
91839
92847
  p_pick_date: string;