@flowselections/layout-maker 1.7.3 → 1.8.1

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 (39) hide show
  1. package/README.md +132 -69
  2. package/dist-lib/components/LogosPage.d.ts.map +1 -1
  3. package/dist-lib/components/LogosPage.js +3 -2
  4. package/dist-lib/components/PrinterSetupWizard.js +1 -1
  5. package/dist-lib/index.d.ts +3 -3
  6. package/dist-lib/index.d.ts.map +1 -1
  7. package/dist-lib/index.js +3 -3
  8. package/dist-lib/integrations/supabase/auth-middleware.d.ts +393 -13
  9. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  10. package/dist-lib/integrations/supabase/client.server.d.ts +393 -13
  11. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  12. package/dist-lib/integrations/supabase/types.d.ts +409 -14
  13. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  14. package/dist-lib/integrations/supabase/types.js +3 -0
  15. package/dist-lib/lib/aiLayout.functions.d.ts +393 -13
  16. package/dist-lib/lib/aiLayout.functions.d.ts.map +1 -1
  17. package/dist-lib/lib/aiLayout.server.js +9 -9
  18. package/dist-lib/lib/browserPrint.js +5 -5
  19. package/dist-lib/lib/documentProfiles.d.ts.map +1 -1
  20. package/dist-lib/lib/documentProfiles.js +3 -0
  21. package/dist-lib/lib/documentTypes.d.ts +1 -1
  22. package/dist-lib/lib/documentTypes.d.ts.map +1 -1
  23. package/dist-lib/lib/documentTypes.js +3 -0
  24. package/dist-lib/lib/layoutPreview.js +7 -7
  25. package/dist-lib/lib/logoLibrary.d.ts +12 -0
  26. package/dist-lib/lib/logoLibrary.d.ts.map +1 -1
  27. package/dist-lib/lib/logoLibrary.js +39 -1
  28. package/dist-lib/lib/pakbonHtml.js +50 -50
  29. package/dist-lib/lib/printApi.d.ts +71 -0
  30. package/dist-lib/lib/printApi.d.ts.map +1 -1
  31. package/dist-lib/lib/printApi.js +152 -12
  32. package/dist-lib/lib/printService.functions.d.ts +1572 -52
  33. package/dist-lib/lib/printService.functions.d.ts.map +1 -1
  34. package/dist-lib/lib/productiebonHtml.js +15 -15
  35. package/dist-lib/lib/profielHtml.js +18 -18
  36. package/dist-lib/lib/supabaseAdmin.server.d.ts +5 -5
  37. package/dist-lib/lib/supabaseAdmin.server.js +43 -43
  38. package/dist-lib/lib/testpagina.js +1 -1
  39. package/package.json +1 -1
@@ -35,6 +35,9 @@ export const Constants = {
35
35
  "vrij",
36
36
  "sticker",
37
37
  "productiebon",
38
+ "veilingbon",
39
+ "afleverbrief",
40
+ "veilingbrief",
38
41
  ],
39
42
  doc_orientation: ["portrait", "landscape"],
40
43
  exact_env: ["staging", "live"],
@@ -7768,6 +7768,249 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
7768
7768
  };
7769
7769
  Relationships: [];
7770
7770
  };
