@flowselections/floriday-afhandeling-module 1.0.12 → 1.0.14

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 (80) hide show
  1. package/dist-lib/components/afhandeling/AutoProcessStatus.d.ts +12 -0
  2. package/dist-lib/components/afhandeling/AutoProcessStatus.d.ts.map +1 -0
  3. package/dist-lib/components/afhandeling/AutoProcessStatus.js +103 -0
  4. package/dist-lib/components/afhandeling/ControleLijstPrint.d.ts +3 -1
  5. package/dist-lib/components/afhandeling/ControleLijstPrint.d.ts.map +1 -1
  6. package/dist-lib/components/afhandeling/ControleLijstPrint.js +56 -17
  7. package/dist-lib/components/afhandeling/DagDetailDialog.d.ts.map +1 -1
  8. package/dist-lib/components/afhandeling/DagDetailDialog.js +96 -4
  9. package/dist-lib/components/afhandeling/LeveringenPage.js +1 -1
  10. package/dist-lib/components/afhandeling/VervoerdersPage.d.ts.map +1 -1
  11. package/dist-lib/components/afhandeling/VervoerdersPage.js +2 -1
  12. package/dist-lib/components/afhandeling/WeekAgendaView.d.ts +3 -1
  13. package/dist-lib/components/afhandeling/WeekAgendaView.d.ts.map +1 -1
  14. package/dist-lib/components/afhandeling/WeekAgendaView.js +58 -17
  15. package/dist-lib/components/pickstation/KioskControle.d.ts +2 -0
  16. package/dist-lib/components/pickstation/KioskControle.d.ts.map +1 -0
  17. package/dist-lib/components/pickstation/KioskControle.js +7 -0
  18. package/dist-lib/components/pickstation/PakbonTemplate.d.ts +2 -1
  19. package/dist-lib/components/pickstation/PakbonTemplate.d.ts.map +1 -1
  20. package/dist-lib/components/pickstation/PakbonTemplate.js +20 -17
  21. package/dist-lib/components/pickstation/PickstationPage.d.ts +2 -0
  22. package/dist-lib/components/pickstation/PickstationPage.d.ts.map +1 -0
  23. package/dist-lib/components/pickstation/PickstationPage.js +266 -0
  24. package/dist-lib/components/settings/AfhandelingSettingsCard.d.ts.map +1 -1
  25. package/dist-lib/components/settings/AfhandelingSettingsCard.js +14 -2
  26. package/dist-lib/hooks/useOrderPlanning.d.ts.map +1 -1
  27. package/dist-lib/hooks/useOrderPlanning.js +28 -11
  28. package/dist-lib/index.d.ts +4 -0
  29. package/dist-lib/index.d.ts.map +1 -1
  30. package/dist-lib/index.js +4 -0
  31. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1243 -63
  32. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  33. package/dist-lib/integrations/supabase/client.d.ts +1243 -63
  34. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  35. package/dist-lib/integrations/supabase/client.server.d.ts +1243 -63
  36. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  37. package/dist-lib/integrations/supabase/types.d.ts +1264 -56
  38. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  39. package/dist-lib/lib/afhandelingSettings.functions.d.ts +2483 -111
  40. package/dist-lib/lib/afhandelingSettings.functions.d.ts.map +1 -1
  41. package/dist-lib/lib/afhandelingSettings.functions.js +28 -1
  42. package/dist-lib/lib/carrierPlanning.d.ts +25 -0
  43. package/dist-lib/lib/carrierPlanning.d.ts.map +1 -0
  44. package/dist-lib/lib/carrierPlanning.js +65 -0
  45. package/dist-lib/lib/carrierSignupMail.server.d.ts +0 -2
  46. package/dist-lib/lib/carrierSignupMail.server.d.ts.map +1 -1
  47. package/dist-lib/lib/carrierSignupMail.server.js +53 -216
  48. package/dist-lib/lib/carriers.functions.d.ts +5920 -20
  49. package/dist-lib/lib/carriers.functions.d.ts.map +1 -1
  50. package/dist-lib/lib/carriers.functions.js +5 -0
  51. package/dist-lib/lib/cartAssignments.functions.d.ts +5920 -20
  52. package/dist-lib/lib/cartAssignments.functions.d.ts.map +1 -1
  53. package/dist-lib/lib/cartControl.functions.d.ts +11843 -40
  54. package/dist-lib/lib/cartControl.functions.d.ts.map +1 -1
  55. package/dist-lib/lib/cartControl.functions.js +4 -1
  56. package/dist-lib/lib/cartRescheduling.d.ts.map +1 -1
  57. package/dist-lib/lib/cartRescheduling.js +8 -6
  58. package/dist-lib/lib/countries.d.ts +2 -0
  59. package/dist-lib/lib/countries.d.ts.map +1 -1
  60. package/dist-lib/lib/countries.js +51 -0
  61. package/dist-lib/lib/deliveryNotePrint.d.ts +26 -0
  62. package/dist-lib/lib/deliveryNotePrint.d.ts.map +1 -0
  63. package/dist-lib/lib/deliveryNotePrint.js +172 -0
  64. package/dist-lib/lib/floriday.functions.d.ts +1251 -63
  65. package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
  66. package/dist-lib/lib/floriday.functions.js +126 -8
  67. package/dist-lib/lib/floridayAutoProcess.d.ts +30 -0
  68. package/dist-lib/lib/floridayAutoProcess.d.ts.map +1 -0
  69. package/dist-lib/lib/floridayAutoProcess.js +70 -0
  70. package/dist-lib/lib/pickstationI18n.d.ts +46 -0
  71. package/dist-lib/lib/pickstationI18n.d.ts.map +1 -1
  72. package/dist-lib/lib/pickstationI18n.js +251 -0
  73. package/dist-lib/lib/pickstationOrders.server.d.ts.map +1 -1
  74. package/dist-lib/lib/pickstationOrders.server.js +56 -19
  75. package/dist-lib/lib/pickstationTypes.d.ts +2 -0
  76. package/dist-lib/lib/pickstationTypes.d.ts.map +1 -1
  77. package/dist-lib/lib/planning.d.ts +34 -0
  78. package/dist-lib/lib/planning.d.ts.map +1 -1
  79. package/dist-lib/lib/planning.js +84 -0
  80. package/package.json +15 -1
@@ -13,13 +13,24 @@ export interface FloridayOrder {
13
13
  totalAmount: number | null;
14
14
  currency: string | null;
15
15
  createdAt: string | null;
16
+ carrierId?: string | null;
17
+ country?: string | null;
18
+ province?: string | null;
19
+ city?: string | null;
20
+ /** Order bevat één of meer klant-stickers; verlengt de picktijd. */
21
+ hasStickers?: boolean;
22
+ /** Floriday salesOrderId — nodig voor afleverbrief PDF via gateway. */
23
+ salesOrderId?: string | null;
16
24
  }
