@flowselections/mailbox-orders 1.0.19 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist-lib/components/MailboxProcessedPage.js +1 -1
  2. package/dist-lib/components/MailboxProposalsPage.js +5 -5
  3. package/dist-lib/components/settings/MailboxAiPromptCard.js +2 -2
  4. package/dist-lib/components/settings/MailboxOrderTemplateCard.js +1 -1
  5. package/dist-lib/integrations/supabase/client.d.ts +2 -28697
  6. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  7. package/dist-lib/integrations/supabase/client.js +6 -13
  8. package/dist-lib/integrations/supabase/client.server.d.ts +1576 -63
  9. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  10. package/dist-lib/integrations/supabase/client.server.js +1 -1
  11. package/dist-lib/integrations/supabase/types.d.ts +1581 -55
  12. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  13. package/dist-lib/lib/ai-config.server.d.ts +1 -1
  14. package/dist-lib/lib/mailbox-ai-settings.functions.js +1 -1
  15. package/dist-lib/lib/mailbox-ai.server.d.ts +1 -1
  16. package/dist-lib/lib/mailbox-ingest.server.d.ts +1 -1
  17. package/dist-lib/lib/mailbox-ingest.server.js +1 -1
  18. package/dist-lib/lib/mailbox-template.functions.js +1 -1
  19. package/dist-lib/lib/mailbox.functions.d.ts +3 -3
  20. package/dist-lib/lib/mailbox.functions.js +22 -22
  21. package/package.json +3 -3
  22. package/dist-lib/components/CartAssignmentWizard.d.ts +0 -6
  23. package/dist-lib/components/CartAssignmentWizard.d.ts.map +0 -1
  24. package/dist-lib/components/CartAssignmentWizard.js +0 -199
  25. package/dist-lib/components/MailboxInboxPage.d.ts +0 -2
  26. package/dist-lib/components/MailboxInboxPage.d.ts.map +0 -1
  27. package/dist-lib/components/MailboxInboxPage.js +0 -120
  28. package/dist-lib/components/settings/ImapAccountsCard.d.ts +0 -2
  29. package/dist-lib/components/settings/ImapAccountsCard.d.ts.map +0 -1
  30. package/dist-lib/components/settings/ImapAccountsCard.js +0 -136
  31. package/dist-lib/components/settings/ImapProfilesCard.d.ts +0 -2
  32. package/dist-lib/components/settings/ImapProfilesCard.d.ts.map +0 -1
  33. package/dist-lib/components/settings/ImapProfilesCard.js +0 -101
  34. package/dist-lib/components/settings/MailboxSettingsCard.d.ts +0 -2
  35. package/dist-lib/components/settings/MailboxSettingsCard.d.ts.map +0 -1
  36. package/dist-lib/components/settings/MailboxSettingsCard.js +0 -85
  37. package/dist-lib/lib/imap.functions.d.ts +0 -32852
  38. package/dist-lib/lib/imap.functions.d.ts.map +0 -1
  39. package/dist-lib/lib/imap.functions.js +0 -235
  40. package/dist-lib/lib/mailbox-auto.server.d.ts +0 -9
  41. package/dist-lib/lib/mailbox-auto.server.d.ts.map +0 -1
  42. package/dist-lib/lib/mailbox-auto.server.js +0 -198
