@flowselections/floriday-verkoop-module 1.0.54 → 1.0.56
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.
- package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts.map +1 -1
- package/dist-lib/components/verkoop/OrderKarindelingCard.js +7 -3
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +45 -0
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.d.ts +45 -0
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts +45 -0
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +45 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/cart-lock.functions.d.ts +45 -0
- package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
- package/dist-lib/lib/cart-planning-settings.functions.d.ts +495 -0
- package/dist-lib/lib/cart-planning-settings.functions.d.ts.map +1 -1
- package/dist-lib/lib/cart-replan.functions.d.ts +137 -26
- package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
- package/dist-lib/lib/cart-replan.functions.js +93 -63
- package/dist-lib/lib/create-order.functions.d.ts +765 -0
- package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +135 -0
- package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +45 -0
- package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-mirror.functions.d.ts +45 -0
- package/dist-lib/lib/floriday-mirror.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-public.functions.d.ts +315 -0
- package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-writes.functions.d.ts +225 -0
- package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
- package/dist-lib/lib/invoice-timing.functions.d.ts +180 -0
- package/dist-lib/lib/invoice-timing.functions.d.ts.map +1 -1
- package/dist-lib/lib/invoice-timing.functions.js +12 -6
- package/dist-lib/lib/load-carriers.functions.d.ts +45 -0
- package/dist-lib/lib/load-carriers.functions.d.ts.map +1 -1
- package/dist-lib/lib/logistics-engine.functions.d.ts +225 -0
- package/dist-lib/lib/logistics-engine.functions.d.ts.map +1 -1
- package/dist-lib/lib/logistics-engine.functions.js +10 -5
- package/dist-lib/lib/logistics-stock.functions.d.ts +90 -0
- package/dist-lib/lib/logistics-stock.functions.d.ts.map +1 -1
- package/dist-lib/lib/order-addresses.functions.d.ts +45 -0
- package/dist-lib/lib/order-addresses.functions.d.ts.map +1 -1
- package/dist-lib/lib/order-addresses.functions.js +15 -9
- package/dist-lib/lib/order-buffers.functions.d.ts +135 -0
- package/dist-lib/lib/order-buffers.functions.d.ts.map +1 -1
- package/dist-lib/lib/order-buffers.functions.js +10 -10
- package/dist-lib/lib/order-carrier.functions.d.ts +90 -0
- package/dist-lib/lib/order-carrier.functions.d.ts.map +1 -1
- package/dist-lib/lib/order-carrier.functions.js +20 -11
- package/dist-lib/lib/order-pickup.functions.d.ts +90 -0
- package/dist-lib/lib/order-pickup.functions.d.ts.map +1 -1
- package/dist-lib/lib/order-pickup.functions.js +20 -11
- package/dist-lib/lib/order-row.server.d.ts +24 -0
- package/dist-lib/lib/order-row.server.d.ts.map +1 -0
- package/dist-lib/lib/order-row.server.js +58 -0
- package/dist-lib/lib/order-shipments.functions.d.ts +180 -0
- package/dist-lib/lib/order-shipments.functions.d.ts.map +1 -1
- package/dist-lib/lib/order-shipments.functions.js +11 -6
- package/dist-lib/lib/product-name.d.ts +3 -0
- package/dist-lib/lib/product-name.d.ts.map +1 -0
- package/dist-lib/lib/product-name.js +43 -0
- package/dist-lib/lib/salesorders-list.functions.d.ts +45 -0
- package/dist-lib/lib/salesorders-list.functions.d.ts.map +1 -1
- package/dist-lib/lib/salesorders.functions.d.ts +225 -0
- package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
- package/dist-lib/lib/stock-consumption-alerts.functions.d.ts +90 -0
- package/dist-lib/lib/stock-consumption-alerts.functions.d.ts.map +1 -1
- package/dist-lib/lib/tradeitems.functions.d.ts +45 -0
- package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
import { createServerFn } from "@tanstack/react-start";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware";
|
|
5
|
-
|
|
5
|
+
import { assertRowsAffected, resolveOrderRow } from "./order-row.server";
|
|
6
6
|
async function findOrder(supabase, orderId) {
|
|
7
|
-
|
|
8
|
-
const
|
|
7
|
+
// DTO-id kan een Floriday salesOrderId zijn; resolveOrderRow vertaalt dat.
|
|
8
|
+
const row = await resolveOrderRow(supabase, orderId);
|
|
9
|
+
const { data, error } = await supabase
|
|
9
10
|
.from("orders")
|
|
10
11
|
.select("id, buffer_id, custom_fields, is_reservation")
|
|
11
|
-
.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return (
|
|
12
|
+
.eq("id", row.id)
|
|
13
|
+
.maybeSingle();
|
|
14
|
+
if (error)
|
|
15
|
+
throw new Error(error.message);
|
|
16
|
+
return (data ?? null);
|
|
16
17
|
}
|
|
17
18
|
export const getOrderCarrier = createServerFn({ method: "GET" })
|
|
18
19
|
.middleware([requireSupabaseAuth])
|
|
@@ -28,7 +29,13 @@ export const getOrderCarrier = createServerFn({ method: "GET" })
|
|
|
28
29
|
id: String(c.id),
|
|
29
30
|
name: String(c.name ?? "Onbekend"),
|
|
30
31
|
}));
|
|
31
|
-
|
|
32
|
+
let order = null;
|
|
33
|
+
try {
|
|
34
|
+
order = await findOrder(supabase, data.orderId);
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
order = null;
|
|
38
|
+
}
|
|
32
39
|
if (!order) {
|
|
33
40
|
return { carrierId: null, carrierName: null, bufferId: null, options };
|
|
34
41
|
}
|
|
@@ -78,11 +85,13 @@ export const setOrderCarrier = createServerFn({ method: "POST" })
|
|
|
78
85
|
cf.carrier = data.carrierId;
|
|
79
86
|
else
|
|
80
87
|
delete cf.carrier;
|
|
81
|
-
const { error } = await supabase.from("orders")
|
|
88
|
+
const { data: updated, error } = await supabase.from("orders")
|
|
82
89
|
.update({ custom_fields: cf })
|
|
83
|
-
.eq("id", t.id)
|
|
90
|
+
.eq("id", t.id)
|
|
91
|
+
.select("id");
|
|
84
92
|
if (error)
|
|
85
93
|
throw new Error(error.message);
|
|
94
|
+
assertRowsAffected(updated, "Vervoerder opslaan");
|
|
86
95
|
}
|
|
87
96
|
return { ok: true, updated: targets.length };
|
|
88
97
|
});
|
|
@@ -10745,6 +10745,24 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
10745
10745
|
};
|
|
10746
10746
|
Relationships: [];
|
|
10747
10747
|
};
|
|
10748
|
+
maps_job_lease: {
|
|
10749
|
+
Row: {
|
|
10750
|
+
job: string;
|
|
10751
|
+
locked_until: string;
|
|
10752
|
+
updated_at: string;
|
|
10753
|
+
};
|
|
10754
|
+
Insert: {
|
|
10755
|
+
job: string;
|
|
10756
|
+
locked_until?: string;
|
|
10757
|
+
updated_at?: string;
|
|
10758
|
+
};
|
|
10759
|
+
Update: {
|
|
10760
|
+
job?: string;
|
|
10761
|
+
locked_until?: string;
|
|
10762
|
+
updated_at?: string;
|
|
10763
|
+
};
|
|
10764
|
+
Relationships: [];
|
|
10765
|
+
};
|
|
10748
10766
|
maps_request_queue: {
|
|
10749
10767
|
Row: {
|
|
10750
10768
|
attempts: number;
|
|
@@ -10806,6 +10824,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
10806
10824
|
last_error: string | null;
|
|
10807
10825
|
last_error_at: string | null;
|
|
10808
10826
|
last_success_at: string | null;
|
|
10827
|
+
provider: string;
|
|
10809
10828
|
updated_at: string;
|
|
10810
10829
|
};
|
|
10811
10830
|
Insert: {
|
|
@@ -10817,6 +10836,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
10817
10836
|
last_error?: string | null;
|
|
10818
10837
|
last_error_at?: string | null;
|
|
10819
10838
|
last_success_at?: string | null;
|
|
10839
|
+
provider?: string;
|
|
10820
10840
|
updated_at?: string;
|
|
10821
10841
|
};
|
|
10822
10842
|
Update: {
|
|
@@ -10828,6 +10848,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
10828
10848
|
last_error?: string | null;
|
|
10829
10849
|
last_error_at?: string | null;
|
|
10830
10850
|
last_success_at?: string | null;
|
|
10851
|
+
provider?: string;
|
|
10831
10852
|
updated_at?: string;
|
|
10832
10853
|
};
|
|
10833
10854
|
Relationships: [];
|
|
@@ -13606,6 +13627,8 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
13606
13627
|
foutmelding: string | null;
|
|
13607
13628
|
gebruiker_id: string | null;
|
|
13608
13629
|
gebruiker_naam: string;
|
|
13630
|
+
gebruikte_bron: string | null;
|
|
13631
|
+
gebruikte_layout_id: string | null;
|
|
13609
13632
|
gestart_op: string | null;
|
|
13610
13633
|
herkomst: string | null;
|
|
13611
13634
|
id: string;
|
|
@@ -13636,6 +13659,8 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
13636
13659
|
foutmelding?: string | null;
|
|
13637
13660
|
gebruiker_id?: string | null;
|
|
13638
13661
|
gebruiker_naam?: string;
|
|
13662
|
+
gebruikte_bron?: string | null;
|
|
13663
|
+
gebruikte_layout_id?: string | null;
|
|
13639
13664
|
gestart_op?: string | null;
|
|
13640
13665
|
herkomst?: string | null;
|
|
13641
13666
|
id?: string;
|
|
@@ -13666,6 +13691,8 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
13666
13691
|
foutmelding?: string | null;
|
|
13667
13692
|
gebruiker_id?: string | null;
|
|
13668
13693
|
gebruiker_naam?: string;
|
|
13694
|
+
gebruikte_bron?: string | null;
|
|
13695
|
+
gebruikte_layout_id?: string | null;
|
|
13669
13696
|
gestart_op?: string | null;
|
|
13670
13697
|
herkomst?: string | null;
|
|
13671
13698
|
id?: string;
|
|
@@ -20335,6 +20362,8 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
20335
20362
|
foutmelding: string | null;
|
|
20336
20363
|
gebruiker_id: string | null;
|
|
20337
20364
|
gebruiker_naam: string;
|
|
20365
|
+
gebruikte_bron: string | null;
|
|
20366
|
+
gebruikte_layout_id: string | null;
|
|
20338
20367
|
gestart_op: string | null;
|
|
20339
20368
|
herkomst: string | null;
|
|
20340
20369
|
id: string;
|
|
@@ -20456,6 +20485,8 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
20456
20485
|
foutmelding: string | null;
|
|
20457
20486
|
gebruiker_id: string | null;
|
|
20458
20487
|
gebruiker_naam: string;
|
|
20488
|
+
gebruikte_bron: string | null;
|
|
20489
|
+
gebruikte_layout_id: string | null;
|
|
20459
20490
|
gestart_op: string | null;
|
|
20460
20491
|
herkomst: string | null;
|
|
20461
20492
|
id: string;
|
|
@@ -21512,6 +21543,12 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
21512
21543
|
};
|
|
21513
21544
|
Returns: string;
|
|
21514
21545
|
};
|
|
21546
|
+
logistics_document_type_map: {
|
|
21547
|
+
Args: {
|
|
21548
|
+
_document_code: string;
|
|
21549
|
+
};
|
|
21550
|
+
Returns: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"][];
|
|
21551
|
+
};
|
|
21515
21552
|
logistics_emit_event: {
|
|
21516
21553
|
Args: {
|
|
21517
21554
|
p_event_type: string;
|
|
@@ -22592,6 +22629,14 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
22592
22629
|
};
|
|
22593
22630
|
Returns: undefined;
|
|
22594
22631
|
};
|
|
22632
|
+
replace_order_carts: {
|
|
22633
|
+
Args: {
|
|
22634
|
+
p_buffer_id: string;
|
|
22635
|
+
p_carts: import("../integrations/supabase/types").Json;
|
|
22636
|
+
p_order_id: string;
|
|
22637
|
+
};
|
|
22638
|
+
Returns: import("../integrations/supabase/types").Json;
|
|
22639
|
+
};
|
|
22595
22640
|
reset_floriday_sync_cursor: {
|
|
22596
22641
|
Args: {
|
|
22597
22642
|
p_connection_id: string;
|
|
@@ -33966,6 +34011,24 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
33966
34011
|
};
|
|
33967
34012
|
Relationships: [];
|
|
33968
34013
|
};
|
|
34014
|
+
maps_job_lease: {
|
|
34015
|
+
Row: {
|
|
34016
|
+
job: string;
|
|
34017
|
+
locked_until: string;
|
|
34018
|
+
updated_at: string;
|
|
34019
|
+
};
|
|
34020
|
+
Insert: {
|
|
34021
|
+
job: string;
|
|
34022
|
+
locked_until?: string;
|
|
34023
|
+
updated_at?: string;
|
|
34024
|
+
};
|
|
34025
|
+
Update: {
|
|
34026
|
+
job?: string;
|
|
34027
|
+
locked_until?: string;
|
|
34028
|
+
updated_at?: string;
|
|
34029
|
+
};
|
|
34030
|
+
Relationships: [];
|
|
34031
|
+
};
|
|
33969
34032
|
maps_request_queue: {
|
|
33970
34033
|
Row: {
|
|
33971
34034
|
attempts: number;
|
|
@@ -34027,6 +34090,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
34027
34090
|
last_error: string | null;
|
|
34028
34091
|
last_error_at: string | null;
|
|
34029
34092
|
last_success_at: string | null;
|
|
34093
|
+
provider: string;
|
|
34030
34094
|
updated_at: string;
|
|
34031
34095
|
};
|
|
34032
34096
|
Insert: {
|
|
@@ -34038,6 +34102,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
34038
34102
|
last_error?: string | null;
|
|
34039
34103
|
last_error_at?: string | null;
|
|
34040
34104
|
last_success_at?: string | null;
|
|
34105
|
+
provider?: string;
|
|
34041
34106
|
updated_at?: string;
|
|
34042
34107
|
};
|
|
34043
34108
|
Update: {
|
|
@@ -34049,6 +34114,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
34049
34114
|
last_error?: string | null;
|
|
34050
34115
|
last_error_at?: string | null;
|
|
34051
34116
|
last_success_at?: string | null;
|
|
34117
|
+
provider?: string;
|
|
34052
34118
|
updated_at?: string;
|
|
34053
34119
|
};
|
|
34054
34120
|
Relationships: [];
|
|
@@ -36827,6 +36893,8 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
36827
36893
|
foutmelding: string | null;
|
|
36828
36894
|
gebruiker_id: string | null;
|
|
36829
36895
|
gebruiker_naam: string;
|
|
36896
|
+
gebruikte_bron: string | null;
|
|
36897
|
+
gebruikte_layout_id: string | null;
|
|
36830
36898
|
gestart_op: string | null;
|
|
36831
36899
|
herkomst: string | null;
|
|
36832
36900
|
id: string;
|
|
@@ -36857,6 +36925,8 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
36857
36925
|
foutmelding?: string | null;
|
|
36858
36926
|
gebruiker_id?: string | null;
|
|
36859
36927
|
gebruiker_naam?: string;
|
|
36928
|
+
gebruikte_bron?: string | null;
|
|
36929
|
+
gebruikte_layout_id?: string | null;
|
|
36860
36930
|
gestart_op?: string | null;
|
|
36861
36931
|
herkomst?: string | null;
|
|
36862
36932
|
id?: string;
|
|
@@ -36887,6 +36957,8 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
36887
36957
|
foutmelding?: string | null;
|
|
36888
36958
|
gebruiker_id?: string | null;
|
|
36889
36959
|
gebruiker_naam?: string;
|
|
36960
|
+
gebruikte_bron?: string | null;
|
|
36961
|
+
gebruikte_layout_id?: string | null;
|
|
36890
36962
|
gestart_op?: string | null;
|
|
36891
36963
|
herkomst?: string | null;
|
|
36892
36964
|
id?: string;
|
|
@@ -43556,6 +43628,8 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
43556
43628
|
foutmelding: string | null;
|
|
43557
43629
|
gebruiker_id: string | null;
|
|
43558
43630
|
gebruiker_naam: string;
|
|
43631
|
+
gebruikte_bron: string | null;
|
|
43632
|
+
gebruikte_layout_id: string | null;
|
|
43559
43633
|
gestart_op: string | null;
|
|
43560
43634
|
herkomst: string | null;
|
|
43561
43635
|
id: string;
|
|
@@ -43677,6 +43751,8 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
43677
43751
|
foutmelding: string | null;
|
|
43678
43752
|
gebruiker_id: string | null;
|
|
43679
43753
|
gebruiker_naam: string;
|
|
43754
|
+
gebruikte_bron: string | null;
|
|
43755
|
+
gebruikte_layout_id: string | null;
|
|
43680
43756
|
gestart_op: string | null;
|
|
43681
43757
|
herkomst: string | null;
|
|
43682
43758
|
id: string;
|
|
@@ -44733,6 +44809,12 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
44733
44809
|
};
|
|
44734
44810
|
Returns: string;
|
|
44735
44811
|
};
|
|
44812
|
+
logistics_document_type_map: {
|
|
44813
|
+
Args: {
|
|
44814
|
+
_document_code: string;
|
|
44815
|
+
};
|
|
44816
|
+
Returns: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"][];
|
|
44817
|
+
};
|
|
44736
44818
|
logistics_emit_event: {
|
|
44737
44819
|
Args: {
|
|
44738
44820
|
p_event_type: string;
|
|
@@ -45813,6 +45895,14 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
45813
45895
|
};
|
|
45814
45896
|
Returns: undefined;
|
|
45815
45897
|
};
|
|
45898
|
+
replace_order_carts: {
|
|
45899
|
+
Args: {
|
|
45900
|
+
p_buffer_id: string;
|
|
45901
|
+
p_carts: import("../integrations/supabase/types").Json;
|
|
45902
|
+
p_order_id: string;
|
|
45903
|
+
};
|
|
45904
|
+
Returns: import("../integrations/supabase/types").Json;
|
|
45905
|
+
};
|
|
45816
45906
|
reset_floriday_sync_cursor: {
|
|
45817
45907
|
Args: {
|
|
45818
45908
|
p_connection_id: string;
|