@flowselections/floriday-verkoop-module 1.0.11 → 1.0.13

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 (69) hide show
  1. package/dist-lib/components/verkoop/AutoFulfillmentStatusCard.d.ts +4 -0
  2. package/dist-lib/components/verkoop/AutoFulfillmentStatusCard.d.ts.map +1 -0
  3. package/dist-lib/components/verkoop/AutoFulfillmentStatusCard.js +95 -0
  4. package/dist-lib/components/verkoop/CartAssignmentWizard.d.ts +6 -0
  5. package/dist-lib/components/verkoop/CartAssignmentWizard.d.ts.map +1 -0
  6. package/dist-lib/components/verkoop/CartAssignmentWizard.js +194 -0
  7. package/dist-lib/components/verkoop/CreateOrderPage.d.ts.map +1 -1
  8. package/dist-lib/components/verkoop/CreateOrderPage.js +230 -192
  9. package/dist-lib/components/verkoop/OrderAfleverbrievenCard.d.ts +4 -0
  10. package/dist-lib/components/verkoop/OrderAfleverbrievenCard.d.ts.map +1 -0
  11. package/dist-lib/components/verkoop/OrderAfleverbrievenCard.js +44 -0
  12. package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts +5 -0
  13. package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts.map +1 -0
  14. package/dist-lib/components/verkoop/OrderKarindelingCard.js +160 -0
  15. package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts.map +1 -1
  16. package/dist-lib/components/verkoop/SalesOrderDetailView.js +6 -3
  17. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
  18. package/dist-lib/components/verkoop/SalesOrdersTable.js +3 -4
  19. package/dist-lib/components/verkoop/SearchableSelect.d.ts +19 -0
  20. package/dist-lib/components/verkoop/SearchableSelect.d.ts.map +1 -0
  21. package/dist-lib/components/verkoop/SearchableSelect.js +21 -0
  22. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts.map +1 -1
  23. package/dist-lib/components/verkoop/VerkoopOrdersPage.js +39 -3
  24. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1381 -86
  25. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  26. package/dist-lib/integrations/supabase/client.d.ts +1381 -86
  27. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  28. package/dist-lib/integrations/supabase/client.server.d.ts +1381 -86
  29. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  30. package/dist-lib/integrations/supabase/types.d.ts +1402 -79
  31. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  32. package/dist-lib/lib/cart-lock.functions.d.ts +11225 -0
  33. package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -0
  34. package/dist-lib/lib/cart-lock.functions.js +47 -0
  35. package/dist-lib/lib/cart-planner.d.ts +38 -0
  36. package/dist-lib/lib/cart-planner.d.ts.map +1 -0
  37. package/dist-lib/lib/cart-planner.js +217 -0
  38. package/dist-lib/lib/cart-replan.functions.d.ts +22467 -0
  39. package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -0
  40. package/dist-lib/lib/cart-replan.functions.js +203 -0
  41. package/dist-lib/lib/create-order.functions.d.ts +100967 -0
  42. package/dist-lib/lib/create-order.functions.d.ts.map +1 -0
  43. package/dist-lib/lib/create-order.functions.js +343 -0
  44. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +33640 -0
  45. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -0
  46. package/dist-lib/lib/floriday-auto-fulfillment.functions.js +65 -0
  47. package/dist-lib/lib/floriday-auto-fulfillment.server.d.ts +21 -0
  48. package/dist-lib/lib/floriday-auto-fulfillment.server.d.ts.map +1 -0
  49. package/dist-lib/lib/floriday-auto-fulfillment.server.js +352 -0
  50. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +11220 -0
  51. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -0
  52. package/dist-lib/lib/floriday-logistic-labels.functions.js +171 -0
  53. package/dist-lib/lib/floriday-public.functions.d.ts +9067 -16
  54. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  55. package/dist-lib/lib/floriday-public.functions.js +45 -47
  56. package/dist-lib/lib/floriday-writes.functions.d.ts +6475 -0
  57. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  58. package/dist-lib/lib/salesorders-mapping.d.ts +2 -0
  59. package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
  60. package/dist-lib/lib/salesorders-mapping.js +46 -20
  61. package/dist-lib/lib/salesorders.functions.d.ts +4273 -388
  62. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  63. package/dist-lib/lib/salesorders.functions.js +8 -0
  64. package/dist-lib/lib/tradeitems.functions.d.ts +1381 -86
  65. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  66. package/dist-lib/lib/useSalesOrdersQuery.d.ts +1 -0
  67. package/dist-lib/lib/useSalesOrdersQuery.d.ts.map +1 -1
  68. package/dist-lib/lib/useSalesOrdersQuery.js +130 -41
  69. package/package.json +1 -1
@@ -3,7 +3,10 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
3
3
  Tables: {
4
4
  afhandeling_settings: {
5
5
  Row: {
6
+ auto_print_delivery_note: boolean;
7
+ auto_process_paused: boolean;
6
8
  created_at: string;
9
+ extra_pick_days_with_stickers: number;
7
10
  id: string;
8
11
  max_workdays_earlier_pick: number;
9
12
  pick_days_before_transport: number;
@@ -17,7 +20,10 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
17
20
  user_id: string;
18
21
  };
19
22
  Insert: {
23
+ auto_print_delivery_note?: boolean;
24
+ auto_process_paused?: boolean;
20
25
  created_at?: string;
26
+ extra_pick_days_with_stickers?: number;
21
27
  id?: string;
22
28
  max_workdays_earlier_pick?: number;
23
29
  pick_days_before_transport?: number;
@@ -31,7 +37,10 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
31
37
  user_id: string;
32
38
  };
33
39
  Update: {
40
+ auto_print_delivery_note?: boolean;
41
+ auto_process_paused?: boolean;
34
42
  created_at?: string;
43
+ extra_pick_days_with_stickers?: number;
35
44
  id?: string;
36
45
  max_workdays_earlier_pick?: number;
37
46
  pick_days_before_transport?: number;
@@ -713,6 +722,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
713
722
  notes: string | null;
714
723
  performed_at: string;
715
724
  rescheduled_count: number;
725
+ stock_consumed_at: string | null;
716
726
  total_carts: number;
717
727
  updated_at: string;
718
728
  user_id: string;
@@ -726,6 +736,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
726
736
  notes?: string | null;
727
737
  performed_at?: string;
728
738
  rescheduled_count?: number;
739
+ stock_consumed_at?: string | null;
729
740
  total_carts?: number;
730
741
  updated_at?: string;
731
742
  user_id: string;
@@ -739,6 +750,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
739
750
  notes?: string | null;
740
751
  performed_at?: string;
741
752
  rescheduled_count?: number;
753
+ stock_consumed_at?: string | null;
742
754
  total_carts?: number;
743
755
  updated_at?: string;
744
756
  user_id?: string;
@@ -820,6 +832,36 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
820
832
  };
821
833
  Relationships: [];
822
834
  };
835
+ cart_replan_queue: {
836
+ Row: {
837
+ attempts: number;
838
+ last_error: string | null;
839
+ order_id: string;
840
+ processed_at: string | null;
841
+ requested_at: string;
842
+ };
843
+ Insert: {
844
+ attempts?: number;
845
+ last_error?: string | null;
846
+ order_id: string;
847
+ processed_at?: string | null;
848
+ requested_at?: string;
849
+ };
850
+ Update: {
851
+ attempts?: number;
852
+ last_error?: string | null;
853
+ order_id?: string;
854
+ processed_at?: string | null;
855
+ requested_at?: string;
856
+ };
857
+ Relationships: [{
858
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
859
+ columns: ["order_id"];
860
+ isOneToOne: true;
861
+ referencedRelation: "orders";
862
+ referencedColumns: ["id"];
863
+ }];
864
+ };
823
865
  collections: {
824
866
  Row: {
825
867
  created_at: string;
@@ -2945,34 +2987,52 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
2945
2987
  Row: {
2946
2988
  catalog_key: string | null;
2947
2989
  catalog_url: string;
2990
+ client_id: string | null;
2991
+ client_secret_ciphertext: string | null;
2992
+ client_secret_last4: string | null;
2948
2993
  created_at: string;
2949
2994
  id: number;
2950
2995
  last_meta: import("./types").Json | null;
2951
2996
  last_test_at: string | null;
2952
2997
  last_test_error: string | null;
2953
2998
  last_test_ok: boolean | null;
2999
+ last_token_test_at: string | null;
3000
+ last_token_test_error: string | null;
3001
+ last_token_test_ok: boolean | null;
2954
3002
  updated_at: string;
2955
3003
  };
2956
3004
  Insert: {
2957
3005
  catalog_key?: string | null;
2958
3006
  catalog_url?: string;
3007
+ client_id?: string | null;
3008
+ client_secret_ciphertext?: string | null;
3009
+ client_secret_last4?: string | null;
2959
3010
  created_at?: string;
2960
3011
  id?: number;
2961
3012
  last_meta?: import("./types").Json | null;
2962
3013
  last_test_at?: string | null;
2963
3014
  last_test_error?: string | null;
2964
3015
  last_test_ok?: boolean | null;
3016
+ last_token_test_at?: string | null;
3017
+ last_token_test_error?: string | null;
3018
+ last_token_test_ok?: boolean | null;
2965
3019
  updated_at?: string;
2966
3020
  };
2967
3021
  Update: {
2968
3022
  catalog_key?: string | null;
2969
3023
  catalog_url?: string;
3024
+ client_id?: string | null;
3025
+ client_secret_ciphertext?: string | null;
3026
+ client_secret_last4?: string | null;
2970
3027
  created_at?: string;
2971
3028
  id?: number;
2972
3029
  last_meta?: import("./types").Json | null;
2973
3030
  last_test_at?: string | null;
2974
3031
  last_test_error?: string | null;
2975
3032
  last_test_ok?: boolean | null;
3033
+ last_token_test_at?: string | null;
3034
+ last_token_test_error?: string | null;
3035
+ last_token_test_ok?: boolean | null;
2976
3036
  updated_at?: string;
2977
3037
  };
2978
3038
  Relationships: [];
@@ -3205,6 +3265,54 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
3205
3265
  referencedColumns: ["id"];
3206
3266
  }];
3207
3267
  };