@@ -11,6 +11,7 @@ export type Database = {
11
11
  Row: {
12
12
  auto_print_delivery_note: boolean;
13
13
  auto_process_paused: boolean;
14
+ control_bulk_max_carts: number;
14
15
  created_at: string;
15
16
  extra_pick_days_with_stickers: number;
16
17
  id: string;
@@ -28,6 +29,7 @@ export type Database = {
28
29
  Insert: {
29
30
  auto_print_delivery_note?: boolean;
30
31
  auto_process_paused?: boolean;
32
+ control_bulk_max_carts?: number;
31
33
  created_at?: string;
32
34
  extra_pick_days_with_stickers?: number;
33
35
  id?: string;
@@ -45,6 +47,7 @@ export type Database = {
45
47
  Update: {
46
48
  auto_print_delivery_note?: boolean;
47
49
  auto_process_paused?: boolean;
50
+ control_bulk_max_carts?: number;
48
51
  created_at?: string;
49
52
  extra_pick_days_with_stickers?: number;
50
53
  id?: string;
@@ -553,7 +556,7 @@ export type Database = {
553
556
  Row: {
554
557
  consumer_module_id: string;
555
558
  created_at: string;
556
- credential_id: string | null;
559
+ credential_id: string;
557
560
  id: string;
558
561
  is_default: boolean;
559
562
  label: string | null;
@@ -564,7 +567,7 @@ export type Database = {
564
567
  Insert: {
565
568
  consumer_module_id: string;
566
569
  created_at?: string;
567
- credential_id?: string | null;
570
+ credential_id: string;
568
571
  id?: string;
569
572
  is_default?: boolean;
570
573
  label?: string | null;
@@ -575,7 +578,7 @@ export type Database = {
575
578
  Update: {
576
579
  consumer_module_id?: string;
577
580
  created_at?: string;
578
- credential_id?: string | null;
581
+ credential_id?: string;
579
582
  id?: string;
580
583
  is_default?: boolean;
581
584
  label?: string | null;
@@ -1411,6 +1414,7 @@ export type Database = {
1411
1414
  id: string;
1412
1415
  notes: string | null;
1413
1416
  performed_at: string;
1417
+ request_key: string | null;
1414
1418
  rescheduled_count: number;
1415
1419
  stock_consumed_at: string | null;
1416
1420
  total_carts: number;
@@ -1425,6 +1429,7 @@ export type Database = {
1425
1429
  id?: string;
1426
1430
  notes?: string | null;
1427
1431
  performed_at?: string;
1432
+ request_key?: string | null;
1428
1433
  rescheduled_count?: number;
1429
1434
  stock_consumed_at?: string | null;
1430
1435
  total_carts?: number;
@@ -1439,6 +1444,7 @@ export type Database = {
1439
1444
  id?: string;
1440
1445
  notes?: string | null;
1441
1446
  performed_at?: string;
1447
+ request_key?: string | null;
1442
1448
  rescheduled_count?: number;
1443
1449
  stock_consumed_at?: string | null;
1444
1450
  total_carts?: number;
@@ -1451,9 +1457,10 @@ export type Database = {
1451
1457
  Row: {
1452
1458
  assigned_at: string;
1453
1459
  cart_index: number;
1454
- cart_number: string | null;
1460
+ cart_number: string;
1455
1461
  day_seq: number | null;
1456
1462
  delivered_at: string | null;
1463
+ engine_cart_label: string | null;
1457
1464
  id: string;
1458
1465
  order_id: string;
1459
1466
  order_source: string;
@@ -1463,9 +1470,10 @@ export type Database = {
1463
1470
  Insert: {
1464
1471
  assigned_at?: string;
1465
1472
  cart_index: number;
1466
- cart_number?: string | null;
1473
+ cart_number: string;
1467
1474
  day_seq?: number | null;
1468
1475
  delivered_at?: string | null;
1476
+ engine_cart_label?: string | null;
1469
1477
  id?: string;
1470
1478
  order_id: string;
1471
1479
  order_source: string;
@@ -1475,9 +1483,10 @@ export type Database = {
1475
1483
  Update: {
1476
1484
  assigned_at?: string;
1477
1485
  cart_index?: number;
1478
- cart_number?: string | null;
1486
+ cart_number?: string;
1479
1487
  day_seq?: number | null;
1480
1488
  delivered_at?: string | null;
1489
+ engine_cart_label?: string | null;
1481
1490
  id?: string;
1482
1491
  order_id?: string;
1483
1492
  order_source?: string;
@@ -8756,13 +8765,22 @@ export type Database = {
8756
8765
  Row: {
8757
8766
  created_at: string;
8758
8767
  created_by: string | null;
8768
+ customer_address: string | null;
8769
+ customer_attention: string | null;
8770
+ customer_city: string | null;
8759
8771
  customer_id: string | null;
8760
8772
  customer_name: string | null;
8773
+ customer_postal_code: string | null;
8774
+ customer_vat_number: string | null;
8775
+ debtor_number: string | null;
8761
8776
  due_date: string | null;
8777
+ execution_date: string | null;
8762
8778
  id: string;
8763
8779
  invoice_date: string;
8764
8780
  invoice_number: string | null;
8765
8781
  note: string | null;
8782
+ payment_term_days: number;
8783
+ reference: string | null;
8766
8784
  source_number: string | null;
8767
8785
  source_ref: string | null;
8768
8786
  source_type: string;
@@ -8772,17 +8790,27 @@ export type Database = {
8772
8790
  updated_at: string;
8773
8791
  vat_cents: number;
8774
8792
  vat_rate: number;
8793
+ work_address: string | null;
8775
8794
  };
8776
8795
  Insert: {
8777
8796
  created_at?: string;
8778
8797
  created_by?: string | null;
8798
+ customer_address?: string | null;
8799
+ customer_attention?: string | null;
8800
+ customer_city?: string | null;
8779
8801
  customer_id?: string | null;
8780
8802
  customer_name?: string | null;
8803
+ customer_postal_code?: string | null;
8804
+ customer_vat_number?: string | null;
8805
+ debtor_number?: string | null;
8781
8806
  due_date?: string | null;
8807
+ execution_date?: string | null;
8782
8808
  id?: string;
8783
8809
  invoice_date?: string;
8784
8810
  invoice_number?: string | null;
8785
8811
  note?: string | null;
8812
+ payment_term_days?: number;
8813
+ reference?: string | null;
8786
8814
  source_number?: string | null;
8787
8815
  source_ref?: string | null;
8788
8816
  source_type?: string;
@@ -8792,17 +8820,27 @@ export type Database = {
8792
8820
  updated_at?: string;
8793
8821
  vat_cents?: number;
8794
8822
  vat_rate?: number;
8823
+ work_address?: string | null;
8795
8824
  };
8796
8825
  Update: {
8797
8826
  created_at?: string;
8798
8827
  created_by?: string | null;
8828
+ customer_address?: string | null;
8829
+ customer_attention?: string | null;
8830
+ customer_city?: string | null;
8799
8831
  customer_id?: string | null;
8800
8832
  customer_name?: string | null;
8833
+ customer_postal_code?: string | null;
8834
+ customer_vat_number?: string | null;
8835
+ debtor_number?: string | null;
8801
8836
  due_date?: string | null;
8837
+ execution_date?: string | null;
8802
8838
  id?: string;
8803
8839
  invoice_date?: string;
8804
8840
  invoice_number?: string | null;
8805
8841
  note?: string | null;
8842
+ payment_term_days?: number;
8843
+ reference?: string | null;
8806
8844
  source_number?: string | null;
8807
8845
  source_ref?: string | null;
8808
8846
  source_type?: string;
@@ -8812,6 +8850,7 @@ export type Database = {
8812
8850
  updated_at?: string;
8813
8851
  vat_cents?: number;
8814
8852
  vat_rate?: number;
8853
+ work_address?: string | null;
8815
8854
  };
8816
8855
  Relationships: [
8817
8856
  {
@@ -9599,6 +9638,44 @@ export type Database = {
9599
9638
  };
9600
9639
  Relationships: [];
9601
9640
  };
9641
+ itk_offerte_voorstel_status: {
9642
+ Row: {
9643
+ ai_concept: Json | null;
9644
+ created_at: string;
9645
+ id: string;
9646
+ offerte_id: string | null;
9647
+ proposal_id: string;
9648
+ seen_at: string | null;
9649
+ updated_at: string;
9650
+ };
9651
+ Insert: {
9652
+ ai_concept?: Json | null;
9653
+ created_at?: string;
9654
+ id?: string;
9655
+ offerte_id?: string | null;
9656
+ proposal_id: string;
9657
+ seen_at?: string | null;
9658
+ updated_at?: string;
9659
+ };
9660
+ Update: {
9661
+ ai_concept?: Json | null;
9662
+ created_at?: string;
9663
+ id?: string;
9664
+ offerte_id?: string | null;
9665
+ proposal_id?: string;
9666
+ seen_at?: string | null;
9667
+ updated_at?: string;
9668
+ };
9669
+ Relationships: [
9670
+ {
9671
+ foreignKeyName: "itk_offerte_voorstel_status_offerte_id_fkey";
9672
+ columns: ["offerte_id"];
9673
+ isOneToOne: false;
9674
+ referencedRelation: "itk_offertes";
9675
+ referencedColumns: ["id"];
9676
+ }
9677
+ ];
9678
+ };
9602
9679
  itk_offerte_werkbon_queue: {
9603
9680
  Row: {
9604
9681
  bron_werkbon_id: string | null;
@@ -9931,6 +10008,8 @@ export type Database = {
9931
10008
  };
9932
10009
  leave_requests: {
9933
10010
  Row: {
10011
+ cancellation_requested_at: string | null;
10012
+ cancellation_status: string | null;
9934
10013
  created_at: string;
9935
10014
  decided_at: string | null;
9936
10015
  decided_by: string | null;
@@ -9941,6 +10020,7 @@ export type Database = {
9941
10020
  leave_type: string;
9942
10021
  monteur_id: string | null;
9943
10022
  reason: string | null;
10023
+ reden_afkeur: string | null;
9944
10024
  start_date: string;
9945
10025
  start_time: string | null;
9946
10026
  status: string;
@@ -9948,6 +10028,8 @@ export type Database = {
9948
10028
  user_id: string;
9949
10029
  };
9950
10030
  Insert: {
10031
+ cancellation_requested_at?: string | null;
10032
+ cancellation_status?: string | null;
9951
10033
  created_at?: string;
9952
10034
  decided_at?: string | null;
9953
10035
  decided_by?: string | null;
@@ -9958,6 +10040,7 @@ export type Database = {
9958
10040
  leave_type?: string;
9959
10041
  monteur_id?: string | null;
9960
10042
  reason?: string | null;
10043
+ reden_afkeur?: string | null;
9961
10044
  start_date: string;
9962
10045
  start_time?: string | null;
9963
10046
  status?: string;
@@ -9965,6 +10048,8 @@ export type Database = {
9965
10048
  user_id: string;
9966
10049
  };
9967
10050
  Update: {
10051
+ cancellation_requested_at?: string | null;
10052
+ cancellation_status?: string | null;
9968
10053
  created_at?: string;
9969
10054
  decided_at?: string | null;
9970
10055
  decided_by?: string | null;
@@ -9975,6 +10060,7 @@ export type Database = {
9975
10060
  leave_type?: string;
9976
10061
  monteur_id?: string | null;
9977
10062
  reason?: string | null;
10063
+ reden_afkeur?: string | null;
9978
10064
  start_date?: string;
9979
10065
  start_time?: string | null;
9980
10066
  status?: string;
@@ -11145,6 +11231,54 @@ export type Database = {
11145
11231
  };
11146
11232
  Relationships: [];
11147
11233
  };
11234
+ logistics_order_finalize_queue: {
11235
+ Row: {
11236
+ attempts: number;
11237
+ claimed_at: string | null;
11238
+ created_at: string;
11239
+ finished_at: string | null;
11240
+ last_error: string | null;
11241
+ lease_until: string | null;
11242
+ max_attempts: number;
11243
+ next_attempt_at: string;
11244
+ order_id: string;
11245
+ reason: string | null;
11246
+ requested_at: string;
11247
+ status: string;
11248
+ updated_at: string;
11249
+ };
11250
+ Insert: {
11251
+ attempts?: number;
11252
+ claimed_at?: string | null;
11253
+ created_at?: string;
11254
+ finished_at?: string | null;
11255
+ last_error?: string | null;
11256
+ lease_until?: string | null;
11257
+ max_attempts?: number;
11258
+ next_attempt_at?: string;
11259
+ order_id: string;
11260
+ reason?: string | null;
11261
+ requested_at?: string;
11262
+ status?: string;
11263
+ updated_at?: string;
11264
+ };
11265
+ Update: {
11266
+ attempts?: number;
11267
+ claimed_at?: string | null;
11268
+ created_at?: string;
11269
+ finished_at?: string | null;
11270
+ last_error?: string | null;
11271
+ lease_until?: string | null;
11272
+ max_attempts?: number;
11273
+ next_attempt_at?: string;
11274
+ order_id?: string;
11275
+ reason?: string | null;
11276
+ requested_at?: string;
11277
+ status?: string;
11278
+ updated_at?: string;
11279
+ };
11280
+ Relationships: [];
11281
+ };
11148
11282
  logistics_order_merges: {
11149
11283
  Row: {
11150
11284
  group_key: string;
@@ -11181,6 +11315,72 @@ export type Database = {
11181
11315
  };
11182
11316
  Relationships: [];
11183
11317
  };
11318
+ logistics_packing_deviations: {
11319
+ Row: {
11320
+ auto_fixed_at: string | null;
11321
+ created_at: string;
11322
+ dev_key: string;
11323
+ first_seen_at: string;
11324
+ floriday_packing: Json;
11325
+ human_reason: string | null;
11326
+ id: string;
11327
+ last_seen_at: string;
11328
+ local_packing: Json;
11329
+ needs_human: boolean;
11330
+ order_id: string | null;
11331
+ order_item_id: string | null;
11332
+ order_number: string | null;
11333
+ product_id: string | null;
11334
+ product_name: string | null;
11335
+ resolved_at: string | null;
11336
+ scope: string;
11337
+ trade_item_id: string | null;
11338
+ updated_at: string;
11339
+ };
11340
+ Insert: {
11341
+ auto_fixed_at?: string | null;
11342
+ created_at?: string;
11343
+ dev_key: string;
11344
+ first_seen_at?: string;
11345
+ floriday_packing?: Json;
11346
+ human_reason?: string | null;
11347
+ id?: string;
11348
+ last_seen_at?: string;
11349
+ local_packing?: Json;
11350
+ needs_human?: boolean;
11351
+ order_id?: string | null;
11352
+ order_item_id?: string | null;
11353
+ order_number?: string | null;
11354
+ product_id?: string | null;
11355
+ product_name?: string | null;
11356
+ resolved_at?: string | null;
11357
+ scope: string;
11358
+ trade_item_id?: string | null;
11359
+ updated_at?: string;
11360
+ };
11361
+ Update: {
11362
+ auto_fixed_at?: string | null;
11363
+ created_at?: string;
11364
+ dev_key?: string;
11365
+ first_seen_at?: string;
11366
+ floriday_packing?: Json;
11367
+ human_reason?: string | null;
11368
+ id?: string;
11369
+ last_seen_at?: string;
11370
+ local_packing?: Json;
11371
+ needs_human?: boolean;
11372
+ order_id?: string | null;
11373
+ order_item_id?: string | null;
11374
+ order_number?: string | null;
11375
+ product_id?: string | null;
11376
+ product_name?: string | null;
11377
+ resolved_at?: string | null;
11378
+ scope?: string;
11379
+ trade_item_id?: string | null;
11380
+ updated_at?: string;
11381
+ };
11382
+ Relationships: [];
11383
+ };
11184
11384
  logistics_pick_data_requests: {
11185
11385
  Row: {
11186
11386
  actions: Json;
@@ -11259,6 +11459,30 @@ export type Database = {
11259
11459
  };
11260
11460
  Relationships: [];
11261
11461
  };
11462
+ logistics_plan_locks: {
11463
+ Row: {
11464
+ created_at: string;
11465
+ lock_key: string;
11466
+ locked_until: string;
11467
+ owner: string | null;
11468
+ updated_at: string;
11469
+ };
11470
+ Insert: {
11471
+ created_at?: string;
11472
+ lock_key: string;
11473
+ locked_until: string;
11474
+ owner?: string | null;
11475
+ updated_at?: string;
11476
+ };
11477
+ Update: {
11478
+ created_at?: string;
11479
+ lock_key?: string;
11480
+ locked_until?: string;
11481
+ owner?: string | null;
11482
+ updated_at?: string;
11483
+ };
11484
+ Relationships: [];
11485
+ };
11262
11486
  logistics_plan_queue: {
11263
11487
  Row: {
11264
11488
  attempts: number;
@@ -11403,8 +11627,10 @@ export type Database = {
11403
11627
  id: boolean;
11404
11628
  last_checked: number;
11405
11629
  last_duration_ms: number;
11630
+ last_mode: string | null;
11406
11631
  last_run_at: string | null;
11407
11632
  last_updated: number;
11633
+ last_would_change: number | null;
11408
11634
  pending: boolean;
11409
11635
  requested_at: string | null;
11410
11636
  updated_at: string;
@@ -11414,8 +11640,10 @@ export type Database = {
11414
11640
  id?: boolean;
11415
11641
  last_checked?: number;
11416
11642
  last_duration_ms?: number;
11643
+ last_mode?: string | null;
11417
11644
  last_run_at?: string | null;
11418
11645
  last_updated?: number;
11646
+ last_would_change?: number | null;
11419
11647
  pending?: boolean;
11420
11648
  requested_at?: string | null;
11421
11649
  updated_at?: string;
@@ -11425,8 +11653,10 @@ export type Database = {
11425
11653
  id?: boolean;
11426
11654
  last_checked?: number;
11427
11655
  last_duration_ms?: number;
11656
+ last_mode?: string | null;
11428
11657
  last_run_at?: string | null;
11429
11658
  last_updated?: number;
11659
+ last_would_change?: number | null;
11430
11660
  pending?: boolean;
11431
11661
  requested_at?: string | null;
11432
11662
  updated_at?: string;
@@ -12226,40 +12456,163 @@ export type Database = {
12226
12456
  };
12227
12457
  Relationships: [];
12228
12458
  };
12229
- logistics_variables: {
12459
+ logistics_trace_events_archive: {
12230
12460
  Row: {
12461
+ actor: string | null;
12462
+ attempts: number;
12463
+ calc: Json | null;
12464
+ cart_ref: string | null;
12231
12465
  created_at: string;
12232
- default_value: string | null;
12233
- description: string | null;
12466
+ db_action: string | null;
12467
+ db_new: Json | null;
12468
+ db_old: Json | null;
12469
+ db_record: string | null;
12470
+ db_table: string | null;
12471
+ decision: string | null;
12472
+ duration_ms: number | null;
12473
+ error: string | null;
12474
+ error_class: string | null;
12475
+ external_action: string | null;
12476
+ external_ref: string | null;
12477
+ external_response: Json | null;
12478
+ external_status: string | null;
12479
+ external_system: string | null;
12234
12480
  id: string;
12235
- is_builtin: boolean;
12236
- key: string;
12237
- label: string;
12238
- updated_at: string;
12239
- user_id: string;
12240
- value_type: string;
12481
+ input: Json | null;
12482
+ next_attempt_at: string | null;
12483
+ next_step: string | null;
12484
+ node_id: string | null;
12485
+ order_ref: string | null;
12486
+ order_source: string | null;
12487
+ output: Json | null;
12488
+ phase: string;
12489
+ reads: Json | null;
12490
+ reason: string | null;
12491
+ rule: string | null;
12492
+ slip_ref: string | null;
12493
+ status: string;
12494
+ step: string;
12495
+ superseded_at: string;
12496
+ superseded_reason: string | null;
12497
+ trace_id: string;
12498
+ values_used: Json | null;
12241
12499
  };
12242
12500
  Insert: {
12501
+ actor?: string | null;
12502
+ attempts?: number;
12503
+ calc?: Json | null;
12504
+ cart_ref?: string | null;
12243
12505
  created_at?: string;
12244
- default_value?: string | null;
12245
- description?: string | null;
12506
+ db_action?: string | null;
12507
+ db_new?: Json | null;
12508
+ db_old?: Json | null;
12509
+ db_record?: string | null;
12510
+ db_table?: string | null;
12511
+ decision?: string | null;
12512
+ duration_ms?: number | null;
12513
+ error?: string | null;
12514
+ error_class?: string | null;
12515
+ external_action?: string | null;
12516
+ external_ref?: string | null;
12517
+ external_response?: Json | null;
12518
+ external_status?: string | null;
12519
+ external_system?: string | null;
12246
12520
  id?: string;
12247
- is_builtin?: boolean;
12248
- key: string;
12249
- label: string;
12250
- updated_at?: string;
12251
- user_id: string;
12252
- value_type: string;
12521
+ input?: Json | null;
12522
+ next_attempt_at?: string | null;
12523
+ next_step?: string | null;
12524
+ node_id?: string | null;
12525
+ order_ref?: string | null;
12526
+ order_source?: string | null;
12527
+ output?: Json | null;
12528
+ phase: string;
12529
+ reads?: Json | null;
12530
+ reason?: string | null;
12531
+ rule?: string | null;
12532
+ slip_ref?: string | null;
12533
+ status: string;
12534
+ step: string;
12535
+ superseded_at?: string;
12536
+ superseded_reason?: string | null;
12537
+ trace_id?: string;
12538
+ values_used?: Json | null;
12253
12539
  };
12254
12540
  Update: {
12541
+ actor?: string | null;
12542
+ attempts?: number;
12543
+ calc?: Json | null;
12544
+ cart_ref?: string | null;
12255
12545
  created_at?: string;
12256
- default_value?: string | null;
12257
- description?: string | null;
12546
+ db_action?: string | null;
12547
+ db_new?: Json | null;
12548
+ db_old?: Json | null;
12549
+ db_record?: string | null;
12550
+ db_table?: string | null;
12551
+ decision?: string | null;
12552
+ duration_ms?: number | null;
12553
+ error?: string | null;
12554
+ error_class?: string | null;
12555
+ external_action?: string | null;
12556
+ external_ref?: string | null;
12557
+ external_response?: Json | null;
12558
+ external_status?: string | null;
12559
+ external_system?: string | null;
12258
12560
  id?: string;
12259
- is_builtin?: boolean;
12260
- key?: string;
12261
- label?: string;
12262
- updated_at?: string;
12561
+ input?: Json | null;
12562
+ next_attempt_at?: string | null;
12563
+ next_step?: string | null;
12564
+ node_id?: string | null;
12565
+ order_ref?: string | null;
12566
+ order_source?: string | null;
12567
+ output?: Json | null;
12568
+ phase?: string;
12569
+ reads?: Json | null;
12570
+ reason?: string | null;
12571
+ rule?: string | null;
12572
+ slip_ref?: string | null;
12573
+ status?: string;
12574
+ step?: string;
12575
+ superseded_at?: string;
12576
+ superseded_reason?: string | null;
12577
+ trace_id?: string;
12578
+ values_used?: Json | null;
12579
+ };
12580
+ Relationships: [];
12581
+ };
12582
+ logistics_variables: {
12583
+ Row: {
12584
+ created_at: string;
12585
+ default_value: string | null;
12586
+ description: string | null;
12587
+ id: string;
12588
+ is_builtin: boolean;
12589
+ key: string;
12590
+ label: string;
12591
+ updated_at: string;
12592
+ user_id: string;
12593
+ value_type: string;
12594
+ };
12595
+ Insert: {
12596
+ created_at?: string;
12597
+ default_value?: string | null;
12598
+ description?: string | null;
12599
+ id?: string;
12600
+ is_builtin?: boolean;
12601
+ key: string;
12602
+ label: string;
12603
+ updated_at?: string;
12604
+ user_id: string;
12605
+ value_type: string;
12606
+ };
12607
+ Update: {
12608
+ created_at?: string;
12609
+ default_value?: string | null;
12610
+ description?: string | null;
12611
+ id?: string;
12612
+ is_builtin?: boolean;
12613
+ key?: string;
12614
+ label?: string;
12615
+ updated_at?: string;
12263
12616
  user_id?: string;
12264
12617
  value_type?: string;
12265
12618
  };
@@ -13336,6 +13689,42 @@ export type Database = {
13336
13689
  };
13337
13690
  Relationships: [];
13338
13691
  };
13692
+ monteur_contracten: {
13693
+ Row: {
13694
+ contract_type: string;
13695
+ created_at: string;
13696
+ days_per_week: number;
13697
+ hours_per_week: number;
13698
+ id: string;
13699
+ updated_at: string;
13700
+ user_id: string;
13701
+ vacation_day_hours: number;
13702
+ vacation_days_per_year: number;
13703
+ };
13704
+ Insert: {
13705
+ contract_type?: string;
13706
+ created_at?: string;
13707
+ days_per_week?: number;
13708
+ hours_per_week?: number;
13709
+ id?: string;
13710
+ updated_at?: string;
13711
+ user_id: string;
13712
+ vacation_day_hours?: number;
13713
+ vacation_days_per_year?: number;
13714
+ };
13715
+ Update: {
13716
+ contract_type?: string;
13717
+ created_at?: string;
13718
+ days_per_week?: number;
13719
+ hours_per_week?: number;
13720
+ id?: string;
13721
+ updated_at?: string;
13722
+ user_id?: string;
13723
+ vacation_day_hours?: number;
13724
+ vacation_days_per_year?: number;
13725
+ };
13726
+ Relationships: [];
13727
+ };
13339
13728
  nmbrs_component_mapping: {
13340
13729
  Row: {
13341
13730
  created_at: string;
@@ -13827,6 +14216,9 @@ export type Database = {
13827
14216
  id: string;
13828
14217
  items: Json;
13829
14218
  notes: string | null;
14219
+ order_creation_error: string | null;
14220
+ order_creation_failed_at: string | null;
14221
+ order_id: string | null;
13830
14222
  order_number: string | null;
13831
14223
  recipient_id: string;
13832
14224
  total_amount: number;
@@ -13841,6 +14233,9 @@ export type Database = {
13841
14233
  id?: string;
13842
14234
  items?: Json;
13843
14235
  notes?: string | null;
14236
+ order_creation_error?: string | null;
14237
+ order_creation_failed_at?: string | null;
14238
+ order_id?: string | null;
13844
14239
  order_number?: string | null;
13845
14240
  recipient_id: string;
13846
14241
  total_amount?: number;
@@ -13855,6 +14250,9 @@ export type Database = {
13855
14250
  id?: string;
13856
14251
  items?: Json;
13857
14252
  notes?: string | null;
14253
+ order_creation_error?: string | null;
14254
+ order_creation_failed_at?: string | null;
14255
+ order_id?: string | null;
13858
14256
  order_number?: string | null;
13859
14257
  recipient_id?: string;
13860
14258
  total_amount?: number;
@@ -13874,6 +14272,13 @@ export type Database = {
13874
14272
  referencedRelation: "customers";
13875
14273
  referencedColumns: ["id"];
13876
14274
  },
14275
+ {
14276
+ foreignKeyName: "offer_orders_order_id_fkey";
14277
+ columns: ["order_id"];
14278
+ isOneToOne: false;
14279
+ referencedRelation: "orders";
14280
+ referencedColumns: ["id"];
14281
+ },
13877
14282
  {
13878
14283
  foreignKeyName: "offer_orders_recipient_id_fkey";
13879
14284
  columns: ["recipient_id"];
@@ -14019,6 +14424,30 @@ export type Database = {
14019
14424
  };
14020
14425
  Relationships: [];
14021
14426
  };
14427
+ order_block_notifications: {
14428
+ Row: {
14429
+ id: string;
14430
+ notified_at: string;
14431
+ order_id: string;
14432
+ reason: string | null;
14433
+ reason_key: string;
14434
+ };
14435
+ Insert: {
14436
+ id?: string;
14437
+ notified_at?: string;
14438
+ order_id: string;
14439
+ reason?: string | null;
14440
+ reason_key: string;
14441
+ };
14442
+ Update: {
14443
+ id?: string;
14444
+ notified_at?: string;
14445
+ order_id?: string;
14446
+ reason?: string | null;
14447
+ reason_key?: string;
14448
+ };
14449
+ Relationships: [];
14450
+ };
14022
14451
  order_buffers: {
14023
14452
  Row: {
14024
14453
  buffer_key: string;
@@ -14505,10 +14934,13 @@ export type Database = {
14505
14934
  id: string;
14506
14935
  layers_per_cart: number | null;
14507
14936
  order_id: string;
14937
+ packing_locked_at: string | null;
14938
+ packing_locked_by: string | null;
14508
14939
  plants_per_crate: number | null;
14509
14940
  product_id: string | null;
14510
14941
  product_name: string;
14511
14942
  quantity: number;
14943
+ source_line_key: string | null;
14512
14944
  unit: string;
14513
14945
  unit_price: number | null;
14514
14946
  };
@@ -14518,10 +14950,13 @@ export type Database = {
14518
14950
  id?: string;
14519
14951
  layers_per_cart?: number | null;
14520
14952
  order_id: string;
14953
+ packing_locked_at?: string | null;
14954
+ packing_locked_by?: string | null;
14521
14955
  plants_per_crate?: number | null;
14522
14956
  product_id?: string | null;
14523
14957
  product_name: string;
14524
14958
  quantity?: number;
14959
+ source_line_key?: string | null;
14525
14960
  unit?: string;
14526
14961
  unit_price?: number | null;
14527
14962
  };
@@ -14531,10 +14966,13 @@ export type Database = {
14531
14966
  id?: string;
14532
14967
  layers_per_cart?: number | null;
14533
14968
  order_id?: string;
14969
+ packing_locked_at?: string | null;
14970
+ packing_locked_by?: string | null;
14534
14971
  plants_per_crate?: number | null;
14535
14972
  product_id?: string | null;
14536
14973
  product_name?: string;
14537
14974
  quantity?: number;
14975
+ source_line_key?: string | null;
14538
14976
  unit?: string;
14539
14977
  unit_price?: number | null;
14540
14978
  };
@@ -16097,6 +16535,202 @@ export type Database = {
16097
16535
  }
16098
16536
  ];
16099
16537
  };
16538
+ planning_monteur_day_locations: {
16539
+ Row: {
16540
+ created_at: string;
16541
+ day: string;
16542
+ end_at: string;
16543
+ id: string;
16544
+ monteur_id: string;
16545
+ start_from: string;
16546
+ updated_at: string;
16547
+ };
16548
+ Insert: {
16549
+ created_at?: string;
16550
+ day: string;
16551
+ end_at?: string;
16552
+ id?: string;
16553
+ monteur_id: string;
16554
+ start_from?: string;
16555
+ updated_at?: string;
16556
+ };
16557
+ Update: {
16558
+ created_at?: string;
16559
+ day?: string;
16560
+ end_at?: string;
16561
+ id?: string;
16562
+ monteur_id?: string;
16563
+ start_from?: string;
16564
+ updated_at?: string;
16565
+ };
16566
+ Relationships: [];
16567
+ };
16568
+ planning_monteur_locations: {
16569
+ Row: {
16570
+ created_at: string;
16571
+ default_end: string;
16572
+ default_start: string;
16573
+ end_address: string | null;
16574
+ home_address: string | null;
16575
+ id: string;
16576
+ monteur_id: string;
16577
+ start_address: string | null;
16578
+ updated_at: string;
16579
+ };
16580
+ Insert: {
16581
+ created_at?: string;
16582
+ default_end?: string;
16583
+ default_start?: string;
16584
+ end_address?: string | null;
16585
+ home_address?: string | null;
16586
+ id?: string;
16587
+ monteur_id: string;
16588
+ start_address?: string | null;
16589
+ updated_at?: string;
16590
+ };
16591
+ Update: {
16592
+ created_at?: string;
16593
+ default_end?: string;
16594
+ default_start?: string;
16595
+ end_address?: string | null;
16596
+ home_address?: string | null;
16597
+ id?: string;
16598
+ monteur_id?: string;
16599
+ start_address?: string | null;
16600
+ updated_at?: string;
16601
+ };
16602
+ Relationships: [];
16603
+ };
16604
+ planning_settings: {
16605
+ Row: {
16606
+ company_address: string | null;
16607
+ created_at: string;
16608
+ id: string;
16609
+ singleton: boolean;
16610
+ updated_at: string;
16611
+ };
16612
+ Insert: {
16613
+ company_address?: string | null;
16614
+ created_at?: string;
16615
+ id?: string;
16616
+ singleton?: boolean;
16617
+ updated_at?: string;
16618
+ };
16619
+ Update: {
16620
+ company_address?: string | null;
16621
+ created_at?: string;
16622
+ id?: string;
16623
+ singleton?: boolean;
16624
+ updated_at?: string;
16625
+ };
16626
+ Relationships: [];
16627
+ };
16628
+ planning_travel_legs: {
16629
+ Row: {
16630
+ after_min: number;
16631
+ after_reason: string | null;
16632
+ after_status: string;
16633
+ after_to_address: string | null;
16634
+ before_from_address: string | null;
16635
+ before_min: number;
16636
+ before_reason: string | null;
16637
+ before_status: string;
16638
+ computed_at: string;
16639
+ computed_end_at: string | null;
16640
+ computed_start_at: string | null;
16641
+ created_at: string;
16642
+ id: string;
16643
+ monteur_id: string;
16644
+ planning_item_id: string;
16645
+ shared_after_item_id: string | null;
16646
+ shared_before_item_id: string | null;
16647
+ updated_at: string;
16648
+ };
16649
+ Insert: {
16650
+ after_min?: number;
16651
+ after_reason?: string | null;
16652
+ after_status?: string;
16653
+ after_to_address?: string | null;
16654
+ before_from_address?: string | null;
16655
+ before_min?: number;
16656
+ before_reason?: string | null;
16657
+ before_status?: string;
16658
+ computed_at?: string;
16659
+ computed_end_at?: string | null;
16660
+ computed_start_at?: string | null;
16661
+ created_at?: string;
16662
+ id?: string;
16663
+ monteur_id: string;
16664
+ planning_item_id: string;
16665
+ shared_after_item_id?: string | null;
16666
+ shared_before_item_id?: string | null;
16667
+ updated_at?: string;
16668
+ };
16669
+ Update: {
16670
+ after_min?: number;
16671
+ after_reason?: string | null;
16672
+ after_status?: string;
16673
+ after_to_address?: string | null;
16674
+ before_from_address?: string | null;
16675
+ before_min?: number;
16676
+ before_reason?: string | null;
16677
+ before_status?: string;
16678
+ computed_at?: string;
16679
+ computed_end_at?: string | null;
16680
+ computed_start_at?: string | null;
16681
+ created_at?: string;
16682
+ id?: string;
16683
+ monteur_id?: string;
16684
+ planning_item_id?: string;
16685
+ shared_after_item_id?: string | null;
16686
+ shared_before_item_id?: string | null;
16687
+ updated_at?: string;
16688
+ };
16689
+ Relationships: [
16690
+ {
16691
+ foreignKeyName: "planning_travel_legs_planning_item_id_fkey";
16692
+ columns: ["planning_item_id"];
16693
+ isOneToOne: false;
16694
+ referencedRelation: "planning_items";
16695
+ referencedColumns: ["id"];
16696
+ },
16697
+ {
16698
+ foreignKeyName: "planning_travel_legs_planning_item_id_fkey";
16699
+ columns: ["planning_item_id"];
16700
+ isOneToOne: false;
16701
+ referencedRelation: "planning_overview";
16702
+ referencedColumns: ["id"];
16703
+ },
16704
+ {
16705
+ foreignKeyName: "planning_travel_legs_shared_after_item_id_fkey";
16706
+ columns: ["shared_after_item_id"];
16707
+ isOneToOne: false;
16708
+ referencedRelation: "planning_items";
16709
+ referencedColumns: ["id"];
16710
+ },
16711
+ {
16712
+ foreignKeyName: "planning_travel_legs_shared_after_item_id_fkey";
16713
+ columns: ["shared_after_item_id"];
16714
+ isOneToOne: false;
16715
+ referencedRelation: "planning_overview";
16716
+ referencedColumns: ["id"];
16717
+ },
16718
+ {
16719
+ foreignKeyName: "planning_travel_legs_shared_before_item_id_fkey";
16720
+ columns: ["shared_before_item_id"];
16721
+ isOneToOne: false;
16722
+ referencedRelation: "planning_items";
16723
+ referencedColumns: ["id"];
16724
+ },
16725
+ {
16726
+ foreignKeyName: "planning_travel_legs_shared_before_item_id_fkey";
16727
+ columns: ["shared_before_item_id"];
16728
+ isOneToOne: false;
16729
+ referencedRelation: "planning_overview";
16730
+ referencedColumns: ["id"];
16731
+ }
16732
+ ];
16733
+ };
16100
16734
  price_list_rows: {
16101
16735
  Row: {
16102
16736
  action: string;
@@ -17425,6 +18059,8 @@ export type Database = {
17425
18059
  crates_per_layer: number;
17426
18060
  created_at: string;
17427
18061
  custom_fields: Json;
18062
+ floriday_packing_confirmed_at: string | null;
18063
+ floriday_packing_source: string | null;
17428
18064
  floriday_trade_item_id: string | null;
17429
18065
  fust_type_id: string | null;
17430
18066
  id: string;
@@ -17453,6 +18089,8 @@ export type Database = {
17453
18089
  crates_per_layer?: number;
17454
18090
  created_at?: string;
17455
18091
  custom_fields?: Json;
18092
+ floriday_packing_confirmed_at?: string | null;
18093
+ floriday_packing_source?: string | null;
17456
18094
  floriday_trade_item_id?: string | null;
17457
18095
  fust_type_id?: string | null;
17458
18096
  id?: string;
@@ -17481,6 +18119,8 @@ export type Database = {
17481
18119
  crates_per_layer?: number;
17482
18120
  created_at?: string;
17483
18121
  custom_fields?: Json;
18122
+ floriday_packing_confirmed_at?: string | null;
18123
+ floriday_packing_source?: string | null;
17484
18124
  floriday_trade_item_id?: string | null;
17485
18125
  fust_type_id?: string | null;
17486
18126
  id?: string;
@@ -17587,6 +18227,7 @@ export type Database = {
17587
18227
  id: string;
17588
18228
  is_superadmin: boolean;
17589
18229
  notification_preferences: Json;
18230
+ phone: string | null;
17590
18231
  tenant_id: string | null;
17591
18232
  updated_at: string;
17592
18233
  };
@@ -17599,6 +18240,7 @@ export type Database = {
17599
18240
  id: string;
17600
18241
  is_superadmin?: boolean;
17601
18242
  notification_preferences?: Json;
18243
+ phone?: string | null;
17602
18244
  tenant_id?: string | null;
17603
18245
  updated_at?: string;
17604
18246
  };
@@ -17611,6 +18253,7 @@ export type Database = {
17611
18253
  id?: string;
17612
18254
  is_superadmin?: boolean;
17613
18255
  notification_preferences?: Json;
18256
+ phone?: string | null;
17614
18257
  tenant_id?: string | null;
17615
18258
  updated_at?: string;
17616
18259
  };
@@ -19408,40 +20051,52 @@ export type Database = {
19408
20051
  Row: {
19409
20052
  approved_at: string | null;
19410
20053
  approved_by: string | null;
20054
+ contract_hours: number;
19411
20055
  created_at: string;
19412
20056
  employee_id: string;
19413
20057
  id: string;
19414
20058
  locked: boolean;
20059
+ monteur_toelichting: string | null;
19415
20060
  notes: string | null;
20061
+ planned_hours: number;
19416
20062
  status: string;
19417
20063
  submitted_at: string | null;
19418
20064
  updated_at: string;
20065
+ variance_hours: number;
19419
20066
  week_start: string;
19420
20067
  };
19421
20068
  Insert: {
19422
20069
  approved_at?: string | null;
19423
20070
  approved_by?: string | null;
20071
+ contract_hours?: number;
19424
20072
  created_at?: string;
19425
20073
  employee_id: string;
19426
20074
  id?: string;
19427
20075
  locked?: boolean;
20076
+ monteur_toelichting?: string | null;
19428
20077
  notes?: string | null;
20078
+ planned_hours?: number;
19429
20079
  status?: string;
19430
20080
  submitted_at?: string | null;
19431
20081
  updated_at?: string;
20082
+ variance_hours?: number;
19432
20083
  week_start: string;
19433
20084
  };
19434
20085
  Update: {
19435
20086
  approved_at?: string | null;
19436
20087
  approved_by?: string | null;
20088
+ contract_hours?: number;
19437
20089
  created_at?: string;
19438
20090
  employee_id?: string;
19439
20091
  id?: string;
19440
20092
  locked?: boolean;
20093
+ monteur_toelichting?: string | null;
19441
20094
  notes?: string | null;
20095
+ planned_hours?: number;
19442
20096
  status?: string;
19443
20097
  submitted_at?: string | null;
19444
20098
  updated_at?: string;
20099
+ variance_hours?: number;
19445
20100
  week_start?: string;
19446
20101
  };
19447
20102
  Relationships: [
@@ -20800,6 +21455,45 @@ export type Database = {
20800
21455
  }
20801
21456
  ];
20802
21457
  };
21458
+ uren_beschikbare_dagen: {
21459
+ Row: {
21460
+ bron: string;
21461
+ created_at: string;
21462
+ datum: string;
21463
+ eind_tijd: string | null;
21464
+ half_hour_slots: number[];
21465
+ id: string;
21466
+ monteur_id: string;
21467
+ start_tijd: string | null;
21468
+ updated_at: string;
21469
+ uren: number;
21470
+ };
21471
+ Insert: {
21472
+ bron?: string;
21473
+ created_at?: string;
21474
+ datum: string;
21475
+ eind_tijd?: string | null;
21476
+ half_hour_slots?: number[];
21477
+ id?: string;
21478
+ monteur_id: string;
21479
+ start_tijd?: string | null;
21480
+ updated_at?: string;
21481
+ uren?: number;
21482
+ };
21483
+ Update: {
21484
+ bron?: string;
21485
+ created_at?: string;
21486
+ datum?: string;
21487
+ eind_tijd?: string | null;
21488
+ half_hour_slots?: number[];
21489
+ id?: string;
21490
+ monteur_id?: string;
21491
+ start_tijd?: string | null;
21492
+ updated_at?: string;
21493
+ uren?: number;
21494
+ };
21495
+ Relationships: [];
21496
+ };
20803
21497
  uren_cao_profiles: {
20804
21498
  Row: {
20805
21499
  break_minutes: number | null;
@@ -20941,14 +21635,131 @@ export type Database = {
20941
21635
  };
20942
21636
  Relationships: [];
20943
21637
  };
20944
- uren_settings: {
21638
+ uren_maandafsluitingen: {
20945
21639
  Row: {
20946
- break_minutes: number;
21640
+ afgesloten_at: string | null;
21641
+ afgesloten_door: string | null;
21642
+ contract_minuten: number;
21643
+ correctie_reden: string | null;
20947
21644
  created_at: string;
20948
- daily_threshold_hours: number;
20949
- id: boolean;
20950
- include_travel: boolean;
20951
- min_occupancy_monteurs: number;
21645
+ gecorrigeerd_at: string | null;
21646
+ gecorrigeerd_door: string | null;
21647
+ gewerkte_minuten: number;
21648
+ id: string;
21649
+ maand: string;
21650
+ min_minuten: number;
21651
+ monteur_id: string;
21652
+ netto_verschil_minuten: number;
21653
+ normaal_uitbetaald_minuten: number;
21654
+ overuren_minuten: number;
21655
+ plus_minuten: number;
21656
+ status: string;
21657
+ totaal_uitbetaald_minuten: number;
21658
+ updated_at: string;
21659
+ };
21660
+ Insert: {
21661
+ afgesloten_at?: string | null;
21662
+ afgesloten_door?: string | null;
21663
+ contract_minuten?: number;
21664
+ correctie_reden?: string | null;
21665
+ created_at?: string;
21666
+ gecorrigeerd_at?: string | null;
21667
+ gecorrigeerd_door?: string | null;
21668
+ gewerkte_minuten?: number;
21669
+ id?: string;
21670
+ maand: string;
21671
+ min_minuten?: number;
21672
+ monteur_id: string;
21673
+ netto_verschil_minuten?: number;
21674
+ normaal_uitbetaald_minuten?: number;
21675
+ overuren_minuten?: number;
21676
+ plus_minuten?: number;
21677
+ status?: string;
21678
+ totaal_uitbetaald_minuten?: number;
21679
+ updated_at?: string;
21680
+ };
21681
+ Update: {
21682
+ afgesloten_at?: string | null;
21683
+ afgesloten_door?: string | null;
21684
+ contract_minuten?: number;
21685
+ correctie_reden?: string | null;
21686
+ created_at?: string;
21687
+ gecorrigeerd_at?: string | null;
21688
+ gecorrigeerd_door?: string | null;
21689
+ gewerkte_minuten?: number;
21690
+ id?: string;
21691
+ maand?: string;
21692
+ min_minuten?: number;
21693
+ monteur_id?: string;
21694
+ netto_verschil_minuten?: number;
21695
+ normaal_uitbetaald_minuten?: number;
21696
+ overuren_minuten?: number;
21697
+ plus_minuten?: number;
21698
+ status?: string;
21699
+ totaal_uitbetaald_minuten?: number;
21700
+ updated_at?: string;
21701
+ };
21702
+ Relationships: [];
21703
+ };
21704
+ uren_overuren_verklaringen: {
21705
+ Row: {
21706
+ beoordeeld_door: string | null;
21707
+ beoordeeld_op: string | null;
21708
+ created_at: string;
21709
+ datum: string;
21710
+ eind_tijd: string | null;
21711
+ id: string;
21712
+ ingediend_at: string;
21713
+ monteur_id: string;
21714
+ overuren: number;
21715
+ reden_afkeur: string | null;
21716
+ start_tijd: string | null;
21717
+ status: string;
21718
+ toelichting: string;
21719
+ updated_at: string;
21720
+ };
21721
+ Insert: {
21722
+ beoordeeld_door?: string | null;
21723
+ beoordeeld_op?: string | null;
21724
+ created_at?: string;
21725
+ datum: string;
21726
+ eind_tijd?: string | null;
21727
+ id?: string;
21728
+ ingediend_at?: string;
21729
+ monteur_id: string;
21730
+ overuren: number;
21731
+ reden_afkeur?: string | null;
21732
+ start_tijd?: string | null;
21733
+ status?: string;
21734
+ toelichting: string;
21735
+ updated_at?: string;
21736
+ };
21737
+ Update: {
21738
+ beoordeeld_door?: string | null;
21739
+ beoordeeld_op?: string | null;
21740
+ created_at?: string;
21741
+ datum?: string;
21742
+ eind_tijd?: string | null;
21743
+ id?: string;
21744
+ ingediend_at?: string;
21745
+ monteur_id?: string;
21746
+ overuren?: number;
21747
+ reden_afkeur?: string | null;
21748
+ start_tijd?: string | null;
21749
+ status?: string;
21750
+ toelichting?: string;
21751
+ updated_at?: string;
21752
+ };
21753
+ Relationships: [];
21754
+ };
21755
+ uren_settings: {
21756
+ Row: {
21757
+ break_minutes: number;
21758
+ created_at: string;
21759
+ daily_threshold_hours: number;
21760
+ id: boolean;
21761
+ include_travel: boolean;
21762
+ min_occupancy_monteurs: number;
20952
21763
  ov02_percentage: number;
20953
21764
  ov03_percentage: number;
20954
21765
  updated_at: string;
@@ -20986,6 +21797,75 @@ export type Database = {
20986
21797
  };
20987
21798
  Relationships: [];
20988
21799
  };
21800
+ uren_standaardweek: {
21801
+ Row: {
21802
+ created_at: string;
21803
+ eind_slot: number;
21804
+ id: string;
21805
+ monteur_id: string;
21806
+ start_slot: number;
21807
+ updated_at: string;
21808
+ weekdag: number;
21809
+ };
21810
+ Insert: {
21811
+ created_at?: string;
21812
+ eind_slot: number;
21813
+ id?: string;
21814
+ monteur_id: string;
21815
+ start_slot: number;
21816
+ updated_at?: string;
21817
+ weekdag: number;
21818
+ };
21819
+ Update: {
21820
+ created_at?: string;
21821
+ eind_slot?: number;
21822
+ id?: string;
21823
+ monteur_id?: string;
21824
+ start_slot?: number;
21825
+ updated_at?: string;
21826
+ weekdag?: number;
21827
+ };
21828
+ Relationships: [];
21829
+ };
21830
+ uren_standaardweek_wijzigingen: {
21831
+ Row: {
21832
+ beoordeeld_door: string | null;
21833
+ beoordeeld_op: string | null;
21834
+ created_at: string;
21835
+ huidig: Json;
21836
+ id: string;
21837
+ monteur_id: string;
21838
+ reden_afkeur: string | null;
21839
+ status: string;
21840
+ updated_at: string;
21841
+ voorstel: Json;
21842
+ };
21843
+ Insert: {
21844
+ beoordeeld_door?: string | null;
21845
+ beoordeeld_op?: string | null;
21846
+ created_at?: string;
21847
+ huidig?: Json;
21848
+ id?: string;
21849
+ monteur_id: string;
21850
+ reden_afkeur?: string | null;
21851
+ status?: string;
21852
+ updated_at?: string;
21853
+ voorstel: Json;
21854
+ };
21855
+ Update: {
21856
+ beoordeeld_door?: string | null;
21857
+ beoordeeld_op?: string | null;
21858
+ created_at?: string;
21859
+ huidig?: Json;
21860
+ id?: string;
21861
+ monteur_id?: string;
21862
+ reden_afkeur?: string | null;
21863
+ status?: string;
21864
+ updated_at?: string;
21865
+ voorstel?: Json;
21866
+ };
21867
+ Relationships: [];
21868
+ };
20989
21869
  uren_tarieven: {
20990
21870
  Row: {
20991
21871
  created_at: string;
@@ -21072,6 +21952,42 @@ export type Database = {
21072
21952
  };
21073
21953
  Relationships: [];
21074
21954
  };
21955
+ uren_tijd_spiegel: {
21956
+ Row: {
21957
+ created_at: string;
21958
+ id: string;
21959
+ time_log_id: string;
21960
+ werkbon_time_log_id: string;
21961
+ };
21962
+ Insert: {
21963
+ created_at?: string;
21964
+ id?: string;
21965
+ time_log_id: string;
21966
+ werkbon_time_log_id: string;
21967
+ };
21968
+ Update: {
21969
+ created_at?: string;
21970
+ id?: string;
21971
+ time_log_id?: string;
21972
+ werkbon_time_log_id?: string;
21973
+ };
21974
+ Relationships: [
21975
+ {
21976
+ foreignKeyName: "uren_tijd_spiegel_time_log_id_fkey";
21977
+ columns: ["time_log_id"];
21978
+ isOneToOne: true;
21979
+ referencedRelation: "time_logs";
21980
+ referencedColumns: ["id"];
21981
+ },
21982
+ {
21983
+ foreignKeyName: "uren_tijd_spiegel_werkbon_time_log_id_fkey";
21984
+ columns: ["werkbon_time_log_id"];
21985
+ isOneToOne: true;
21986
+ referencedRelation: "werkbon_time_logs";
21987
+ referencedColumns: ["id"];
21988
+ }
21989
+ ];
21990
+ };
21075
21991
  uren_weekstaten: {
21076
21992
  Row: {
21077
21993
  approved_at: string | null;
@@ -21114,6 +22030,33 @@ export type Database = {
21114
22030
  };
21115
22031
  Relationships: [];
21116
22032
  };
22033
+ uren_werktijd_voorkeuren: {
22034
+ Row: {
22035
+ created_at: string;
22036
+ eind_slot: number;
22037
+ id: string;
22038
+ monteur_id: string;
22039
+ start_slot: number;
22040
+ updated_at: string;
22041
+ };
22042
+ Insert: {
22043
+ created_at?: string;
22044
+ eind_slot?: number;
22045
+ id?: string;
22046
+ monteur_id: string;
22047
+ start_slot?: number;
22048
+ updated_at?: string;
22049
+ };
22050
+ Update: {
22051
+ created_at?: string;
22052
+ eind_slot?: number;
22053
+ id?: string;
22054
+ monteur_id?: string;
22055
+ start_slot?: number;
22056
+ updated_at?: string;
22057
+ };
22058
+ Relationships: [];
22059
+ };
21117
22060
  user_module_permissions: {
21118
22061
  Row: {
21119
22062
  created_at: string;
@@ -22061,10 +23004,12 @@ export type Database = {
22061
23004
  Row: {
22062
23005
  article_number: string | null;
22063
23006
  artikel_id: string | null;
23007
+ cost_price_cents: number;
22064
23008
  created_at: string;
22065
23009
  gtin: string | null;
22066
23010
  id: string;
22067
23011
  manufacturer: string | null;
23012
+ margin_percent: number | null;
22068
23013
  omschrijving: string;
22069
23014
  package_id: string;
22070
23015
  price_synced_at: string | null;
@@ -22079,10 +23024,12 @@ export type Database = {
22079
23024
  Insert: {
22080
23025
  article_number?: string | null;
22081
23026
  artikel_id?: string | null;
23027
+ cost_price_cents?: number;
22082
23028
  created_at?: string;
22083
23029
  gtin?: string | null;
22084
23030
  id?: string;
22085
23031
  manufacturer?: string | null;
23032
+ margin_percent?: number | null;
22086
23033
  omschrijving: string;
22087
23034
  package_id: string;
22088
23035
  price_synced_at?: string | null;
@@ -22097,10 +23044,12 @@ export type Database = {
22097
23044
  Update: {
22098
23045
  article_number?: string | null;
22099
23046
  artikel_id?: string | null;
23047
+ cost_price_cents?: number;
22100
23048
  created_at?: string;
22101
23049
  gtin?: string | null;
22102
23050
  id?: string;
22103
23051
  manufacturer?: string | null;
23052
+ margin_percent?: number | null;
22104
23053
  omschrijving?: string;
22105
23054
  package_id?: string;
22106
23055
  price_synced_at?: string | null;
@@ -23101,6 +24050,21 @@ export type Database = {
23101
24050
  };
23102
24051
  Relationships: [];
23103
24052
  };
24053
+ logistics_packing_diff: {
24054
+ Row: {
24055
+ dev_key: string | null;
24056
+ floriday_packing: Json | null;
24057
+ local_packing: Json | null;
24058
+ order_id: string | null;
24059
+ order_item_id: string | null;
24060
+ order_number: string | null;
24061
+ product_id: string | null;
24062
+ product_name: string | null;
24063
+ scope: string | null;
24064
+ trade_item_id: string | null;
24065
+ };
24066
+ Relationships: [];
24067
+ };
23104
24068
  logistics_product_dimensions: {
23105
24069
  Row: {
23106
24070
  dimension_source: string | null;
@@ -23850,6 +24814,10 @@ export type Database = {
23850
24814
  };
23851
24815
  Returns: string;
23852
24816
  };
24817
+ backfill_cart_numbers_day_seq: {
24818
+ Args: never;
24819
+ Returns: number;
24820
+ };
23853
24821
  backfill_open_order_reservations: {
23854
24822
  Args: never;
23855
24823
  Returns: {
@@ -24336,8 +25304,6 @@ export type Database = {
24336
25304
  cart_index: number;
24337
25305
  cart_number: string;
24338
25306
  cart_number_id: string;
24339
- cart_seq: number;
24340
- cart_total: number;
24341
25307
  order_id: string;
24342
25308
  order_number: string;
24343
25309
  order_source: string;
@@ -24353,10 +25319,32 @@ export type Database = {
24353
25319
  };
24354
25320
  Returns: number;
24355
25321
  };
25322
+ control_mark_carts_delivered_detail: {
25323
+ Args: {
25324
+ p_carts: Json;
25325
+ };
25326
+ Returns: {
25327
+ cart_index: number;
25328
+ frozen: boolean;
25329
+ message: string;
25330
+ order_id: string;
25331
+ order_source: string;
25332
+ outcome: string;
25333
+ }[];
25334
+ };
24356
25335
  count_distinct_regulatory_products: {
24357
25336
  Args: never;
24358
25337
  Returns: number;
24359
25338
  };
25339
+ create_order_from_public_offer: {
25340
+ Args: {
25341
+ p_carrier_id?: string;
25342
+ p_delivery_date?: string;
25343
+ p_delivery_garden_id?: string;
25344
+ p_offer_order_id: string;
25345
+ };
25346
+ Returns: Json;
25347
+ };
24360
25348
  current_monteur_id: {
24361
25349
  Args: never;
24362
25350
  Returns: string;
@@ -25204,6 +26192,12 @@ export type Database = {
25204
26192
  };
25205
26193
  Returns: Json;
25206
26194
  };
26195
+ invoice_ready_work_orders: {
26196
+ Args: {
26197
+ _limit?: number;
26198
+ };
26199
+ Returns: Json;
26200
+ };
25207
26201
  invoice_recalc_totals: {
25208
26202
  Args: {
25209
26203
  _invoice_id: string;
@@ -25449,6 +26443,14 @@ export type Database = {
25449
26443
  };
25450
26444
  Returns: Json;
25451
26445
  };
26446
+ logistics_buffer_decision_for_settings: {
26447
+ Args: {
26448
+ p_order: Json;
26449
+ p_settings: Json;
26450
+ p_user_id?: string;
26451
+ };
26452
+ Returns: Json;
26453
+ };
25452
26454
  logistics_buffer_detach_late_orders: {
25453
26455
  Args: {
25454
26456
  p_buffer?: string;
@@ -25482,6 +26484,12 @@ export type Database = {
25482
26484
  };
25483
26485
  Returns: string;
25484
26486
  };
26487
+ logistics_buffer_payload: {
26488
+ Args: {
26489
+ p_order_id: string;
26490
+ };
26491
+ Returns: Json;
26492
+ };
25485
26493
  logistics_buffer_simulate: {
25486
26494
  Args: {
25487
26495
  p_orders?: Json;
@@ -25783,10 +26791,29 @@ export type Database = {
25783
26791
  isSetofReturn: false;
25784
26792
  };
25785
26793
  };
26794
+ logistics_cleanup_duplicate_order_lines: {
26795
+ Args: {
26796
+ p_limit?: number;
26797
+ p_order_id: string;
26798
+ };
26799
+ Returns: Json;
26800
+ };
26801
+ logistics_cleanup_history: {
26802
+ Args: {
26803
+ p_limit?: number;
26804
+ };
26805
+ Returns: Json;
26806
+ };
25786
26807
  logistics_cleanup_orphan_print_jobs: {
25787
26808
  Args: never;
25788
26809
  Returns: Json;
25789
26810
  };
26811
+ logistics_cleanup_tasks: {
26812
+ Args: {
26813
+ p_limit?: number;
26814
+ };
26815
+ Returns: Json;
26816
+ };
25790
26817
  logistics_complete_task: {
25791
26818
  Args: {
25792
26819
  p_result?: Json;
@@ -25934,6 +26961,10 @@ export type Database = {
25934
26961
  Args: never;
25935
26962
  Returns: Json;
25936
26963
  };
26964
+ logistics_cron_health: {
26965
+ Args: never;
26966
+ Returns: Json;
26967
+ };
25937
26968
  logistics_day_windows: {
25938
26969
  Args: {
25939
26970
  p_day: string;
@@ -26283,6 +27314,12 @@ export type Database = {
26283
27314
  };
26284
27315
  Returns: number;
26285
27316
  };
27317
+ logistics_merge_decision: {
27318
+ Args: {
27319
+ p_lines: Json;
27320
+ };
27321
+ Returns: Json;
27322
+ };
26286
27323
  logistics_merge_floriday_lines: {
26287
27324
  Args: {
26288
27325
  p_order_id: string;
@@ -26329,6 +27366,15 @@ export type Database = {
26329
27366
  Args: never;
26330
27367
  Returns: string;
26331
27368
  };
27369
+ logistics_order_cart_approval: {
27370
+ Args: {
27371
+ _order_ref: string;
27372
+ };
27373
+ Returns: {
27374
+ approved: number;
27375
+ total: number;
27376
+ }[];
27377
+ };
26332
27378
  logistics_order_cart_count: {
26333
27379
  Args: {
26334
27380
  p_order_ref: string;
@@ -26342,45 +27388,107 @@ export type Database = {
26342
27388
  };
26343
27389
  Returns: undefined;
26344
27390
  };
26345
- logistics_order_frozen: {
27391
+ logistics_order_documents_ready: {
26346
27392
  Args: {
26347
- p_order_id: string;
27393
+ p_order_ref: string;
26348
27394
  };
26349
- Returns: boolean;
27395
+ Returns: Json;
26350
27396
  };
26351
- logistics_order_handled: {
27397
+ logistics_order_documents_ready_bool: {
26352
27398
  Args: {
26353
- p_order_uuid: string;
27399
+ p_order_ref: string;
26354
27400
  };
26355
27401
  Returns: boolean;
26356
27402
  };
26357
- logistics_order_is_topick: {
27403
+ logistics_order_finalize_enqueue: {
26358
27404
  Args: {
26359
27405
  p_order_id: string;
26360
- p_order_number: string;
27406
+ p_reason?: string;
26361
27407
  };
26362
- Returns: boolean;
27408
+ Returns: undefined;
26363
27409
  };
26364
- logistics_order_merge_key: {
27410
+ logistics_order_finalize_overview: {
27411
+ Args: never;
27412
+ Returns: {
27413
+ bezig: number;
27414
+ laatst_afgerond: string;
27415
+ laatste_fout: string;
27416
+ mislukt: number;
27417
+ oudste_wachttijd_seconden: number;
27418
+ wachtend: number;
27419
+ }[];
27420
+ };
27421
+ logistics_order_finalize_prune: {
26365
27422
  Args: {
26366
- p_group_key: string;
27423
+ p_days?: number;
26367
27424
  };
26368
- Returns: string;
27425
+ Returns: number;
26369
27426
  };
26370
- logistics_order_mergeable: {
27427
+ logistics_order_finalize_reconcile: {
27428
+ Args: {
27429
+ p_days?: number;
27430
+ p_limit?: number;
27431
+ };
27432
+ Returns: number;
27433
+ };
27434
+ logistics_order_finalize_retry: {
26371
27435
  Args: {
26372
27436
  p_order_id: string;
26373
27437
  };
26374
27438
  Returns: boolean;
26375
27439
  };
26376
- logistics_order_overview: {
27440
+ logistics_order_finalize_run: {
26377
27441
  Args: {
26378
- p_from?: string;
26379
- p_to?: string;
27442
+ p_lease_seconds?: number;
27443
+ p_limit?: number;
26380
27444
  };
26381
- Returns: {
26382
- cart_count: number;
26383
- customer_name: string;
27445
+ Returns: number;
27446
+ };
27447
+ logistics_order_frozen: {
27448
+ Args: {
27449
+ p_order_id: string;
27450
+ };
27451
+ Returns: boolean;
27452
+ };
27453
+ logistics_order_handled: {
27454
+ Args: {
27455
+ p_order_uuid: string;
27456
+ };
27457
+ Returns: boolean;
27458
+ };
27459
+ logistics_order_is_topick: {
27460
+ Args: {
27461
+ p_order_id: string;
27462
+ p_order_number: string;
27463
+ };
27464
+ Returns: boolean;
27465
+ };
27466
+ logistics_order_line_duplicates: {
27467
+ Args: {
27468
+ p_order_id: string;
27469
+ };
27470
+ Returns: Json;
27471
+ };
27472
+ logistics_order_merge_key: {
27473
+ Args: {
27474
+ p_group_key: string;
27475
+ };
27476
+ Returns: string;
27477
+ };
27478
+ logistics_order_mergeable: {
27479
+ Args: {
27480
+ p_order_id: string;
27481
+ };
27482
+ Returns: boolean;
27483
+ };
27484
+ logistics_order_overview: {
27485
+ Args: {
27486
+ p_from?: string;
27487
+ p_to?: string;
27488
+ };
27489
+ Returns: {
27490
+ cart_count: number;
27491
+ customer_name: string;
26384
27492
  delivery_date: string;
26385
27493
  order_number: string;
26386
27494
  order_source: string;
@@ -26404,6 +27512,63 @@ export type Database = {
26404
27512
  };
26405
27513
  Returns: boolean;
26406
27514
  };
27515
+ logistics_packing_autofix: {
27516
+ Args: {
27517
+ p_limit?: number;
27518
+ };
27519
+ Returns: number;
27520
+ };
27521
+ logistics_packing_block_reason: {
27522
+ Args: {
27523
+ p_order_id: string;
27524
+ p_order_item_id: string;
27525
+ };
27526
+ Returns: string;
27527
+ };
27528
+ logistics_packing_dismiss: {
27529
+ Args: {
27530
+ p_id: string;
27531
+ p_note?: string;
27532
+ };
27533
+ Returns: boolean;
27534
+ };
27535
+ logistics_packing_overview: {
27536
+ Args: never;
27537
+ Returns: {
27538
+ beoordelen: number;
27539
+ herstelbaar: number;
27540
+ laatst_gemeten: string;
27541
+ laatst_hersteld: string;
27542
+ open_totaal: number;
27543
+ orders: number;
27544
+ oudste_seconden: number;
27545
+ producten: number;
27546
+ }[];
27547
+ };
27548
+ logistics_packing_reconcile: {
27549
+ Args: {
27550
+ p_fix_limit?: number;
27551
+ p_scan_limit?: number;
27552
+ };
27553
+ Returns: {
27554
+ beoordelen: number;
27555
+ gevonden: number;
27556
+ hersteld: number;
27557
+ }[];
27558
+ };
27559
+ logistics_packing_scan: {
27560
+ Args: {
27561
+ p_limit?: number;
27562
+ };
27563
+ Returns: number;
27564
+ };
27565
+ logistics_packing_set_manual: {
27566
+ Args: {
27567
+ p_manual?: boolean;
27568
+ p_order_item_id: string;
27569
+ };
27570
+ Returns: boolean;
27571
+ };
26407
27572
  logistics_parse_pickup: {
26408
27573
  Args: {
26409
27574
  p_value: string;
@@ -26556,6 +27721,21 @@ export type Database = {
26556
27721
  Args: never;
26557
27722
  Returns: undefined;
26558
27723
  };
27724
+ logistics_plan_lock_acquire: {
27725
+ Args: {
27726
+ _key: string;
27727
+ _owner?: string;
27728
+ _ttl_seconds?: number;
27729
+ };
27730
+ Returns: boolean;
27731
+ };
27732
+ logistics_plan_lock_release: {
27733
+ Args: {
27734
+ _key: string;
27735
+ _owner?: string;
27736
+ };
27737
+ Returns: undefined;
27738
+ };
26559
27739
  logistics_plan_progress: {
26560
27740
  Args: {
26561
27741
  p_refs: string[];
@@ -26648,6 +27828,12 @@ export type Database = {
26648
27828
  Args: never;
26649
27829
  Returns: number;
26650
27830
  };
27831
+ logistics_prune_cron_history: {
27832
+ Args: {
27833
+ p_days?: number;
27834
+ };
27835
+ Returns: number;
27836
+ };
26651
27837
  logistics_prune_handled_pick_queue: {
26652
27838
  Args: never;
26653
27839
  Returns: number;
@@ -26684,6 +27870,14 @@ export type Database = {
26684
27870
  Args: never;
26685
27871
  Returns: Json;
26686
27872
  };
27873
+ logistics_recalc_tick_kick: {
27874
+ Args: never;
27875
+ Returns: number;
27876
+ };
27877
+ logistics_reconcile_missing_plan_queue: {
27878
+ Args: never;
27879
+ Returns: number;
27880
+ };
26687
27881
  logistics_refresh_pick_queue_status: {
26688
27882
  Args: {
26689
27883
  p_ref: string;
@@ -26719,6 +27913,12 @@ export type Database = {
26719
27913
  p_order_ref: string;
26720
27914
  };
26721
27915
  Returns: Json;
27916
+ } | {
27917
+ Args: {
27918
+ p_order_ref: string;
27919
+ p_reason: string;
27920
+ };
27921
+ Returns: Json;
26722
27922
  };
26723
27923
  logistics_report_delay: {
26724
27924
  Args: {
@@ -26764,6 +27964,10 @@ export type Database = {
26764
27964
  };
26765
27965
  Returns: Json;
26766
27966
  };
27967
+ logistics_reserved_stock_nightly: {
27968
+ Args: never;
27969
+ Returns: undefined;
27970
+ };
26767
27971
  logistics_resolve_pick_document: {
26768
27972
  Args: {
26769
27973
  _is_herprint: boolean;
@@ -26787,6 +27991,12 @@ export type Database = {
26787
27991
  };
26788
27992
  Returns: Json;
26789
27993
  };
27994
+ logistics_retention_days: {
27995
+ Args: {
27996
+ p_key: string;
27997
+ };
27998
+ Returns: number;
27999
+ };
26790
28000
  logistics_rule_bool: {
26791
28001
  Args: {
26792
28002
  p_default: boolean;
@@ -26841,6 +28051,11 @@ export type Database = {
26841
28051
  logistics_schedule_tasks: {
26842
28052
  Args: never;
26843
28053
  Returns: number;
28054
+ } | {
28055
+ Args: {
28056
+ p_order_ref?: string;
28057
+ };
28058
+ Returns: number;
26844
28059
  };
26845
28060
  logistics_set_order_priority: {
26846
28061
  Args: {
@@ -26864,6 +28079,12 @@ export type Database = {
26864
28079
  };
26865
28080
  Returns: string;
26866
28081
  };
28082
+ logistics_shipping_note_diagnose: {
28083
+ Args: {
28084
+ p_order_number: string;
28085
+ };
28086
+ Returns: Json;
28087
+ };
26867
28088
  logistics_shipping_note_follows_slip: {
26868
28089
  Args: never;
26869
28090
  Returns: boolean;
@@ -26988,6 +28209,20 @@ export type Database = {
26988
28209
  };
26989
28210
  Returns: number;
26990
28211
  };
28212
+ logistics_task_retention_days: {
28213
+ Args: never;
28214
+ Returns: number;
28215
+ };
28216
+ logistics_tasks_prune: {
28217
+ Args: {
28218
+ p_days?: number;
28219
+ };
28220
+ Returns: number;
28221
+ };
28222
+ logistics_tick: {
28223
+ Args: never;
28224
+ Returns: Json;
28225
+ };
26991
28226
  logistics_tick_ping: {
26992
28227
  Args: never;
26993
28228
  Returns: string;
@@ -27011,12 +28246,25 @@ export type Database = {
27011
28246
  };
27012
28247
  Returns: Json;
27013
28248
  };
28249
+ logistics_trace_archive_order: {
28250
+ Args: {
28251
+ p_order_ref: string;
28252
+ p_reason: string;
28253
+ };
28254
+ Returns: number;
28255
+ };
27014
28256
  logistics_trace_batch: {
27015
28257
  Args: {
27016
28258
  p: Json;
27017
28259
  };
27018
28260
  Returns: number;
27019
28261
  };
28262
+ logistics_trace_derive: {
28263
+ Args: {
28264
+ p: Json;
28265
+ };
28266
+ Returns: number;
28267
+ };
27020
28268
  logistics_trace_node: {
27021
28269
  Args: {
27022
28270
  p_op?: string;
@@ -27079,6 +28327,12 @@ export type Database = {
27079
28327
  };
27080
28328
  Returns: Json;
27081
28329
  };
28330
+ logistics_trace_pick_state: {
28331
+ Args: {
28332
+ p_order_number: string;
28333
+ };
28334
+ Returns: undefined;
28335
+ };
27082
28336
  logistics_trace_progress: {
27083
28337
  Args: {
27084
28338
  p_limit?: number;
@@ -27234,6 +28488,12 @@ export type Database = {
27234
28488
  permission: string;
27235
28489
  }[];
27236
28490
  };
28491
+ next_cart_day_seq: {
28492
+ Args: {
28493
+ p_date: string;
28494
+ };
28495
+ Returns: number;
28496
+ };
27237
28497
  next_manufacture_partij: {
27238
28498
  Args: {
27239
28499
  _tenant_id: string;
@@ -27303,6 +28563,17 @@ export type Database = {
27303
28563
  };
27304
28564
  Returns: boolean;
27305
28565
  };
28566
+ order_items_duplicate_report: {
28567
+ Args: {
28568
+ _order_ref?: string;
28569
+ };
28570
+ Returns: {
28571
+ distinct_products: number;
28572
+ duplicate_factor: number;
28573
+ lines: number;
28574
+ order_number: string;
28575
+ }[];
28576
+ };
27306
28577
  order_number_prefix: {
27307
28578
  Args: {
27308
28579
  p_custom_fields?: Json;
@@ -28086,6 +29357,22 @@ export type Database = {
28086
29357
  };
28087
29358
  Returns: undefined;
28088
29359
  };
29360
+ planning_apply_schedule_updates: {
29361
+ Args: {
29362
+ _updates: Json;
29363
+ };
29364
+ Returns: undefined;
29365
+ };
29366
+ planning_assert_no_overlaps: {
29367
+ Args: never;
29368
+ Returns: undefined;
29369
+ };
29370
+ planning_assert_no_overlaps_for_items: {
29371
+ Args: {
29372
+ _item_ids: string[];
29373
+ };
29374
+ Returns: undefined;
29375
+ };
28089
29376
  planning_cancel_item: {
28090
29377
  Args: {
28091
29378
  _id: string;
@@ -28440,6 +29727,10 @@ export type Database = {
28440
29727
  Args: never;
28441
29728
  Returns: undefined;
28442
29729
  };
29730
+ run_order_auto_invoice_tick: {
29731
+ Args: never;
29732
+ Returns: number;
29733
+ };
28443
29734
  run_print_queue_ticks: {
28444
29735
  Args: never;
28445
29736
  Returns: number;
@@ -28817,6 +30108,13 @@ export type Database = {
28817
30108
  };
28818
30109
  Returns: number;
28819
30110
  };
30111
+ schedule_floriday_trade_items_reconcile: {
30112
+ Args: {
30113
+ p_apikey: string;
30114
+ p_url: string;
30115
+ };
30116
+ Returns: number;
30117
+ };
28820
30118
  schedule_floriday_trade_items_sync: {
28821
30119
  Args: {
28822
30120
  p_apikey: string;
@@ -29141,6 +30439,22 @@ export type Database = {
29141
30439
  Args: never;
29142
30440
  Returns: boolean;
29143
30441
  };
30442
+ uren_is_werkdag: {
30443
+ Args: {
30444
+ _date: string;
30445
+ _monteur: string;
30446
+ };
30447
+ Returns: boolean;
30448
+ };
30449
+ uren_korte_afwezigheid_aanvragen: {
30450
+ Args: {
30451
+ _datum: string;
30452
+ _eind: string;
30453
+ _reden: string;
30454
+ _start: string;
30455
+ };
30456
+ Returns: string;
30457
+ };
29144
30458
  uren_list_medewerkers: {
29145
30459
  Args: never;
29146
30460
  Returns: {
@@ -29161,6 +30475,45 @@ export type Database = {
29161
30475
  roles: string[];
29162
30476
  }[];
29163
30477
  };
30478
+ uren_list_planner_contacten: {
30479
+ Args: never;
30480
+ Returns: {
30481
+ display_name: string;
30482
+ id: string;
30483
+ phone: string;
30484
+ }[];
30485
+ };
30486
+ uren_maand_afsluiten: {
30487
+ Args: {
30488
+ _maand: string;
30489
+ _monteur: string;
30490
+ };
30491
+ Returns: undefined;
30492
+ };
30493
+ uren_maand_berekenen: {
30494
+ Args: {
30495
+ _maand: string;
30496
+ _monteur: string;
30497
+ };
30498
+ Returns: Json;
30499
+ };
30500
+ uren_maand_corrigeren: {
30501
+ Args: {
30502
+ _maand: string;
30503
+ _monteur: string;
30504
+ _overuren_minuten: number;
30505
+ _reden: string;
30506
+ };
30507
+ Returns: undefined;
30508
+ };
30509
+ uren_mijn_contracturen: {
30510
+ Args: never;
30511
+ Returns: number;
30512
+ };
30513
+ uren_mijn_vakantiesaldo: {
30514
+ Args: never;
30515
+ Returns: number;
30516
+ };
29164
30517
  uren_my_monteur_id: {
29165
30518
  Args: never;
29166
30519
  Returns: string;
@@ -29194,6 +30547,37 @@ export type Database = {
29194
30547
  };
29195
30548
  Returns: number;
29196
30549
  };
30550
+ uren_spiegel_bezig: {
30551
+ Args: never;
30552
+ Returns: boolean;
30553
+ };
30554
+ uren_standaardweek_beoordelen: {
30555
+ Args: {
30556
+ _goedkeuren: boolean;
30557
+ _id: string;
30558
+ _reden?: string;
30559
+ };
30560
+ Returns: undefined;
30561
+ };
30562
+ uren_standaardweek_doorzetten: {
30563
+ Args: {
30564
+ _monteur: string;
30565
+ };
30566
+ Returns: undefined;
30567
+ };
30568
+ uren_standaardweek_instellen: {
30569
+ Args: {
30570
+ _dagen: Json;
30571
+ };
30572
+ Returns: string;
30573
+ };
30574
+ uren_standaardweek_toepassen: {
30575
+ Args: {
30576
+ _dagen: Json;
30577
+ _monteur: string;
30578
+ };
30579
+ Returns: undefined;
30580
+ };
29197
30581
  uren_stop_time_log: {
29198
30582
  Args: {
29199
30583
  p_employee_id: string;
@@ -29219,6 +30603,148 @@ export type Database = {
29219
30603
  };
29220
30604
  Returns: number;
29221
30605
  };
30606
+ uren_vakantie_aanvragen: {
30607
+ Args: {
30608
+ _end_date: string;
30609
+ _hours?: number;
30610
+ _start_date: string;
30611
+ };
30612
+ Returns: string;
30613
+ };
30614
+ uren_vakantiedag_wijzigen: {
30615
+ Args: {
30616
+ _date: string;
30617
+ };
30618
+ Returns: string;
30619
+ };
30620
+ uren_vakantiesaldo_uren: {
30621
+ Args: {
30622
+ _monteur: string;
30623
+ };
30624
+ Returns: number;
30625
+ };
30626
+ uren_week_start: {
30627
+ Args: {
30628
+ _datum: string;
30629
+ };
30630
+ Returns: string;
30631
+ };
30632
+ uren_werkweek_opsturen: {
30633
+ Args: {
30634
+ _week_start: string;
30635
+ };
30636
+ Returns: {
30637
+ approved_at: string | null;
30638
+ approved_by: string | null;
30639
+ contract_hours: number;
30640
+ created_at: string;
30641
+ employee_id: string;
30642
+ id: string;
30643
+ locked: boolean;
30644
+ monteur_toelichting: string | null;
30645
+ notes: string | null;
30646
+ planned_hours: number;
30647
+ status: string;
30648
+ submitted_at: string | null;
30649
+ updated_at: string;
30650
+ variance_hours: number;
30651
+ week_start: string;
30652
+ };
30653
+ SetofOptions: {
30654
+ from: "*";
30655
+ to: "time_log_week_approvals";
30656
+ isOneToOne: true;
30657
+ isSetofReturn: false;
30658
+ };
30659
+ } | {
30660
+ Args: {
30661
+ _vrije_dagen?: string[];
30662
+ _week_start: string;
30663
+ };
30664
+ Returns: {
30665
+ approved_at: string | null;
30666
+ approved_by: string | null;
30667
+ contract_hours: number;
30668
+ created_at: string;
30669
+ employee_id: string;
30670
+ id: string;
30671
+ locked: boolean;
30672
+ monteur_toelichting: string | null;
30673
+ notes: string | null;
30674
+ planned_hours: number;
30675
+ status: string;
30676
+ submitted_at: string | null;
30677
+ updated_at: string;
30678
+ variance_hours: number;
30679
+ week_start: string;
30680
+ };
30681
+ SetofOptions: {
30682
+ from: "*";
30683
+ to: "time_log_week_approvals";
30684
+ isOneToOne: true;
30685
+ isSetofReturn: false;
30686
+ };
30687
+ } | {
30688
+ Args: {
30689
+ _toelichting?: string;
30690
+ _vrije_dagen?: string[];
30691
+ _week_start: string;
30692
+ };
30693
+ Returns: {
30694
+ approved_at: string | null;
30695
+ approved_by: string | null;
30696
+ contract_hours: number;
30697
+ created_at: string;
30698
+ employee_id: string;
30699
+ id: string;
30700
+ locked: boolean;
30701
+ monteur_toelichting: string | null;
30702
+ notes: string | null;
30703
+ planned_hours: number;
30704
+ status: string;
30705
+ submitted_at: string | null;
30706
+ updated_at: string;
30707
+ variance_hours: number;
30708
+ week_start: string;
30709
+ };
30710
+ SetofOptions: {
30711
+ from: "*";
30712
+ to: "time_log_week_approvals";
30713
+ isOneToOne: true;
30714
+ isSetofReturn: false;
30715
+ };
30716
+ };
30717
+ vakantie_dagen_gebruikt: {
30718
+ Args: {
30719
+ _user_id: string;
30720
+ _year: number;
30721
+ };
30722
+ Returns: number;
30723
+ };
30724
+ vakantie_saldo: {
30725
+ Args: {
30726
+ _user_id: string;
30727
+ _year?: number;
30728
+ };
30729
+ Returns: {
30730
+ day_hours: number;
30731
+ entitlement_days: number;
30732
+ remaining_days: number;
30733
+ used_days: number;
30734
+ }[];
30735
+ };
30736
+ vakantie_saldo_overzicht: {
30737
+ Args: {
30738
+ _year?: number;
30739
+ };
30740
+ Returns: {
30741
+ day_hours: number;
30742
+ entitlement_days: number;
30743
+ remaining_days: number;
30744
+ used_days: number;
30745
+ user_id: string;
30746
+ }[];
30747
+ };
29222
30748
  voorraad_cleanup_old_rows: {
29223
30749
  Args: never;
29224
30750
  Returns: Json;