@flowselections/mailbox-orders 1.0.7 → 1.0.8

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.
@@ -4,7 +4,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4
4
  Tables: {
5
5
  afhandeling_settings: {
6
6
  Row: {
7
+ auto_print_delivery_note: boolean;
8
+ auto_process_paused: boolean;
7
9
  created_at: string;
10
+ extra_pick_days_with_stickers: number;
8
11
  id: string;
9
12
  max_workdays_earlier_pick: number;
10
13
  pick_days_before_transport: number;
@@ -18,7 +21,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
18
21
  user_id: string;
19
22
  };
20
23
  Insert: {
24
+ auto_print_delivery_note?: boolean;
25
+ auto_process_paused?: boolean;
21
26
  created_at?: string;
27
+ extra_pick_days_with_stickers?: number;
22
28
  id?: string;
23
29
  max_workdays_earlier_pick?: number;
24
30
  pick_days_before_transport?: number;
@@ -32,7 +38,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
32
38
  user_id: string;
33
39
  };
34
40
  Update: {
41
+ auto_print_delivery_note?: boolean;
42
+ auto_process_paused?: boolean;
35
43
  created_at?: string;
44
+ extra_pick_days_with_stickers?: number;
36
45
  id?: string;
37
46
  max_workdays_earlier_pick?: number;
38
47
  pick_days_before_transport?: number;
@@ -824,6 +833,36 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
824
833
  };
825
834
  Relationships: [];
826
835
  };
836
+ cart_replan_queue: {
837
+ Row: {
838
+ attempts: number;
839
+ last_error: string | null;
840
+ order_id: string;
841
+ processed_at: string | null;
842
+ requested_at: string;
843
+ };
844
+ Insert: {
845
+ attempts?: number;
846
+ last_error?: string | null;
847
+ order_id: string;
848
+ processed_at?: string | null;
849
+ requested_at?: string;
850
+ };
851
+ Update: {
852
+ attempts?: number;
853
+ last_error?: string | null;
854
+ order_id?: string;
855
+ processed_at?: string | null;
856
+ requested_at?: string;
857
+ };
858
+ Relationships: [{
859
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
860
+ columns: ["order_id"];
861
+ isOneToOne: true;
862
+ referencedRelation: "orders";
863
+ referencedColumns: ["id"];
864
+ }];
865
+ };
827
866
  collections: {
828
867
  Row: {
829
868
  created_at: string;
@@ -2949,34 +2988,52 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2949
2988
  Row: {
2950
2989
  catalog_key: string | null;
2951
2990
  catalog_url: string;
2991
+ client_id: string | null;
2992
+ client_secret_ciphertext: string | null;
2993
+ client_secret_last4: string | null;
2952
2994
  created_at: string;
2953
2995
  id: number;
2954
2996
  last_meta: import("./types").Json | null;
2955
2997
  last_test_at: string | null;
2956
2998
  last_test_error: string | null;
2957
2999
  last_test_ok: boolean | null;
3000
+ last_token_test_at: string | null;
3001
+ last_token_test_error: string | null;
3002
+ last_token_test_ok: boolean | null;
2958
3003
  updated_at: string;
2959
3004
  };
2960
3005
  Insert: {
2961
3006
  catalog_key?: string | null;
2962
3007
  catalog_url?: string;
3008
+ client_id?: string | null;
3009
+ client_secret_ciphertext?: string | null;
3010
+ client_secret_last4?: string | null;
2963
3011
  created_at?: string;
2964
3012
  id?: number;
2965
3013
  last_meta?: import("./types").Json | null;
2966
3014
  last_test_at?: string | null;
2967
3015
  last_test_error?: string | null;
2968
3016
  last_test_ok?: boolean | null;
3017
+ last_token_test_at?: string | null;
3018
+ last_token_test_error?: string | null;
3019
+ last_token_test_ok?: boolean | null;
2969
3020
  updated_at?: string;
2970
3021
  };
2971
3022
  Update: {
2972
3023
  catalog_key?: string | null;
2973
3024
  catalog_url?: string;
3025
+ client_id?: string | null;
3026
+ client_secret_ciphertext?: string | null;
3027
+ client_secret_last4?: string | null;
2974
3028
  created_at?: string;
2975
3029
  id?: number;
2976
3030
  last_meta?: import("./types").Json | null;
2977
3031
  last_test_at?: string | null;
2978
3032
  last_test_error?: string | null;
2979
3033
  last_test_ok?: boolean | null;
3034
+ last_token_test_at?: string | null;
3035
+ last_token_test_error?: string | null;
3036
+ last_token_test_ok?: boolean | null;
2980
3037
  updated_at?: string;
2981
3038
  };
2982
3039
  Relationships: [];
@@ -3209,6 +3266,54 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
3209
3266
  referencedColumns: ["id"];
3210
3267
  }];
3211
3268
  };
3269
+ floriday_auto_fulfillment_log: {
3270
+ Row: {
3271
+ attempts: number;
3272
+ connection_id: string;
3273
+ created_at: string;
3274
+ error: string | null;
3275
+ fulfillment_order_id: string | null;
3276
+ id: string;
3277
+ last_attempt_at: string | null;
3278
+ reason: string | null;
3279
+ sales_order_id: string;
3280
+ status: string;
3281
+ updated_at: string;
3282
+ };
3283
+ Insert: {
3284
+ attempts?: number;
3285
+ connection_id: string;
3286
+ created_at?: string;
3287
+ error?: string | null;
3288
+ fulfillment_order_id?: string | null;
3289
+ id?: string;
3290
+ last_attempt_at?: string | null;
3291
+ reason?: string | null;
3292
+ sales_order_id: string;
3293
+ status?: string;
3294
+ updated_at?: string;
3295
+ };
3296
+ Update: {
3297
+ attempts?: number;
3298
+ connection_id?: string;
3299
+ created_at?: string;
3300
+ error?: string | null;
3301
+ fulfillment_order_id?: string | null;
3302
+ id?: string;
3303
+ last_attempt_at?: string | null;
3304
+ reason?: string | null;
3305
+ sales_order_id?: string;
3306
+ status?: string;
3307
+ updated_at?: string;
3308
+ };
3309
+ Relationships: [{
3310
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
3311
+ columns: ["connection_id"];
3312
+ isOneToOne: false;
3313
+ referencedRelation: "floriday_connections";
3314
+ referencedColumns: ["id"];
3315
+ }];
3316
+ };
3212
3317
  floriday_base_items_cache: {
3213
3318
  Row: {
3214
3319
  connection_id: string;
@@ -3623,6 +3728,51 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
3623
3728
  referencedColumns: ["id"];
3624
3729
  }];
3625
3730
  };