3268
+ floriday_auto_fulfillment_log: {
3269
+ Row: {
3270
+ attempts: number;
3271
+ connection_id: string;
3272
+ created_at: string;
3273
+ error: string | null;
3274
+ fulfillment_order_id: string | null;
3275
+ id: string;
3276
+ last_attempt_at: string | null;
3277
+ reason: string | null;
3278
+ sales_order_id: string;
3279
+ status: string;
3280
+ updated_at: string;
3281
+ };
3282
+ Insert: {
3283
+ attempts?: number;
3284
+ connection_id: string;
3285
+ created_at?: string;
3286
+ error?: string | null;
3287
+ fulfillment_order_id?: string | null;
3288
+ id?: string;
3289
+ last_attempt_at?: string | null;
3290
+ reason?: string | null;
3291
+ sales_order_id: string;
3292
+ status?: string;
3293
+ updated_at?: string;
3294
+ };
3295
+ Update: {
3296
+ attempts?: number;
3297
+ connection_id?: string;
3298
+ created_at?: string;
3299
+ error?: string | null;
3300
+ fulfillment_order_id?: string | null;
3301
+ id?: string;
3302
+ last_attempt_at?: string | null;
3303
+ reason?: string | null;
3304
+ sales_order_id?: string;
3305
+ status?: string;
3306
+ updated_at?: string;
3307
+ };
3308
+ Relationships: [{
3309
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
3310
+ columns: ["connection_id"];
3311
+ isOneToOne: false;
3312
+ referencedRelation: "floriday_connections";
3313
+ referencedColumns: ["id"];
3314
+ }];
3315
+ };
3208
3316
  floriday_base_items_cache: {
3209
3317
  Row: {
3210
3318
  connection_id: string;
@@ -3619,6 +3727,51 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
3619
3727
  referencedColumns: ["id"];
3620
3728
  }];
3621
3729
  };
3730
+ floriday_continuous_stock_queue: {
3731
+ Row: {
3732
+ attempts: number;
3733
+ connection_id: string;
3734
+ created_at: string;
3735
+ gateway_attempt_id: string | null;
3736
+ id: string;
3737
+ last_error: string | null;
3738
+ number_of_pieces: number;
3739
+ sent_at: string | null;
3740
+ status: string;
3741
+ trade_item_id: string;
3742
+ updated_at: string;
3743
+ user_id: string;
3744
+ };
3745
+ Insert: {
3746
+ attempts?: number;
3747
+ connection_id: string;
3748
+ created_at?: string;
3749
+ gateway_attempt_id?: string | null;
3750
+ id?: string;
3751
+ last_error?: string | null;
3752
+ number_of_pieces?: number;
3753
+ sent_at?: string | null;
3754
+ status?: string;
3755
+ trade_item_id: string;
3756
+ updated_at?: string;
3757
+ user_id: string;
3758
+ };
3759
+ Update: {
3760
+ attempts?: number;
3761
+ connection_id?: string;
3762
+ created_at?: string;
3763
+ gateway_attempt_id?: string | null;
3764
+ id?: string;
3765
+ last_error?: string | null;
3766
+ number_of_pieces?: number;
3767
+ sent_at?: string | null;
3768
+ status?: string;
3769
+ trade_item_id?: string;
3770
+ updated_at?: string;
3771
+ user_id?: string;
3772
+ };
3773
+ Relationships: [];
3774
+ };
3622
3775
  floriday_contract_trade_item_groups_cache: {
3623
3776
  Row: {
3624
3777
  connection_id: string;
@@ -4264,6 +4417,24 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
4264
4417
  referencedColumns: ["id"];
4265
4418
  }];
4266
4419
  };
4420
+ floriday_rate_limit_state: {
4421
+ Row: {
4422
+ bucket: string;
4423
+ last_refill_at: string;
4424
+ tokens: number;
4425
+ };
4426
+ Insert: {
4427
+ bucket: string;
4428
+ last_refill_at?: string;
4429
+ tokens: number;
4430
+ };
4431
+ Update: {
4432
+ bucket?: string;
4433
+ last_refill_at?: string;
4434
+ tokens?: number;
4435
+ };
4436
+ Relationships: [];
4437
+ };
4267
4438
  floriday_resource_schemas: {
4268
4439
  Row: {
4269
4440
  enums: import("./types").Json;
@@ -4687,6 +4858,60 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
4687
4858
  referencedColumns: ["id"];
4688
4859
  }];
4689
4860
  };
4861
+ flow_role_assignments: {
4862
+ Row: {
4863
+ created_at: string;
4864
+ id: string;
4865
+ role_id: string;
4866
+ user_id: string;
4867
+ };
4868
+ Insert: {
4869
+ created_at?: string;
4870
+ id?: string;
4871
+ role_id: string;
4872
+ user_id: string;
4873
+ };
4874
+ Update: {
4875
+ created_at?: string;
4876
+ id?: string;
4877
+ role_id?: string;
4878
+ user_id?: string;
4879
+ };
4880
+ Relationships: [{
4881
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
4882
+ columns: ["role_id"];
4883
+ isOneToOne: false;
4884
+ referencedRelation: "flow_roles";
4885
+ referencedColumns: ["id"];
4886
+ }];
4887
+ };
4888
+ flow_roles: {
4889
+ Row: {
4890
+ created_at: string;
4891
+ description: string | null;
4892
+ id: string;
4893
+ module_access: string[];
4894
+ name: string;
4895
+ updated_at: string;
4896
+ };
4897
+ Insert: {
4898
+ created_at?: string;
4899
+ description?: string | null;
4900
+ id?: string;
4901
+ module_access?: string[];
4902
+ name: string;
4903
+ updated_at?: string;
4904
+ };
4905
+ Update: {
4906
+ created_at?: string;
4907
+ description?: string | null;
4908
+ id?: string;
4909
+ module_access?: string[];
4910
+ name?: string;
4911
+ updated_at?: string;
4912
+ };
4913
+ Relationships: [];
4914
+ };
4690
4915
  imap_accounts: {
4691
4916
  Row: {
4692
4917
  created_at: string;
@@ -5008,88 +5233,286 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
5008
5233
  };
5009
5234
  Relationships: [];
5010
5235
  };
