@flowselections/floriday-klanten-module 1.0.43 → 1.0.44

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.
@@ -3125,6 +3125,30 @@ export type Database = {
3125
3125
  };
3126
3126
  Relationships: [];
3127
3127
  };
3128
+ dashboard_werkbon_tellers: {
3129
+ Row: {
3130
+ aantal: number;
3131
+ jaar: number;
3132
+ maand: number;
3133
+ soort: string;
3134
+ updated_at: string;
3135
+ };
3136
+ Insert: {
3137
+ aantal?: number;
3138
+ jaar: number;
3139
+ maand: number;
3140
+ soort: string;
3141
+ updated_at?: string;
3142
+ };
3143
+ Update: {
3144
+ aantal?: number;
3145
+ jaar?: number;
3146
+ maand?: number;
3147
+ soort?: string;
3148
+ updated_at?: string;
3149
+ };
3150
+ Relationships: [];
3151
+ };
3128
3152
  delivery_notes: {
3129
3153
  Row: {
3130
3154
  byte_size: number | null;
@@ -6648,19 +6672,25 @@ export type Database = {
6648
6672
  Row: {
6649
6673
  attempts: number;
6650
6674
  availability_sent_at: string | null;
6675
+ base_supply_outcome: string | null;
6651
6676
  connection_id: string;
6652
6677
  created_at: string;
6653
6678
  dead_lettered_at: string | null;
6654
6679
  desired_available: boolean | null;
6655
6680
  gateway_attempt_id: string | null;
6681
+ gateway_unreachable_since: string | null;
6656
6682
  id: string;
6657
6683
  last_error: string | null;
6658
6684
  locked_at: string | null;
6659
6685
  locked_by: string | null;
6660
6686
  next_attempt_at: string;
6661
6687
  number_of_pieces: number;
6688
+ price_note: string | null;
6689
+ price_sent: number | null;
6690
+ price_status: string | null;
6662
6691
  product_id: string | null;
6663
6692
  quantity_sent_at: string | null;
6693
+ result_label: string | null;
6664
6694
  sent_at: string | null;
6665
6695
  skip_reason: string | null;
6666
6696
  status: string;
@@ -6675,19 +6705,25 @@ export type Database = {
6675
6705
  Insert: {
6676
6706
  attempts?: number;
6677
6707
  availability_sent_at?: string | null;
6708
+ base_supply_outcome?: string | null;
6678
6709
  connection_id: string;
6679
6710
  created_at?: string;
6680
6711
  dead_lettered_at?: string | null;
6681
6712
  desired_available?: boolean | null;
6682
6713
  gateway_attempt_id?: string | null;
6714
+ gateway_unreachable_since?: string | null;
6683
6715
  id?: string;
6684
6716
  last_error?: string | null;
6685
6717
  locked_at?: string | null;
6686
6718
  locked_by?: string | null;
6687
6719
  next_attempt_at?: string;
6688
6720
  number_of_pieces?: number;
6721
+ price_note?: string | null;
6722
+ price_sent?: number | null;
6723
+ price_status?: string | null;
6689
6724
  product_id?: string | null;
6690
6725
  quantity_sent_at?: string | null;
6726
+ result_label?: string | null;
6691
6727
  sent_at?: string | null;
6692
6728
  skip_reason?: string | null;
6693
6729
  status?: string;
@@ -6702,19 +6738,25 @@ export type Database = {
6702
6738
  Update: {
6703
6739
  attempts?: number;
6704
6740
  availability_sent_at?: string | null;
6741
+ base_supply_outcome?: string | null;
6705
6742
  connection_id?: string;
6706
6743
  created_at?: string;
6707
6744
  dead_lettered_at?: string | null;
6708
6745
  desired_available?: boolean | null;
6709
6746
  gateway_attempt_id?: string | null;
6747
+ gateway_unreachable_since?: string | null;
6710
6748
  id?: string;
6711
6749
  last_error?: string | null;
6712
6750
  locked_at?: string | null;
6713
6751
  locked_by?: string | null;
6714
6752
  next_attempt_at?: string;
6715
6753
  number_of_pieces?: number;
6754
+ price_note?: string | null;
6755
+ price_sent?: number | null;
6756
+ price_status?: string | null;
6716
6757
  product_id?: string | null;
6717
6758
  quantity_sent_at?: string | null;
6759
+ result_label?: string | null;
6718
6760
  sent_at?: string | null;
6719
6761
  skip_reason?: string | null;
6720
6762
  status?: string;
@@ -7244,6 +7286,7 @@ export type Database = {
7244
7286
  Row: {
7245
7287
  action_reason: string | null;
7246
7288
  buffer_quantity: number;
7289
+ computed_available: number | null;
7247
7290
  connection_id: string;
7248
7291
  created_at: string;
7249
7292
  desired_availability: boolean;
@@ -7255,15 +7298,18 @@ export type Database = {
7255
7298
  last_enqueued_at: string | null;
7256
7299
  last_published_at: string | null;
7257
7300
  last_sync_error: string | null;
7301
+ limiting_product_id: string | null;
7258
7302
  manual_quantity: number | null;
7259
7303
  maximum_quantity: number | null;
7260
7304
  packing_size: number | null;
7261
7305
  product_id: string;
7306
+ product_type: string | null;
7262
7307
  quantity_control: string;
7263
7308
  remote_available: boolean | null;
7264
7309
  remote_checked_at: string | null;
7265
7310
  remote_quantity: number | null;
7266
7311
  stock_mode: string;
7312
+ structure_detail: Json | null;
7267
7313
  sync_status: string;
7268
7314
  updated_at: string;
7269
7315
  updated_by: string | null;
@@ -7272,6 +7318,7 @@ export type Database = {
7272
7318
  Insert: {
7273
7319
  action_reason?: string | null;
7274
7320
  buffer_quantity?: number;
7321
+ computed_available?: number | null;
7275
7322
  connection_id: string;
7276
7323
  created_at?: string;
7277
7324
  desired_availability?: boolean;
@@ -7283,15 +7330,18 @@ export type Database = {
7283
7330
  last_enqueued_at?: string | null;
7284
7331
  last_published_at?: string | null;
7285
7332
  last_sync_error?: string | null;
7333
+ limiting_product_id?: string | null;
7286
7334
  manual_quantity?: number | null;
7287
7335
  maximum_quantity?: number | null;
7288
7336
  packing_size?: number | null;
7289
7337
  product_id: string;
7338
+ product_type?: string | null;
7290
7339
  quantity_control?: string;
7291
7340
  remote_available?: boolean | null;
7292
7341
  remote_checked_at?: string | null;
7293
7342
  remote_quantity?: number | null;
7294
7343
  stock_mode?: string;
7344
+ structure_detail?: Json | null;
7295
7345
  sync_status?: string;
7296
7346
  updated_at?: string;
7297
7347
  updated_by?: string | null;
@@ -7300,6 +7350,7 @@ export type Database = {
7300
7350
  Update: {
7301
7351
  action_reason?: string | null;
7302
7352
  buffer_quantity?: number;
7353
+ computed_available?: number | null;
7303
7354
  connection_id?: string;
7304
7355
  created_at?: string;
7305
7356
  desired_availability?: boolean;
@@ -7311,21 +7362,39 @@ export type Database = {
7311
7362
  last_enqueued_at?: string | null;
7312
7363
  last_published_at?: string | null;
7313
7364
  last_sync_error?: string | null;
7365
+ limiting_product_id?: string | null;
7314
7366
  manual_quantity?: number | null;
7315
7367
  maximum_quantity?: number | null;
7316
7368
  packing_size?: number | null;
7317
7369
  product_id?: string;
7370
+ product_type?: string | null;
7318
7371
  quantity_control?: string;
7319
7372
  remote_available?: boolean | null;
7320
7373
  remote_checked_at?: string | null;
7321
7374
  remote_quantity?: number | null;
7322
7375
  stock_mode?: string;
7376
+ structure_detail?: Json | null;
7323
7377
  sync_status?: string;
7324
7378
  updated_at?: string;
7325
7379
  updated_by?: string | null;
7326
7380
  user_id?: string;
7327
7381
  };
7328
- Relationships: [];
7382
+ Relationships: [
7383
+ {
7384
+ foreignKeyName: "floriday_inventory_settings_product_id_fkey";
7385
+ columns: ["product_id"];
7386
+ isOneToOne: false;
7387
+ referencedRelation: "logistics_product_dimensions";
7388
+ referencedColumns: ["product_id"];
7389
+ },
7390
+ {
7391
+ foreignKeyName: "floriday_inventory_settings_product_id_fkey";
7392
+ columns: ["product_id"];
7393
+ isOneToOne: false;
7394
+ referencedRelation: "products";
7395
+ referencedColumns: ["id"];
7396
+ }
7397
+ ];
7329
7398
  };
7330
7399
  floriday_invoices_cache: {
7331
7400
  Row: {
@@ -7674,6 +7743,39 @@ export type Database = {
7674
7743
  }
7675
7744
  ];
7676
7745
  };
7746
+ floriday_queue_cleanup_runs: {
7747
+ Row: {
7748
+ created_at: string;
7749
+ deleted: Json;
7750
+ error: string | null;
7751
+ finished_at: string | null;
7752
+ id: string;
7753
+ more_remaining: boolean;
7754
+ orphan_settings: number | null;
7755
+ started_at: string;
7756
+ };
7757
+ Insert: {
7758
+ created_at?: string;
7759
+ deleted?: Json;
7760
+ error?: string | null;
7761
+ finished_at?: string | null;
7762
+ id?: string;
7763
+ more_remaining?: boolean;
7764
+ orphan_settings?: number | null;
7765
+ started_at?: string;
7766
+ };
7767
+ Update: {
7768
+ created_at?: string;
7769
+ deleted?: Json;
7770
+ error?: string | null;
7771
+ finished_at?: string | null;
7772
+ id?: string;
7773
+ more_remaining?: boolean;
7774
+ orphan_settings?: number | null;
7775
+ started_at?: string;
7776
+ };
7777
+ Relationships: [];
7778
+ };
7677
7779
  floriday_rate_limit_state: {
7678
7780
  Row: {
7679
7781
  bucket: string;
@@ -8585,7 +8687,7 @@ export type Database = {
8585
8687
  note?: string | null;
8586
8688
  reason?: string;
8587
8689
  trade_item_key?: string | null;
8588
- user_id: string;
8690
+ user_id?: string;
8589
8691
  };
8590
8692
  Update: {
8591
8693
  created_at?: string;
@@ -8646,7 +8748,7 @@ export type Database = {
8646
8748
  stock?: number;
8647
8749
  updated_at?: string;
8648
8750
  used_by_count?: number;
8649
- user_id: string;
8751
+ user_id?: string;
8650
8752
  vbn_code?: number | null;
8651
8753
  width_mm?: number | null;
8652
8754
  };
@@ -8828,6 +8930,108 @@ export type Database = {
8828
8930
  }
8829
8931
  ];
8830
8932
  };
8933
+ inventory_recompute_limits: {
8934
+ Row: {
8935
+ base_supply_batch: number;
8936
+ base_supply_uses_catalog_availability: boolean;
8937
+ drain_batch: number;
8938
+ id: boolean;
8939
+ import_chunk_size: number;
8940
+ import_max_bytes: number;
8941
+ import_max_rows: number;
8942
+ import_new_chunk_size: number;
8943
+ import_retention_days: number;
8944
+ max_ms_inline: number;
8945
+ max_parents_inline: number;
8946
+ queue_base_supply_timeout_minutes: number;
8947
+ queue_cleanup_batch: number;
8948
+ queue_cleanup_max_batches: number;
8949
+ queue_failed_days: number;
8950
+ queue_gateway_backoff_minutes: number[];
8951
+ queue_gateway_give_up_hours: number;
8952
+ queue_sent_days: number;
8953
+ queue_skipped_days: number;
8954
+ queue_superseded_days: number;
8955
+ updated_at: string;
8956
+ };
8957
+ Insert: {
8958
+ base_supply_batch?: number;
8959
+ base_supply_uses_catalog_availability?: boolean;
8960
+ drain_batch?: number;
8961
+ id?: boolean;
8962
+ import_chunk_size?: number;
8963
+ import_max_bytes?: number;
8964
+ import_max_rows?: number;
8965
+ import_new_chunk_size?: number;
8966
+ import_retention_days?: number;
8967
+ max_ms_inline?: number;
8968
+ max_parents_inline?: number;
8969
+ queue_base_supply_timeout_minutes?: number;
8970
+ queue_cleanup_batch?: number;
8971
+ queue_cleanup_max_batches?: number;
8972
+ queue_failed_days?: number;
8973
+ queue_gateway_backoff_minutes?: number[];
8974
+ queue_gateway_give_up_hours?: number;
8975
+ queue_sent_days?: number;
8976
+ queue_skipped_days?: number;
8977
+ queue_superseded_days?: number;
8978
+ updated_at?: string;
8979
+ };
8980
+ Update: {
8981
+ base_supply_batch?: number;
8982
+ base_supply_uses_catalog_availability?: boolean;
8983
+ drain_batch?: number;
8984
+ id?: boolean;
8985
+ import_chunk_size?: number;
8986
+ import_max_bytes?: number;
8987
+ import_max_rows?: number;
8988
+ import_new_chunk_size?: number;
8989
+ import_retention_days?: number;
8990
+ max_ms_inline?: number;
8991
+ max_parents_inline?: number;
8992
+ queue_base_supply_timeout_minutes?: number;
8993
+ queue_cleanup_batch?: number;
8994
+ queue_cleanup_max_batches?: number;
8995
+ queue_failed_days?: number;
8996
+ queue_gateway_backoff_minutes?: number[];
8997
+ queue_gateway_give_up_hours?: number;
8998
+ queue_sent_days?: number;
8999
+ queue_skipped_days?: number;
9000
+ queue_superseded_days?: number;
9001
+ updated_at?: string;
9002
+ };
9003
+ Relationships: [];
9004
+ };
9005
+ inventory_recompute_queue: {
9006
+ Row: {
9007
+ attempts: number;
9008
+ created_at: string;
9009
+ enqueued_at: string;
9010
+ last_error: string | null;
9011
+ product_id: string;
9012
+ reason: string | null;
9013
+ updated_at: string;
9014
+ };
9015
+ Insert: {
9016
+ attempts?: number;
9017
+ created_at?: string;
9018
+ enqueued_at?: string;
9019
+ last_error?: string | null;
9020
+ product_id: string;
9021
+ reason?: string | null;
9022
+ updated_at?: string;
9023
+ };
9024
+ Update: {
9025
+ attempts?: number;
9026
+ created_at?: string;
9027
+ enqueued_at?: string;
9028
+ last_error?: string | null;
9029
+ product_id?: string;
9030
+ reason?: string | null;
9031
+ updated_at?: string;
9032
+ };
9033
+ Relationships: [];
9034
+ };
8831
9035
  inventory_settings: {
8832
9036
  Row: {
8833
9037
  created_at: string;
@@ -11026,6 +11230,69 @@ export type Database = {
11026
11230
  };
11027
11231
  Relationships: [];
11028
11232
  };
11233
+ logistics_allocation_fingerprint: {
11234
+ Row: {
11235
+ created_at: string;
11236
+ fingerprint: string;
11237
+ last_replan_at: string | null;
11238
+ order_id: string;
11239
+ pending_since: string | null;
11240
+ updated_at: string;
11241
+ };
11242
+ Insert: {
11243
+ created_at?: string;
11244
+ fingerprint: string;
11245
+ last_replan_at?: string | null;
11246
+ order_id: string;
11247
+ pending_since?: string | null;
11248
+ updated_at?: string;
11249
+ };
11250
+ Update: {
11251
+ created_at?: string;
11252
+ fingerprint?: string;
11253
+ last_replan_at?: string | null;
11254
+ order_id?: string;
11255
+ pending_since?: string | null;
11256
+ updated_at?: string;
11257
+ };
11258
+ Relationships: [];
11259
+ };
11260
+ logistics_autolink_audit: {
11261
+ Row: {
11262
+ created_at: string;
11263
+ id: string;
11264
+ match_type: string;
11265
+ order_id: string | null;
11266
+ order_item_id: string | null;
11267
+ order_source: string | null;
11268
+ product_floriday_id: string | null;
11269
+ product_id: string | null;
11270
+ product_name: string | null;
11271
+ };
11272
+ Insert: {
11273
+ created_at?: string;
11274
+ id?: string;
11275
+ match_type: string;
11276
+ order_id?: string | null;
11277
+ order_item_id?: string | null;
11278
+ order_source?: string | null;
11279
+ product_floriday_id?: string | null;
11280
+ product_id?: string | null;
11281
+ product_name?: string | null;
11282
+ };
11283
+ Update: {
11284
+ created_at?: string;
11285
+ id?: string;
11286
+ match_type?: string;
11287
+ order_id?: string | null;
11288
+ order_item_id?: string | null;
11289
+ order_source?: string | null;
11290
+ product_floriday_id?: string | null;
11291
+ product_id?: string | null;
11292
+ product_name?: string | null;
11293
+ };
11294
+ Relationships: [];
11295
+ };
11029
11296
  logistics_base_url_checks: {
11030
11297
  Row: {
11031
11298
  candidate_host: string | null;
@@ -12209,6 +12476,33 @@ export type Database = {
12209
12476
  };
12210
12477
  Relationships: [];
12211
12478
  };
12479
+ logistics_plan_coverage_retries: {
12480
+ Row: {
12481
+ attempts: number;
12482
+ gave_up_at: string | null;
12483
+ last_at: string;
12484
+ last_pct: number | null;
12485
+ next_at: string;
12486
+ order_id: string;
12487
+ };
12488
+ Insert: {
12489
+ attempts?: number;
12490
+ gave_up_at?: string | null;
12491
+ last_at?: string;
12492
+ last_pct?: number | null;
12493
+ next_at?: string;
12494
+ order_id: string;
12495
+ };
12496
+ Update: {
12497
+ attempts?: number;
12498
+ gave_up_at?: string | null;
12499
+ last_at?: string;
12500
+ last_pct?: number | null;
12501
+ next_at?: string;
12502
+ order_id?: string;
12503
+ };
12504
+ Relationships: [];
12505
+ };
12212
12506
  logistics_plan_locks: {
12213
12507
  Row: {
12214
12508
  created_at: string;
@@ -12599,6 +12893,45 @@ export type Database = {
12599
12893
  };
12600
12894
  Relationships: [];
12601
12895
  };
12896
+ logistics_reservation_allocations: {
12897
+ Row: {
12898
+ computed_at: string;
12899
+ created_at: string;
12900
+ group_id: string | null;
12901
+ id: string;
12902
+ line_qty: number | null;
12903
+ order_item_id: string;
12904
+ qty: number;
12905
+ source: string;
12906
+ trade_item_key: string;
12907
+ updated_at: string;
12908
+ };
12909
+ Insert: {
12910
+ computed_at?: string;
12911
+ created_at?: string;
12912
+ group_id?: string | null;
12913
+ id?: string;
12914
+ line_qty?: number | null;
12915
+ order_item_id: string;
12916
+ qty: number;
12917
+ source: string;
12918
+ trade_item_key: string;
12919
+ updated_at?: string;
12920
+ };
12921
+ Update: {
12922
+ computed_at?: string;
12923
+ created_at?: string;
12924
+ group_id?: string | null;
12925
+ id?: string;
12926
+ line_qty?: number | null;
12927
+ order_item_id?: string;
12928
+ qty?: number;
12929
+ source?: string;
12930
+ trade_item_key?: string;
12931
+ updated_at?: string;
12932
+ };
12933
+ Relationships: [];
12934
+ };
12602
12935
  logistics_rule_configs: {
12603
12936
  Row: {
12604
12937
  created_at: string;
@@ -12743,6 +13076,7 @@ export type Database = {
12743
13076
  slip_job_id: string;
12744
13077
  status: string;
12745
13078
  updated_at: string;
13079
+ voor_herstel: boolean;
12746
13080
  };
12747
13081
  Insert: {
12748
13082
  attempts?: number;
@@ -12763,6 +13097,7 @@ export type Database = {
12763
13097
  slip_job_id: string;
12764
13098
  status?: string;
12765
13099
  updated_at?: string;
13100
+ voor_herstel?: boolean;
12766
13101
  };
12767
13102
  Update: {
12768
13103
  attempts?: number;
@@ -12783,6 +13118,7 @@ export type Database = {
12783
13118
  slip_job_id?: string;
12784
13119
  status?: string;
12785
13120
  updated_at?: string;
13121
+ voor_herstel?: boolean;
12786
13122
  };
12787
13123
  Relationships: [];
12788
13124
  };
@@ -15343,6 +15679,7 @@ export type Database = {
15343
15679
  Row: {
15344
15680
  boxes: number | null;
15345
15681
  cart_id: string;
15682
+ components: Json | null;
15346
15683
  crates: number;
15347
15684
  crates_in_layer: number | null;
15348
15685
  crates_per_layer: number;
@@ -15361,6 +15698,7 @@ export type Database = {
15361
15698
  Insert: {
15362
15699
  boxes?: number | null;
15363
15700
  cart_id: string;
15701
+ components?: Json | null;
15364
15702
  crates: number;
15365
15703
  crates_in_layer?: number | null;
15366
15704
  crates_per_layer?: number;
@@ -15379,6 +15717,7 @@ export type Database = {
15379
15717
  Update: {
15380
15718
  boxes?: number | null;
15381
15719
  cart_id?: string;
15720
+ components?: Json | null;
15382
15721
  crates?: number;
15383
15722
  crates_in_layer?: number | null;
15384
15723
  crates_per_layer?: number;
@@ -17534,6 +17873,12 @@ export type Database = {
17534
17873
  email_purpose: string | null;
17535
17874
  enabled: boolean;
17536
17875
  id: boolean;
17876
+ overrun_auto_mail: boolean;
17877
+ overrun_body_template: string;
17878
+ overrun_enabled: boolean;
17879
+ overrun_mail_minutes: number;
17880
+ overrun_notice_minutes: number;
17881
+ overrun_subject_template: string;
17537
17882
  reply_to: string | null;
17538
17883
  reschedule_body_template: string;
17539
17884
  reschedule_subject_template: string;
@@ -17550,6 +17895,12 @@ export type Database = {
17550
17895
  email_purpose?: string | null;
17551
17896
  enabled?: boolean;
17552
17897
  id?: boolean;
17898
+ overrun_auto_mail?: boolean;
17899
+ overrun_body_template?: string;
17900
+ overrun_enabled?: boolean;
17901
+ overrun_mail_minutes?: number;
17902
+ overrun_notice_minutes?: number;
17903
+ overrun_subject_template?: string;
17553
17904
  reply_to?: string | null;
17554
17905
  reschedule_body_template?: string;
17555
17906
  reschedule_subject_template?: string;
@@ -17566,6 +17917,12 @@ export type Database = {
17566
17917
  email_purpose?: string | null;
17567
17918
  enabled?: boolean;
17568
17919
  id?: boolean;
17920
+ overrun_auto_mail?: boolean;
17921
+ overrun_body_template?: string;
17922
+ overrun_enabled?: boolean;
17923
+ overrun_mail_minutes?: number;
17924
+ overrun_notice_minutes?: number;
17925
+ overrun_subject_template?: string;
17569
17926
  reply_to?: string | null;
17570
17927
  reschedule_body_template?: string;
17571
17928
  reschedule_subject_template?: string;
@@ -17657,6 +18014,66 @@ export type Database = {
17657
18014
  };
17658
18015
  Relationships: [];
17659
18016
  };
18017
+ planning_overrun_events: {
18018
+ Row: {
18019
+ created_at: string;
18020
+ id: string;
18021
+ mail_level: number;
18022
+ mailed_at: string | null;
18023
+ mailed_item_id: string | null;
18024
+ mailed_items: Json;
18025
+ monteur_id: string | null;
18026
+ original_end_at: string;
18027
+ overrun_minutes: number;
18028
+ planning_item_id: string;
18029
+ shifted: Json;
18030
+ updated_at: string;
18031
+ };
18032
+ Insert: {
18033
+ created_at?: string;
18034
+ id?: string;
18035
+ mail_level?: number;
18036
+ mailed_at?: string | null;
18037
+ mailed_item_id?: string | null;
18038
+ mailed_items?: Json;
18039
+ monteur_id?: string | null;
18040
+ original_end_at: string;
18041
+ overrun_minutes?: number;
18042
+ planning_item_id: string;
18043
+ shifted?: Json;
18044
+ updated_at?: string;
18045
+ };
18046
+ Update: {
18047
+ created_at?: string;
18048
+ id?: string;
18049
+ mail_level?: number;
18050
+ mailed_at?: string | null;
18051
+ mailed_item_id?: string | null;
18052
+ mailed_items?: Json;
18053
+ monteur_id?: string | null;
18054
+ original_end_at?: string;
18055
+ overrun_minutes?: number;
18056
+ planning_item_id?: string;
18057
+ shifted?: Json;
18058
+ updated_at?: string;
18059
+ };
18060
+ Relationships: [
18061
+ {
18062
+ foreignKeyName: "planning_overrun_events_planning_item_id_fkey";
18063
+ columns: ["planning_item_id"];
18064
+ isOneToOne: true;
18065
+ referencedRelation: "planning_items";
18066
+ referencedColumns: ["id"];
18067
+ },
18068
+ {
18069
+ foreignKeyName: "planning_overrun_events_planning_item_id_fkey";
18070
+ columns: ["planning_item_id"];
18071
+ isOneToOne: true;
18072
+ referencedRelation: "planning_overview";
18073
+ referencedColumns: ["id"];
18074
+ }
18075
+ ];
18076
+ };
17660
18077
  planning_settings: {
17661
18078
  Row: {
17662
18079
  company_address: string | null;
@@ -18986,7 +19403,7 @@ export type Database = {
18986
19403
  id?: string;
18987
19404
  product_group_id: string;
18988
19405
  quantity?: number;
18989
- sort_order?: number;
19406
+ sort_order: number;
18990
19407
  trade_item_id: string;
18991
19408
  };
18992
19409
  Update: {
@@ -20217,6 +20634,7 @@ export type Database = {
20217
20634
  is_protected: boolean;
20218
20635
  key: string;
20219
20636
  name: string;
20637
+ permissions_initialized: boolean;
20220
20638
  updated_at: string;
20221
20639
  };
20222
20640
  Insert: {
@@ -20225,6 +20643,7 @@ export type Database = {
20225
20643
  is_protected?: boolean;
20226
20644
  key: string;
20227
20645
  name: string;
20646
+ permissions_initialized?: boolean;
20228
20647
  updated_at?: string;
20229
20648
  };
20230
20649
  Update: {
@@ -20233,6 +20652,7 @@ export type Database = {
20233
20652
  is_protected?: boolean;
20234
20653
  key?: string;
20235
20654
  name?: string;
20655
+ permissions_initialized?: boolean;
20236
20656
  updated_at?: string;
20237
20657
  };
20238
20658
  Relationships: [];
@@ -20938,43 +21358,212 @@ export type Database = {
20938
21358
  };
20939
21359
  Relationships: [];
20940
21360
  };
20941
- stock_import_runs: {
21361
+ stock_import_chunks: {
20942
21362
  Row: {
20943
- connection_id: string | null;
21363
+ chunk_no: number;
20944
21364
  created_at: string;
20945
- created_rows: number;
20946
- errors: Json;
20947
- filename: string | null;
20948
- id: string;
20949
- mutations: Json;
20950
- skipped_rows: number;
20951
- total_rows: number;
20952
- updated_rows: number;
20953
- user_id: string;
21365
+ duration_ms: number | null;
21366
+ processed_at: string | null;
21367
+ run_id: string;
21368
+ status: string;
21369
+ undone_at: string | null;
21370
+ updated_at: string;
20954
21371
  };
20955
21372
  Insert: {
20956
- connection_id?: string | null;
20957
- created_at?: string;
20958
- created_rows?: number;
20959
- errors?: Json;
20960
- filename?: string | null;
20961
- id?: string;
20962
- mutations?: Json;
20963
- skipped_rows?: number;
20964
- total_rows?: number;
20965
- updated_rows?: number;
20966
- user_id: string;
20967
- };
20968
- Update: {
20969
- connection_id?: string | null;
21373
+ chunk_no: number;
21374
+ created_at?: string;
21375
+ duration_ms?: number | null;
21376
+ processed_at?: string | null;
21377
+ run_id: string;
21378
+ status?: string;
21379
+ undone_at?: string | null;
21380
+ updated_at?: string;
21381
+ };
21382
+ Update: {
21383
+ chunk_no?: number;
21384
+ created_at?: string;
21385
+ duration_ms?: number | null;
21386
+ processed_at?: string | null;
21387
+ run_id?: string;
21388
+ status?: string;
21389
+ undone_at?: string | null;
21390
+ updated_at?: string;
21391
+ };
21392
+ Relationships: [
21393
+ {
21394
+ foreignKeyName: "stock_import_chunks_run_id_fkey";
21395
+ columns: ["run_id"];
21396
+ isOneToOne: false;
21397
+ referencedRelation: "stock_import_runs";
21398
+ referencedColumns: ["id"];
21399
+ }
21400
+ ];
21401
+ };
21402
+ stock_import_rows: {
21403
+ Row: {
21404
+ article_code: string | null;
21405
+ article_name: string | null;
21406
+ chunk_no: number;
21407
+ connection_id: string | null;
21408
+ created_at: string;
21409
+ custom_values: Json | null;
21410
+ error: string | null;
21411
+ id: string;
21412
+ incoming_after: number | null;
21413
+ incoming_before: number | null;
21414
+ incoming_in: number | null;
21415
+ is_new: boolean;
21416
+ minimum_after: number | null;
21417
+ minimum_before: number | null;
21418
+ minimum_in: number | null;
21419
+ new_payload: Json | null;
21420
+ note: string | null;
21421
+ physical_after: number | null;
21422
+ physical_before: number | null;
21423
+ physical_in: number | null;
21424
+ processed_at: string | null;
21425
+ product_id: string | null;
21426
+ row_no: number;
21427
+ run_id: string;
21428
+ status: string;
21429
+ trade_item_key: string | null;
21430
+ updated_at: string;
21431
+ };
21432
+ Insert: {
21433
+ article_code?: string | null;
21434
+ article_name?: string | null;
21435
+ chunk_no: number;
21436
+ connection_id?: string | null;
21437
+ created_at?: string;
21438
+ custom_values?: Json | null;
21439
+ error?: string | null;
21440
+ id?: string;
21441
+ incoming_after?: number | null;
21442
+ incoming_before?: number | null;
21443
+ incoming_in?: number | null;
21444
+ is_new?: boolean;
21445
+ minimum_after?: number | null;
21446
+ minimum_before?: number | null;
21447
+ minimum_in?: number | null;
21448
+ new_payload?: Json | null;
21449
+ note?: string | null;
21450
+ physical_after?: number | null;
21451
+ physical_before?: number | null;
21452
+ physical_in?: number | null;
21453
+ processed_at?: string | null;
21454
+ product_id?: string | null;
21455
+ row_no: number;
21456
+ run_id: string;
21457
+ status?: string;
21458
+ trade_item_key?: string | null;
21459
+ updated_at?: string;
21460
+ };
21461
+ Update: {
21462
+ article_code?: string | null;
21463
+ article_name?: string | null;
21464
+ chunk_no?: number;
21465
+ connection_id?: string | null;
21466
+ created_at?: string;
21467
+ custom_values?: Json | null;
21468
+ error?: string | null;
21469
+ id?: string;
21470
+ incoming_after?: number | null;
21471
+ incoming_before?: number | null;
21472
+ incoming_in?: number | null;
21473
+ is_new?: boolean;
21474
+ minimum_after?: number | null;
21475
+ minimum_before?: number | null;
21476
+ minimum_in?: number | null;
21477
+ new_payload?: Json | null;
21478
+ note?: string | null;
21479
+ physical_after?: number | null;
21480
+ physical_before?: number | null;
21481
+ physical_in?: number | null;
21482
+ processed_at?: string | null;
21483
+ product_id?: string | null;
21484
+ row_no?: number;
21485
+ run_id?: string;
21486
+ status?: string;
21487
+ trade_item_key?: string | null;
21488
+ updated_at?: string;
21489
+ };
21490
+ Relationships: [
21491
+ {
21492
+ foreignKeyName: "stock_import_rows_run_id_fkey";
21493
+ columns: ["run_id"];
21494
+ isOneToOne: false;
21495
+ referencedRelation: "stock_import_runs";
21496
+ referencedColumns: ["id"];
21497
+ }
21498
+ ];
21499
+ };
21500
+ stock_import_runs: {
21501
+ Row: {
21502
+ chunk_size: number | null;
21503
+ connection_id: string | null;
21504
+ created_at: string;
21505
+ created_rows: number;
21506
+ done_chunks: number;
21507
+ errors: Json;
21508
+ file_hash: string | null;
21509
+ filename: string | null;
21510
+ finished_at: string | null;
21511
+ id: string;
21512
+ mutations: Json;
21513
+ rows_purged_at: string | null;
21514
+ skipped_rows: number;
21515
+ status: string;
21516
+ total_chunks: number;
21517
+ total_rows: number;
21518
+ undo_skipped_rows: number;
21519
+ undone_rows: number;
21520
+ updated_at: string;
21521
+ updated_rows: number;
21522
+ user_id: string;
21523
+ };
21524
+ Insert: {
21525
+ chunk_size?: number | null;
21526
+ connection_id?: string | null;
21527
+ created_at?: string;
21528
+ created_rows?: number;
21529
+ done_chunks?: number;
21530
+ errors?: Json;
21531
+ file_hash?: string | null;
21532
+ filename?: string | null;
21533
+ finished_at?: string | null;
21534
+ id?: string;
21535
+ mutations?: Json;
21536
+ rows_purged_at?: string | null;
21537
+ skipped_rows?: number;
21538
+ status?: string;
21539
+ total_chunks?: number;
21540
+ total_rows?: number;
21541
+ undo_skipped_rows?: number;
21542
+ undone_rows?: number;
21543
+ updated_at?: string;
21544
+ updated_rows?: number;
21545
+ user_id: string;
21546
+ };
21547
+ Update: {
21548
+ chunk_size?: number | null;
21549
+ connection_id?: string | null;
20970
21550
  created_at?: string;
20971
21551
  created_rows?: number;
21552
+ done_chunks?: number;
20972
21553
  errors?: Json;
21554
+ file_hash?: string | null;
20973
21555
  filename?: string | null;
21556
+ finished_at?: string | null;
20974
21557
  id?: string;
20975
21558
  mutations?: Json;
21559
+ rows_purged_at?: string | null;
20976
21560
  skipped_rows?: number;
21561
+ status?: string;
21562
+ total_chunks?: number;
20977
21563
  total_rows?: number;
21564
+ undo_skipped_rows?: number;
21565
+ undone_rows?: number;
21566
+ updated_at?: string;
20978
21567
  updated_rows?: number;
20979
21568
  user_id?: string;
20980
21569
  };
@@ -20984,6 +21573,7 @@ export type Database = {
20984
21573
  Row: {
20985
21574
  acknowledged_at: string | null;
20986
21575
  acknowledged_by: string | null;
21576
+ alert_kind: string;
20987
21577
  created_at: string;
20988
21578
  id: string;
20989
21579
  item_count: number;
@@ -20994,6 +21584,7 @@ export type Database = {
20994
21584
  Insert: {
20995
21585
  acknowledged_at?: string | null;
20996
21586
  acknowledged_by?: string | null;
21587
+ alert_kind?: string;
20997
21588
  created_at?: string;
20998
21589
  id?: string;
20999
21590
  item_count?: number;
@@ -21004,6 +21595,7 @@ export type Database = {
21004
21595
  Update: {
21005
21596
  acknowledged_at?: string | null;
21006
21597
  acknowledged_by?: string | null;
21598
+ alert_kind?: string;
21007
21599
  created_at?: string;
21008
21600
  id?: string;
21009
21601
  item_count?: number;
@@ -21070,6 +21662,45 @@ export type Database = {
21070
21662
  };
21071
21663
  Relationships: [];
21072
21664
  };
21665
+ structure_cleanup_log: {
21666
+ Row: {
21667
+ action: string;
21668
+ batch: string;
21669
+ created_at: string;
21670
+ id: string;
21671
+ new_row: Json | null;
21672
+ old_row: Json;
21673
+ reason: string;
21674
+ row_id: string;
21675
+ step: number;
21676
+ table_name: string;
21677
+ };
21678
+ Insert: {
21679
+ action: string;
21680
+ batch: string;
21681
+ created_at?: string;
21682
+ id?: string;
21683
+ new_row?: Json | null;
21684
+ old_row: Json;
21685
+ reason: string;
21686
+ row_id: string;
21687
+ step: number;
21688
+ table_name: string;
21689
+ };
21690
+ Update: {
21691
+ action?: string;
21692
+ batch?: string;
21693
+ created_at?: string;
21694
+ id?: string;
21695
+ new_row?: Json | null;
21696
+ old_row?: Json;
21697
+ reason?: string;
21698
+ row_id?: string;
21699
+ step?: number;
21700
+ table_name?: string;
21701
+ };
21702
+ Relationships: [];
21703
+ };
21073
21704
  supplier_contacts: {
21074
21705
  Row: {
21075
21706
  created_at: string;
@@ -21943,7 +22574,7 @@ export type Database = {
21943
22574
  reserved_stock?: number;
21944
22575
  trade_item_key: string;
21945
22576
  updated_at?: string;
21946
- user_id: string;
22577
+ user_id?: string;
21947
22578
  };
21948
22579
  Update: {
21949
22580
  change_source?: string;
@@ -26840,6 +27471,15 @@ export type Database = {
26840
27471
  };
26841
27472
  };
26842
27473
  Functions: {
27474
+ _floriday_queue_cleanup_batch: {
27475
+ Args: {
27476
+ p_days: number;
27477
+ p_keep_latest: boolean;
27478
+ p_limit: number;
27479
+ p_statuses: string[];
27480
+ };
27481
+ Returns: number;
27482
+ };
26843
27483
  _floriday_schedule_job: {
26844
27484
  Args: {
26845
27485
  p_apikey: string;
@@ -26863,6 +27503,12 @@ export type Database = {
26863
27503
  };
26864
27504
  Returns: Json;
26865
27505
  };
27506
+ _stock_import_caller: {
27507
+ Args: {
27508
+ p_owner: string;
27509
+ };
27510
+ Returns: boolean;
27511
+ };
26866
27512
  _wo_is_planner: {
26867
27513
  Args: never;
26868
27514
  Returns: boolean;
@@ -27006,6 +27652,15 @@ export type Database = {
27006
27652
  };
27007
27653
  Returns: number;
27008
27654
  };
27655
+ calculate_structure_available: {
27656
+ Args: {
27657
+ p_connection_id: string;
27658
+ p_level?: number;
27659
+ p_path?: string[];
27660
+ p_product_id: string;
27661
+ };
27662
+ Returns: Json;
27663
+ };
27009
27664
  call_exact_route: {
27010
27665
  Args: {
27011
27666
  path: string;
@@ -27034,6 +27689,19 @@ export type Database = {
27034
27689
  };
27035
27690
  Returns: Json;
27036
27691
  };
27692
+ check_product_structure: {
27693
+ Args: {
27694
+ p_child: string;
27695
+ p_kind: string;
27696
+ p_name?: string;
27697
+ p_parent: string;
27698
+ };
27699
+ Returns: {
27700
+ code: string;
27701
+ message: string;
27702
+ ok: boolean;
27703
+ }[];
27704
+ };
27037
27705
  check_trade_item_available_stock: {
27038
27706
  Args: {
27039
27707
  p_connection_id?: string;
@@ -27107,6 +27775,24 @@ export type Database = {
27107
27775
  isSetofReturn: true;
27108
27776
  };
27109
27777
  };
27778
+ claim_floriday_base_supply: {
27779
+ Args: {
27780
+ p_worker?: string;
27781
+ };
27782
+ Returns: {
27783
+ attempts: number;
27784
+ id: string;
27785
+ number_of_pieces: number;
27786
+ product_id: string;
27787
+ sale_price: number;
27788
+ stock_mode: string;
27789
+ target_week: number;
27790
+ target_year: number;
27791
+ trade_item_id: string;
27792
+ unit: string;
27793
+ uses_catalog_availability: boolean;
27794
+ }[];
27795
+ };
27110
27796
  claim_floriday_stock_queue: {
27111
27797
  Args: {
27112
27798
  p_limit?: number;
@@ -27115,19 +27801,25 @@ export type Database = {
27115
27801
  Returns: {
27116
27802
  attempts: number;
27117
27803
  availability_sent_at: string | null;
27804
+ base_supply_outcome: string | null;
27118
27805
  connection_id: string;
27119
27806
  created_at: string;
27120
27807
  dead_lettered_at: string | null;
27121
27808
  desired_available: boolean | null;
27122
27809
  gateway_attempt_id: string | null;
27810
+ gateway_unreachable_since: string | null;
27123
27811
  id: string;
27124
27812
  last_error: string | null;
27125
27813
  locked_at: string | null;
27126
27814
  locked_by: string | null;
27127
27815
  next_attempt_at: string;
27128
27816
  number_of_pieces: number;
27817
+ price_note: string | null;
27818
+ price_sent: number | null;
27819
+ price_status: string | null;
27129
27820
  product_id: string | null;
27130
27821
  quantity_sent_at: string | null;
27822
+ result_label: string | null;
27131
27823
  sent_at: string | null;
27132
27824
  skip_reason: string | null;
27133
27825
  status: string;
@@ -27391,6 +28083,19 @@ export type Database = {
27391
28083
  Args: never;
27392
28084
  Returns: undefined;
27393
28085
  };
28086
+ complete_floriday_base_supply: {
28087
+ Args: {
28088
+ p_attempt_id?: string;
28089
+ p_error?: string;
28090
+ p_id: string;
28091
+ p_kind: string;
28092
+ p_label?: string;
28093
+ p_outcome?: string;
28094
+ p_price?: number;
28095
+ p_price_status?: string;
28096
+ };
28097
+ Returns: string;
28098
+ };
27394
28099
  complete_floriday_stock_queue: {
27395
28100
  Args: {
27396
28101
  p_attempt_id?: string;
@@ -27447,6 +28152,15 @@ export type Database = {
27447
28152
  wait_ms: number;
27448
28153
  }[];
27449
28154
  };
28155
+ consume_order_item: {
28156
+ Args: {
28157
+ p_order_id: string;
28158
+ p_order_item_id: string;
28159
+ p_reason: string;
28160
+ p_source: string;
28161
+ };
28162
+ Returns: number;
28163
+ };
27450
28164
  consume_print_agent_pairing: {
27451
28165
  Args: {
27452
28166
  _pairing_hash: string;
@@ -27566,6 +28280,19 @@ export type Database = {
27566
28280
  table_name: string;
27567
28281
  }[];
27568
28282
  };
28283
+ dashboard_werkbon_soort: {
28284
+ Args: {
28285
+ _source: string;
28286
+ };
28287
+ Returns: string;
28288
+ };
28289
+ dashboard_werkbon_teller_plus: {
28290
+ Args: {
28291
+ _soort: string;
28292
+ _ts: string;
28293
+ };
28294
+ Returns: undefined;
28295
+ };
27569
28296
  delete_samenstelling: {
27570
28297
  Args: {
27571
28298
  p_parent_id: string;
@@ -27579,6 +28306,10 @@ export type Database = {
27579
28306
  };
27580
28307
  Returns: Json;
27581
28308
  };
28309
+ drain_inventory_recompute_queue: {
28310
+ Args: never;
28311
+ Returns: number;
28312
+ };
27582
28313
  effective_module_permission: {
27583
28314
  Args: {
27584
28315
  _module_id: string;
@@ -27651,6 +28382,18 @@ export type Database = {
27651
28382
  };
27652
28383
  Returns: undefined;
27653
28384
  };
28385
+ enqueue_structure_recompute: {
28386
+ Args: {
28387
+ p_include_self?: boolean;
28388
+ p_product_ids: string[];
28389
+ p_reason: string;
28390
+ };
28391
+ Returns: number;
28392
+ };
28393
+ ensure_inventory_recompute_drain: {
28394
+ Args: never;
28395
+ Returns: undefined;
28396
+ };
27654
28397
  ensure_system_roles: {
27655
28398
  Args: never;
27656
28399
  Returns: {
@@ -27756,7 +28499,7 @@ export type Database = {
27756
28499
  };
27757
28500
  floriday_cleanup_stock_queue_v2: {
27758
28501
  Args: never;
27759
- Returns: undefined;
28502
+ Returns: Json;
27760
28503
  };
27761
28504
  floriday_compact_stock_snapshots: {
27762
28505
  Args: never;
@@ -27768,6 +28511,19 @@ export type Database = {
27768
28511
  };
27769
28512
  Returns: string;
27770
28513
  };
28514
+ floriday_desired_stock_regression_check: {
28515
+ Args: never;
28516
+ Returns: {
28517
+ actual: number;
28518
+ available: number;
28519
+ equal: boolean;
28520
+ expected: number;
28521
+ packing: number;
28522
+ product_id: string;
28523
+ product_name: string;
28524
+ stock_mode: string;
28525
+ }[];
28526
+ };
27771
28527
  floriday_effective_price: {
27772
28528
  Args: {
27773
28529
  _buyer_id: string;
@@ -27795,6 +28551,10 @@ export type Database = {
27795
28551
  };
27796
28552
  Returns: number;
27797
28553
  };
28554
+ floriday_orphan_settings_count: {
28555
+ Args: never;
28556
+ Returns: number;
28557
+ };
27798
28558
  floriday_publish_horizon_weeks: {
27799
28559
  Args: never;
27800
28560
  Returns: number;
@@ -27826,6 +28586,17 @@ export type Database = {
27826
28586
  };
27827
28587
  Returns: string;
27828
28588
  };
28589
+ fust_negative_stock_report: {
28590
+ Args: never;
28591
+ Returns: {
28592
+ duplicate_names: number;
28593
+ fust_key: string;
28594
+ fust_type_id: string;
28595
+ name: string;
28596
+ shortage: number;
28597
+ stock: number;
28598
+ }[];
28599
+ };
27829
28600
  get_active_floriday_connection_public: {
27830
28601
  Args: never;
27831
28602
  Returns: {
@@ -28026,6 +28797,18 @@ export type Database = {
28026
28797
  updated_at: string;
28027
28798
  }[];
28028
28799
  };
28800
+ get_product_structure_totals: {
28801
+ Args: {
28802
+ p_product_id: string;
28803
+ };
28804
+ Returns: Json;
28805
+ };
28806
+ get_product_structure_totals_batch: {
28807
+ Args: {
28808
+ p_product_ids: string[];
28809
+ };
28810
+ Returns: Json[];
28811
+ };
28029
28812
  get_room_busy_windows: {
28030
28813
  Args: {
28031
28814
  p_from: string;
@@ -28449,6 +29232,10 @@ export type Database = {
28449
29232
  };
28450
29233
  Returns: number;
28451
29234
  };
29235
+ inventory_inline_budget_ok: {
29236
+ Args: never;
29237
+ Returns: boolean;
29238
+ };
28452
29239
  invoice_auto_concept_for_work_order: {
28453
29240
  Args: {
28454
29241
  _wo_id: string;
@@ -28722,20 +29509,45 @@ export type Database = {
28722
29509
  };
28723
29510
  Returns: string;
28724
29511
  };
28725
- logistics_allowed_load_carriers: {
29512
+ logistics_allocation_check_changes: {
28726
29513
  Args: {
28727
- p_strategy_id?: string;
28728
- p_user_id?: string;
29514
+ p_order_item_ids?: string[];
28729
29515
  };
28730
29516
  Returns: Json;
28731
29517
  };
28732
- logistics_apply_buffer_decision: {
29518
+ logistics_allocation_fp: {
28733
29519
  Args: {
28734
29520
  p_order_id: string;
28735
29521
  };
28736
29522
  Returns: string;
28737
29523
  };
28738
- logistics_apply_document_layouts: {
29524
+ logistics_allocation_frozen: {
29525
+ Args: {
29526
+ p_order_id: string;
29527
+ };
29528
+ Returns: boolean;
29529
+ };
29530
+ logistics_allowed_load_carriers: {
29531
+ Args: {
29532
+ p_strategy_id?: string;
29533
+ p_user_id?: string;
29534
+ };
29535
+ Returns: Json;
29536
+ };
29537
+ logistics_apply_buffer_decision: {
29538
+ Args: {
29539
+ p_order_id: string;
29540
+ };
29541
+ Returns: string;
29542
+ };
29543
+ logistics_apply_cart_swap: {
29544
+ Args: {
29545
+ p_delete_ids: string[];
29546
+ p_new_carts: Json;
29547
+ };
29548
+ Returns: Json;
29549
+ };
29550
+ logistics_apply_document_layouts: {
28739
29551
  Args: never;
28740
29552
  Returns: undefined;
28741
29553
  };
@@ -29411,6 +30223,15 @@ export type Database = {
29411
30223
  };
29412
30224
  Returns: Database["public"]["Enums"]["doc_layout_type"][];
29413
30225
  };
30226
+ logistics_double_group_lines: {
30227
+ Args: {
30228
+ p_order_id?: string;
30229
+ };
30230
+ Returns: {
30231
+ group_id: string;
30232
+ order_item_id: string;
30233
+ }[];
30234
+ };
29414
30235
  logistics_emit_event: {
29415
30236
  Args: {
29416
30237
  p_event_type: string;
@@ -29466,6 +30287,20 @@ export type Database = {
29466
30287
  };
29467
30288
  Returns: Json;
29468
30289
  };
30290
+ logistics_expand_line: {
30291
+ Args: {
30292
+ p_depth?: number;
30293
+ p_path?: string[];
30294
+ p_product_id: string;
30295
+ p_qty: number;
30296
+ };
30297
+ Returns: {
30298
+ kind: string;
30299
+ note: string;
30300
+ qty: number;
30301
+ ref: string;
30302
+ }[];
30303
+ };
29469
30304
  logistics_fail_task: {
29470
30305
  Args: {
29471
30306
  p_error: string;
@@ -29655,6 +30490,18 @@ export type Database = {
29655
30490
  };
29656
30491
  Returns: boolean;
29657
30492
  };
30493
+ logistics_frozen_allocation_scaled: {
30494
+ Args: {
30495
+ p_new_qty: number;
30496
+ p_order_item_id: string;
30497
+ };
30498
+ Returns: {
30499
+ group_id: string;
30500
+ qty: number;
30501
+ source: string;
30502
+ trade_item_key: string;
30503
+ }[];
30504
+ };
29658
30505
  logistics_fulfill_barcode_requests: {
29659
30506
  Args: {
29660
30507
  p_limit?: number;
@@ -29669,6 +30516,10 @@ export type Database = {
29669
30516
  Args: never;
29670
30517
  Returns: number;
29671
30518
  };
30519
+ logistics_is_beheer: {
30520
+ Args: never;
30521
+ Returns: boolean;
30522
+ };
29672
30523
  logistics_is_engine_response: {
29673
30524
  Args: {
29674
30525
  p_content: string;
@@ -29676,12 +30527,24 @@ export type Database = {
29676
30527
  };
29677
30528
  Returns: boolean;
29678
30529
  };
30530
+ logistics_is_group_label: {
30531
+ Args: {
30532
+ p_label: string;
30533
+ };
30534
+ Returns: boolean;
30535
+ };
29679
30536
  logistics_is_pick_workday: {
29680
30537
  Args: {
29681
30538
  p_date: string;
29682
30539
  };
29683
30540
  Returns: boolean;
29684
30541
  };
30542
+ logistics_key_product: {
30543
+ Args: {
30544
+ p_key: string;
30545
+ };
30546
+ Returns: string;
30547
+ };
29685
30548
  logistics_layout_method_status: {
29686
30549
  Args: never;
29687
30550
  Returns: Json;
@@ -29784,6 +30647,12 @@ export type Database = {
29784
30647
  };
29785
30648
  Returns: undefined;
29786
30649
  };
30650
+ logistics_order_current_warnings: {
30651
+ Args: {
30652
+ p_order_id: string;
30653
+ };
30654
+ Returns: string[];
30655
+ };
29787
30656
  logistics_order_documents_ready: {
29788
30657
  Args: {
29789
30658
  p_order_ref: string;
@@ -29858,6 +30727,12 @@ export type Database = {
29858
30727
  };
29859
30728
  Returns: boolean;
29860
30729
  };
30730
+ logistics_order_is_frozen: {
30731
+ Args: {
30732
+ p_order_id: string;
30733
+ };
30734
+ Returns: boolean;
30735
+ };
29861
30736
  logistics_order_is_topick: {
29862
30737
  Args: {
29863
30738
  p_order_id: string;
@@ -29865,6 +30740,18 @@ export type Database = {
29865
30740
  };
29866
30741
  Returns: boolean;
29867
30742
  };
30743
+ logistics_order_line_allocation: {
30744
+ Args: {
30745
+ p_order_item_id: string;
30746
+ };
30747
+ Returns: {
30748
+ group_id: string;
30749
+ note: string;
30750
+ qty: number;
30751
+ source: string;
30752
+ trade_item_key: string;
30753
+ }[];
30754
+ };
29868
30755
  logistics_order_line_duplicates: {
29869
30756
  Args: {
29870
30757
  p_order_id: string;
@@ -29908,6 +30795,30 @@ export type Database = {
29908
30795
  };
29909
30796
  Returns: string;
29910
30797
  };
30798
+ logistics_order_plan_coverage: {
30799
+ Args: {
30800
+ p_order_id: string;
30801
+ };
30802
+ Returns: Json;
30803
+ };
30804
+ logistics_order_plan_coverage_list: {
30805
+ Args: {
30806
+ p_order_ids: string[];
30807
+ };
30808
+ Returns: {
30809
+ buffer_id: string;
30810
+ cart_count: number;
30811
+ label: string;
30812
+ order_id: string;
30813
+ order_number: string;
30814
+ pick_row_count: number;
30815
+ pick_status: string;
30816
+ picked_at: string;
30817
+ progress_pct: number;
30818
+ reason: string;
30819
+ state: string;
30820
+ }[];
30821
+ };
29911
30822
  logistics_order_released: {
29912
30823
  Args: {
29913
30824
  p_order_ref: string;
@@ -30068,12 +30979,22 @@ export type Database = {
30068
30979
  order_id: string;
30069
30980
  }[];
30070
30981
  };
30982
+ logistics_plan_coverage_check: {
30983
+ Args: {
30984
+ p_limit?: number;
30985
+ };
30986
+ Returns: Json;
30987
+ };
30071
30988
  logistics_plan_defer: {
30072
30989
  Args: {
30073
30990
  p_id: string;
30074
30991
  };
30075
30992
  Returns: undefined;
30076
30993
  };
30994
+ logistics_plan_due_count: {
30995
+ Args: never;
30996
+ Returns: number;
30997
+ };
30077
30998
  logistics_plan_enqueue: {
30078
30999
  Args: {
30079
31000
  p_order_id: string;
@@ -30224,6 +31145,21 @@ export type Database = {
30224
31145
  Args: never;
30225
31146
  Returns: number;
30226
31147
  };
31148
+ logistics_plan_wachttijd: {
31149
+ Args: {
31150
+ p_order_id: string;
31151
+ p_reason: string;
31152
+ };
31153
+ Returns: Json;
31154
+ };
31155
+ logistics_plan_wachttijd_melden: {
31156
+ Args: {
31157
+ p_order_id: string;
31158
+ p_reason: string;
31159
+ p_wacht: Json;
31160
+ };
31161
+ Returns: undefined;
31162
+ };
30227
31163
  logistics_planner_cart_snapshot: {
30228
31164
  Args: {
30229
31165
  p_buffer_id: string;
@@ -30239,6 +31175,23 @@ export type Database = {
30239
31175
  Args: never;
30240
31176
  Returns: number;
30241
31177
  };
31178
+ logistics_planner_lines: {
31179
+ Args: {
31180
+ p_order_id: string;
31181
+ };
31182
+ Returns: {
31183
+ components: Json;
31184
+ frozen: boolean;
31185
+ group_id: string;
31186
+ note: string;
31187
+ order_item_id: string;
31188
+ product_id: string;
31189
+ product_name: string;
31190
+ qty: number;
31191
+ trade_item_key: string;
31192
+ unit_kind: string;
31193
+ }[];
31194
+ };
30242
31195
  logistics_prepare_pick_documents: {
30243
31196
  Args: {
30244
31197
  p_limit?: number;
@@ -30310,6 +31263,12 @@ export type Database = {
30310
31263
  Args: never;
30311
31264
  Returns: number;
30312
31265
  };
31266
+ logistics_recompute_reserved_targeted: {
31267
+ Args: {
31268
+ p_product_id: string;
31269
+ };
31270
+ Returns: Json;
31271
+ };
30313
31272
  logistics_reconcile_missing_plan_queue: {
30314
31273
  Args: never;
30315
31274
  Returns: number;
@@ -30344,6 +31303,16 @@ export type Database = {
30344
31303
  };
30345
31304
  Returns: Json;
30346
31305
  };
31306
+ logistics_replan_candidates: {
31307
+ Args: {
31308
+ p_delivery_date?: string;
31309
+ p_include_frozen?: boolean;
31310
+ };
31311
+ Returns: {
31312
+ frozen: boolean;
31313
+ order_id: string;
31314
+ }[];
31315
+ };
30347
31316
  logistics_replan_clear_foreign_cart_items: {
30348
31317
  Args: {
30349
31318
  p_order_id: string;
@@ -30363,6 +31332,28 @@ export type Database = {
30363
31332
  };
30364
31333
  Returns: Json;
30365
31334
  };
31335
+ logistics_replan_preview: {
31336
+ Args: {
31337
+ p_delivery_date?: string;
31338
+ p_include_frozen?: boolean;
31339
+ };
31340
+ Returns: Json;
31341
+ };
31342
+ logistics_replan_selected: {
31343
+ Args: {
31344
+ p_confirm_count: number;
31345
+ p_delivery_date?: string;
31346
+ p_include_frozen?: boolean;
31347
+ };
31348
+ Returns: Json;
31349
+ };
31350
+ logistics_replan_selected_orders: {
31351
+ Args: {
31352
+ p_order_ids: string[];
31353
+ p_reason?: string;
31354
+ };
31355
+ Returns: Json;
31356
+ };
30366
31357
  logistics_report_delay: {
30367
31358
  Args: {
30368
31359
  p_expected_date?: string;
@@ -30379,6 +31370,12 @@ export type Database = {
30379
31370
  };
30380
31371
  Returns: string;
30381
31372
  };
31373
+ logistics_report_frozen_shortage: {
31374
+ Args: {
31375
+ p_order_item_ids: string[];
31376
+ };
31377
+ Returns: undefined;
31378
+ };
30382
31379
  logistics_rescan_orders: {
30383
31380
  Args: {
30384
31381
  p_days?: number;
@@ -30407,6 +31404,13 @@ export type Database = {
30407
31404
  };
30408
31405
  Returns: Json;
30409
31406
  };
31407
+ logistics_reserved_fast_skip: {
31408
+ Args: {
31409
+ p_key: string;
31410
+ p_raw: string;
31411
+ };
31412
+ Returns: boolean;
31413
+ };
30410
31414
  logistics_reserved_key: {
30411
31415
  Args: {
30412
31416
  p_key: string;
@@ -30432,6 +31436,12 @@ export type Database = {
30432
31436
  };
30433
31437
  Returns: string;
30434
31438
  };
31439
+ logistics_resolve_product_match: {
31440
+ Args: {
31441
+ p_label: string;
31442
+ };
31443
+ Returns: Record<string, unknown>;
31444
+ };
30435
31445
  logistics_resolve_settings: {
30436
31446
  Args: {
30437
31447
  p_config_id: string;
@@ -30506,6 +31516,13 @@ export type Database = {
30506
31516
  };
30507
31517
  Returns: number;
30508
31518
  };
31519
+ logistics_set_components_scaled: {
31520
+ Args: {
31521
+ p_order_item_id: string;
31522
+ p_plants: number;
31523
+ };
31524
+ Returns: Json;
31525
+ };
30509
31526
  logistics_set_order_priority: {
30510
31527
  Args: {
30511
31528
  p_order_ref: string;
@@ -30552,6 +31569,16 @@ export type Database = {
30552
31569
  };
30553
31570
  Returns: string;
30554
31571
  };
31572
+ logistics_shipping_note_max_attempts: {
31573
+ Args: never;
31574
+ Returns: number;
31575
+ };
31576
+ logistics_shipping_note_release: {
31577
+ Args: {
31578
+ _order_number?: string;
31579
+ };
31580
+ Returns: number;
31581
+ };
30555
31582
  logistics_shipping_note_status: {
30556
31583
  Args: {
30557
31584
  p_cart_id?: string;
@@ -30559,6 +31586,12 @@ export type Database = {
30559
31586
  };
30560
31587
  Returns: Json;
30561
31588
  };
31589
+ logistics_shipping_note_wake: {
31590
+ Args: {
31591
+ _slip_job_id: string;
31592
+ };
31593
+ Returns: number;
31594
+ };
30562
31595
  logistics_shipping_notes_wake_all: {
30563
31596
  Args: never;
30564
31597
  Returns: Json;
@@ -30593,6 +31626,7 @@ export type Database = {
30593
31626
  slip_job_id: string;
30594
31627
  status: string;
30595
31628
  updated_at: string;
31629
+ voor_herstel: boolean;
30596
31630
  }[];
30597
31631
  SetofOptions: {
30598
31632
  from: "*";
@@ -30613,6 +31647,13 @@ export type Database = {
30613
31647
  };
30614
31648
  Returns: undefined;
30615
31649
  };
31650
+ logistics_slip_note_hold: {
31651
+ Args: {
31652
+ _id: string;
31653
+ _reason: string;
31654
+ };
31655
+ Returns: undefined;
31656
+ };
30616
31657
  logistics_slip_note_keep_waiting: {
30617
31658
  Args: {
30618
31659
  _class?: string;
@@ -32016,6 +33057,12 @@ export type Database = {
32016
33057
  };
32017
33058
  Returns: Json;
32018
33059
  };
33060
+ process_inventory_recompute_queue: {
33061
+ Args: {
33062
+ p_limit?: number;
33063
+ };
33064
+ Returns: number;
33065
+ };
32019
33066
  process_logistics_event: {
32020
33067
  Args: {
32021
33068
  p_event_id: string;
@@ -32030,6 +33077,80 @@ export type Database = {
32030
33077
  };
32031
33078
  Returns: Json;
32032
33079
  };
33080
+ product_active_group_id: {
33081
+ Args: {
33082
+ p_product_id: string;
33083
+ };
33084
+ Returns: string;
33085
+ };
33086
+ product_id_from_ref: {
33087
+ Args: {
33088
+ p_ref: string;
33089
+ };
33090
+ Returns: string;
33091
+ };
33092
+ product_is_set: {
33093
+ Args: {
33094
+ p_product_id: string;
33095
+ };
33096
+ Returns: boolean;
33097
+ };
33098
+ product_label: {
33099
+ Args: {
33100
+ p_id: string;
33101
+ };
33102
+ Returns: string;
33103
+ };
33104
+ product_member_group_ids: {
33105
+ Args: {
33106
+ p_product_id: string;
33107
+ };
33108
+ Returns: string[];
33109
+ };
33110
+ product_own_available: {
33111
+ Args: {
33112
+ p_connection_id: string;
33113
+ p_product_id: string;
33114
+ };
33115
+ Returns: Record<string, unknown>;
33116
+ };
33117
+ product_set_depth_above: {
33118
+ Args: {
33119
+ p_path?: string[];
33120
+ p_product_id: string;
33121
+ };
33122
+ Returns: number;
33123
+ };
33124
+ product_set_depth_below: {
33125
+ Args: {
33126
+ p_path?: string[];
33127
+ p_product_id: string;
33128
+ };
33129
+ Returns: number;
33130
+ };
33131
+ product_structure_ancestors: {
33132
+ Args: {
33133
+ p_product_ids: string[];
33134
+ };
33135
+ Returns: string[];
33136
+ };
33137
+ product_structure_max_depth: {
33138
+ Args: never;
33139
+ Returns: number;
33140
+ };
33141
+ product_structure_path: {
33142
+ Args: {
33143
+ p_from: string;
33144
+ p_target: string;
33145
+ };
33146
+ Returns: string[];
33147
+ };
33148
+ product_type: {
33149
+ Args: {
33150
+ p_product_id: string;
33151
+ };
33152
+ Returns: string;
33153
+ };
32033
33154
  promote_floriday_customer: {
32034
33155
  Args: {
32035
33156
  _org_id: string;
@@ -32270,6 +33391,14 @@ export type Database = {
32270
33391
  };
32271
33392
  Returns: Json;
32272
33393
  };
33394
+ requeue_skipped_stock_rows: {
33395
+ Args: {
33396
+ p_connection_id: string;
33397
+ p_status: string;
33398
+ p_trade_item_id?: string;
33399
+ };
33400
+ Returns: number;
33401
+ };
32273
33402
  reset_cart_layer_positions: {
32274
33403
  Args: {
32275
33404
  p_cart_id: string;
@@ -32354,6 +33483,10 @@ export type Database = {
32354
33483
  };
32355
33484
  Returns: number;
32356
33485
  };
33486
+ run_floriday_base_supply_process: {
33487
+ Args: never;
33488
+ Returns: undefined;
33489
+ };
32357
33490
  run_floriday_continuous_stock_sync: {
32358
33491
  Args: never;
32359
33492
  Returns: undefined;
@@ -32382,6 +33515,41 @@ export type Database = {
32382
33515
  Args: never;
32383
33516
  Returns: undefined;
32384
33517
  };
33518
+ save_belading: {
33519
+ Args: {
33520
+ p_expected_updated_at: string;
33521
+ p_packing_configuration_id: string;
33522
+ p_product_id: string;
33523
+ p_tenant_id: string;
33524
+ p_trade_item_floriday_id: string;
33525
+ p_values: Json;
33526
+ };
33527
+ Returns: Json;
33528
+ };
33529
+ save_product_group: {
33530
+ Args: {
33531
+ p_description: string;
33532
+ p_expected_updated_at: string;
33533
+ p_head_product_id: string;
33534
+ p_id: string;
33535
+ p_is_active: boolean;
33536
+ p_members: Json;
33537
+ p_name: string;
33538
+ };
33539
+ Returns: Json;
33540
+ };
33541
+ save_samenstelling: {
33542
+ Args: {
33543
+ p_components: Json;
33544
+ p_expected_updated_at: string;
33545
+ p_external: Json;
33546
+ p_packing_configuration_id: string;
33547
+ p_parent_id: string;
33548
+ p_parent_kind: string;
33549
+ p_tenant_id: string;
33550
+ };
33551
+ Returns: Json;
33552
+ };
32385
33553
  scan_cancel_kar: {
32386
33554
  Args: {
32387
33555
  p_kar_id: string;
@@ -32915,6 +34083,40 @@ export type Database = {
32915
34083
  };
32916
34084
  Returns: Json;
32917
34085
  };
34086
+ stock_import_cleanup: {
34087
+ Args: never;
34088
+ Returns: number;
34089
+ };
34090
+ stock_import_create: {
34091
+ Args: {
34092
+ p_connection_id: string;
34093
+ p_file_hash: string;
34094
+ p_filename: string;
34095
+ p_force?: boolean;
34096
+ p_rows: Json;
34097
+ };
34098
+ Returns: Json;
34099
+ };
34100
+ stock_import_process_chunk: {
34101
+ Args: {
34102
+ p_chunk_no: number;
34103
+ p_run_id: string;
34104
+ };
34105
+ Returns: Json;
34106
+ };
34107
+ stock_import_stop: {
34108
+ Args: {
34109
+ p_run_id: string;
34110
+ };
34111
+ Returns: Json;
34112
+ };
34113
+ stock_import_undo_chunk: {
34114
+ Args: {
34115
+ p_chunk_no: number;
34116
+ p_run_id: string;
34117
+ };
34118
+ Returns: Json;
34119
+ };
32918
34120
  stop_time_log: {
32919
34121
  Args: {
32920
34122
  p_employee_id: string;
@@ -33644,16 +34846,40 @@ export type Database = {
33644
34846
  };
33645
34847
  Returns: Json;
33646
34848
  };
34849
+ voorraad_can_write: {
34850
+ Args: never;
34851
+ Returns: boolean;
34852
+ };
33647
34853
  voorraad_cleanup_old_rows: {
33648
34854
  Args: never;
33649
34855
  Returns: Json;
33650
34856
  };
34857
+ voorraad_production_enabled: {
34858
+ Args: never;
34859
+ Returns: boolean;
34860
+ };
34861
+ voorraad_week_is_past: {
34862
+ Args: {
34863
+ p_week: number;
34864
+ p_year: number;
34865
+ };
34866
+ Returns: boolean;
34867
+ };
33651
34868
  wake_print_queue: {
33652
34869
  Args: {
33653
34870
  _min_interval_ms?: number;
33654
34871
  };
33655
34872
  Returns: number;
33656
34873
  };
34874
+ werkbon_format_project_number: {
34875
+ Args: {
34876
+ _parent_project_number?: string;
34877
+ _sequence_number: number;
34878
+ _source_type: string;
34879
+ _version: number;
34880
+ };
34881
+ Returns: string;
34882
+ };
33657
34883
  werkbon_pakket_tijden: {
33658
34884
  Args: {
33659
34885
  _werkbon_id: string;
@@ -33676,6 +34902,14 @@ export type Database = {
33676
34902
  total_minutes: number;
33677
34903
  }[];
33678
34904
  };
34905
+ wo_boek_standby_uren: {
34906
+ Args: {
34907
+ _datum: string;
34908
+ _minuten: number;
34909
+ _werkbon_id: string;
34910
+ };
34911
+ Returns: Json;
34912
+ };
33679
34913
  wo_create_from_source: {
33680
34914
  Args: {
33681
34915
  _payload?: Json;