3731
+ floriday_continuous_stock_queue: {
3732
+ Row: {
3733
+ attempts: number;
3734
+ connection_id: string;
3735
+ created_at: string;
3736
+ gateway_attempt_id: string | null;
3737
+ id: string;
3738
+ last_error: string | null;
3739
+ number_of_pieces: number;
3740
+ sent_at: string | null;
3741
+ status: string;
3742
+ trade_item_id: string;
3743
+ updated_at: string;
3744
+ user_id: string;
3745
+ };
3746
+ Insert: {
3747
+ attempts?: number;
3748
+ connection_id: string;
3749
+ created_at?: string;
3750
+ gateway_attempt_id?: string | null;
3751
+ id?: string;
3752
+ last_error?: string | null;
3753
+ number_of_pieces?: number;
3754
+ sent_at?: string | null;
3755
+ status?: string;
3756
+ trade_item_id: string;
3757
+ updated_at?: string;
3758
+ user_id: string;
3759
+ };
3760
+ Update: {
3761
+ attempts?: number;
3762
+ connection_id?: string;
3763
+ created_at?: string;
3764
+ gateway_attempt_id?: string | null;
3765
+ id?: string;
3766
+ last_error?: string | null;
3767
+ number_of_pieces?: number;
3768
+ sent_at?: string | null;
3769
+ status?: string;
3770
+ trade_item_id?: string;
3771
+ updated_at?: string;
3772
+ user_id?: string;
3773
+ };
3774
+ Relationships: [];
3775
+ };
3626
3776
  floriday_contract_trade_item_groups_cache: {
3627
3777
  Row: {
3628
3778
  connection_id: string;
@@ -4268,6 +4418,24 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4268
4418
  referencedColumns: ["id"];
4269
4419
  }];
4270
4420
  };
4421
+ floriday_rate_limit_state: {
4422
+ Row: {
4423
+ bucket: string;
4424
+ last_refill_at: string;
4425
+ tokens: number;
4426
+ };
4427
+ Insert: {
4428
+ bucket: string;
4429
+ last_refill_at?: string;
4430
+ tokens: number;
4431
+ };
4432
+ Update: {
4433
+ bucket?: string;
4434
+ last_refill_at?: string;
4435
+ tokens?: number;
4436
+ };
4437
+ Relationships: [];
4438
+ };
4271
4439
  floriday_resource_schemas: {
4272
4440
  Row: {
4273
4441
  enums: import("./types").Json;
@@ -4691,6 +4859,60 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4691
4859
  referencedColumns: ["id"];
4692
4860
  }];
4693
4861
  };
4862
+ flow_role_assignments: {
4863
+ Row: {
4864
+ created_at: string;
4865
+ id: string;
4866
+ role_id: string;
4867
+ user_id: string;
4868
+ };
4869
+ Insert: {
4870
+ created_at?: string;
4871
+ id?: string;
4872
+ role_id: string;
4873
+ user_id: string;
4874
+ };
4875
+ Update: {
4876
+ created_at?: string;
4877
+ id?: string;
4878
+ role_id?: string;
4879
+ user_id?: string;
4880
+ };
4881
+ Relationships: [{
4882
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
4883
+ columns: ["role_id"];
4884
+ isOneToOne: false;
4885
+ referencedRelation: "flow_roles";
4886
+ referencedColumns: ["id"];
4887
+ }];
4888
+ };
4889
+ flow_roles: {
4890
+ Row: {
4891
+ created_at: string;
4892
+ description: string | null;
4893
+ id: string;
4894
+ module_access: string[];
4895
+ name: string;
4896
+ updated_at: string;
4897
+ };
4898
+ Insert: {
4899
+ created_at?: string;
4900
+ description?: string | null;
4901
+ id?: string;
4902
+ module_access?: string[];
4903
+ name: string;
4904
+ updated_at?: string;
4905
+ };
4906
+ Update: {
4907
+ created_at?: string;
4908
+ description?: string | null;
4909
+ id?: string;
4910
+ module_access?: string[];
4911
+ name?: string;
4912
+ updated_at?: string;
4913
+ };
4914
+ Relationships: [];
4915
+ };
4694
4916
  imap_accounts: {
4695
4917
  Row: {
4696
4918
  created_at: string;
@@ -5012,88 +5234,286 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5012
5234
  };
5013
5235
  Relationships: [];
5014
5236
  };