5011
- locations: {
5236
+ local_customer_agreements: {
5012
5237
  Row: {
5238
+ base_price: number | null;
5013
5239
  created_at: string;
5240
+ currency: string;
5241
+ customer_id: string;
5014
5242
  id: string;
5015
- name: string;
5016
- sort_order: number;
5243
+ min_quantity: number;
5244
+ net_price: number;
5245
+ notes: string | null;
5246
+ product_category_id: string | null;
5247
+ product_id: string | null;
5017
5248
  updated_at: string;
5249
+ valid_from: string | null;
5250
+ valid_until: string | null;
5018
5251
  };
5019
5252
  Insert: {
5253
+ base_price?: number | null;
5020
5254
  created_at?: string;
5255
+ currency?: string;
5256
+ customer_id: string;
5021
5257
  id?: string;
5022
- name: string;
5023
- sort_order?: number;
5258
+ min_quantity?: number;
5259
+ net_price: number;
5260
+ notes?: string | null;
5261
+ product_category_id?: string | null;
5262
+ product_id?: string | null;
5024
5263
  updated_at?: string;
5264
+ valid_from?: string | null;
5265
+ valid_until?: string | null;
5025
5266
  };
5026
5267
  Update: {
5268
+ base_price?: number | null;
5027
5269
  created_at?: string;
5270
+ currency?: string;
5271
+ customer_id?: string;
5028
5272
  id?: string;
5029
- name?: string;
5030
- sort_order?: number;
5273
+ min_quantity?: number;
5274
+ net_price?: number;
5275
+ notes?: string | null;
5276
+ product_category_id?: string | null;
5277
+ product_id?: string | null;
5031
5278
  updated_at?: string;
5279
+ valid_from?: string | null;
5280
+ valid_until?: string | null;
5032
5281
  };
5033
- Relationships: [];
5282
+ Relationships: [{
5283
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
5284
+ columns: ["customer_id"];
5285
+ isOneToOne: false;
5286
+ referencedRelation: "customers";
5287
+ referencedColumns: ["id"];
5288
+ }, {
5289
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
5290
+ columns: ["product_category_id"];
5291
+ isOneToOne: false;
5292
+ referencedRelation: "product_categories";
5293
+ referencedColumns: ["id"];
5294
+ }, {
5295
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
5296
+ columns: ["product_id"];
5297
+ isOneToOne: false;
5298
+ referencedRelation: "products";
5299
+ referencedColumns: ["id"];
5300
+ }];
5034
5301
  };
5035
- mailbox_messages: {
5302
+ local_customer_price_groups: {
5036
5303
  Row: {
5037
- body_html: string | null;
5038
- body_text: string | null;
5039
- connection_id: string | null;
5040
5304
  created_at: string;
5041
- error_message: string | null;
5042
- external_id: string | null;
5043
- from_email: string | null;
5044
- from_name: string | null;
5305
+ currency: string;
5306
+ customer_id: string;
5307
+ discount_type: string;
5308
+ discount_value: number;
5045
5309
  id: string;
5046
- message_id: string | null;
5047
- profile_id: string | null;
5048
- raw_size: number | null;
5049
- received_at: string | null;
5050
- status: string;
5051
- subject: string | null;
5052
- uid: number | null;
5310
+ min_quantity: number;
5311
+ notes: string | null;
5312
+ product_category_id: string | null;
5313
+ product_id: string | null;
5053
5314
  updated_at: string;
5315
+ valid_from: string | null;
5316
+ valid_until: string | null;
5054
5317
  };
5055
5318
  Insert: {
5056
- body_html?: string | null;
5057
- body_text?: string | null;
5058
- connection_id?: string | null;
5059
5319
  created_at?: string;
5060
- error_message?: string | null;
5061
- external_id?: string | null;
5062
- from_email?: string | null;
5063
- from_name?: string | null;
5320
+ currency?: string;
5321
+ customer_id: string;
5322
+ discount_type: string;
5323
+ discount_value: number;
5064
5324
  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;
5325
+ min_quantity?: number;
5326
+ notes?: string | null;
5327
+ product_category_id?: string | null;
5328
+ product_id?: string | null;
5072
5329
  updated_at?: string;
5330
+ valid_from?: string | null;
5331
+ valid_until?: string | null;
5073
5332
  };
5074
5333
  Update: {
5075
- body_html?: string | null;
5076
- body_text?: string | null;
5077
- connection_id?: string | null;
5078
5334
  created_at?: string;
5079
- error_message?: string | null;
5080
- external_id?: string | null;
5081
- from_email?: string | null;
5082
- from_name?: string | null;
5335
+ currency?: string;
5336
+ customer_id?: string;
5337
+ discount_type?: string;
5338
+ discount_value?: number;
5083
5339
  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;
5340
+ min_quantity?: number;
5341
+ notes?: string | null;
5342
+ product_category_id?: string | null;
5343
+ product_id?: string | null;
5091
5344
  updated_at?: string;
5092
- };
5345
+ valid_from?: string | null;
5346
+ valid_until?: string | null;
5347
+ };
5348
+ Relationships: [{
5349
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
5350
+ columns: ["customer_id"];
5351
+ isOneToOne: false;
5352
+ referencedRelation: "customers";
5353
+ referencedColumns: ["id"];
5354
+ }, {
5355
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
5356
+ columns: ["product_category_id"];
5357
+ isOneToOne: false;
5358
+ referencedRelation: "product_categories";
5359
+ referencedColumns: ["id"];
5360
+ }, {
5361
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
5362
+ columns: ["product_id"];
5363
+ isOneToOne: false;
5364
+ referencedRelation: "products";
5365
+ referencedColumns: ["id"];
5366
+ }];
5367
+ };
5368
+ local_customer_sales_strategies: {
5369
+ Row: {
5370
+ created_at: string;
5371
+ currency: string;
5372
+ customer_id: string;
5373
+ discount_type: string;
5374
+ discount_value: number;
5375
+ id: string;
5376
+ min_quantity: number;
5377
+ notes: string | null;
5378
+ product_category_id: string | null;
5379
+ product_id: string | null;
5380
+ updated_at: string;
5381
+ valid_from: string | null;
5382
+ valid_until: string | null;
5383
+ };
5384
+ Insert: {
5385
+ created_at?: string;
5386
+ currency?: string;
5387
+ customer_id: string;
5388
+ discount_type: string;
5389
+ discount_value: number;
5390
+ id?: string;
5391
+ min_quantity?: number;
5392
+ notes?: string | null;
5393
+ product_category_id?: string | null;
5394
+ product_id?: string | null;
5395
+ updated_at?: string;
5396
+ valid_from?: string | null;
5397
+ valid_until?: string | null;
5398
+ };
5399
+ Update: {
5400
+ created_at?: string;
5401
+ currency?: string;
5402
+ customer_id?: string;
5403
+ discount_type?: string;
5404
+ discount_value?: number;
5405
+ id?: string;
5406
+ min_quantity?: number;
5407
+ notes?: string | null;
5408
+ product_category_id?: string | null;
5409
+ product_id?: string | null;
5410
+ updated_at?: string;
5411
+ valid_from?: string | null;
5412
+ valid_until?: string | null;
5413
+ };
5414
+ Relationships: [{
5415
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
5416
+ columns: ["customer_id"];
5417
+ isOneToOne: false;
5418
+ referencedRelation: "customers";
5419
+ referencedColumns: ["id"];
5420
+ }, {
5421
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
5422
+ columns: ["product_category_id"];
5423
+ isOneToOne: false;
5424
+ referencedRelation: "product_categories";
5425
+ referencedColumns: ["id"];
5426
+ }, {
5427
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
5428
+ columns: ["product_id"];
5429
+ isOneToOne: false;
5430
+ referencedRelation: "products";
5431
+ referencedColumns: ["id"];
5432
+ }];
5433
+ };
5434
+ locations: {
5435
+ Row: {
5436
+ created_at: string;
5437
+ id: string;
5438
+ name: string;
5439
+ sort_order: number;
5440
+ updated_at: string;
5441
+ };
5442
+ Insert: {
5443
+ created_at?: string;
5444
+ id?: string;
5445
+ name: string;
5446
+ sort_order?: number;
5447
+ updated_at?: string;
5448
+ };
5449
+ Update: {
5450
+ created_at?: string;
5451
+ id?: string;
5452
+ name?: string;
5453
+ sort_order?: number;
5454
+ updated_at?: string;
5455
+ };
5456
+ Relationships: [];
5457
+ };
5458
+ mailbox_messages: {
5459
+ Row: {
5460
+ body_html: string | null;
5461
+ body_text: string | null;
5462
+ connection_id: string | null;
5463
+ created_at: string;
5464
+ error_message: string | null;
5465
+ external_id: string | null;
5466
+ from_email: string | null;
5467
+ from_name: string | null;
5468
+ id: string;
5469
+ message_id: string | null;
5470
+ profile_id: string | null;
5471
+ raw_size: number | null;
5472
+ received_at: string | null;
5473
+ status: string;
5474
+ subject: string | null;
5475
+ uid: number | null;
5476
+ updated_at: string;
5477
+ };
5478
+ Insert: {
5479
+ body_html?: string | null;
5480
+ body_text?: string | null;
5481
+ connection_id?: string | null;
5482
+ created_at?: string;
5483
+ error_message?: string | null;
5484
+ external_id?: string | null;
5485
+ from_email?: string | null;
5486
+ from_name?: string | null;
5487
+ id?: string;
5488
+ message_id?: string | null;
5489
+ profile_id?: string | null;
5490
+ raw_size?: number | null;
5491
+ received_at?: string | null;
5492
+ status?: string;
5493
+ subject?: string | null;
5494
+ uid?: number | null;
5495
+ updated_at?: string;
5496
+ };
5497
+ Update: {
5498
+ body_html?: string | null;
5499
+ body_text?: string | null;
5500
+ connection_id?: string | null;
5501
+ created_at?: string;
5502
+ error_message?: string | null;
5503
+ external_id?: string | null;
5504
+ from_email?: string | null;
5505
+ from_name?: string | null;
5506
+ id?: string;
5507
+ message_id?: string | null;
5508
+ profile_id?: string | null;
5509
+ raw_size?: number | null;
5510
+ received_at?: string | null;
5511
+ status?: string;
5512
+ subject?: string | null;
5513
+ uid?: number | null;
5514
+ updated_at?: string;
5515
+ };
5093
5516
  Relationships: [{
5094
5517
  foreignKeyName: "mailbox_messages_connection_id_fkey";
5095
5518
  columns: ["connection_id"];
@@ -5120,6 +5543,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
5120
5543
  matched_customer_id: string | null;
5121
5544
  message_id: string;
5122
5545
  notes: string | null;
5546
+ order_number: string | null;
5123
5547
  parsed_payload: import("./types").Json | null;
5124
5548
  reviewed_at: string | null;
5125
5549
  reviewed_by: string | null;
@@ -5135,6 +5559,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
5135
5559
  matched_customer_id?: string | null;
5136
5560
  message_id: string;
5137
5561
  notes?: string | null;
5562
+ order_number?: string | null;
5138
5563
  parsed_payload?: import("./types").Json | null;
5139
5564
  reviewed_at?: string | null;
5140
5565
  reviewed_by?: string | null;
@@ -5150,6 +5575,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
5150
5575
  matched_customer_id?: string | null;
5151
5576
  message_id?: string;
5152
5577
  notes?: string | null;
5578
+ order_number?: string | null;
5153
5579
  parsed_payload?: import("./types").Json | null;
5154
5580
  reviewed_at?: string | null;
5155
5581
  reviewed_by?: string | null;
@@ -5515,6 +5941,273 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
5515
5941
  referencedColumns: ["id"];
5516
5942
  }];
5517
5943
  };
5944
+ nmbrs_component_mapping: {
5945
+ Row: {
5946
+ created_at: string;
5947
+ id: string;
5948
+ source_kind: string;
5949
+ source_value: string | null;
5950
+ updated_at: string;
5951
+ wage_code: string;
5952
+ };
5953
+ Insert: {
5954
+ created_at?: string;
5955
+ id?: string;
5956
+ source_kind: string;
5957
+ source_value?: string | null;
5958
+ updated_at?: string;
5959
+ wage_code: string;
5960
+ };
5961
+ Update: {
5962
+ created_at?: string;
5963
+ id?: string;
5964
+ source_kind?: string;
5965
+ source_value?: string | null;
5966
+ updated_at?: string;
5967
+ wage_code?: string;
5968
+ };
5969
+ Relationships: [{
5970
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
5971
+ columns: ["wage_code"];
5972
+ isOneToOne: false;
5973
+ referencedRelation: "nmbrs_wage_components";
5974
+ referencedColumns: ["code"];
5975
+ }];
5976
+ };
5977
+ nmbrs_employee_mapping: {
5978
+ Row: {
5979
+ active_from: string | null;
5980
+ active_to: string | null;
5981
+ contract_hours_per_week: number | null;
5982
+ created_at: string;
5983
+ hourly_wage: number | null;
5984
+ id: string;
5985
+ monteur_id: string;
5986
+ nmbrs_company_code: string | null;
5987
+ nmbrs_employee_number: string;
5988
+ updated_at: string;
5989
+ };
5990
+ Insert: {
5991
+ active_from?: string | null;
5992
+ active_to?: string | null;
5993
+ contract_hours_per_week?: number | null;
5994
+ created_at?: string;
5995
+ hourly_wage?: number | null;
5996
+ id?: string;
5997
+ monteur_id: string;
5998
+ nmbrs_company_code?: string | null;
5999
+ nmbrs_employee_number: string;
6000
+ updated_at?: string;
6001
+ };
6002
+ Update: {
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
+ Relationships: [{
6015
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
6016
+ columns: ["monteur_id"];
6017
+ isOneToOne: true;
6018
+ referencedRelation: "monteurs";
6019
+ referencedColumns: ["id"];
6020
+ }];
6021
+ };
6022
+ nmbrs_export_lines: {
6023
+ Row: {
6024
+ amount: number;
6025
+ created_at: string;
6026
+ entry_date: string;
6027
+ hours: number;
6028
+ id: string;
6029
+ monteur_id: string;
6030
+ nmbrs_employee_number: string | null;
6031
+ notes: string | null;
6032
+ run_id: string;
6033
+ source_kind: string | null;
6034
+ source_ref_id: string | null;
6035
+ updated_at: string;
6036
+ wage_code: string;
6037
+ };
6038
+ Insert: {
6039
+ amount?: number;
6040
+ created_at?: string;
6041
+ entry_date: string;
6042
+ hours?: number;
6043
+ id?: string;
6044
+ monteur_id: string;
6045
+ nmbrs_employee_number?: string | null;
6046
+ notes?: string | null;
6047
+ run_id: string;
6048
+ source_kind?: string | null;
6049
+ source_ref_id?: string | null;
6050
+ updated_at?: string;
6051
+ wage_code: string;
6052
+ };
6053
+ Update: {
6054
+ amount?: number;
6055
+ created_at?: string;
6056
+ entry_date?: string;
6057
+ hours?: number;
6058
+ id?: string;
6059
+ monteur_id?: string;
6060
+ nmbrs_employee_number?: string | null;
6061
+ notes?: string | null;
6062
+ run_id?: string;
6063
+ source_kind?: string | null;
6064
+ source_ref_id?: string | null;
6065
+ updated_at?: string;
6066
+ wage_code?: string;
6067
+ };
6068
+ Relationships: [{
6069
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
6070
+ columns: ["monteur_id"];
6071
+ isOneToOne: false;
6072
+ referencedRelation: "monteurs";
6073
+ referencedColumns: ["id"];
6074
+ }, {
6075
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
6076
+ columns: ["run_id"];
6077
+ isOneToOne: false;
6078
+ referencedRelation: "nmbrs_export_runs";
6079
+ referencedColumns: ["id"];
6080
+ }, {
6081
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
6082
+ columns: ["wage_code"];
6083
+ isOneToOne: false;
6084
+ referencedRelation: "nmbrs_wage_components";
6085
+ referencedColumns: ["code"];
6086
+ }];
6087
+ };
6088
+ nmbrs_export_runs: {
6089
+ Row: {
6090
+ created_at: string;
6091
+ file_name: string | null;
6092
+ generated_at: string;
6093
+ generated_by: string | null;
6094
+ id: string;
6095
+ notes: string | null;
6096
+ period_end: string;
6097
+ period_label: string;
6098
+ period_start: string;
6099
+ status: string;
6100
+ total_hours: number;
6101
+ total_lines: number;
6102
+ updated_at: string;
6103
+ };
6104
+ Insert: {
6105
+ created_at?: string;
6106
+ file_name?: string | null;
6107
+ generated_at?: string;
6108
+ generated_by?: string | null;
6109
+ id?: string;
6110
+ notes?: string | null;
6111
+ period_end: string;
6112
+ period_label: string;
6113
+ period_start: string;
6114
+ status?: string;
6115
+ total_hours?: number;
6116
+ total_lines?: number;
6117
+ updated_at?: string;
6118
+ };
6119
+ Update: {
6120
+ created_at?: string;
6121
+ file_name?: string | null;
6122
+ generated_at?: string;
6123
+ generated_by?: string | null;
6124
+ id?: string;
6125
+ notes?: string | null;
6126
+ period_end?: string;
6127
+ period_label?: string;
6128
+ period_start?: string;
6129
+ status?: string;
6130
+ total_hours?: number;
6131
+ total_lines?: number;
6132
+ updated_at?: string;
6133
+ };
6134
+ Relationships: [];
6135
+ };
6136
+ nmbrs_settings: {
6137
+ Row: {
6138
+ created_at: string;
6139
+ default_company_code: string | null;
6140
+ id: boolean;
6141
+ include_travel: boolean;
6142
+ overtime_threshold_daily: number;
6143
+ overtime_threshold_weekly: number;
6144
+ period_type: string;
6145
+ updated_at: string;
6146
+ updated_by: string | null;
6147
+ week_start_day: number;
6148
+ };
6149
+ Insert: {
6150
+ created_at?: string;
6151
+ default_company_code?: string | null;
6152
+ id?: boolean;
6153
+ include_travel?: boolean;
6154
+ overtime_threshold_daily?: number;
6155
+ overtime_threshold_weekly?: number;
6156
+ period_type?: string;
6157
+ updated_at?: string;
6158
+ updated_by?: string | null;
6159
+ week_start_day?: number;
6160
+ };
6161
+ Update: {
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
+ Relationships: [];
6174
+ };
6175
+ nmbrs_wage_components: {
6176
+ Row: {
6177
+ category: string;
6178
+ code: string;
6179
+ created_at: string;
6180
+ id: string;
6181
+ is_active: boolean;
6182
+ label: string;
6183
+ sort_order: number;
6184
+ unit: string;
6185
+ updated_at: string;
6186
+ };
6187
+ Insert: {
6188
+ category: string;
6189
+ code: string;
6190
+ created_at?: string;
6191
+ id?: string;
6192
+ is_active?: boolean;
6193
+ label: string;
6194
+ sort_order?: number;
6195
+ unit: string;
6196
+ updated_at?: string;
6197
+ };
6198
+ Update: {
6199
+ category?: string;
6200
+ code?: string;
6201
+ created_at?: string;
6202
+ id?: string;
6203
+ is_active?: boolean;
6204
+ label?: string;
6205
+ sort_order?: number;
6206
+ unit?: string;
6207
+ updated_at?: string;
6208
+ };
6209
+ Relationships: [];
6210
+ };
5518
6211
  notifications: {
5519
6212
  Row: {
5520
6213
  created_at: string;
@@ -5739,6 +6432,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
5739
6432
  id: string;
5740
6433
  items: import("./types").Json;
5741
6434
  notes: string | null;
6435
+ order_number: string | null;
5742
6436
  recipient_id: string;
5743
6437
  total_amount: number;
5744
6438
  };
@@ -5752,6 +6446,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
5752
6446
  id?: string;
5753
6447
  items?: import("./types").Json;
5754
6448
  notes?: string | null;
6449
+ order_number?: string | null;
5755
6450
  recipient_id: string;
5756
6451
  total_amount?: number;
5757
6452
  };
@@ -5765,6 +6460,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
5765
6460
  id?: string;
5766
6461
  items?: import("./types").Json;
5767
6462
  notes?: string | null;
6463
+ order_number?: string | null;
5768
6464
  recipient_id?: string;
5769
6465
  total_amount?: number;
5770
6466
  };
@@ -5924,6 +6620,9 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
5924
6620
  crates_per_layer: number;
5925
6621
  created_at: string;
5926
6622
  id: string;
6623
+ layer_fraction: number;
6624
+ layer_share_pct: number;
6625
+ layers_per_cart: number;
5927
6626
  order_item_id: string | null;
5928
6627
  plants_per_crate: number;
5929
6628
  product_id: string | null;
@@ -5935,6 +6634,9 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
5935
6634
  crates_per_layer?: number;
5936
6635
  created_at?: string;
5937
6636
  id?: string;
6637
+ layer_fraction?: number;
6638
+ layer_share_pct?: number;
6639
+ layers_per_cart?: number;
5938
6640
  order_item_id?: string | null;
5939
6641
  plants_per_crate?: number;
5940
6642
  product_id?: string | null;
@@ -5946,6 +6648,9 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
5946
6648
  crates_per_layer?: number;
5947
6649
  created_at?: string;
5948
6650
  id?: string;
6651
+ layer_fraction?: number;
6652
+ layer_share_pct?: number;
6653
+ layers_per_cart?: number;
5949
6654
  order_item_id?: string | null;
5950
6655
  plants_per_crate?: number;
5951
6656
  product_id?: string | null;
@@ -5973,33 +6678,45 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
5973
6678
  };
5974
6679
  order_carts: {
5975
6680
  Row: {
6681
+ algorithm_version: number;
5976
6682
  cart_number: number;
5977
6683
  created_at: string;
5978
6684
  id: string;
5979
6685
  is_auto: boolean;
5980
6686
  is_complete: boolean;
5981
6687
  notes: string | null;
6688
+ occupancy_pct: number;
5982
6689
  order_id: string;
6690
+ source: string;
6691
+ total_layers_used: number;
5983
6692
  updated_at: string;
5984
6693
  };
5985
6694
  Insert: {
6695
+ algorithm_version?: number;
5986
6696
  cart_number: number;
5987
6697
  created_at?: string;
5988
6698
  id?: string;
5989
6699
  is_auto?: boolean;
5990
6700
  is_complete?: boolean;
5991
6701
  notes?: string | null;
6702
+ occupancy_pct?: number;
5992
6703
  order_id: string;
6704
+ source?: string;
6705
+ total_layers_used?: number;
5993
6706
  updated_at?: string;
5994
6707
  };
5995
6708
  Update: {
6709
+ algorithm_version?: number;
5996
6710
  cart_number?: number;
5997
6711
  created_at?: string;
5998
6712
  id?: string;
5999
6713
  is_auto?: boolean;
6000
6714
  is_complete?: boolean;
6001
6715
  notes?: string | null;
6716
+ occupancy_pct?: number;
6002
6717
  order_id?: string;
6718
+ source?: string;
6719
+ total_layers_used?: number;
6003
6720
  updated_at?: string;
6004
6721
  };
6005
6722
  Relationships: [{
@@ -6152,6 +6869,8 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
6152
6869
  order_date: string;
6153
6870
  order_number: string;
6154
6871
  order_source: string;
6872
+ plan_locked_at: string | null;
6873
+ plan_locked_ref: string | null;
6155
6874
  status: string;
6156
6875
  total: string;
6157
6876
  updated_at: string;
@@ -6168,6 +6887,8 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
6168
6887
  order_date?: string;
6169
6888
  order_number: string;
6170
6889
  order_source?: string;
6890
+ plan_locked_at?: string | null;
6891
+ plan_locked_ref?: string | null;
6171
6892
  status?: string;
6172
6893
  total?: string;
6173
6894
  updated_at?: string;
@@ -6184,6 +6905,8 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
6184
6905
  order_date?: string;
6185
6906
  order_number?: string;
6186
6907
  order_source?: string;
6908
+ plan_locked_at?: string | null;
6909
+ plan_locked_ref?: string | null;
6187
6910
  status?: string;
6188
6911
  total?: string;
6189
6912
  updated_at?: string;
@@ -6497,6 +7220,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
6497
7220
  purchase_price: number | null;
6498
7221
  quantity: number;
6499
7222
  sale_price: number | null;
7223
+ trade_item_key: string | null;
6500
7224
  unit: string;
6501
7225
  updated_at: string;
6502
7226
  weight: string | null;
@@ -6519,6 +7243,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
6519
7243
  purchase_price?: number | null;
6520
7244
  quantity?: number;
6521
7245
  sale_price?: number | null;
7246
+ trade_item_key?: string | null;
6522
7247
  unit?: string;
6523
7248
  updated_at?: string;
6524
7249
  weight?: string | null;
@@ -6541,6 +7266,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
6541
7266
  purchase_price?: number | null;
6542
7267
  quantity?: number;
6543
7268
  sale_price?: number | null;
7269
+ trade_item_key?: string | null;
6544
7270
  unit?: string;
6545
7271
  updated_at?: string;
6546
7272
  weight?: string | null;
@@ -6553,6 +7279,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
6553
7279
  display_name: string | null;
6554
7280
  email: string | null;
6555
7281
  id: string;
7282
+ is_superadmin: boolean;
6556
7283
  notification_preferences: import("./types").Json;
6557
7284
  tenant_id: string | null;
6558
7285
  updated_at: string;
@@ -6562,6 +7289,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
6562
7289
  display_name?: string | null;
6563
7290
  email?: string | null;
6564
7291
  id: string;
7292
+ is_superadmin?: boolean;
6565
7293
  notification_preferences?: import("./types").Json;
6566
7294
  tenant_id?: string | null;
6567
7295
  updated_at?: string;
@@ -6571,6 +7299,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
6571
7299
  display_name?: string | null;
6572
7300
  email?: string | null;
6573
7301
  id?: string;
7302
+ is_superadmin?: boolean;
6574
7303
  notification_preferences?: import("./types").Json;
6575
7304
  tenant_id?: string | null;
6576
7305
  updated_at?: string;
@@ -7360,6 +8089,120 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
7360
8089
  };
7361
8090
  Relationships: [];
7362
8091
  };
8092
+ sidebar_config: {
8093
+ Row: {
8094
+ id: string;
8095
+ module_order: string[];
8096
+ updated_at: string;
8097
+ };
8098
+ Insert: {
8099
+ id?: string;
8100
+ module_order?: string[];
8101
+ updated_at?: string;
8102
+ };
8103
+ Update: {
8104
+ id?: string;
8105
+ module_order?: string[];
8106
+ updated_at?: string;
8107
+ };
8108
+ Relationships: [];
8109
+ };
8110
+ stock_import_runs: {
8111
+ Row: {
8112
+ connection_id: string | null;
8113
+ created_at: string;
8114
+ created_rows: number;
8115
+ errors: import("./types").Json;
8116
+ filename: string | null;
8117
+ id: string;
8118
+ mutations: import("./types").Json;
8119
+ skipped_rows: number;
8120
+ total_rows: number;
8121
+ updated_rows: number;
8122
+ user_id: string;
8123
+ };
8124
+ Insert: {
8125
+ connection_id?: string | null;
8126
+ created_at?: string;
8127
+ created_rows?: number;
8128
+ errors?: import("./types").Json;
8129
+ filename?: string | null;
8130
+ id?: string;
8131
+ mutations?: import("./types").Json;
8132
+ skipped_rows?: number;
8133
+ total_rows?: number;
8134
+ updated_rows?: number;
8135
+ user_id: string;
8136
+ };
8137
+ Update: {
8138
+ connection_id?: string | null;
8139
+ created_at?: string;
8140
+ created_rows?: number;
8141
+ errors?: import("./types").Json;
8142
+ filename?: string | null;
8143
+ id?: string;
8144
+ mutations?: import("./types").Json;
8145
+ skipped_rows?: number;
8146
+ total_rows?: number;
8147
+ updated_rows?: number;
8148
+ user_id?: string;
8149
+ };
8150
+ Relationships: [];
8151
+ };
8152
+ stock_mutation_log: {
8153
+ Row: {
8154
+ connection_id: string | null;
8155
+ created_at: string;
8156
+ created_by: string | null;
8157
+ id: string;
8158
+ mutation_type: string;
8159
+ order_id: string | null;
8160
+ order_item_id: string | null;
8161
+ order_source: string | null;
8162
+ physical_after: number | null;
8163
+ physical_before: number | null;
8164
+ qty_delta: number;
8165
+ reason: string | null;
8166
+ reserved_after: number | null;
8167
+ reserved_before: number | null;
8168
+ trade_item_key: string | null;
8169
+ };
8170
+ Insert: {
8171
+ connection_id?: string | null;
8172
+ created_at?: string;
8173
+ created_by?: string | null;
8174
+ id?: string;
8175
+ mutation_type: string;
8176
+ order_id?: string | null;
8177
+ order_item_id?: string | null;
8178
+ order_source?: string | null;
8179
+ physical_after?: number | null;
8180
+ physical_before?: number | null;
8181
+ qty_delta: number;
8182
+ reason?: string | null;
8183
+ reserved_after?: number | null;
8184
+ reserved_before?: number | null;
8185
+ trade_item_key?: string | null;
8186
+ };
8187
+ Update: {
8188
+ connection_id?: string | null;
8189
+ created_at?: string;
8190
+ created_by?: string | null;
8191
+ id?: string;
8192
+ mutation_type?: string;
8193
+ order_id?: string | null;
8194
+ order_item_id?: string | null;
8195
+ order_source?: string | null;
8196
+ physical_after?: number | null;
8197
+ physical_before?: number | null;
8198
+ qty_delta?: number;
8199
+ reason?: string | null;
8200
+ reserved_after?: number | null;
8201
+ reserved_before?: number | null;
8202
+ trade_item_key?: string | null;
8203
+ };
8204
+ Relationships: [];
8205
+ };
7363
8206
  supplier_products: {
7364
8207
  Row: {
7365
8208
  article_number: string | null;
@@ -7635,69 +8478,177 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
7635
8478
  floriday_link_error?: string | null;
7636
8479
  floriday_link_status?: string;
7637
8480
  id?: string;
7638
- last_floriday_sync_at?: string | null;
7639
- missing_required_fields?: string[];
7640
- source?: string;
8481
+ last_floriday_sync_at?: string | null;
8482
+ missing_required_fields?: string[];
8483
+ source?: string;
8484
+ updated_at?: string;
8485
+ user_id: string;
8486
+ };
8487
+ Update: {
8488
+ connection_id?: string | null;
8489
+ created_at?: string;
8490
+ data?: import("./types").Json;
8491
+ floriday_id?: string | null;
8492
+ floriday_link_error?: string | null;
8493
+ floriday_link_status?: string;
8494
+ id?: string;
8495
+ last_floriday_sync_at?: string | null;
8496
+ missing_required_fields?: string[];
8497
+ source?: string;
8498
+ updated_at?: string;
8499
+ user_id?: string;
8500
+ };
8501
+ Relationships: [];
8502
+ };
8503
+ trade_item_stock: {
8504
+ Row: {
8505
+ connection_id: string;
8506
+ created_at: string;
8507
+ id: string;
8508
+ incoming_stock: number;
8509
+ minimum_stock: number;
8510
+ notes: string | null;
8511
+ physical_stock: number;
8512
+ reserved_stock: number;
8513
+ trade_item_key: string;
8514
+ updated_at: string;
8515
+ user_id: string;
8516
+ };
8517
+ Insert: {
8518
+ connection_id: string;
8519
+ created_at?: string;
8520
+ id?: string;
8521
+ incoming_stock?: number;
8522
+ minimum_stock?: number;
8523
+ notes?: string | null;
8524
+ physical_stock?: number;
8525
+ reserved_stock?: number;
8526
+ trade_item_key: string;
8527
+ updated_at?: string;
8528
+ user_id: string;
8529
+ };
8530
+ Update: {
8531
+ connection_id?: string;
8532
+ created_at?: string;
8533
+ id?: string;
8534
+ incoming_stock?: number;
8535
+ minimum_stock?: number;
8536
+ notes?: string | null;
8537
+ physical_stock?: number;
8538
+ reserved_stock?: number;
8539
+ trade_item_key?: string;
8540
+ updated_at?: string;
8541
+ user_id?: string;
8542
+ };
8543
+ Relationships: [];
8544
+ };
8545
+ trade_item_supply_lines: {
8546
+ Row: {
8547
+ available_quantity: number | null;
8548
+ connection_id: string;
8549
+ created_at: string;
8550
+ currency: string | null;
8551
+ endpoint_family: string | null;
8552
+ environment: string | null;
8553
+ id: string;
8554
+ last_error: string | null;
8555
+ last_status: number | null;
8556
+ packing_configuration_id: string | null;
8557
+ period_end: string | null;
8558
+ period_start: string | null;
8559
+ price_per_piece: number | null;
8560
+ sales_unit: string | null;
8561
+ supply_line_id: string | null;
8562
+ supply_type: string;
8563
+ trade_item_id: string;
8564
+ updated_at: string;
8565
+ user_id: string;
8566
+ week: number | null;
8567
+ year: number | null;
8568
+ };
8569
+ Insert: {
8570
+ available_quantity?: number | null;
8571
+ connection_id: string;
8572
+ created_at?: string;
8573
+ currency?: string | null;
8574
+ endpoint_family?: string | null;
8575
+ environment?: string | null;
8576
+ id?: string;
8577
+ last_error?: string | null;
8578
+ last_status?: number | null;
8579
+ packing_configuration_id?: string | null;
8580
+ period_end?: string | null;
8581
+ period_start?: string | null;
8582
+ price_per_piece?: number | null;
8583
+ sales_unit?: string | null;
8584
+ supply_line_id?: string | null;
8585
+ supply_type?: string;
8586
+ trade_item_id: string;
7641
8587
  updated_at?: string;
7642
8588
  user_id: string;
8589
+ week?: number | null;
8590
+ year?: number | null;
7643
8591
  };
7644
8592
  Update: {
7645
- connection_id?: string | null;
8593
+ available_quantity?: number | null;
8594
+ connection_id?: string;
7646
8595
  created_at?: string;
7647
- data?: import("./types").Json;
7648
- floriday_id?: string | null;
7649
- floriday_link_error?: string | null;
7650
- floriday_link_status?: string;
8596
+ currency?: string | null;
8597
+ endpoint_family?: string | null;
8598
+ environment?: string | null;
7651
8599
  id?: string;
7652
- last_floriday_sync_at?: string | null;
7653
- missing_required_fields?: string[];
7654
- source?: string;
8600
+ last_error?: string | null;
8601
+ last_status?: number | null;
8602
+ packing_configuration_id?: string | null;
8603
+ period_end?: string | null;
8604
+ period_start?: string | null;
8605
+ price_per_piece?: number | null;
8606
+ sales_unit?: string | null;
8607
+ supply_line_id?: string | null;
8608
+ supply_type?: string;
8609
+ trade_item_id?: string;
7655
8610
  updated_at?: string;
7656
8611
  user_id?: string;
8612
+ week?: number | null;
8613
+ year?: number | null;
7657
8614
  };
7658
8615
  Relationships: [];
7659
8616
  };
7660
- trade_item_stock: {
8617
+ trade_item_warehouse_preferences: {
7661
8618
  Row: {
7662
8619
  connection_id: string;
7663
8620
  created_at: string;
7664
8621
  id: string;
7665
- incoming_stock: number;
7666
- minimum_stock: number;
7667
- notes: string | null;
7668
- physical_stock: number;
7669
- reserved_stock: number;
7670
- trade_item_key: string;
8622
+ trade_item_id: string;
7671
8623
  updated_at: string;
7672
- user_id: string;
8624
+ warehouse_id: string;
8625
+ warehouse_name: string | null;
7673
8626
  };
7674
8627
  Insert: {
7675
8628
  connection_id: string;
7676
8629
  created_at?: string;
7677
8630
  id?: string;
7678
- incoming_stock?: number;
7679
- minimum_stock?: number;
7680
- notes?: string | null;
7681
- physical_stock?: number;
7682
- reserved_stock?: number;
7683
- trade_item_key: string;
8631
+ trade_item_id: string;
7684
8632
  updated_at?: string;
7685
- user_id: string;
8633
+ warehouse_id: string;
8634
+ warehouse_name?: string | null;
7686
8635
  };
7687
8636
  Update: {
7688
8637
  connection_id?: string;
7689
8638
  created_at?: string;
7690
8639
  id?: string;
7691
- incoming_stock?: number;
7692
- minimum_stock?: number;
7693
- notes?: string | null;
7694
- physical_stock?: number;
7695
- reserved_stock?: number;
7696
- trade_item_key?: string;
8640
+ trade_item_id?: string;
7697
8641
  updated_at?: string;
7698
- user_id?: string;
8642
+ warehouse_id?: string;
8643
+ warehouse_name?: string | null;
7699
8644
  };
7700
- Relationships: [];
8645
+ Relationships: [{
8646
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
8647
+ columns: ["connection_id"];
8648
+ isOneToOne: false;
8649
+ referencedRelation: "floriday_connections";
8650
+ referencedColumns: ["id"];
8651
+ }];
7701
8652
  };
7702
8653
  twinfield_connections: {
7703
8654
  Row: {
@@ -8018,6 +8969,10 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8018
8969
  default_invoice_type: string;
8019
8970
  default_payment_term_days: number;
8020
8971
  default_vat_code: string;
8972
+ invoice_enabled_ao: boolean;
8973
+ invoice_enabled_fo: boolean;
8974
+ invoice_enabled_ho: boolean;
8975
+ invoice_enabled_mo: boolean;
8021
8976
  updated_at: string;
8022
8977
  user_id: string;
8023
8978
  };
@@ -8027,6 +8982,10 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8027
8982
  default_invoice_type?: string;
8028
8983
  default_payment_term_days?: number;
8029
8984
  default_vat_code?: string;
8985
+ invoice_enabled_ao?: boolean;
8986
+ invoice_enabled_fo?: boolean;
8987
+ invoice_enabled_ho?: boolean;
8988
+ invoice_enabled_mo?: boolean;
8030
8989
  updated_at?: string;
8031
8990
  user_id: string;
8032
8991
  };
@@ -8036,6 +8995,10 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8036
8995
  default_invoice_type?: string;
8037
8996
  default_payment_term_days?: number;
8038
8997
  default_vat_code?: string;
8998
+ invoice_enabled_ao?: boolean;
8999
+ invoice_enabled_fo?: boolean;
9000
+ invoice_enabled_ho?: boolean;
9001
+ invoice_enabled_mo?: boolean;
8039
9002
  updated_at?: string;
8040
9003
  user_id?: string;
8041
9004
  };
@@ -8937,6 +9900,44 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8937
9900
  };
8938
9901
  Relationships: [];
8939
9902
  };
