@flowselections/floriday-verkoop-module 1.0.20 → 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.
Files changed (50) hide show
  1. package/dist-lib/components/verkoop/OrderControlStatusCard.d.ts +6 -0
  2. package/dist-lib/components/verkoop/OrderControlStatusCard.d.ts.map +1 -0
  3. package/dist-lib/components/verkoop/OrderControlStatusCard.js +41 -0
  4. package/dist-lib/components/verkoop/SalesOrderDetailPage.d.ts.map +1 -1
  5. package/dist-lib/components/verkoop/SalesOrderDetailPage.js +20 -5
  6. package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts.map +1 -1
  7. package/dist-lib/components/verkoop/SalesOrderDetailView.js +2 -1
  8. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
  9. package/dist-lib/components/verkoop/SalesOrdersTable.js +4 -1
  10. package/dist-lib/components/verkoop/VerkoopOrdersPage.js +1 -1
  11. package/dist-lib/integrations/supabase/auth-middleware.d.ts +16 -0
  12. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  13. package/dist-lib/integrations/supabase/client.d.ts +16 -0
  14. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  15. package/dist-lib/integrations/supabase/client.server.d.ts +16 -0
  16. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  17. package/dist-lib/integrations/supabase/types.d.ts +16 -0
  18. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  19. package/dist-lib/lib/cart-lock.functions.d.ts +16 -0
  20. package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
  21. package/dist-lib/lib/cart-replan.functions.d.ts +32 -0
  22. package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
  23. package/dist-lib/lib/create-order.functions.d.ts +192 -0
  24. package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
  25. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +48 -0
  26. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
  27. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +16 -0
  28. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
  29. package/dist-lib/lib/floriday-public.functions.d.ts +115 -0
  30. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  31. package/dist-lib/lib/floriday-public.functions.js +114 -38
  32. package/dist-lib/lib/floriday-writes.functions.d.ts +80 -0
  33. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  34. package/dist-lib/lib/order-shipments.functions.d.ts +64 -0
  35. package/dist-lib/lib/order-shipments.functions.d.ts.map +1 -1
  36. package/dist-lib/lib/salesorders-mapping.d.ts +2 -0
  37. package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
  38. package/dist-lib/lib/salesorders-mapping.js +8 -1
  39. package/dist-lib/lib/salesorders.functions.d.ts +23767 -0
  40. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  41. package/dist-lib/lib/salesorders.functions.js +181 -0
  42. package/dist-lib/lib/tradeitems.functions.d.ts +16 -0
  43. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  44. package/dist-lib/lib/useSalesOrderDetailQuery.d.ts +2 -0
  45. package/dist-lib/lib/useSalesOrderDetailQuery.d.ts.map +1 -0
  46. package/dist-lib/lib/useSalesOrderDetailQuery.js +50 -0
  47. package/dist-lib/lib/useSalesOrdersQuery.d.ts +2 -2
  48. package/dist-lib/lib/useSalesOrdersQuery.d.ts.map +1 -1
  49. package/dist-lib/lib/useSalesOrdersQuery.js +103 -9
  50. 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(5000).optional(),
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
- // Most cache-tables have an is_deleted column; filter when present.
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;
@@ -16545,6 +16561,8 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
16545
16561
  Row: {
16546
16562
  buyer_organization_id: string | null;
16547
16563
  connection_id: string;
16564
+ controlled_at: string | null;
16565
+ controlled_by: string | null;
16548
16566
  created_at: string;
16549
16567
  data: import("../integrations/supabase/types").Json;
16550
16568
  floriday_id: string;
@@ -16556,6 +16574,8 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
16556
16574
  Insert: {
16557
16575
  buyer_organization_id?: string | null;
16558
16576
  connection_id: string;
16577
+ controlled_at?: string | null;
16578
+ controlled_by?: string | null;
16559
16579
  created_at?: string;
16560
16580
  data: import("../integrations/supabase/types").Json;
16561
16581
  floriday_id: string;
@@ -16567,6 +16587,8 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
16567
16587
  Update: {
16568
16588
  buyer_organization_id?: string | null;
16569
16589
  connection_id?: string;
16590
+ controlled_at?: string | null;
16591
+ controlled_by?: string | null;
16570
16592
  created_at?: string;
16571
16593
  data?: import("../integrations/supabase/types").Json;
16572
16594
  floriday_id?: string;
@@ -19585,6 +19607,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
19585
19607
  id: string;
19586
19608
  image_url: string | null;
19587
19609
  incoming_quantity: number;
19610
+ is_layer: boolean;
19588
19611
  layers_per_cart: number;
19589
19612
  location: string;
19590
19613
  min_quantity: number;
@@ -19612,6 +19635,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
19612
19635
  id?: string;
19613
19636
  image_url?: string | null;
19614
19637
  incoming_quantity?: number;
19638
+ is_layer?: boolean;
19615
19639
  layers_per_cart?: number;
19616
19640
  location: string;
19617
19641
  min_quantity?: number;
@@ -19639,6 +19663,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
19639
19663
  id?: string;
19640
19664
  image_url?: string | null;
19641
19665
  incoming_quantity?: number;
19666
+ is_layer?: boolean;
19642
19667
  layers_per_cart?: number;
19643
19668
  location?: string;
19644
19669
  min_quantity?: number;
@@ -23153,6 +23178,13 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Opt
23153
23178
  };
23154
23179
  Returns: undefined;
23155
23180
  };
23181
+ mark_salesorder_controlled: {
23182
+ Args: {
23183
+ p_controlled: boolean;
23184
+ p_floriday_id: string;
23185
+ };
23186
+ Returns: undefined;
23187
+ };
23156
23188
  mark_shipment_shipped: {
23157
23189
  Args: {
23158
23190
  p_shipment_id: string;
@@ -28386,6 +28418,8 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
28386
28418
  Row: {
28387
28419
  buyer_organization_id: string | null;
28388
28420
  connection_id: string;
28421
+ controlled_at: string | null;
28422
+ controlled_by: string | null;
28389
28423
  created_at: string;
28390
28424
  data: import("../integrations/supabase/types").Json;
28391
28425
  floriday_id: string;
@@ -28397,6 +28431,8 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
28397
28431
  Insert: {
28398
28432
  buyer_organization_id?: string | null;
28399
28433
  connection_id: string;
28434
+ controlled_at?: string | null;
28435
+ controlled_by?: string | null;
28400
28436
  created_at?: string;
28401
28437
  data: import("../integrations/supabase/types").Json;
28402
28438
  floriday_id: string;
@@ -28408,6 +28444,8 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
28408
28444
  Update: {
28409
28445
  buyer_organization_id?: string | null;
28410
28446
  connection_id?: string;
28447
+ controlled_at?: string | null;
28448
+ controlled_by?: string | null;
28411
28449
  created_at?: string;
28412
28450
  data?: import("../integrations/supabase/types").Json;
28413
28451
  floriday_id?: string;
@@ -31426,6 +31464,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
31426
31464
  id: string;
31427
31465
  image_url: string | null;
31428
31466
  incoming_quantity: number;
31467
+ is_layer: boolean;
31429
31468
  layers_per_cart: number;
31430
31469
  location: string;
31431
31470
  min_quantity: number;
@@ -31453,6 +31492,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
31453
31492
  id?: string;
31454
31493
  image_url?: string | null;
31455
31494
  incoming_quantity?: number;
31495
+ is_layer?: boolean;
31456
31496
  layers_per_cart?: number;
31457
31497
  location: string;
31458
31498
  min_quantity?: number;
@@ -31480,6 +31520,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
31480
31520
  id?: string;
31481
31521
  image_url?: string | null;
31482
31522
  incoming_quantity?: number;
31523
+ is_layer?: boolean;
31483
31524
  layers_per_cart?: number;
31484
31525
  location?: string;
31485
31526
  min_quantity?: number;
@@ -34994,6 +35035,13 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
34994
35035
  };
34995
35036
  Returns: undefined;
34996
35037
  };
35038
+ mark_salesorder_controlled: {
35039
+ Args: {
35040
+ p_controlled: boolean;
35041
+ p_floriday_id: string;
35042
+ };
35043
+ Returns: undefined;
35044
+ };
34997
35045
  mark_shipment_shipped: {
34998
35046
  Args: {
34999
35047
  p_shipment_id: string;
@@ -40230,6 +40278,8 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
40230
40278
  Row: {
40231
40279
  buyer_organization_id: string | null;
40232
40280
  connection_id: string;
40281
+ controlled_at: string | null;
40282
+ controlled_by: string | null;
40233
40283
  created_at: string;
40234
40284
  data: import("../integrations/supabase/types").Json;
40235
40285
  floriday_id: string;
@@ -40241,6 +40291,8 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
40241
40291
  Insert: {
40242
40292
  buyer_organization_id?: string | null;
40243
40293
  connection_id: string;
40294
+ controlled_at?: string | null;
40295
+ controlled_by?: string | null;
40244
40296
  created_at?: string;
40245
40297
  data: import("../integrations/supabase/types").Json;
40246
40298
  floriday_id: string;
@@ -40252,6 +40304,8 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
40252
40304
  Update: {
40253
40305
  buyer_organization_id?: string | null;
40254
40306
  connection_id?: string;
40307
+ controlled_at?: string | null;
40308
+ controlled_by?: string | null;
40255
40309
  created_at?: string;
40256
40310
  data?: import("../integrations/supabase/types").Json;
40257
40311
  floriday_id?: string;
@@ -43270,6 +43324,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
43270
43324
  id: string;
43271
43325
  image_url: string | null;
43272
43326
  incoming_quantity: number;
43327
+ is_layer: boolean;
43273
43328
  layers_per_cart: number;
43274
43329
  location: string;
43275
43330
  min_quantity: number;
@@ -43297,6 +43352,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
43297
43352
  id?: string;
43298
43353
  image_url?: string | null;
43299
43354
  incoming_quantity?: number;
43355
+ is_layer?: boolean;
43300
43356
  layers_per_cart?: number;
43301
43357
  location: string;
43302
43358
  min_quantity?: number;
@@ -43324,6 +43380,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
43324
43380
  id?: string;
43325
43381
  image_url?: string | null;
43326
43382
  incoming_quantity?: number;
43383
+ is_layer?: boolean;
43327
43384
  layers_per_cart?: number;
43328
43385
  location?: string;
43329
43386
  min_quantity?: number;
@@ -46838,6 +46895,13 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Opt
46838
46895
  };
46839
46896
  Returns: undefined;
46840
46897
  };
46898
+ mark_salesorder_controlled: {
46899
+ Args: {
46900
+ p_controlled: boolean;
46901
+ p_floriday_id: string;
46902
+ };
46903
+ Returns: undefined;
46904
+ };
46841
46905
  mark_shipment_shipped: {
46842
46906
  Args: {
46843
46907
  p_shipment_id: string;
@@ -52071,6 +52135,8 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
52071
52135
  Row: {
52072
52136
  buyer_organization_id: string | null;
52073
52137
  connection_id: string;
52138
+ controlled_at: string | null;
52139
+ controlled_by: string | null;
52074
52140
  created_at: string;
52075
52141
  data: import("../integrations/supabase/types").Json;
52076
52142
  floriday_id: string;
@@ -52082,6 +52148,8 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
52082
52148
  Insert: {
52083
52149
  buyer_organization_id?: string | null;
52084
52150
  connection_id: string;
52151
+ controlled_at?: string | null;
52152
+ controlled_by?: string | null;
52085
52153
  created_at?: string;
52086
52154
  data: import("../integrations/supabase/types").Json;
52087
52155
  floriday_id: string;
@@ -52093,6 +52161,8 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
52093
52161
  Update: {
52094
52162
  buyer_organization_id?: string | null;
52095
52163
  connection_id?: string;
52164
+ controlled_at?: string | null;
52165
+ controlled_by?: string | null;
52096
52166
  created_at?: string;
52097
52167
  data?: import("../integrations/supabase/types").Json;
52098
52168
  floriday_id?: string;
@@ -55111,6 +55181,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
55111
55181
  id: string;
55112
55182
  image_url: string | null;
55113
55183
  incoming_quantity: number;
55184
+ is_layer: boolean;
55114
55185
  layers_per_cart: number;
55115
55186
  location: string;
55116
55187
  min_quantity: number;
@@ -55138,6 +55209,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
55138
55209
  id?: string;
55139
55210
  image_url?: string | null;
55140
55211
  incoming_quantity?: number;
55212
+ is_layer?: boolean;
55141
55213
  layers_per_cart?: number;
55142
55214
  location: string;
55143
55215
  min_quantity?: number;
@@ -55165,6 +55237,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
55165
55237
  id?: string;
55166
55238
  image_url?: string | null;
55167
55239
  incoming_quantity?: number;
55240
+ is_layer?: boolean;
55168
55241
  layers_per_cart?: number;
55169
55242
  location?: string;
55170
55243
  min_quantity?: number;
@@ -58679,6 +58752,13 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Opt
58679
58752
  };
58680
58753
  Returns: undefined;
58681
58754
  };
58755
+ mark_salesorder_controlled: {
58756
+ Args: {
58757
+ p_controlled: boolean;
58758
+ p_floriday_id: string;
58759
+ };
58760
+ Returns: undefined;
58761
+ };
58682
58762
  mark_shipment_shipped: {
58683
58763
  Args: {
58684
58764
  p_shipment_id: string;