@flowselections/floriday-authenticatie-module 1.0.22 → 1.0.24

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 (47) hide show
  1. package/dist-lib/components/settings/FloricodeSettingsCard.js +1 -1
  2. package/dist-lib/integrations/supabase/auth-middleware.d.ts +385 -3
  3. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  4. package/dist-lib/integrations/supabase/client.d.ts +385 -3
  5. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  6. package/dist-lib/integrations/supabase/client.server.d.ts +385 -3
  7. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  8. package/dist-lib/integrations/supabase/client.server.js +1 -0
  9. package/dist-lib/integrations/supabase/types.d.ts +389 -3
  10. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  11. package/dist-lib/lib/central-auth.server.d.ts +34 -0
  12. package/dist-lib/lib/central-auth.server.d.ts.map +1 -0
  13. package/dist-lib/lib/central-auth.server.js +105 -0
  14. package/dist-lib/lib/floricode-credentials.server.d.ts.map +1 -1
  15. package/dist-lib/lib/floricode-credentials.server.js +94 -26
  16. package/dist-lib/lib/floricode.functions.d.ts +2758 -83
  17. package/dist-lib/lib/floricode.functions.d.ts.map +1 -1
  18. package/dist-lib/lib/floricode.functions.js +13 -0
  19. package/dist-lib/lib/floriday-auction-letters.functions.d.ts +385 -3
  20. package/dist-lib/lib/floriday-auction-letters.functions.d.ts.map +1 -1
  21. package/dist-lib/lib/floriday-labels.functions.d.ts +385 -3
  22. package/dist-lib/lib/floriday-labels.functions.d.ts.map +1 -1
  23. package/dist-lib/lib/floriday-public.functions.d.ts +2310 -18
  24. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  25. package/dist-lib/lib/floriday-stickers.functions.d.ts +385 -3
  26. package/dist-lib/lib/floriday-stickers.functions.d.ts.map +1 -1
  27. package/dist-lib/lib/floriday-sync.functions.d.ts +12493 -651
  28. package/dist-lib/lib/floriday-sync.functions.d.ts.map +1 -1
  29. package/dist-lib/lib/floriday-sync.functions.js +2 -1
  30. package/dist-lib/lib/floriday-writes.functions.d.ts +2310 -18
  31. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  32. package/dist-lib/lib/floriday.functions.d.ts +7322 -321
  33. package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
  34. package/dist-lib/lib/floriday.functions.js +33 -35
  35. package/dist-lib/lib/gateway/cache-tables.d.ts +2 -0
  36. package/dist-lib/lib/gateway/cache-tables.d.ts.map +1 -0
  37. package/dist-lib/lib/gateway/cache-tables.js +27 -0
  38. package/dist-lib/lib/gateway/cached-list.d.ts +15 -0
  39. package/dist-lib/lib/gateway/cached-list.d.ts.map +1 -0
  40. package/dist-lib/lib/gateway/cached-list.js +35 -0
  41. package/dist-lib/lib/gateway/index.d.ts +4 -0
  42. package/dist-lib/lib/gateway/index.d.ts.map +1 -0
  43. package/dist-lib/lib/gateway/index.js +3 -0
  44. package/dist-lib/lib/gateway/shared.d.ts +2 -0
  45. package/dist-lib/lib/gateway/shared.d.ts.map +1 -0
  46. package/dist-lib/lib/gateway/shared.js +3 -0
  47. package/package.json +6 -2
@@ -93,7 +93,7 @@ function CredentialsBlock({ settings }) {
93
93
  },
94
94
  onError: (e) => toast.error(String(e?.message ?? e)),
95
95
  });