5015
- locations: {
5237
+ local_customer_agreements: {
5016
5238
  Row: {
5239
+ base_price: number | null;
5017
5240
  created_at: string;
5241
+ currency: string;
5242
+ customer_id: string;
5018
5243
  id: string;
5019
- name: string;
5020
- sort_order: number;
5244
+ min_quantity: number;
5245
+ net_price: number;
5246
+ notes: string | null;
5247
+ product_category_id: string | null;
5248
+ product_id: string | null;
5021
5249
  updated_at: string;
5250
+ valid_from: string | null;
5251
+ valid_until: string | null;
5022
5252
  };
5023
5253
  Insert: {
5254
+ base_price?: number | null;
5024
5255
  created_at?: string;
5256
+ currency?: string;
5257
+ customer_id: string;
5025
5258
  id?: string;
5026
- name: string;
5027
- sort_order?: number;
5259
+ min_quantity?: number;
5260
+ net_price: number;
5261
+ notes?: string | null;
5262
+ product_category_id?: string | null;
5263
+ product_id?: string | null;
5028
5264
  updated_at?: string;
5265
+ valid_from?: string | null;
5266
+ valid_until?: string | null;
5029
5267
  };
5030
5268
  Update: {
5269
+ base_price?: number | null;
5031
5270
  created_at?: string;
5271
+ currency?: string;
5272
+ customer_id?: string;
5032
5273
  id?: string;
5033
- name?: string;
5034
- sort_order?: number;
5274
+ min_quantity?: number;
5275
+ net_price?: number;
5276
+ notes?: string | null;
5277
+ product_category_id?: string | null;
5278
+ product_id?: string | null;
5035
5279
  updated_at?: string;
5280
+ valid_from?: string | null;
5281
+ valid_until?: string | null;
5036
5282
  };
5037
- Relationships: [];
5283
+ Relationships: [{
5284
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
5285
+ columns: ["customer_id"];
5286
+ isOneToOne: false;
5287
+ referencedRelation: "customers";
5288
+ referencedColumns: ["id"];
5289
+ }, {
5290
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
5291
+ columns: ["product_category_id"];
5292
+ isOneToOne: false;
5293
+ referencedRelation: "product_categories";
5294
+ referencedColumns: ["id"];
5295
+ }, {
5296
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
5297
+ columns: ["product_id"];
5298
+ isOneToOne: false;
5299
+ referencedRelation: "products";
5300
+ referencedColumns: ["id"];
5301
+ }];
5038
5302
  };
5039
- mailbox_messages: {
5303
+ local_customer_price_groups: {
5040
5304
  Row: {
5041
- body_html: string | null;
5042
- body_text: string | null;
5043
- connection_id: string | null;
5044
5305
  created_at: string;
5045
- error_message: string | null;
5046
- external_id: string | null;
5047
- from_email: string | null;
5048
- from_name: string | null;
5306
+ currency: string;
5307
+ customer_id: string;
5308
+ discount_type: string;
5309
+ discount_value: number;
5049
5310
  id: string;
5050
- message_id: string | null;
5051
- profile_id: string | null;
5052
- raw_size: number | null;
5053
- received_at: string | null;
5054
- status: string;
5055
- subject: string | null;
5056
- uid: number | null;
5311
+ min_quantity: number;
5312
+ notes: string | null;
5313
+ product_category_id: string | null;
5314
+ product_id: string | null;
5057
5315
  updated_at: string;
5316
+ valid_from: string | null;
5317
+ valid_until: string | null;
5058
5318
  };
5059
5319
  Insert: {
5060
- body_html?: string | null;
5061
- body_text?: string | null;
5062
- connection_id?: string | null;
5063
5320
  created_at?: string;
5064
- error_message?: string | null;
5065
- external_id?: string | null;
5066
- from_email?: string | null;
5067
- from_name?: string | null;
5321
+ currency?: string;
5322
+ customer_id: string;
5323
+ discount_type: string;
5324
+ discount_value: number;
5068
5325
  id?: string;
5069
- message_id?: string | null;
5070
- profile_id?: string | null;
5071
- raw_size?: number | null;
5072
- received_at?: string | null;
5073
- status?: string;
5074
- subject?: string | null;
5075
- uid?: number | null;
5326
+ min_quantity?: number;
5327
+ notes?: string | null;
5328
+ product_category_id?: string | null;
5329
+ product_id?: string | null;
5076
5330
  updated_at?: string;
5331
+ valid_from?: string | null;
5332
+ valid_until?: string | null;
5077
5333
  };
5078
5334
  Update: {
5079
- body_html?: string | null;
5080
- body_text?: string | null;
5081
- connection_id?: string | null;
5082
5335
  created_at?: string;
5083
- error_message?: string | null;
5084
- external_id?: string | null;
5085
- from_email?: string | null;
5086
- from_name?: string | null;
5336
+ currency?: string;
5337
+ customer_id?: string;
5338
+ discount_type?: string;
5339
+ discount_value?: number;
5087
5340
  id?: string;
5088
- message_id?: string | null;
5089
- profile_id?: string | null;
5090
- raw_size?: number | null;
5091
- received_at?: string | null;
5092
- status?: string;
5093
- subject?: string | null;
5094
- uid?: number | null;
5341
+ min_quantity?: number;
5342
+ notes?: string | null;
5343
+ product_category_id?: string | null;
5344
+ product_id?: string | null;
5095
5345
  updated_at?: string;
5096
- };
5346
+ valid_from?: string | null;
5347
+ valid_until?: string | null;
5348
+ };
5349
+ Relationships: [{
5350
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
5351
+ columns: ["customer_id"];
5352
+ isOneToOne: false;
5353
+ referencedRelation: "customers";
5354
+ referencedColumns: ["id"];
5355
+ }, {
5356
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
5357
+ columns: ["product_category_id"];
5358
+ isOneToOne: false;
5359
+ referencedRelation: "product_categories";
5360
+ referencedColumns: ["id"];
5361
+ }, {
5362
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
5363
+ columns: ["product_id"];
5364
+ isOneToOne: false;
5365
+ referencedRelation: "products";
5366
+ referencedColumns: ["id"];
5367
+ }];
5368
+ };
5369
+ local_customer_sales_strategies: {
5370
+ Row: {
5371
+ created_at: string;
5372
+ currency: string;
5373
+ customer_id: string;
5374
+ discount_type: string;
5375
+ discount_value: number;
5376
+ id: string;
5377
+ min_quantity: number;
5378
+ notes: string | null;
5379
+ product_category_id: string | null;
5380
+ product_id: string | null;
5381
+ updated_at: string;
5382
+ valid_from: string | null;
5383
+ valid_until: string | null;
5384
+ };
5385
+ Insert: {
5386
+ created_at?: string;
5387
+ currency?: string;
5388
+ customer_id: string;
5389
+ discount_type: string;
5390
+ discount_value: number;
5391
+ id?: string;
5392
+ min_quantity?: number;
5393
+ notes?: string | null;
5394
+ product_category_id?: string | null;
5395
+ product_id?: string | null;
5396
+ updated_at?: string;
5397
+ valid_from?: string | null;
5398
+ valid_until?: string | null;
5399
+ };
5400
+ Update: {
5401
+ created_at?: string;
5402
+ currency?: string;
5403
+ customer_id?: string;
5404
+ discount_type?: string;
5405
+ discount_value?: number;
5406
+ id?: string;
5407
+ min_quantity?: number;
5408
+ notes?: string | null;
5409
+ product_category_id?: string | null;
5410
+ product_id?: string | null;
5411
+ updated_at?: string;
5412
+ valid_from?: string | null;
5413
+ valid_until?: string | null;
5414
+ };
5415
+ Relationships: [{
5416
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
5417
+ columns: ["customer_id"];
5418
+ isOneToOne: false;
5419
+ referencedRelation: "customers";
5420
+ referencedColumns: ["id"];
5421
+ }, {
5422
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
5423
+ columns: ["product_category_id"];
5424
+ isOneToOne: false;
5425
+ referencedRelation: "product_categories";
5426
+ referencedColumns: ["id"];
5427
+ }, {
5428
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
5429
+ columns: ["product_id"];
5430
+ isOneToOne: false;
5431
+ referencedRelation: "products";
5432
+ referencedColumns: ["id"];
5433
+ }];
5434
+ };
5435
+ locations: {
5436
+ Row: {
5437
+ created_at: string;
5438
+ id: string;
5439
+ name: string;
5440
+ sort_order: number;
5441
+ updated_at: string;
5442
+ };
5443
+ Insert: {
5444
+ created_at?: string;
5445
+ id?: string;
5446
+ name: string;
5447
+ sort_order?: number;
5448
+ updated_at?: string;
5449
+ };
5450
+ Update: {
5451
+ created_at?: string;
5452
+ id?: string;
5453
+ name?: string;
5454
+ sort_order?: number;
5455
+ updated_at?: string;
5456
+ };
5457
+ Relationships: [];
5458
+ };
5459
+ mailbox_messages: {
5460
+ Row: {
5461
+ body_html: string | null;
5462
+ body_text: string | null;
5463
+ connection_id: string | null;
5464
+ created_at: string;
5465
+ error_message: string | null;
5466
+ external_id: string | null;
5467
+ from_email: string | null;
5468
+ from_name: string | null;
5469
+ id: string;
5470
+ message_id: string | null;
5471
+ profile_id: string | null;
5472
+ raw_size: number | null;
5473
+ received_at: string | null;
5474
+ status: string;
5475
+ subject: string | null;
5476
+ uid: number | null;
5477
+ updated_at: string;
5478
+ };
5479
+ Insert: {
5480
+ body_html?: string | null;
5481
+ body_text?: string | null;
5482
+ connection_id?: string | null;
5483
+ created_at?: string;
5484
+ error_message?: string | null;
5485
+ external_id?: string | null;
5486
+ from_email?: string | null;
5487
+ from_name?: string | null;
5488
+ id?: string;
5489
+ message_id?: string | null;
5490
+ profile_id?: string | null;
5491
+ raw_size?: number | null;
5492
+ received_at?: string | null;
5493
+ status?: string;
5494
+ subject?: string | null;
5495
+ uid?: number | null;
5496
+ updated_at?: string;
5497
+ };
5498
+ Update: {
5499
+ body_html?: string | null;
5500
+ body_text?: string | null;
5501
+ connection_id?: string | null;
5502
+ created_at?: string;
5503
+ error_message?: string | null;
5504
+ external_id?: string | null;
5505
+ from_email?: string | null;
5506
+ from_name?: string | null;
5507
+ id?: string;
5508
+ message_id?: string | null;
5509
+ profile_id?: string | null;
5510
+ raw_size?: number | null;
5511
+ received_at?: string | null;
5512
+ status?: string;
5513
+ subject?: string | null;
5514
+ uid?: number | null;
5515
+ updated_at?: string;
5516
+ };
5097
5517
  Relationships: [{
5098
5518
  foreignKeyName: "mailbox_messages_connection_id_fkey";
5099
5519
  columns: ["connection_id"];
@@ -5124,6 +5544,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5124
5544
  matched_customer_id: string | null;
5125
5545
  message_id: string;
5126
5546
  notes: string | null;
5547
+ order_number: string | null;
5127
5548
  parsed_payload: import("./types").Json | null;
5128
5549
  reviewed_at: string | null;
5129
5550
  reviewed_by: string | null;
@@ -5139,6 +5560,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5139
5560
  matched_customer_id?: string | null;
5140
5561
  message_id: string;
5141
5562
  notes?: string | null;
5563
+ order_number?: string | null;
5142
5564
  parsed_payload?: import("./types").Json | null;
5143
5565
  reviewed_at?: string | null;
5144
5566
  reviewed_by?: string | null;
@@ -5154,6 +5576,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5154
5576
  matched_customer_id?: string | null;
5155
5577
  message_id?: string;
5156
5578
  notes?: string | null;
5579
+ order_number?: string | null;
5157
5580
  parsed_payload?: import("./types").Json | null;
5158
5581
  reviewed_at?: string | null;
5159
5582
  reviewed_by?: string | null;
@@ -5519,6 +5942,273 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5519
5942
  referencedColumns: ["id"];
5520
5943
  }];
5521
5944
  };
5945
+ nmbrs_component_mapping: {
5946
+ Row: {
5947
+ created_at: string;
5948
+ id: string;
5949
+ source_kind: string;
5950
+ source_value: string | null;
5951
+ updated_at: string;
5952
+ wage_code: string;
5953
+ };
5954
+ Insert: {
5955
+ created_at?: string;
5956
+ id?: string;
5957
+ source_kind: string;
5958
+ source_value?: string | null;
5959
+ updated_at?: string;
5960
+ wage_code: string;
5961
+ };
5962
+ Update: {
5963
+ created_at?: string;
5964
+ id?: string;
5965
+ source_kind?: string;
5966
+ source_value?: string | null;
5967
+ updated_at?: string;
5968
+ wage_code?: string;
5969
+ };
5970
+ Relationships: [{
5971
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
5972
+ columns: ["wage_code"];
5973
+ isOneToOne: false;
5974
+ referencedRelation: "nmbrs_wage_components";
5975
+ referencedColumns: ["code"];
5976
+ }];
5977
+ };
5978
+ nmbrs_employee_mapping: {
5979
+ Row: {
5980
+ active_from: string | null;
5981
+ active_to: string | null;
5982
+ contract_hours_per_week: number | null;
5983
+ created_at: string;
5984
+ hourly_wage: number | null;
5985
+ id: string;
5986
+ monteur_id: string;
5987
+ nmbrs_company_code: string | null;
5988
+ nmbrs_employee_number: string;
5989
+ updated_at: string;
5990
+ };
5991
+ Insert: {
5992
+ active_from?: string | null;
5993
+ active_to?: string | null;
5994
+ contract_hours_per_week?: number | null;
5995
+ created_at?: string;
5996
+ hourly_wage?: number | null;
5997
+ id?: string;
5998
+ monteur_id: string;
5999
+ nmbrs_company_code?: string | null;
6000
+ nmbrs_employee_number: string;
6001
+ updated_at?: string;
6002
+ };
6003
+ Update: {
6004
+ active_from?: string | null;
6005
+ active_to?: string | null;
6006
+ contract_hours_per_week?: number | null;
6007
+ created_at?: string;
6008
+ hourly_wage?: number | null;
6009
+ id?: string;
6010
+ monteur_id?: string;
6011
+ nmbrs_company_code?: string | null;
6012
+ nmbrs_employee_number?: string;
6013
+ updated_at?: string;
6014
+ };
6015
+ Relationships: [{
6016
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
6017
+ columns: ["monteur_id"];
6018
+ isOneToOne: true;
6019
+ referencedRelation: "monteurs";
6020
+ referencedColumns: ["id"];
6021
+ }];
6022
+ };
6023
+ nmbrs_export_lines: {
6024
+ Row: {
6025
+ amount: number;
6026
+ created_at: string;
6027
+ entry_date: string;
6028
+ hours: number;
6029
+ id: string;
6030
+ monteur_id: string;
6031
+ nmbrs_employee_number: string | null;
6032
+ notes: string | null;
6033
+ run_id: string;
6034
+ source_kind: string | null;
6035
+ source_ref_id: string | null;
6036
+ updated_at: string;
6037
+ wage_code: string;
6038
+ };
6039
+ Insert: {
6040
+ amount?: number;
6041
+ created_at?: string;
6042
+ entry_date: string;
6043
+ hours?: number;
6044
+ id?: string;
6045
+ monteur_id: string;
6046
+ nmbrs_employee_number?: string | null;
6047
+ notes?: string | null;
6048
+ run_id: string;
6049
+ source_kind?: string | null;
6050
+ source_ref_id?: string | null;
6051
+ updated_at?: string;
6052
+ wage_code: string;
6053
+ };
6054
+ Update: {
6055
+ amount?: number;
6056
+ created_at?: string;
6057
+ entry_date?: string;
6058
+ hours?: number;
6059
+ id?: string;
6060
+ monteur_id?: string;
6061
+ nmbrs_employee_number?: string | null;
6062
+ notes?: string | null;
6063
+ run_id?: string;
6064
+ source_kind?: string | null;
6065
+ source_ref_id?: string | null;
6066
+ updated_at?: string;
6067
+ wage_code?: string;
6068
+ };
6069
+ Relationships: [{
6070
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
6071
+ columns: ["monteur_id"];
6072
+ isOneToOne: false;
6073
+ referencedRelation: "monteurs";
6074
+ referencedColumns: ["id"];
6075
+ }, {
6076
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
6077
+ columns: ["run_id"];
6078
+ isOneToOne: false;
6079
+ referencedRelation: "nmbrs_export_runs";
6080
+ referencedColumns: ["id"];
6081
+ }, {
6082
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
6083
+ columns: ["wage_code"];
6084
+ isOneToOne: false;
6085
+ referencedRelation: "nmbrs_wage_components";
6086
+ referencedColumns: ["code"];
6087
+ }];
6088
+ };
6089
+ nmbrs_export_runs: {
6090
+ Row: {
6091
+ created_at: string;
6092
+ file_name: string | null;
6093
+ generated_at: string;
6094
+ generated_by: string | null;
6095
+ id: string;
6096
+ notes: string | null;
6097
+ period_end: string;
6098
+ period_label: string;
6099
+ period_start: string;
6100
+ status: string;
6101
+ total_hours: number;
6102
+ total_lines: number;
6103
+ updated_at: string;
6104
+ };
6105
+ Insert: {
6106
+ created_at?: string;
6107
+ file_name?: string | null;
6108
+ generated_at?: string;
6109
+ generated_by?: string | null;
6110
+ id?: string;
6111
+ notes?: string | null;
6112
+ period_end: string;
6113
+ period_label: string;
6114
+ period_start: string;
6115
+ status?: string;
6116
+ total_hours?: number;
6117
+ total_lines?: number;
6118
+ updated_at?: string;
6119
+ };
6120
+ Update: {
6121
+ created_at?: string;
6122
+ file_name?: string | null;
6123
+ generated_at?: string;
6124
+ generated_by?: string | null;
6125
+ id?: string;
6126
+ notes?: string | null;
6127
+ period_end?: string;
6128
+ period_label?: string;
6129
+ period_start?: string;
6130
+ status?: string;
6131
+ total_hours?: number;
6132
+ total_lines?: number;
6133
+ updated_at?: string;
6134
+ };
6135
+ Relationships: [];
6136
+ };
6137
+ nmbrs_settings: {
6138
+ Row: {
6139
+ created_at: string;
6140
+ default_company_code: string | null;
6141
+ id: boolean;
6142
+ include_travel: boolean;
6143
+ overtime_threshold_daily: number;
6144
+ overtime_threshold_weekly: number;
6145
+ period_type: string;
6146
+ updated_at: string;
6147
+ updated_by: string | null;
6148
+ week_start_day: number;
6149
+ };
6150
+ Insert: {
6151
+ created_at?: string;
6152
+ default_company_code?: string | null;
6153
+ id?: boolean;
6154
+ include_travel?: boolean;
6155
+ overtime_threshold_daily?: number;
6156
+ overtime_threshold_weekly?: number;
6157
+ period_type?: string;
6158
+ updated_at?: string;
6159
+ updated_by?: string | null;
6160
+ week_start_day?: number;
6161
+ };
6162
+ Update: {
6163
+ created_at?: string;
6164
+ default_company_code?: string | null;
6165
+ id?: boolean;
6166
+ include_travel?: boolean;
6167
+ overtime_threshold_daily?: number;
6168
+ overtime_threshold_weekly?: number;
6169
+ period_type?: string;
6170
+ updated_at?: string;
6171
+ updated_by?: string | null;
6172
+ week_start_day?: number;
6173
+ };
6174
+ Relationships: [];
6175
+ };
6176
+ nmbrs_wage_components: {
6177
+ Row: {
6178
+ category: string;
6179
+ code: string;
6180
+ created_at: string;
6181
+ id: string;
6182
+ is_active: boolean;
6183
+ label: string;
6184
+ sort_order: number;
6185
+ unit: string;
6186
+ updated_at: string;
6187
+ };
6188
+ Insert: {
6189
+ category: string;
6190
+ code: string;
6191
+ created_at?: string;
6192
+ id?: string;
6193
+ is_active?: boolean;
6194
+ label: string;
6195
+ sort_order?: number;
6196
+ unit: string;
6197
+ updated_at?: string;
6198
+ };
6199
+ Update: {
6200
+ category?: string;
6201
+ code?: string;
6202
+ created_at?: string;
6203
+ id?: string;
6204
+ is_active?: boolean;
6205
+ label?: string;
6206
+ sort_order?: number;
6207
+ unit?: string;
6208
+ updated_at?: string;
6209
+ };
6210
+ Relationships: [];
6211
+ };
5522
6212
  notifications: {
5523
6213
  Row: {
5524
6214
  created_at: string;
@@ -5743,6 +6433,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5743
6433
  id: string;
5744
6434
  items: import("./types").Json;
5745
6435
  notes: string | null;
6436
+ order_number: string | null;
5746
6437
  recipient_id: string;
5747
6438
  total_amount: number;
5748
6439
  };
@@ -5756,6 +6447,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5756
6447
  id?: string;
5757
6448
  items?: import("./types").Json;
5758
6449
  notes?: string | null;
6450
+ order_number?: string | null;
5759
6451
  recipient_id: string;
5760
6452
  total_amount?: number;
5761
6453
  };
@@ -5769,6 +6461,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5769
6461
  id?: string;
5770
6462
  items?: import("./types").Json;
5771
6463
  notes?: string | null;
6464
+ order_number?: string | null;
5772
6465
  recipient_id?: string;
5773
6466
  total_amount?: number;
5774
6467
  };
