@flowselections/logistiek-engine 1.0.28 → 1.0.29

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 (34) hide show
  1. package/dist-lib/components/GeblokkeerdeOrdersCard.d.ts +2 -0
  2. package/dist-lib/components/GeblokkeerdeOrdersCard.d.ts.map +1 -0
  3. package/dist-lib/components/GeblokkeerdeOrdersCard.js +44 -0
  4. package/dist-lib/components/RegiePage.d.ts.map +1 -1
  5. package/dist-lib/components/RegiePage.js +2 -1
  6. package/dist-lib/hooks/useGeblokkeerdeOrders.d.ts +28 -0
  7. package/dist-lib/hooks/useGeblokkeerdeOrders.d.ts.map +1 -0
  8. package/dist-lib/hooks/useGeblokkeerdeOrders.js +94 -0
  9. package/dist-lib/index.d.ts +1 -0
  10. package/dist-lib/index.d.ts.map +1 -1
  11. package/dist-lib/index.js +1 -0
  12. package/dist-lib/integrations/supabase/auth-middleware.d.ts +52 -0
  13. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  14. package/dist-lib/integrations/supabase/client.server.d.ts +52 -0
  15. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  16. package/dist-lib/integrations/supabase/moduleClient.d.ts +52 -0
  17. package/dist-lib/integrations/supabase/moduleClient.d.ts.map +1 -1
  18. package/dist-lib/integrations/supabase/types.d.ts +52 -0
  19. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  20. package/dist-lib/lib/floridayDocuments.functions.d.ts +156 -0
  21. package/dist-lib/lib/floridayDocuments.functions.d.ts.map +1 -1
  22. package/dist-lib/lib/floridayPush.functions.d.ts +52 -0
  23. package/dist-lib/lib/floridayPush.functions.d.ts.map +1 -1
  24. package/dist-lib/lib/handlers/logistics-tick.server.d.ts.map +1 -1
  25. package/dist-lib/lib/handlers/logistics-tick.server.js +7 -0
  26. package/dist-lib/lib/loadCarrierPlanning.functions.d.ts +260 -0
  27. package/dist-lib/lib/loadCarrierPlanning.functions.d.ts.map +1 -1
  28. package/dist-lib/lib/loadCarrierPlanning.server.d.ts.map +1 -1
  29. package/dist-lib/lib/loadCarrierPlanning.server.js +23 -3
  30. package/dist-lib/lib/logisticsRecalcJob.functions.d.ts +104 -0
  31. package/dist-lib/lib/logisticsRecalcJob.functions.d.ts.map +1 -1
  32. package/dist-lib/lib/logisticsRecalculate.functions.d.ts +52 -0
  33. package/dist-lib/lib/logisticsRecalculate.functions.d.ts.map +1 -1
  34. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"logistics-tick.server.d.ts","sourceRoot":"","sources":["../../../src/lib/handlers/logistics-tick.server.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAQ5D,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,QAAQ,CAAC,CAkJnB"}