96
- return (_jsx(StepBlock, { number: 1, title: "Vul verbindingsgegevens in", children: _jsxs("div", { className: "rounded-lg border border-border/60 bg-card p-4 space-y-4", children: [_jsxs("div", { className: "flex items-start justify-between gap-3", children: [_jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [_jsx("h4", { className: "font-medium text-sm", children: "Verbindingsgegevens" }), configured ? (_jsx(Badge, { variant: "default", className: "text-[10px]", children: "Actief" })) : (_jsx(Badge, { variant: "secondary", className: "text-[10px]", children: "Nog niet gekoppeld" }))] }), configured && (_jsxs(AlertDialog, { children: [_jsx(AlertDialogTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "sm", disabled: clearMut.isPending, children: "Verwijderen" }) }), _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: "Koppeling verwijderen?" }), _jsx(AlertDialogDescription, { children: "Hiermee worden de opgeslagen Floricode-inloggegevens permanent verwijderd. Andere koppelingen die hiervan afhankelijk zijn werken daarna niet meer totdat je opnieuw verbinding maakt." })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { children: "Annuleren" }), _jsx(AlertDialogAction, { onClick: () => clearMut.mutate(), children: "Verwijderen" })] })] })] }))] }), _jsxs("div", { className: "grid gap-4", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "floricode-client-id", className: "text-xs", children: "Client ID" }), _jsx(Input, { id: "floricode-client-id", value: clientId, onChange: (e) => setClientId(e.target.value), placeholder: configured ? settings?.clientId ?? "••••••••" : "Floricode Client ID", className: configured ? "font-mono placeholder:font-mono placeholder:text-foreground/60" : undefined, autoComplete: "off" }), _jsx("p", { className: "text-[11px] text-muted-foreground", children: "Te vinden in je Floricode API-instellingen." }), configured && (_jsx("p", { className: "text-[11px] text-muted-foreground", children: "Laat leeg als je deze waarde niet wilt wijzigen." }))] }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "floricode-client-secret", className: "text-xs", children: "Client Secret" }), _jsx(Input, { id: "floricode-client-secret", type: "password", value: clientSecret, onChange: (e) => setClientSecret(e.target.value), placeholder: configured
96
+ return (_jsx(StepBlock, { number: 1, title: "Vul verbindingsgegevens in", children: _jsxs("div", { className: "rounded-lg border border-border/60 bg-card p-4 space-y-4", children: [_jsxs("div", { className: "flex items-start justify-between gap-3", children: [_jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [_jsx("h4", { className: "font-medium text-sm", children: "Verbindingsgegevens" }), configured ? (_jsx(Badge, { variant: "default", className: "text-[10px]", children: "Actief" })) : (_jsx(Badge, { variant: "secondary", className: "text-[10px]", children: "Nog niet gekoppeld" }))] }), configured && (_jsxs(AlertDialog, { children: [_jsx(AlertDialogTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "sm", disabled: clearMut.isPending, children: "Verwijderen" }) }), _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: "Koppeling verwijderen?" }), _jsx(AlertDialogDescription, { children: "Hiermee worden de opgeslagen Floricode-inloggegevens permanent verwijderd. Andere koppelingen die hiervan afhankelijk zijn werken daarna niet meer totdat je opnieuw verbinding maakt." })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { children: "Annuleren" }), _jsx(AlertDialogAction, { onClick: () => clearMut.mutate(), children: "Verwijderen" })] })] })] }))] }), _jsxs("p", { className: "text-[11px] text-muted-foreground", children: ["Encryptiesleutel: beheerd door central", typeof settings?.keyVersion === "number" ? ` (versie ${settings.keyVersion})` : ""] }), _jsxs("div", { className: "grid gap-4", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "floricode-client-id", className: "text-xs", children: "Client ID" }), _jsx(Input, { id: "floricode-client-id", value: clientId, onChange: (e) => setClientId(e.target.value), placeholder: configured ? settings?.clientId ?? "••••••••" : "Floricode Client ID", className: configured ? "font-mono placeholder:font-mono placeholder:text-foreground/60" : undefined, autoComplete: "off" }), _jsx("p", { className: "text-[11px] text-muted-foreground", children: "Te vinden in je Floricode API-instellingen." }), configured && (_jsx("p", { className: "text-[11px] text-muted-foreground", children: "Laat leeg als je deze waarde niet wilt wijzigen." }))] }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "floricode-client-secret", className: "text-xs", children: "Client Secret" }), _jsx(Input, { id: "floricode-client-secret", type: "password", value: clientSecret, onChange: (e) => setClientSecret(e.target.value), placeholder: configured
97
97
  ? settings?.secretLast4
98
98
  ? `••••••••${settings.secretLast4}`
99
99
  : "••••••••"
@@ -1028,6 +1028,141 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1028
1028
  };
1029
1029
  Relationships: [];
1030
1030
  };