@@ -5928,6 +6621,9 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5928
6621
  crates_per_layer: number;
5929
6622
  created_at: string;
5930
6623
  id: string;
6624
+ layer_fraction: number;
6625
+ layer_share_pct: number;
6626
+ layers_per_cart: number;
5931
6627
  order_item_id: string | null;
5932
6628
  plants_per_crate: number;
5933
6629
  product_id: string | null;
@@ -5939,6 +6635,9 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5939
6635
  crates_per_layer?: number;
5940
6636
  created_at?: string;
5941
6637
  id?: string;
6638
+ layer_fraction?: number;
6639
+ layer_share_pct?: number;
6640
+ layers_per_cart?: number;
5942
6641
  order_item_id?: string | null;
5943
6642
  plants_per_crate?: number;
5944
6643
  product_id?: string | null;
@@ -5950,6 +6649,9 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5950
6649
  crates_per_layer?: number;
5951
6650
  created_at?: string;
5952
6651
  id?: string;
6652
+ layer_fraction?: number;
6653
+ layer_share_pct?: number;
6654
+ layers_per_cart?: number;
5953
6655
  order_item_id?: string | null;
5954
6656
  plants_per_crate?: number;
5955
6657
  product_id?: string | null;
@@ -5977,33 +6679,45 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5977
6679
  };