17
25
  export declare const getFloridayOrders: import("@tanstack/start-client-core").OptionalFetcher<readonly [import("@tanstack/start-client-core").FunctionMiddlewareAfterServer<{}, unknown, undefined, {
18
26
  supabase: SupabaseClient<import("../integrations/supabase/types").Database, "public", "public", {
19
27
  Tables: {
20
28
  afhandeling_settings: {
21
29
  Row: {
30
+ auto_print_delivery_note: boolean;
31
+ auto_process_paused: boolean;
22
32
  created_at: string;
33
+ extra_pick_days_with_stickers: number;
23
34
  id: string;
24
35
  max_workdays_earlier_pick: number;
25
36
  pick_days_before_transport: number;
@@ -33,7 +44,10 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
33
44
  user_id: string;
34
45
  };
35
46
  Insert: {
47
+ auto_print_delivery_note?: boolean;
48
+ auto_process_paused?: boolean;
36
49
  created_at?: string;
50
+ extra_pick_days_with_stickers?: number;
37
51
  id?: string;
38
52
  max_workdays_earlier_pick?: number;
39
53
  pick_days_before_transport?: number;
@@ -47,7 +61,10 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
47
61
  user_id: string;
48
62
  };
49
63
  Update: {
64
+ auto_print_delivery_note?: boolean;
65
+ auto_process_paused?: boolean;
50
66
  created_at?: string;
67
+ extra_pick_days_with_stickers?: number;
51
68
  id?: string;
52
69
  max_workdays_earlier_pick?: number;
53
70
  pick_days_before_transport?: number;
@@ -839,6 +856,36 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
839
856
  };
840
857
  Relationships: [];
841
858
  };
859
+ cart_replan_queue: {
860
+ Row: {
861
+ attempts: number;
862
+ last_error: string | null;
863
+ order_id: string;
864
+ processed_at: string | null;
865
+ requested_at: string;
866
+ };
867
+ Insert: {
868
+ attempts?: number;
869
+ last_error?: string | null;
870
+ order_id: string;
871
+ processed_at?: string | null;
872
+ requested_at?: string;
873
+ };
874
+ Update: {
875
+ attempts?: number;
876
+ last_error?: string | null;
877
+ order_id?: string;
878
+ processed_at?: string | null;
879
+ requested_at?: string;
880
+ };
881
+ Relationships: [{
882
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
883
+ columns: ["order_id"];
884
+ isOneToOne: true;
885
+ referencedRelation: "orders";
886
+ referencedColumns: ["id"];
887
+ }];
888
+ };
842
889
  collections: {
843
890
  Row: {
844
891
  created_at: string;
@@ -2964,34 +3011,52 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
2964
3011
  Row: {
2965
3012
  catalog_key: string | null;
2966
3013
  catalog_url: string;
3014
+ client_id: string | null;
3015
+ client_secret_ciphertext: string | null;
3016
+ client_secret_last4: string | null;
2967
3017
  created_at: string;
2968
3018
  id: number;
2969
3019
  last_meta: import("../integrations/supabase/types").Json | null;
2970
3020
  last_test_at: string | null;
2971
3021
  last_test_error: string | null;
2972
3022
  last_test_ok: boolean | null;
3023
+ last_token_test_at: string | null;
3024
+ last_token_test_error: string | null;
3025
+ last_token_test_ok: boolean | null;
2973
3026
  updated_at: string;
2974
3027
  };
2975
3028
  Insert: {
2976
3029
  catalog_key?: string | null;
2977
3030
  catalog_url?: string;
3031
+ client_id?: string | null;
3032
+ client_secret_ciphertext?: string | null;
3033
+ client_secret_last4?: string | null;
2978
3034
  created_at?: string;
2979
3035
  id?: number;
2980
3036
  last_meta?: import("../integrations/supabase/types").Json | null;
2981
3037
  last_test_at?: string | null;
2982
3038
  last_test_error?: string | null;
2983
3039
  last_test_ok?: boolean | null;
3040
+ last_token_test_at?: string | null;
3041
+ last_token_test_error?: string | null;
3042
+ last_token_test_ok?: boolean | null;
2984
3043
  updated_at?: string;
2985
3044
  };
2986
3045
  Update: {
2987
3046
  catalog_key?: string | null;
2988
3047
  catalog_url?: string;
3048
+ client_id?: string | null;
3049
+ client_secret_ciphertext?: string | null;
3050
+ client_secret_last4?: string | null;
2989
3051
  created_at?: string;
2990
3052
  id?: number;
2991
3053
  last_meta?: import("../integrations/supabase/types").Json | null;
2992
3054
  last_test_at?: string | null;
2993
3055
  last_test_error?: string | null;
2994
3056
  last_test_ok?: boolean | null;
3057
+ last_token_test_at?: string | null;
3058
+ last_token_test_error?: string | null;
3059
+ last_token_test_ok?: boolean | null;
2995
3060
  updated_at?: string;
2996
3061
  };
2997
3062
  Relationships: [];
@@ -3224,6 +3289,54 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
3224
3289
  referencedColumns: ["id"];
3225
3290
  }];
3226
3291
  };
3292
+ floriday_auto_fulfillment_log: {
3293
+ Row: {
3294
+ attempts: number;
3295
+ connection_id: string;
3296
+ created_at: string;
3297
+ error: string | null;
3298
+ fulfillment_order_id: string | null;
3299
+ id: string;
3300
+ last_attempt_at: string | null;
3301
+ reason: string | null;
3302
+ sales_order_id: string;
3303
+ status: string;
3304
+ updated_at: string;
3305
+ };
3306
+ Insert: {
3307
+ attempts?: number;
3308
+ connection_id: string;
3309
+ created_at?: string;
3310
+ error?: string | null;
3311
+ fulfillment_order_id?: string | null;
3312
+ id?: string;
3313
+ last_attempt_at?: string | null;
3314
+ reason?: string | null;
3315
+ sales_order_id: string;
3316
+ status?: string;
3317
+ updated_at?: string;
3318
+ };
3319
+ Update: {
3320
+ attempts?: number;
3321
+ connection_id?: string;
3322
+ created_at?: string;
3323
+ error?: string | null;
3324
+ fulfillment_order_id?: string | null;
3325
+ id?: string;
3326
+ last_attempt_at?: string | null;
3327
+ reason?: string | null;
3328
+ sales_order_id?: string;
3329
+ status?: string;
3330
+ updated_at?: string;
3331
+ };
3332
+ Relationships: [{
3333
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
3334
+ columns: ["connection_id"];
3335
+ isOneToOne: false;
3336
+ referencedRelation: "floriday_connections";
3337
+ referencedColumns: ["id"];
3338
+ }];
3339
+ };
3227
3340
  floriday_base_items_cache: {
3228
3341
  Row: {
3229
3342
  connection_id: string;
@@ -3638,6 +3751,51 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
3638
3751
  referencedColumns: ["id"];
3639
3752
  }];
3640
3753
  };
3754
+ floriday_continuous_stock_queue: {
3755
+ Row: {
3756
+ attempts: number;
3757
+ connection_id: string;
3758
+ created_at: string;
3759
+ gateway_attempt_id: string | null;
3760
+ id: string;
3761
+ last_error: string | null;
3762
+ number_of_pieces: number;
3763
+ sent_at: string | null;
3764
+ status: string;
3765
+ trade_item_id: string;
3766
+ updated_at: string;
3767
+ user_id: string;
3768
+ };
3769
+ Insert: {
3770
+ attempts?: number;
3771
+ connection_id: string;
3772
+ created_at?: string;
3773
+ gateway_attempt_id?: string | null;
3774
+ id?: string;
3775
+ last_error?: string | null;
3776
+ number_of_pieces?: number;
3777
+ sent_at?: string | null;
3778
+ status?: string;
3779
+ trade_item_id: string;
3780
+ updated_at?: string;
3781
+ user_id: string;
3782
+ };
3783
+ Update: {
3784
+ attempts?: number;
3785
+ connection_id?: string;
3786
+ created_at?: string;
3787
+ gateway_attempt_id?: string | null;
3788
+ id?: string;
3789
+ last_error?: string | null;
3790
+ number_of_pieces?: number;
3791
+ sent_at?: string | null;
3792
+ status?: string;
3793
+ trade_item_id?: string;
3794
+ updated_at?: string;
3795
+ user_id?: string;
3796
+ };
3797
+ Relationships: [];
3798
+ };
3641
3799
  floriday_contract_trade_item_groups_cache: {
3642
3800
  Row: {
3643
3801
  connection_id: string;
@@ -4283,6 +4441,24 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
4283
4441
  referencedColumns: ["id"];
4284
4442
  }];
4285
4443
  };
4444
+ floriday_rate_limit_state: {
4445
+ Row: {
4446
+ bucket: string;
4447
+ last_refill_at: string;
4448
+ tokens: number;
4449
+ };
4450
+ Insert: {
4451
+ bucket: string;
4452
+ last_refill_at?: string;
4453
+ tokens: number;
4454
+ };
4455
+ Update: {
4456
+ bucket?: string;
4457
+ last_refill_at?: string;
4458
+ tokens?: number;
4459
+ };
4460
+ Relationships: [];
4461
+ };
4286
4462
  floriday_resource_schemas: {
4287
4463
  Row: {
4288
4464
  enums: import("../integrations/supabase/types").Json;
@@ -4706,6 +4882,60 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
4706
4882
  referencedColumns: ["id"];
4707
4883
  }];
4708
4884
  };