1031
+ cart_planning_pick_times: {
1032
+ Row: {
1033
+ created_at: string;
1034
+ id: string;
1035
+ pot_size: string;
1036
+ seconds_per_cart: number;
1037
+ updated_at: string;
1038
+ };
1039
+ Insert: {
1040
+ created_at?: string;
1041
+ id?: string;
1042
+ pot_size: string;
1043
+ seconds_per_cart: number;
1044
+ updated_at?: string;
1045
+ };
1046
+ Update: {
1047
+ created_at?: string;
1048
+ id?: string;
1049
+ pot_size?: string;
1050
+ seconds_per_cart?: number;
1051
+ updated_at?: string;
1052
+ };
1053
+ Relationships: [];
1054
+ };
1055
+ cart_planning_product_overrides: {
1056
+ Row: {
1057
+ created_at: string;
1058
+ id: string;
1059
+ max_party_share_per_layer_pct_override: number | null;
1060
+ never_mix: boolean;
1061
+ notes: string | null;
1062
+ product_id: string;
1063
+ updated_at: string;
1064
+ };
1065
+ Insert: {
1066
+ created_at?: string;
1067
+ id?: string;
1068
+ max_party_share_per_layer_pct_override?: number | null;
1069
+ never_mix?: boolean;
1070
+ notes?: string | null;
1071
+ product_id: string;
1072
+ updated_at?: string;
1073
+ };
1074
+ Update: {
1075
+ created_at?: string;
1076
+ id?: string;
1077
+ max_party_share_per_layer_pct_override?: number | null;
1078
+ never_mix?: boolean;
1079
+ notes?: string | null;
1080
+ product_id?: string;
1081
+ updated_at?: string;
1082
+ };
1083
+ Relationships: [{
1084
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
1085
+ columns: ["product_id"];
1086
+ isOneToOne: true;
1087
+ referencedRelation: "products";
1088
+ referencedColumns: ["id"];
1089
+ }];
1090
+ };
1091
+ cart_planning_settings: {
1092
+ Row: {
1093
+ allow_editing_after_pickstation_send: boolean;
1094
+ buffer_grouping_mode: string;
1095
+ combine_floriday_orders: boolean;
1096
+ combine_floriday_orders_window: string;
1097
+ combine_orders_scope: string;
1098
+ default_workers: number;
1099
+ id: number;
1100
+ max_beladingen_per_layer: number;
1101
+ max_customers_per_cart: number;
1102
+ max_one_customer_per_layer: boolean;
1103
+ max_party_share_per_layer_pct: number;
1104
+ optimization_strategy: string;
1105
+ own_cart_from_layers: number;
1106
+ pick_time_mode: string;
1107
+ plants_per_day: number;
1108
+ plants_per_hour: number;
1109
+ require_same_carrier: boolean;
1110
+ require_same_crate_type: boolean;
1111
+ require_same_delivery_date: boolean;
1112
+ require_same_delivery_location: boolean;
1113
+ updated_at: string;
1114
+ updated_by: string | null;
1115
+ };
1116
+ Insert: {
1117
+ allow_editing_after_pickstation_send?: boolean;
1118
+ buffer_grouping_mode?: string;
1119
+ combine_floriday_orders?: boolean;
1120
+ combine_floriday_orders_window?: string;
1121
+ combine_orders_scope?: string;
1122
+ default_workers?: number;
1123
+ id?: number;
1124
+ max_beladingen_per_layer?: number;
1125
+ max_customers_per_cart?: number;
1126
+ max_one_customer_per_layer?: boolean;
1127
+ max_party_share_per_layer_pct?: number;
1128
+ optimization_strategy?: string;
1129
+ own_cart_from_layers?: number;
1130
+ pick_time_mode?: string;
1131
+ plants_per_day?: number;
1132
+ plants_per_hour?: number;
1133
+ require_same_carrier?: boolean;
1134
+ require_same_crate_type?: boolean;
1135
+ require_same_delivery_date?: boolean;
1136
+ require_same_delivery_location?: boolean;
1137
+ updated_at?: string;
1138
+ updated_by?: string | null;
1139
+ };
1140
+ Update: {
1141
+ allow_editing_after_pickstation_send?: boolean;
1142
+ buffer_grouping_mode?: string;
1143
+ combine_floriday_orders?: boolean;
1144
+ combine_floriday_orders_window?: string;
1145
+ combine_orders_scope?: string;
1146
+ default_workers?: number;
1147
+ id?: number;
1148
+ max_beladingen_per_layer?: number;
1149
+ max_customers_per_cart?: number;
1150
+ max_one_customer_per_layer?: boolean;
1151
+ max_party_share_per_layer_pct?: number;
1152
+ optimization_strategy?: string;
1153
+ own_cart_from_layers?: number;
1154
+ pick_time_mode?: string;
1155
+ plants_per_day?: number;
1156
+ plants_per_hour?: number;
1157
+ require_same_carrier?: boolean;
1158
+ require_same_crate_type?: boolean;
1159
+ require_same_delivery_date?: boolean;
1160
+ require_same_delivery_location?: boolean;
1161
+ updated_at?: string;
1162
+ updated_by?: string | null;
1163
+ };
1164
+ Relationships: [];
1165
+ };
1031
1166
  cart_replan_queue: {
1032
1167
  Row: {
1033
1168
  attempts: number;
@@ -1058,6 +1193,39 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1058
1193
  referencedColumns: ["id"];
1059
1194
  }];