5978
6680
  order_carts: {
5979
6681
  Row: {
6682
+ algorithm_version: number;
5980
6683
  cart_number: number;
5981
6684
  created_at: string;
5982
6685
  id: string;
5983
6686
  is_auto: boolean;
5984
6687
  is_complete: boolean;
5985
6688
  notes: string | null;
6689
+ occupancy_pct: number;
5986
6690
  order_id: string;
6691
+ source: string;
6692
+ total_layers_used: number;
5987
6693
  updated_at: string;
5988
6694
  };
5989
6695
  Insert: {
6696
+ algorithm_version?: number;
5990
6697
  cart_number: number;
5991
6698
  created_at?: string;
5992
6699
  id?: string;
5993
6700
  is_auto?: boolean;
5994
6701
  is_complete?: boolean;
5995
6702
  notes?: string | null;
6703
+ occupancy_pct?: number;
5996
6704
  order_id: string;
6705
+ source?: string;
6706
+ total_layers_used?: number;
5997
6707
  updated_at?: string;
5998
6708
  };
5999
6709
  Update: {
6710
+ algorithm_version?: number;
6000
6711
  cart_number?: number;
6001
6712
  created_at?: string;
6002
6713
  id?: string;
6003
6714
  is_auto?: boolean;
6004
6715
  is_complete?: boolean;
6005
6716
  notes?: string | null;
6717
+ occupancy_pct?: number;
6006
6718
  order_id?: string;
6719
+ source?: string;
6720
+ total_layers_used?: number;
6007
6721
  updated_at?: string;
6008
6722
  };
6009
6723
  Relationships: [{
@@ -6156,6 +6870,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6156
6870
  order_date: string;
6157
6871
  order_number: string;
6158
6872
  order_source: string;
6873
+ plan_locked_at: string | null;
6874
+ plan_locked_ref: string | null;
6159
6875
  status: string;
6160
6876
  total: string;
6161
6877
  updated_at: string;
@@ -6172,6 +6888,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6172
6888
  order_date?: string;
6173
6889
  order_number: string;
6174
6890
  order_source?: string;
6891
+ plan_locked_at?: string | null;
6892
+ plan_locked_ref?: string | null;
6175
6893
  status?: string;
6176
6894
  total?: string;
6177
6895
  updated_at?: string;
@@ -6188,6 +6906,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6188
6906
  order_date?: string;
6189
6907
  order_number?: string;
6190
6908
  order_source?: string;
6909
+ plan_locked_at?: string | null;
6910
+ plan_locked_ref?: string | null;
6191
6911
  status?: string;
6192
6912
  total?: string;
6193
6913
  updated_at?: string;
@@ -6560,6 +7280,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6560
7280
  display_name: string | null;
6561
7281
  email: string | null;
6562
7282
  id: string;
7283
+ is_superadmin: boolean;
6563
7284
  notification_preferences: import("./types").Json;
6564
7285
  tenant_id: string | null;
6565
7286
  updated_at: string;
@@ -6569,6 +7290,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6569
7290
  display_name?: string | null;
6570
7291
  email?: string | null;
6571
7292
  id: string;
7293
+ is_superadmin?: boolean;
6572
7294
  notification_preferences?: import("./types").Json;
6573
7295
  tenant_id?: string | null;
6574
7296
  updated_at?: string;
@@ -6578,6 +7300,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6578
7300
  display_name?: string | null;
6579
7301
  email?: string | null;
6580
7302
  id?: string;
7303
+ is_superadmin?: boolean;
6581
7304
  notification_preferences?: import("./types").Json;
6582
7305
  tenant_id?: string | null;
6583
7306
  updated_at?: string;
@@ -7336,34 +8059,94 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7336
8059
  capacity: number;
7337
8060
  color_code: string | null;
7338
8061
  created_at: string;
7339
- description: string | null;
7340
- hourly_rate: number;
8062
+ description: string | null;
8063
+ hourly_rate: number;
8064
+ id: string;
8065
+ image_url: string | null;
8066
+ is_active: boolean;
8067
+ name: string;
8068
+ };
8069
+ Insert: {
8070
+ capacity?: number;
8071
+ color_code?: string | null;
8072
+ created_at?: string;
8073
+ description?: string | null;
8074
+ hourly_rate?: number;
8075
+ id?: string;
8076
+ image_url?: string | null;
8077
+ is_active?: boolean;
8078
+ name: string;
8079
+ };
8080
+ Update: {
8081
+ capacity?: number;
8082
+ color_code?: string | null;
8083
+ created_at?: string;
8084
+ description?: string | null;
8085
+ hourly_rate?: number;
8086
+ id?: string;
8087
+ image_url?: string | null;
8088
+ is_active?: boolean;
8089
+ name?: string;
8090
+ };
8091
+ Relationships: [];
8092
+ };
8093
+ sidebar_config: {
8094
+ Row: {
8095
+ id: string;
8096
+ module_order: string[];
8097
+ updated_at: string;
8098
+ };
8099
+ Insert: {
8100
+ id?: string;
8101
+ module_order?: string[];
8102
+ updated_at?: string;
8103
+ };
8104
+ Update: {
8105
+ id?: string;
8106
+ module_order?: string[];
8107
+ updated_at?: string;
8108
+ };
8109
+ Relationships: [];
8110
+ };
8111
+ stock_import_runs: {
8112
+ Row: {
8113
+ connection_id: string | null;
8114
+ created_at: string;
8115
+ created_rows: number;
8116
+ errors: import("./types").Json;
8117
+ filename: string | null;
7341
8118
  id: string;
7342
- image_url: string | null;
7343
- is_active: boolean;
7344
- name: string;
8119
+ mutations: import("./types").Json;
8120
+ skipped_rows: number;
8121
+ total_rows: number;
8122
+ updated_rows: number;
8123
+ user_id: string;
7345
8124
  };
7346
8125
  Insert: {
7347
- capacity?: number;
7348
- color_code?: string | null;
8126
+ connection_id?: string | null;
7349
8127
  created_at?: string;
7350
- description?: string | null;
7351
- hourly_rate?: number;
8128
+ created_rows?: number;
8129
+ errors?: import("./types").Json;
8130
+ filename?: string | null;
7352
8131
  id?: string;
7353
- image_url?: string | null;
7354
- is_active?: boolean;
7355
- name: string;
8132
+ mutations?: import("./types").Json;
8133
+ skipped_rows?: number;
8134
+ total_rows?: number;
8135
+ updated_rows?: number;
8136
+ user_id: string;
7356
8137
  };
7357
8138
  Update: {
7358
- capacity?: number;
7359
- color_code?: string | null;
8139
+ connection_id?: string | null;
7360
8140
  created_at?: string;
7361
- description?: string | null;
7362
- hourly_rate?: number;
8141
+ created_rows?: number;
8142
+ errors?: import("./types").Json;
8143
+ filename?: string | null;
7363
8144
  id?: string;
7364
- image_url?: string | null;
7365
- is_active?: boolean;
7366
- name?: string;
8145
+ mutations?: import("./types").Json;
8146
+ skipped_rows?: number;
8147
+ total_rows?: number;
8148
+ updated_rows?: number;
8149
+ user_id?: string;
7367
8150
  };
7368
8151
  Relationships: [];
7369
8152
  };
@@ -7383,7 +8166,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7383
8166
  reason: string | null;
7384
8167
  reserved_after: number | null;
7385
8168
  reserved_before: number | null;
7386
- trade_item_key: string;
8169
+ trade_item_key: string | null;
7387
8170
  };