4885
+ flow_role_assignments: {
4886
+ Row: {
4887
+ created_at: string;
4888
+ id: string;
4889
+ role_id: string;
4890
+ user_id: string;
4891
+ };
4892
+ Insert: {
4893
+ created_at?: string;
4894
+ id?: string;
4895
+ role_id: string;
4896
+ user_id: string;
4897
+ };
4898
+ Update: {
4899
+ created_at?: string;
4900
+ id?: string;
4901
+ role_id?: string;
4902
+ user_id?: string;
4903
+ };
4904
+ Relationships: [{
4905
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
4906
+ columns: ["role_id"];
4907
+ isOneToOne: false;
4908
+ referencedRelation: "flow_roles";
4909
+ referencedColumns: ["id"];
4910
+ }];
4911
+ };
4912
+ flow_roles: {
4913
+ Row: {
4914
+ created_at: string;
4915
+ description: string | null;
4916
+ id: string;
4917
+ module_access: string[];
4918
+ name: string;
4919
+ updated_at: string;
4920
+ };
4921
+ Insert: {
4922
+ created_at?: string;
4923
+ description?: string | null;
4924
+ id?: string;
4925
+ module_access?: string[];
4926
+ name: string;
4927
+ updated_at?: string;
4928
+ };
4929
+ Update: {
4930
+ created_at?: string;
4931
+ description?: string | null;
4932
+ id?: string;
4933
+ module_access?: string[];
4934
+ name?: string;
4935
+ updated_at?: string;
4936
+ };
4937
+ Relationships: [];
4938
+ };
4709
4939
  imap_accounts: {
4710
4940
  Row: {
4711
4941
  created_at: string;
@@ -5027,88 +5257,286 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
5027
5257
  };
5028
5258
  Relationships: [];
5029
5259
  };
