@flowselections/floriday-verkoop-module 1.0.19 → 1.0.21
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/OrderControlStatusCard.d.ts +6 -0
- package/dist-lib/components/verkoop/OrderControlStatusCard.d.ts.map +1 -0
- package/dist-lib/components/verkoop/OrderControlStatusCard.js +41 -0
- package/dist-lib/components/verkoop/SalesOrderDetailPage.d.ts.map +1 -1
- package/dist-lib/components/verkoop/SalesOrderDetailPage.js +20 -5
- package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts.map +1 -1
- package/dist-lib/components/verkoop/SalesOrderDetailView.js +2 -1
- package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
- package/dist-lib/components/verkoop/SalesOrdersTable.js +4 -1
- package/dist-lib/components/verkoop/VerkoopOrdersPage.js +1 -1
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +22 -0
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.d.ts +22 -0
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts +22 -0
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +22 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/cart-lock.functions.d.ts +22 -0
- package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
- package/dist-lib/lib/cart-replan.functions.d.ts +44 -0
- package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
- package/dist-lib/lib/create-order.functions.d.ts +264 -0
- package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
- package/dist-lib/lib/create-order.functions.js +34 -25
- package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +66 -0
- package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +22 -0
- package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-public.functions.d.ts +157 -0
- package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-public.functions.js +114 -38
- package/dist-lib/lib/floriday-writes.functions.d.ts +110 -0
- package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
- package/dist-lib/lib/order-shipments.functions.d.ts +88 -0
- package/dist-lib/lib/order-shipments.functions.d.ts.map +1 -1
- package/dist-lib/lib/salesorders-mapping.d.ts +2 -0
- package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
- package/dist-lib/lib/salesorders-mapping.js +8 -1
- package/dist-lib/lib/salesorders.functions.d.ts +23785 -0
- package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
- package/dist-lib/lib/salesorders.functions.js +181 -0
- package/dist-lib/lib/tradeitems.functions.d.ts +22 -0
- package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
- package/dist-lib/lib/useSalesOrderDetailQuery.d.ts +2 -0
- package/dist-lib/lib/useSalesOrderDetailQuery.d.ts.map +1 -0
- package/dist-lib/lib/useSalesOrderDetailQuery.js +50 -0
- package/dist-lib/lib/useSalesOrdersQuery.d.ts +2 -2
- package/dist-lib/lib/useSalesOrdersQuery.d.ts.map +1 -1
- package/dist-lib/lib/useSalesOrdersQuery.js +165 -12
- package/package.json +1 -1
|
@@ -33,8 +33,107 @@ const ENTITY_TABLE = {
|
|
|
33
33
|
const CachedListSchema = z.object({
|
|
34
34
|
environment: EnvSchema,
|
|
35
35
|
entity: z.string().min(1),
|
|
36
|
-
limit: z.number().int().positive().max(
|
|
36
|
+
limit: z.number().int().positive().max(20000).optional(),
|
|
37
|
+
// Optioneel — alleen benut voor entity "sales-orders".
|
|
38
|
+
since: z.string().optional(),
|
|
39
|
+
until: z.string().optional(),
|
|
40
|
+
dateField: z.enum(["ordered", "delivery"]).optional(),
|
|
37
41
|
});
|
|
42
|
+
// Sales-orders lezen we via een aparte, geoptimaliseerde tak: scope op de
|
|
43
|
+
// actieve connectie, sorteer op sequence_number DESC, pagineer met .range(),
|
|
44
|
+
// en filter serverside op de opgegeven periode. Zo blijft dit toekomstbestendig
|
|
45
|
+
// bij tienduizenden orders in de cache.
|
|
46
|
+
async function readSalesOrdersCache(supabase, args) {
|
|
47
|
+
// 1) Actieve connection_id voor de gekozen omgeving.
|
|
48
|
+
const dbEnv = args.environment === "live" ? "live" : "staging";
|
|
49
|
+
const { data: connRows, error: connErr } = await supabase
|
|
50
|
+
.from("floriday_connections")
|
|
51
|
+
.select("id")
|
|
52
|
+
.eq("is_active", true)
|
|
53
|
+
.eq("environment", dbEnv)
|
|
54
|
+
.limit(1);
|
|
55
|
+
if (connErr)
|
|
56
|
+
throw new Error(`floriday_connections lezen faalde: ${connErr.message}`);
|
|
57
|
+
const connectionId = (connRows ?? [])[0]?.id;
|
|
58
|
+
if (!connectionId)
|
|
59
|
+
return [];
|
|
60
|
+
// 2) Kolom in `data`-JSON die correspondeert met het gekozen dateField.
|
|
61
|
+
// Postgrest ondersteunt filters op JSON via ->>.
|
|
62
|
+
const dateColumn = args.dateField === "delivery"
|
|
63
|
+
? "data->delivery->>latestDeliveryDateTime"
|
|
64
|
+
: "data->>orderDateTime";
|
|
65
|
+
// 3) Gepagineerd lezen tot `limit` of tot de dataset uitgeput is.
|
|
66
|
+
const pageSize = 1000;
|
|
67
|
+
const collected = [];
|
|
68
|
+
for (let from = 0; from < args.limit; from += pageSize) {
|
|
69
|
+
const to = Math.min(from + pageSize - 1, args.limit - 1);
|
|
70
|
+
let q = supabase
|
|
71
|
+
.from("floriday_salesorders_cache")
|
|
72
|
+
.select("*")
|
|
73
|
+
.eq("connection_id", connectionId)
|
|
74
|
+
.eq("is_deleted", false)
|
|
75
|
+
.order("sequence_number", { ascending: false })
|
|
76
|
+
.range(from, to);
|
|
77
|
+
if (args.since)
|
|
78
|
+
q = q.gte(dateColumn, args.since);
|
|
79
|
+
if (args.until)
|
|
80
|
+
q = q.lt(dateColumn, args.until);
|
|
81
|
+
const { data: rows, error } = await q;
|
|
82
|
+
if (error)
|
|
83
|
+
throw new Error(`floriday_salesorders_cache lezen faalde: ${error.message}`);
|
|
84
|
+
const batch = rows ?? [];
|
|
85
|
+
collected.push(...batch);
|
|
86
|
+
if (batch.length < pageSize)
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
return collected;
|
|
90
|
+
}
|
|
91
|
+
async function joinOrderNumbers(supabase, rows) {
|
|
92
|
+
const ids = Array.from(new Set(rows
|
|
93
|
+
.map((r) => String(r?.floriday_id ?? r?.data?.salesOrderId ?? ""))
|
|
94
|
+
.filter((id) => id.length > 0)));
|
|
95
|
+
if (ids.length === 0)
|
|
96
|
+
return rows;
|
|
97
|
+
const orderNumbers = new Map();
|
|
98
|
+
const chunkSize = 500;
|
|
99
|
+
const maxAttempts = 3;
|
|
100
|
+
for (let i = 0; i < ids.length; i += chunkSize) {
|
|
101
|
+
const chunk = ids.slice(i, i + chunkSize);
|
|
102
|
+
let lastErr = null;
|
|
103
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
104
|
+
try {
|
|
105
|
+
const { data: mapRows, error: mapErr } = await supabase
|
|
106
|
+
.from("floriday_order_number_map")
|
|
107
|
+
.select("floriday_id, order_number")
|
|
108
|
+
.in("floriday_id", chunk);
|
|
109
|
+
if (mapErr)
|
|
110
|
+
throw new Error(mapErr.message);
|
|
111
|
+
for (const m of mapRows ?? []) {
|
|
112
|
+
orderNumbers.set(String(m.floriday_id), String(m.order_number ?? ""));
|
|
113
|
+
}
|
|
114
|
+
lastErr = null;
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
catch (e) {
|
|
118
|
+
lastErr = e;
|
|
119
|
+
if (attempt < maxAttempts) {
|
|
120
|
+
await new Promise((r) => setTimeout(r, 250 * attempt));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (lastErr) {
|
|
125
|
+
// Non-fatal: log en ga door zonder order_number verrijking voor deze chunk.
|
|
126
|
+
console.warn(`[floriday-public] joinOrderNumbers chunk ${i / chunkSize} faalde na ${maxAttempts} pogingen:`, lastErr instanceof Error ? lastErr.message : lastErr);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return rows.map((r) => {
|
|
130
|
+
const floridayId = String(r?.floriday_id ?? r?.data?.salesOrderId ?? "");
|
|
131
|
+
const orderNumber = orderNumbers.get(floridayId);
|
|
132
|
+
return orderNumber
|
|
133
|
+
? { ...r, order_number: orderNumber, data: { ...(r.data ?? {}), orderNumber } }
|
|
134
|
+
: r;
|
|
135
|
+
});
|
|
136
|
+
}
|
|
38
137
|
export const getFlorydayCachedList = createServerFn({ method: "POST" })
|
|
39
138
|
.middleware([requireSupabaseAuth])
|
|
40
139
|
.inputValidator((d) => CachedListSchema.parse(d))
|
|
@@ -43,50 +142,27 @@ export const getFlorydayCachedList = createServerFn({ method: "POST" })
|
|
|
43
142
|
if (!table) {
|
|
44
143
|
throw new Error(`Onbekende entity "${data.entity}" — toegestane waarden: ${Object.keys(ENTITY_TABLE).join(", ")}`);
|
|
45
144
|
}
|
|
145
|
+
// Sales-orders: aparte, geoptimaliseerde leestak.
|
|
146
|
+
if (data.entity === "sales-orders") {
|
|
147
|
+
const rows = await readSalesOrdersCache(context.supabase, {
|
|
148
|
+
environment: data.environment,
|
|
149
|
+
limit: data.limit ?? 20000,
|
|
150
|
+
since: data.since,
|
|
151
|
+
until: data.until,
|
|
152
|
+
dateField: data.dateField ?? "ordered",
|
|
153
|
+
});
|
|
154
|
+
const withNumbers = await joinOrderNumbers(context.supabase, rows);
|
|
155
|
+
return { entity: data.entity, rows: withNumbers };
|
|
156
|
+
}
|
|
157
|
+
// Overige entities: onveranderd gedrag.
|
|
46
158
|
const limit = data.limit ?? 1000;
|
|
47
159
|
let q = context.supabase.from(table).select("*").limit(limit);
|
|
48
|
-
|
|
49
|
-
const hasIsDeleted = [
|
|
50
|
-
"floriday_salesorders_cache",
|
|
51
|
-
"floriday_trade_items_cache",
|
|
52
|
-
].includes(table);
|
|
160
|
+
const hasIsDeleted = table === "floriday_trade_items_cache";
|
|
53
161
|
if (hasIsDeleted)
|
|
54
162
|
q = q.eq("is_deleted", false);
|
|
55
163
|
const { data: rows, error } = await q;
|
|
56
164
|
if (error)
|
|
57
165
|
throw new Error(`${table} lezen faalde: ${error.message}`);
|
|
58
|
-
if (table === "floriday_salesorders_cache") {
|
|
59
|
-
const ids = (rows ?? [])
|
|
60
|
-
.map((r) => String(r?.floriday_id ?? r?.data?.salesOrderId ?? ""))
|
|
61
|
-
.filter((id) => id.length > 0);
|
|
62
|
-
if (ids.length > 0) {
|
|
63
|
-
const mapped = [];
|
|
64
|
-
const idSet = new Set(ids);
|
|
65
|
-
for (let from = 0; from < 10000; from += 1000) {
|
|
66
|
-
const { data: chunkRows, error: mapError } = await context.supabase
|
|
67
|
-
.from("floriday_order_number_map")
|
|
68
|
-
.select("floriday_id, order_number")
|
|
69
|
-
.range(from, from + 999);
|
|
70
|
-
if (mapError)
|
|
71
|
-
throw new Error(`floriday_order_number_map lezen faalde: ${mapError.message}`);
|
|
72
|
-
const batch = chunkRows ?? [];
|
|
73
|
-
mapped.push(...batch.filter((m) => idSet.has(String(m.floriday_id))));
|
|
74
|
-
if (batch.length < 1000)
|
|
75
|
-
break;
|
|
76
|
-
}
|
|
77
|
-
const orderNumbers = new Map((mapped ?? []).map((m) => [String(m.floriday_id), String(m.order_number ?? "")]));
|
|
78
|
-
return {
|
|
79
|
-
entity: data.entity,
|
|
80
|
-
rows: (rows ?? []).map((r) => {
|
|
81
|
-
const floridayId = String(r?.floriday_id ?? r?.data?.salesOrderId ?? "");
|
|
82
|
-
const orderNumber = orderNumbers.get(floridayId) ?? null;
|
|
83
|
-
return orderNumber
|
|
84
|
-
? { ...r, order_number: orderNumber, data: { ...(r.data ?? {}), orderNumber } }
|
|
85
|
-
: r;
|
|
86
|
-
}),
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
166
|
return { entity: data.entity, rows: rows ?? [] };
|
|
91
167
|
});
|
|
92
168
|
const CodeListSchema = z.object({
|
|
@@ -4701,6 +4701,8 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
|
|
|
4701
4701
|
Row: {
|
|
4702
4702
|
buyer_organization_id: string | null;
|
|
4703
4703
|
connection_id: string;
|
|
4704
|
+
controlled_at: string | null;
|
|
4705
|
+
controlled_by: string | null;
|
|
4704
4706
|
created_at: string;
|
|
4705
4707
|
data: import("../integrations/supabase/types").Json;
|
|
4706
4708
|
floriday_id: string;
|
|
@@ -4712,6 +4714,8 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
|
|
|
4712
4714
|
Insert: {
|
|
4713
4715
|
buyer_organization_id?: string | null;
|
|
4714
4716
|
connection_id: string;
|
|
4717
|
+
controlled_at?: string | null;
|
|
4718
|
+
controlled_by?: string | null;
|
|
4715
4719
|
created_at?: string;
|
|
4716
4720
|
data: import("../integrations/supabase/types").Json;
|
|
4717
4721
|
floriday_id: string;
|
|
@@ -4723,6 +4727,8 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
|
|
|
4723
4727
|
Update: {
|
|
4724
4728
|
buyer_organization_id?: string | null;
|
|
4725
4729
|
connection_id?: string;
|
|
4730
|
+
controlled_at?: string | null;
|
|
4731
|
+
controlled_by?: string | null;
|
|
4726
4732
|
created_at?: string;
|
|
4727
4733
|
data?: import("../integrations/supabase/types").Json;
|
|
4728
4734
|
floriday_id?: string;
|
|
@@ -7741,6 +7747,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
|
|
|
7741
7747
|
id: string;
|
|
7742
7748
|
image_url: string | null;
|
|
7743
7749
|
incoming_quantity: number;
|
|
7750
|
+
is_layer: boolean;
|
|
7744
7751
|
layers_per_cart: number;
|
|
7745
7752
|
location: string;
|
|
7746
7753
|
min_quantity: number;
|
|
@@ -7768,6 +7775,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
|
|
|
7768
7775
|
id?: string;
|
|
7769
7776
|
image_url?: string | null;
|
|
7770
7777
|
incoming_quantity?: number;
|
|
7778
|
+
is_layer?: boolean;
|
|
7771
7779
|
layers_per_cart?: number;
|
|
7772
7780
|
location: string;
|
|
7773
7781
|
min_quantity?: number;
|
|
@@ -7795,6 +7803,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
|
|
|
7795
7803
|
id?: string;
|
|
7796
7804
|
image_url?: string | null;
|
|
7797
7805
|
incoming_quantity?: number;
|
|
7806
|
+
is_layer?: boolean;
|
|
7798
7807
|
layers_per_cart?: number;
|
|
7799
7808
|
location?: string;
|
|
7800
7809
|
min_quantity?: number;
|
|
@@ -11309,6 +11318,13 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
|
|
|
11309
11318
|
};
|
|
11310
11319
|
Returns: undefined;
|
|
11311
11320
|
};
|
|
11321
|
+
mark_salesorder_controlled: {
|
|
11322
|
+
Args: {
|
|
11323
|
+
p_controlled: boolean;
|
|
11324
|
+
p_floriday_id: string;
|
|
11325
|
+
};
|
|
11326
|
+
Returns: undefined;
|
|
11327
|
+
};
|
|
11312
11328
|
mark_shipment_shipped: {
|
|
11313
11329
|
Args: {
|
|
11314
11330
|
p_shipment_id: string;
|
|
@@ -11787,6 +11803,12 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
|
|
|
11787
11803
|
};
|
|
11788
11804
|
Returns: undefined;
|
|
11789
11805
|
};
|
|
11806
|
+
sync_product_group_belading: {
|
|
11807
|
+
Args: {
|
|
11808
|
+
_group_id: string;
|
|
11809
|
+
};
|
|
11810
|
+
Returns: undefined;
|
|
11811
|
+
};
|
|
11790
11812
|
sync_product_packing_from_floriday_cache: {
|
|
11791
11813
|
Args: {
|
|
11792
11814
|
p_floriday_id: string;
|
|
@@ -16539,6 +16561,8 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
|
|
|
16539
16561
|
Row: {
|
|
16540
16562
|
buyer_organization_id: string | null;
|
|
16541
16563
|
connection_id: string;
|
|
16564
|
+
controlled_at: string | null;
|
|
16565
|
+
controlled_by: string | null;
|
|
16542
16566
|
created_at: string;
|
|
16543
16567
|
data: import("../integrations/supabase/types").Json;
|
|
16544
16568
|
floriday_id: string;
|
|
@@ -16550,6 +16574,8 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
|
|
|
16550
16574
|
Insert: {
|
|
16551
16575
|
buyer_organization_id?: string | null;
|
|
16552
16576
|
connection_id: string;
|
|
16577
|
+
controlled_at?: string | null;
|
|
16578
|
+
controlled_by?: string | null;
|
|
16553
16579
|
created_at?: string;
|
|
16554
16580
|
data: import("../integrations/supabase/types").Json;
|
|
16555
16581
|
floriday_id: string;
|
|
@@ -16561,6 +16587,8 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
|
|
|
16561
16587
|
Update: {
|
|
16562
16588
|
buyer_organization_id?: string | null;
|
|
16563
16589
|
connection_id?: string;
|
|
16590
|
+
controlled_at?: string | null;
|
|
16591
|
+
controlled_by?: string | null;
|
|
16564
16592
|
created_at?: string;
|
|
16565
16593
|
data?: import("../integrations/supabase/types").Json;
|
|
16566
16594
|
floriday_id?: string;
|
|
@@ -19579,6 +19607,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
|
|
|
19579
19607
|
id: string;
|
|
19580
19608
|
image_url: string | null;
|
|
19581
19609
|
incoming_quantity: number;
|
|
19610
|
+
is_layer: boolean;
|
|
19582
19611
|
layers_per_cart: number;
|
|
19583
19612
|
location: string;
|
|
19584
19613
|
min_quantity: number;
|
|
@@ -19606,6 +19635,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
|
|
|
19606
19635
|
id?: string;
|
|
19607
19636
|
image_url?: string | null;
|
|
19608
19637
|
incoming_quantity?: number;
|
|
19638
|
+
is_layer?: boolean;
|
|
19609
19639
|
layers_per_cart?: number;
|
|
19610
19640
|
location: string;
|
|
19611
19641
|
min_quantity?: number;
|
|
@@ -19633,6 +19663,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
|
|
|
19633
19663
|
id?: string;
|
|
19634
19664
|
image_url?: string | null;
|
|
19635
19665
|
incoming_quantity?: number;
|
|
19666
|
+
is_layer?: boolean;
|
|
19636
19667
|
layers_per_cart?: number;
|
|
19637
19668
|
location?: string;
|
|
19638
19669
|
min_quantity?: number;
|
|
@@ -23147,6 +23178,13 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
|
|
|
23147
23178
|
};
|
|
23148
23179
|
Returns: undefined;
|
|
23149
23180
|
};
|
|
23181
|
+
mark_salesorder_controlled: {
|
|
23182
|
+
Args: {
|
|
23183
|
+
p_controlled: boolean;
|
|
23184
|
+
p_floriday_id: string;
|
|
23185
|
+
};
|
|
23186
|
+
Returns: undefined;
|
|
23187
|
+
};
|
|
23150
23188
|
mark_shipment_shipped: {
|
|
23151
23189
|
Args: {
|
|
23152
23190
|
p_shipment_id: string;
|
|
@@ -23625,6 +23663,12 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
|
|
|
23625
23663
|
};
|
|
23626
23664
|
Returns: undefined;
|
|
23627
23665
|
};
|
|
23666
|
+
sync_product_group_belading: {
|
|
23667
|
+
Args: {
|
|
23668
|
+
_group_id: string;
|
|
23669
|
+
};
|
|
23670
|
+
Returns: undefined;
|
|
23671
|
+
};
|
|
23628
23672
|
sync_product_packing_from_floriday_cache: {
|
|
23629
23673
|
Args: {
|
|
23630
23674
|
p_floriday_id: string;
|
|
@@ -28374,6 +28418,8 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
|
|
|
28374
28418
|
Row: {
|
|
28375
28419
|
buyer_organization_id: string | null;
|
|
28376
28420
|
connection_id: string;
|
|
28421
|
+
controlled_at: string | null;
|
|
28422
|
+
controlled_by: string | null;
|
|
28377
28423
|
created_at: string;
|
|
28378
28424
|
data: import("../integrations/supabase/types").Json;
|
|
28379
28425
|
floriday_id: string;
|
|
@@ -28385,6 +28431,8 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
|
|
|
28385
28431
|
Insert: {
|
|
28386
28432
|
buyer_organization_id?: string | null;
|
|
28387
28433
|
connection_id: string;
|
|
28434
|
+
controlled_at?: string | null;
|
|
28435
|
+
controlled_by?: string | null;
|
|
28388
28436
|
created_at?: string;
|
|
28389
28437
|
data: import("../integrations/supabase/types").Json;
|
|
28390
28438
|
floriday_id: string;
|
|
@@ -28396,6 +28444,8 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
|
|
|
28396
28444
|
Update: {
|
|
28397
28445
|
buyer_organization_id?: string | null;
|
|
28398
28446
|
connection_id?: string;
|
|
28447
|
+
controlled_at?: string | null;
|
|
28448
|
+
controlled_by?: string | null;
|
|
28399
28449
|
created_at?: string;
|
|
28400
28450
|
data?: import("../integrations/supabase/types").Json;
|
|
28401
28451
|
floriday_id?: string;
|
|
@@ -31414,6 +31464,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
|
|
|
31414
31464
|
id: string;
|
|
31415
31465
|
image_url: string | null;
|
|
31416
31466
|
incoming_quantity: number;
|
|
31467
|
+
is_layer: boolean;
|
|
31417
31468
|
layers_per_cart: number;
|
|
31418
31469
|
location: string;
|
|
31419
31470
|
min_quantity: number;
|
|
@@ -31441,6 +31492,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
|
|
|
31441
31492
|
id?: string;
|
|
31442
31493
|
image_url?: string | null;
|
|
31443
31494
|
incoming_quantity?: number;
|
|
31495
|
+
is_layer?: boolean;
|
|
31444
31496
|
layers_per_cart?: number;
|
|
31445
31497
|
location: string;
|
|
31446
31498
|
min_quantity?: number;
|
|
@@ -31468,6 +31520,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
|
|
|
31468
31520
|
id?: string;
|
|
31469
31521
|
image_url?: string | null;
|
|
31470
31522
|
incoming_quantity?: number;
|
|
31523
|
+
is_layer?: boolean;
|
|
31471
31524
|
layers_per_cart?: number;
|
|
31472
31525
|
location?: string;
|
|
31473
31526
|
min_quantity?: number;
|
|
@@ -34982,6 +35035,13 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
|
|
|
34982
35035
|
};
|
|
34983
35036
|
Returns: undefined;
|
|
34984
35037
|
};
|
|
35038
|
+
mark_salesorder_controlled: {
|
|
35039
|
+
Args: {
|
|
35040
|
+
p_controlled: boolean;
|
|
35041
|
+
p_floriday_id: string;
|
|
35042
|
+
};
|
|
35043
|
+
Returns: undefined;
|
|
35044
|
+
};
|
|
34985
35045
|
mark_shipment_shipped: {
|
|
34986
35046
|
Args: {
|
|
34987
35047
|
p_shipment_id: string;
|
|
@@ -35460,6 +35520,12 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
|
|
|
35460
35520
|
};
|
|
35461
35521
|
Returns: undefined;
|
|
35462
35522
|
};
|
|
35523
|
+
sync_product_group_belading: {
|
|
35524
|
+
Args: {
|
|
35525
|
+
_group_id: string;
|
|
35526
|
+
};
|
|
35527
|
+
Returns: undefined;
|
|
35528
|
+
};
|
|
35463
35529
|
sync_product_packing_from_floriday_cache: {
|
|
35464
35530
|
Args: {
|
|
35465
35531
|
p_floriday_id: string;
|
|
@@ -40212,6 +40278,8 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
|
|
|
40212
40278
|
Row: {
|
|
40213
40279
|
buyer_organization_id: string | null;
|
|
40214
40280
|
connection_id: string;
|
|
40281
|
+
controlled_at: string | null;
|
|
40282
|
+
controlled_by: string | null;
|
|
40215
40283
|
created_at: string;
|
|
40216
40284
|
data: import("../integrations/supabase/types").Json;
|
|
40217
40285
|
floriday_id: string;
|
|
@@ -40223,6 +40291,8 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
|
|
|
40223
40291
|
Insert: {
|
|
40224
40292
|
buyer_organization_id?: string | null;
|
|
40225
40293
|
connection_id: string;
|
|
40294
|
+
controlled_at?: string | null;
|
|
40295
|
+
controlled_by?: string | null;
|
|
40226
40296
|
created_at?: string;
|
|
40227
40297
|
data: import("../integrations/supabase/types").Json;
|
|
40228
40298
|
floriday_id: string;
|
|
@@ -40234,6 +40304,8 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
|
|
|
40234
40304
|
Update: {
|
|
40235
40305
|
buyer_organization_id?: string | null;
|
|
40236
40306
|
connection_id?: string;
|
|
40307
|
+
controlled_at?: string | null;
|
|
40308
|
+
controlled_by?: string | null;
|
|
40237
40309
|
created_at?: string;
|
|
40238
40310
|
data?: import("../integrations/supabase/types").Json;
|
|
40239
40311
|
floriday_id?: string;
|
|
@@ -43252,6 +43324,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
|
|
|
43252
43324
|
id: string;
|
|
43253
43325
|
image_url: string | null;
|
|
43254
43326
|
incoming_quantity: number;
|
|
43327
|
+
is_layer: boolean;
|
|
43255
43328
|
layers_per_cart: number;
|
|
43256
43329
|
location: string;
|
|
43257
43330
|
min_quantity: number;
|
|
@@ -43279,6 +43352,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
|
|
|
43279
43352
|
id?: string;
|
|
43280
43353
|
image_url?: string | null;
|
|
43281
43354
|
incoming_quantity?: number;
|
|
43355
|
+
is_layer?: boolean;
|
|
43282
43356
|
layers_per_cart?: number;
|
|
43283
43357
|
location: string;
|
|
43284
43358
|
min_quantity?: number;
|
|
@@ -43306,6 +43380,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
|
|
|
43306
43380
|
id?: string;
|
|
43307
43381
|
image_url?: string | null;
|
|
43308
43382
|
incoming_quantity?: number;
|
|
43383
|
+
is_layer?: boolean;
|
|
43309
43384
|
layers_per_cart?: number;
|
|
43310
43385
|
location?: string;
|
|
43311
43386
|
min_quantity?: number;
|
|
@@ -46820,6 +46895,13 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
|
|
|
46820
46895
|
};
|
|
46821
46896
|
Returns: undefined;
|
|
46822
46897
|
};
|
|
46898
|
+
mark_salesorder_controlled: {
|
|
46899
|
+
Args: {
|
|
46900
|
+
p_controlled: boolean;
|
|
46901
|
+
p_floriday_id: string;
|
|
46902
|
+
};
|
|
46903
|
+
Returns: undefined;
|
|
46904
|
+
};
|
|
46823
46905
|
mark_shipment_shipped: {
|
|
46824
46906
|
Args: {
|
|
46825
46907
|
p_shipment_id: string;
|
|
@@ -47298,6 +47380,12 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
|
|
|
47298
47380
|
};
|
|
47299
47381
|
Returns: undefined;
|
|
47300
47382
|
};
|
|
47383
|
+
sync_product_group_belading: {
|
|
47384
|
+
Args: {
|
|
47385
|
+
_group_id: string;
|
|
47386
|
+
};
|
|
47387
|
+
Returns: undefined;
|
|
47388
|
+
};
|
|
47301
47389
|
sync_product_packing_from_floriday_cache: {
|
|
47302
47390
|
Args: {
|
|
47303
47391
|
p_floriday_id: string;
|
|
@@ -52047,6 +52135,8 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
|
|
|
52047
52135
|
Row: {
|
|
52048
52136
|
buyer_organization_id: string | null;
|
|
52049
52137
|
connection_id: string;
|
|
52138
|
+
controlled_at: string | null;
|
|
52139
|
+
controlled_by: string | null;
|
|
52050
52140
|
created_at: string;
|
|
52051
52141
|
data: import("../integrations/supabase/types").Json;
|
|
52052
52142
|
floriday_id: string;
|
|
@@ -52058,6 +52148,8 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
|
|
|
52058
52148
|
Insert: {
|
|
52059
52149
|
buyer_organization_id?: string | null;
|
|
52060
52150
|
connection_id: string;
|
|
52151
|
+
controlled_at?: string | null;
|
|
52152
|
+
controlled_by?: string | null;
|
|
52061
52153
|
created_at?: string;
|
|
52062
52154
|
data: import("../integrations/supabase/types").Json;
|
|
52063
52155
|
floriday_id: string;
|
|
@@ -52069,6 +52161,8 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
|
|
|
52069
52161
|
Update: {
|
|
52070
52162
|
buyer_organization_id?: string | null;
|
|
52071
52163
|
connection_id?: string;
|
|
52164
|
+
controlled_at?: string | null;
|
|
52165
|
+
controlled_by?: string | null;
|
|
52072
52166
|
created_at?: string;
|
|
52073
52167
|
data?: import("../integrations/supabase/types").Json;
|
|
52074
52168
|
floriday_id?: string;
|
|
@@ -55087,6 +55181,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
|
|
|
55087
55181
|
id: string;
|
|
55088
55182
|
image_url: string | null;
|
|
55089
55183
|
incoming_quantity: number;
|
|
55184
|
+
is_layer: boolean;
|
|
55090
55185
|
layers_per_cart: number;
|
|
55091
55186
|
location: string;
|
|
55092
55187
|
min_quantity: number;
|
|
@@ -55114,6 +55209,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
|
|
|
55114
55209
|
id?: string;
|
|
55115
55210
|
image_url?: string | null;
|
|
55116
55211
|
incoming_quantity?: number;
|
|
55212
|
+
is_layer?: boolean;
|
|
55117
55213
|
layers_per_cart?: number;
|
|
55118
55214
|
location: string;
|
|
55119
55215
|
min_quantity?: number;
|
|
@@ -55141,6 +55237,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
|
|
|
55141
55237
|
id?: string;
|
|
55142
55238
|
image_url?: string | null;
|
|
55143
55239
|
incoming_quantity?: number;
|
|
55240
|
+
is_layer?: boolean;
|
|
55144
55241
|
layers_per_cart?: number;
|
|
55145
55242
|
location?: string;
|
|
55146
55243
|
min_quantity?: number;
|
|
@@ -58655,6 +58752,13 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
|
|
|
58655
58752
|
};
|
|
58656
58753
|
Returns: undefined;
|
|
58657
58754
|
};
|
|
58755
|
+
mark_salesorder_controlled: {
|
|
58756
|
+
Args: {
|
|
58757
|
+
p_controlled: boolean;
|
|
58758
|
+
p_floriday_id: string;
|
|
58759
|
+
};
|
|
58760
|
+
Returns: undefined;
|
|
58761
|
+
};
|
|
58658
58762
|
mark_shipment_shipped: {
|
|
58659
58763
|
Args: {
|
|
58660
58764
|
p_shipment_id: string;
|
|
@@ -59133,6 +59237,12 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
|
|
|
59133
59237
|
};
|
|
59134
59238
|
Returns: undefined;
|
|
59135
59239
|
};
|
|
59240
|
+
sync_product_group_belading: {
|
|
59241
|
+
Args: {
|
|
59242
|
+
_group_id: string;
|
|
59243
|
+
};
|
|
59244
|
+
Returns: undefined;
|
|
59245
|
+
};
|
|
59136
59246
|
sync_product_packing_from_floriday_cache: {
|
|
59137
59247
|
Args: {
|
|
59138
59248
|
p_floriday_id: string;
|