7771
+ itk_offerte_events: {
7772
+ Row: {
7773
+ created_at: string;
7774
+ event_type: string;
7775
+ id: string;
7776
+ metadata: import("../integrations/supabase/types.js").Json;
7777
+ offerte_id: string;
7778
+ omschrijving: string | null;
7779
+ user_id: string | null;
7780
+ };
7781
+ Insert: {
7782
+ created_at?: string;
7783
+ event_type: string;
7784
+ id?: string;
7785
+ metadata?: import("../integrations/supabase/types.js").Json;
7786
+ offerte_id: string;
7787
+ omschrijving?: string | null;
7788
+ user_id?: string | null;
7789
+ };
7790
+ Update: {
7791
+ created_at?: string;
7792
+ event_type?: string;
7793
+ id?: string;
7794
+ metadata?: import("../integrations/supabase/types.js").Json;
7795
+ offerte_id?: string;
7796
+ omschrijving?: string | null;
7797
+ user_id?: string | null;
7798
+ };
7799
+ Relationships: [{
7800
+ foreignKeyName: "itk_offerte_events_offerte_id_fkey";
7801
+ columns: ["offerte_id"];
7802
+ isOneToOne: false;
7803
+ referencedRelation: "itk_offertes";
7804
+ referencedColumns: ["id"];
7805
+ }];
7806
+ };
7807
+ itk_offerte_regels: {
7808
+ Row: {
7809
+ created_at: string;
7810
+ id: string;
7811
+ line_total_cents: number;
7812
+ offerte_id: string;
7813
+ omschrijving: string;
7814
+ package_id: string | null;
7815
+ quantity: number;
7816
+ sort_order: number;
7817
+ source: string;
7818
+ unit_price_cents: number;
7819
+ updated_at: string;
7820
+ };
7821
+ Insert: {
7822
+ created_at?: string;
7823
+ id?: string;
7824
+ line_total_cents?: number;
7825
+ offerte_id: string;
7826
+ omschrijving?: string;
7827
+ package_id?: string | null;
7828
+ quantity?: number;
7829
+ sort_order?: number;
7830
+ source?: string;
7831
+ unit_price_cents?: number;
7832
+ updated_at?: string;
7833
+ };
7834
+ Update: {
7835
+ created_at?: string;
7836
+ id?: string;
7837
+ line_total_cents?: number;
7838
+ offerte_id?: string;
7839
+ omschrijving?: string;
7840
+ package_id?: string | null;
7841
+ quantity?: number;
7842
+ sort_order?: number;
7843
+ source?: string;
7844
+ unit_price_cents?: number;
7845
+ updated_at?: string;
7846
+ };
7847
+ Relationships: [{
7848
+ foreignKeyName: "itk_offerte_regels_offerte_id_fkey";
7849
+ columns: ["offerte_id"];
7850
+ isOneToOne: false;
7851
+ referencedRelation: "itk_offertes";
7852
+ referencedColumns: ["id"];
7853
+ }, {
7854
+ foreignKeyName: "itk_offerte_regels_package_id_fkey";
7855
+ columns: ["package_id"];
7856
+ isOneToOne: false;
7857
+ referencedRelation: "werkbon_packages";
7858
+ referencedColumns: ["id"];
7859
+ }];
7860
+ };
7861
+ itk_offerte_settings: {
7862
+ Row: {
7863
+ auto_convert_binnen_mandaat: boolean;
7864
+ created_at: string;
7865
+ default_geldigheid_dagen: number;
7866
+ default_vat_rate: number;
7867
+ id: string;
7868
+ singleton: boolean;
7869
+ updated_at: string;
7870
+ };
7871
+ Insert: {
7872
+ auto_convert_binnen_mandaat?: boolean;
7873
+ created_at?: string;
7874
+ default_geldigheid_dagen?: number;
7875
+ default_vat_rate?: number;
7876
+ id?: string;
7877
+ singleton?: boolean;
7878
+ updated_at?: string;
7879
+ };
7880
+ Update: {
7881
+ auto_convert_binnen_mandaat?: boolean;
7882
+ created_at?: string;
7883
+ default_geldigheid_dagen?: number;
7884
+ default_vat_rate?: number;
7885
+ id?: string;
7886
+ singleton?: boolean;
7887
+ updated_at?: string;
7888
+ };
7889
+ Relationships: [];
7890
+ };
7891
+ itk_offertes: {
7892
+ Row: {
7893
+ ai_generated: boolean;
7894
+ approved_at: string | null;
7895
+ binnen_mandaat: boolean;
7896
+ contact_id: string | null;
7897
+ converted_at: string | null;
7898
+ created_at: string;
7899
+ created_by: string | null;
7900
+ customer_id: string | null;
7901
+ follow_up_werkbon_id: string | null;
7902
+ id: string;
7903
+ jaar: number;
7904
+ mandaat_restant_cents: number;
7905
+ notities: string | null;
7906
+ offerte_number: string | null;
7907
+ omschrijving: string;
7908
+ rejected_at: string | null;
7909
+ sent_at: string | null;
7910
+ status: string;
7911
+ subtotal_cents: number;
7912
+ total_cents: number;
7913
+ updated_at: string;
7914
+ valid_until: string | null;
7915
+ vat_cents: number;
7916
+ vat_rate: number;
7917
+ viewed_at: string | null;
7918
+ volgnummer: number | null;
7919
+ werkbon_id: string | null;
7920
+ work_location_id: string | null;
7921
+ };
7922
+ Insert: {
7923
+ ai_generated?: boolean;
7924
+ approved_at?: string | null;
7925
+ binnen_mandaat?: boolean;
7926
+ contact_id?: string | null;
7927
+ converted_at?: string | null;
7928
+ created_at?: string;
7929
+ created_by?: string | null;
7930
+ customer_id?: string | null;
7931
+ follow_up_werkbon_id?: string | null;
7932
+ id?: string;
7933
+ jaar?: number;
7934
+ mandaat_restant_cents?: number;
7935
+ notities?: string | null;
7936
+ offerte_number?: string | null;
7937
+ omschrijving?: string;
7938
+ rejected_at?: string | null;
7939
+ sent_at?: string | null;
7940
+ status?: string;
7941
+ subtotal_cents?: number;
7942
+ total_cents?: number;
7943
+ updated_at?: string;
7944
+ valid_until?: string | null;
7945
+ vat_cents?: number;
7946
+ vat_rate?: number;
7947
+ viewed_at?: string | null;
7948
+ volgnummer?: number | null;
7949
+ werkbon_id?: string | null;
7950
+ work_location_id?: string | null;
7951
+ };
7952
+ Update: {
7953
+ ai_generated?: boolean;
7954
+ approved_at?: string | null;
7955
+ binnen_mandaat?: boolean;
7956
+ contact_id?: string | null;
7957
+ converted_at?: string | null;
7958
+ created_at?: string;
7959
+ created_by?: string | null;
7960
+ customer_id?: string | null;
7961
+ follow_up_werkbon_id?: string | null;
7962
+ id?: string;
7963
+ jaar?: number;
7964
+ mandaat_restant_cents?: number;
7965
+ notities?: string | null;
7966
+ offerte_number?: string | null;
7967
+ omschrijving?: string;
7968
+ rejected_at?: string | null;
7969
+ sent_at?: string | null;
7970
+ status?: string;
7971
+ subtotal_cents?: number;
7972
+ total_cents?: number;
7973
+ updated_at?: string;
7974
+ valid_until?: string | null;
7975
+ vat_cents?: number;
7976
+ vat_rate?: number;
7977
+ viewed_at?: string | null;
7978
+ volgnummer?: number | null;
7979
+ werkbon_id?: string | null;
7980
+ work_location_id?: string | null;
7981
+ };
7982
+ Relationships: [{
7983
+ foreignKeyName: "itk_offertes_contact_id_fkey";
7984
+ columns: ["contact_id"];
7985
+ isOneToOne: false;
7986
+ referencedRelation: "itk_contact_persons";
7987
+ referencedColumns: ["id"];
7988
+ }, {
7989
+ foreignKeyName: "itk_offertes_customer_id_fkey";
7990
+ columns: ["customer_id"];
7991
+ isOneToOne: false;
7992
+ referencedRelation: "itk_customers";
7993
+ referencedColumns: ["id"];
7994
+ }, {
7995
+ foreignKeyName: "itk_offertes_follow_up_werkbon_id_fkey";
7996
+ columns: ["follow_up_werkbon_id"];
7997
+ isOneToOne: false;
7998
+ referencedRelation: "werkbonnen";
7999
+ referencedColumns: ["id"];
8000
+ }, {
8001
+ foreignKeyName: "itk_offertes_werkbon_id_fkey";
8002
+ columns: ["werkbon_id"];
8003
+ isOneToOne: false;
8004
+ referencedRelation: "werkbonnen";
8005
+ referencedColumns: ["id"];
8006
+ }, {
8007
+ foreignKeyName: "itk_offertes_work_location_id_fkey";
8008
+ columns: ["work_location_id"];
8009
+ isOneToOne: false;
8010
+ referencedRelation: "itk_work_locations";
8011
+ referencedColumns: ["id"];
8012
+ }];
8013
+ };
7771
8014
  itk_work_locations: {
7772
8015
  Row: {
7773
8016
  city: string | null;
@@ -10141,6 +10384,63 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
10141
10384
  referencedColumns: ["id"];
10142
10385
  }];