5030
- locations: {
5260
+ local_customer_agreements: {
5031
5261
  Row: {
5262
+ base_price: number | null;
5032
5263
  created_at: string;
5264
+ currency: string;
5265
+ customer_id: string;
5033
5266
  id: string;
5034
- name: string;
5035
- sort_order: number;
5267
+ min_quantity: number;
5268
+ net_price: number;
5269
+ notes: string | null;
5270
+ product_category_id: string | null;
5271
+ product_id: string | null;
5036
5272
  updated_at: string;
5273
+ valid_from: string | null;
5274
+ valid_until: string | null;
5037
5275
  };
5038
5276
  Insert: {
5277
+ base_price?: number | null;
5039
5278
  created_at?: string;
5279
+ currency?: string;
5280
+ customer_id: string;
5040
5281
  id?: string;
5041
- name: string;
5042
- sort_order?: number;
5282
+ min_quantity?: number;
5283
+ net_price: number;
5284
+ notes?: string | null;
5285
+ product_category_id?: string | null;
5286
+ product_id?: string | null;
5043
5287
  updated_at?: string;
5288
+ valid_from?: string | null;
5289
+ valid_until?: string | null;
5044
5290
  };
5045
5291
  Update: {
5292
+ base_price?: number | null;
5046
5293
  created_at?: string;
5294
+ currency?: string;
5295
+ customer_id?: string;
5047
5296
  id?: string;
5048
- name?: string;
5049
- sort_order?: number;
5297
+ min_quantity?: number;
5298
+ net_price?: number;
5299
+ notes?: string | null;
5300
+ product_category_id?: string | null;
5301
+ product_id?: string | null;
5050
5302
  updated_at?: string;
5303
+ valid_from?: string | null;
5304
+ valid_until?: string | null;
5051
5305
  };
5052
- Relationships: [];
5306
+ Relationships: [{
5307
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
5308
+ columns: ["customer_id"];
5309
+ isOneToOne: false;
5310
+ referencedRelation: "customers";
5311
+ referencedColumns: ["id"];
5312
+ }, {
5313
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
5314
+ columns: ["product_category_id"];
5315
+ isOneToOne: false;
5316
+ referencedRelation: "product_categories";
5317
+ referencedColumns: ["id"];
5318
+ }, {
5319
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
5320
+ columns: ["product_id"];
5321
+ isOneToOne: false;
5322
+ referencedRelation: "products";
5323
+ referencedColumns: ["id"];
5324
+ }];
5053
5325
  };
5054
- mailbox_messages: {
5326
+ local_customer_price_groups: {
5055
5327
  Row: {
5056
- body_html: string | null;
5057
- body_text: string | null;
5058
- connection_id: string | null;
5059
5328
  created_at: string;
5060
- error_message: string | null;
5061
- external_id: string | null;
5062
- from_email: string | null;
5063
- from_name: string | null;
5329
+ currency: string;
5330
+ customer_id: string;
5331
+ discount_type: string;
5332
+ discount_value: number;
5064
5333
  id: string;
5065
- message_id: string | null;
5066
- profile_id: string | null;
5067
- raw_size: number | null;
5068
- received_at: string | null;
5069
- status: string;
5070
- subject: string | null;
5071
- uid: number | null;
5334
+ min_quantity: number;
5335
+ notes: string | null;
5336
+ product_category_id: string | null;
5337
+ product_id: string | null;
5072
5338
  updated_at: string;
5339
+ valid_from: string | null;
5340
+ valid_until: string | null;
5073
5341
  };
5074
5342
  Insert: {
5075
- body_html?: string | null;
5076
- body_text?: string | null;
5077
- connection_id?: string | null;
5078
5343
  created_at?: string;
5079
- error_message?: string | null;
5080
- external_id?: string | null;
5081
- from_email?: string | null;
5082
- from_name?: string | null;
5344
+ currency?: string;
5345
+ customer_id: string;
5346
+ discount_type: string;
5347
+ discount_value: number;
5083
5348
  id?: string;
5084
- message_id?: string | null;
5085
- profile_id?: string | null;
5086
- raw_size?: number | null;
5087
- received_at?: string | null;
5088
- status?: string;
5089
- subject?: string | null;
5090
- uid?: number | null;
5349
+ min_quantity?: number;
5350
+ notes?: string | null;
5351
+ product_category_id?: string | null;
5352
+ product_id?: string | null;
5091
5353
  updated_at?: string;
5354
+ valid_from?: string | null;
5355
+ valid_until?: string | null;
5092
5356
  };
5093
5357
  Update: {
5094
- body_html?: string | null;
5095
- body_text?: string | null;
5096
- connection_id?: string | null;
5097
5358
  created_at?: string;
5098
- error_message?: string | null;
5099
- external_id?: string | null;
5100
- from_email?: string | null;
5101
- from_name?: string | null;
5359
+ currency?: string;
5360
+ customer_id?: string;
5361
+ discount_type?: string;
5362
+ discount_value?: number;
5102
5363
  id?: string;
5103
- message_id?: string | null;
5104
- profile_id?: string | null;
5105
- raw_size?: number | null;
5106
- received_at?: string | null;
5107
- status?: string;
5108
- subject?: string | null;
5109
- uid?: number | null;
5364
+ min_quantity?: number;
5365
+ notes?: string | null;
5366
+ product_category_id?: string | null;
5367
+ product_id?: string | null;
5110
5368
  updated_at?: string;
5111
- };
5369
+ valid_from?: string | null;
5370
+ valid_until?: string | null;
5371
+ };
5372
+ Relationships: [{
5373
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
5374
+ columns: ["customer_id"];
5375
+ isOneToOne: false;
5376
+ referencedRelation: "customers";
5377
+ referencedColumns: ["id"];
5378
+ }, {
5379
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
5380
+ columns: ["product_category_id"];
5381
+ isOneToOne: false;
5382
+ referencedRelation: "product_categories";
5383
+ referencedColumns: ["id"];
5384
+ }, {
5385
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
5386
+ columns: ["product_id"];
5387
+ isOneToOne: false;
5388
+ referencedRelation: "products";
5389
+ referencedColumns: ["id"];
5390
+ }];
5391
+ };
5392
+ local_customer_sales_strategies: {
5393
+ Row: {
5394
+ created_at: string;
5395
+ currency: string;
5396
+ customer_id: string;
5397
+ discount_type: string;
5398
+ discount_value: number;
5399
+ id: string;
5400
+ min_quantity: number;
5401
+ notes: string | null;
5402
+ product_category_id: string | null;
5403
+ product_id: string | null;
5404
+ updated_at: string;
5405
+ valid_from: string | null;
5406
+ valid_until: string | null;
5407
+ };
5408
+ Insert: {
5409
+ created_at?: string;
5410
+ currency?: string;
5411
+ customer_id: string;
5412
+ discount_type: string;
5413
+ discount_value: number;
5414
+ id?: string;
5415
+ min_quantity?: number;
5416
+ notes?: string | null;
5417
+ product_category_id?: string | null;
5418
+ product_id?: string | null;
5419
+ updated_at?: string;
5420
+ valid_from?: string | null;
5421
+ valid_until?: string | null;
5422
+ };
5423
+ Update: {
5424
+ created_at?: string;
5425
+ currency?: string;
5426
+ customer_id?: string;
5427
+ discount_type?: string;
5428
+ discount_value?: number;
5429
+ id?: string;
5430
+ min_quantity?: number;
5431
+ notes?: string | null;
5432
+ product_category_id?: string | null;
5433
+ product_id?: string | null;
5434
+ updated_at?: string;
5435
+ valid_from?: string | null;
5436
+ valid_until?: string | null;
5437
+ };
5438
+ Relationships: [{
5439
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
5440
+ columns: ["customer_id"];
5441
+ isOneToOne: false;
5442
+ referencedRelation: "customers";
5443
+ referencedColumns: ["id"];
5444
+ }, {
5445
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
5446
+ columns: ["product_category_id"];
5447
+ isOneToOne: false;
5448
+ referencedRelation: "product_categories";
5449
+ referencedColumns: ["id"];
5450
+ }, {
5451
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
5452
+ columns: ["product_id"];
5453
+ isOneToOne: false;
5454
+ referencedRelation: "products";
5455
+ referencedColumns: ["id"];
5456
+ }];
5457
+ };
5458
+ locations: {
5459
+ Row: {
5460
+ created_at: string;
5461
+ id: string;
5462
+ name: string;
5463
+ sort_order: number;
5464
+ updated_at: string;
5465
+ };
5466
+ Insert: {
5467
+ created_at?: string;
5468
+ id?: string;
5469
+ name: string;
5470
+ sort_order?: number;
5471
+ updated_at?: string;
5472
+ };
5473
+ Update: {
5474
+ created_at?: string;
5475
+ id?: string;
5476
+ name?: string;
5477
+ sort_order?: number;
5478
+ updated_at?: string;
5479
+ };
5480
+ Relationships: [];
5481
+ };
5482
+ mailbox_messages: {
5483
+ Row: {
5484
+ body_html: string | null;
5485
+ body_text: string | null;
5486
+ connection_id: string | null;
5487
+ created_at: string;
5488
+ error_message: string | null;
5489
+ external_id: string | null;
5490
+ from_email: string | null;
5491
+ from_name: string | null;
5492
+ id: string;
5493
+ message_id: string | null;
5494
+ profile_id: string | null;
5495
+ raw_size: number | null;
5496
+ received_at: string | null;
5497
+ status: string;
5498
+ subject: string | null;
5499
+ uid: number | null;
5500
+ updated_at: string;
5501
+ };
5502
+ Insert: {
5503
+ body_html?: string | null;
5504
+ body_text?: string | null;
5505
+ connection_id?: string | null;
5506
+ created_at?: string;
5507
+ error_message?: string | null;
5508
+ external_id?: string | null;
5509
+ from_email?: string | null;
5510
+ from_name?: string | null;
5511
+ id?: string;
5512
+ message_id?: string | null;
5513
+ profile_id?: string | null;
5514
+ raw_size?: number | null;
5515
+ received_at?: string | null;
5516
+ status?: string;
5517
+ subject?: string | null;
5518
+ uid?: number | null;
5519
+ updated_at?: string;
5520
+ };
5521
+ Update: {
5522
+ body_html?: string | null;
5523
+ body_text?: string | null;
5524
+ connection_id?: string | null;
5525
+ created_at?: string;
5526
+ error_message?: string | null;
5527
+ external_id?: string | null;
5528
+ from_email?: string | null;
5529
+ from_name?: string | null;
5530
+ id?: string;
5531
+ message_id?: string | null;
5532
+ profile_id?: string | null;
5533
+ raw_size?: number | null;
5534
+ received_at?: string | null;
5535
+ status?: string;
5536
+ subject?: string | null;
5537
+ uid?: number | null;
5538
+ updated_at?: string;
5539
+ };
5112
5540
  Relationships: [{
5113
5541
  foreignKeyName: "mailbox_messages_connection_id_fkey";
5114
5542
  columns: ["connection_id"];
@@ -5139,6 +5567,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
5139
5567
  matched_customer_id: string | null;
5140
5568
  message_id: string;
5141
5569
  notes: string | null;
5570
+ order_number: string | null;
5142
5571
  parsed_payload: import("../integrations/supabase/types").Json | null;
5143
5572
  reviewed_at: string | null;
5144
5573
  reviewed_by: string | null;
@@ -5154,6 +5583,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
5154
5583
  matched_customer_id?: string | null;
5155
5584
  message_id: string;
5156
5585
  notes?: string | null;
5586
+ order_number?: string | null;
5157
5587
  parsed_payload?: import("../integrations/supabase/types").Json | null;
5158
5588
  reviewed_at?: string | null;
5159
5589
  reviewed_by?: string | null;
@@ -5169,6 +5599,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
5169
5599
  matched_customer_id?: string | null;
5170
5600
  message_id?: string;
5171
5601
  notes?: string | null;
5602
+ order_number?: string | null;
5172
5603
  parsed_payload?: import("../integrations/supabase/types").Json | null;
5173
5604
  reviewed_at?: string | null;
5174
5605
  reviewed_by?: string | null;
@@ -5534,6 +5965,273 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
5534
5965
  referencedColumns: ["id"];
5535
5966
  }];
5536
5967
  };
5968
+ nmbrs_component_mapping: {
5969
+ Row: {
5970
+ created_at: string;
5971
+ id: string;
5972
+ source_kind: string;
5973
+ source_value: string | null;
5974
+ updated_at: string;
5975
+ wage_code: string;
5976
+ };
5977
+ Insert: {
5978
+ created_at?: string;
5979
+ id?: string;
5980
+ source_kind: string;
5981
+ source_value?: string | null;
5982
+ updated_at?: string;
5983
+ wage_code: string;
5984
+ };
5985
+ Update: {
5986
+ created_at?: string;
5987
+ id?: string;
5988
+ source_kind?: string;
5989
+ source_value?: string | null;
5990
+ updated_at?: string;
5991
+ wage_code?: string;
5992
+ };
5993
+ Relationships: [{
5994
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
5995
+ columns: ["wage_code"];
5996
+ isOneToOne: false;
5997
+ referencedRelation: "nmbrs_wage_components";
5998
+ referencedColumns: ["code"];
5999
+ }];
6000
+ };
6001
+ nmbrs_employee_mapping: {
6002
+ Row: {
6003
+ active_from: string | null;
6004
+ active_to: string | null;
6005
+ contract_hours_per_week: number | null;
6006
+ created_at: string;
6007
+ hourly_wage: number | null;
6008
+ id: string;
6009
+ monteur_id: string;
6010
+ nmbrs_company_code: string | null;
6011
+ nmbrs_employee_number: string;
6012
+ updated_at: string;
6013
+ };
6014
+ Insert: {
6015
+ active_from?: string | null;
6016
+ active_to?: string | null;
6017
+ contract_hours_per_week?: number | null;
6018
+ created_at?: string;
6019
+ hourly_wage?: number | null;
6020
+ id?: string;
6021
+ monteur_id: string;
6022
+ nmbrs_company_code?: string | null;
6023
+ nmbrs_employee_number: string;
6024
+ updated_at?: string;
6025
+ };
6026
+ Update: {
6027
+ active_from?: string | null;
6028
+ active_to?: string | null;
6029
+ contract_hours_per_week?: number | null;
6030
+ created_at?: string;
6031
+ hourly_wage?: number | null;
6032
+ id?: string;
6033
+ monteur_id?: string;
6034
+ nmbrs_company_code?: string | null;
6035
+ nmbrs_employee_number?: string;
6036
+ updated_at?: string;
6037
+ };
6038
+ Relationships: [{
6039
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
6040
+ columns: ["monteur_id"];
6041
+ isOneToOne: true;
6042
+ referencedRelation: "monteurs";
6043
+ referencedColumns: ["id"];
6044
+ }];
6045
+ };
6046
+ nmbrs_export_lines: {
6047
+ Row: {
6048
+ amount: number;
6049
+ created_at: string;
6050
+ entry_date: string;
6051
+ hours: number;
6052
+ id: string;
6053
+ monteur_id: string;
6054
+ nmbrs_employee_number: string | null;
6055
+ notes: string | null;
6056
+ run_id: string;
6057
+ source_kind: string | null;
6058
+ source_ref_id: string | null;
6059
+ updated_at: string;
6060
+ wage_code: string;
6061
+ };
6062
+ Insert: {
6063
+ amount?: number;
6064
+ created_at?: string;
6065
+ entry_date: string;
6066
+ hours?: number;
6067
+ id?: string;
6068
+ monteur_id: string;
6069
+ nmbrs_employee_number?: string | null;
6070
+ notes?: string | null;
6071
+ run_id: string;
6072
+ source_kind?: string | null;
6073
+ source_ref_id?: string | null;
6074
+ updated_at?: string;
6075
+ wage_code: string;
6076
+ };
6077
+ Update: {
6078
+ amount?: number;
6079
+ created_at?: string;
6080
+ entry_date?: string;
6081
+ hours?: number;
6082
+ id?: string;
6083
+ monteur_id?: string;
6084
+ nmbrs_employee_number?: string | null;
6085
+ notes?: string | null;
6086
+ run_id?: string;
6087
+ source_kind?: string | null;
6088
+ source_ref_id?: string | null;
6089
+ updated_at?: string;
6090
+ wage_code?: string;
6091
+ };
6092
+ Relationships: [{
6093
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
6094
+ columns: ["monteur_id"];
6095
+ isOneToOne: false;
6096
+ referencedRelation: "monteurs";
6097
+ referencedColumns: ["id"];
6098
+ }, {
6099
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
6100
+ columns: ["run_id"];
6101
+ isOneToOne: false;
6102
+ referencedRelation: "nmbrs_export_runs";
6103
+ referencedColumns: ["id"];
6104
+ }, {
6105
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
6106
+ columns: ["wage_code"];
6107
+ isOneToOne: false;
6108
+ referencedRelation: "nmbrs_wage_components";
6109
+ referencedColumns: ["code"];
6110
+ }];
6111
+ };
6112
+ nmbrs_export_runs: {
6113
+ Row: {
6114
+ created_at: string;
6115
+ file_name: string | null;
6116
+ generated_at: string;
6117
+ generated_by: string | null;
6118
+ id: string;
6119
+ notes: string | null;
6120
+ period_end: string;
6121
+ period_label: string;
6122
+ period_start: string;
6123
+ status: string;
6124
+ total_hours: number;
6125
+ total_lines: number;
6126
+ updated_at: string;
6127
+ };
6128
+ Insert: {
6129
+ created_at?: string;
6130
+ file_name?: string | null;
6131
+ generated_at?: string;
6132
+ generated_by?: string | null;
6133
+ id?: string;
6134
+ notes?: string | null;
6135
+ period_end: string;
6136
+ period_label: string;
6137
+ period_start: string;
6138
+ status?: string;
6139
+ total_hours?: number;
6140
+ total_lines?: number;
6141
+ updated_at?: string;
6142
+ };
6143
+ Update: {
6144
+ created_at?: string;
6145
+ file_name?: string | null;
6146
+ generated_at?: string;
6147
+ generated_by?: string | null;
6148
+ id?: string;
6149
+ notes?: string | null;
6150
+ period_end?: string;
6151
+ period_label?: string;
6152
+ period_start?: string;
6153
+ status?: string;
6154
+ total_hours?: number;
6155
+ total_lines?: number;
6156
+ updated_at?: string;
6157
+ };
6158
+ Relationships: [];
6159
+ };
6160
+ nmbrs_settings: {
6161
+ Row: {
6162
+ created_at: string;
6163
+ default_company_code: string | null;
6164
+ id: boolean;
6165
+ include_travel: boolean;
6166
+ overtime_threshold_daily: number;
6167
+ overtime_threshold_weekly: number;
6168
+ period_type: string;
6169
+ updated_at: string;
6170
+ updated_by: string | null;
6171
+ week_start_day: number;
6172
+ };
6173
+ Insert: {
6174
+ created_at?: string;
6175
+ default_company_code?: string | null;
6176
+ id?: boolean;
6177
+ include_travel?: boolean;
6178
+ overtime_threshold_daily?: number;
6179
+ overtime_threshold_weekly?: number;
6180
+ period_type?: string;
6181
+ updated_at?: string;
6182
+ updated_by?: string | null;
6183
+ week_start_day?: number;
6184
+ };
6185
+ Update: {
6186
+ created_at?: string;
6187
+ default_company_code?: string | null;
6188
+ id?: boolean;
6189
+ include_travel?: boolean;
6190
+ overtime_threshold_daily?: number;
6191
+ overtime_threshold_weekly?: number;
6192
+ period_type?: string;
6193
+ updated_at?: string;
6194
+ updated_by?: string | null;
6195
+ week_start_day?: number;
6196
+ };
6197
+ Relationships: [];
6198
+ };
6199
+ nmbrs_wage_components: {
6200
+ Row: {
6201
+ category: string;
6202
+ code: string;
6203
+ created_at: string;
6204
+ id: string;
6205
+ is_active: boolean;
6206
+ label: string;
6207
+ sort_order: number;
6208
+ unit: string;
6209
+ updated_at: string;
6210
+ };
6211
+ Insert: {
6212
+ category: string;
6213
+ code: string;
6214
+ created_at?: string;
6215
+ id?: string;
6216
+ is_active?: boolean;
6217
+ label: string;
6218
+ sort_order?: number;
6219
+ unit: string;
6220
+ updated_at?: string;
6221
+ };
6222
+ Update: {
6223
+ category?: string;
6224
+ code?: string;
6225
+ created_at?: string;
6226
+ id?: string;
6227
+ is_active?: boolean;
6228
+ label?: string;
6229
+ sort_order?: number;
6230
+ unit?: string;
6231
+ updated_at?: string;
6232
+ };
6233
+ Relationships: [];
6234
+ };
5537
6235
  notifications: {
5538
6236
  Row: {
5539
6237
  created_at: string;
@@ -5758,6 +6456,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
5758
6456
  id: string;
5759
6457
  items: import("../integrations/supabase/types").Json;
5760
6458
  notes: string | null;
6459
+ order_number: string | null;
5761
6460
  recipient_id: string;
5762
6461
  total_amount: number;
5763
6462
  };
@@ -5771,6 +6470,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
5771
6470
  id?: string;
5772
6471
  items?: import("../integrations/supabase/types").Json;
5773
6472
  notes?: string | null;
6473
+ order_number?: string | null;
5774
6474
  recipient_id: string;
5775
6475
  total_amount?: number;
5776
6476
  };
@@ -5784,6 +6484,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
5784
6484
  id?: string;
5785
6485
  items?: import("../integrations/supabase/types").Json;
5786
6486
  notes?: string | null;
6487
+ order_number?: string | null;
5787
6488
  recipient_id?: string;
5788
6489
  total_amount?: number;
5789
6490
  };
