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