10143
10386
  };
10387
+ medewerker_details: {
10388
+ Row: {
10389
+ color: string | null;
10390
+ created_at: string;
10391
+ hours_fri: number | null;
10392
+ hours_mon: number | null;
10393
+ hours_thu: number | null;
10394
+ hours_tue: number | null;
10395
+ hours_wed: number | null;
10396
+ id: string;
10397
+ is_active: boolean;
10398
+ leave_balance_hours: number;
10399
+ persnr: string | null;
10400
+ phone: string | null;
10401
+ profile_id: string;
10402
+ updated_at: string;
10403
+ };
10404
+ Insert: {
10405
+ color?: string | null;
10406
+ created_at?: string;
10407
+ hours_fri?: number | null;
10408
+ hours_mon?: number | null;
10409
+ hours_thu?: number | null;
10410
+ hours_tue?: number | null;
10411
+ hours_wed?: number | null;
10412
+ id?: string;
10413
+ is_active?: boolean;
10414
+ leave_balance_hours?: number;
10415
+ persnr?: string | null;
10416
+ phone?: string | null;
10417
+ profile_id: string;
10418
+ updated_at?: string;
10419
+ };
10420
+ Update: {
10421
+ color?: string | null;
10422
+ created_at?: string;
10423
+ hours_fri?: number | null;
10424
+ hours_mon?: number | null;
10425
+ hours_thu?: number | null;
10426
+ hours_tue?: number | null;
10427
+ hours_wed?: number | null;
10428
+ id?: string;
10429
+ is_active?: boolean;
10430
+ leave_balance_hours?: number;
10431
+ persnr?: string | null;
10432
+ phone?: string | null;
10433
+ profile_id?: string;
10434
+ updated_at?: string;
10435
+ };
10436
+ Relationships: [{
10437
+ foreignKeyName: "medewerker_details_profile_id_fkey";
10438
+ columns: ["profile_id"];
10439
+ isOneToOne: true;
10440
+ referencedRelation: "profiles";
10441
+ referencedColumns: ["id"];
10442
+ }];
10443
+ };
10144
10444
  module_features: {
10145
10445
  Row: {
10146
10446
  created_at: string;
@@ -10201,6 +10501,7 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
10201
10501
  module_registry: {
10202
10502
  Row: {
10203
10503
  created_at: string;
10504
+ enforce: boolean;
10204
10505
  is_active: boolean;
10205
10506
  last_seen_at: string;
10206
10507
  module_id: string;
@@ -10210,6 +10511,7 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
10210
10511
  };
10211
10512
  Insert: {
10212
10513
  created_at?: string;
10514
+ enforce?: boolean;
10213
10515
  is_active?: boolean;
10214
10516
  last_seen_at?: string;
10215
10517
  module_id: string;
@@ -10219,6 +10521,7 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
10219
10521
  };
10220
10522
  Update: {
10221
10523
  created_at?: string;
10524
+ enforce?: boolean;
10222
10525
  is_active?: boolean;
10223
10526
  last_seen_at?: string;
10224
10527
  module_id?: string;
@@ -14756,6 +15059,7 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
14756
15059
  type: string;
14757
15060
  updated_at: string;
14758
15061
  vereist_medewerker: boolean;
15062
+ werkplek: string | null;
14759
15063
  };
14760
15064
  Insert: {
14761
15065
  actief?: boolean;
@@ -14769,6 +15073,7 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
14769
15073
  type?: string;
14770
15074
  updated_at?: string;
14771
15075
  vereist_medewerker?: boolean;
15076
+ werkplek?: string | null;
14772
15077
  };
14773
15078
  Update: {
14774
15079
  actief?: boolean;
@@ -14782,9 +15087,46 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
14782
15087
  type?: string;
14783
15088
  updated_at?: string;
14784
15089
  vereist_medewerker?: boolean;
15090
+ werkplek?: string | null;
14785
15091
  };
14786
15092
  Relationships: [];
14787
15093
  };
15094
+ sick_periods: {
15095
+ Row: {
15096
+ created_at: string;
15097
+ employee_id: string;
15098
+ end_date: string | null;
15099
+ id: string;
15100
+ notes: string | null;
15101
+ start_date: string;
15102
+ updated_at: string;
15103
+ };
15104
+ Insert: {
15105
+ created_at?: string;
15106
+ employee_id: string;
15107
+ end_date?: string | null;
15108
+ id?: string;
15109
+ notes?: string | null;
15110
+ start_date: string;
15111
+ updated_at?: string;
15112
+ };
15113
+ Update: {
15114
+ created_at?: string;
15115
+ employee_id?: string;
15116
+ end_date?: string | null;
15117
+ id?: string;
15118
+ notes?: string | null;
15119
+ start_date?: string;
15120
+ updated_at?: string;
15121
+ };
15122
+ Relationships: [{
15123
+ foreignKeyName: "sick_periods_employee_id_fkey";
15124
+ columns: ["employee_id"];
15125
+ isOneToOne: false;
15126
+ referencedRelation: "profiles";
15127
+ referencedColumns: ["id"];
15128
+ }];
15129
+ };
14788
15130
  sidebar_config: {
14789
15131
  Row: {
14790
15132
  id: string;
@@ -18974,6 +19316,19 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
18974
19316
  };
18975
19317
  Returns: undefined;
18976
19318
  };
19319
+ approve_mailbox_order_proposal: {
19320
+ Args: {
19321
+ p_custom_fields: import("../integrations/supabase/types.js").Json;
19322
+ p_customer_id: string;
19323
+ p_delivery_date: string;
19324
+ p_field_values?: import("../integrations/supabase/types.js").Json;
19325
+ p_lines: import("../integrations/supabase/types.js").Json;
19326
+ p_notes: string;
19327
+ p_proposal_id: string;
19328
+ p_reviewed_by: string;
19329
+ };
19330
+ Returns: import("../integrations/supabase/types.js").Json;
19331
+ };
18977
19332
  assign_cart_numbers: {
18978
19333
  Args: {
18979
19334
  p_carts: import("../integrations/supabase/types.js").Json;
@@ -19405,7 +19760,7 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
19405
19760
  Returns: string;
19406
19761
  } | {
19407
19762
  Args: {
19408
- _feature_id?: string;
19763
+ _feature_id: string;
19409
19764
  _module_id: string;
19410
19765
  _user_id: string;
19411
19766
  };
@@ -19456,6 +19811,13 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
19456
19811
  };
19457
19812
  Returns: string;
19458
19813
  };
19814
+ employee_day_hours: {
19815
+ Args: {
19816
+ _day: string;
19817
+ _employee_id: string;
19818
+ };
19819
+ Returns: number;
19820
+ };
19459
19821
  enqueue_cart_replan_if_unlocked: {
19460
19822
  Args: {
19461
19823
  p_order_id: string;
@@ -19809,6 +20171,19 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
19809
20171
  Args: never;
19810
20172
  Returns: boolean;
19811
20173
  };
20174
+ itk_offerte_naar_werkbon: {
20175
+ Args: {
20176
+ _offerte_id: string;
20177
+ };
20178
+ Returns: string;
20179
+ };
20180
+ itk_offerte_restant_mandaat: {
20181
+ Args: {
20182
+ _exclude_offerte_id?: string;
20183
+ _werkbon_id: string;
20184
+ };
20185
+ Returns: number;
20186
+ };
19812
20187
  jwt_has_role: {
19813
20188
  Args: {
19814
20189
  _role: import("../integrations/supabase/types.js").Database["public"]["Enums"]["app_role"];
@@ -19819,9 +20194,19 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
19819
20194
  Args: never;
19820
20195
  Returns: {
19821
20196
  avatar_url: string;
20197
+ color: string;
19822
20198
  display_name: string;
19823
20199
  email: string;
20200
+ hours_fri: number;
20201
+ hours_mon: number;
20202
+ hours_thu: number;
20203
+ hours_tue: number;
20204
+ hours_wed: number;
19824
20205
  id: string;
20206
+ is_active: boolean;
20207
+ leave_balance_hours: number;
20208
+ persnr: string;
20209
+ phone: string;
19825
20210
  roles: string[];
19826
20211
  }[];
19827
20212
  };
@@ -20148,17 +20533,6 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
20148
20533
  Returns: string;
20149
20534
  };
20150
20535
  logistics_emit_event: {
20151
- Args: {
20152
- p_event_type: string;
20153
- p_idempotency_key?: string;
20154
- p_order_ref: string;
20155
- p_payload?: import("../integrations/supabase/types.js").Json;
20156
- p_shadow?: boolean;
20157
- p_source_module: string;
20158
- p_strategy_id?: string;
20159
- };
20160
- Returns: import("../integrations/supabase/types.js").Json;
20161
- } | {
20162
20536
  Args: {
20163
20537
  p_event_type: string;
20164
20538
  p_idempotency_key?: string;
@@ -21538,6 +21912,12 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
21538
21912
  };
21539
21913
  Returns: undefined;
21540
21914
  };
21915
+ sync_sick_time_off: {
21916
+ Args: {
21917
+ _period_id: string;
21918
+ };
21919
+ Returns: number;
21920
+ };
21541
21921
  trade_item_stock_duplicates: {
21542
21922
  Args: never;
21543
21923
  Returns: {
@@ -21615,7 +21995,7 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
21615
21995
  Enums: {
21616
21996
  ai_import_status: "nieuw" | "verwerken" | "bevestigen" | "klaar" | "mislukt";
21617
21997
  app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
21618
- doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon";
21998
+ doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon" | "veilingbon" | "afleverbrief" | "veilingbrief";
21619
21999
  doc_orientation: "portrait" | "landscape";
21620
22000
  exact_env: "staging" | "live";
21621
22001
  exact_push_status: "pending" | "sent" | "error";