9903
+ floriday_customer_discounts: {
9904
+ Row: {
9905
+ base_price: number | null;
9906
+ buyer_organization_id: string | null;
9907
+ currency: string | null;
9908
+ discount_type: string | null;
9909
+ discount_value: number | null;
9910
+ min_quantity: number | null;
9911
+ net_price: number | null;
9912
+ product_group_id: string | null;
9913
+ raw: import("./types").Json | null;
9914
+ source: string | null;
9915
+ source_id: string | null;
9916
+ trade_item_id: string | null;
9917
+ valid_from: string | null;
9918
+ valid_until: string | null;
9919
+ };
9920
+ Relationships: [];
9921
+ };
9922
+ local_customer_discounts: {
9923
+ Row: {
9924
+ base_price: number | null;
9925
+ currency: string | null;
9926
+ customer_id: string | null;
9927
+ discount_type: string | null;
9928
+ discount_value: number | null;
9929
+ min_quantity: number | null;
9930
+ net_price: number | null;
9931
+ product_category_id: string | null;
9932
+ product_id: string | null;
9933
+ product_name: string | null;
9934
+ source: string | null;
9935
+ source_id: string | null;
9936
+ valid_from: string | null;
9937
+ valid_until: string | null;
9938
+ };
9939
+ Relationships: [];
9940
+ };
8940
9941
  manufacture_product_possible_stock_view: {
8941
9942
  Row: {
8942
9943
  component_count: number | null;
@@ -9221,6 +10222,54 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
9221
10222
  };
9222
10223
  Returns: number;
9223
10224
  };
