@flowselections/floriday-verkoop-module 1.0.53 → 1.0.55
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 +68 -183
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +42 -0
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.d.ts +42 -0
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts +42 -0
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +42 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/cart-lock.functions.d.ts +42 -0
- package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
- package/dist-lib/lib/cart-planning-settings.functions.d.ts +462 -0
- package/dist-lib/lib/cart-planning-settings.functions.d.ts.map +1 -1
- package/dist-lib/lib/cart-replan.functions.d.ts +141 -23
- package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
- package/dist-lib/lib/cart-replan.functions.js +111 -15
- package/dist-lib/lib/create-order.functions.d.ts +714 -0
- package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +126 -0
- package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +42 -0
- package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-mirror.functions.d.ts +42 -0
- package/dist-lib/lib/floriday-mirror.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-public.functions.d.ts +294 -0
- package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-writes.functions.d.ts +210 -0
- package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
- package/dist-lib/lib/invoice-timing.functions.d.ts +168 -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 +42 -0
- package/dist-lib/lib/load-carriers.functions.d.ts.map +1 -1
- package/dist-lib/lib/logistics-engine.functions.d.ts +210 -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 +84 -0
- package/dist-lib/lib/logistics-stock.functions.d.ts.map +1 -1
- package/dist-lib/lib/order-addresses.functions.d.ts +42 -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 +126 -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 +84 -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 +84 -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 +168 -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/salesorders-list.functions.d.ts +42 -0
- package/dist-lib/lib/salesorders-list.functions.d.ts.map +1 -1
- package/dist-lib/lib/salesorders.functions.d.ts +210 -0
- package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
- package/dist-lib/lib/stock-consumption-alerts.functions.d.ts +84 -0
- package/dist-lib/lib/stock-consumption-alerts.functions.d.ts.map +1 -1
- package/dist-lib/lib/tradeitems.functions.d.ts +42 -0
- package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { createServerFn } from "@tanstack/react-start";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware";
|
|
6
|
+
import { resolveOrderRow } from "./order-row.server";
|
|
6
7
|
const TaskStatus = z.enum([
|
|
7
8
|
"planned",
|
|
8
9
|
"ready",
|
|
@@ -17,13 +18,15 @@ export const sendOrderEventToEngine = createServerFn({ method: "POST" })
|
|
|
17
18
|
.middleware([requireSupabaseAuth])
|
|
18
19
|
.inputValidator((input) => z
|
|
19
20
|
.object({
|
|
20
|
-
orderId: z.string().
|
|
21
|
+
orderId: z.string().min(1),
|
|
21
22
|
type: z.enum(["order.received", "order.changed"]).default("order.changed"),
|
|
22
23
|
})
|
|
23
24
|
.parse(input))
|
|
24
|
-
.handler(async ({ data }) => {
|
|
25
|
+
.handler(async ({ data, context }) => {
|
|
26
|
+
// DTO-id kan een Floriday salesOrderId zijn.
|
|
27
|
+
const order = await resolveOrderRow(context.supabase, data.orderId);
|
|
25
28
|
const { buildEngineOrderPayload, insertLogisticsEvent } = await import("./logistics-engine.server");
|
|
26
|
-
const payload = await buildEngineOrderPayload(
|
|
29
|
+
const payload = await buildEngineOrderPayload(order.id);
|
|
27
30
|
if (!payload)
|
|
28
31
|
throw new Error("Order niet gevonden");
|
|
29
32
|
const res = await insertLogisticsEvent({ eventType: data.type, order: payload });
|
|
@@ -93,12 +96,14 @@ export const completeEngineTask = createServerFn({ method: "POST" })
|
|
|
93
96
|
*/
|
|
94
97
|
export const getEngineBufferForOrder = createServerFn({ method: "POST" })
|
|
95
98
|
.middleware([requireSupabaseAuth])
|
|
96
|
-
.inputValidator((input) => z.object({ orderId: z.string().
|
|
99
|
+
.inputValidator((input) => z.object({ orderId: z.string().min(1) }).parse(input))
|
|
97
100
|
.handler(async ({ data, context }) => {
|
|
98
101
|
const { isEngineShadowMode } = await import("./logistics-engine.server");
|
|
99
102
|
const { applyBufferDecisionForOrder } = await import("./logistics-buffer.server");
|
|
100
103
|
const shadow = isEngineShadowMode();
|
|
101
|
-
|
|
104
|
+
// DTO-id kan een Floriday salesOrderId zijn.
|
|
105
|
+
const order = await resolveOrderRow(context.supabase, data.orderId);
|
|
106
|
+
const { bufferId, decision } = await applyBufferDecisionForOrder(order.id);
|
|
102
107
|
let orderCount = 0;
|
|
103
108
|
if (bufferId) {
|
|
104
109
|
const { count } = await context.supabase
|
|
@@ -10736,6 +10736,24 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
|
|
|
10736
10736
|
};
|
|
10737
10737
|
Relationships: [];
|
|
10738
10738
|
};
|
|
10739
|
+
maps_job_lease: {
|
|
10740
|
+
Row: {
|
|
10741
|
+
job: string;
|
|
10742
|
+
locked_until: string;
|
|
10743
|
+
updated_at: string;
|
|
10744
|
+
};
|
|
10745
|
+
Insert: {
|
|
10746
|
+
job: string;
|
|
10747
|
+
locked_until?: string;
|
|
10748
|
+
updated_at?: string;
|
|
10749
|
+
};
|
|
10750
|
+
Update: {
|
|
10751
|
+
job?: string;
|
|
10752
|
+
locked_until?: string;
|
|
10753
|
+
updated_at?: string;
|
|
10754
|
+
};
|
|
10755
|
+
Relationships: [];
|
|
10756
|
+
};
|
|
10739
10757
|
maps_request_queue: {
|
|
10740
10758
|
Row: {
|
|
10741
10759
|
attempts: number;
|
|
@@ -13597,6 +13615,8 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
|
|
|
13597
13615
|
foutmelding: string | null;
|
|
13598
13616
|
gebruiker_id: string | null;
|
|
13599
13617
|
gebruiker_naam: string;
|
|
13618
|
+
gebruikte_bron: string | null;
|
|
13619
|
+
gebruikte_layout_id: string | null;
|
|
13600
13620
|
gestart_op: string | null;
|
|
13601
13621
|
herkomst: string | null;
|
|
13602
13622
|
id: string;
|
|
@@ -13627,6 +13647,8 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
|
|
|
13627
13647
|
foutmelding?: string | null;
|
|
13628
13648
|
gebruiker_id?: string | null;
|
|
13629
13649
|
gebruiker_naam?: string;
|
|
13650
|
+
gebruikte_bron?: string | null;
|
|
13651
|
+
gebruikte_layout_id?: string | null;
|
|
13630
13652
|
gestart_op?: string | null;
|
|
13631
13653
|
herkomst?: string | null;
|
|
13632
13654
|
id?: string;
|
|
@@ -13657,6 +13679,8 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
|
|
|
13657
13679
|
foutmelding?: string | null;
|
|
13658
13680
|
gebruiker_id?: string | null;
|
|
13659
13681
|
gebruiker_naam?: string;
|
|
13682
|
+
gebruikte_bron?: string | null;
|
|
13683
|
+
gebruikte_layout_id?: string | null;
|
|
13660
13684
|
gestart_op?: string | null;
|
|
13661
13685
|
herkomst?: string | null;
|
|
13662
13686
|
id?: string;
|
|
@@ -20326,6 +20350,8 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
|
|
|
20326
20350
|
foutmelding: string | null;
|
|
20327
20351
|
gebruiker_id: string | null;
|
|
20328
20352
|
gebruiker_naam: string;
|
|
20353
|
+
gebruikte_bron: string | null;
|
|
20354
|
+
gebruikte_layout_id: string | null;
|
|
20329
20355
|
gestart_op: string | null;
|
|
20330
20356
|
herkomst: string | null;
|
|
20331
20357
|
id: string;
|
|
@@ -20447,6 +20473,8 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
|
|
|
20447
20473
|
foutmelding: string | null;
|
|
20448
20474
|
gebruiker_id: string | null;
|
|
20449
20475
|
gebruiker_naam: string;
|
|
20476
|
+
gebruikte_bron: string | null;
|
|
20477
|
+
gebruikte_layout_id: string | null;
|
|
20450
20478
|
gestart_op: string | null;
|
|
20451
20479
|
herkomst: string | null;
|
|
20452
20480
|
id: string;
|
|
@@ -21503,6 +21531,12 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
|
|
|
21503
21531
|
};
|
|
21504
21532
|
Returns: string;
|
|
21505
21533
|
};
|
|
21534
|
+
logistics_document_type_map: {
|
|
21535
|
+
Args: {
|
|
21536
|
+
_document_code: string;
|
|
21537
|
+
};
|
|
21538
|
+
Returns: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"][];
|
|
21539
|
+
};
|
|
21506
21540
|
logistics_emit_event: {
|
|
21507
21541
|
Args: {
|
|
21508
21542
|
p_event_type: string;
|
|
@@ -21966,6 +22000,14 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
|
|
|
21966
22000
|
};
|
|
21967
22001
|
Returns: string;
|
|
21968
22002
|
};
|
|
22003
|
+
maps_cron_token: {
|
|
22004
|
+
Args: never;
|
|
22005
|
+
Returns: string;
|
|
22006
|
+
};
|
|
22007
|
+
maps_kick_queue: {
|
|
22008
|
+
Args: never;
|
|
22009
|
+
Returns: undefined;
|
|
22010
|
+
};
|
|
21969
22011
|
mark_offer_clicked: {
|
|
21970
22012
|
Args: {
|
|
21971
22013
|
p_code: string;
|
|
@@ -33952,6 +33994,24 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
|
|
|
33952
33994
|
};
|
|
33953
33995
|
Relationships: [];
|
|
33954
33996
|
};
|
|
33997
|
+
maps_job_lease: {
|
|
33998
|
+
Row: {
|
|
33999
|
+
job: string;
|
|
34000
|
+
locked_until: string;
|
|
34001
|
+
updated_at: string;
|
|
34002
|
+
};
|
|
34003
|
+
Insert: {
|
|
34004
|
+
job: string;
|
|
34005
|
+
locked_until?: string;
|
|
34006
|
+
updated_at?: string;
|
|
34007
|
+
};
|
|
34008
|
+
Update: {
|
|
34009
|
+
job?: string;
|
|
34010
|
+
locked_until?: string;
|
|
34011
|
+
updated_at?: string;
|
|
34012
|
+
};
|
|
34013
|
+
Relationships: [];
|
|
34014
|
+
};
|
|
33955
34015
|
maps_request_queue: {
|
|
33956
34016
|
Row: {
|
|
33957
34017
|
attempts: number;
|
|
@@ -36813,6 +36873,8 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
|
|
|
36813
36873
|
foutmelding: string | null;
|
|
36814
36874
|
gebruiker_id: string | null;
|
|
36815
36875
|
gebruiker_naam: string;
|
|
36876
|
+
gebruikte_bron: string | null;
|
|
36877
|
+
gebruikte_layout_id: string | null;
|
|
36816
36878
|
gestart_op: string | null;
|
|
36817
36879
|
herkomst: string | null;
|
|
36818
36880
|
id: string;
|
|
@@ -36843,6 +36905,8 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
|
|
|
36843
36905
|
foutmelding?: string | null;
|
|
36844
36906
|
gebruiker_id?: string | null;
|
|
36845
36907
|
gebruiker_naam?: string;
|
|
36908
|
+
gebruikte_bron?: string | null;
|
|
36909
|
+
gebruikte_layout_id?: string | null;
|
|
36846
36910
|
gestart_op?: string | null;
|
|
36847
36911
|
herkomst?: string | null;
|
|
36848
36912
|
id?: string;
|
|
@@ -36873,6 +36937,8 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
|
|
|
36873
36937
|
foutmelding?: string | null;
|
|
36874
36938
|
gebruiker_id?: string | null;
|
|
36875
36939
|
gebruiker_naam?: string;
|
|
36940
|
+
gebruikte_bron?: string | null;
|
|
36941
|
+
gebruikte_layout_id?: string | null;
|
|
36876
36942
|
gestart_op?: string | null;
|
|
36877
36943
|
herkomst?: string | null;
|
|
36878
36944
|
id?: string;
|
|
@@ -43542,6 +43608,8 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
|
|
|
43542
43608
|
foutmelding: string | null;
|
|
43543
43609
|
gebruiker_id: string | null;
|
|
43544
43610
|
gebruiker_naam: string;
|
|
43611
|
+
gebruikte_bron: string | null;
|
|
43612
|
+
gebruikte_layout_id: string | null;
|
|
43545
43613
|
gestart_op: string | null;
|
|
43546
43614
|
herkomst: string | null;
|
|
43547
43615
|
id: string;
|
|
@@ -43663,6 +43731,8 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
|
|
|
43663
43731
|
foutmelding: string | null;
|
|
43664
43732
|
gebruiker_id: string | null;
|
|
43665
43733
|
gebruiker_naam: string;
|
|
43734
|
+
gebruikte_bron: string | null;
|
|
43735
|
+
gebruikte_layout_id: string | null;
|
|
43666
43736
|
gestart_op: string | null;
|
|
43667
43737
|
herkomst: string | null;
|
|
43668
43738
|
id: string;
|
|
@@ -44719,6 +44789,12 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
|
|
|
44719
44789
|
};
|
|
44720
44790
|
Returns: string;
|
|
44721
44791
|
};
|
|
44792
|
+
logistics_document_type_map: {
|
|
44793
|
+
Args: {
|
|
44794
|
+
_document_code: string;
|
|
44795
|
+
};
|
|
44796
|
+
Returns: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"][];
|
|
44797
|
+
};
|
|
44722
44798
|
logistics_emit_event: {
|
|
44723
44799
|
Args: {
|
|
44724
44800
|
p_event_type: string;
|
|
@@ -45182,6 +45258,14 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
|
|
|
45182
45258
|
};
|
|
45183
45259
|
Returns: string;
|
|
45184
45260
|
};
|
|
45261
|
+
maps_cron_token: {
|
|
45262
|
+
Args: never;
|
|
45263
|
+
Returns: string;
|
|
45264
|
+
};
|
|
45265
|
+
maps_kick_queue: {
|
|
45266
|
+
Args: never;
|
|
45267
|
+
Returns: undefined;
|
|
45268
|
+
};
|
|
45185
45269
|
mark_offer_clicked: {
|
|
45186
45270
|
Args: {
|
|
45187
45271
|
p_code: string;
|