1
+ {"version":3,"file":"logistics-tick.server.d.ts","sourceRoot":"","sources":["../../../src/lib/handlers/logistics-tick.server.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAQ5D,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,QAAQ,CAAC,CA2JnB"}
@@ -32,6 +32,13 @@ export async function handleLogisticsTick(request, supabase) {
32
32
  }
33
33
  // Alle databasetoegang loopt via de meegegeven client (geen gedeelde state).
34
34
  const { tickJob } = await import("../logisticsRecalcJob.server.js");
35
+ // Hartslag: de schermen kunnen zo laten zien of de verwerking nog loopt.
36
+ try {
37
+ await supabase.rpc("logistics_tick_ping");
38
+ }
39
+ catch {
40
+ // Een ontbrekende hartslag mag de verwerking nooit tegenhouden.
41
+ }
35
42
  // Meerdere batches per aanroep, met een ruime marge tot de time-out.
36
43
  const deadline = Date.now() + 8000;
37
44
  let last = null;
@@ -10235,6 +10235,7 @@ export declare const replanOrderLoadCarriers: import("@tanstack/start-client-cor
10235
10235
  next_attempt_at: string;
10236
10236
  order_id: string;
10237
10237
  reason: string;
10238
+ reason_code: string | null;
10238
10239
  status: string;
10239
10240
  updated_at: string;
10240
10241
  };
@@ -10247,6 +10248,7 @@ export declare const replanOrderLoadCarriers: import("@tanstack/start-client-cor
10247
10248
  next_attempt_at?: string;
10248
10249
  order_id: string;
10249
10250
  reason?: string;
10251
+ reason_code?: string | null;
10250
10252
  status?: string;
10251
10253
  updated_at?: string;
10252
10254
  };
@@ -10259,6 +10261,7 @@ export declare const replanOrderLoadCarriers: import("@tanstack/start-client-cor
10259
10261
  next_attempt_at?: string;
10260
10262
  order_id?: string;
10261
10263
  reason?: string;
10264
+ reason_code?: string | null;
10262
10265
  status?: string;
10263
10266
  updated_at?: string;
10264
10267
  };
@@ -10963,6 +10966,21 @@ export declare const replanOrderLoadCarriers: import("@tanstack/start-client-cor
10963
10966
  referencedColumns: ["id"];
10964
10967
  }];
10965
10968
  };