10225
+ afh_city_code: {
10226
+ Args: {
10227
+ _city: string;
10228
+ _country: string;
10229
+ };
10230
+ Returns: string;
10231
+ };
10232
+ afh_normalize_country: {
10233
+ Args: {
10234
+ _raw: string;
10235
+ };
10236
+ Returns: string;
10237
+ };
10238
+ afh_normalize_nl_province: {
10239
+ Args: {
10240
+ _raw: string;
10241
+ };
10242
+ Returns: string;
10243
+ };
10244
+ afh_subtract_workdays: {
10245
+ Args: {
10246
+ _date: string;
10247
+ _days: number;
10248
+ };
10249
+ Returns: string;
10250
+ };
10251
+ apply_stock_consumption: {
10252
+ Args: {
10253
+ p_order_id: string;
10254
+ p_order_item_id: string;
10255
+ p_qty: number;
10256
+ p_reason: string;
10257
+ p_source: string;
10258
+ p_trade_item_key: string;
10259
+ };
10260
+ Returns: undefined;
10261
+ };
10262
+ apply_stock_reservation: {
10263
+ Args: {
10264
+ p_order_id: string;
10265
+ p_order_item_id: string;
10266
+ p_qty: number;
10267
+ p_reason: string;
10268
+ p_source: string;
10269
+ p_trade_item_key: string;
10270
+ };
10271
+ Returns: undefined;
10272
+ };
9224
10273
  assign_cart_numbers: {
9225
10274
  Args: {
9226
10275
  p_carts: import("./types").Json;
@@ -9244,16 +10293,62 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
9244
10293
  order_number: string;
9245
10294
  }[];
9246
10295
  };