1060
1195
  };
1196
+ cart_types: {
1197
+ Row: {
1198
+ created_at: string;
1199
+ id: string;
1200
+ is_default: boolean;
1201
+ layer_length_cm: number;
1202
+ layer_width_cm: number;
1203
+ layers_per_cart: number;
1204
+ name: string;
1205
+ updated_at: string;
1206
+ };
1207
+ Insert: {
1208
+ created_at?: string;
1209
+ id?: string;
1210
+ is_default?: boolean;
1211
+ layer_length_cm: number;
1212
+ layer_width_cm: number;
1213
+ layers_per_cart?: number;
1214
+ name: string;
1215
+ updated_at?: string;
1216
+ };
1217
+ Update: {
1218
+ created_at?: string;
1219
+ id?: string;
1220
+ is_default?: boolean;
1221
+ layer_length_cm?: number;
1222
+ layer_width_cm?: number;
1223
+ layers_per_cart?: number;
1224
+ name?: string;
1225
+ updated_at?: string;
1226
+ };
1227
+ Relationships: [];
1228
+ };
1061
1229
  collections: {
1062
1230
  Row: {
1063
1231
  created_at: string;
@@ -1082,6 +1250,36 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1082
1250
  };
1083
1251
  Relationships: [];
1084
1252
  };