@@ -5943,6 +6644,9 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
5943
6644
  crates_per_layer: number;
5944
6645
  created_at: string;
5945
6646
  id: string;
6647
+ layer_fraction: number;
6648
+ layer_share_pct: number;
6649
+ layers_per_cart: number;
5946
6650
  order_item_id: string | null;
5947
6651
  plants_per_crate: number;
5948
6652
  product_id: string | null;
@@ -5954,6 +6658,9 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
5954
6658
  crates_per_layer?: number;
5955
6659
  created_at?: string;
5956
6660
  id?: string;
6661
+ layer_fraction?: number;
6662
+ layer_share_pct?: number;
6663
+ layers_per_cart?: number;
5957
6664
  order_item_id?: string | null;
5958
6665
  plants_per_crate?: number;
5959
6666
  product_id?: string | null;
@@ -5965,6 +6672,9 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
5965
6672
  crates_per_layer?: number;
5966
6673
  created_at?: string;
5967
6674
  id?: string;
6675
+ layer_fraction?: number;
6676
+ layer_share_pct?: number;
6677
+ layers_per_cart?: number;
5968
6678
  order_item_id?: string | null;
5969
6679
  plants_per_crate?: number;
5970
6680
  product_id?: string | null;
@@ -5992,33 +6702,45 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
5992
6702
  };