10296
+ autolink_product_to_floriday: {
10297
+ Args: {
10298
+ p_product_id: string;
10299
+ };
10300
+ Returns: string;
10301
+ };
10302
+ backfill_open_order_reservations: {
10303
+ Args: never;
10304
+ Returns: {
10305
+ processed_items: number;
10306
+ }[];
10307
+ };
9247
10308
  call_exact_route: {
9248
10309
  Args: {
9249
10310
  path: string;
9250
10311
  };
9251
10312
  Returns: number;
9252
10313
  };
10314
+ check_offer_product_available_stock: {
10315
+ Args: {
10316
+ p_campaign_product_id: string;
10317
+ p_code: string;
10318
+ p_needed_qty?: number;
10319
+ p_product_name?: string;
10320
+ };
10321
+ Returns: import("./types").Json;
10322
+ };
10323
+ check_trade_item_available_stock: {
10324
+ Args: {
10325
+ p_connection_id?: string;
10326
+ p_context?: string;
10327
+ p_needed_qty?: number;
10328
+ p_order_id?: string;
10329
+ p_order_item_id?: string;
10330
+ p_owner_id?: string;
10331
+ p_product_name?: string;
10332
+ p_trade_item_key: string;
10333
+ };
10334
+ Returns: import("./types").Json;
10335
+ };
9253
10336
  cleanup_old_bookings: {
9254
10337
  Args: never;
9255
10338
  Returns: number;
9256
10339
  };