7388
8171
  Insert: {
7389
8172
  connection_id?: string | null;
@@ -7400,7 +8183,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7400
8183
  reason?: string | null;
7401
8184
  reserved_after?: number | null;
7402
8185
  reserved_before?: number | null;
7403
- trade_item_key: string;
8186
+ trade_item_key?: string | null;
7404
8187
  };
7405
8188
  Update: {
7406
8189
  connection_id?: string | null;
@@ -7417,7 +8200,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7417
8200
  reason?: string | null;
7418
8201
  reserved_after?: number | null;
7419
8202
  reserved_before?: number | null;
7420
- trade_item_key?: string;
8203
+ trade_item_key?: string | null;
7421
8204
  };
7422
8205
  Relationships: [];
7423
8206
  };
@@ -7760,6 +8543,114 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7760
8543
  };
7761
8544
  Relationships: [];
7762
8545
  };
8546
+ trade_item_supply_lines: {
8547
+ Row: {
8548
+ available_quantity: number | null;
8549
+ connection_id: string;
8550
+ created_at: string;
8551
+ currency: string | null;
8552
+ endpoint_family: string | null;
8553
+ environment: string | null;
8554
+ id: string;
8555
+ last_error: string | null;
8556
+ last_status: number | null;
8557
+ packing_configuration_id: string | null;
8558
+ period_end: string | null;
8559
+ period_start: string | null;
8560
+ price_per_piece: number | null;
8561
+ sales_unit: string | null;
8562
+ supply_line_id: string | null;
8563
+ supply_type: string;
8564
+ trade_item_id: string;
8565
+ updated_at: string;
8566
+ user_id: string;
8567
+ week: number | null;
8568
+ year: number | null;
8569
+ };
8570
+ Insert: {
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
+ Update: {
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
+ Relationships: [];
8617
+ };
8618
+ trade_item_warehouse_preferences: {
8619
+ Row: {
8620
+ connection_id: string;
8621
+ created_at: string;
8622
+ id: string;
8623
+ trade_item_id: string;
8624
+ updated_at: string;
8625
+ warehouse_id: string;
8626
+ warehouse_name: string | null;
8627
+ };
8628
+ Insert: {
8629
+ connection_id: string;
8630
+ created_at?: string;
8631
+ id?: string;
8632
+ trade_item_id: string;
8633
+ updated_at?: string;
8634
+ warehouse_id: string;
8635
+ warehouse_name?: string | null;
8636
+ };
8637
+ Update: {
8638
+ connection_id?: string;
8639
+ created_at?: string;
8640
+ id?: string;
8641
+ trade_item_id?: string;
8642
+ updated_at?: string;
8643
+ warehouse_id?: string;
8644
+ warehouse_name?: string | null;
8645
+ };
8646
+ Relationships: [{
8647
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
8648
+ columns: ["connection_id"];
8649
+ isOneToOne: false;
8650
+ referencedRelation: "floriday_connections";
8651
+ referencedColumns: ["id"];
8652
+ }];
8653
+ };
7763
8654
  twinfield_connections: {
7764
8655
  Row: {
7765
8656
  access_token: string | null;
@@ -8079,6 +8970,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8079
8970
  default_invoice_type: string;
8080
8971
  default_payment_term_days: number;
8081
8972
  default_vat_code: string;
8973
+ invoice_enabled_ao: boolean;
8974
+ invoice_enabled_fo: boolean;
8975
+ invoice_enabled_ho: boolean;
8976
+ invoice_enabled_mo: boolean;
8082
8977
  updated_at: string;
8083
8978
  user_id: string;
8084
8979
  };
@@ -8088,6 +8983,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8088
8983
  default_invoice_type?: string;
8089
8984
  default_payment_term_days?: number;
8090
8985
  default_vat_code?: string;
8986
+ invoice_enabled_ao?: boolean;
8987
+ invoice_enabled_fo?: boolean;
8988
+ invoice_enabled_ho?: boolean;
8989
+ invoice_enabled_mo?: boolean;
8091
8990
  updated_at?: string;
8092
8991
  user_id: string;
8093
8992
  };
@@ -8097,6 +8996,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8097
8996
  default_invoice_type?: string;
8098
8997
  default_payment_term_days?: number;
8099
8998
  default_vat_code?: string;
8999
+ invoice_enabled_ao?: boolean;
9000
+ invoice_enabled_fo?: boolean;
9001
+ invoice_enabled_ho?: boolean;
9002
+ invoice_enabled_mo?: boolean;
8100
9003
  updated_at?: string;
8101
9004
  user_id?: string;
8102
9005
  };
@@ -8998,6 +9901,44 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8998
9901
  };