1253
+ crate_types: {
1254
+ Row: {
1255
+ created_at: string;
1256
+ id: string;
1257
+ length_cm: number;
1258
+ name: string;
1259
+ plants_per_crate: number;
1260
+ updated_at: string;
1261
+ width_cm: number;
1262
+ };
1263
+ Insert: {
1264
+ created_at?: string;
1265
+ id?: string;
1266
+ length_cm: number;
1267
+ name: string;
1268
+ plants_per_crate?: number;
1269
+ updated_at?: string;
1270
+ width_cm: number;
1271
+ };
1272
+ Update: {
1273
+ created_at?: string;
1274
+ id?: string;
1275
+ length_cm?: number;
1276
+ name?: string;
1277
+ plants_per_crate?: number;
1278
+ updated_at?: string;
1279
+ width_cm?: number;
1280
+ };
1281
+ Relationships: [];
1282
+ };
1085
1283
  customer_audit_log: {
1086
1284
  Row: {
1087
1285
  action: string;
@@ -4997,6 +5195,27 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4997
5195
  referencedColumns: ["id"];
4998
5196
  }];
4999
5197
  };
5198
+ floriday_vbn_required_characteristics: {
5199
+ Row: {
5200
+ required_codes: string[];
5201
+ updated_at: string;
5202
+ updated_by: string | null;
5203
+ vbn_code: string;
5204
+ };
5205
+ Insert: {
5206
+ required_codes?: string[];
5207
+ updated_at?: string;
5208
+ updated_by?: string | null;
5209
+ vbn_code: string;
5210
+ };
5211
+ Update: {
5212
+ required_codes?: string[];
5213
+ updated_at?: string;
5214
+ updated_by?: string | null;
5215
+ vbn_code?: string;
5216
+ };
5217
+ Relationships: [];
5218
+ };
5000
5219
  floriday_warehouses_cache: {
5001
5220
  Row: {
5002
5221
  connection_id: string;
@@ -5699,6 +5918,69 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5699
5918
  };
5700
5919
  Relationships: [];
5701
5920
  };
5921
+ logistics_capacity_events: {
5922
+ Row: {
5923
+ available_carts: number;
5924
+ created_at: string;
5925
+ id: string;
5926
+ measures: import("./types").Json;
5927
+ note: string | null;
5928
+ outcome: string;
5929
+ required_carts: number;
5930
+ reserve_minutes: number;
5931
+ shortage_carts: number;
5932
+ status: string;
5933
+ user_id: string;
5934
+ };
5935
+ Insert: {
5936
+ available_carts?: number;
5937
+ created_at?: string;
5938
+ id?: string;
5939
+ measures?: import("./types").Json;
5940
+ note?: string | null;
5941
+ outcome?: string;
5942
+ required_carts?: number;
5943
+ reserve_minutes?: number;
5944
+ shortage_carts?: number;
5945
+ status: string;
5946
+ user_id: string;
5947
+ };
5948
+ Update: {
5949
+ available_carts?: number;
5950
+ created_at?: string;
5951
+ id?: string;
5952
+ measures?: import("./types").Json;
5953
+ note?: string | null;
5954
+ outcome?: string;
5955
+ required_carts?: number;
5956
+ reserve_minutes?: number;
5957
+ shortage_carts?: number;
5958
+ status?: string;
5959
+ user_id?: string;
5960
+ };
5961
+ Relationships: [];
5962
+ };
5963
+ logistics_capacity_settings: {
5964
+ Row: {
5965
+ created_at: string;
5966
+ settings: import("./types").Json;
5967
+ updated_at: string;
5968
+ user_id: string;
5969
+ };
5970
+ Insert: {
5971
+ created_at?: string;
5972
+ settings?: import("./types").Json;
5973
+ updated_at?: string;
5974
+ user_id: string;
5975
+ };
5976
+ Update: {
5977
+ created_at?: string;
5978
+ settings?: import("./types").Json;
5979
+ updated_at?: string;
5980
+ user_id?: string;
5981
+ };
5982
+ Relationships: [];
5983
+ };
5702
5984
  logistics_decisions: {
5703
5985
  Row: {
5704
5986
  created_at: string;
@@ -7094,6 +7376,42 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7094
7376
  };
7095
7377
  Relationships: [];
7096
7378
  };