5993
6703
  order_carts: {
5994
6704
  Row: {
6705
+ algorithm_version: number;
5995
6706
  cart_number: number;
5996
6707
  created_at: string;
5997
6708
  id: string;
5998
6709
  is_auto: boolean;
5999
6710
  is_complete: boolean;
6000
6711
  notes: string | null;
6712
+ occupancy_pct: number;
6001
6713
  order_id: string;
6714
+ source: string;
6715
+ total_layers_used: number;
6002
6716
  updated_at: string;
6003
6717
  };
6004
6718
  Insert: {
6719
+ algorithm_version?: number;
6005
6720
  cart_number: number;
6006
6721
  created_at?: string;
6007
6722
  id?: string;
6008
6723
  is_auto?: boolean;
6009
6724
  is_complete?: boolean;
6010
6725
  notes?: string | null;
6726
+ occupancy_pct?: number;
6011
6727
  order_id: string;
6728
+ source?: string;
6729
+ total_layers_used?: number;
6012
6730
  updated_at?: string;
6013
6731
  };
6014
6732
  Update: {
6733
+ algorithm_version?: number;
6015
6734
  cart_number?: number;
6016
6735
  created_at?: string;
6017
6736
  id?: string;
6018
6737
  is_auto?: boolean;
6019
6738
  is_complete?: boolean;
6020
6739
  notes?: string | null;
6740
+ occupancy_pct?: number;
6021
6741
  order_id?: string;
6742
+ source?: string;
6743
+ total_layers_used?: number;
6022
6744
  updated_at?: string;
6023
6745
  };
6024
6746
  Relationships: [{
@@ -6171,6 +6893,8 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
6171
6893
  order_date: string;
6172
6894
  order_number: string;
6173
6895
  order_source: string;
6896
+ plan_locked_at: string | null;
6897
+ plan_locked_ref: string | null;
6174
6898
  status: string;
6175
6899
  total: string;
6176
6900
  updated_at: string;
@@ -6187,6 +6911,8 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
6187
6911
  order_date?: string;
6188
6912
  order_number: string;
6189
6913
  order_source?: string;
6914
+ plan_locked_at?: string | null;
6915
+ plan_locked_ref?: string | null;
6190
6916
  status?: string;
6191
6917
  total?: string;
6192
6918
  updated_at?: string;
@@ -6203,6 +6929,8 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
6203
6929
  order_date?: string;
6204
6930
  order_number?: string;
6205
6931
  order_source?: string;
6932
+ plan_locked_at?: string | null;
6933
+ plan_locked_ref?: string | null;
6206
6934
  status?: string;
6207
6935
  total?: string;
6208
6936
  updated_at?: string;
@@ -6575,6 +7303,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
6575
7303
  display_name: string | null;
6576
7304
  email: string | null;
6577
7305
  id: string;
7306
+ is_superadmin: boolean;
6578
7307
  notification_preferences: import("../integrations/supabase/types").Json;
6579
7308
  tenant_id: string | null;
6580
7309
  updated_at: string;
@@ -6584,6 +7313,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
6584
7313
  display_name?: string | null;
6585
7314
  email?: string | null;
6586
7315
  id: string;
7316
+ is_superadmin?: boolean;
6587
7317
  notification_preferences?: import("../integrations/supabase/types").Json;
6588
7318
  tenant_id?: string | null;
6589
7319
  updated_at?: string;
@@ -6593,6 +7323,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
6593
7323
  display_name?: string | null;
6594
7324
  email?: string | null;
6595
7325
  id?: string;
7326
+ is_superadmin?: boolean;
6596
7327
  notification_preferences?: import("../integrations/supabase/types").Json;
6597
7328
  tenant_id?: string | null;
6598
7329
  updated_at?: string;
@@ -7370,15 +8101,75 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
7370
8101
  name: string;
7371
8102
  };
7372
8103
  Update: {
7373
- capacity?: number;
7374
- color_code?: string | null;
8104
+ capacity?: number;
8105
+ color_code?: string | null;
8106
+ created_at?: string;
8107
+ description?: string | null;
8108
+ hourly_rate?: number;
8109
+ id?: string;
8110
+ image_url?: string | null;
8111
+ is_active?: boolean;
8112
+ name?: string;
8113
+ };
8114
+ Relationships: [];
8115
+ };
8116
+ sidebar_config: {
8117
+ Row: {
8118
+ id: string;
8119
+ module_order: string[];
8120
+ updated_at: string;
8121
+ };
8122
+ Insert: {
8123
+ id?: string;
8124
+ module_order?: string[];
8125
+ updated_at?: string;
8126
+ };
8127
+ Update: {
8128
+ id?: string;
8129
+ module_order?: string[];
8130
+ updated_at?: string;
8131
+ };
8132
+ Relationships: [];
8133
+ };
8134
+ stock_import_runs: {
8135
+ Row: {
8136
+ connection_id: string | null;
8137
+ created_at: string;
8138
+ created_rows: number;
8139
+ errors: import("../integrations/supabase/types").Json;
8140
+ filename: string | null;
8141
+ id: string;
8142
+ mutations: import("../integrations/supabase/types").Json;
8143
+ skipped_rows: number;
8144
+ total_rows: number;
8145
+ updated_rows: number;
8146
+ user_id: string;
8147
+ };
8148
+ Insert: {
8149
+ connection_id?: string | null;
8150
+ created_at?: string;
8151
+ created_rows?: number;
8152
+ errors?: import("../integrations/supabase/types").Json;
8153
+ filename?: string | null;
8154
+ id?: string;
8155
+ mutations?: import("../integrations/supabase/types").Json;
8156
+ skipped_rows?: number;
8157
+ total_rows?: number;
8158
+ updated_rows?: number;
8159
+ user_id: string;
8160
+ };
8161
+ Update: {
8162
+ connection_id?: string | null;
7375
8163
  created_at?: string;
7376
- description?: string | null;
7377
- hourly_rate?: number;
8164
+ created_rows?: number;
8165
+ errors?: import("../integrations/supabase/types").Json;
8166
+ filename?: string | null;
7378
8167
  id?: string;
7379
- image_url?: string | null;
7380
- is_active?: boolean;
7381
- name?: string;
8168
+ mutations?: import("../integrations/supabase/types").Json;
8169
+ skipped_rows?: number;
8170
+ total_rows?: number;
8171
+ updated_rows?: number;
8172
+ user_id?: string;
7382
8173
  };
7383
8174
  Relationships: [];
7384
8175
  };
@@ -7398,7 +8189,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
7398
8189
  reason: string | null;
7399
8190
  reserved_after: number | null;
7400
8191
  reserved_before: number | null;
7401
- trade_item_key: string;
8192
+ trade_item_key: string | null;
7402
8193
  };
7403
8194
  Insert: {
7404
8195
  connection_id?: string | null;
@@ -7415,7 +8206,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
7415
8206
  reason?: string | null;
7416
8207
  reserved_after?: number | null;
7417
8208
  reserved_before?: number | null;
7418
- trade_item_key: string;
8209
+ trade_item_key?: string | null;
7419
8210
  };
7420
8211
  Update: {
7421
8212
  connection_id?: string | null;
@@ -7432,7 +8223,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
7432
8223
  reason?: string | null;
7433
8224
  reserved_after?: number | null;
7434
8225
  reserved_before?: number | null;
7435
- trade_item_key?: string;
8226
+ trade_item_key?: string | null;
7436
8227
  };
7437
8228
  Relationships: [];
7438
8229
  };
@@ -7775,6 +8566,114 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
7775
8566
  };
7776
8567
  Relationships: [];
7777
8568
  };