8999
9902
  Relationships: [];
9000
9903
  };
9904
+ floriday_customer_discounts: {
9905
+ Row: {
9906
+ base_price: number | null;
9907
+ buyer_organization_id: string | null;
9908
+ currency: string | null;
9909
+ discount_type: string | null;
9910
+ discount_value: number | null;
9911
+ min_quantity: number | null;
9912
+ net_price: number | null;
9913
+ product_group_id: string | null;
9914
+ raw: import("./types").Json | null;
9915
+ source: string | null;
9916
+ source_id: string | null;
9917
+ trade_item_id: string | null;
9918
+ valid_from: string | null;
9919
+ valid_until: string | null;
9920
+ };
9921
+ Relationships: [];
9922
+ };
9923
+ local_customer_discounts: {
9924
+ Row: {
9925
+ base_price: number | null;
9926
+ currency: string | null;
9927
+ customer_id: string | null;
9928
+ discount_type: string | null;
9929
+ discount_value: number | null;
9930
+ min_quantity: number | null;
9931
+ net_price: number | null;
9932
+ product_category_id: string | null;
9933
+ product_id: string | null;
9934
+ product_name: string | null;
9935
+ source: string | null;
9936
+ source_id: string | null;
9937
+ valid_from: string | null;
9938
+ valid_until: string | null;
9939
+ };
9940
+ Relationships: [];
9941
+ };
9001
9942
  manufacture_product_possible_stock_view: {
9002
9943
  Row: {
9003
9944
  component_count: number | null;
@@ -9353,6 +10294,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9353
10294
  order_number: string;
9354
10295
  }[];
9355
10296
  };
10297
+ autolink_product_to_floriday: {
10298
+ Args: {
10299
+ p_product_id: string;
10300
+ };
10301
+ Returns: string;
10302
+ };
9356
10303
  backfill_open_order_reservations: {
9357
10304
  Args: never;
9358
10305
  Returns: {
@@ -9391,6 +10338,18 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9391
10338
  Args: never;
9392
10339
  Returns: number;
9393
10340
  };
10341
+ consume_floriday_rate_limit: {
10342
+ Args: {
10343
+ p_bucket: string;
10344
+ p_capacity: number;
10345
+ p_cost?: number;
10346
+ p_refill_per_sec: number;
10347
+ };
10348
+ Returns: {
10349
+ granted: boolean;
10350
+ wait_ms: number;
10351
+ }[];
10352
+ };
9394
10353
  control_get_todays_carts: {
9395
10354
  Args: never;
9396
10355
  Returns: {
@@ -9471,6 +10430,18 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9471
10430
  status: string;
9472
10431
  }[];
9473
10432
  };
10433
+ enqueue_cart_replan_if_unlocked: {
10434
+ Args: {
10435
+ p_order_id: string;
10436
+ };
10437
+ Returns: undefined;
10438
+ };
10439
+ ensure_trade_item_stock_row: {
10440
+ Args: {
10441
+ p_key: string;
10442
+ };
10443
+ Returns: undefined;
10444
+ };
9474
10445
  ensure_user_tenant: {
9475
10446
  Args: never;
9476
10447
  Returns: string;
@@ -9508,12 +10479,31 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9508
10479
  };
9509
10480
  Returns: boolean;
9510
10481
  };
