@flowselections/floriday-authenticatie-module 1.0.42 → 1.0.43
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/settings/FlorydaySettingsCard.js +4 -9
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +728 -9
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.d.ts +728 -9
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts +728 -9
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +736 -9
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/floricode.functions.d.ts +5412 -379
- package/dist-lib/lib/floricode.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-auction-letters.functions.d.ts +728 -9
- package/dist-lib/lib/floriday-auction-letters.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-labels.functions.d.ts +728 -9
- package/dist-lib/lib/floriday-labels.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-public.functions.d.ts +4605 -291
- package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-stickers.functions.d.ts +728 -9
- package/dist-lib/lib/floriday-stickers.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-sync.functions.d.ts +24780 -2491
- package/dist-lib/lib/floriday-sync.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-tray-stickers.functions.d.ts +14 -0
- package/dist-lib/lib/floriday-tray-stickers.functions.d.ts.map +1 -0
- package/dist-lib/lib/floriday-tray-stickers.functions.js +66 -0
- package/dist-lib/lib/floriday-writes.functions.d.ts +52015 -515
- package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-writes.functions.js +17 -12
- package/dist-lib/lib/floriday.functions.d.ts +15017 -1229
- package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday.functions.js +76 -21
- package/dist-lib/lib/gateway/fulfillment-order-body.d.ts +36 -0
- package/dist-lib/lib/gateway/fulfillment-order-body.d.ts.map +1 -1
- package/dist-lib/lib/gateway/fulfillment-order-body.js +159 -110
- package/dist-lib/lib/gateway/fulfillment-order-send.d.ts.map +1 -1
- package/dist-lib/lib/gateway/fulfillment-order-send.js +6 -0
- package/dist-lib/lib/gateway/fulfillment-order-status.d.ts +11 -0
- package/dist-lib/lib/gateway/fulfillment-order-status.d.ts.map +1 -0
- package/dist-lib/lib/gateway/fulfillment-order-status.js +84 -0
- package/dist-lib/lib/gateway/index.d.ts +1 -0
- package/dist-lib/lib/gateway/index.d.ts.map +1 -1
- package/dist-lib/lib/gateway/index.js +1 -0
- package/dist-lib/lib/gateway/pdf.d.ts +1 -1
- package/dist-lib/lib/gateway/pdf.d.ts.map +1 -1
- package/dist-lib/lib/gateway/pdf.js +11 -0
- package/package.json +10 -1
|
@@ -17,7 +17,12 @@ import { createServerFn } from "@tanstack/react-start";
|
|
|
17
17
|
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware.js";
|
|
18
18
|
import { florydayWrite, } from "./floriday.functions.js";
|
|
19
19
|
// ─── Verkoop ────────────────────────────────────────────────────────────────
|
|
20
|
-
|
|
20
|
+
//
|
|
21
|
+
// Suppliers API 2026v1 kent GEEN `/sales-orders/{id}/acknowledge` of
|
|
22
|
+
// `/reject`. Bevestigen is `PATCH /sales-orders/{id}/commit` en afwijzen is
|
|
23
|
+
// `PATCH /sales-orders/{id}/cancel`; beide werken alleen zolang de order de
|
|
24
|
+
// status ACCEPTED heeft en beide hebben geen request-body.
|
|
25
|
+
export const commitSalesOrder = createServerFn({ method: "POST" })
|
|
21
26
|
.middleware([requireSupabaseAuth])
|
|
22
27
|
.inputValidator((input) => {
|
|
23
28
|
if (!["staging", "live"].includes(input.environment)) {
|
|
@@ -30,14 +35,13 @@ export const acknowledgeSalesOrder = createServerFn({ method: "POST" })
|
|
|
30
35
|
.handler(async ({ data, context }) => {
|
|
31
36
|
return florydayWrite(context.supabase, data.environment, {
|
|
32
37
|
module: "sales",
|
|
33
|
-
action: "
|
|
34
|
-
method: "
|
|
35
|
-
path: `/sales-orders/${encodeURIComponent(data.salesOrderId)}/
|
|
38
|
+
action: "commit-sales-order",
|
|
39
|
+
method: "PATCH",
|
|
40
|
+
path: `/sales-orders/${encodeURIComponent(data.salesOrderId)}/commit`,
|
|
36
41
|
referenceId: data.salesOrderId,
|
|
37
|
-
body: data.lines ? { lines: data.lines } : undefined,
|
|
38
42
|
});
|
|
39
43
|
});
|
|
40
|
-
export const
|
|
44
|
+
export const cancelSalesOrder = createServerFn({ method: "POST" })
|
|
41
45
|
.middleware([requireSupabaseAuth])
|
|
42
46
|
.inputValidator((input) => {
|
|
43
47
|
if (!["staging", "live"].includes(input.environment)) {
|
|
@@ -45,20 +49,21 @@ export const rejectSalesOrder = createServerFn({ method: "POST" })
|
|
|
45
49
|
}
|
|
46
50
|
if (!input.salesOrderId?.trim())
|
|
47
51
|
throw new Error("salesOrderId is verplicht");
|
|
48
|
-
if (!input.reason?.trim())
|
|
49
|
-
throw new Error("Geef een reden voor afwijzing op");
|
|
50
52
|
return input;
|
|
51
53
|
})
|
|
52
54
|
.handler(async ({ data, context }) => {
|
|
53
55
|
return florydayWrite(context.supabase, data.environment, {
|
|
54
56
|
module: "sales",
|
|
55
|
-
action: "
|
|
56
|
-
method: "
|
|
57
|
-
path: `/sales-orders/${encodeURIComponent(data.salesOrderId)}/
|
|
57
|
+
action: "cancel-sales-order",
|
|
58
|
+
method: "PATCH",
|
|
59
|
+
path: `/sales-orders/${encodeURIComponent(data.salesOrderId)}/cancel`,
|
|
58
60
|
referenceId: data.salesOrderId,
|
|
59
|
-
body: { reason: data.reason },
|
|
60
61
|
});
|
|
61
62
|
});
|
|
63
|
+
/** @deprecated Gebruik `commitSalesOrder` — 2026v1 kent geen acknowledge. */
|
|
64
|
+
export const acknowledgeSalesOrder = commitSalesOrder;
|
|
65
|
+
/** @deprecated Gebruik `cancelSalesOrder` — 2026v1 kent geen reject. */
|
|
66
|
+
export const rejectSalesOrder = cancelSalesOrder;
|
|
62
67
|
// ─── Fulfillment / Magazijn ─────────────────────────────────────────────────
|
|
63
68
|
export const confirmFulfillmentOrder = createServerFn({ method: "POST" })
|
|
64
69
|
.middleware([requireSupabaseAuth])
|