8569
+ trade_item_supply_lines: {
8570
+ Row: {
8571
+ available_quantity: number | null;
8572
+ connection_id: string;
8573
+ created_at: string;
8574
+ currency: string | null;
8575
+ endpoint_family: string | null;
8576
+ environment: string | null;
8577
+ id: string;
8578
+ last_error: string | null;
8579
+ last_status: number | null;
8580
+ packing_configuration_id: string | null;
8581
+ period_end: string | null;
8582
+ period_start: string | null;
8583
+ price_per_piece: number | null;
8584
+ sales_unit: string | null;
8585
+ supply_line_id: string | null;
8586
+ supply_type: string;
8587
+ trade_item_id: string;
8588
+ updated_at: string;
8589
+ user_id: string;
8590
+ week: number | null;
8591
+ year: number | null;
8592
+ };
8593
+ Insert: {
8594
+ available_quantity?: number | null;
8595
+ connection_id: string;
8596
+ created_at?: string;
8597
+ currency?: string | null;
8598
+ endpoint_family?: string | null;
8599
+ environment?: string | null;
8600
+ id?: string;
8601
+ last_error?: string | null;
8602
+ last_status?: number | null;
8603
+ packing_configuration_id?: string | null;
8604
+ period_end?: string | null;
8605
+ period_start?: string | null;
8606
+ price_per_piece?: number | null;
8607
+ sales_unit?: string | null;
8608
+ supply_line_id?: string | null;
8609
+ supply_type?: string;
8610
+ trade_item_id: string;
8611
+ updated_at?: string;
8612
+ user_id: string;
8613
+ week?: number | null;
8614
+ year?: number | null;
8615
+ };
8616
+ Update: {
8617
+ available_quantity?: number | null;
8618
+ connection_id?: string;
8619
+ created_at?: string;
8620
+ currency?: string | null;
8621
+ endpoint_family?: string | null;
8622
+ environment?: string | null;
8623
+ id?: string;
8624
+ last_error?: string | null;
8625
+ last_status?: number | null;
8626
+ packing_configuration_id?: string | null;
8627
+ period_end?: string | null;
8628
+ period_start?: string | null;
8629
+ price_per_piece?: number | null;
8630
+ sales_unit?: string | null;
8631
+ supply_line_id?: string | null;
8632
+ supply_type?: string;
8633
+ trade_item_id?: string;
8634
+ updated_at?: string;
8635
+ user_id?: string;
8636
+ week?: number | null;
8637
+ year?: number | null;
8638
+ };
8639
+ Relationships: [];
8640
+ };
8641
+ trade_item_warehouse_preferences: {
8642
+ Row: {
8643
+ connection_id: string;
8644
+ created_at: string;
8645
+ id: string;
8646
+ trade_item_id: string;
8647
+ updated_at: string;
8648
+ warehouse_id: string;
8649
+ warehouse_name: string | null;
8650
+ };
8651
+ Insert: {
8652
+ connection_id: string;
8653
+ created_at?: string;
8654
+ id?: string;
8655
+ trade_item_id: string;
8656
+ updated_at?: string;
8657
+ warehouse_id: string;
8658
+ warehouse_name?: string | null;
8659
+ };
8660
+ Update: {
8661
+ connection_id?: string;
8662
+ created_at?: string;
8663
+ id?: string;
8664
+ trade_item_id?: string;
8665
+ updated_at?: string;
8666
+ warehouse_id?: string;
8667
+ warehouse_name?: string | null;
8668
+ };
8669
+ Relationships: [{
8670
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
8671
+ columns: ["connection_id"];
8672
+ isOneToOne: false;
8673
+ referencedRelation: "floriday_connections";
8674
+ referencedColumns: ["id"];
8675
+ }];
8676
+ };
7778
8677
  twinfield_connections: {
7779
8678
  Row: {
7780
8679
  access_token: string | null;
@@ -8094,6 +8993,10 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
8094
8993
  default_invoice_type: string;
8095
8994
  default_payment_term_days: number;
8096
8995
  default_vat_code: string;
8996
+ invoice_enabled_ao: boolean;
8997
+ invoice_enabled_fo: boolean;
8998
+ invoice_enabled_ho: boolean;
8999
+ invoice_enabled_mo: boolean;
8097
9000
  updated_at: string;
8098
9001
  user_id: string;
8099
9002
  };
@@ -8103,6 +9006,10 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
8103
9006
  default_invoice_type?: string;
8104
9007
  default_payment_term_days?: number;
8105
9008
  default_vat_code?: string;
9009
+ invoice_enabled_ao?: boolean;
9010
+ invoice_enabled_fo?: boolean;
9011
+ invoice_enabled_ho?: boolean;
9012
+ invoice_enabled_mo?: boolean;
8106
9013
  updated_at?: string;
8107
9014
  user_id: string;
8108
9015
  };
@@ -8112,6 +9019,10 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
8112
9019
  default_invoice_type?: string;
8113
9020
  default_payment_term_days?: number;
8114
9021
  default_vat_code?: string;
9022
+ invoice_enabled_ao?: boolean;
9023
+ invoice_enabled_fo?: boolean;
9024
+ invoice_enabled_ho?: boolean;
9025
+ invoice_enabled_mo?: boolean;
8115
9026
  updated_at?: string;
8116
9027
  user_id?: string;
8117
9028
  };
@@ -9013,6 +9924,44 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
9013
9924
  };
9014
9925
  Relationships: [];
9015
9926
  };
9927
+ floriday_customer_discounts: {
9928
+ Row: {
9929
+ base_price: number | null;
9930
+ buyer_organization_id: string | null;
9931
+ currency: string | null;
9932
+ discount_type: string | null;
9933
+ discount_value: number | null;
9934
+ min_quantity: number | null;
9935
+ net_price: number | null;
9936
+ product_group_id: string | null;
9937
+ raw: import("../integrations/supabase/types").Json | null;
9938
+ source: string | null;
9939
+ source_id: string | null;
9940
+ trade_item_id: string | null;
9941
+ valid_from: string | null;
9942
+ valid_until: string | null;
9943
+ };
9944
+ Relationships: [];
9945
+ };
9946
+ local_customer_discounts: {
9947
+ Row: {
9948
+ base_price: number | null;
9949
+ currency: string | null;
9950
+ customer_id: string | null;
9951
+ discount_type: string | null;
9952
+ discount_value: number | null;
9953
+ min_quantity: number | null;
9954
+ net_price: number | null;
9955
+ product_category_id: string | null;
9956
+ product_id: string | null;
9957
+ product_name: string | null;
9958
+ source: string | null;
9959
+ source_id: string | null;
9960
+ valid_from: string | null;
9961
+ valid_until: string | null;
9962
+ };
9963
+ Relationships: [];
9964
+ };
9016
9965
  manufacture_product_possible_stock_view: {
9017
9966
  Row: {
9018
9967
  component_count: number | null;
@@ -9368,6 +10317,12 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
9368
10317
  order_number: string;
9369
10318
  }[];
9370
10319
  };
10320
+ autolink_product_to_floriday: {
10321
+ Args: {
10322
+ p_product_id: string;
10323
+ };
10324
+ Returns: string;
10325
+ };
9371
10326
  backfill_open_order_reservations: {
9372
10327
  Args: never;
9373
10328
  Returns: {
@@ -9380,10 +10335,44 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
9380
10335
  };
9381
10336
  Returns: number;
9382
10337
  };
10338
+ check_offer_product_available_stock: {
10339
+ Args: {
10340
+ p_campaign_product_id: string;
10341
+ p_code: string;
10342
+ p_needed_qty?: number;
10343
+ p_product_name?: string;
10344
+ };
10345
+ Returns: import("../integrations/supabase/types").Json;
10346
+ };
10347
+ check_trade_item_available_stock: {
10348
+ Args: {
10349
+ p_connection_id?: string;
10350
+ p_context?: string;
10351
+ p_needed_qty?: number;
10352
+ p_order_id?: string;
10353
+ p_order_item_id?: string;
10354
+ p_owner_id?: string;
10355
+ p_product_name?: string;
10356
+ p_trade_item_key: string;
10357
+ };
10358
+ Returns: import("../integrations/supabase/types").Json;
10359
+ };
9383
10360
  cleanup_old_bookings: {
9384
10361
  Args: never;
9385
10362
  Returns: number;
9386
10363
  };
10364
+ consume_floriday_rate_limit: {
10365
+ Args: {
10366
+ p_bucket: string;
10367
+ p_capacity: number;
10368
+ p_cost?: number;
10369
+ p_refill_per_sec: number;
10370
+ };
10371
+ Returns: {
10372
+ granted: boolean;
10373
+ wait_ms: number;
10374
+ }[];
10375
+ };
9387
10376
  control_get_todays_carts: {
9388
10377
  Args: never;
9389
10378
  Returns: {
@@ -9464,6 +10453,18 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
9464
10453
  status: string;
9465
10454
  }[];
9466
10455
  };
10456
+ enqueue_cart_replan_if_unlocked: {
10457
+ Args: {
10458
+ p_order_id: string;
10459
+ };
10460
+ Returns: undefined;
10461
+ };
10462
+ ensure_trade_item_stock_row: {
10463
+ Args: {
10464
+ p_key: string;
10465
+ };
10466
+ Returns: undefined;
10467
+ };
9467
10468
  ensure_user_tenant: {
9468
10469
  Args: never;
9469
10470
  Returns: string;
@@ -9501,12 +10502,31 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
9501
10502
  };
9502
10503
  Returns: boolean;
9503
10504
  };
