@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
@@ -6140,6 +6140,7 @@ export declare const getCartPlanningBundle: import("@tanstack/start-client-core"
6140
6140
  attempts: number;
6141
6141
  connection_id: string;
6142
6142
  created_at: string;
6143
+ dead_lettered_at: string | null;
6143
6144
  desired_available: boolean | null;
6144
6145
  gateway_attempt_id: string | null;
6145
6146
  id: string;
@@ -6148,9 +6149,13 @@ export declare const getCartPlanningBundle: import("@tanstack/start-client-core"
6148
6149
  locked_by: string | null;
6149
6150
  next_attempt_at: string;
6150
6151
  number_of_pieces: number;
6152
+ product_id: string | null;
6151
6153
  sent_at: string | null;
6152
6154
  status: string;
6155
+ stock_mode: string | null;
6153
6156
  superseded_by: string | null;
6157
+ target_week: number | null;
6158
+ target_year: number | null;
6154
6159
  trade_item_id: string;
6155
6160
  updated_at: string;
6156
6161
  user_id: string;
@@ -6159,6 +6164,7 @@ export declare const getCartPlanningBundle: import("@tanstack/start-client-core"
6159
6164
  attempts?: number;
6160
6165
  connection_id: string;
6161
6166
  created_at?: string;
6167
+ dead_lettered_at?: string | null;
6162
6168
  desired_available?: boolean | null;
6163
6169
  gateway_attempt_id?: string | null;
6164
6170
  id?: string;
@@ -6167,9 +6173,13 @@ export declare const getCartPlanningBundle: import("@tanstack/start-client-core"
6167
6173
  locked_by?: string | null;
6168
6174
  next_attempt_at?: string;
6169
6175
  number_of_pieces?: number;
6176
+ product_id?: string | null;
6170
6177
  sent_at?: string | null;
6171
6178
  status?: string;
6179
+ stock_mode?: string | null;
6172
6180
  superseded_by?: string | null;
6181
+ target_week?: number | null;
6182
+ target_year?: number | null;
6173
6183
  trade_item_id: string;
6174
6184
  updated_at?: string;
6175
6185
  user_id: string;
@@ -6178,6 +6188,7 @@ export declare const getCartPlanningBundle: import("@tanstack/start-client-core"
6178
6188
  attempts?: number;
6179
6189
  connection_id?: string;
6180
6190
  created_at?: string;
6191
+ dead_lettered_at?: string | null;
6181
6192
  desired_available?: boolean | null;
6182
6193
  gateway_attempt_id?: string | null;
6183
6194
  id?: string;
@@ -6186,9 +6197,13 @@ export declare const getCartPlanningBundle: import("@tanstack/start-client-core"
6186
6197
  locked_by?: string | null;
6187
6198
  next_attempt_at?: string;
6188
6199
  number_of_pieces?: number;
6200
+ product_id?: string | null;
6189
6201
  sent_at?: string | null;
6190
6202
  status?: string;
6203
+ stock_mode?: string | null;
6191
6204
  superseded_by?: string | null;
6205
+ target_week?: number | null;
6206
+ target_year?: number | null;
6192
6207
  trade_item_id?: string;
6193
6208
  updated_at?: string;
6194
6209
  user_id?: string;
@@ -6597,6 +6612,87 @@ export declare const getCartPlanningBundle: import("@tanstack/start-client-core"
6597
6612
  referencedColumns: ["id"];
6598
6613
  }];
6599
6614
  };
6615
+ floriday_inventory_settings: {
6616
+ Row: {
6617
+ buffer_quantity: number;
6618
+ connection_id: string;
6619
+ created_at: string;
6620
+ desired_availability: boolean;
6621
+ desired_quantity: number;
6622
+ fixed_quantity: number | null;
6623
+ floriday_trade_item_id: string | null;
6624
+ id: string;
6625
+ last_confirmed_at: string | null;
6626
+ last_enqueued_at: string | null;
6627
+ last_published_at: string | null;
6628
+ last_sync_error: string | null;
6629
+ manual_quantity: number | null;
6630
+ maximum_quantity: number | null;
6631
+ product_id: string;
6632
+ quantity_control: string;
6633
+ remote_available: boolean | null;
6634
+ remote_checked_at: string | null;
6635
+ remote_quantity: number | null;
6636
+ stock_mode: string;
6637
+ sync_status: string;
6638
+ updated_at: string;
6639
+ updated_by: string | null;
6640
+ user_id: string;
6641
+ };
6642
+ Insert: {
6643
+ buffer_quantity?: number;
6644
+ connection_id: string;
6645
+ created_at?: string;
6646
+ desired_availability?: boolean;
6647
+ desired_quantity?: number;
6648
+ fixed_quantity?: number | null;
6649
+ floriday_trade_item_id?: string | null;
6650
+ id?: string;
6651
+ last_confirmed_at?: string | null;
6652
+ last_enqueued_at?: string | null;
6653
+ last_published_at?: string | null;
6654
+ last_sync_error?: string | null;
6655
+ manual_quantity?: number | null;
6656
+ maximum_quantity?: number | null;
6657
+ product_id: string;
6658
+ quantity_control?: string;
6659
+ remote_available?: boolean | null;
6660
+ remote_checked_at?: string | null;
6661
+ remote_quantity?: number | null;
6662
+ stock_mode?: string;
6663
+ sync_status?: string;
6664
+ updated_at?: string;
6665
+ updated_by?: string | null;
6666
+ user_id: string;
6667
+ };
6668
+ Update: {
6669
+ buffer_quantity?: number;
6670
+ connection_id?: string;
6671
+ created_at?: string;
6672
+ desired_availability?: boolean;
6673
+ desired_quantity?: number;
6674
+ fixed_quantity?: number | null;
6675
+ floriday_trade_item_id?: string | null;
6676
+ id?: string;
6677
+ last_confirmed_at?: string | null;
6678
+ last_enqueued_at?: string | null;
6679
+ last_published_at?: string | null;
6680
+ last_sync_error?: string | null;
6681
+ manual_quantity?: number | null;
6682
+ maximum_quantity?: number | null;
6683
+ product_id?: string;
6684
+ quantity_control?: string;
6685
+ remote_available?: boolean | null;
6686
+ remote_checked_at?: string | null;
6687
+ remote_quantity?: number | null;
6688
+ stock_mode?: string;
6689
+ sync_status?: string;
6690
+ updated_at?: string;
6691
+ updated_by?: string | null;
6692
+ user_id?: string;
6693
+ };
6694
+ Relationships: [];
6695
+ };
6600
6696
  floriday_invoices_cache: {
6601
6697
  Row: {
6602
6698
  buyer_organization_id: string | null;
@@ -6885,6 +6981,39 @@ export declare const getCartPlanningBundle: import("@tanstack/start-client-core"
6885
6981
  };
6886
6982
  Relationships: [];
6887
6983
  };
6984
+ floriday_sales_order_ingest: {
6985
+ Row: {
6986
+ connection_id: string;
6987
+ created_at: string;
6988
+ id: string;
6989
+ impact: import("../integrations/supabase/types").Json;
6990
+ order_status: string | null;
6991
+ order_version: number;
6992
+ processed_at: string;
6993
+ sales_order_id: string;
6994
+ };
6995
+ Insert: {
6996
+ connection_id: string;
6997
+ created_at?: string;
6998
+ id?: string;
6999
+ impact?: import("../integrations/supabase/types").Json;
7000
+ order_status?: string | null;
7001
+ order_version?: number;
7002
+ processed_at?: string;
7003
+ sales_order_id: string;
7004
+ };
7005
+ Update: {
7006
+ connection_id?: string;
7007
+ created_at?: string;
7008
+ id?: string;
7009
+ impact?: import("../integrations/supabase/types").Json;
7010
+ order_status?: string | null;
7011
+ order_version?: number;
7012
+ processed_at?: string;
7013
+ sales_order_id?: string;
7014
+ };
7015
+ Relationships: [];
7016
+ };
6888
7017
  floriday_sales_strategies_cache: {
6889
7018
  Row: {
6890
7019
  connection_id: string;
@@ -6984,6 +7113,39 @@ export declare const getCartPlanningBundle: import("@tanstack/start-client-core"
6984
7113
  };
6985
7114
  Relationships: [];
6986
7115
  };
7116
+ floriday_sync_cursors: {
7117
+ Row: {
7118
+ connection_id: string;
7119
+ created_at: string;
7120
+ id: string;
7121
+ last_error: string | null;
7122
+ last_sync_at: string | null;
7123
+ resource_type: string;
7124
+ sequence_number: number;
7125
+ updated_at: string;
7126
+ };
7127
+ Insert: {
7128
+ connection_id: string;
7129
+ created_at?: string;
7130
+ id?: string;
7131
+ last_error?: string | null;
7132
+ last_sync_at?: string | null;
7133
+ resource_type: string;
7134
+ sequence_number?: number;
7135
+ updated_at?: string;
7136
+ };
7137
+ Update: {
7138
+ connection_id?: string;
7139
+ created_at?: string;
7140
+ id?: string;
7141
+ last_error?: string | null;
7142
+ last_sync_at?: string | null;
7143
+ resource_type?: string;
7144
+ sequence_number?: number;
7145
+ updated_at?: string;
7146
+ };
7147
+ Relationships: [];
7148
+ };
6987
7149
  floriday_sync_state: {
6988
7150
  Row: {
6989
7151
  connection_id: string;
@@ -7674,6 +7836,42 @@ export declare const getCartPlanningBundle: import("@tanstack/start-client-core"
7674
7836
  };
7675
7837
  Relationships: [];
7676
7838
  };
7839
+ inventory_stock_snapshots: {
7840
+ Row: {
7841
+ connection_id: string;
7842
+ created_at: string;
7843
+ erp_available_quantity: number;
7844
+ floriday_desired_quantity: number;
7845
+ floriday_remote_quantity: number | null;
7846
+ granularity: string;
7847
+ id: string;
7848
+ snapshot_at: string;
7849
+ user_id: string | null;
7850
+ };
7851
+ Insert: {
7852
+ connection_id: string;
7853
+ created_at?: string;
7854
+ erp_available_quantity?: number;
7855
+ floriday_desired_quantity?: number;
7856
+ floriday_remote_quantity?: number | null;
7857
+ granularity?: string;
7858
+ id?: string;
7859
+ snapshot_at?: string;
7860
+ user_id?: string | null;
7861
+ };
7862
+ Update: {
7863
+ connection_id?: string;
7864
+ created_at?: string;
7865
+ erp_available_quantity?: number;
7866
+ floriday_desired_quantity?: number;
7867
+ floriday_remote_quantity?: number | null;
7868
+ granularity?: string;
7869
+ id?: string;
7870
+ snapshot_at?: string;
7871
+ user_id?: string | null;
7872
+ };
7873
+ Relationships: [];
7874
+ };
7677
7875
  invoice_items: {
7678
7876
  Row: {
7679
7877
  created_at: string;
@@ -16868,6 +17066,7 @@ export declare const getCartPlanningBundle: import("@tanstack/start-client-core"
16868
17066
  };
16869
17067
  trade_item_stock: {
16870
17068
  Row: {
17069
+ change_source: string;
16871
17070
  connection_id: string;
16872
17071
  created_at: string;
16873
17072
  id: string;
@@ -16881,6 +17080,7 @@ export declare const getCartPlanningBundle: import("@tanstack/start-client-core"
16881
17080
  user_id: string;
16882
17081
  };
16883
17082
  Insert: {
17083
+ change_source?: string;
16884
17084
  connection_id: string;
16885
17085
  created_at?: string;
16886
17086
  id?: string;
@@ -16894,6 +17094,7 @@ export declare const getCartPlanningBundle: import("@tanstack/start-client-core"
16894
17094
  user_id: string;
16895
17095
  };
16896
17096
  Update: {
17097
+ change_source?: string;
16897
17098
  connection_id?: string;
16898
17099
  created_at?: string;
16899
17100
  id?: string;
@@ -20494,6 +20695,18 @@ export declare const getCartPlanningBundle: import("@tanstack/start-client-core"
20494
20695
  Args: never;
20495
20696
  Returns: number;
20496
20697
  };
20698
+ calculate_floriday_desired_stock: {
20699
+ Args: {
20700
+ p_connection_id: string;
20701
+ p_product_id: string;
20702
+ };
20703
+ Returns: {
20704
+ desired_availability: boolean;
20705
+ desired_quantity: number;
20706
+ erp_available: number;
20707
+ stock_mode: string;
20708
+ }[];
20709
+ };
20497
20710
  calculate_layer_stock: {
20498
20711
  Args: {
20499
20712
  p_product_id: string;
@@ -20588,6 +20801,7 @@ export declare const getCartPlanningBundle: import("@tanstack/start-client-core"
20588
20801
  attempts: number;
20589
20802
  connection_id: string;
20590
20803
  created_at: string;
20804
+ dead_lettered_at: string | null;
20591
20805
  desired_available: boolean | null;
20592
20806
  gateway_attempt_id: string | null;
20593
20807
  id: string;
@@ -20596,9 +20810,13 @@ export declare const getCartPlanningBundle: import("@tanstack/start-client-core"
20596
20810
  locked_by: string | null;
20597
20811
  next_attempt_at: string;
20598
20812
  number_of_pieces: number;
20813
+ product_id: string | null;
20599
20814
  sent_at: string | null;
20600
20815
  status: string;
20816
+ stock_mode: string | null;
20601
20817
  superseded_by: string | null;
20818
+ target_week: number | null;
20819
+ target_year: number | null;
20602
20820
  trade_item_id: string;
20603
20821
  updated_at: string;
20604
20822
  user_id: string;
@@ -21079,6 +21297,24 @@ export declare const getCartPlanningBundle: import("@tanstack/start-client-core"
21079
21297
  };
21080
21298
  Returns: string;
21081
21299
  };
21300
+ floriday_capture_stock_snapshot: {
21301
+ Args: never;
21302
+ Returns: number;
21303
+ };
21304
+ floriday_cleanup_stock_queue_v2: {
21305
+ Args: never;
21306
+ Returns: undefined;
21307
+ };
21308
+ floriday_compact_stock_snapshots: {
21309
+ Args: never;
21310
+ Returns: undefined;
21311
+ };
21312
+ floriday_default_owner: {
21313
+ Args: {
21314
+ p_connection_id: string;
21315
+ };
21316
+ Returns: string;
21317
+ };
21082
21318
  floriday_effective_price: {
21083
21319
  Args: {
21084
21320
  _buyer_id: string;
@@ -21096,6 +21332,22 @@ export declare const getCartPlanningBundle: import("@tanstack/start-client-core"
21096
21332
  source_id: string;
21097
21333
  }[];
21098
21334
  };
21335
+ floriday_fill_publish_horizon: {
21336
+ Args: never;
21337
+ Returns: number;
21338
+ };
21339
+ floriday_publish_horizon_weeks: {
21340
+ Args: never;
21341
+ Returns: number;
21342
+ };
21343
+ floriday_recompute_inventory: {
21344
+ Args: {
21345
+ p_connection_id: string;
21346
+ p_force?: boolean;
21347
+ p_product_id: string;
21348
+ };
21349
+ Returns: undefined;
21350
+ };
21099
21351
  format_cart_number: {
21100
21352
  Args: {
21101
21353
  p_pick_date: string;
@@ -29733,6 +29985,7 @@ export declare const updateCartPlanningSettings: import("@tanstack/start-client-
29733
29985
  attempts: number;
29734
29986
  connection_id: string;
29735
29987
  created_at: string;
29988
+ dead_lettered_at: string | null;
29736
29989
  desired_available: boolean | null;
29737
29990
  gateway_attempt_id: string | null;
29738
29991
  id: string;
@@ -29741,9 +29994,13 @@ export declare const updateCartPlanningSettings: import("@tanstack/start-client-
29741
29994
  locked_by: string | null;
29742
29995
  next_attempt_at: string;
29743
29996
  number_of_pieces: number;
29997
+ product_id: string | null;
29744
29998
  sent_at: string | null;
29745
29999
  status: string;
30000
+ stock_mode: string | null;
29746
30001
  superseded_by: string | null;
30002
+ target_week: number | null;
30003
+ target_year: number | null;
29747
30004
  trade_item_id: string;
29748
30005
  updated_at: string;
29749
30006
  user_id: string;
@@ -29752,6 +30009,7 @@ export declare const updateCartPlanningSettings: import("@tanstack/start-client-
29752
30009
  attempts?: number;
29753
30010
  connection_id: string;
29754
30011
  created_at?: string;
30012
+ dead_lettered_at?: string | null;
29755
30013
  desired_available?: boolean | null;
29756
30014
  gateway_attempt_id?: string | null;
29757
30015
  id?: string;
@@ -29760,9 +30018,13 @@ export declare const updateCartPlanningSettings: import("@tanstack/start-client-
29760
30018
  locked_by?: string | null;
29761
30019
  next_attempt_at?: string;
29762
30020
  number_of_pieces?: number;
30021
+ product_id?: string | null;
29763
30022
  sent_at?: string | null;
29764
30023
  status?: string;
30024
+ stock_mode?: string | null;
29765
30025
  superseded_by?: string | null;
30026
+ target_week?: number | null;
30027
+ target_year?: number | null;
29766
30028
  trade_item_id: string;
29767
30029
  updated_at?: string;
29768
30030
  user_id: string;
@@ -29771,6 +30033,7 @@ export declare const updateCartPlanningSettings: import("@tanstack/start-client-
29771
30033
  attempts?: number;
29772
30034
  connection_id?: string;
29773
30035
  created_at?: string;
30036
+ dead_lettered_at?: string | null;
29774
30037
  desired_available?: boolean | null;
29775
30038
  gateway_attempt_id?: string | null;
29776
30039
  id?: string;
@@ -29779,9 +30042,13 @@ export declare const updateCartPlanningSettings: import("@tanstack/start-client-
29779
30042
  locked_by?: string | null;
29780
30043
  next_attempt_at?: string;
29781
30044
  number_of_pieces?: number;
30045
+ product_id?: string | null;
29782
30046
  sent_at?: string | null;
29783
30047
  status?: string;
30048
+ stock_mode?: string | null;
29784
30049
  superseded_by?: string | null;
30050
+ target_week?: number | null;
30051
+ target_year?: number | null;
29785
30052
  trade_item_id?: string;
29786
30053
  updated_at?: string;
29787
30054
  user_id?: string;
@@ -30190,6 +30457,87 @@ export declare const updateCartPlanningSettings: import("@tanstack/start-client-
30190
30457
  referencedColumns: ["id"];
30191
30458
  }];
30192
30459
  };
30460
+ floriday_inventory_settings: {
30461
+ Row: {
30462
+ buffer_quantity: number;
30463
+ connection_id: string;
30464
+ created_at: string;
30465
+ desired_availability: boolean;
30466
+ desired_quantity: number;
30467
+ fixed_quantity: number | null;
30468
+ floriday_trade_item_id: string | null;
30469
+ id: string;
30470
+ last_confirmed_at: string | null;
30471
+ last_enqueued_at: string | null;
30472
+ last_published_at: string | null;
30473
+ last_sync_error: string | null;
30474
+ manual_quantity: number | null;
30475
+ maximum_quantity: number | null;
30476
+ product_id: string;
30477
+ quantity_control: string;
30478
+ remote_available: boolean | null;
30479
+ remote_checked_at: string | null;
30480
+ remote_quantity: number | null;
30481
+ stock_mode: string;
30482
+ sync_status: string;
30483
+ updated_at: string;
30484
+ updated_by: string | null;
30485
+ user_id: string;
30486
+ };
30487
+ Insert: {
30488
+ buffer_quantity?: number;
30489
+ connection_id: string;
30490
+ created_at?: string;
30491
+ desired_availability?: boolean;
30492
+ desired_quantity?: number;
30493
+ fixed_quantity?: number | null;
30494
+ floriday_trade_item_id?: string | null;
30495
+ id?: string;
30496
+ last_confirmed_at?: string | null;
30497
+ last_enqueued_at?: string | null;
30498
+ last_published_at?: string | null;
30499
+ last_sync_error?: string | null;
30500
+ manual_quantity?: number | null;
30501
+ maximum_quantity?: number | null;
30502
+ product_id: string;
30503
+ quantity_control?: string;
30504
+ remote_available?: boolean | null;
30505
+ remote_checked_at?: string | null;
30506
+ remote_quantity?: number | null;
30507
+ stock_mode?: string;
30508
+ sync_status?: string;
30509
+ updated_at?: string;
30510
+ updated_by?: string | null;
30511
+ user_id: string;
30512
+ };
30513
+ Update: {
30514
+ buffer_quantity?: number;
30515
+ connection_id?: string;
30516
+ created_at?: string;
30517
+ desired_availability?: boolean;
30518
+ desired_quantity?: number;
30519
+ fixed_quantity?: number | null;
30520
+ floriday_trade_item_id?: string | null;
30521
+ id?: string;
30522
+ last_confirmed_at?: string | null;
30523
+ last_enqueued_at?: string | null;
30524
+ last_published_at?: string | null;
30525
+ last_sync_error?: string | null;
30526
+ manual_quantity?: number | null;
30527
+ maximum_quantity?: number | null;
30528
+ product_id?: string;
30529
+ quantity_control?: string;
30530
+ remote_available?: boolean | null;
30531
+ remote_checked_at?: string | null;
30532
+ remote_quantity?: number | null;
30533
+ stock_mode?: string;
30534
+ sync_status?: string;
30535
+ updated_at?: string;
30536
+ updated_by?: string | null;
30537
+ user_id?: string;
30538
+ };
30539
+ Relationships: [];
30540
+ };
30193
30541
  floriday_invoices_cache: {
30194
30542
  Row: {
30195
30543
  buyer_organization_id: string | null;
@@ -30478,6 +30826,39 @@ export declare const updateCartPlanningSettings: import("@tanstack/start-client-
30478
30826
  };
30479
30827
  Relationships: [];
30480
30828
  };
30829
+ floriday_sales_order_ingest: {
30830
+ Row: {
30831
+ connection_id: string;
30832
+ created_at: string;
30833
+ id: string;
30834
+ impact: import("../integrations/supabase/types").Json;
30835
+ order_status: string | null;
30836
+ order_version: number;
30837
+ processed_at: string;
30838
+ sales_order_id: string;
30839
+ };
30840
+ Insert: {
30841
+ connection_id: string;
30842
+ created_at?: string;
30843
+ id?: string;
30844
+ impact?: import("../integrations/supabase/types").Json;
30845
+ order_status?: string | null;
30846
+ order_version?: number;
30847
+ processed_at?: string;
30848
+ sales_order_id: string;
30849
+ };
30850
+ Update: {
30851
+ connection_id?: string;
30852
+ created_at?: string;
30853
+ id?: string;
30854
+ impact?: import("../integrations/supabase/types").Json;
30855
+ order_status?: string | null;
30856
+ order_version?: number;
30857
+ processed_at?: string;
30858
+ sales_order_id?: string;
30859
+ };
30860
+ Relationships: [];
30861
+ };
30481
30862
  floriday_sales_strategies_cache: {
30482
30863
  Row: {
30483
30864
  connection_id: string;
@@ -30577,6 +30958,39 @@ export declare const updateCartPlanningSettings: import("@tanstack/start-client-
30577
30958
  };
30578
30959
  Relationships: [];
30579
30960
  };
30961
+ floriday_sync_cursors: {
30962
+ Row: {
30963
+ connection_id: string;
30964
+ created_at: string;
30965
+ id: string;
30966
+ last_error: string | null;
30967
+ last_sync_at: string | null;
30968
+ resource_type: string;
30969
+ sequence_number: number;
30970
+ updated_at: string;
30971
+ };
30972
+ Insert: {
30973
+ connection_id: string;
30974
+ created_at?: string;
30975
+ id?: string;
30976
+ last_error?: string | null;
30977
+ last_sync_at?: string | null;
30978
+ resource_type: string;
30979
+ sequence_number?: number;
30980
+ updated_at?: string;
30981
+ };
30982
+ Update: {
30983
+ connection_id?: string;
30984
+ created_at?: string;
30985
+ id?: string;
30986
+ last_error?: string | null;
30987
+ last_sync_at?: string | null;
30988
+ resource_type?: string;
30989
+ sequence_number?: number;
30990
+ updated_at?: string;
30991
+ };
30992
+ Relationships: [];
30993
+ };
30580
30994
  floriday_sync_state: {
30581
30995
  Row: {
30582
30996
  connection_id: string;
@@ -31267,6 +31681,42 @@ export declare const updateCartPlanningSettings: import("@tanstack/start-client-
31267
31681
  };
31268
31682
  Relationships: [];
31269
31683
  };
31684
+ inventory_stock_snapshots: {
31685
+ Row: {
31686
+ connection_id: string;
31687
+ created_at: string;
31688
+ erp_available_quantity: number;
31689
+ floriday_desired_quantity: number;
31690
+ floriday_remote_quantity: number | null;
31691
+ granularity: string;
31692
+ id: string;
31693
+ snapshot_at: string;
31694
+ user_id: string | null;
31695
+ };
31696
+ Insert: {
31697
+ connection_id: string;
31698
+ created_at?: string;
31699
+ erp_available_quantity?: number;
31700
+ floriday_desired_quantity?: number;
31701
+ floriday_remote_quantity?: number | null;
31702
+ granularity?: string;
31703
+ id?: string;
31704
+ snapshot_at?: string;
31705
+ user_id?: string | null;
31706
+ };
31707
+ Update: {
31708
+ connection_id?: string;
31709
+ created_at?: string;
31710
+ erp_available_quantity?: number;
31711
+ floriday_desired_quantity?: number;
31712
+ floriday_remote_quantity?: number | null;
31713
+ granularity?: string;
31714
+ id?: string;
31715
+ snapshot_at?: string;
31716
+ user_id?: string | null;
31717
+ };
31718
+ Relationships: [];
31719
+ };
31270
31720
  invoice_items: {
31271
31721
  Row: {
31272
31722
  created_at: string;
@@ -40461,6 +40911,7 @@ export declare const updateCartPlanningSettings: import("@tanstack/start-client-
40461
40911
  };
40462
40912
  trade_item_stock: {
40463
40913
  Row: {
40914
+ change_source: string;
40464
40915
  connection_id: string;
40465
40916
  created_at: string;
40466
40917
  id: string;
@@ -40474,6 +40925,7 @@ export declare const updateCartPlanningSettings: import("@tanstack/start-client-
40474
40925
  user_id: string;
40475
40926
  };
40476
40927
  Insert: {
40928
+ change_source?: string;
40477
40929
  connection_id: string;
40478
40930
  created_at?: string;
40479
40931
  id?: string;
@@ -40487,6 +40939,7 @@ export declare const updateCartPlanningSettings: import("@tanstack/start-client-
40487
40939
  user_id: string;
40488
40940
  };
40489
40941
  Update: {
40942
+ change_source?: string;
40490
40943
  connection_id?: string;
40491
40944
  created_at?: string;
40492
40945
  id?: string;
@@ -44087,6 +44540,18 @@ export declare const updateCartPlanningSettings: import("@tanstack/start-client-
44087
44540
  Args: never;
44088
44541
  Returns: number;
44089
44542
  };
44543
+ calculate_floriday_desired_stock: {
44544
+ Args: {
44545
+ p_connection_id: string;
44546
+ p_product_id: string;
44547
+ };
44548
+ Returns: {
44549
+ desired_availability: boolean;
44550
+ desired_quantity: number;
44551
+ erp_available: number;
44552
+ stock_mode: string;
44553
+ }[];
44554
+ };
44090
44555
  calculate_layer_stock: {
44091
44556
  Args: {
44092
44557
  p_product_id: string;
@@ -44181,6 +44646,7 @@ export declare const updateCartPlanningSettings: import("@tanstack/start-client-
44181
44646
  attempts: number;
44182
44647
  connection_id: string;
44183
44648
  created_at: string;
44649
+ dead_lettered_at: string | null;
44184
44650
  desired_available: boolean | null;
44185
44651
  gateway_attempt_id: string | null;
44186
44652
  id: string;
@@ -44189,9 +44655,13 @@ export declare const updateCartPlanningSettings: import("@tanstack/start-client-
44189
44655
  locked_by: string | null;
44190
44656
  next_attempt_at: string;
44191
44657
  number_of_pieces: number;
44658
+ product_id: string | null;
44192
44659
  sent_at: string | null;
44193
44660
  status: string;
44661
+ stock_mode: string | null;
44194
44662
  superseded_by: string | null;
44663
+ target_week: number | null;
44664
+ target_year: number | null;
44195
44665
  trade_item_id: string;
44196
44666
  updated_at: string;
44197
44667
  user_id: string;
@@ -44672,6 +45142,24 @@ export declare const updateCartPlanningSettings: import("@tanstack/start-client-
44672
45142
  };
44673
45143
  Returns: string;
44674
45144
  };
45145
+ floriday_capture_stock_snapshot: {
45146
+ Args: never;
45147
+ Returns: number;
45148
+ };
45149
+ floriday_cleanup_stock_queue_v2: {
45150
+ Args: never;
45151
+ Returns: undefined;
45152
+ };
45153
+ floriday_compact_stock_snapshots: {
45154
+ Args: never;
45155
+ Returns: undefined;
45156
+ };
45157
+ floriday_default_owner: {
45158
+ Args: {
45159
+ p_connection_id: string;
45160
+ };
45161
+ Returns: string;
45162
+ };
44675
45163
  floriday_effective_price: {
44676
45164
  Args: {
44677
45165
  _buyer_id: string;
@@ -44689,6 +45177,22 @@ export declare const updateCartPlanningSettings: import("@tanstack/start-client-
44689
45177
  source_id: string;
44690
45178
  }[];
44691
45179
  };
45180
+ floriday_fill_publish_horizon: {
45181
+ Args: never;
45182
+ Returns: number;
45183
+ };
45184
+ floriday_publish_horizon_weeks: {
45185
+ Args: never;
45186
+ Returns: number;
45187
+ };
45188
+ floriday_recompute_inventory: {
45189
+ Args: {
45190
+ p_connection_id: string;
45191
+ p_force?: boolean;
45192
+ p_product_id: string;
45193
+ };
45194
+ Returns: undefined;
45195
+ };
44692
45196
  format_cart_number: {
44693
45197
  Args: {
44694
45198
  p_pick_date: string;
@@ -53345,6 +53849,7 @@ export declare const upsertPickTime: import("@tanstack/start-client-core").Optio
53345
53849
  attempts: number;
53346
53850
  connection_id: string;
53347
53851
  created_at: string;
53852
+ dead_lettered_at: string | null;
53348
53853
  desired_available: boolean | null;
53349
53854
  gateway_attempt_id: string | null;
53350
53855
  id: string;
@@ -53353,9 +53858,13 @@ export declare const upsertPickTime: import("@tanstack/start-client-core").Optio
53353
53858
  locked_by: string | null;
53354
53859
  next_attempt_at: string;
53355
53860
  number_of_pieces: number;
53861
+ product_id: string | null;
53356
53862
  sent_at: string | null;
53357
53863
  status: string;
53864
+ stock_mode: string | null;
53358
53865
  superseded_by: string | null;
53866
+ target_week: number | null;
53867
+ target_year: number | null;
53359
53868
  trade_item_id: string;
53360
53869
  updated_at: string;
53361
53870
  user_id: string;
@@ -53364,6 +53873,7 @@ export declare const upsertPickTime: import("@tanstack/start-client-core").Optio
53364
53873
  attempts?: number;
53365
53874
  connection_id: string;
53366
53875
  created_at?: string;
53876
+ dead_lettered_at?: string | null;
53367
53877
  desired_available?: boolean | null;
53368
53878
  gateway_attempt_id?: string | null;
53369
53879
  id?: string;
@@ -53372,9 +53882,13 @@ export declare const upsertPickTime: import("@tanstack/start-client-core").Optio
53372
53882
  locked_by?: string | null;
53373
53883
  next_attempt_at?: string;
53374
53884
  number_of_pieces?: number;
53885
+ product_id?: string | null;
53375
53886
  sent_at?: string | null;
53376
53887
  status?: string;
53888
+ stock_mode?: string | null;
53377
53889
  superseded_by?: string | null;
53890
+ target_week?: number | null;
53891
+ target_year?: number | null;
53378
53892
  trade_item_id: string;
53379
53893
  updated_at?: string;
53380
53894
  user_id: string;
@@ -53383,6 +53897,7 @@ export declare const upsertPickTime: import("@tanstack/start-client-core").Optio
53383
53897
  attempts?: number;
53384
53898
  connection_id?: string;
53385
53899
  created_at?: string;
53900
+ dead_lettered_at?: string | null;
53386
53901
  desired_available?: boolean | null;
53387
53902
  gateway_attempt_id?: string | null;
53388
53903
  id?: string;
@@ -53391,9 +53906,13 @@ export declare const upsertPickTime: import("@tanstack/start-client-core").Optio
53391
53906
  locked_by?: string | null;
53392
53907
  next_attempt_at?: string;
53393
53908
  number_of_pieces?: number;
53909
+ product_id?: string | null;
53394
53910
  sent_at?: string | null;
53395
53911
  status?: string;
53912
+ stock_mode?: string | null;
53396
53913
  superseded_by?: string | null;
53914
+ target_week?: number | null;
53915
+ target_year?: number | null;
53397
53916
  trade_item_id?: string;
53398
53917
  updated_at?: string;
53399
53918
  user_id?: string;
@@ -53802,6 +54321,87 @@ export declare const upsertPickTime: import("@tanstack/start-client-core").Optio
53802
54321
  referencedColumns: ["id"];
53803
54322
  }];
53804
54323
  };
54324
+ floriday_inventory_settings: {
54325
+ Row: {
54326
+ buffer_quantity: number;
54327
+ connection_id: string;
54328
+ created_at: string;
54329
+ desired_availability: boolean;
54330
+ desired_quantity: number;
54331
+ fixed_quantity: number | null;
54332
+ floriday_trade_item_id: string | null;
54333
+ id: string;
54334
+ last_confirmed_at: string | null;
54335
+ last_enqueued_at: string | null;
54336
+ last_published_at: string | null;
54337
+ last_sync_error: string | null;
54338
+ manual_quantity: number | null;
54339
+ maximum_quantity: number | null;
54340
+ product_id: string;
54341
+ quantity_control: string;
54342
+ remote_available: boolean | null;
54343
+ remote_checked_at: string | null;
54344
+ remote_quantity: number | null;
54345
+ stock_mode: string;
54346
+ sync_status: string;
54347
+ updated_at: string;
54348
+ updated_by: string | null;
54349
+ user_id: string;
54350
+ };
54351
+ Insert: {
54352
+ buffer_quantity?: number;
54353
+ connection_id: string;
54354
+ created_at?: string;
54355
+ desired_availability?: boolean;
54356
+ desired_quantity?: number;
54357
+ fixed_quantity?: number | null;
54358
+ floriday_trade_item_id?: string | null;
54359
+ id?: string;
54360
+ last_confirmed_at?: string | null;
54361
+ last_enqueued_at?: string | null;
54362
+ last_published_at?: string | null;
54363
+ last_sync_error?: string | null;
54364
+ manual_quantity?: number | null;
54365
+ maximum_quantity?: number | null;
54366
+ product_id: string;
54367
+ quantity_control?: string;
54368
+ remote_available?: boolean | null;
54369
+ remote_checked_at?: string | null;
54370
+ remote_quantity?: number | null;
54371
+ stock_mode?: string;
54372
+ sync_status?: string;
54373
+ updated_at?: string;
54374
+ updated_by?: string | null;
54375
+ user_id: string;
54376
+ };
54377
+ Update: {
54378
+ buffer_quantity?: number;
54379
+ connection_id?: string;
54380
+ created_at?: string;
54381
+ desired_availability?: boolean;
54382
+ desired_quantity?: number;
54383
+ fixed_quantity?: number | null;
54384
+ floriday_trade_item_id?: string | null;
54385
+ id?: string;
54386
+ last_confirmed_at?: string | null;
54387
+ last_enqueued_at?: string | null;
54388
+ last_published_at?: string | null;
54389
+ last_sync_error?: string | null;
54390
+ manual_quantity?: number | null;
54391
+ maximum_quantity?: number | null;
54392
+ product_id?: string;
54393
+ quantity_control?: string;
54394
+ remote_available?: boolean | null;
54395
+ remote_checked_at?: string | null;
54396
+ remote_quantity?: number | null;
54397
+ stock_mode?: string;
54398
+ sync_status?: string;
54399
+ updated_at?: string;
54400
+ updated_by?: string | null;
54401
+ user_id?: string;
54402
+ };
54403
+ Relationships: [];
54404
+ };
53805
54405
  floriday_invoices_cache: {
53806
54406
  Row: {
53807
54407
  buyer_organization_id: string | null;
@@ -54090,6 +54690,39 @@ export declare const upsertPickTime: import("@tanstack/start-client-core").Optio
54090
54690
  };
54091
54691
  Relationships: [];
54092
54692
  };
54693
+ floriday_sales_order_ingest: {
54694
+ Row: {
54695
+ connection_id: string;
54696
+ created_at: string;
54697
+ id: string;
54698
+ impact: import("../integrations/supabase/types").Json;
54699
+ order_status: string | null;
54700
+ order_version: number;
54701
+ processed_at: string;
54702
+ sales_order_id: string;
54703
+ };
54704
+ Insert: {
54705
+ connection_id: string;
54706
+ created_at?: string;
54707
+ id?: string;
54708
+ impact?: import("../integrations/supabase/types").Json;
54709
+ order_status?: string | null;
54710
+ order_version?: number;
54711
+ processed_at?: string;
54712
+ sales_order_id: string;
54713
+ };
54714
+ Update: {
54715
+ connection_id?: string;
54716
+ created_at?: string;
54717
+ id?: string;
54718
+ impact?: import("../integrations/supabase/types").Json;
54719
+ order_status?: string | null;
54720
+ order_version?: number;
54721
+ processed_at?: string;
54722
+ sales_order_id?: string;
54723
+ };
54724
+ Relationships: [];
54725
+ };
54093
54726
  floriday_sales_strategies_cache: {
54094
54727
  Row: {
54095
54728
  connection_id: string;
@@ -54189,6 +54822,39 @@ export declare const upsertPickTime: import("@tanstack/start-client-core").Optio
54189
54822
  };
54190
54823
  Relationships: [];
54191
54824
  };
54825
+ floriday_sync_cursors: {
54826
+ Row: {
54827
+ connection_id: string;
54828
+ created_at: string;
54829
+ id: string;
54830
+ last_error: string | null;
54831
+ last_sync_at: string | null;
54832
+ resource_type: string;
54833
+ sequence_number: number;
54834
+ updated_at: string;
54835
+ };
54836
+ Insert: {
54837
+ connection_id: string;
54838
+ created_at?: string;
54839
+ id?: string;
54840
+ last_error?: string | null;
54841
+ last_sync_at?: string | null;
54842
+ resource_type: string;
54843
+ sequence_number?: number;
54844
+ updated_at?: string;
54845
+ };
54846
+ Update: {
54847
+ connection_id?: string;
54848
+ created_at?: string;
54849
+ id?: string;
54850
+ last_error?: string | null;
54851
+ last_sync_at?: string | null;
54852
+ resource_type?: string;
54853
+ sequence_number?: number;
54854
+ updated_at?: string;
54855
+ };
54856
+ Relationships: [];
54857
+ };
54192
54858
  floriday_sync_state: {
54193
54859
  Row: {
54194
54860
  connection_id: string;
@@ -54879,6 +55545,42 @@ export declare const upsertPickTime: import("@tanstack/start-client-core").Optio
54879
55545
  };
54880
55546
  Relationships: [];
54881
55547
  };
55548
+ inventory_stock_snapshots: {
55549
+ Row: {
55550
+ connection_id: string;
55551
+ created_at: string;
55552
+ erp_available_quantity: number;
55553
+ floriday_desired_quantity: number;
55554
+ floriday_remote_quantity: number | null;
55555
+ granularity: string;
55556
+ id: string;
55557
+ snapshot_at: string;
55558
+ user_id: string | null;
55559
+ };
55560
+ Insert: {
55561
+ connection_id: string;
55562
+ created_at?: string;
55563
+ erp_available_quantity?: number;
55564
+ floriday_desired_quantity?: number;
55565
+ floriday_remote_quantity?: number | null;
55566
+ granularity?: string;
55567
+ id?: string;
55568
+ snapshot_at?: string;
55569
+ user_id?: string | null;
55570
+ };
55571
+ Update: {
55572
+ connection_id?: string;
55573
+ created_at?: string;
55574
+ erp_available_quantity?: number;
55575
+ floriday_desired_quantity?: number;
55576
+ floriday_remote_quantity?: number | null;
55577
+ granularity?: string;
55578
+ id?: string;
55579
+ snapshot_at?: string;
55580
+ user_id?: string | null;
55581
+ };
55582
+ Relationships: [];
55583
+ };
54882
55584
  invoice_items: {
54883
55585
  Row: {
54884
55586
  created_at: string;
@@ -64073,6 +64775,7 @@ export declare const upsertPickTime: import("@tanstack/start-client-core").Optio
64073
64775
  };
64074
64776
  trade_item_stock: {
64075
64777
  Row: {
64778
+ change_source: string;
64076
64779
  connection_id: string;
64077
64780
  created_at: string;
64078
64781
  id: string;
@@ -64086,6 +64789,7 @@ export declare const upsertPickTime: import("@tanstack/start-client-core").Optio
64086
64789
  user_id: string;
64087
64790
  };
64088
64791
  Insert: {
64792
+ change_source?: string;
64089
64793
  connection_id: string;
64090
64794
  created_at?: string;
64091
64795
  id?: string;
@@ -64099,6 +64803,7 @@ export declare const upsertPickTime: import("@tanstack/start-client-core").Optio
64099
64803
  user_id: string;
64100
64804
  };
64101
64805
  Update: {
64806
+ change_source?: string;
64102
64807
  connection_id?: string;
64103
64808
  created_at?: string;
64104
64809
  id?: string;
@@ -67699,6 +68404,18 @@ export declare const upsertPickTime: import("@tanstack/start-client-core").Optio
67699
68404
  Args: never;
67700
68405
  Returns: number;
67701
68406
  };
68407
+ calculate_floriday_desired_stock: {
68408
+ Args: {
68409
+ p_connection_id: string;
68410
+ p_product_id: string;
68411
+ };
68412
+ Returns: {
68413
+ desired_availability: boolean;
68414
+ desired_quantity: number;
68415
+ erp_available: number;
68416
+ stock_mode: string;
68417
+ }[];
68418
+ };
67702
68419
  calculate_layer_stock: {
67703
68420
  Args: {
67704
68421
  p_product_id: string;
@@ -67793,6 +68510,7 @@ export declare const upsertPickTime: import("@tanstack/start-client-core").Optio
67793
68510
  attempts: number;
67794
68511
  connection_id: string;
67795
68512
  created_at: string;
68513
+ dead_lettered_at: string | null;
67796
68514
  desired_available: boolean | null;
67797
68515
  gateway_attempt_id: string | null;
67798
68516
  id: string;
@@ -67801,9 +68519,13 @@ export declare const upsertPickTime: import("@tanstack/start-client-core").Optio
67801
68519
  locked_by: string | null;
67802
68520
  next_attempt_at: string;
67803
68521
  number_of_pieces: number;
68522
+ product_id: string | null;
67804
68523
  sent_at: string | null;
67805
68524
  status: string;
68525
+ stock_mode: string | null;
67806
68526
  superseded_by: string | null;
68527
+ target_week: number | null;
68528
+ target_year: number | null;
67807
68529
  trade_item_id: string;
67808
68530
  updated_at: string;
67809
68531
  user_id: string;
@@ -68284,6 +69006,24 @@ export declare const upsertPickTime: import("@tanstack/start-client-core").Optio
68284
69006
  };
68285
69007
  Returns: string;
68286
69008
  };
69009
+ floriday_capture_stock_snapshot: {
69010
+ Args: never;
69011
+ Returns: number;
69012
+ };
69013
+ floriday_cleanup_stock_queue_v2: {
69014
+ Args: never;
69015
+ Returns: undefined;
69016
+ };
69017
+ floriday_compact_stock_snapshots: {
69018
+ Args: never;
69019
+ Returns: undefined;
69020
+ };
69021
+ floriday_default_owner: {
69022
+ Args: {
69023
+ p_connection_id: string;
69024
+ };
69025
+ Returns: string;
69026
+ };
68287
69027
  floriday_effective_price: {
68288
69028
  Args: {
68289
69029
  _buyer_id: string;
@@ -68301,6 +69041,22 @@ export declare const upsertPickTime: import("@tanstack/start-client-core").Optio
68301
69041
  source_id: string;
68302
69042
  }[];
68303
69043
  };
69044
+ floriday_fill_publish_horizon: {
69045
+ Args: never;
69046
+ Returns: number;
69047
+ };
69048
+ floriday_publish_horizon_weeks: {
69049
+ Args: never;
69050
+ Returns: number;
69051
+ };
69052
+ floriday_recompute_inventory: {
69053
+ Args: {
69054
+ p_connection_id: string;
69055
+ p_force?: boolean;
69056
+ p_product_id: string;
69057
+ };
69058
+ Returns: undefined;
69059
+ };
68304
69060
  format_cart_number: {
68305
69061
  Args: {
68306
69062
  p_pick_date: string;
@@ -76939,6 +77695,7 @@ export declare const deletePickTime: import("@tanstack/start-client-core").Optio
76939
77695
  attempts: number;
76940
77696
  connection_id: string;
76941
77697
  created_at: string;
77698
+ dead_lettered_at: string | null;
76942
77699
  desired_available: boolean | null;
76943
77700
  gateway_attempt_id: string | null;
76944
77701
  id: string;
@@ -76947,9 +77704,13 @@ export declare const deletePickTime: import("@tanstack/start-client-core").Optio
76947
77704
  locked_by: string | null;
76948
77705
  next_attempt_at: string;
76949
77706
  number_of_pieces: number;
77707
+ product_id: string | null;
76950
77708
  sent_at: string | null;
76951
77709
  status: string;
77710
+ stock_mode: string | null;
76952
77711
  superseded_by: string | null;
77712
+ target_week: number | null;
77713
+ target_year: number | null;
76953
77714
  trade_item_id: string;
76954
77715
  updated_at: string;
76955
77716
  user_id: string;
@@ -76958,6 +77719,7 @@ export declare const deletePickTime: import("@tanstack/start-client-core").Optio
76958
77719
  attempts?: number;
76959
77720
  connection_id: string;
76960
77721
  created_at?: string;
77722
+ dead_lettered_at?: string | null;
76961
77723
  desired_available?: boolean | null;
76962
77724
  gateway_attempt_id?: string | null;
76963
77725
  id?: string;
@@ -76966,9 +77728,13 @@ export declare const deletePickTime: import("@tanstack/start-client-core").Optio
76966
77728
  locked_by?: string | null;
76967
77729
  next_attempt_at?: string;
76968
77730
  number_of_pieces?: number;
77731
+ product_id?: string | null;
76969
77732
  sent_at?: string | null;
76970
77733
  status?: string;
77734
+ stock_mode?: string | null;
76971
77735
  superseded_by?: string | null;
77736
+ target_week?: number | null;
77737
+ target_year?: number | null;
76972
77738
  trade_item_id: string;
76973
77739
  updated_at?: string;
76974
77740
  user_id: string;
@@ -76977,6 +77743,7 @@ export declare const deletePickTime: import("@tanstack/start-client-core").Optio
76977
77743
  attempts?: number;
76978
77744
  connection_id?: string;
76979
77745
  created_at?: string;
77746
+ dead_lettered_at?: string | null;
76980
77747
  desired_available?: boolean | null;
76981
77748
  gateway_attempt_id?: string | null;
76982
77749
  id?: string;
@@ -76985,9 +77752,13 @@ export declare const deletePickTime: import("@tanstack/start-client-core").Optio
76985
77752
  locked_by?: string | null;
76986
77753
  next_attempt_at?: string;
76987
77754
  number_of_pieces?: number;
77755
+ product_id?: string | null;
76988
77756
  sent_at?: string | null;
76989
77757
  status?: string;
77758
+ stock_mode?: string | null;
76990
77759
  superseded_by?: string | null;
77760
+ target_week?: number | null;
77761
+ target_year?: number | null;
76991
77762
  trade_item_id?: string;
76992
77763
  updated_at?: string;
76993
77764
  user_id?: string;
@@ -77396,6 +78167,87 @@ export declare const deletePickTime: import("@tanstack/start-client-core").Optio
77396
78167
  referencedColumns: ["id"];
77397
78168
  }];
77398
78169
  };
78170
+ floriday_inventory_settings: {
78171
+ Row: {
78172
+ buffer_quantity: number;
78173
+ connection_id: string;
78174
+ created_at: string;
78175
+ desired_availability: boolean;
78176
+ desired_quantity: number;
78177
+ fixed_quantity: number | null;
78178
+ floriday_trade_item_id: string | null;
78179
+ id: string;
78180
+ last_confirmed_at: string | null;
78181
+ last_enqueued_at: string | null;
78182
+ last_published_at: string | null;
78183
+ last_sync_error: string | null;
78184
+ manual_quantity: number | null;
78185
+ maximum_quantity: number | null;
78186
+ product_id: string;
78187
+ quantity_control: string;
78188
+ remote_available: boolean | null;
78189
+ remote_checked_at: string | null;
78190
+ remote_quantity: number | null;
78191
+ stock_mode: string;
78192
+ sync_status: string;
78193
+ updated_at: string;
78194
+ updated_by: string | null;
78195
+ user_id: string;
78196
+ };
78197
+ Insert: {
78198
+ buffer_quantity?: number;
78199
+ connection_id: string;
78200
+ created_at?: string;
78201
+ desired_availability?: boolean;
78202
+ desired_quantity?: number;
78203
+ fixed_quantity?: number | null;
78204
+ floriday_trade_item_id?: string | null;
78205
+ id?: string;
78206
+ last_confirmed_at?: string | null;
78207
+ last_enqueued_at?: string | null;
78208
+ last_published_at?: string | null;
78209
+ last_sync_error?: string | null;
78210
+ manual_quantity?: number | null;
78211
+ maximum_quantity?: number | null;
78212
+ product_id: string;
78213
+ quantity_control?: string;
78214
+ remote_available?: boolean | null;
78215
+ remote_checked_at?: string | null;
78216
+ remote_quantity?: number | null;
78217
+ stock_mode?: string;
78218
+ sync_status?: string;
78219
+ updated_at?: string;
78220
+ updated_by?: string | null;
78221
+ user_id: string;
78222
+ };
78223
+ Update: {
78224
+ buffer_quantity?: number;
78225
+ connection_id?: string;
78226
+ created_at?: string;
78227
+ desired_availability?: boolean;
78228
+ desired_quantity?: number;
78229
+ fixed_quantity?: number | null;
78230
+ floriday_trade_item_id?: string | null;
78231
+ id?: string;
78232
+ last_confirmed_at?: string | null;
78233
+ last_enqueued_at?: string | null;
78234
+ last_published_at?: string | null;
78235
+ last_sync_error?: string | null;
78236
+ manual_quantity?: number | null;
78237
+ maximum_quantity?: number | null;
78238
+ product_id?: string;
78239
+ quantity_control?: string;
78240
+ remote_available?: boolean | null;
78241
+ remote_checked_at?: string | null;
78242
+ remote_quantity?: number | null;
78243
+ stock_mode?: string;
78244
+ sync_status?: string;
78245
+ updated_at?: string;
78246
+ updated_by?: string | null;
78247
+ user_id?: string;
78248
+ };
78249
+ Relationships: [];
78250
+ };
77399
78251
  floriday_invoices_cache: {
77400
78252
  Row: {
77401
78253
  buyer_organization_id: string | null;
@@ -77684,6 +78536,39 @@ export declare const deletePickTime: import("@tanstack/start-client-core").Optio
77684
78536
  };
77685
78537
  Relationships: [];
77686
78538
  };
78539
+ floriday_sales_order_ingest: {
78540
+ Row: {
78541
+ connection_id: string;
78542
+ created_at: string;
78543
+ id: string;
78544
+ impact: import("../integrations/supabase/types").Json;
78545
+ order_status: string | null;
78546
+ order_version: number;
78547
+ processed_at: string;
78548
+ sales_order_id: string;
78549
+ };
78550
+ Insert: {
78551
+ connection_id: string;
78552
+ created_at?: string;
78553
+ id?: string;
78554
+ impact?: import("../integrations/supabase/types").Json;
78555
+ order_status?: string | null;
78556
+ order_version?: number;
78557
+ processed_at?: string;
78558
+ sales_order_id: string;
78559
+ };
78560
+ Update: {
78561
+ connection_id?: string;
78562
+ created_at?: string;
78563
+ id?: string;
78564
+ impact?: import("../integrations/supabase/types").Json;
78565
+ order_status?: string | null;
78566
+ order_version?: number;
78567
+ processed_at?: string;
78568
+ sales_order_id?: string;
78569
+ };
78570
+ Relationships: [];
78571
+ };
77687
78572
  floriday_sales_strategies_cache: {
77688
78573
  Row: {
77689
78574
  connection_id: string;
@@ -77783,6 +78668,39 @@ export declare const deletePickTime: import("@tanstack/start-client-core").Optio
77783
78668
  };
77784
78669
  Relationships: [];
77785
78670
  };
78671
+ floriday_sync_cursors: {
78672
+ Row: {
78673
+ connection_id: string;
78674
+ created_at: string;
78675
+ id: string;
78676
+ last_error: string | null;
78677
+ last_sync_at: string | null;
78678
+ resource_type: string;
78679
+ sequence_number: number;
78680
+ updated_at: string;
78681
+ };
78682
+ Insert: {
78683
+ connection_id: string;
78684
+ created_at?: string;
78685
+ id?: string;
78686
+ last_error?: string | null;
78687
+ last_sync_at?: string | null;
78688
+ resource_type: string;
78689
+ sequence_number?: number;
78690
+ updated_at?: string;
78691
+ };
78692
+ Update: {
78693
+ connection_id?: string;
78694
+ created_at?: string;
78695
+ id?: string;
78696
+ last_error?: string | null;
78697
+ last_sync_at?: string | null;
78698
+ resource_type?: string;
78699
+ sequence_number?: number;
78700
+ updated_at?: string;
78701
+ };
78702
+ Relationships: [];
78703
+ };
77786
78704
  floriday_sync_state: {
77787
78705
  Row: {
77788
78706
  connection_id: string;
@@ -78473,6 +79391,42 @@ export declare const deletePickTime: import("@tanstack/start-client-core").Optio
78473
79391
  };
78474
79392
  Relationships: [];
78475
79393
  };
79394
+ inventory_stock_snapshots: {
79395
+ Row: {
79396
+ connection_id: string;
79397
+ created_at: string;
79398
+ erp_available_quantity: number;
79399
+ floriday_desired_quantity: number;
79400
+ floriday_remote_quantity: number | null;
79401
+ granularity: string;
79402
+ id: string;
79403
+ snapshot_at: string;
79404
+ user_id: string | null;
79405
+ };
79406
+ Insert: {
79407
+ connection_id: string;
79408
+ created_at?: string;
79409
+ erp_available_quantity?: number;
79410
+ floriday_desired_quantity?: number;
79411
+ floriday_remote_quantity?: number | null;
79412
+ granularity?: string;
79413
+ id?: string;
79414
+ snapshot_at?: string;
79415
+ user_id?: string | null;
79416
+ };
79417
+ Update: {
79418
+ connection_id?: string;
79419
+ created_at?: string;
79420
+ erp_available_quantity?: number;
79421
+ floriday_desired_quantity?: number;
79422
+ floriday_remote_quantity?: number | null;
79423
+ granularity?: string;
79424
+ id?: string;
79425
+ snapshot_at?: string;
79426
+ user_id?: string | null;
79427
+ };
79428
+ Relationships: [];
79429
+ };
78476
79430
  invoice_items: {
78477
79431
  Row: {
78478
79432
  created_at: string;
@@ -87667,6 +88621,7 @@ export declare const deletePickTime: import("@tanstack/start-client-core").Optio
87667
88621
  };
87668
88622
  trade_item_stock: {
87669
88623
  Row: {
88624
+ change_source: string;
87670
88625
  connection_id: string;
87671
88626
  created_at: string;
87672
88627
  id: string;
@@ -87680,6 +88635,7 @@ export declare const deletePickTime: import("@tanstack/start-client-core").Optio
87680
88635
  user_id: string;
87681
88636
  };
87682
88637
  Insert: {
88638
+ change_source?: string;
87683
88639
  connection_id: string;
87684
88640
  created_at?: string;
87685
88641
  id?: string;
@@ -87693,6 +88649,7 @@ export declare const deletePickTime: import("@tanstack/start-client-core").Optio
87693
88649
  user_id: string;
87694
88650
  };
87695
88651
  Update: {
88652
+ change_source?: string;
87696
88653
  connection_id?: string;
87697
88654
  created_at?: string;
87698
88655
  id?: string;
@@ -91293,6 +92250,18 @@ export declare const deletePickTime: import("@tanstack/start-client-core").Optio
91293
92250
  Args: never;
91294
92251
  Returns: number;
91295
92252
  };
92253
+ calculate_floriday_desired_stock: {
92254
+ Args: {
92255
+ p_connection_id: string;
92256
+ p_product_id: string;
92257
+ };
92258
+ Returns: {
92259
+ desired_availability: boolean;
92260
+ desired_quantity: number;
92261
+ erp_available: number;
92262
+ stock_mode: string;
92263
+ }[];
92264
+ };
91296
92265
  calculate_layer_stock: {
91297
92266
  Args: {
91298
92267
  p_product_id: string;
@@ -91387,6 +92356,7 @@ export declare const deletePickTime: import("@tanstack/start-client-core").Optio
91387
92356
  attempts: number;
91388
92357
  connection_id: string;
91389
92358
  created_at: string;
92359
+ dead_lettered_at: string | null;
91390
92360
  desired_available: boolean | null;
91391
92361
  gateway_attempt_id: string | null;
91392
92362
  id: string;
@@ -91395,9 +92365,13 @@ export declare const deletePickTime: import("@tanstack/start-client-core").Optio
91395
92365
  locked_by: string | null;
91396
92366
  next_attempt_at: string;
91397
92367
  number_of_pieces: number;
92368
+ product_id: string | null;
91398
92369
  sent_at: string | null;
91399
92370
  status: string;
92371
+ stock_mode: string | null;
91400
92372
  superseded_by: string | null;
92373
+ target_week: number | null;
92374
+ target_year: number | null;
91401
92375
  trade_item_id: string;
91402
92376
  updated_at: string;
91403
92377
  user_id: string;
@@ -91878,6 +92852,24 @@ export declare const deletePickTime: import("@tanstack/start-client-core").Optio
91878
92852
  };
91879
92853
  Returns: string;
91880
92854
  };
92855
+ floriday_capture_stock_snapshot: {
92856
+ Args: never;
92857
+ Returns: number;
92858
+ };
92859
+ floriday_cleanup_stock_queue_v2: {
92860
+ Args: never;
92861
+ Returns: undefined;
92862
+ };
92863
+ floriday_compact_stock_snapshots: {
92864
+ Args: never;
92865
+ Returns: undefined;
92866
+ };
92867
+ floriday_default_owner: {
92868
+ Args: {
92869
+ p_connection_id: string;
92870
+ };
92871
+ Returns: string;
92872
+ };
91881
92873
  floriday_effective_price: {
91882
92874
  Args: {
91883
92875
  _buyer_id: string;
@@ -91895,6 +92887,22 @@ export declare const deletePickTime: import("@tanstack/start-client-core").Optio
91895
92887
  source_id: string;
91896
92888
  }[];
91897
92889
  };
92890
+ floriday_fill_publish_horizon: {
92891
+ Args: never;
92892
+ Returns: number;
92893
+ };
92894
+ floriday_publish_horizon_weeks: {
92895
+ Args: never;
92896
+ Returns: number;
92897
+ };
92898
+ floriday_recompute_inventory: {
92899
+ Args: {
92900
+ p_connection_id: string;
92901
+ p_force?: boolean;
92902
+ p_product_id: string;
92903
+ };
92904
+ Returns: undefined;
92905
+ };
91898
92906
  format_cart_number: {
91899
92907
  Args: {
91900
92908
  p_pick_date: string;
@@ -100542,6 +101550,7 @@ export declare const listUsedCratePackages: import("@tanstack/start-client-core"
100542
101550
  attempts: number;
100543
101551
  connection_id: string;
100544
101552
  created_at: string;
101553
+ dead_lettered_at: string | null;
100545
101554
  desired_available: boolean | null;
100546
101555
  gateway_attempt_id: string | null;
100547
101556
  id: string;
@@ -100550,9 +101559,13 @@ export declare const listUsedCratePackages: import("@tanstack/start-client-core"
100550
101559
  locked_by: string | null;
100551
101560
  next_attempt_at: string;
100552
101561
  number_of_pieces: number;
101562
+ product_id: string | null;
100553
101563
  sent_at: string | null;
100554
101564
  status: string;
101565
+ stock_mode: string | null;
100555
101566
  superseded_by: string | null;
101567
+ target_week: number | null;
101568
+ target_year: number | null;
100556
101569
  trade_item_id: string;
100557
101570
  updated_at: string;
100558
101571
  user_id: string;
@@ -100561,6 +101574,7 @@ export declare const listUsedCratePackages: import("@tanstack/start-client-core"
100561
101574
  attempts?: number;
100562
101575
  connection_id: string;
100563
101576
  created_at?: string;
101577
+ dead_lettered_at?: string | null;
100564
101578
  desired_available?: boolean | null;
100565
101579
  gateway_attempt_id?: string | null;
100566
101580
  id?: string;
@@ -100569,9 +101583,13 @@ export declare const listUsedCratePackages: import("@tanstack/start-client-core"
100569
101583
  locked_by?: string | null;
100570
101584
  next_attempt_at?: string;
100571
101585
  number_of_pieces?: number;
101586
+ product_id?: string | null;
100572
101587
  sent_at?: string | null;
100573
101588
  status?: string;
101589
+ stock_mode?: string | null;
100574
101590
  superseded_by?: string | null;
101591
+ target_week?: number | null;
101592
+ target_year?: number | null;
100575
101593
  trade_item_id: string;
100576
101594
  updated_at?: string;
100577
101595
  user_id: string;
@@ -100580,6 +101598,7 @@ export declare const listUsedCratePackages: import("@tanstack/start-client-core"
100580
101598
  attempts?: number;
100581
101599
  connection_id?: string;
100582
101600
  created_at?: string;
101601
+ dead_lettered_at?: string | null;
100583
101602
  desired_available?: boolean | null;
100584
101603
  gateway_attempt_id?: string | null;
100585
101604
  id?: string;
@@ -100588,9 +101607,13 @@ export declare const listUsedCratePackages: import("@tanstack/start-client-core"
100588
101607
  locked_by?: string | null;
100589
101608
  next_attempt_at?: string;
100590
101609
  number_of_pieces?: number;
101610
+ product_id?: string | null;
100591
101611
  sent_at?: string | null;
100592
101612
  status?: string;
101613
+ stock_mode?: string | null;
100593
101614
  superseded_by?: string | null;
101615
+ target_week?: number | null;
101616
+ target_year?: number | null;
100594
101617
  trade_item_id?: string;
100595
101618
  updated_at?: string;
100596
101619
  user_id?: string;
@@ -100999,6 +102022,87 @@ export declare const listUsedCratePackages: import("@tanstack/start-client-core"
100999
102022
  referencedColumns: ["id"];
101000
102023
  }];
101001
102024
  };
102025
+ floriday_inventory_settings: {
102026
+ Row: {
102027
+ buffer_quantity: number;
102028
+ connection_id: string;
102029
+ created_at: string;
102030
+ desired_availability: boolean;
102031
+ desired_quantity: number;
102032
+ fixed_quantity: number | null;
102033
+ floriday_trade_item_id: string | null;
102034
+ id: string;
102035
+ last_confirmed_at: string | null;
102036
+ last_enqueued_at: string | null;
102037
+ last_published_at: string | null;
102038
+ last_sync_error: string | null;
102039
+ manual_quantity: number | null;
102040
+ maximum_quantity: number | null;
102041
+ product_id: string;
102042
+ quantity_control: string;
102043
+ remote_available: boolean | null;
102044
+ remote_checked_at: string | null;
102045
+ remote_quantity: number | null;
102046
+ stock_mode: string;
102047
+ sync_status: string;
102048
+ updated_at: string;
102049
+ updated_by: string | null;
102050
+ user_id: string;
102051
+ };
102052
+ Insert: {
102053
+ buffer_quantity?: number;
102054
+ connection_id: string;
102055
+ created_at?: string;
102056
+ desired_availability?: boolean;
102057
+ desired_quantity?: number;
102058
+ fixed_quantity?: number | null;
102059
+ floriday_trade_item_id?: string | null;
102060
+ id?: string;
102061
+ last_confirmed_at?: string | null;
102062
+ last_enqueued_at?: string | null;
102063
+ last_published_at?: string | null;
102064
+ last_sync_error?: string | null;
102065
+ manual_quantity?: number | null;
102066
+ maximum_quantity?: number | null;
102067
+ product_id: string;
102068
+ quantity_control?: string;
102069
+ remote_available?: boolean | null;
102070
+ remote_checked_at?: string | null;
102071
+ remote_quantity?: number | null;
102072
+ stock_mode?: string;
102073
+ sync_status?: string;
102074
+ updated_at?: string;
102075
+ updated_by?: string | null;
102076
+ user_id: string;
102077
+ };
102078
+ Update: {
102079
+ buffer_quantity?: number;
102080
+ connection_id?: string;
102081
+ created_at?: string;
102082
+ desired_availability?: boolean;
102083
+ desired_quantity?: number;
102084
+ fixed_quantity?: number | null;
102085
+ floriday_trade_item_id?: string | null;
102086
+ id?: string;
102087
+ last_confirmed_at?: string | null;
102088
+ last_enqueued_at?: string | null;
102089
+ last_published_at?: string | null;
102090
+ last_sync_error?: string | null;
102091
+ manual_quantity?: number | null;
102092
+ maximum_quantity?: number | null;
102093
+ product_id?: string;
102094
+ quantity_control?: string;
102095
+ remote_available?: boolean | null;
102096
+ remote_checked_at?: string | null;
102097
+ remote_quantity?: number | null;
102098
+ stock_mode?: string;
102099
+ sync_status?: string;
102100
+ updated_at?: string;
102101
+ updated_by?: string | null;
102102
+ user_id?: string;
102103
+ };
102104
+ Relationships: [];
102105
+ };
101002
102106
  floriday_invoices_cache: {
101003
102107
  Row: {
101004
102108
  buyer_organization_id: string | null;
@@ -101287,6 +102391,39 @@ export declare const listUsedCratePackages: import("@tanstack/start-client-core"
101287
102391
  };
101288
102392
  Relationships: [];
101289
102393
  };
102394
+ floriday_sales_order_ingest: {
102395
+ Row: {
102396
+ connection_id: string;
102397
+ created_at: string;
102398
+ id: string;
102399
+ impact: import("../integrations/supabase/types").Json;
102400
+ order_status: string | null;
102401
+ order_version: number;
102402
+ processed_at: string;
102403
+ sales_order_id: string;
102404
+ };
102405
+ Insert: {
102406
+ connection_id: string;
102407
+ created_at?: string;
102408
+ id?: string;
102409
+ impact?: import("../integrations/supabase/types").Json;
102410
+ order_status?: string | null;
102411
+ order_version?: number;
102412
+ processed_at?: string;
102413
+ sales_order_id: string;
102414
+ };
102415
+ Update: {
102416
+ connection_id?: string;
102417
+ created_at?: string;
102418
+ id?: string;
102419
+ impact?: import("../integrations/supabase/types").Json;
102420
+ order_status?: string | null;
102421
+ order_version?: number;
102422
+ processed_at?: string;
102423
+ sales_order_id?: string;
102424
+ };
102425
+ Relationships: [];
102426
+ };
101290
102427
  floriday_sales_strategies_cache: {
101291
102428
  Row: {
101292
102429
  connection_id: string;
@@ -101386,6 +102523,39 @@ export declare const listUsedCratePackages: import("@tanstack/start-client-core"
101386
102523
  };
101387
102524
  Relationships: [];
101388
102525
  };
102526
+ floriday_sync_cursors: {
102527
+ Row: {
102528
+ connection_id: string;
102529
+ created_at: string;
102530
+ id: string;
102531
+ last_error: string | null;
102532
+ last_sync_at: string | null;
102533
+ resource_type: string;
102534
+ sequence_number: number;
102535
+ updated_at: string;
102536
+ };
102537
+ Insert: {
102538
+ connection_id: string;
102539
+ created_at?: string;
102540
+ id?: string;
102541
+ last_error?: string | null;
102542
+ last_sync_at?: string | null;
102543
+ resource_type: string;
102544
+ sequence_number?: number;
102545
+ updated_at?: string;
102546
+ };
102547
+ Update: {
102548
+ connection_id?: string;
102549
+ created_at?: string;
102550
+ id?: string;
102551
+ last_error?: string | null;
102552
+ last_sync_at?: string | null;
102553
+ resource_type?: string;
102554
+ sequence_number?: number;
102555
+ updated_at?: string;
102556
+ };
102557
+ Relationships: [];
102558
+ };
101389
102559
  floriday_sync_state: {
101390
102560
  Row: {
101391
102561
  connection_id: string;
@@ -102076,6 +103246,42 @@ export declare const listUsedCratePackages: import("@tanstack/start-client-core"
102076
103246
  };
102077
103247
  Relationships: [];
102078
103248
  };
103249
+ inventory_stock_snapshots: {
103250
+ Row: {
103251
+ connection_id: string;
103252
+ created_at: string;
103253
+ erp_available_quantity: number;
103254
+ floriday_desired_quantity: number;
103255
+ floriday_remote_quantity: number | null;
103256
+ granularity: string;
103257
+ id: string;
103258
+ snapshot_at: string;
103259
+ user_id: string | null;
103260
+ };
103261
+ Insert: {
103262
+ connection_id: string;
103263
+ created_at?: string;
103264
+ erp_available_quantity?: number;
103265
+ floriday_desired_quantity?: number;
103266
+ floriday_remote_quantity?: number | null;
103267
+ granularity?: string;
103268
+ id?: string;
103269
+ snapshot_at?: string;
103270
+ user_id?: string | null;
103271
+ };
103272
+ Update: {
103273
+ connection_id?: string;
103274
+ created_at?: string;
103275
+ erp_available_quantity?: number;
103276
+ floriday_desired_quantity?: number;
103277
+ floriday_remote_quantity?: number | null;
103278
+ granularity?: string;
103279
+ id?: string;
103280
+ snapshot_at?: string;
103281
+ user_id?: string | null;
103282
+ };
103283
+ Relationships: [];
103284
+ };
102079
103285
  invoice_items: {
102080
103286
  Row: {
102081
103287
  created_at: string;
@@ -111270,6 +112476,7 @@ export declare const listUsedCratePackages: import("@tanstack/start-client-core"
111270
112476
  };
111271
112477
  trade_item_stock: {
111272
112478
  Row: {
112479
+ change_source: string;
111273
112480
  connection_id: string;
111274
112481
  created_at: string;
111275
112482
  id: string;
@@ -111283,6 +112490,7 @@ export declare const listUsedCratePackages: import("@tanstack/start-client-core"
111283
112490
  user_id: string;
111284
112491
  };
111285
112492
  Insert: {
112493
+ change_source?: string;
111286
112494
  connection_id: string;
111287
112495
  created_at?: string;
111288
112496
  id?: string;
@@ -111296,6 +112504,7 @@ export declare const listUsedCratePackages: import("@tanstack/start-client-core"
111296
112504
  user_id: string;
111297
112505
  };
111298
112506
  Update: {
112507
+ change_source?: string;
111299
112508
  connection_id?: string;
111300
112509
  created_at?: string;
111301
112510
  id?: string;
@@ -114896,6 +116105,18 @@ export declare const listUsedCratePackages: import("@tanstack/start-client-core"
114896
116105
  Args: never;
114897
116106
  Returns: number;
114898
116107
  };
116108
+ calculate_floriday_desired_stock: {
116109
+ Args: {
116110
+ p_connection_id: string;
116111
+ p_product_id: string;
116112
+ };
116113
+ Returns: {
116114
+ desired_availability: boolean;
116115
+ desired_quantity: number;
116116
+ erp_available: number;
116117
+ stock_mode: string;
116118
+ }[];
116119
+ };
114899
116120
  calculate_layer_stock: {
114900
116121
  Args: {
114901
116122
  p_product_id: string;
@@ -114990,6 +116211,7 @@ export declare const listUsedCratePackages: import("@tanstack/start-client-core"
114990
116211
  attempts: number;
114991
116212
  connection_id: string;
114992
116213
  created_at: string;
116214
+ dead_lettered_at: string | null;
114993
116215
  desired_available: boolean | null;
114994
116216
  gateway_attempt_id: string | null;
114995
116217
  id: string;
@@ -114998,9 +116220,13 @@ export declare const listUsedCratePackages: import("@tanstack/start-client-core"
114998
116220
  locked_by: string | null;
114999
116221
  next_attempt_at: string;
115000
116222
  number_of_pieces: number;
116223
+ product_id: string | null;
115001
116224
  sent_at: string | null;
115002
116225
  status: string;
116226
+ stock_mode: string | null;
115003
116227
  superseded_by: string | null;
116228
+ target_week: number | null;
116229
+ target_year: number | null;
115004
116230
  trade_item_id: string;
115005
116231
  updated_at: string;
115006
116232
  user_id: string;
@@ -115481,6 +116707,24 @@ export declare const listUsedCratePackages: import("@tanstack/start-client-core"
115481
116707
  };
115482
116708
  Returns: string;
115483
116709
  };
116710
+ floriday_capture_stock_snapshot: {
116711
+ Args: never;
116712
+ Returns: number;
116713
+ };
116714
+ floriday_cleanup_stock_queue_v2: {
116715
+ Args: never;
116716
+ Returns: undefined;
116717
+ };
116718
+ floriday_compact_stock_snapshots: {
116719
+ Args: never;
116720
+ Returns: undefined;
116721
+ };
116722
+ floriday_default_owner: {
116723
+ Args: {
116724
+ p_connection_id: string;
116725
+ };
116726
+ Returns: string;
116727
+ };
115484
116728
  floriday_effective_price: {
115485
116729
  Args: {
115486
116730
  _buyer_id: string;
@@ -115498,6 +116742,22 @@ export declare const listUsedCratePackages: import("@tanstack/start-client-core"
115498
116742
  source_id: string;
115499
116743
  }[];
115500
116744
  };
116745
+ floriday_fill_publish_horizon: {
116746
+ Args: never;
116747
+ Returns: number;
116748
+ };
116749
+ floriday_publish_horizon_weeks: {
116750
+ Args: never;
116751
+ Returns: number;
116752
+ };
116753
+ floriday_recompute_inventory: {
116754
+ Args: {
116755
+ p_connection_id: string;
116756
+ p_force?: boolean;
116757
+ p_product_id: string;
116758
+ };
116759
+ Returns: undefined;
116760
+ };
115501
116761
  format_cart_number: {
115502
116762
  Args: {
115503
116763
  p_pick_date: string;
@@ -124140,6 +125400,7 @@ export declare const listUsedCartCarriers: import("@tanstack/start-client-core")
124140
125400
  attempts: number;
124141
125401
  connection_id: string;
124142
125402
  created_at: string;
125403
+ dead_lettered_at: string | null;
124143
125404
  desired_available: boolean | null;
124144
125405
  gateway_attempt_id: string | null;
124145
125406
  id: string;
@@ -124148,9 +125409,13 @@ export declare const listUsedCartCarriers: import("@tanstack/start-client-core")
124148
125409
  locked_by: string | null;
124149
125410
  next_attempt_at: string;
124150
125411
  number_of_pieces: number;
125412
+ product_id: string | null;
124151
125413
  sent_at: string | null;
124152
125414
  status: string;
125415
+ stock_mode: string | null;
124153
125416
  superseded_by: string | null;
125417
+ target_week: number | null;
125418
+ target_year: number | null;
124154
125419
  trade_item_id: string;
124155
125420
  updated_at: string;
124156
125421
  user_id: string;
@@ -124159,6 +125424,7 @@ export declare const listUsedCartCarriers: import("@tanstack/start-client-core")
124159
125424
  attempts?: number;
124160
125425
  connection_id: string;
124161
125426
  created_at?: string;
125427
+ dead_lettered_at?: string | null;
124162
125428
  desired_available?: boolean | null;
124163
125429
  gateway_attempt_id?: string | null;
124164
125430
  id?: string;
@@ -124167,9 +125433,13 @@ export declare const listUsedCartCarriers: import("@tanstack/start-client-core")
124167
125433
  locked_by?: string | null;
124168
125434
  next_attempt_at?: string;
124169
125435
  number_of_pieces?: number;
125436
+ product_id?: string | null;
124170
125437
  sent_at?: string | null;
124171
125438
  status?: string;
125439
+ stock_mode?: string | null;
124172
125440
  superseded_by?: string | null;
125441
+ target_week?: number | null;
125442
+ target_year?: number | null;
124173
125443
  trade_item_id: string;
124174
125444
  updated_at?: string;
124175
125445
  user_id: string;
@@ -124178,6 +125448,7 @@ export declare const listUsedCartCarriers: import("@tanstack/start-client-core")
124178
125448
  attempts?: number;
124179
125449
  connection_id?: string;
124180
125450
  created_at?: string;
125451
+ dead_lettered_at?: string | null;
124181
125452
  desired_available?: boolean | null;
124182
125453
  gateway_attempt_id?: string | null;
124183
125454
  id?: string;
@@ -124186,9 +125457,13 @@ export declare const listUsedCartCarriers: import("@tanstack/start-client-core")
124186
125457
  locked_by?: string | null;
124187
125458
  next_attempt_at?: string;
124188
125459
  number_of_pieces?: number;
125460
+ product_id?: string | null;
124189
125461
  sent_at?: string | null;
124190
125462
  status?: string;
125463
+ stock_mode?: string | null;
124191
125464
  superseded_by?: string | null;
125465
+ target_week?: number | null;
125466
+ target_year?: number | null;
124192
125467
  trade_item_id?: string;
124193
125468
  updated_at?: string;
124194
125469
  user_id?: string;
@@ -124597,6 +125872,87 @@ export declare const listUsedCartCarriers: import("@tanstack/start-client-core")
124597
125872
  referencedColumns: ["id"];
124598
125873
  }];
124599
125874
  };
125875
+ floriday_inventory_settings: {
125876
+ Row: {
125877
+ buffer_quantity: number;
125878
+ connection_id: string;
125879
+ created_at: string;
125880
+ desired_availability: boolean;
125881
+ desired_quantity: number;
125882
+ fixed_quantity: number | null;
125883
+ floriday_trade_item_id: string | null;
125884
+ id: string;
125885
+ last_confirmed_at: string | null;
125886
+ last_enqueued_at: string | null;
125887
+ last_published_at: string | null;
125888
+ last_sync_error: string | null;
125889
+ manual_quantity: number | null;
125890
+ maximum_quantity: number | null;
125891
+ product_id: string;
125892
+ quantity_control: string;
125893
+ remote_available: boolean | null;
125894
+ remote_checked_at: string | null;
125895
+ remote_quantity: number | null;
125896
+ stock_mode: string;
125897
+ sync_status: string;
125898
+ updated_at: string;
125899
+ updated_by: string | null;
125900
+ user_id: string;
125901
+ };
125902
+ Insert: {
125903
+ buffer_quantity?: number;
125904
+ connection_id: string;
125905
+ created_at?: string;
125906
+ desired_availability?: boolean;
125907
+ desired_quantity?: number;
125908
+ fixed_quantity?: number | null;
125909
+ floriday_trade_item_id?: string | null;
125910
+ id?: string;
125911
+ last_confirmed_at?: string | null;
125912
+ last_enqueued_at?: string | null;
125913
+ last_published_at?: string | null;
125914
+ last_sync_error?: string | null;
125915
+ manual_quantity?: number | null;
125916
+ maximum_quantity?: number | null;
125917
+ product_id: string;
125918
+ quantity_control?: string;
125919
+ remote_available?: boolean | null;
125920
+ remote_checked_at?: string | null;
125921
+ remote_quantity?: number | null;
125922
+ stock_mode?: string;
125923
+ sync_status?: string;
125924
+ updated_at?: string;
125925
+ updated_by?: string | null;
125926
+ user_id: string;
125927
+ };
125928
+ Update: {
125929
+ buffer_quantity?: number;
125930
+ connection_id?: string;
125931
+ created_at?: string;
125932
+ desired_availability?: boolean;
125933
+ desired_quantity?: number;
125934
+ fixed_quantity?: number | null;
125935
+ floriday_trade_item_id?: string | null;
125936
+ id?: string;
125937
+ last_confirmed_at?: string | null;
125938
+ last_enqueued_at?: string | null;
125939
+ last_published_at?: string | null;
125940
+ last_sync_error?: string | null;
125941
+ manual_quantity?: number | null;
125942
+ maximum_quantity?: number | null;
125943
+ product_id?: string;
125944
+ quantity_control?: string;
125945
+ remote_available?: boolean | null;
125946
+ remote_checked_at?: string | null;
125947
+ remote_quantity?: number | null;
125948
+ stock_mode?: string;
125949
+ sync_status?: string;
125950
+ updated_at?: string;
125951
+ updated_by?: string | null;
125952
+ user_id?: string;
125953
+ };
125954
+ Relationships: [];
125955
+ };
124600
125956
  floriday_invoices_cache: {
124601
125957
  Row: {
124602
125958
  buyer_organization_id: string | null;
@@ -124885,6 +126241,39 @@ export declare const listUsedCartCarriers: import("@tanstack/start-client-core")
124885
126241
  };
124886
126242
  Relationships: [];
124887
126243
  };
126244
+ floriday_sales_order_ingest: {
126245
+ Row: {
126246
+ connection_id: string;
126247
+ created_at: string;
126248
+ id: string;
126249
+ impact: import("../integrations/supabase/types").Json;
126250
+ order_status: string | null;
126251
+ order_version: number;
126252
+ processed_at: string;
126253
+ sales_order_id: string;
126254
+ };
126255
+ Insert: {
126256
+ connection_id: string;
126257
+ created_at?: string;
126258
+ id?: string;
126259
+ impact?: import("../integrations/supabase/types").Json;
126260
+ order_status?: string | null;
126261
+ order_version?: number;
126262
+ processed_at?: string;
126263
+ sales_order_id: string;
126264
+ };
126265
+ Update: {
126266
+ connection_id?: string;
126267
+ created_at?: string;
126268
+ id?: string;
126269
+ impact?: import("../integrations/supabase/types").Json;
126270
+ order_status?: string | null;
126271
+ order_version?: number;
126272
+ processed_at?: string;
126273
+ sales_order_id?: string;
126274
+ };
126275
+ Relationships: [];
126276
+ };
124888
126277
  floriday_sales_strategies_cache: {
124889
126278
  Row: {
124890
126279
  connection_id: string;
@@ -124984,6 +126373,39 @@ export declare const listUsedCartCarriers: import("@tanstack/start-client-core")
124984
126373
  };
124985
126374
  Relationships: [];
124986
126375
  };
126376
+ floriday_sync_cursors: {
126377
+ Row: {
126378
+ connection_id: string;
126379
+ created_at: string;
126380
+ id: string;
126381
+ last_error: string | null;
126382
+ last_sync_at: string | null;
126383
+ resource_type: string;
126384
+ sequence_number: number;
126385
+ updated_at: string;
126386
+ };
126387
+ Insert: {
126388
+ connection_id: string;
126389
+ created_at?: string;
126390
+ id?: string;
126391
+ last_error?: string | null;
126392
+ last_sync_at?: string | null;
126393
+ resource_type: string;
126394
+ sequence_number?: number;
126395
+ updated_at?: string;
126396
+ };
126397
+ Update: {
126398
+ connection_id?: string;
126399
+ created_at?: string;
126400
+ id?: string;
126401
+ last_error?: string | null;
126402
+ last_sync_at?: string | null;
126403
+ resource_type?: string;
126404
+ sequence_number?: number;
126405
+ updated_at?: string;
126406
+ };
126407
+ Relationships: [];
126408
+ };
124987
126409
  floriday_sync_state: {
124988
126410
  Row: {
124989
126411
  connection_id: string;
@@ -125674,6 +127096,42 @@ export declare const listUsedCartCarriers: import("@tanstack/start-client-core")
125674
127096
  };
125675
127097
  Relationships: [];
125676
127098
  };
127099
+ inventory_stock_snapshots: {
127100
+ Row: {
127101
+ connection_id: string;
127102
+ created_at: string;
127103
+ erp_available_quantity: number;
127104
+ floriday_desired_quantity: number;
127105
+ floriday_remote_quantity: number | null;
127106
+ granularity: string;
127107
+ id: string;
127108
+ snapshot_at: string;
127109
+ user_id: string | null;
127110
+ };
127111
+ Insert: {
127112
+ connection_id: string;
127113
+ created_at?: string;
127114
+ erp_available_quantity?: number;
127115
+ floriday_desired_quantity?: number;
127116
+ floriday_remote_quantity?: number | null;
127117
+ granularity?: string;
127118
+ id?: string;
127119
+ snapshot_at?: string;
127120
+ user_id?: string | null;
127121
+ };
127122
+ Update: {
127123
+ connection_id?: string;
127124
+ created_at?: string;
127125
+ erp_available_quantity?: number;
127126
+ floriday_desired_quantity?: number;
127127
+ floriday_remote_quantity?: number | null;
127128
+ granularity?: string;
127129
+ id?: string;
127130
+ snapshot_at?: string;
127131
+ user_id?: string | null;
127132
+ };
127133
+ Relationships: [];
127134
+ };
125677
127135
  invoice_items: {
125678
127136
  Row: {
125679
127137
  created_at: string;
@@ -134868,6 +136326,7 @@ export declare const listUsedCartCarriers: import("@tanstack/start-client-core")
134868
136326
  };
134869
136327
  trade_item_stock: {
134870
136328
  Row: {
136329
+ change_source: string;
134871
136330
  connection_id: string;
134872
136331
  created_at: string;
134873
136332
  id: string;
@@ -134881,6 +136340,7 @@ export declare const listUsedCartCarriers: import("@tanstack/start-client-core")
134881
136340
  user_id: string;
134882
136341
  };
134883
136342
  Insert: {
136343
+ change_source?: string;
134884
136344
  connection_id: string;
134885
136345
  created_at?: string;
134886
136346
  id?: string;
@@ -134894,6 +136354,7 @@ export declare const listUsedCartCarriers: import("@tanstack/start-client-core")
134894
136354
  user_id: string;
134895
136355
  };
134896
136356
  Update: {
136357
+ change_source?: string;
134897
136358
  connection_id?: string;
134898
136359
  created_at?: string;
134899
136360
  id?: string;
@@ -138494,6 +139955,18 @@ export declare const listUsedCartCarriers: import("@tanstack/start-client-core")
138494
139955
  Args: never;
138495
139956
  Returns: number;
138496
139957
  };
139958
+ calculate_floriday_desired_stock: {
139959
+ Args: {
139960
+ p_connection_id: string;
139961
+ p_product_id: string;
139962
+ };
139963
+ Returns: {
139964
+ desired_availability: boolean;
139965
+ desired_quantity: number;
139966
+ erp_available: number;
139967
+ stock_mode: string;
139968
+ }[];
139969
+ };
138497
139970
  calculate_layer_stock: {
138498
139971
  Args: {
138499
139972
  p_product_id: string;
@@ -138588,6 +140061,7 @@ export declare const listUsedCartCarriers: import("@tanstack/start-client-core")
138588
140061
  attempts: number;
138589
140062
  connection_id: string;
138590
140063
  created_at: string;
140064
+ dead_lettered_at: string | null;
138591
140065
  desired_available: boolean | null;
138592
140066
  gateway_attempt_id: string | null;
138593
140067
  id: string;
@@ -138596,9 +140070,13 @@ export declare const listUsedCartCarriers: import("@tanstack/start-client-core")
138596
140070
  locked_by: string | null;
138597
140071
  next_attempt_at: string;
138598
140072
  number_of_pieces: number;
140073
+ product_id: string | null;
138599
140074
  sent_at: string | null;
138600
140075
  status: string;
140076
+ stock_mode: string | null;
138601
140077
  superseded_by: string | null;
140078
+ target_week: number | null;
140079
+ target_year: number | null;
138602
140080
  trade_item_id: string;
138603
140081
  updated_at: string;
138604
140082
  user_id: string;
@@ -139079,6 +140557,24 @@ export declare const listUsedCartCarriers: import("@tanstack/start-client-core")
139079
140557
  };
139080
140558
  Returns: string;
139081
140559
  };
140560
+ floriday_capture_stock_snapshot: {
140561
+ Args: never;
140562
+ Returns: number;
140563
+ };
140564
+ floriday_cleanup_stock_queue_v2: {
140565
+ Args: never;
140566
+ Returns: undefined;
140567
+ };
140568
+ floriday_compact_stock_snapshots: {
140569
+ Args: never;
140570
+ Returns: undefined;
140571
+ };
140572
+ floriday_default_owner: {
140573
+ Args: {
140574
+ p_connection_id: string;
140575
+ };
140576
+ Returns: string;
140577
+ };
139082
140578
  floriday_effective_price: {
139083
140579
  Args: {
139084
140580
  _buyer_id: string;
@@ -139096,6 +140592,22 @@ export declare const listUsedCartCarriers: import("@tanstack/start-client-core")
139096
140592
  source_id: string;
139097
140593
  }[];
139098
140594
  };
140595
+ floriday_fill_publish_horizon: {
140596
+ Args: never;
140597
+ Returns: number;
140598
+ };
140599
+ floriday_publish_horizon_weeks: {
140600
+ Args: never;
140601
+ Returns: number;
140602
+ };
140603
+ floriday_recompute_inventory: {
140604
+ Args: {
140605
+ p_connection_id: string;
140606
+ p_force?: boolean;
140607
+ p_product_id: string;
140608
+ };
140609
+ Returns: undefined;
140610
+ };
139099
140611
  format_cart_number: {
139100
140612
  Args: {
139101
140613
  p_pick_date: string;
@@ -147728,6 +149240,7 @@ export declare const upsertCartType: import("@tanstack/start-client-core").Optio
147728
149240
  attempts: number;
147729
149241
  connection_id: string;
147730
149242
  created_at: string;
149243
+ dead_lettered_at: string | null;
147731
149244
  desired_available: boolean | null;
147732
149245
  gateway_attempt_id: string | null;
147733
149246
  id: string;
@@ -147736,9 +149249,13 @@ export declare const upsertCartType: import("@tanstack/start-client-core").Optio
147736
149249
  locked_by: string | null;
147737
149250
  next_attempt_at: string;
147738
149251
  number_of_pieces: number;
149252
+ product_id: string | null;
147739
149253
  sent_at: string | null;
147740
149254
  status: string;
149255
+ stock_mode: string | null;
147741
149256
  superseded_by: string | null;
149257
+ target_week: number | null;
149258
+ target_year: number | null;
147742
149259
  trade_item_id: string;
147743
149260
  updated_at: string;
147744
149261
  user_id: string;
@@ -147747,6 +149264,7 @@ export declare const upsertCartType: import("@tanstack/start-client-core").Optio
147747
149264
  attempts?: number;
147748
149265
  connection_id: string;
147749
149266
  created_at?: string;
149267
+ dead_lettered_at?: string | null;
147750
149268
  desired_available?: boolean | null;
147751
149269
  gateway_attempt_id?: string | null;
147752
149270
  id?: string;
@@ -147755,9 +149273,13 @@ export declare const upsertCartType: import("@tanstack/start-client-core").Optio
147755
149273
  locked_by?: string | null;
147756
149274
  next_attempt_at?: string;
147757
149275
  number_of_pieces?: number;
149276
+ product_id?: string | null;
147758
149277
  sent_at?: string | null;
147759
149278
  status?: string;
149279
+ stock_mode?: string | null;
147760
149280
  superseded_by?: string | null;
149281
+ target_week?: number | null;
149282
+ target_year?: number | null;
147761
149283
  trade_item_id: string;
147762
149284
  updated_at?: string;
147763
149285
  user_id: string;
@@ -147766,6 +149288,7 @@ export declare const upsertCartType: import("@tanstack/start-client-core").Optio
147766
149288
  attempts?: number;
147767
149289
  connection_id?: string;
147768
149290
  created_at?: string;
149291
+ dead_lettered_at?: string | null;
147769
149292
  desired_available?: boolean | null;
147770
149293
  gateway_attempt_id?: string | null;
147771
149294
  id?: string;
@@ -147774,9 +149297,13 @@ export declare const upsertCartType: import("@tanstack/start-client-core").Optio
147774
149297
  locked_by?: string | null;
147775
149298
  next_attempt_at?: string;
147776
149299
  number_of_pieces?: number;
149300
+ product_id?: string | null;
147777
149301
  sent_at?: string | null;
147778
149302
  status?: string;
149303
+ stock_mode?: string | null;
147779
149304
  superseded_by?: string | null;
149305
+ target_week?: number | null;
149306
+ target_year?: number | null;
147780
149307
  trade_item_id?: string;
147781
149308
  updated_at?: string;
147782
149309
  user_id?: string;
@@ -148185,6 +149712,87 @@ export declare const upsertCartType: import("@tanstack/start-client-core").Optio
148185
149712
  referencedColumns: ["id"];
148186
149713
  }];
148187
149714
  };
149715
+ floriday_inventory_settings: {
149716
+ Row: {
149717
+ buffer_quantity: number;
149718
+ connection_id: string;
149719
+ created_at: string;
149720
+ desired_availability: boolean;
149721
+ desired_quantity: number;
149722
+ fixed_quantity: number | null;
149723
+ floriday_trade_item_id: string | null;
149724
+ id: string;
149725
+ last_confirmed_at: string | null;
149726
+ last_enqueued_at: string | null;
149727
+ last_published_at: string | null;
149728
+ last_sync_error: string | null;
149729
+ manual_quantity: number | null;
149730
+ maximum_quantity: number | null;
149731
+ product_id: string;
149732
+ quantity_control: string;
149733
+ remote_available: boolean | null;
149734
+ remote_checked_at: string | null;
149735
+ remote_quantity: number | null;
149736
+ stock_mode: string;
149737
+ sync_status: string;
149738
+ updated_at: string;
149739
+ updated_by: string | null;
149740
+ user_id: string;
149741
+ };
149742
+ Insert: {
149743
+ buffer_quantity?: number;
149744
+ connection_id: string;
149745
+ created_at?: string;
149746
+ desired_availability?: boolean;
149747
+ desired_quantity?: number;
149748
+ fixed_quantity?: number | null;
149749
+ floriday_trade_item_id?: string | null;
149750
+ id?: string;
149751
+ last_confirmed_at?: string | null;
149752
+ last_enqueued_at?: string | null;
149753
+ last_published_at?: string | null;
149754
+ last_sync_error?: string | null;
149755
+ manual_quantity?: number | null;
149756
+ maximum_quantity?: number | null;
149757
+ product_id: string;
149758
+ quantity_control?: string;
149759
+ remote_available?: boolean | null;
149760
+ remote_checked_at?: string | null;
149761
+ remote_quantity?: number | null;
149762
+ stock_mode?: string;
149763
+ sync_status?: string;
149764
+ updated_at?: string;
149765
+ updated_by?: string | null;
149766
+ user_id: string;
149767
+ };
149768
+ Update: {
149769
+ buffer_quantity?: number;
149770
+ connection_id?: string;
149771
+ created_at?: string;
149772
+ desired_availability?: boolean;
149773
+ desired_quantity?: number;
149774
+ fixed_quantity?: number | null;
149775
+ floriday_trade_item_id?: string | null;
149776
+ id?: string;
149777
+ last_confirmed_at?: string | null;
149778
+ last_enqueued_at?: string | null;
149779
+ last_published_at?: string | null;
149780
+ last_sync_error?: string | null;
149781
+ manual_quantity?: number | null;
149782
+ maximum_quantity?: number | null;
149783
+ product_id?: string;
149784
+ quantity_control?: string;
149785
+ remote_available?: boolean | null;
149786
+ remote_checked_at?: string | null;
149787
+ remote_quantity?: number | null;
149788
+ stock_mode?: string;
149789
+ sync_status?: string;
149790
+ updated_at?: string;
149791
+ updated_by?: string | null;
149792
+ user_id?: string;
149793
+ };
149794
+ Relationships: [];
149795
+ };
148188
149796
  floriday_invoices_cache: {
148189
149797
  Row: {
148190
149798
  buyer_organization_id: string | null;
@@ -148473,6 +150081,39 @@ export declare const upsertCartType: import("@tanstack/start-client-core").Optio
148473
150081
  };
148474
150082
  Relationships: [];
148475
150083
  };
150084
+ floriday_sales_order_ingest: {
150085
+ Row: {
150086
+ connection_id: string;
150087
+ created_at: string;
150088
+ id: string;
150089
+ impact: import("../integrations/supabase/types").Json;
150090
+ order_status: string | null;
150091
+ order_version: number;
150092
+ processed_at: string;
150093
+ sales_order_id: string;
150094
+ };
150095
+ Insert: {
150096
+ connection_id: string;
150097
+ created_at?: string;
150098
+ id?: string;
150099
+ impact?: import("../integrations/supabase/types").Json;
150100
+ order_status?: string | null;
150101
+ order_version?: number;
150102
+ processed_at?: string;
150103
+ sales_order_id: string;
150104
+ };
150105
+ Update: {
150106
+ connection_id?: string;
150107
+ created_at?: string;
150108
+ id?: string;
150109
+ impact?: import("../integrations/supabase/types").Json;
150110
+ order_status?: string | null;
150111
+ order_version?: number;
150112
+ processed_at?: string;
150113
+ sales_order_id?: string;
150114
+ };
150115
+ Relationships: [];
150116
+ };
148476
150117
  floriday_sales_strategies_cache: {
148477
150118
  Row: {
148478
150119
  connection_id: string;
@@ -148572,6 +150213,39 @@ export declare const upsertCartType: import("@tanstack/start-client-core").Optio
148572
150213
  };
148573
150214
  Relationships: [];
148574
150215
  };
150216
+ floriday_sync_cursors: {
150217
+ Row: {
150218
+ connection_id: string;
150219
+ created_at: string;
150220
+ id: string;
150221
+ last_error: string | null;
150222
+ last_sync_at: string | null;
150223
+ resource_type: string;
150224
+ sequence_number: number;
150225
+ updated_at: string;
150226
+ };
150227
+ Insert: {
150228
+ connection_id: string;
150229
+ created_at?: string;
150230
+ id?: string;
150231
+ last_error?: string | null;
150232
+ last_sync_at?: string | null;
150233
+ resource_type: string;
150234
+ sequence_number?: number;
150235
+ updated_at?: string;
150236
+ };
150237
+ Update: {
150238
+ connection_id?: string;
150239
+ created_at?: string;
150240
+ id?: string;
150241
+ last_error?: string | null;
150242
+ last_sync_at?: string | null;
150243
+ resource_type?: string;
150244
+ sequence_number?: number;
150245
+ updated_at?: string;
150246
+ };
150247
+ Relationships: [];
150248
+ };
148575
150249
  floriday_sync_state: {
148576
150250
  Row: {
148577
150251
  connection_id: string;
@@ -149262,6 +150936,42 @@ export declare const upsertCartType: import("@tanstack/start-client-core").Optio
149262
150936
  };
149263
150937
  Relationships: [];
149264
150938
  };
150939
+ inventory_stock_snapshots: {
150940
+ Row: {
150941
+ connection_id: string;
150942
+ created_at: string;
150943
+ erp_available_quantity: number;
150944
+ floriday_desired_quantity: number;
150945
+ floriday_remote_quantity: number | null;
150946
+ granularity: string;
150947
+ id: string;
150948
+ snapshot_at: string;
150949
+ user_id: string | null;
150950
+ };
150951
+ Insert: {
150952
+ connection_id: string;
150953
+ created_at?: string;
150954
+ erp_available_quantity?: number;
150955
+ floriday_desired_quantity?: number;
150956
+ floriday_remote_quantity?: number | null;
150957
+ granularity?: string;
150958
+ id?: string;
150959
+ snapshot_at?: string;
150960
+ user_id?: string | null;
150961
+ };
150962
+ Update: {
150963
+ connection_id?: string;
150964
+ created_at?: string;
150965
+ erp_available_quantity?: number;
150966
+ floriday_desired_quantity?: number;
150967
+ floriday_remote_quantity?: number | null;
150968
+ granularity?: string;
150969
+ id?: string;
150970
+ snapshot_at?: string;
150971
+ user_id?: string | null;
150972
+ };
150973
+ Relationships: [];
150974
+ };
149265
150975
  invoice_items: {
149266
150976
  Row: {
149267
150977
  created_at: string;
@@ -158456,6 +160166,7 @@ export declare const upsertCartType: import("@tanstack/start-client-core").Optio
158456
160166
  };
158457
160167
  trade_item_stock: {
158458
160168
  Row: {
160169
+ change_source: string;
158459
160170
  connection_id: string;
158460
160171
  created_at: string;
158461
160172
  id: string;
@@ -158469,6 +160180,7 @@ export declare const upsertCartType: import("@tanstack/start-client-core").Optio
158469
160180
  user_id: string;
158470
160181
  };
158471
160182
  Insert: {
160183
+ change_source?: string;
158472
160184
  connection_id: string;
158473
160185
  created_at?: string;
158474
160186
  id?: string;
@@ -158482,6 +160194,7 @@ export declare const upsertCartType: import("@tanstack/start-client-core").Optio
158482
160194
  user_id: string;
158483
160195
  };
158484
160196
  Update: {
160197
+ change_source?: string;
158485
160198
  connection_id?: string;
158486
160199
  created_at?: string;
158487
160200
  id?: string;
@@ -162082,6 +163795,18 @@ export declare const upsertCartType: import("@tanstack/start-client-core").Optio
162082
163795
  Args: never;
162083
163796
  Returns: number;
162084
163797
  };
163798
+ calculate_floriday_desired_stock: {
163799
+ Args: {
163800
+ p_connection_id: string;
163801
+ p_product_id: string;
163802
+ };
163803
+ Returns: {
163804
+ desired_availability: boolean;
163805
+ desired_quantity: number;
163806
+ erp_available: number;
163807
+ stock_mode: string;
163808
+ }[];
163809
+ };
162085
163810
  calculate_layer_stock: {
162086
163811
  Args: {
162087
163812
  p_product_id: string;
@@ -162176,6 +163901,7 @@ export declare const upsertCartType: import("@tanstack/start-client-core").Optio
162176
163901
  attempts: number;
162177
163902
  connection_id: string;
162178
163903
  created_at: string;
163904
+ dead_lettered_at: string | null;
162179
163905
  desired_available: boolean | null;
162180
163906
  gateway_attempt_id: string | null;
162181
163907
  id: string;
@@ -162184,9 +163910,13 @@ export declare const upsertCartType: import("@tanstack/start-client-core").Optio
162184
163910
  locked_by: string | null;
162185
163911
  next_attempt_at: string;
162186
163912
  number_of_pieces: number;
163913
+ product_id: string | null;
162187
163914
  sent_at: string | null;
162188
163915
  status: string;
163916
+ stock_mode: string | null;
162189
163917
  superseded_by: string | null;
163918
+ target_week: number | null;
163919
+ target_year: number | null;
162190
163920
  trade_item_id: string;
162191
163921
  updated_at: string;
162192
163922
  user_id: string;
@@ -162667,6 +164397,24 @@ export declare const upsertCartType: import("@tanstack/start-client-core").Optio
162667
164397
  };
162668
164398
  Returns: string;
162669
164399
  };
164400
+ floriday_capture_stock_snapshot: {
164401
+ Args: never;
164402
+ Returns: number;
164403
+ };
164404
+ floriday_cleanup_stock_queue_v2: {
164405
+ Args: never;
164406
+ Returns: undefined;
164407
+ };
164408
+ floriday_compact_stock_snapshots: {
164409
+ Args: never;
164410
+ Returns: undefined;
164411
+ };
164412
+ floriday_default_owner: {
164413
+ Args: {
164414
+ p_connection_id: string;
164415
+ };
164416
+ Returns: string;
164417
+ };
162670
164418
  floriday_effective_price: {
162671
164419
  Args: {
162672
164420
  _buyer_id: string;
@@ -162684,6 +164432,22 @@ export declare const upsertCartType: import("@tanstack/start-client-core").Optio
162684
164432
  source_id: string;
162685
164433
  }[];
162686
164434
  };
164435
+ floriday_fill_publish_horizon: {
164436
+ Args: never;
164437
+ Returns: number;
164438
+ };
164439
+ floriday_publish_horizon_weeks: {
164440
+ Args: never;
164441
+ Returns: number;
164442
+ };
164443
+ floriday_recompute_inventory: {
164444
+ Args: {
164445
+ p_connection_id: string;
164446
+ p_force?: boolean;
164447
+ p_product_id: string;
164448
+ };
164449
+ Returns: undefined;
164450
+ };
162687
164451
  format_cart_number: {
162688
164452
  Args: {
162689
164453
  p_pick_date: string;
@@ -171325,6 +173089,7 @@ export declare const deleteCartType: import("@tanstack/start-client-core").Optio
171325
173089
  attempts: number;
171326
173090
  connection_id: string;
171327
173091
  created_at: string;
173092
+ dead_lettered_at: string | null;
171328
173093
  desired_available: boolean | null;
171329
173094
  gateway_attempt_id: string | null;
171330
173095
  id: string;
@@ -171333,9 +173098,13 @@ export declare const deleteCartType: import("@tanstack/start-client-core").Optio
171333
173098
  locked_by: string | null;
171334
173099
  next_attempt_at: string;
171335
173100
  number_of_pieces: number;
173101
+ product_id: string | null;
171336
173102
  sent_at: string | null;
171337
173103
  status: string;
173104
+ stock_mode: string | null;
171338
173105
  superseded_by: string | null;
173106
+ target_week: number | null;
173107
+ target_year: number | null;
171339
173108
  trade_item_id: string;
171340
173109
  updated_at: string;
171341
173110
  user_id: string;
@@ -171344,6 +173113,7 @@ export declare const deleteCartType: import("@tanstack/start-client-core").Optio
171344
173113
  attempts?: number;
171345
173114
  connection_id: string;
171346
173115
  created_at?: string;
173116
+ dead_lettered_at?: string | null;
171347
173117
  desired_available?: boolean | null;
171348
173118
  gateway_attempt_id?: string | null;
171349
173119
  id?: string;
@@ -171352,9 +173122,13 @@ export declare const deleteCartType: import("@tanstack/start-client-core").Optio
171352
173122
  locked_by?: string | null;
171353
173123
  next_attempt_at?: string;
171354
173124
  number_of_pieces?: number;
173125
+ product_id?: string | null;
171355
173126
  sent_at?: string | null;
171356
173127
  status?: string;
173128
+ stock_mode?: string | null;
171357
173129
  superseded_by?: string | null;
173130
+ target_week?: number | null;
173131
+ target_year?: number | null;
171358
173132
  trade_item_id: string;
171359
173133
  updated_at?: string;
171360
173134
  user_id: string;
@@ -171363,6 +173137,7 @@ export declare const deleteCartType: import("@tanstack/start-client-core").Optio
171363
173137
  attempts?: number;
171364
173138
  connection_id?: string;
171365
173139
  created_at?: string;
173140
+ dead_lettered_at?: string | null;
171366
173141
  desired_available?: boolean | null;
171367
173142
  gateway_attempt_id?: string | null;
171368
173143
  id?: string;
@@ -171371,9 +173146,13 @@ export declare const deleteCartType: import("@tanstack/start-client-core").Optio
171371
173146
  locked_by?: string | null;
171372
173147
  next_attempt_at?: string;
171373
173148
  number_of_pieces?: number;
173149
+ product_id?: string | null;
171374
173150
  sent_at?: string | null;
171375
173151
  status?: string;
173152
+ stock_mode?: string | null;
171376
173153
  superseded_by?: string | null;
173154
+ target_week?: number | null;
173155
+ target_year?: number | null;
171377
173156
  trade_item_id?: string;
171378
173157
  updated_at?: string;
171379
173158
  user_id?: string;
@@ -171782,6 +173561,87 @@ export declare const deleteCartType: import("@tanstack/start-client-core").Optio
171782
173561
  referencedColumns: ["id"];
171783
173562
  }];
171784
173563
  };
173564
+ floriday_inventory_settings: {
173565
+ Row: {
173566
+ buffer_quantity: number;
173567
+ connection_id: string;
173568
+ created_at: string;
173569
+ desired_availability: boolean;
173570
+ desired_quantity: number;
173571
+ fixed_quantity: number | null;
173572
+ floriday_trade_item_id: string | null;
173573
+ id: string;
173574
+ last_confirmed_at: string | null;
173575
+ last_enqueued_at: string | null;
173576
+ last_published_at: string | null;
173577
+ last_sync_error: string | null;
173578
+ manual_quantity: number | null;
173579
+ maximum_quantity: number | null;
173580
+ product_id: string;
173581
+ quantity_control: string;
173582
+ remote_available: boolean | null;
173583
+ remote_checked_at: string | null;
173584
+ remote_quantity: number | null;
173585
+ stock_mode: string;
173586
+ sync_status: string;
173587
+ updated_at: string;
173588
+ updated_by: string | null;
173589
+ user_id: string;
173590
+ };
173591
+ Insert: {
173592
+ buffer_quantity?: number;
173593
+ connection_id: string;
173594
+ created_at?: string;
173595
+ desired_availability?: boolean;
173596
+ desired_quantity?: number;
173597
+ fixed_quantity?: number | null;
173598
+ floriday_trade_item_id?: string | null;
173599
+ id?: string;
173600
+ last_confirmed_at?: string | null;
173601
+ last_enqueued_at?: string | null;
173602
+ last_published_at?: string | null;
173603
+ last_sync_error?: string | null;
173604
+ manual_quantity?: number | null;
173605
+ maximum_quantity?: number | null;
173606
+ product_id: string;
173607
+ quantity_control?: string;
173608
+ remote_available?: boolean | null;
173609
+ remote_checked_at?: string | null;
173610
+ remote_quantity?: number | null;
173611
+ stock_mode?: string;
173612
+ sync_status?: string;
173613
+ updated_at?: string;
173614
+ updated_by?: string | null;
173615
+ user_id: string;
173616
+ };
173617
+ Update: {
173618
+ buffer_quantity?: number;
173619
+ connection_id?: string;
173620
+ created_at?: string;
173621
+ desired_availability?: boolean;
173622
+ desired_quantity?: number;
173623
+ fixed_quantity?: number | null;
173624
+ floriday_trade_item_id?: string | null;
173625
+ id?: string;
173626
+ last_confirmed_at?: string | null;
173627
+ last_enqueued_at?: string | null;
173628
+ last_published_at?: string | null;
173629
+ last_sync_error?: string | null;
173630
+ manual_quantity?: number | null;
173631
+ maximum_quantity?: number | null;
173632
+ product_id?: string;
173633
+ quantity_control?: string;
173634
+ remote_available?: boolean | null;
173635
+ remote_checked_at?: string | null;
173636
+ remote_quantity?: number | null;
173637
+ stock_mode?: string;
173638
+ sync_status?: string;
173639
+ updated_at?: string;
173640
+ updated_by?: string | null;
173641
+ user_id?: string;
173642
+ };
173643
+ Relationships: [];
173644
+ };
171785
173645
  floriday_invoices_cache: {
171786
173646
  Row: {
171787
173647
  buyer_organization_id: string | null;
@@ -172070,6 +173930,39 @@ export declare const deleteCartType: import("@tanstack/start-client-core").Optio
172070
173930
  };
172071
173931
  Relationships: [];
172072
173932
  };
173933
+ floriday_sales_order_ingest: {
173934
+ Row: {
173935
+ connection_id: string;
173936
+ created_at: string;
173937
+ id: string;
173938
+ impact: import("../integrations/supabase/types").Json;
173939
+ order_status: string | null;
173940
+ order_version: number;
173941
+ processed_at: string;
173942
+ sales_order_id: string;
173943
+ };
173944
+ Insert: {
173945
+ connection_id: string;
173946
+ created_at?: string;
173947
+ id?: string;
173948
+ impact?: import("../integrations/supabase/types").Json;
173949
+ order_status?: string | null;
173950
+ order_version?: number;
173951
+ processed_at?: string;
173952
+ sales_order_id: string;
173953
+ };
173954
+ Update: {
173955
+ connection_id?: string;
173956
+ created_at?: string;
173957
+ id?: string;
173958
+ impact?: import("../integrations/supabase/types").Json;
173959
+ order_status?: string | null;
173960
+ order_version?: number;
173961
+ processed_at?: string;
173962
+ sales_order_id?: string;
173963
+ };
173964
+ Relationships: [];
173965
+ };
172073
173966
  floriday_sales_strategies_cache: {
172074
173967
  Row: {
172075
173968
  connection_id: string;
@@ -172169,6 +174062,39 @@ export declare const deleteCartType: import("@tanstack/start-client-core").Optio
172169
174062
  };
172170
174063
  Relationships: [];
172171
174064
  };
174065
+ floriday_sync_cursors: {
174066
+ Row: {
174067
+ connection_id: string;
174068
+ created_at: string;
174069
+ id: string;
174070
+ last_error: string | null;
174071
+ last_sync_at: string | null;
174072
+ resource_type: string;
174073
+ sequence_number: number;
174074
+ updated_at: string;
174075
+ };
174076
+ Insert: {
174077
+ connection_id: string;
174078
+ created_at?: string;
174079
+ id?: string;
174080
+ last_error?: string | null;
174081
+ last_sync_at?: string | null;
174082
+ resource_type: string;
174083
+ sequence_number?: number;
174084
+ updated_at?: string;
174085
+ };
174086
+ Update: {
174087
+ connection_id?: string;
174088
+ created_at?: string;
174089
+ id?: string;
174090
+ last_error?: string | null;
174091
+ last_sync_at?: string | null;
174092
+ resource_type?: string;
174093
+ sequence_number?: number;
174094
+ updated_at?: string;
174095
+ };
174096
+ Relationships: [];
174097
+ };
172172
174098
  floriday_sync_state: {
172173
174099
  Row: {
172174
174100
  connection_id: string;
@@ -172859,6 +174785,42 @@ export declare const deleteCartType: import("@tanstack/start-client-core").Optio
172859
174785
  };
172860
174786
  Relationships: [];
172861
174787
  };
174788
+ inventory_stock_snapshots: {
174789
+ Row: {
174790
+ connection_id: string;
174791
+ created_at: string;
174792
+ erp_available_quantity: number;
174793
+ floriday_desired_quantity: number;
174794
+ floriday_remote_quantity: number | null;
174795
+ granularity: string;
174796
+ id: string;
174797
+ snapshot_at: string;
174798
+ user_id: string | null;
174799
+ };
174800
+ Insert: {
174801
+ connection_id: string;
174802
+ created_at?: string;
174803
+ erp_available_quantity?: number;
174804
+ floriday_desired_quantity?: number;
174805
+ floriday_remote_quantity?: number | null;
174806
+ granularity?: string;
174807
+ id?: string;
174808
+ snapshot_at?: string;
174809
+ user_id?: string | null;
174810
+ };
174811
+ Update: {
174812
+ connection_id?: string;
174813
+ created_at?: string;
174814
+ erp_available_quantity?: number;
174815
+ floriday_desired_quantity?: number;
174816
+ floriday_remote_quantity?: number | null;
174817
+ granularity?: string;
174818
+ id?: string;
174819
+ snapshot_at?: string;
174820
+ user_id?: string | null;
174821
+ };
174822
+ Relationships: [];
174823
+ };
172862
174824
  invoice_items: {
172863
174825
  Row: {
172864
174826
  created_at: string;
@@ -182053,6 +184015,7 @@ export declare const deleteCartType: import("@tanstack/start-client-core").Optio
182053
184015
  };
182054
184016
  trade_item_stock: {
182055
184017
  Row: {
184018
+ change_source: string;
182056
184019
  connection_id: string;
182057
184020
  created_at: string;
182058
184021
  id: string;
@@ -182066,6 +184029,7 @@ export declare const deleteCartType: import("@tanstack/start-client-core").Optio
182066
184029
  user_id: string;
182067
184030
  };
182068
184031
  Insert: {
184032
+ change_source?: string;
182069
184033
  connection_id: string;
182070
184034
  created_at?: string;
182071
184035
  id?: string;
@@ -182079,6 +184043,7 @@ export declare const deleteCartType: import("@tanstack/start-client-core").Optio
182079
184043
  user_id: string;
182080
184044
  };
182081
184045
  Update: {
184046
+ change_source?: string;
182082
184047
  connection_id?: string;
182083
184048
  created_at?: string;
182084
184049
  id?: string;
@@ -185679,6 +187644,18 @@ export declare const deleteCartType: import("@tanstack/start-client-core").Optio
185679
187644
  Args: never;
185680
187645
  Returns: number;
185681
187646
  };
187647
+ calculate_floriday_desired_stock: {
187648
+ Args: {
187649
+ p_connection_id: string;
187650
+ p_product_id: string;
187651
+ };
187652
+ Returns: {
187653
+ desired_availability: boolean;
187654
+ desired_quantity: number;
187655
+ erp_available: number;
187656
+ stock_mode: string;
187657
+ }[];
187658
+ };
185682
187659
  calculate_layer_stock: {
185683
187660
  Args: {
185684
187661
  p_product_id: string;
@@ -185773,6 +187750,7 @@ export declare const deleteCartType: import("@tanstack/start-client-core").Optio
185773
187750
  attempts: number;
185774
187751
  connection_id: string;
185775
187752
  created_at: string;
187753
+ dead_lettered_at: string | null;
185776
187754
  desired_available: boolean | null;
185777
187755
  gateway_attempt_id: string | null;
185778
187756
  id: string;
@@ -185781,9 +187759,13 @@ export declare const deleteCartType: import("@tanstack/start-client-core").Optio
185781
187759
  locked_by: string | null;
185782
187760
  next_attempt_at: string;
185783
187761
  number_of_pieces: number;
187762
+ product_id: string | null;
185784
187763
  sent_at: string | null;
185785
187764
  status: string;
187765
+ stock_mode: string | null;
185786
187766
  superseded_by: string | null;
187767
+ target_week: number | null;
187768
+ target_year: number | null;
185787
187769
  trade_item_id: string;
185788
187770
  updated_at: string;
185789
187771
  user_id: string;
@@ -186264,6 +188246,24 @@ export declare const deleteCartType: import("@tanstack/start-client-core").Optio
186264
188246
  };
186265
188247
  Returns: string;
186266
188248
  };
188249
+ floriday_capture_stock_snapshot: {
188250
+ Args: never;
188251
+ Returns: number;
188252
+ };
188253
+ floriday_cleanup_stock_queue_v2: {
188254
+ Args: never;
188255
+ Returns: undefined;
188256
+ };
188257
+ floriday_compact_stock_snapshots: {
188258
+ Args: never;
188259
+ Returns: undefined;
188260
+ };
188261
+ floriday_default_owner: {
188262
+ Args: {
188263
+ p_connection_id: string;
188264
+ };
188265
+ Returns: string;
188266
+ };
186267
188267
  floriday_effective_price: {
186268
188268
  Args: {
186269
188269
  _buyer_id: string;
@@ -186281,6 +188281,22 @@ export declare const deleteCartType: import("@tanstack/start-client-core").Optio
186281
188281
  source_id: string;
186282
188282
  }[];
186283
188283
  };
188284
+ floriday_fill_publish_horizon: {
188285
+ Args: never;
188286
+ Returns: number;
188287
+ };
188288
+ floriday_publish_horizon_weeks: {
188289
+ Args: never;
188290
+ Returns: number;
188291
+ };
188292
+ floriday_recompute_inventory: {
188293
+ Args: {
188294
+ p_connection_id: string;
188295
+ p_force?: boolean;
188296
+ p_product_id: string;
188297
+ };
188298
+ Returns: undefined;
188299
+ };
186284
188300
  format_cart_number: {
186285
188301
  Args: {
186286
188302
  p_pick_date: string;
@@ -194917,6 +196933,7 @@ export declare const setDefaultCartType: import("@tanstack/start-client-core").O
194917
196933
  attempts: number;
194918
196934
  connection_id: string;
194919
196935
  created_at: string;
196936
+ dead_lettered_at: string | null;
194920
196937
  desired_available: boolean | null;
194921
196938
  gateway_attempt_id: string | null;
194922
196939
  id: string;
@@ -194925,9 +196942,13 @@ export declare const setDefaultCartType: import("@tanstack/start-client-core").O
194925
196942
  locked_by: string | null;
194926
196943
  next_attempt_at: string;
194927
196944
  number_of_pieces: number;
196945
+ product_id: string | null;
194928
196946
  sent_at: string | null;
194929
196947
  status: string;
196948
+ stock_mode: string | null;
194930
196949
  superseded_by: string | null;
196950
+ target_week: number | null;
196951
+ target_year: number | null;
194931
196952
  trade_item_id: string;
194932
196953
  updated_at: string;
194933
196954
  user_id: string;
@@ -194936,6 +196957,7 @@ export declare const setDefaultCartType: import("@tanstack/start-client-core").O
194936
196957
  attempts?: number;
194937
196958
  connection_id: string;
194938
196959
  created_at?: string;
196960
+ dead_lettered_at?: string | null;
194939
196961
  desired_available?: boolean | null;
194940
196962
  gateway_attempt_id?: string | null;
194941
196963
  id?: string;
@@ -194944,9 +196966,13 @@ export declare const setDefaultCartType: import("@tanstack/start-client-core").O
194944
196966
  locked_by?: string | null;
194945
196967
  next_attempt_at?: string;
194946
196968
  number_of_pieces?: number;
196969
+ product_id?: string | null;
194947
196970
  sent_at?: string | null;
194948
196971
  status?: string;
196972
+ stock_mode?: string | null;
194949
196973
  superseded_by?: string | null;
196974
+ target_week?: number | null;
196975
+ target_year?: number | null;
194950
196976
  trade_item_id: string;
194951
196977
  updated_at?: string;
194952
196978
  user_id: string;
@@ -194955,6 +196981,7 @@ export declare const setDefaultCartType: import("@tanstack/start-client-core").O
194955
196981
  attempts?: number;
194956
196982
  connection_id?: string;
194957
196983
  created_at?: string;
196984
+ dead_lettered_at?: string | null;
194958
196985
  desired_available?: boolean | null;
194959
196986
  gateway_attempt_id?: string | null;
194960
196987
  id?: string;
@@ -194963,9 +196990,13 @@ export declare const setDefaultCartType: import("@tanstack/start-client-core").O
194963
196990
  locked_by?: string | null;
194964
196991
  next_attempt_at?: string;
194965
196992
  number_of_pieces?: number;
196993
+ product_id?: string | null;
194966
196994
  sent_at?: string | null;
194967
196995
  status?: string;
196996
+ stock_mode?: string | null;
194968
196997
  superseded_by?: string | null;
196998
+ target_week?: number | null;
196999
+ target_year?: number | null;
194969
197000
  trade_item_id?: string;
194970
197001
  updated_at?: string;
194971
197002
  user_id?: string;
@@ -195374,6 +197405,87 @@ export declare const setDefaultCartType: import("@tanstack/start-client-core").O
195374
197405
  referencedColumns: ["id"];
195375
197406
  }];
195376
197407
  };
197408
+ floriday_inventory_settings: {
197409
+ Row: {
197410
+ buffer_quantity: number;
197411
+ connection_id: string;
197412
+ created_at: string;
197413
+ desired_availability: boolean;
197414
+ desired_quantity: number;
197415
+ fixed_quantity: number | null;
197416
+ floriday_trade_item_id: string | null;
197417
+ id: string;
197418
+ last_confirmed_at: string | null;
197419
+ last_enqueued_at: string | null;
197420
+ last_published_at: string | null;
197421
+ last_sync_error: string | null;
197422
+ manual_quantity: number | null;
197423
+ maximum_quantity: number | null;
197424
+ product_id: string;
197425
+ quantity_control: string;
197426
+ remote_available: boolean | null;
197427
+ remote_checked_at: string | null;
197428
+ remote_quantity: number | null;
197429
+ stock_mode: string;
197430
+ sync_status: string;
197431
+ updated_at: string;
197432
+ updated_by: string | null;
197433
+ user_id: string;
197434
+ };
197435
+ Insert: {
197436
+ buffer_quantity?: number;
197437
+ connection_id: string;
197438
+ created_at?: string;
197439
+ desired_availability?: boolean;
197440
+ desired_quantity?: number;
197441
+ fixed_quantity?: number | null;
197442
+ floriday_trade_item_id?: string | null;
197443
+ id?: string;
197444
+ last_confirmed_at?: string | null;
197445
+ last_enqueued_at?: string | null;
197446
+ last_published_at?: string | null;
197447
+ last_sync_error?: string | null;
197448
+ manual_quantity?: number | null;
197449
+ maximum_quantity?: number | null;
197450
+ product_id: string;
197451
+ quantity_control?: string;
197452
+ remote_available?: boolean | null;
197453
+ remote_checked_at?: string | null;
197454
+ remote_quantity?: number | null;
197455
+ stock_mode?: string;
197456
+ sync_status?: string;
197457
+ updated_at?: string;
197458
+ updated_by?: string | null;
197459
+ user_id: string;
197460
+ };
197461
+ Update: {
197462
+ buffer_quantity?: number;
197463
+ connection_id?: string;
197464
+ created_at?: string;
197465
+ desired_availability?: boolean;
197466
+ desired_quantity?: number;
197467
+ fixed_quantity?: number | null;
197468
+ floriday_trade_item_id?: string | null;
197469
+ id?: string;
197470
+ last_confirmed_at?: string | null;
197471
+ last_enqueued_at?: string | null;
197472
+ last_published_at?: string | null;
197473
+ last_sync_error?: string | null;
197474
+ manual_quantity?: number | null;
197475
+ maximum_quantity?: number | null;
197476
+ product_id?: string;
197477
+ quantity_control?: string;
197478
+ remote_available?: boolean | null;
197479
+ remote_checked_at?: string | null;
197480
+ remote_quantity?: number | null;
197481
+ stock_mode?: string;
197482
+ sync_status?: string;
197483
+ updated_at?: string;
197484
+ updated_by?: string | null;
197485
+ user_id?: string;
197486
+ };
197487
+ Relationships: [];
197488
+ };
195377
197489
  floriday_invoices_cache: {
195378
197490
  Row: {
195379
197491
  buyer_organization_id: string | null;
@@ -195662,6 +197774,39 @@ export declare const setDefaultCartType: import("@tanstack/start-client-core").O
195662
197774
  };
195663
197775
  Relationships: [];
195664
197776
  };
197777
+ floriday_sales_order_ingest: {
197778
+ Row: {
197779
+ connection_id: string;
197780
+ created_at: string;
197781
+ id: string;
197782
+ impact: import("../integrations/supabase/types").Json;
197783
+ order_status: string | null;
197784
+ order_version: number;
197785
+ processed_at: string;
197786
+ sales_order_id: string;
197787
+ };
197788
+ Insert: {
197789
+ connection_id: string;
197790
+ created_at?: string;
197791
+ id?: string;
197792
+ impact?: import("../integrations/supabase/types").Json;
197793
+ order_status?: string | null;
197794
+ order_version?: number;
197795
+ processed_at?: string;
197796
+ sales_order_id: string;
197797
+ };
197798
+ Update: {
197799
+ connection_id?: string;
197800
+ created_at?: string;
197801
+ id?: string;
197802
+ impact?: import("../integrations/supabase/types").Json;
197803
+ order_status?: string | null;
197804
+ order_version?: number;
197805
+ processed_at?: string;
197806
+ sales_order_id?: string;
197807
+ };
197808
+ Relationships: [];
197809
+ };
195665
197810
  floriday_sales_strategies_cache: {
195666
197811
  Row: {
195667
197812
  connection_id: string;
@@ -195761,6 +197906,39 @@ export declare const setDefaultCartType: import("@tanstack/start-client-core").O
195761
197906
  };
195762
197907
  Relationships: [];
195763
197908
  };
197909
+ floriday_sync_cursors: {
197910
+ Row: {
197911
+ connection_id: string;
197912
+ created_at: string;
197913
+ id: string;
197914
+ last_error: string | null;
197915
+ last_sync_at: string | null;
197916
+ resource_type: string;
197917
+ sequence_number: number;
197918
+ updated_at: string;
197919
+ };
197920
+ Insert: {
197921
+ connection_id: string;
197922
+ created_at?: string;
197923
+ id?: string;
197924
+ last_error?: string | null;
197925
+ last_sync_at?: string | null;
197926
+ resource_type: string;
197927
+ sequence_number?: number;
197928
+ updated_at?: string;
197929
+ };
197930
+ Update: {
197931
+ connection_id?: string;
197932
+ created_at?: string;
197933
+ id?: string;
197934
+ last_error?: string | null;
197935
+ last_sync_at?: string | null;
197936
+ resource_type?: string;
197937
+ sequence_number?: number;
197938
+ updated_at?: string;
197939
+ };
197940
+ Relationships: [];
197941
+ };
195764
197942
  floriday_sync_state: {
195765
197943
  Row: {
195766
197944
  connection_id: string;
@@ -196451,6 +198629,42 @@ export declare const setDefaultCartType: import("@tanstack/start-client-core").O
196451
198629
  };
196452
198630
  Relationships: [];
196453
198631
  };
198632
+ inventory_stock_snapshots: {
198633
+ Row: {
198634
+ connection_id: string;
198635
+ created_at: string;
198636
+ erp_available_quantity: number;
198637
+ floriday_desired_quantity: number;
198638
+ floriday_remote_quantity: number | null;
198639
+ granularity: string;
198640
+ id: string;
198641
+ snapshot_at: string;
198642
+ user_id: string | null;
198643
+ };
198644
+ Insert: {
198645
+ connection_id: string;
198646
+ created_at?: string;
198647
+ erp_available_quantity?: number;
198648
+ floriday_desired_quantity?: number;
198649
+ floriday_remote_quantity?: number | null;
198650
+ granularity?: string;
198651
+ id?: string;
198652
+ snapshot_at?: string;
198653
+ user_id?: string | null;
198654
+ };
198655
+ Update: {
198656
+ connection_id?: string;
198657
+ created_at?: string;
198658
+ erp_available_quantity?: number;
198659
+ floriday_desired_quantity?: number;
198660
+ floriday_remote_quantity?: number | null;
198661
+ granularity?: string;
198662
+ id?: string;
198663
+ snapshot_at?: string;
198664
+ user_id?: string | null;
198665
+ };
198666
+ Relationships: [];
198667
+ };
196454
198668
  invoice_items: {
196455
198669
  Row: {
196456
198670
  created_at: string;
@@ -205645,6 +207859,7 @@ export declare const setDefaultCartType: import("@tanstack/start-client-core").O
205645
207859
  };
205646
207860
  trade_item_stock: {
205647
207861
  Row: {
207862
+ change_source: string;
205648
207863
  connection_id: string;
205649
207864
  created_at: string;
205650
207865
  id: string;
@@ -205658,6 +207873,7 @@ export declare const setDefaultCartType: import("@tanstack/start-client-core").O
205658
207873
  user_id: string;
205659
207874
  };
205660
207875
  Insert: {
207876
+ change_source?: string;
205661
207877
  connection_id: string;
205662
207878
  created_at?: string;
205663
207879
  id?: string;
@@ -205671,6 +207887,7 @@ export declare const setDefaultCartType: import("@tanstack/start-client-core").O
205671
207887
  user_id: string;
205672
207888
  };
205673
207889
  Update: {
207890
+ change_source?: string;
205674
207891
  connection_id?: string;
205675
207892
  created_at?: string;
205676
207893
  id?: string;
@@ -209271,6 +211488,18 @@ export declare const setDefaultCartType: import("@tanstack/start-client-core").O
209271
211488
  Args: never;
209272
211489
  Returns: number;
209273
211490
  };
211491
+ calculate_floriday_desired_stock: {
211492
+ Args: {
211493
+ p_connection_id: string;
211494
+ p_product_id: string;
211495
+ };
211496
+ Returns: {
211497
+ desired_availability: boolean;
211498
+ desired_quantity: number;
211499
+ erp_available: number;
211500
+ stock_mode: string;
211501
+ }[];
211502
+ };
209274
211503
  calculate_layer_stock: {
209275
211504
  Args: {
209276
211505
  p_product_id: string;
@@ -209365,6 +211594,7 @@ export declare const setDefaultCartType: import("@tanstack/start-client-core").O
209365
211594
  attempts: number;
209366
211595
  connection_id: string;
209367
211596
  created_at: string;
211597
+ dead_lettered_at: string | null;
209368
211598
  desired_available: boolean | null;
209369
211599
  gateway_attempt_id: string | null;
209370
211600
  id: string;
@@ -209373,9 +211603,13 @@ export declare const setDefaultCartType: import("@tanstack/start-client-core").O
209373
211603
  locked_by: string | null;
209374
211604
  next_attempt_at: string;
209375
211605
  number_of_pieces: number;
211606
+ product_id: string | null;
209376
211607
  sent_at: string | null;
209377
211608
  status: string;
211609
+ stock_mode: string | null;
209378
211610
  superseded_by: string | null;
211611
+ target_week: number | null;
211612
+ target_year: number | null;
209379
211613
  trade_item_id: string;
209380
211614
  updated_at: string;
209381
211615
  user_id: string;
@@ -209856,6 +212090,24 @@ export declare const setDefaultCartType: import("@tanstack/start-client-core").O
209856
212090
  };
209857
212091
  Returns: string;
209858
212092
  };
212093
+ floriday_capture_stock_snapshot: {
212094
+ Args: never;
212095
+ Returns: number;
212096
+ };
212097
+ floriday_cleanup_stock_queue_v2: {
212098
+ Args: never;
212099
+ Returns: undefined;
212100
+ };
212101
+ floriday_compact_stock_snapshots: {
212102
+ Args: never;
212103
+ Returns: undefined;
212104
+ };
212105
+ floriday_default_owner: {
212106
+ Args: {
212107
+ p_connection_id: string;
212108
+ };
212109
+ Returns: string;
212110
+ };
209859
212111
  floriday_effective_price: {
209860
212112
  Args: {
209861
212113
  _buyer_id: string;
@@ -209873,6 +212125,22 @@ export declare const setDefaultCartType: import("@tanstack/start-client-core").O
209873
212125
  source_id: string;
209874
212126
  }[];
209875
212127
  };
212128
+ floriday_fill_publish_horizon: {
212129
+ Args: never;
212130
+ Returns: number;
212131
+ };
212132
+ floriday_publish_horizon_weeks: {
212133
+ Args: never;
212134
+ Returns: number;
212135
+ };
212136
+ floriday_recompute_inventory: {
212137
+ Args: {
212138
+ p_connection_id: string;
212139
+ p_force?: boolean;
212140
+ p_product_id: string;
212141
+ };
212142
+ Returns: undefined;
212143
+ };
209876
212144
  format_cart_number: {
209877
212145
  Args: {
209878
212146
  p_pick_date: string;
@@ -218509,6 +220777,7 @@ export declare const upsertCrateType: import("@tanstack/start-client-core").Opti
218509
220777
  attempts: number;
218510
220778
  connection_id: string;
218511
220779
  created_at: string;
220780
+ dead_lettered_at: string | null;
218512
220781
  desired_available: boolean | null;
218513
220782
  gateway_attempt_id: string | null;
218514
220783
  id: string;
@@ -218517,9 +220786,13 @@ export declare const upsertCrateType: import("@tanstack/start-client-core").Opti
218517
220786
  locked_by: string | null;
218518
220787
  next_attempt_at: string;
218519
220788
  number_of_pieces: number;
220789
+ product_id: string | null;
218520
220790
  sent_at: string | null;
218521
220791
  status: string;
220792
+ stock_mode: string | null;
218522
220793
  superseded_by: string | null;
220794
+ target_week: number | null;
220795
+ target_year: number | null;
218523
220796
  trade_item_id: string;
218524
220797
  updated_at: string;
218525
220798
  user_id: string;
@@ -218528,6 +220801,7 @@ export declare const upsertCrateType: import("@tanstack/start-client-core").Opti
218528
220801
  attempts?: number;
218529
220802
  connection_id: string;
218530
220803
  created_at?: string;
220804
+ dead_lettered_at?: string | null;
218531
220805
  desired_available?: boolean | null;
218532
220806
  gateway_attempt_id?: string | null;
218533
220807
  id?: string;
@@ -218536,9 +220810,13 @@ export declare const upsertCrateType: import("@tanstack/start-client-core").Opti
218536
220810
  locked_by?: string | null;
218537
220811
  next_attempt_at?: string;
218538
220812
  number_of_pieces?: number;
220813
+ product_id?: string | null;
218539
220814
  sent_at?: string | null;
218540
220815
  status?: string;
220816
+ stock_mode?: string | null;
218541
220817
  superseded_by?: string | null;
220818
+ target_week?: number | null;
220819
+ target_year?: number | null;
218542
220820
  trade_item_id: string;
218543
220821
  updated_at?: string;
218544
220822
  user_id: string;
@@ -218547,6 +220825,7 @@ export declare const upsertCrateType: import("@tanstack/start-client-core").Opti
218547
220825
  attempts?: number;
218548
220826
  connection_id?: string;
218549
220827
  created_at?: string;
220828
+ dead_lettered_at?: string | null;
218550
220829
  desired_available?: boolean | null;
218551
220830
  gateway_attempt_id?: string | null;
218552
220831
  id?: string;
@@ -218555,9 +220834,13 @@ export declare const upsertCrateType: import("@tanstack/start-client-core").Opti
218555
220834
  locked_by?: string | null;
218556
220835
  next_attempt_at?: string;
218557
220836
  number_of_pieces?: number;
220837
+ product_id?: string | null;
218558
220838
  sent_at?: string | null;
218559
220839
  status?: string;
220840
+ stock_mode?: string | null;
218560
220841
  superseded_by?: string | null;
220842
+ target_week?: number | null;
220843
+ target_year?: number | null;
218561
220844
  trade_item_id?: string;
218562
220845
  updated_at?: string;
218563
220846
  user_id?: string;
@@ -218966,6 +221249,87 @@ export declare const upsertCrateType: import("@tanstack/start-client-core").Opti
218966
221249
  referencedColumns: ["id"];
218967
221250
  }];
218968
221251
  };
221252
+ floriday_inventory_settings: {
221253
+ Row: {
221254
+ buffer_quantity: number;
221255
+ connection_id: string;
221256
+ created_at: string;
221257
+ desired_availability: boolean;
221258
+ desired_quantity: number;
221259
+ fixed_quantity: number | null;
221260
+ floriday_trade_item_id: string | null;
221261
+ id: string;
221262
+ last_confirmed_at: string | null;
221263
+ last_enqueued_at: string | null;
221264
+ last_published_at: string | null;
221265
+ last_sync_error: string | null;
221266
+ manual_quantity: number | null;
221267
+ maximum_quantity: number | null;
221268
+ product_id: string;
221269
+ quantity_control: string;
221270
+ remote_available: boolean | null;
221271
+ remote_checked_at: string | null;
221272
+ remote_quantity: number | null;
221273
+ stock_mode: string;
221274
+ sync_status: string;
221275
+ updated_at: string;
221276
+ updated_by: string | null;
221277
+ user_id: string;
221278
+ };
221279
+ Insert: {
221280
+ buffer_quantity?: number;
221281
+ connection_id: string;
221282
+ created_at?: string;
221283
+ desired_availability?: boolean;
221284
+ desired_quantity?: number;
221285
+ fixed_quantity?: number | null;
221286
+ floriday_trade_item_id?: string | null;
221287
+ id?: string;
221288
+ last_confirmed_at?: string | null;
221289
+ last_enqueued_at?: string | null;
221290
+ last_published_at?: string | null;
221291
+ last_sync_error?: string | null;
221292
+ manual_quantity?: number | null;
221293
+ maximum_quantity?: number | null;
221294
+ product_id: string;
221295
+ quantity_control?: string;
221296
+ remote_available?: boolean | null;
221297
+ remote_checked_at?: string | null;
221298
+ remote_quantity?: number | null;
221299
+ stock_mode?: string;
221300
+ sync_status?: string;
221301
+ updated_at?: string;
221302
+ updated_by?: string | null;
221303
+ user_id: string;
221304
+ };
221305
+ Update: {
221306
+ buffer_quantity?: number;
221307
+ connection_id?: string;
221308
+ created_at?: string;
221309
+ desired_availability?: boolean;
221310
+ desired_quantity?: number;
221311
+ fixed_quantity?: number | null;
221312
+ floriday_trade_item_id?: string | null;
221313
+ id?: string;
221314
+ last_confirmed_at?: string | null;
221315
+ last_enqueued_at?: string | null;
221316
+ last_published_at?: string | null;
221317
+ last_sync_error?: string | null;
221318
+ manual_quantity?: number | null;
221319
+ maximum_quantity?: number | null;
221320
+ product_id?: string;
221321
+ quantity_control?: string;
221322
+ remote_available?: boolean | null;
221323
+ remote_checked_at?: string | null;
221324
+ remote_quantity?: number | null;
221325
+ stock_mode?: string;
221326
+ sync_status?: string;
221327
+ updated_at?: string;
221328
+ updated_by?: string | null;
221329
+ user_id?: string;
221330
+ };
221331
+ Relationships: [];
221332
+ };
218969
221333
  floriday_invoices_cache: {
218970
221334
  Row: {
218971
221335
  buyer_organization_id: string | null;
@@ -219254,6 +221618,39 @@ export declare const upsertCrateType: import("@tanstack/start-client-core").Opti
219254
221618
  };
219255
221619
  Relationships: [];
219256
221620
  };
221621
+ floriday_sales_order_ingest: {
221622
+ Row: {
221623
+ connection_id: string;
221624
+ created_at: string;
221625
+ id: string;
221626
+ impact: import("../integrations/supabase/types").Json;
221627
+ order_status: string | null;
221628
+ order_version: number;
221629
+ processed_at: string;
221630
+ sales_order_id: string;
221631
+ };
221632
+ Insert: {
221633
+ connection_id: string;
221634
+ created_at?: string;
221635
+ id?: string;
221636
+ impact?: import("../integrations/supabase/types").Json;
221637
+ order_status?: string | null;
221638
+ order_version?: number;
221639
+ processed_at?: string;
221640
+ sales_order_id: string;
221641
+ };
221642
+ Update: {
221643
+ connection_id?: string;
221644
+ created_at?: string;
221645
+ id?: string;
221646
+ impact?: import("../integrations/supabase/types").Json;
221647
+ order_status?: string | null;
221648
+ order_version?: number;
221649
+ processed_at?: string;
221650
+ sales_order_id?: string;
221651
+ };
221652
+ Relationships: [];
221653
+ };
219257
221654
  floriday_sales_strategies_cache: {
219258
221655
  Row: {
219259
221656
  connection_id: string;
@@ -219353,6 +221750,39 @@ export declare const upsertCrateType: import("@tanstack/start-client-core").Opti
219353
221750
  };
219354
221751
  Relationships: [];
219355
221752
  };
221753
+ floriday_sync_cursors: {
221754
+ Row: {
221755
+ connection_id: string;
221756
+ created_at: string;
221757
+ id: string;
221758
+ last_error: string | null;
221759
+ last_sync_at: string | null;
221760
+ resource_type: string;
221761
+ sequence_number: number;
221762
+ updated_at: string;
221763
+ };
221764
+ Insert: {
221765
+ connection_id: string;
221766
+ created_at?: string;
221767
+ id?: string;
221768
+ last_error?: string | null;
221769
+ last_sync_at?: string | null;
221770
+ resource_type: string;
221771
+ sequence_number?: number;
221772
+ updated_at?: string;
221773
+ };
221774
+ Update: {
221775
+ connection_id?: string;
221776
+ created_at?: string;
221777
+ id?: string;
221778
+ last_error?: string | null;
221779
+ last_sync_at?: string | null;
221780
+ resource_type?: string;
221781
+ sequence_number?: number;
221782
+ updated_at?: string;
221783
+ };
221784
+ Relationships: [];
221785
+ };
219356
221786
  floriday_sync_state: {
219357
221787
  Row: {
219358
221788
  connection_id: string;
@@ -220043,6 +222473,42 @@ export declare const upsertCrateType: import("@tanstack/start-client-core").Opti
220043
222473
  };
220044
222474
  Relationships: [];
220045
222475
  };
222476
+ inventory_stock_snapshots: {
222477
+ Row: {
222478
+ connection_id: string;
222479
+ created_at: string;
222480
+ erp_available_quantity: number;
222481
+ floriday_desired_quantity: number;
222482
+ floriday_remote_quantity: number | null;
222483
+ granularity: string;
222484
+ id: string;
222485
+ snapshot_at: string;
222486
+ user_id: string | null;
222487
+ };
222488
+ Insert: {
222489
+ connection_id: string;
222490
+ created_at?: string;
222491
+ erp_available_quantity?: number;
222492
+ floriday_desired_quantity?: number;
222493
+ floriday_remote_quantity?: number | null;
222494
+ granularity?: string;
222495
+ id?: string;
222496
+ snapshot_at?: string;
222497
+ user_id?: string | null;
222498
+ };
222499
+ Update: {
222500
+ connection_id?: string;
222501
+ created_at?: string;
222502
+ erp_available_quantity?: number;
222503
+ floriday_desired_quantity?: number;
222504
+ floriday_remote_quantity?: number | null;
222505
+ granularity?: string;
222506
+ id?: string;
222507
+ snapshot_at?: string;
222508
+ user_id?: string | null;
222509
+ };
222510
+ Relationships: [];
222511
+ };
220046
222512
  invoice_items: {
220047
222513
  Row: {
220048
222514
  created_at: string;
@@ -229237,6 +231703,7 @@ export declare const upsertCrateType: import("@tanstack/start-client-core").Opti
229237
231703
  };
229238
231704
  trade_item_stock: {
229239
231705
  Row: {
231706
+ change_source: string;
229240
231707
  connection_id: string;
229241
231708
  created_at: string;
229242
231709
  id: string;
@@ -229250,6 +231717,7 @@ export declare const upsertCrateType: import("@tanstack/start-client-core").Opti
229250
231717
  user_id: string;
229251
231718
  };
229252
231719
  Insert: {
231720
+ change_source?: string;
229253
231721
  connection_id: string;
229254
231722
  created_at?: string;
229255
231723
  id?: string;
@@ -229263,6 +231731,7 @@ export declare const upsertCrateType: import("@tanstack/start-client-core").Opti
229263
231731
  user_id: string;
229264
231732
  };
229265
231733
  Update: {
231734
+ change_source?: string;
229266
231735
  connection_id?: string;
229267
231736
  created_at?: string;
229268
231737
  id?: string;
@@ -232863,6 +235332,18 @@ export declare const upsertCrateType: import("@tanstack/start-client-core").Opti
232863
235332
  Args: never;
232864
235333
  Returns: number;
232865
235334
  };
235335
+ calculate_floriday_desired_stock: {
235336
+ Args: {
235337
+ p_connection_id: string;
235338
+ p_product_id: string;
235339
+ };
235340
+ Returns: {
235341
+ desired_availability: boolean;
235342
+ desired_quantity: number;
235343
+ erp_available: number;
235344
+ stock_mode: string;
235345
+ }[];
235346
+ };
232866
235347
  calculate_layer_stock: {
232867
235348
  Args: {
232868
235349
  p_product_id: string;
@@ -232957,6 +235438,7 @@ export declare const upsertCrateType: import("@tanstack/start-client-core").Opti
232957
235438
  attempts: number;
232958
235439
  connection_id: string;
232959
235440
  created_at: string;
235441
+ dead_lettered_at: string | null;
232960
235442
  desired_available: boolean | null;
232961
235443
  gateway_attempt_id: string | null;
232962
235444
  id: string;
@@ -232965,9 +235447,13 @@ export declare const upsertCrateType: import("@tanstack/start-client-core").Opti
232965
235447
  locked_by: string | null;
232966
235448
  next_attempt_at: string;
232967
235449
  number_of_pieces: number;
235450
+ product_id: string | null;
232968
235451
  sent_at: string | null;
232969
235452
  status: string;
235453
+ stock_mode: string | null;
232970
235454
  superseded_by: string | null;
235455
+ target_week: number | null;
235456
+ target_year: number | null;
232971
235457
  trade_item_id: string;
232972
235458
  updated_at: string;
232973
235459
  user_id: string;
@@ -233448,6 +235934,24 @@ export declare const upsertCrateType: import("@tanstack/start-client-core").Opti
233448
235934
  };
233449
235935
  Returns: string;
233450
235936
  };
235937
+ floriday_capture_stock_snapshot: {
235938
+ Args: never;
235939
+ Returns: number;
235940
+ };
235941
+ floriday_cleanup_stock_queue_v2: {
235942
+ Args: never;
235943
+ Returns: undefined;
235944
+ };
235945
+ floriday_compact_stock_snapshots: {
235946
+ Args: never;
235947
+ Returns: undefined;
235948
+ };
235949
+ floriday_default_owner: {
235950
+ Args: {
235951
+ p_connection_id: string;
235952
+ };
235953
+ Returns: string;
235954
+ };
233451
235955
  floriday_effective_price: {
233452
235956
  Args: {
233453
235957
  _buyer_id: string;
@@ -233465,6 +235969,22 @@ export declare const upsertCrateType: import("@tanstack/start-client-core").Opti
233465
235969
  source_id: string;
233466
235970
  }[];
233467
235971
  };
235972
+ floriday_fill_publish_horizon: {
235973
+ Args: never;
235974
+ Returns: number;
235975
+ };
235976
+ floriday_publish_horizon_weeks: {
235977
+ Args: never;
235978
+ Returns: number;
235979
+ };
235980
+ floriday_recompute_inventory: {
235981
+ Args: {
235982
+ p_connection_id: string;
235983
+ p_force?: boolean;
235984
+ p_product_id: string;
235985
+ };
235986
+ Returns: undefined;
235987
+ };
233468
235988
  format_cart_number: {
233469
235989
  Args: {
233470
235990
  p_pick_date: string;
@@ -242105,6 +244625,7 @@ export declare const deleteCrateType: import("@tanstack/start-client-core").Opti
242105
244625
  attempts: number;
242106
244626
  connection_id: string;
242107
244627
  created_at: string;
244628
+ dead_lettered_at: string | null;
242108
244629
  desired_available: boolean | null;
242109
244630
  gateway_attempt_id: string | null;
242110
244631
  id: string;
@@ -242113,9 +244634,13 @@ export declare const deleteCrateType: import("@tanstack/start-client-core").Opti
242113
244634
  locked_by: string | null;
242114
244635
  next_attempt_at: string;
242115
244636
  number_of_pieces: number;
244637
+ product_id: string | null;
242116
244638
  sent_at: string | null;
242117
244639
  status: string;
244640
+ stock_mode: string | null;
242118
244641
  superseded_by: string | null;
244642
+ target_week: number | null;
244643
+ target_year: number | null;
242119
244644
  trade_item_id: string;
242120
244645
  updated_at: string;
242121
244646
  user_id: string;
@@ -242124,6 +244649,7 @@ export declare const deleteCrateType: import("@tanstack/start-client-core").Opti
242124
244649
  attempts?: number;
242125
244650
  connection_id: string;
242126
244651
  created_at?: string;
244652
+ dead_lettered_at?: string | null;
242127
244653
  desired_available?: boolean | null;
242128
244654
  gateway_attempt_id?: string | null;
242129
244655
  id?: string;
@@ -242132,9 +244658,13 @@ export declare const deleteCrateType: import("@tanstack/start-client-core").Opti
242132
244658
  locked_by?: string | null;
242133
244659
  next_attempt_at?: string;
242134
244660
  number_of_pieces?: number;
244661
+ product_id?: string | null;
242135
244662
  sent_at?: string | null;
242136
244663
  status?: string;
244664
+ stock_mode?: string | null;
242137
244665
  superseded_by?: string | null;
244666
+ target_week?: number | null;
244667
+ target_year?: number | null;
242138
244668
  trade_item_id: string;
242139
244669
  updated_at?: string;
242140
244670
  user_id: string;
@@ -242143,6 +244673,7 @@ export declare const deleteCrateType: import("@tanstack/start-client-core").Opti
242143
244673
  attempts?: number;
242144
244674
  connection_id?: string;
242145
244675
  created_at?: string;
244676
+ dead_lettered_at?: string | null;
242146
244677
  desired_available?: boolean | null;
242147
244678
  gateway_attempt_id?: string | null;
242148
244679
  id?: string;
@@ -242151,9 +244682,13 @@ export declare const deleteCrateType: import("@tanstack/start-client-core").Opti
242151
244682
  locked_by?: string | null;
242152
244683
  next_attempt_at?: string;
242153
244684
  number_of_pieces?: number;
244685
+ product_id?: string | null;
242154
244686
  sent_at?: string | null;
242155
244687
  status?: string;
244688
+ stock_mode?: string | null;
242156
244689
  superseded_by?: string | null;
244690
+ target_week?: number | null;
244691
+ target_year?: number | null;
242157
244692
  trade_item_id?: string;
242158
244693
  updated_at?: string;
242159
244694
  user_id?: string;
@@ -242562,6 +245097,87 @@ export declare const deleteCrateType: import("@tanstack/start-client-core").Opti
242562
245097
  referencedColumns: ["id"];
242563
245098
  }];
242564
245099
  };
245100
+ floriday_inventory_settings: {
245101
+ Row: {
245102
+ buffer_quantity: number;
245103
+ connection_id: string;
245104
+ created_at: string;
245105
+ desired_availability: boolean;
245106
+ desired_quantity: number;
245107
+ fixed_quantity: number | null;
245108
+ floriday_trade_item_id: string | null;
245109
+ id: string;
245110
+ last_confirmed_at: string | null;
245111
+ last_enqueued_at: string | null;
245112
+ last_published_at: string | null;
245113
+ last_sync_error: string | null;
245114
+ manual_quantity: number | null;
245115
+ maximum_quantity: number | null;
245116
+ product_id: string;
245117
+ quantity_control: string;
245118
+ remote_available: boolean | null;
245119
+ remote_checked_at: string | null;
245120
+ remote_quantity: number | null;
245121
+ stock_mode: string;
245122
+ sync_status: string;
245123
+ updated_at: string;
245124
+ updated_by: string | null;
245125
+ user_id: string;
245126
+ };
245127
+ Insert: {
245128
+ buffer_quantity?: number;
245129
+ connection_id: string;
245130
+ created_at?: string;
245131
+ desired_availability?: boolean;
245132
+ desired_quantity?: number;
245133
+ fixed_quantity?: number | null;
245134
+ floriday_trade_item_id?: string | null;
245135
+ id?: string;
245136
+ last_confirmed_at?: string | null;
245137
+ last_enqueued_at?: string | null;
245138
+ last_published_at?: string | null;
245139
+ last_sync_error?: string | null;
245140
+ manual_quantity?: number | null;
245141
+ maximum_quantity?: number | null;
245142
+ product_id: string;
245143
+ quantity_control?: string;
245144
+ remote_available?: boolean | null;
245145
+ remote_checked_at?: string | null;
245146
+ remote_quantity?: number | null;
245147
+ stock_mode?: string;
245148
+ sync_status?: string;
245149
+ updated_at?: string;
245150
+ updated_by?: string | null;
245151
+ user_id: string;
245152
+ };
245153
+ Update: {
245154
+ buffer_quantity?: number;
245155
+ connection_id?: string;
245156
+ created_at?: string;
245157
+ desired_availability?: boolean;
245158
+ desired_quantity?: number;
245159
+ fixed_quantity?: number | null;
245160
+ floriday_trade_item_id?: string | null;
245161
+ id?: string;
245162
+ last_confirmed_at?: string | null;
245163
+ last_enqueued_at?: string | null;
245164
+ last_published_at?: string | null;
245165
+ last_sync_error?: string | null;
245166
+ manual_quantity?: number | null;
245167
+ maximum_quantity?: number | null;
245168
+ product_id?: string;
245169
+ quantity_control?: string;
245170
+ remote_available?: boolean | null;
245171
+ remote_checked_at?: string | null;
245172
+ remote_quantity?: number | null;
245173
+ stock_mode?: string;
245174
+ sync_status?: string;
245175
+ updated_at?: string;
245176
+ updated_by?: string | null;
245177
+ user_id?: string;
245178
+ };
245179
+ Relationships: [];
245180
+ };
242565
245181
  floriday_invoices_cache: {
242566
245182
  Row: {
242567
245183
  buyer_organization_id: string | null;
@@ -242850,6 +245466,39 @@ export declare const deleteCrateType: import("@tanstack/start-client-core").Opti
242850
245466
  };
242851
245467
  Relationships: [];
242852
245468
  };
245469
+ floriday_sales_order_ingest: {
245470
+ Row: {
245471
+ connection_id: string;
245472
+ created_at: string;
245473
+ id: string;
245474
+ impact: import("../integrations/supabase/types").Json;
245475
+ order_status: string | null;
245476
+ order_version: number;
245477
+ processed_at: string;
245478
+ sales_order_id: string;
245479
+ };
245480
+ Insert: {
245481
+ connection_id: string;
245482
+ created_at?: string;
245483
+ id?: string;
245484
+ impact?: import("../integrations/supabase/types").Json;
245485
+ order_status?: string | null;
245486
+ order_version?: number;
245487
+ processed_at?: string;
245488
+ sales_order_id: string;
245489
+ };
245490
+ Update: {
245491
+ connection_id?: string;
245492
+ created_at?: string;
245493
+ id?: string;
245494
+ impact?: import("../integrations/supabase/types").Json;
245495
+ order_status?: string | null;
245496
+ order_version?: number;
245497
+ processed_at?: string;
245498
+ sales_order_id?: string;
245499
+ };
245500
+ Relationships: [];
245501
+ };
242853
245502
  floriday_sales_strategies_cache: {
242854
245503
  Row: {
242855
245504
  connection_id: string;
@@ -242949,6 +245598,39 @@ export declare const deleteCrateType: import("@tanstack/start-client-core").Opti
242949
245598
  };
242950
245599
  Relationships: [];
242951
245600
  };
245601
+ floriday_sync_cursors: {
245602
+ Row: {
245603
+ connection_id: string;
245604
+ created_at: string;
245605
+ id: string;
245606
+ last_error: string | null;
245607
+ last_sync_at: string | null;
245608
+ resource_type: string;
245609
+ sequence_number: number;
245610
+ updated_at: string;
245611
+ };
245612
+ Insert: {
245613
+ connection_id: string;
245614
+ created_at?: string;
245615
+ id?: string;
245616
+ last_error?: string | null;
245617
+ last_sync_at?: string | null;
245618
+ resource_type: string;
245619
+ sequence_number?: number;
245620
+ updated_at?: string;
245621
+ };
245622
+ Update: {
245623
+ connection_id?: string;
245624
+ created_at?: string;
245625
+ id?: string;
245626
+ last_error?: string | null;
245627
+ last_sync_at?: string | null;
245628
+ resource_type?: string;
245629
+ sequence_number?: number;
245630
+ updated_at?: string;
245631
+ };
245632
+ Relationships: [];
245633
+ };
242952
245634
  floriday_sync_state: {
242953
245635
  Row: {
242954
245636
  connection_id: string;
@@ -243639,6 +246321,42 @@ export declare const deleteCrateType: import("@tanstack/start-client-core").Opti
243639
246321
  };
243640
246322
  Relationships: [];
243641
246323
  };
246324
+ inventory_stock_snapshots: {
246325
+ Row: {
246326
+ connection_id: string;
246327
+ created_at: string;
246328
+ erp_available_quantity: number;
246329
+ floriday_desired_quantity: number;
246330
+ floriday_remote_quantity: number | null;
246331
+ granularity: string;
246332
+ id: string;
246333
+ snapshot_at: string;
246334
+ user_id: string | null;
246335
+ };
246336
+ Insert: {
246337
+ connection_id: string;
246338
+ created_at?: string;
246339
+ erp_available_quantity?: number;
246340
+ floriday_desired_quantity?: number;
246341
+ floriday_remote_quantity?: number | null;
246342
+ granularity?: string;
246343
+ id?: string;
246344
+ snapshot_at?: string;
246345
+ user_id?: string | null;
246346
+ };
246347
+ Update: {
246348
+ connection_id?: string;
246349
+ created_at?: string;
246350
+ erp_available_quantity?: number;
246351
+ floriday_desired_quantity?: number;
246352
+ floriday_remote_quantity?: number | null;
246353
+ granularity?: string;
246354
+ id?: string;
246355
+ snapshot_at?: string;
246356
+ user_id?: string | null;
246357
+ };
246358
+ Relationships: [];
246359
+ };
243642
246360
  invoice_items: {
243643
246361
  Row: {
243644
246362
  created_at: string;
@@ -252833,6 +255551,7 @@ export declare const deleteCrateType: import("@tanstack/start-client-core").Opti
252833
255551
  };
252834
255552
  trade_item_stock: {
252835
255553
  Row: {
255554
+ change_source: string;
252836
255555
  connection_id: string;
252837
255556
  created_at: string;
252838
255557
  id: string;
@@ -252846,6 +255565,7 @@ export declare const deleteCrateType: import("@tanstack/start-client-core").Opti
252846
255565
  user_id: string;
252847
255566
  };
252848
255567
  Insert: {
255568
+ change_source?: string;
252849
255569
  connection_id: string;
252850
255570
  created_at?: string;
252851
255571
  id?: string;
@@ -252859,6 +255579,7 @@ export declare const deleteCrateType: import("@tanstack/start-client-core").Opti
252859
255579
  user_id: string;
252860
255580
  };
252861
255581
  Update: {
255582
+ change_source?: string;
252862
255583
  connection_id?: string;
252863
255584
  created_at?: string;
252864
255585
  id?: string;
@@ -256459,6 +259180,18 @@ export declare const deleteCrateType: import("@tanstack/start-client-core").Opti
256459
259180
  Args: never;
256460
259181
  Returns: number;
256461
259182
  };
259183
+ calculate_floriday_desired_stock: {
259184
+ Args: {
259185
+ p_connection_id: string;
259186
+ p_product_id: string;
259187
+ };
259188
+ Returns: {
259189
+ desired_availability: boolean;
259190
+ desired_quantity: number;
259191
+ erp_available: number;
259192
+ stock_mode: string;
259193
+ }[];
259194
+ };
256462
259195
  calculate_layer_stock: {
256463
259196
  Args: {
256464
259197
  p_product_id: string;
@@ -256553,6 +259286,7 @@ export declare const deleteCrateType: import("@tanstack/start-client-core").Opti
256553
259286
  attempts: number;
256554
259287
  connection_id: string;
256555
259288
  created_at: string;
259289
+ dead_lettered_at: string | null;
256556
259290
  desired_available: boolean | null;
256557
259291
  gateway_attempt_id: string | null;
256558
259292
  id: string;
@@ -256561,9 +259295,13 @@ export declare const deleteCrateType: import("@tanstack/start-client-core").Opti
256561
259295
  locked_by: string | null;
256562
259296
  next_attempt_at: string;
256563
259297
  number_of_pieces: number;
259298
+ product_id: string | null;
256564
259299
  sent_at: string | null;
256565
259300
  status: string;
259301
+ stock_mode: string | null;
256566
259302
  superseded_by: string | null;
259303
+ target_week: number | null;
259304
+ target_year: number | null;
256567
259305
  trade_item_id: string;
256568
259306
  updated_at: string;
256569
259307
  user_id: string;
@@ -257044,6 +259782,24 @@ export declare const deleteCrateType: import("@tanstack/start-client-core").Opti
257044
259782
  };
257045
259783
  Returns: string;
257046
259784
  };
259785
+ floriday_capture_stock_snapshot: {
259786
+ Args: never;
259787
+ Returns: number;
259788
+ };
259789
+ floriday_cleanup_stock_queue_v2: {
259790
+ Args: never;
259791
+ Returns: undefined;
259792
+ };
259793
+ floriday_compact_stock_snapshots: {
259794
+ Args: never;
259795
+ Returns: undefined;
259796
+ };
259797
+ floriday_default_owner: {
259798
+ Args: {
259799
+ p_connection_id: string;
259800
+ };
259801
+ Returns: string;
259802
+ };
257047
259803
  floriday_effective_price: {
257048
259804
  Args: {
257049
259805
  _buyer_id: string;
@@ -257061,6 +259817,22 @@ export declare const deleteCrateType: import("@tanstack/start-client-core").Opti
257061
259817
  source_id: string;
257062
259818
  }[];
257063
259819
  };
259820
+ floriday_fill_publish_horizon: {
259821
+ Args: never;
259822
+ Returns: number;
259823
+ };
259824
+ floriday_publish_horizon_weeks: {
259825
+ Args: never;
259826
+ Returns: number;
259827
+ };
259828
+ floriday_recompute_inventory: {
259829
+ Args: {
259830
+ p_connection_id: string;
259831
+ p_force?: boolean;
259832
+ p_product_id: string;
259833
+ };
259834
+ Returns: undefined;
259835
+ };
257064
259836
  format_cart_number: {
257065
259837
  Args: {
257066
259838
  p_pick_date: string;