@flowselections/layout-maker 1.7.3 → 1.8.0

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 (34) hide show
  1. package/README.md +131 -69
  2. package/dist-lib/components/PrinterSetupWizard.js +1 -1
  3. package/dist-lib/index.d.ts +2 -2
  4. package/dist-lib/index.d.ts.map +1 -1
  5. package/dist-lib/index.js +2 -2
  6. package/dist-lib/integrations/supabase/auth-middleware.d.ts +280 -13
  7. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  8. package/dist-lib/integrations/supabase/client.server.d.ts +280 -13
  9. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  10. package/dist-lib/integrations/supabase/types.d.ts +292 -14
  11. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  12. package/dist-lib/integrations/supabase/types.js +3 -0
  13. package/dist-lib/lib/aiLayout.functions.d.ts +280 -13
  14. package/dist-lib/lib/aiLayout.functions.d.ts.map +1 -1
  15. package/dist-lib/lib/aiLayout.server.js +9 -9
  16. package/dist-lib/lib/browserPrint.js +5 -5
  17. package/dist-lib/lib/documentProfiles.d.ts.map +1 -1
  18. package/dist-lib/lib/documentProfiles.js +3 -0
  19. package/dist-lib/lib/documentTypes.d.ts +1 -1
  20. package/dist-lib/lib/documentTypes.d.ts.map +1 -1
  21. package/dist-lib/lib/documentTypes.js +3 -0
  22. package/dist-lib/lib/layoutPreview.js +7 -7
  23. package/dist-lib/lib/pakbonHtml.js +50 -50
  24. package/dist-lib/lib/printApi.d.ts +71 -0
  25. package/dist-lib/lib/printApi.d.ts.map +1 -1
  26. package/dist-lib/lib/printApi.js +152 -12
  27. package/dist-lib/lib/printService.functions.d.ts +1120 -52
  28. package/dist-lib/lib/printService.functions.d.ts.map +1 -1
  29. package/dist-lib/lib/productiebonHtml.js +15 -15
  30. package/dist-lib/lib/profielHtml.js +18 -18
  31. package/dist-lib/lib/supabaseAdmin.server.d.ts +5 -5
  32. package/dist-lib/lib/supabaseAdmin.server.js +43 -43
  33. package/dist-lib/lib/testpagina.js +1 -1
  34. 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;
@@ -10201,6 +10444,7 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
10201
10444
  module_registry: {
10202
10445
  Row: {
10203
10446
  created_at: string;
10447
+ enforce: boolean;
10204
10448
  is_active: boolean;
10205
10449
  last_seen_at: string;
10206
10450
  module_id: string;
@@ -10210,6 +10454,7 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
10210
10454
  };
10211
10455
  Insert: {
10212
10456
  created_at?: string;
10457
+ enforce?: boolean;
10213
10458
  is_active?: boolean;
10214
10459
  last_seen_at?: string;
10215
10460
  module_id: string;
@@ -10219,6 +10464,7 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
10219
10464
  };
10220
10465
  Update: {
10221
10466
  created_at?: string;
10467
+ enforce?: boolean;
10222
10468
  is_active?: boolean;
10223
10469
  last_seen_at?: string;
10224
10470
  module_id?: string;
@@ -14756,6 +15002,7 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
14756
15002
  type: string;
14757
15003
  updated_at: string;
14758
15004
  vereist_medewerker: boolean;
15005
+ werkplek: string | null;
14759
15006
  };
14760
15007
  Insert: {
14761
15008
  actief?: boolean;
@@ -14769,6 +15016,7 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
14769
15016
  type?: string;
14770
15017
  updated_at?: string;
14771
15018
  vereist_medewerker?: boolean;
15019
+ werkplek?: string | null;
14772
15020
  };
14773
15021
  Update: {
14774
15022
  actief?: boolean;
@@ -14782,6 +15030,7 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
14782
15030
  type?: string;
14783
15031
  updated_at?: string;
14784
15032
  vereist_medewerker?: boolean;
15033
+ werkplek?: string | null;
14785
15034
  };
14786
15035
  Relationships: [];
14787
15036
  };