10340
+ consume_floriday_rate_limit: {
10341
+ Args: {
10342
+ p_bucket: string;
10343
+ p_capacity: number;
10344
+ p_cost?: number;
10345
+ p_refill_per_sec: number;
10346
+ };
10347
+ Returns: {
10348
+ granted: boolean;
10349
+ wait_ms: number;
10350
+ }[];
10351
+ };
9257
10352
  control_get_todays_carts: {
9258
10353
  Args: never;
9259
10354
  Returns: {
@@ -9293,6 +10388,12 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
9293
10388
  table_name: string;
9294
10389
  }[];
9295
10390
  };
10391
+ dispatch_carrier_signups_sql: {
10392
+ Args: {
10393
+ _catchup?: string;
10394
+ };
10395
+ Returns: import("./types").Json;
10396
+ };
9296
10397
  email_auth_decrypt: {
9297
10398
  Args: {
9298
10399
  cipher: string;
@@ -9328,6 +10429,18 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
9328
10429
  status: string;
9329
10430
  }[];
9330
10431
  };
10432
+ enqueue_cart_replan_if_unlocked: {
10433
+ Args: {
10434
+ p_order_id: string;
10435
+ };
10436
+ Returns: undefined;
10437
+ };
10438
+ ensure_trade_item_stock_row: {
10439
+ Args: {
10440
+ p_key: string;
10441
+ };
10442
+ Returns: undefined;
10443
+ };
9331
10444
  ensure_user_tenant: {
9332
10445
  Args: never;
9333
10446
  Returns: string;
@@ -9365,6 +10478,31 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
9365
10478
  };