9511
- find_trade_item_key_by_name: {
10482
+ find_trade_item_key: {
9512
10483
  Args: {
10484
+ p_barcode: string;
9513
10485
  p_name: string;
10486
+ p_product_id: string;
9514
10487
  };
9515
10488
  Returns: string;
9516
10489
  };
10490
+ floriday_effective_price: {
10491
+ Args: {
10492
+ _buyer_id: string;
10493
+ _on_date?: string;
10494
+ _quantity?: number;
10495
+ _trade_item_id: string;
10496
+ };
10497
+ Returns: {
10498
+ base_price: number;
10499
+ currency: string;
10500
+ discount_type: string;
10501
+ discount_value: number;
10502
+ net_price: number;
10503
+ source: string;
10504
+ source_id: string;
10505
+ }[];
10506
+ };
9517
10507
  format_cart_number: {
9518
10508
  Args: {
9519
10509
  p_pick_date: string;
@@ -9534,6 +10524,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9534
10524
  preferred_warehouse_name: string;
9535
10525
  }[];
9536
10526
  };
10527
+ get_active_floriday_context: {
10528
+ Args: never;
10529
+ Returns: {
10530
+ connection_id: string;
10531
+ user_id: string;
10532
+ }[];
10533
+ };
9537
10534
  get_active_twinfield_public: {
9538
10535
  Args: never;
9539
10536
  Returns: {
@@ -9545,6 +10542,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9545
10542
  office_code: string;
9546
10543
  }[];
9547
10544
  };
10545
+ get_floricode_record_counts: {
10546
+ Args: never;
10547
+ Returns: {
10548
+ count: number;
10549
+ resource: string;
10550
+ }[];
10551
+ };
9548
10552
  get_floriday_agreements_active: {
9549
10553
  Args: {
9550
10554
  p_on_date?: string;
@@ -9636,6 +10640,24 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9636
10640
  };
9637
10641
  Returns: import("./types").Json;
9638
10642
  };
10643
+ get_offer_delivery_options: {
10644
+ Args: {
10645
+ p_code: string;
10646
+ };
10647
+ Returns: import("./types").Json;
10648
+ };
10649
+ get_offer_recipient_by_code: {
10650
+ Args: {
10651
+ p_code: string;
10652
+ };
10653
+ Returns: {
10654
+ campaign_id: string;
10655
+ clicked_at: string;
10656
+ customer_id: string;
10657
+ id: string;
10658
+ ordered_at: string;
10659
+ }[];
10660
+ };
9639
10661
  get_or_assign_floriday_order_number: {
9640
10662
  Args: {
9641
10663
  p_floriday_id: string;
@@ -9688,12 +10710,53 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9688
10710
  Args: never;
9689
10711
  Returns: boolean;
9690
10712
  };
10713
+ is_superadmin: {
10714
+ Args: {
10715
+ _user_id: string;
10716
+ };
10717
+ Returns: boolean;
10718
+ };
10719
+ local_effective_price: {
10720
+ Args: {
10721
+ _customer_id: string;
10722
+ _on_date?: string;
10723
+ _product_id: string;
10724
+ _quantity?: number;
10725
+ };
10726
+ Returns: {
10727
+ currency: string;
10728
+ discount_type: string;
10729
+ discount_value: number;
10730
+ net_price: number;
10731
+ source: string;
10732
+ source_id: string;
10733
+ }[];
10734
+ };
10735
+ mark_offer_clicked: {
10736
+ Args: {
10737
+ p_code: string;
10738
+ };
10739
+ Returns: undefined;
10740
+ };
10741
+ mark_offer_ordered: {
10742
+ Args: {
10743
+ p_code: string;
10744
+ };
10745
+ Returns: undefined;
10746
+ };
9691
10747
  next_order_number: {
9692
10748
  Args: {
9693
10749
  p_prefix: string;
9694
10750
  };
9695
10751
  Returns: string;
9696
10752
  };
10753
+ next_order_number_for_date: {
10754
+ Args: {
10755
+ p_created_at?: string;
10756
+ p_prefix: string;
10757
+ };
10758
+ Returns: string;
10759
+ };
9697
10760
  next_work_order_number: {
9698
10761
  Args: {
9699
10762
  p_parent_work_order_id?: string;
@@ -9701,16 +10764,41 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9701
10764
  };
9702
10765
  Returns: string;
9703
10766
  };
10767
+ normalize_order_source: {
10768
+ Args: {
10769
+ p_src: string;
10770
+ };
10771
+ Returns: string;
10772
+ };
9704
10773
  normalize_vat: {
9705
10774
  Args: {
9706
10775
  v: string;
9707
10776
  };
9708
10777
  Returns: string;
9709
10778
  };
10779
+ offer_recipient_matches: {
10780
+ Args: {
10781
+ _campaign_id: string;
10782
+ _customer_id: string;
10783
+ _recipient_id: string;
10784
+ };
10785
+ Returns: boolean;
10786
+ };
10787
+ order_number_prefix: {
10788
+ Args: {
10789
+ p_custom_fields?: import("./types").Json;
10790
+ p_order_source: string;
10791
+ };
10792
+ Returns: string;
10793
+ };
9710
10794
  pickstation_get_orders_raw: {
9711
10795
  Args: never;
9712
10796
  Returns: import("./types").Json;
9713
10797
  };
10798
+ pickstation_get_planning_context: {
10799
+ Args: never;
10800
+ Returns: import("./types").Json;
10801
+ };
9714
10802
  pickstation_get_settings: {
9715
10803
  Args: never;
9716
10804
  Returns: import("./types").Json;
@@ -9734,6 +10822,35 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9734
10822
  };
9735
10823
  Returns: undefined;
9736
10824
  };
10825
+ promote_trade_item_key: {
10826
+ Args: {
10827
+ p_new: string;
10828
+ p_old: string;
10829
+ };
10830
+ Returns: undefined;
10831
+ };
10832
+ recompute_order_status: {
10833
+ Args: {
10834
+ p_order_id: string;
10835
+ };
10836
+ Returns: undefined;
10837
+ };
10838
+ recompute_reserved_for_order: {
10839
+ Args: {
10840
+ p_order_id: string;
10841
+ };
10842
+ Returns: undefined;
10843
+ };
10844
+ recompute_reserved_stock: {
10845
+ Args: {
10846
+ p_trade_item_key: string;
10847
+ };
10848
+ Returns: undefined;
10849
+ };
10850
+ refresh_external_customers_grouped: {
10851
+ Args: never;
10852
+ Returns: undefined;
10853
+ };
9737
10854
  refresh_floricode_derived_code_lists: {
9738
10855
  Args: never;
9739
10856
  Returns: {
@@ -9748,6 +10865,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9748
10865
  };
9749
10866
  Returns: number;
9750
10867
  };
10868
+ refresh_floricode_derived_for_products: {
10869
+ Args: {
10870
+ _product_ids: string[];
10871
+ };
10872
+ Returns: number;
10873
+ };
9751
10874
  reset_floriday_sync_cursor: {
9752
10875
  Args: {
9753
10876
  p_connection_id: string;
@@ -9755,6 +10878,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9755
10878
  };
9756
10879
  Returns: undefined;
9757
10880
  };
10881
+ resolve_product_id_for_item: {
10882
+ Args: {
10883
+ p_product_name: string;
10884
+ };
10885
+ Returns: string;
10886
+ };
9758
10887
  schedule_floriday_additional_services_sync: {
9759
10888
  Args: {
9760
10889
  p_apikey: string;
@@ -10032,6 +11161,24 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10032
11161
  };
10033
11162
  Returns: string[];
10034
11163
  };
11164
+ sync_cached_packing_from_product: {
11165
+ Args: {
11166
+ p_product_id: string;
11167
+ };
11168
+ Returns: undefined;
11169
+ };
11170
+ sync_order_cart_item_packing_from_product: {
11171
+ Args: {
11172
+ p_product_id: string;
11173
+ };
11174
+ Returns: undefined;
11175
+ };
11176
+ sync_product_packing_from_floriday_cache: {
11177
+ Args: {
11178
+ p_floriday_id: string;
11179
+ };
11180
+ Returns: undefined;
11181
+ };
10035
11182
  twinfield_decrypt: {
10036
11183
  Args: {
10037
11184
  cipher: string;