@@ -15979,6 +16228,7 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
15979
16228
  invoice_enabled_mo: boolean;
15980
16229
  payment_gl_account: string;
15981
16230
  payment_journal_code: string;
16231
+ print_werkplek: string | null;
15982
16232
  updated_at: string;
15983
16233
  user_id: string;
15984
16234
  vat_code_eu_reverse: string | null;
@@ -16001,6 +16251,7 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
16001
16251
  invoice_enabled_mo?: boolean;
16002
16252
  payment_gl_account?: string;
16003
16253
  payment_journal_code?: string;
16254
+ print_werkplek?: string | null;
16004
16255
  updated_at?: string;
16005
16256
  user_id: string;
16006
16257
  vat_code_eu_reverse?: string | null;
@@ -16023,6 +16274,7 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
16023
16274
  invoice_enabled_mo?: boolean;
16024
16275
  payment_gl_account?: string;
16025
16276
  payment_journal_code?: string;
16277
+ print_werkplek?: string | null;
16026
16278
  updated_at?: string;
16027
16279
  user_id?: string;
16028
16280
  vat_code_eu_reverse?: string | null;
@@ -18974,6 +19226,19 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
18974
19226
  };
18975
19227
  Returns: undefined;
18976
19228
  };
19229
+ approve_mailbox_order_proposal: {
19230
+ Args: {
19231
+ p_custom_fields: import("../integrations/supabase/types.js").Json;
19232
+ p_customer_id: string;
19233
+ p_delivery_date: string;
19234
+ p_field_values?: import("../integrations/supabase/types.js").Json;
19235
+ p_lines: import("../integrations/supabase/types.js").Json;
19236
+ p_notes: string;
19237
+ p_proposal_id: string;
19238
+ p_reviewed_by: string;
19239
+ };
19240
+ Returns: import("../integrations/supabase/types.js").Json;
19241
+ };
18977
19242
  assign_cart_numbers: {
18978
19243
  Args: {
18979
19244
  p_carts: import("../integrations/supabase/types.js").Json;
@@ -19405,7 +19670,7 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
19405
19670
  Returns: string;
19406
19671
  } | {
19407
19672
  Args: {
19408
- _feature_id?: string;
19673
+ _feature_id: string;
19409
19674
  _module_id: string;
19410
19675
  _user_id: string;
19411
19676
  };
@@ -19809,6 +20074,19 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
19809
20074
  Args: never;
19810
20075
  Returns: boolean;
19811
20076
  };
20077
+ itk_offerte_naar_werkbon: {
20078
+ Args: {
20079
+ _offerte_id: string;
20080
+ };
20081
+ Returns: string;
20082
+ };
20083
+ itk_offerte_restant_mandaat: {
20084
+ Args: {
20085
+ _exclude_offerte_id?: string;
20086
+ _werkbon_id: string;
20087
+ };
20088
+ Returns: number;
20089
+ };
19812
20090
  jwt_has_role: {
19813
20091
  Args: {
19814
20092
  _role: import("../integrations/supabase/types.js").Database["public"]["Enums"]["app_role"];
@@ -20148,17 +20426,6 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
20148
20426
  Returns: string;
20149
20427
  };
20150
20428
  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
20429
  Args: {
20163
20430
  p_event_type: string;
20164
20431
  p_idempotency_key?: string;
@@ -21615,7 +21882,7 @@ export declare const analyseerDocumentLayout: import("@tanstack/start-client-cor
21615
21882
  Enums: {
21616
21883
  ai_import_status: "nieuw" | "verwerken" | "bevestigen" | "klaar" | "mislukt";
21617
21884
  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";
21885
+ doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon" | "veilingbon" | "afleverbrief" | "veilingbrief";
21619
21886
  doc_orientation: "portrait" | "landscape";
21620
21887
  exact_env: "staging" | "live";
21621
21888
  exact_push_status: "pending" | "sent" | "error";