9366
10479
  Returns: boolean;
9367
10480
  };
10481
+ find_trade_item_key: {
10482
+ Args: {
10483
+ p_barcode: string;
10484
+ p_name: string;
10485
+ p_product_id: string;
10486
+ };
10487
+ Returns: string;
10488
+ };
10489
+ floriday_effective_price: {
10490
+ Args: {
10491
+ _buyer_id: string;
10492
+ _on_date?: string;
10493
+ _quantity?: number;
10494
+ _trade_item_id: string;
10495
+ };
10496
+ Returns: {
10497
+ base_price: number;
10498
+ currency: string;
10499
+ discount_type: string;
10500
+ discount_value: number;
10501
+ net_price: number;
10502
+ source: string;
10503
+ source_id: string;
10504
+ }[];
10505
+ };
9368
10506
  format_cart_number: {
9369
10507
  Args: {
9370
10508
  p_pick_date: string;
@@ -9385,6 +10523,13 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
9385
10523
  preferred_warehouse_name: string;
9386
10524
  }[];
9387
10525
  };
10526
+ get_active_floriday_context: {
10527
+ Args: never;
10528
+ Returns: {
10529
+ connection_id: string;
10530
+ user_id: string;
10531
+ }[];
10532
+ };
9388
10533
  get_active_twinfield_public: {
9389
10534
  Args: never;
9390
10535
  Returns: {
@@ -9396,6 +10541,13 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
9396
10541
  office_code: string;
9397
10542
  }[];
9398
10543
  };
10544
+ get_floricode_record_counts: {
10545
+ Args: never;
10546
+ Returns: {
10547
+ count: number;
10548
+ resource: string;
10549
+ }[];
10550
+ };
9399
10551
  get_floriday_agreements_active: {
9400
10552
  Args: {
9401
10553
  p_on_date?: string;
@@ -9487,6 +10639,24 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
9487
10639
  };
9488
10640
  Returns: import("./types").Json;
9489
10641
  };
10642
+ get_offer_delivery_options: {
10643
+ Args: {
10644
+ p_code: string;
10645
+ };
10646
+ Returns: import("./types").Json;
10647
+ };
10648
+ get_offer_recipient_by_code: {
10649
+ Args: {
10650
+ p_code: string;
10651
+ };
10652
+ Returns: {
10653
+ campaign_id: string;
10654
+ clicked_at: string;
10655
+ customer_id: string;
10656
+ id: string;
10657
+ ordered_at: string;
10658
+ }[];
10659
+ };
9490
10660
  get_or_assign_floriday_order_number: {
9491
10661
  Args: {
9492
10662
  p_floriday_id: string;
@@ -9539,12 +10709,53 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
9539
10709
  Args: never;
9540
10710
  Returns: boolean;
9541
10711
  };
10712
+ is_superadmin: {
10713
+ Args: {
10714
+ _user_id: string;
10715
+ };
10716
+ Returns: boolean;
10717
+ };
10718
+ local_effective_price: {
10719
+ Args: {
10720
+ _customer_id: string;
10721
+ _on_date?: string;
10722
+ _product_id: string;
10723
+ _quantity?: number;
10724
+ };
10725
+ Returns: {
10726
+ currency: string;
10727
+ discount_type: string;
10728
+ discount_value: number;
10729
+ net_price: number;
10730
+ source: string;
10731
+ source_id: string;
10732
+ }[];
10733
+ };
10734
+ mark_offer_clicked: {
10735
+ Args: {
10736
+ p_code: string;
10737
+ };
10738
+ Returns: undefined;
10739
+ };
10740
+ mark_offer_ordered: {
10741
+ Args: {
10742
+ p_code: string;
10743
+ };
10744
+ Returns: undefined;
10745
+ };
9542
10746
  next_order_number: {
9543
10747
  Args: {
9544
10748
  p_prefix: string;
9545
10749
  };
9546
10750
  Returns: string;
9547
10751
  };
10752
+ next_order_number_for_date: {
10753
+ Args: {
10754
+ p_created_at?: string;
10755
+ p_prefix: string;
10756
+ };
10757
+ Returns: string;
10758
+ };
9548
10759
  next_work_order_number: {
9549
10760
  Args: {
9550
10761
  p_parent_work_order_id?: string;
@@ -9552,16 +10763,41 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
9552
10763
  };
9553
10764
  Returns: string;
9554
10765
  };
10766
+ normalize_order_source: {
10767
+ Args: {
10768
+ p_src: string;
10769
+ };
10770
+ Returns: string;
10771
+ };
9555
10772
  normalize_vat: {
9556
10773
  Args: {
9557
10774
  v: string;
9558
10775
  };
9559
10776
  Returns: string;
9560
10777
  };
10778
+ offer_recipient_matches: {
10779
+ Args: {
10780
+ _campaign_id: string;
10781
+ _customer_id: string;
10782
+ _recipient_id: string;
10783
+ };
10784
+ Returns: boolean;
10785
+ };
10786
+ order_number_prefix: {
10787
+ Args: {
10788
+ p_custom_fields?: import("./types").Json;
10789
+ p_order_source: string;
10790
+ };
10791
+ Returns: string;
10792
+ };
9561
10793
  pickstation_get_orders_raw: {
9562
10794
  Args: never;
9563
10795
  Returns: import("./types").Json;
9564
10796
  };
10797
+ pickstation_get_planning_context: {
10798
+ Args: never;
10799
+ Returns: import("./types").Json;
10800
+ };
9565
10801
  pickstation_get_settings: {
9566
10802
  Args: never;
9567
10803
  Returns: import("./types").Json;
@@ -9585,6 +10821,35 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
9585
10821
  };
9586
10822
  Returns: undefined;
9587
10823
  };
10824
+ promote_trade_item_key: {
10825
+ Args: {
10826
+ p_new: string;
10827
+ p_old: string;
10828
+ };
10829
+ Returns: undefined;
10830
+ };
10831
+ recompute_order_status: {
10832
+ Args: {
10833
+ p_order_id: string;
10834
+ };
10835
+ Returns: undefined;
10836
+ };
10837
+ recompute_reserved_for_order: {
10838
+ Args: {
10839
+ p_order_id: string;
10840
+ };
10841
+ Returns: undefined;
10842
+ };
10843
+ recompute_reserved_stock: {
10844
+ Args: {
10845
+ p_trade_item_key: string;
10846
+ };
10847
+ Returns: undefined;
10848
+ };
10849
+ refresh_external_customers_grouped: {
10850
+ Args: never;
10851
+ Returns: undefined;
10852
+ };
9588
10853
  refresh_floricode_derived_code_lists: {
9589
10854
  Args: never;
9590
10855
  Returns: {
@@ -9599,6 +10864,12 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
9599
10864
  };
9600
10865
  Returns: number;
9601
10866
  };
10867
+ refresh_floricode_derived_for_products: {
10868
+ Args: {
10869
+ _product_ids: string[];
10870
+ };
10871
+ Returns: number;
10872
+ };
9602
10873
  reset_floriday_sync_cursor: {
9603
10874
  Args: {
9604
10875
  p_connection_id: string;
@@ -9606,6 +10877,12 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
9606
10877
  };
9607
10878
  Returns: undefined;
9608
10879
  };
10880
+ resolve_product_id_for_item: {
10881
+ Args: {
10882
+ p_product_name: string;
10883
+ };
10884
+ Returns: string;
10885
+ };
9609
10886
  schedule_floriday_additional_services_sync: {
9610
10887
  Args: {
9611
10888
  p_apikey: string;
@@ -9883,6 +11160,24 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
9883
11160
  };
9884
11161
  Returns: string[];
9885
11162
  };
11163
+ sync_cached_packing_from_product: {
11164
+ Args: {
11165
+ p_product_id: string;
11166
+ };
11167
+ Returns: undefined;
11168
+ };
11169
+ sync_order_cart_item_packing_from_product: {
11170
+ Args: {
11171
+ p_product_id: string;
11172
+ };
11173
+ Returns: undefined;
11174
+ };
11175
+ sync_product_packing_from_floriday_cache: {
11176
+ Args: {
11177
+ p_floriday_id: string;
11178
+ };
11179
+ Returns: undefined;
11180
+ };
9886
11181
  twinfield_decrypt: {
9887
11182
  Args: {
9888
11183
  cipher: string;