9504
- find_trade_item_key_by_name: {
10505
+ find_trade_item_key: {
9505
10506
  Args: {
10507
+ p_barcode: string;
9506
10508
  p_name: string;
10509
+ p_product_id: string;
9507
10510
  };
9508
10511
  Returns: string;
9509
10512
  };
10513
+ floriday_effective_price: {
10514
+ Args: {
10515
+ _buyer_id: string;
10516
+ _on_date?: string;
10517
+ _quantity?: number;
10518
+ _trade_item_id: string;
10519
+ };
10520
+ Returns: {
10521
+ base_price: number;
10522
+ currency: string;
10523
+ discount_type: string;
10524
+ discount_value: number;
10525
+ net_price: number;
10526
+ source: string;
10527
+ source_id: string;
10528
+ }[];
10529
+ };
9510
10530
  format_cart_number: {
9511
10531
  Args: {
9512
10532
  p_pick_date: string;
@@ -9527,6 +10547,13 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
9527
10547
  preferred_warehouse_name: string;
9528
10548
  }[];
9529
10549
  };
10550
+ get_active_floriday_context: {
10551
+ Args: never;
10552
+ Returns: {
10553
+ connection_id: string;
10554
+ user_id: string;
10555
+ }[];
10556
+ };
9530
10557
  get_active_twinfield_public: {
9531
10558
  Args: never;
9532
10559
  Returns: {
@@ -9538,6 +10565,13 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
9538
10565
  office_code: string;
9539
10566
  }[];
9540
10567
  };
10568
+ get_floricode_record_counts: {
10569
+ Args: never;
10570
+ Returns: {
10571
+ count: number;
10572
+ resource: string;
10573
+ }[];
10574
+ };
9541
10575
  get_floriday_agreements_active: {
9542
10576
  Args: {
9543
10577
  p_on_date?: string;
@@ -9629,6 +10663,24 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
9629
10663
  };
9630
10664
  Returns: import("../integrations/supabase/types").Json;
9631
10665
  };
10666
+ get_offer_delivery_options: {
10667
+ Args: {
10668
+ p_code: string;
10669
+ };
10670
+ Returns: import("../integrations/supabase/types").Json;
10671
+ };
10672
+ get_offer_recipient_by_code: {
10673
+ Args: {
10674
+ p_code: string;
10675
+ };
10676
+ Returns: {
10677
+ campaign_id: string;
10678
+ clicked_at: string;
10679
+ customer_id: string;
10680
+ id: string;
10681
+ ordered_at: string;
10682
+ }[];
10683
+ };
9632
10684
  get_or_assign_floriday_order_number: {
9633
10685
  Args: {
9634
10686
  p_floriday_id: string;
@@ -9681,12 +10733,53 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
9681
10733
  Args: never;
9682
10734
  Returns: boolean;
9683
10735
  };
10736
+ is_superadmin: {
10737
+ Args: {
10738
+ _user_id: string;
10739
+ };
10740
+ Returns: boolean;
10741
+ };
10742
+ local_effective_price: {
10743
+ Args: {
10744
+ _customer_id: string;
10745
+ _on_date?: string;
10746
+ _product_id: string;
10747
+ _quantity?: number;
10748
+ };
10749
+ Returns: {
10750
+ currency: string;
10751
+ discount_type: string;
10752
+ discount_value: number;
10753
+ net_price: number;
10754
+ source: string;
10755
+ source_id: string;
10756
+ }[];
10757
+ };
10758
+ mark_offer_clicked: {
10759
+ Args: {
10760
+ p_code: string;
10761
+ };
10762
+ Returns: undefined;
10763
+ };
10764
+ mark_offer_ordered: {
10765
+ Args: {
10766
+ p_code: string;
10767
+ };
10768
+ Returns: undefined;
10769
+ };
9684
10770
  next_order_number: {
9685
10771
  Args: {
9686
10772
  p_prefix: string;
9687
10773
  };
9688
10774
  Returns: string;
9689
10775
  };
10776
+ next_order_number_for_date: {
10777
+ Args: {
10778
+ p_created_at?: string;
10779
+ p_prefix: string;
10780
+ };
10781
+ Returns: string;
10782
+ };
9690
10783
  next_work_order_number: {
9691
10784
  Args: {
9692
10785
  p_parent_work_order_id?: string;
@@ -9694,16 +10787,41 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
9694
10787
  };
9695
10788
  Returns: string;
9696
10789
  };
10790
+ normalize_order_source: {
10791
+ Args: {
10792
+ p_src: string;
10793
+ };
10794
+ Returns: string;
10795
+ };
9697
10796
  normalize_vat: {
9698
10797
  Args: {
9699
10798
  v: string;
9700
10799
  };
9701
10800
  Returns: string;
9702
10801
  };
10802
+ offer_recipient_matches: {
10803
+ Args: {
10804
+ _campaign_id: string;
10805
+ _customer_id: string;
10806
+ _recipient_id: string;
10807
+ };
10808
+ Returns: boolean;
10809
+ };
10810
+ order_number_prefix: {
10811
+ Args: {
10812
+ p_custom_fields?: import("../integrations/supabase/types").Json;
10813
+ p_order_source: string;
10814
+ };
10815
+ Returns: string;
10816
+ };
9703
10817
  pickstation_get_orders_raw: {
9704
10818
  Args: never;
9705
10819
  Returns: import("../integrations/supabase/types").Json;
9706
10820
  };
10821
+ pickstation_get_planning_context: {
10822
+ Args: never;
10823
+ Returns: import("../integrations/supabase/types").Json;
10824
+ };
9707
10825
  pickstation_get_settings: {
9708
10826
  Args: never;
9709
10827
  Returns: import("../integrations/supabase/types").Json;
@@ -9727,6 +10845,35 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
9727
10845
  };
9728
10846
  Returns: undefined;
9729
10847
  };
10848
+ promote_trade_item_key: {
10849
+ Args: {
10850
+ p_new: string;
10851
+ p_old: string;
10852
+ };
10853
+ Returns: undefined;
10854
+ };
10855
+ recompute_order_status: {
10856
+ Args: {
10857
+ p_order_id: string;
10858
+ };
10859
+ Returns: undefined;
10860
+ };
10861
+ recompute_reserved_for_order: {
10862
+ Args: {
10863
+ p_order_id: string;
10864
+ };
10865
+ Returns: undefined;
10866
+ };
10867
+ recompute_reserved_stock: {
10868
+ Args: {
10869
+ p_trade_item_key: string;
10870
+ };
10871
+ Returns: undefined;
10872
+ };
10873
+ refresh_external_customers_grouped: {
10874
+ Args: never;
10875
+ Returns: undefined;
10876
+ };
9730
10877
  refresh_floricode_derived_code_lists: {
9731
10878
  Args: never;
9732
10879
  Returns: {
@@ -9741,6 +10888,12 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
9741
10888
  };
9742
10889
  Returns: number;
9743
10890
  };
10891
+ refresh_floricode_derived_for_products: {
10892
+ Args: {
10893
+ _product_ids: string[];
10894
+ };
10895
+ Returns: number;
10896
+ };
9744
10897
  reset_floriday_sync_cursor: {
9745
10898
  Args: {
9746
10899
  p_connection_id: string;
@@ -9748,6 +10901,12 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
9748
10901
  };
9749
10902
  Returns: undefined;
9750
10903
  };
10904
+ resolve_product_id_for_item: {
10905
+ Args: {
10906
+ p_product_name: string;
10907
+ };
10908
+ Returns: string;
10909
+ };
9751
10910
  schedule_floriday_additional_services_sync: {
9752
10911
  Args: {
9753
10912
  p_apikey: string;
@@ -10025,6 +11184,24 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
10025
11184
  };
10026
11185
  Returns: string[];
10027
11186
  };
11187
+ sync_cached_packing_from_product: {
11188
+ Args: {
11189
+ p_product_id: string;
11190
+ };
11191
+ Returns: undefined;
11192
+ };
11193
+ sync_order_cart_item_packing_from_product: {
11194
+ Args: {
11195
+ p_product_id: string;
11196
+ };
11197
+ Returns: undefined;
11198
+ };
11199
+ sync_product_packing_from_floriday_cache: {
11200
+ Args: {
11201
+ p_floriday_id: string;
11202
+ };
11203
+ Returns: undefined;
11204
+ };
10028
11205
  twinfield_decrypt: {
10029
11206
  Args: {
10030
11207
  cipher: string;
@@ -10037,6 +11214,17 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
10037
11214
  };
10038
11215
  Returns: string;
10039
11216
  };
11217
+ upsert_auto_fulfillment_log: {
11218
+ Args: {
11219
+ p_connection_id: string;
11220
+ p_error?: string;
11221
+ p_fulfillment_order_id?: string;
11222
+ p_reason?: string;
11223
+ p_sales_order_id: string;
11224
+ p_status: string;
11225
+ };
11226
+ Returns: undefined;
11227
+ };
10040
11228
  };
10041
11229
  Enums: {
10042
11230
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";