10969
+ logistics_tick_heartbeat: {
10970
+ Row: {
10971
+ id: boolean;
10972
+ last_tick_at: string;
10973
+ };
10974
+ Insert: {
10975
+ id?: boolean;
10976
+ last_tick_at?: string;
10977
+ };
10978
+ Update: {
10979
+ id?: boolean;
10980
+ last_tick_at?: string;
10981
+ };
10982
+ Relationships: [];
10983
+ };
10966
10984
  logistics_variables: {
10967
10985
  Row: {
10968
10986
  created_at: string;
@@ -22845,6 +22863,30 @@ export declare const replanOrderLoadCarriers: import("@tanstack/start-client-cor
22845
22863
  };
22846
22864
  Returns: import("../integrations/supabase/types").Json;
22847
22865
  };
22866
+ logistics_block_reason_code: {
22867
+ Args: {
22868
+ p_details?: import("../integrations/supabase/types").Json;
22869
+ p_reason: string;
22870
+ };
22871
+ Returns: string;
22872
+ };
22873
+ logistics_blocked_orders: {
22874
+ Args: never;
22875
+ Returns: {
22876
+ attempts: number;
22877
+ blocked_since: string;
22878
+ delivery_date: string;
22879
+ order_id: string;
22880
+ order_ref: string;
22881
+ queue_id: string;
22882
+ reason: string;
22883
+ reason_code: string;
22884
+ }[];
22885
+ };
22886
+ logistics_blocked_overview: {
22887
+ Args: never;
22888
+ Returns: import("../integrations/supabase/types").Json;
22889
+ };
22848
22890
  logistics_buffer_criteria: {
22849
22891
  Args: {
22850
22892
  p_settings: import("../integrations/supabase/types").Json;
@@ -23714,6 +23756,12 @@ export declare const replanOrderLoadCarriers: import("@tanstack/start-client-cor
23714
23756
  Args: never;
23715
23757
  Returns: number;
23716
23758
  };
23759
+ logistics_plan_retry: {
23760
+ Args: {
23761
+ p_order_ids: string[];
23762
+ };
23763
+ Returns: number;
23764
+ };
23717
23765
  logistics_plan_setting: {
23718
23766
  Args: {
23719
23767
  p_default: number;
@@ -23949,6 +23997,10 @@ export declare const replanOrderLoadCarriers: import("@tanstack/start-client-cor
23949
23997
  };
23950
23998
  Returns: number;
23951
23999
  };
24000
+ logistics_tick_ping: {
24001
+ Args: never;
24002
+ Returns: string;
24003
+ };
23952
24004
  logistics_upsert_task: {
23953
24005
  Args: {
23954
24006
  p_buffer_ref: string;
@@ -36141,6 +36193,7 @@ export declare const replanBufferLoadCarriers: import("@tanstack/start-client-co
36141
36193
  next_attempt_at: string;
36142
36194
  order_id: string;
36143
36195
  reason: string;
36196
+ reason_code: string | null;
36144
36197
  status: string;
36145
36198
  updated_at: string;
36146
36199
  };
@@ -36153,6 +36206,7 @@ export declare const replanBufferLoadCarriers: import("@tanstack/start-client-co
36153
36206
  next_attempt_at?: string;
36154
36207
  order_id: string;
36155
36208
  reason?: string;
36209
+ reason_code?: string | null;
36156
36210
  status?: string;
36157
36211
  updated_at?: string;
36158
36212
  };
@@ -36165,6 +36219,7 @@ export declare const replanBufferLoadCarriers: import("@tanstack/start-client-co
36165
36219
  next_attempt_at?: string;
36166
36220
  order_id?: string;
36167
36221
  reason?: string;
36222
+ reason_code?: string | null;
36168
36223
  status?: string;
36169
36224
  updated_at?: string;
36170
36225
  };
@@ -36869,6 +36924,21 @@ export declare const replanBufferLoadCarriers: import("@tanstack/start-client-co
36869
36924
  referencedColumns: ["id"];
36870
36925
  }];
36871
36926
  };
36927
+ logistics_tick_heartbeat: {
36928
+ Row: {
36929
+ id: boolean;
36930
+ last_tick_at: string;
36931
+ };
36932
+ Insert: {
36933
+ id?: boolean;
36934
+ last_tick_at?: string;
36935
+ };
36936
+ Update: {
36937
+ id?: boolean;
36938
+ last_tick_at?: string;
36939
+ };
36940
+ Relationships: [];
36941
+ };
36872
36942
  logistics_variables: {
36873
36943
  Row: {
36874
36944
  created_at: string;
@@ -48751,6 +48821,30 @@ export declare const replanBufferLoadCarriers: import("@tanstack/start-client-co
48751
48821
  };
48752
48822
  Returns: import("../integrations/supabase/types").Json;
48753
48823
  };
48824
+ logistics_block_reason_code: {
48825
+ Args: {
48826
+ p_details?: import("../integrations/supabase/types").Json;
48827
+ p_reason: string;
48828
+ };
48829
+ Returns: string;
48830
+ };
48831
+ logistics_blocked_orders: {
48832
+ Args: never;
48833
+ Returns: {
48834
+ attempts: number;
48835
+ blocked_since: string;
48836
+ delivery_date: string;
48837
+ order_id: string;
48838
+ order_ref: string;
48839
+ queue_id: string;
48840
+ reason: string;
48841
+ reason_code: string;
48842
+ }[];
48843
+ };
48844
+ logistics_blocked_overview: {
48845
+ Args: never;
48846
+ Returns: import("../integrations/supabase/types").Json;
48847
+ };
48754
48848
  logistics_buffer_criteria: {
48755
48849
  Args: {
48756
48850
  p_settings: import("../integrations/supabase/types").Json;
@@ -49620,6 +49714,12 @@ export declare const replanBufferLoadCarriers: import("@tanstack/start-client-co
49620
49714
  Args: never;
49621
49715
  Returns: number;
49622
49716
  };
49717
+ logistics_plan_retry: {
49718
+ Args: {
49719
+ p_order_ids: string[];
49720
+ };
49721
+ Returns: number;
49722
+ };
49623
49723
  logistics_plan_setting: {
49624
49724
  Args: {
49625
49725
  p_default: number;
@@ -49855,6 +49955,10 @@ export declare const replanBufferLoadCarriers: import("@tanstack/start-client-co
49855
49955
  };
49856
49956
  Returns: number;
49857
49957
  };
49958
+ logistics_tick_ping: {
49959
+ Args: never;
49960
+ Returns: string;
49961
+ };
49858
49962
  logistics_upsert_task: {
49859
49963
  Args: {
49860
49964
  p_buffer_ref: string;
@@ -62051,6 +62155,7 @@ export declare const planAllLoadCarriers: import("@tanstack/start-client-core").
62051
62155
  next_attempt_at: string;
62052
62156
  order_id: string;
62053
62157
  reason: string;
62158
+ reason_code: string | null;
62054
62159
  status: string;
62055
62160
  updated_at: string;
62056
62161
  };
@@ -62063,6 +62168,7 @@ export declare const planAllLoadCarriers: import("@tanstack/start-client-core").
62063
62168
  next_attempt_at?: string;
62064
62169
  order_id: string;
62065
62170
  reason?: string;
62171
+ reason_code?: string | null;
62066
62172
  status?: string;
62067
62173
  updated_at?: string;
62068
62174
  };
@@ -62075,6 +62181,7 @@ export declare const planAllLoadCarriers: import("@tanstack/start-client-core").
62075
62181
  next_attempt_at?: string;
62076
62182
  order_id?: string;
62077
62183
  reason?: string;
62184
+ reason_code?: string | null;
62078
62185
  status?: string;
62079
62186
  updated_at?: string;
62080
62187
  };
@@ -62779,6 +62886,21 @@ export declare const planAllLoadCarriers: import("@tanstack/start-client-core").
62779
62886
  referencedColumns: ["id"];
62780
62887
  }];
62781
62888
  };
62889
+ logistics_tick_heartbeat: {
62890
+ Row: {
62891
+ id: boolean;
62892
+ last_tick_at: string;
62893
+ };
62894
+ Insert: {
62895
+ id?: boolean;
62896
+ last_tick_at?: string;
62897
+ };
62898
+ Update: {
62899
+ id?: boolean;
62900
+ last_tick_at?: string;
62901
+ };
62902
+ Relationships: [];
62903
+ };
62782
62904
  logistics_variables: {
62783
62905
  Row: {
62784
62906
  created_at: string;
@@ -74661,6 +74783,30 @@ export declare const planAllLoadCarriers: import("@tanstack/start-client-core").
74661
74783
  };
74662
74784
  Returns: import("../integrations/supabase/types").Json;
74663
74785
  };
74786
+ logistics_block_reason_code: {
74787
+ Args: {
74788
+ p_details?: import("../integrations/supabase/types").Json;
74789
+ p_reason: string;
74790
+ };
74791
+ Returns: string;
74792
+ };
74793
+ logistics_blocked_orders: {
74794
+ Args: never;
74795
+ Returns: {
74796
+ attempts: number;
74797
+ blocked_since: string;
74798
+ delivery_date: string;
74799
+ order_id: string;
74800
+ order_ref: string;
74801
+ queue_id: string;
74802
+ reason: string;
74803
+ reason_code: string;
74804
+ }[];
74805
+ };
74806
+ logistics_blocked_overview: {
74807
+ Args: never;
74808
+ Returns: import("../integrations/supabase/types").Json;
74809
+ };
74664
74810
  logistics_buffer_criteria: {
74665
74811
  Args: {
74666
74812
  p_settings: import("../integrations/supabase/types").Json;
@@ -75530,6 +75676,12 @@ export declare const planAllLoadCarriers: import("@tanstack/start-client-core").
75530
75676
  Args: never;
75531
75677
  Returns: number;
75532
75678
  };
75679
+ logistics_plan_retry: {
75680
+ Args: {
75681
+ p_order_ids: string[];
75682
+ };
75683
+ Returns: number;
75684
+ };
75533
75685
  logistics_plan_setting: {
75534
75686
  Args: {
75535
75687
  p_default: number;
@@ -75765,6 +75917,10 @@ export declare const planAllLoadCarriers: import("@tanstack/start-client-core").
75765
75917
  };
75766
75918
  Returns: number;
75767
75919
  };
75920
+ logistics_tick_ping: {
75921
+ Args: never;
75922
+ Returns: string;
75923
+ };
75768
75924
  logistics_upsert_task: {
75769
75925
  Args: {
75770
75926
  p_buffer_ref: string;
@@ -87961,6 +88117,7 @@ export declare const ensureLogisticsTasks: import("@tanstack/start-client-core")
87961
88117
  next_attempt_at: string;
87962
88118
  order_id: string;
87963
88119
  reason: string;
88120
+ reason_code: string | null;
87964
88121
  status: string;
87965
88122
  updated_at: string;
87966
88123
  };
@@ -87973,6 +88130,7 @@ export declare const ensureLogisticsTasks: import("@tanstack/start-client-core")
87973
88130
  next_attempt_at?: string;
87974
88131
  order_id: string;
87975
88132
  reason?: string;
88133
+ reason_code?: string | null;
87976
88134
  status?: string;
87977
88135
  updated_at?: string;
87978
88136
  };
@@ -87985,6 +88143,7 @@ export declare const ensureLogisticsTasks: import("@tanstack/start-client-core")
87985
88143
  next_attempt_at?: string;
87986
88144
  order_id?: string;
87987
88145
  reason?: string;
88146
+ reason_code?: string | null;
87988
88147
  status?: string;
87989
88148
  updated_at?: string;
87990
88149
  };
@@ -88689,6 +88848,21 @@ export declare const ensureLogisticsTasks: import("@tanstack/start-client-core")
88689
88848
  referencedColumns: ["id"];
88690
88849
  }];
88691
88850
  };
88851
+ logistics_tick_heartbeat: {
88852
+ Row: {
88853
+ id: boolean;
88854
+ last_tick_at: string;
88855
+ };
88856
+ Insert: {
88857
+ id?: boolean;
88858
+ last_tick_at?: string;
88859
+ };
88860
+ Update: {
88861
+ id?: boolean;
88862
+ last_tick_at?: string;
88863
+ };
88864
+ Relationships: [];
88865
+ };
88692
88866
  logistics_variables: {
88693
88867
  Row: {
88694
88868
  created_at: string;
@@ -100571,6 +100745,30 @@ export declare const ensureLogisticsTasks: import("@tanstack/start-client-core")
100571
100745
  };
100572
100746
  Returns: import("../integrations/supabase/types").Json;
100573
100747
  };
100748
+ logistics_block_reason_code: {
100749
+ Args: {
100750
+ p_details?: import("../integrations/supabase/types").Json;
100751
+ p_reason: string;
100752
+ };
100753
+ Returns: string;
100754
+ };
100755
+ logistics_blocked_orders: {
100756
+ Args: never;
100757
+ Returns: {
100758
+ attempts: number;
100759
+ blocked_since: string;
100760
+ delivery_date: string;
100761
+ order_id: string;
100762
+ order_ref: string;
100763
+ queue_id: string;
100764
+ reason: string;
100765
+ reason_code: string;
100766
+ }[];
100767
+ };
100768
+ logistics_blocked_overview: {
100769
+ Args: never;
100770
+ Returns: import("../integrations/supabase/types").Json;
100771
+ };
100574
100772
  logistics_buffer_criteria: {
100575
100773
  Args: {
100576
100774
  p_settings: import("../integrations/supabase/types").Json;
@@ -101440,6 +101638,12 @@ export declare const ensureLogisticsTasks: import("@tanstack/start-client-core")
101440
101638
  Args: never;
101441
101639
  Returns: number;
101442
101640
  };
101641
+ logistics_plan_retry: {
101642
+ Args: {
101643
+ p_order_ids: string[];
101644
+ };
101645
+ Returns: number;
101646
+ };
101443
101647
  logistics_plan_setting: {
101444
101648
  Args: {
101445
101649
  p_default: number;
@@ -101675,6 +101879,10 @@ export declare const ensureLogisticsTasks: import("@tanstack/start-client-core")
101675
101879
  };
101676
101880
  Returns: number;
101677
101881
  };
101882
+ logistics_tick_ping: {
101883
+ Args: never;
101884
+ Returns: string;
101885
+ };
101678
101886
  logistics_upsert_task: {
101679
101887
  Args: {
101680
101888
  p_buffer_ref: string;
@@ -113869,6 +114077,7 @@ export declare const previewLoadCarrierPlan: import("@tanstack/start-client-core
113869
114077
  next_attempt_at: string;
113870
114078
  order_id: string;
113871
114079
  reason: string;
114080
+ reason_code: string | null;
113872
114081
  status: string;
113873
114082
  updated_at: string;
113874
114083
  };
@@ -113881,6 +114090,7 @@ export declare const previewLoadCarrierPlan: import("@tanstack/start-client-core
113881
114090
  next_attempt_at?: string;
113882
114091
  order_id: string;
113883
114092
  reason?: string;
114093
+ reason_code?: string | null;
113884
114094
  status?: string;
113885
114095
  updated_at?: string;
113886
114096
  };
@@ -113893,6 +114103,7 @@ export declare const previewLoadCarrierPlan: import("@tanstack/start-client-core
113893
114103
  next_attempt_at?: string;
113894
114104
  order_id?: string;
113895
114105
  reason?: string;
114106
+ reason_code?: string | null;
113896
114107
  status?: string;
113897
114108
  updated_at?: string;
113898
114109
  };
@@ -114597,6 +114808,21 @@ export declare const previewLoadCarrierPlan: import("@tanstack/start-client-core
114597
114808
  referencedColumns: ["id"];
114598
114809
  }];
114599
114810
  };
114811
+ logistics_tick_heartbeat: {
114812
+ Row: {
114813
+ id: boolean;
114814
+ last_tick_at: string;
114815
+ };
114816
+ Insert: {
114817
+ id?: boolean;
114818
+ last_tick_at?: string;
114819
+ };
114820
+ Update: {
114821
+ id?: boolean;
114822
+ last_tick_at?: string;
114823
+ };
114824
+ Relationships: [];
114825
+ };
114600
114826
  logistics_variables: {
114601
114827
  Row: {
114602
114828
  created_at: string;
@@ -126479,6 +126705,30 @@ export declare const previewLoadCarrierPlan: import("@tanstack/start-client-core
126479
126705
  };
126480
126706
  Returns: import("../integrations/supabase/types").Json;
126481
126707
  };
126708
+ logistics_block_reason_code: {
126709
+ Args: {
126710
+ p_details?: import("../integrations/supabase/types").Json;
126711
+ p_reason: string;
126712
+ };
126713
+ Returns: string;
126714
+ };
126715
+ logistics_blocked_orders: {
126716
+ Args: never;
126717
+ Returns: {
126718
+ attempts: number;
126719
+ blocked_since: string;
126720
+ delivery_date: string;
126721
+ order_id: string;
126722
+ order_ref: string;
126723
+ queue_id: string;
126724
+ reason: string;
126725
+ reason_code: string;
126726
+ }[];
126727
+ };
126728
+ logistics_blocked_overview: {
126729
+ Args: never;
126730
+ Returns: import("../integrations/supabase/types").Json;
126731
+ };
126482
126732
  logistics_buffer_criteria: {
126483
126733
  Args: {
126484
126734
  p_settings: import("../integrations/supabase/types").Json;
@@ -127348,6 +127598,12 @@ export declare const previewLoadCarrierPlan: import("@tanstack/start-client-core
127348
127598
  Args: never;
127349
127599
  Returns: number;
127350
127600
  };
127601
+ logistics_plan_retry: {
127602
+ Args: {
127603
+ p_order_ids: string[];
127604
+ };
127605
+ Returns: number;
127606
+ };
127351
127607
  logistics_plan_setting: {
127352
127608
  Args: {
127353
127609
  p_default: number;
@@ -127583,6 +127839,10 @@ export declare const previewLoadCarrierPlan: import("@tanstack/start-client-core
127583
127839
  };
127584
127840
  Returns: number;
127585
127841
  };
127842
+ logistics_tick_ping: {
127843
+ Args: never;
127844
+ Returns: string;
127845
+ };
127586
127846
  logistics_upsert_task: {
127587
127847
  Args: {
127588
127848
  p_buffer_ref: string;