7379
+ order_buffers: {
7380
+ Row: {
7381
+ buffer_key: string;
7382
+ created_at: string;
7383
+ customer_id: string | null;
7384
+ grouping_mode: string;
7385
+ id: string;
7386
+ pickup_date: string | null;
7387
+ pickup_location: string | null;
7388
+ plan_locked_at: string | null;
7389
+ updated_at: string;
7390
+ };
7391
+ Insert: {
7392
+ buffer_key: string;
7393
+ created_at?: string;
7394
+ customer_id?: string | null;
7395
+ grouping_mode: string;
7396
+ id?: string;
7397
+ pickup_date?: string | null;
7398
+ pickup_location?: string | null;
7399
+ plan_locked_at?: string | null;
7400
+ updated_at?: string;
7401
+ };
7402
+ Update: {
7403
+ buffer_key?: string;
7404
+ created_at?: string;
7405
+ customer_id?: string | null;
7406
+ grouping_mode?: string;
7407
+ id?: string;
7408
+ pickup_date?: string | null;
7409
+ pickup_location?: string | null;
7410
+ plan_locked_at?: string | null;
7411
+ updated_at?: string;
7412
+ };
7413
+ Relationships: [];
7414
+ };
7097
7415
  order_cart_items: {
7098
7416
  Row: {
7099
7417
  cart_id: string;
@@ -7160,6 +7478,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7160
7478
  order_carts: {
7161
7479
  Row: {
7162
7480
  algorithm_version: number;
7481
+ buffer_id: string | null;
7163
7482
  cart_number: number;
7164
7483
  created_at: string;
7165
7484
  id: string;
@@ -7167,13 +7486,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7167
7486
  is_complete: boolean;
7168
7487
  notes: string | null;
7169
7488
  occupancy_pct: number;
7170
- order_id: string;
7489
+ order_id: string | null;
7171
7490
  source: string;
7172
7491
  total_layers_used: number;
7173
7492
  updated_at: string;
7174
7493
  };
7175
7494
  Insert: {
7176
7495
  algorithm_version?: number;
7496
+ buffer_id?: string | null;
7177
7497
  cart_number: number;
7178
7498
  created_at?: string;
7179
7499
  id?: string;
@@ -7181,13 +7501,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7181
7501
  is_complete?: boolean;
7182
7502
  notes?: string | null;
7183
7503
  occupancy_pct?: number;
7184
- order_id: string;
7504
+ order_id?: string | null;
7185
7505
  source?: string;
7186
7506
  total_layers_used?: number;
7187
7507
  updated_at?: string;
7188
7508
  };
7189
7509
  Update: {
7190
7510
  algorithm_version?: number;
7511
+ buffer_id?: string | null;
7191
7512
  cart_number?: number;
7192
7513
  created_at?: string;
7193
7514
  id?: string;
@@ -7195,12 +7516,18 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7195
7516
  is_complete?: boolean;
7196
7517
  notes?: string | null;
7197
7518
  occupancy_pct?: number;
7198
- order_id?: string;
7519
+ order_id?: string | null;
7199
7520
  source?: string;
7200
7521
  total_layers_used?: number;
7201
7522
  updated_at?: string;
7202
7523
  };
7203
7524
  Relationships: [{
7525
+ foreignKeyName: "order_carts_buffer_id_fkey";
7526
+ columns: ["buffer_id"];
7527
+ isOneToOne: false;
7528
+ referencedRelation: "order_buffers";
7529
+ referencedColumns: ["id"];
7530
+ }, {
7204
7531
  foreignKeyName: "order_carts_order_id_fkey";
7205
7532
  columns: ["order_id"];
7206
7533
  isOneToOne: false;
@@ -7438,12 +7765,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7438
7765
  };
7439
7766
  orders: {
7440
7767
  Row: {
7768
+ buffer_id: string | null;
7441
7769
  created_at: string;
7442
7770
  custom_fields: import("./types").Json;
7443
7771
  customer_id: string | null;
7444
7772
  customer_name: string;
7445
7773
  deleted_at: string | null;
7446
7774
  delivery_date: string | null;
7775
+ floriday_sales_order_id: string | null;
7447
7776
  id: string;
7448
7777
  is_reservation: boolean;
7449
7778
  notes: string | null;
@@ -7457,12 +7786,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7457
7786
  updated_at: string;
7458
7787
  };
7459
7788
  Insert: {
7789
+ buffer_id?: string | null;
7460
7790
  created_at?: string;
7461
7791
  custom_fields?: import("./types").Json;
7462
7792
  customer_id?: string | null;
7463
7793
  customer_name?: string;
7464
7794
  deleted_at?: string | null;
7465
7795
  delivery_date?: string | null;
7796
+ floriday_sales_order_id?: string | null;
7466
7797
  id?: string;
7467
7798
  is_reservation?: boolean;
7468
7799
  notes?: string | null;
@@ -7476,12 +7807,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7476
7807
  updated_at?: string;
7477
7808
  };
7478
7809
  Update: {
7810
+ buffer_id?: string | null;
7479
7811
  created_at?: string;
7480
7812
  custom_fields?: import("./types").Json;
7481
7813
  customer_id?: string | null;
7482
7814
  customer_name?: string;
7483
7815
  deleted_at?: string | null;
7484
7816
  delivery_date?: string | null;
7817
+ floriday_sales_order_id?: string | null;
7485
7818
  id?: string;
7486
7819
  is_reservation?: boolean;
7487
7820
  notes?: string | null;
@@ -7495,6 +7828,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7495
7828
  updated_at?: string;
7496
7829
  };
7497
7830
  Relationships: [{
7831
+ foreignKeyName: "orders_buffer_id_fkey";
7832
+ columns: ["buffer_id"];
7833
+ isOneToOne: false;
7834
+ referencedRelation: "order_buffers";
7835
+ referencedColumns: ["id"];
7836
+ }, {
7498
7837
  foreignKeyName: "orders_customer_id_fkey";
7499
7838
  columns: ["customer_id"];
7500
7839
  isOneToOne: false;
@@ -7632,6 +7971,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7632
7971
  created_at: string;
7633
7972
  id: string;
7634
7973
  notes: string | null;
7974
+ packing_configuration_id: string | null;
7635
7975
  parent_product_id: string | null;
7636
7976
  parent_trade_item_floriday_id: string | null;
7637
7977
  quantity: number;
@@ -7646,6 +7986,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7646
7986
  created_at?: string;
7647
7987
  id?: string;
7648
7988
  notes?: string | null;
7989
+ packing_configuration_id?: string | null;
7649
7990
  parent_product_id?: string | null;
7650
7991
  parent_trade_item_floriday_id?: string | null;
7651
7992
  quantity?: number;
@@ -7660,6 +8001,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7660
8001
  created_at?: string;
7661
8002
  id?: string;
7662
8003
  notes?: string | null;
8004
+ packing_configuration_id?: string | null;
7663
8005
  parent_product_id?: string | null;
7664
8006
  parent_trade_item_floriday_id?: string | null;
7665
8007
  quantity?: number;
@@ -7861,11 +8203,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7861
8203
  created_at: string;
7862
8204
  id: string;
7863
8205
  is_package: boolean;
8206
+ label: string | null;
7864
8207
  layers_per_load_carrier: number | null;
7865
8208
  load_carrier: string | null;
7866
8209
  package_id: string | null;
7867
8210
  package_label: string | null;
7868
8211
  packages_per_layer: number | null;
8212
+ packing_configuration_id: string;
7869
8213
  product_id: string | null;
7870
8214
  tenant_id: string;
7871
8215
  trade_item_floriday_id: string | null;
@@ -7876,11 +8220,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7876
8220
  created_at?: string;
7877
8221
  id?: string;
7878
8222
  is_package?: boolean;
8223
+ label?: string | null;
7879
8224
  layers_per_load_carrier?: number | null;
7880
8225
  load_carrier?: string | null;
7881
8226
  package_id?: string | null;
7882
8227
  package_label?: string | null;
7883
8228
  packages_per_layer?: number | null;
8229
+ packing_configuration_id?: string;
7884
8230
  product_id?: string | null;
7885
8231
  tenant_id: string;
7886
8232
  trade_item_floriday_id?: string | null;
@@ -7891,11 +8237,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7891
8237
  created_at?: string;
7892
8238
  id?: string;
7893
8239
  is_package?: boolean;
8240
+ label?: string | null;
7894
8241
  layers_per_load_carrier?: number | null;
7895
8242
  load_carrier?: string | null;
7896
8243
  package_id?: string | null;
7897
8244
  package_label?: string | null;
7898
8245
  packages_per_layer?: number | null;
8246
+ packing_configuration_id?: string;
7899
8247
  product_id?: string | null;
7900
8248
  tenant_id?: string;
7901
8249
  trade_item_floriday_id?: string | null;
@@ -7976,6 +8324,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7976
8324
  trade_item_key: string | null;
7977
8325
  unit: string;
7978
8326
  updated_at: string;
8327
+ vat_code: string | null;
8328
+ vat_rate: number | null;
7979
8329
  weight: string | null;
7980
8330
  };
7981
8331
  Insert: {
@@ -8004,6 +8354,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8004
8354
  trade_item_key?: string | null;
8005
8355
  unit?: string;
8006
8356
  updated_at?: string;
8357
+ vat_code?: string | null;
8358
+ vat_rate?: number | null;
8007
8359
  weight?: string | null;
8008
8360
  };
8009
8361
  Update: {
@@ -8032,6 +8384,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8032
8384
  trade_item_key?: string | null;
8033
8385
  unit?: string;
8034
8386
  updated_at?: string;
8387
+ vat_code?: string | null;
8388
+ vat_rate?: number | null;
8035
8389
  weight?: string | null;
8036
8390
  };
8037
8391
  Relationships: [];
@@ -11107,6 +11461,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11107
11461
  processed_items: number;
11108
11462
  }[];
11109
11463
  };
11464
+ calculate_layer_stock: {
11465
+ Args: {
11466
+ p_product_id: string;
11467
+ };
11468
+ Returns: number;
11469
+ };
11110
11470
  call_exact_route: {
11111
11471
  Args: {
11112
11472
  path: string;
@@ -11476,6 +11836,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11476
11836
  };
11477
11837
  Returns: string;
11478
11838
  };
11839
+ get_inventory_stock_for_key: {
11840
+ Args: {
11841
+ p_key: string;
11842
+ };
11843
+ Returns: number;
11844
+ };
11479
11845
  get_offer_by_link_code: {
11480
11846
  Args: {
11481
11847
  p_code: string;
@@ -11506,6 +11872,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11506
11872
  };
11507
11873
  Returns: string;
11508
11874
  };
11875
+ get_product_group_available_stock: {
11876
+ Args: {
11877
+ p_group_id: string;
11878
+ };
11879
+ Returns: number;
11880
+ };
11509
11881
  get_room_busy_windows: {
11510
11882
  Args: {
11511
11883
  p_from: string;
@@ -12072,12 +12444,22 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
12072
12444
  };
12073
12445
  Returns: string[];
12074
12446
  };
12447
+ sync_all_layer_stocks: {
12448
+ Args: never;
12449
+ Returns: undefined;
12450
+ };
12075
12451
  sync_cached_packing_from_product: {
12076
12452
  Args: {
12077
12453
  p_product_id: string;
12078
12454
  };
12079
12455
  Returns: undefined;
12080
12456
  };
12457
+ sync_layer_stock: {
12458
+ Args: {
12459
+ p_product_id: string;
12460
+ };
12461
+ Returns: undefined;
12462
+ };
12081
12463
  sync_order_cart_item_packing_from_product: {
12082
12464
  Args: {
12083
12465
  p_product_id: string;