@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
@@ -7976,6 +7976,260 @@ export type Database = {
7976
7976
  };
7977
7977
  Relationships: [];
7978
7978
  };
7979
+ itk_offerte_events: {
7980
+ Row: {
7981
+ created_at: string;
7982
+ event_type: string;
7983
+ id: string;
7984
+ metadata: Json;
7985
+ offerte_id: string;
7986
+ omschrijving: string | null;
7987
+ user_id: string | null;
7988
+ };
7989
+ Insert: {
7990
+ created_at?: string;
7991
+ event_type: string;
7992
+ id?: string;
7993
+ metadata?: Json;
7994
+ offerte_id: string;
7995
+ omschrijving?: string | null;
7996
+ user_id?: string | null;
7997
+ };
7998
+ Update: {
7999
+ created_at?: string;
8000
+ event_type?: string;
8001
+ id?: string;
8002
+ metadata?: Json;
8003
+ offerte_id?: string;
8004
+ omschrijving?: string | null;
8005
+ user_id?: string | null;
8006
+ };
8007
+ Relationships: [
8008
+ {
8009
+ foreignKeyName: "itk_offerte_events_offerte_id_fkey";
8010
+ columns: ["offerte_id"];
8011
+ isOneToOne: false;
8012
+ referencedRelation: "itk_offertes";
8013
+ referencedColumns: ["id"];
8014
+ }
8015
+ ];
8016
+ };
8017
+ itk_offerte_regels: {
8018
+ Row: {
8019
+ created_at: string;
8020
+ id: string;
8021
+ line_total_cents: number;
8022
+ offerte_id: string;
8023
+ omschrijving: string;
8024
+ package_id: string | null;
8025
+ quantity: number;
8026
+ sort_order: number;
8027
+ source: string;
8028
+ unit_price_cents: number;
8029
+ updated_at: string;
8030
+ };
8031
+ Insert: {
8032
+ created_at?: string;
8033
+ id?: string;
8034
+ line_total_cents?: number;
8035
+ offerte_id: string;
8036
+ omschrijving?: string;
8037
+ package_id?: string | null;
8038
+ quantity?: number;
8039
+ sort_order?: number;
8040
+ source?: string;
8041
+ unit_price_cents?: number;
8042
+ updated_at?: string;
8043
+ };
8044
+ Update: {
8045
+ created_at?: string;
8046
+ id?: string;
8047
+ line_total_cents?: number;
8048
+ offerte_id?: string;
8049
+ omschrijving?: string;
8050
+ package_id?: string | null;
8051
+ quantity?: number;
8052
+ sort_order?: number;
8053
+ source?: string;
8054
+ unit_price_cents?: number;
8055
+ updated_at?: string;
8056
+ };
8057
+ Relationships: [
8058
+ {
8059
+ foreignKeyName: "itk_offerte_regels_offerte_id_fkey";
8060
+ columns: ["offerte_id"];
8061
+ isOneToOne: false;
8062
+ referencedRelation: "itk_offertes";
8063
+ referencedColumns: ["id"];
8064
+ },
8065
+ {
8066
+ foreignKeyName: "itk_offerte_regels_package_id_fkey";
8067
+ columns: ["package_id"];
8068
+ isOneToOne: false;
8069
+ referencedRelation: "werkbon_packages";
8070
+ referencedColumns: ["id"];
8071
+ }
8072
+ ];
8073
+ };
8074
+ itk_offerte_settings: {
8075
+ Row: {
8076
+ auto_convert_binnen_mandaat: boolean;
8077
+ created_at: string;
8078
+ default_geldigheid_dagen: number;
8079
+ default_vat_rate: number;
8080
+ id: string;
8081
+ singleton: boolean;
8082
+ updated_at: string;
8083
+ };
8084
+ Insert: {
8085
+ auto_convert_binnen_mandaat?: boolean;
8086
+ created_at?: string;
8087
+ default_geldigheid_dagen?: number;
8088
+ default_vat_rate?: number;
8089
+ id?: string;
8090
+ singleton?: boolean;
8091
+ updated_at?: string;
8092
+ };
8093
+ Update: {
8094
+ auto_convert_binnen_mandaat?: boolean;
8095
+ created_at?: string;
8096
+ default_geldigheid_dagen?: number;
8097
+ default_vat_rate?: number;
8098
+ id?: string;
8099
+ singleton?: boolean;
8100
+ updated_at?: string;
8101
+ };
8102
+ Relationships: [];
8103
+ };
8104
+ itk_offertes: {
8105
+ Row: {
8106
+ ai_generated: boolean;
8107
+ approved_at: string | null;
8108
+ binnen_mandaat: boolean;
8109
+ contact_id: string | null;
8110
+ converted_at: string | null;
8111
+ created_at: string;
8112
+ created_by: string | null;
8113
+ customer_id: string | null;
8114
+ follow_up_werkbon_id: string | null;
8115
+ id: string;
8116
+ jaar: number;
8117
+ mandaat_restant_cents: number;
8118
+ notities: string | null;
8119
+ offerte_number: string | null;
8120
+ omschrijving: string;
8121
+ rejected_at: string | null;
8122
+ sent_at: string | null;
8123
+ status: string;
8124
+ subtotal_cents: number;
8125
+ total_cents: number;
8126
+ updated_at: string;
8127
+ valid_until: string | null;
8128
+ vat_cents: number;
8129
+ vat_rate: number;
8130
+ viewed_at: string | null;
8131
+ volgnummer: number | null;
8132
+ werkbon_id: string | null;
8133
+ work_location_id: string | null;
8134
+ };
8135
+ Insert: {
8136
+ ai_generated?: boolean;
8137
+ approved_at?: string | null;
8138
+ binnen_mandaat?: boolean;
8139
+ contact_id?: string | null;
8140
+ converted_at?: string | null;
8141
+ created_at?: string;
8142
+ created_by?: string | null;
8143
+ customer_id?: string | null;
8144
+ follow_up_werkbon_id?: string | null;
8145
+ id?: string;
8146
+ jaar?: number;
8147
+ mandaat_restant_cents?: number;
8148
+ notities?: string | null;
8149
+ offerte_number?: string | null;
8150
+ omschrijving?: string;
8151
+ rejected_at?: string | null;
8152
+ sent_at?: string | null;
8153
+ status?: string;
8154
+ subtotal_cents?: number;
8155
+ total_cents?: number;
8156
+ updated_at?: string;
8157
+ valid_until?: string | null;
8158
+ vat_cents?: number;
8159
+ vat_rate?: number;
8160
+ viewed_at?: string | null;
8161
+ volgnummer?: number | null;
8162
+ werkbon_id?: string | null;
8163
+ work_location_id?: string | null;
8164
+ };
8165
+ Update: {
8166
+ ai_generated?: boolean;
8167
+ approved_at?: string | null;
8168
+ binnen_mandaat?: boolean;
8169
+ contact_id?: string | null;
8170
+ converted_at?: string | null;
8171
+ created_at?: string;
8172
+ created_by?: string | null;
8173
+ customer_id?: string | null;
8174
+ follow_up_werkbon_id?: string | null;
8175
+ id?: string;
8176
+ jaar?: number;
8177
+ mandaat_restant_cents?: number;
8178
+ notities?: string | null;
8179
+ offerte_number?: string | null;
8180
+ omschrijving?: string;
8181
+ rejected_at?: string | null;
8182
+ sent_at?: string | null;
8183
+ status?: string;
8184
+ subtotal_cents?: number;
8185
+ total_cents?: number;
8186
+ updated_at?: string;
8187
+ valid_until?: string | null;
8188
+ vat_cents?: number;
8189
+ vat_rate?: number;
8190
+ viewed_at?: string | null;
8191
+ volgnummer?: number | null;
8192
+ werkbon_id?: string | null;
8193
+ work_location_id?: string | null;
8194
+ };
8195
+ Relationships: [
8196
+ {
8197
+ foreignKeyName: "itk_offertes_contact_id_fkey";
8198
+ columns: ["contact_id"];
8199
+ isOneToOne: false;
8200
+ referencedRelation: "itk_contact_persons";
8201
+ referencedColumns: ["id"];
8202
+ },
8203
+ {
8204
+ foreignKeyName: "itk_offertes_customer_id_fkey";
8205
+ columns: ["customer_id"];
8206
+ isOneToOne: false;
8207
+ referencedRelation: "itk_customers";
8208
+ referencedColumns: ["id"];
8209
+ },
8210
+ {
8211
+ foreignKeyName: "itk_offertes_follow_up_werkbon_id_fkey";
8212
+ columns: ["follow_up_werkbon_id"];
8213
+ isOneToOne: false;
8214
+ referencedRelation: "werkbonnen";
8215
+ referencedColumns: ["id"];
8216
+ },
8217
+ {
8218
+ foreignKeyName: "itk_offertes_werkbon_id_fkey";
8219
+ columns: ["werkbon_id"];
8220
+ isOneToOne: false;
8221
+ referencedRelation: "werkbonnen";
8222
+ referencedColumns: ["id"];
8223
+ },
8224
+ {
8225
+ foreignKeyName: "itk_offertes_work_location_id_fkey";
8226
+ columns: ["work_location_id"];
8227
+ isOneToOne: false;
8228
+ referencedRelation: "itk_work_locations";
8229
+ referencedColumns: ["id"];
8230
+ }
8231
+ ];
8232
+ };
7979
8233
  itk_work_locations: {
7980
8234
  Row: {
7981
8235
  city: string | null;
@@ -10470,6 +10724,7 @@ export type Database = {
10470
10724
  module_registry: {
10471
10725
  Row: {
10472
10726
  created_at: string;
10727
+ enforce: boolean;
10473
10728
  is_active: boolean;
10474
10729
  last_seen_at: string;
10475
10730
  module_id: string;
@@ -10479,6 +10734,7 @@ export type Database = {
10479
10734
  };
10480
10735
  Insert: {
10481
10736
  created_at?: string;
10737
+ enforce?: boolean;
10482
10738
  is_active?: boolean;
10483
10739
  last_seen_at?: string;
10484
10740
  module_id: string;
@@ -10488,6 +10744,7 @@ export type Database = {
10488
10744
  };
10489
10745
  Update: {
10490
10746
  created_at?: string;
10747
+ enforce?: boolean;
10491
10748
  is_active?: boolean;
10492
10749
  last_seen_at?: string;
10493
10750
  module_id?: string;
@@ -15183,6 +15440,7 @@ export type Database = {
15183
15440
  type: string;
15184
15441
  updated_at: string;
15185
15442
  vereist_medewerker: boolean;
15443
+ werkplek: string | null;
15186
15444
  };
15187
15445
  Insert: {
15188
15446
  actief?: boolean;
@@ -15196,6 +15454,7 @@ export type Database = {
15196
15454
  type?: string;
15197
15455
  updated_at?: string;
15198
15456
  vereist_medewerker?: boolean;
15457
+ werkplek?: string | null;
15199
15458
  };
15200
15459
  Update: {
15201
15460
  actief?: boolean;
@@ -15209,6 +15468,7 @@ export type Database = {
15209
15468
  type?: string;
15210
15469
  updated_at?: string;
15211
15470
  vereist_medewerker?: boolean;
15471
+ werkplek?: string | null;
15212
15472
  };
15213
15473
  Relationships: [];
15214
15474
  };
@@ -16427,6 +16687,7 @@ export type Database = {
16427
16687
  invoice_enabled_mo: boolean;
16428
16688
  payment_gl_account: string;
16429
16689
  payment_journal_code: string;
16690
+ print_werkplek: string | null;
16430
16691
  updated_at: string;
16431
16692
  user_id: string;
16432
16693
  vat_code_eu_reverse: string | null;
@@ -16449,6 +16710,7 @@ export type Database = {
16449
16710
  invoice_enabled_mo?: boolean;
16450
16711
  payment_gl_account?: string;
16451
16712
  payment_journal_code?: string;
16713
+ print_werkplek?: string | null;
16452
16714
  updated_at?: string;
16453
16715
  user_id: string;
16454
16716
  vat_code_eu_reverse?: string | null;
@@ -16471,6 +16733,7 @@ export type Database = {
16471
16733
  invoice_enabled_mo?: boolean;
16472
16734
  payment_gl_account?: string;
16473
16735
  payment_journal_code?: string;
16736
+ print_werkplek?: string | null;
16474
16737
  updated_at?: string;
16475
16738
  user_id?: string;
16476
16739
  vat_code_eu_reverse?: string | null;
@@ -19489,6 +19752,19 @@ export type Database = {
19489
19752
  };
19490
19753
  Returns: undefined;
19491
19754
  };
19755
+ approve_mailbox_order_proposal: {
19756
+ Args: {
19757
+ p_custom_fields: Json;
19758
+ p_customer_id: string;
19759
+ p_delivery_date: string;
19760
+ p_field_values?: Json;
19761
+ p_lines: Json;
19762
+ p_notes: string;
19763
+ p_proposal_id: string;
19764
+ p_reviewed_by: string;
19765
+ };
19766
+ Returns: Json;
19767
+ };
19492
19768
  assign_cart_numbers: {
19493
19769
  Args: {
19494
19770
  p_carts: Json;
@@ -19920,7 +20196,7 @@ export type Database = {
19920
20196
  Returns: string;
19921
20197
  } | {
19922
20198
  Args: {
19923
- _feature_id?: string;
20199
+ _feature_id: string;
19924
20200
  _module_id: string;
19925
20201
  _user_id: string;
19926
20202
  };
@@ -20324,6 +20600,19 @@ export type Database = {
20324
20600
  Args: never;
20325
20601
  Returns: boolean;
20326
20602
  };
20603
+ itk_offerte_naar_werkbon: {
20604
+ Args: {
20605
+ _offerte_id: string;
20606
+ };
20607
+ Returns: string;
20608
+ };
20609
+ itk_offerte_restant_mandaat: {
20610
+ Args: {
20611
+ _exclude_offerte_id?: string;
20612
+ _werkbon_id: string;
20613
+ };
20614
+ Returns: number;
20615
+ };
20327
20616
  jwt_has_role: {
20328
20617
  Args: {
20329
20618
  _role: Database["public"]["Enums"]["app_role"];
@@ -20663,17 +20952,6 @@ export type Database = {
20663
20952
  Returns: string;
20664
20953
  };
20665
20954
  logistics_emit_event: {
20666
- Args: {
20667
- p_event_type: string;
20668
- p_idempotency_key?: string;
20669
- p_order_ref: string;
20670
- p_payload?: Json;
20671
- p_shadow?: boolean;
20672
- p_source_module: string;
20673
- p_strategy_id?: string;
20674
- };
20675
- Returns: Json;
20676
- } | {
20677
20955
  Args: {
20678
20956
  p_event_type: string;
20679
20957
  p_idempotency_key?: string;
@@ -22130,7 +22408,7 @@ export type Database = {
22130
22408
  Enums: {
22131
22409
  ai_import_status: "nieuw" | "verwerken" | "bevestigen" | "klaar" | "mislukt";
22132
22410
  app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
22133
- doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon";
22411
+ doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon" | "veilingbon" | "afleverbrief" | "veilingbrief";
22134
22412
  doc_orientation: "portrait" | "landscape";
22135
22413
  exact_env: "staging" | "live";
22136
22414
  exact_push_status: "pending" | "sent" | "error";
@@ -22201,7 +22479,7 @@ export declare const Constants: {
22201
22479
  readonly Enums: {
22202
22480
  readonly ai_import_status: readonly ["nieuw", "verwerken", "bevestigen", "klaar", "mislukt"];
22203
22481
  readonly app_role: readonly ["admin", "planner", "monteur", "administratie", "ai_admin", "manager", "warehouse", "sales", "developer", "receptie"];
22204
- readonly doc_layout_type: readonly ["pakbon", "factuur", "offerte", "orderbevestiging", "etiket", "verzendlabel", "productlabel", "barcode_label", "magazijnlijst", "controlelijst", "transportdocument", "vrij", "sticker", "productiebon"];
22482
+ readonly doc_layout_type: readonly ["pakbon", "factuur", "offerte", "orderbevestiging", "etiket", "verzendlabel", "productlabel", "barcode_label", "magazijnlijst", "controlelijst", "transportdocument", "vrij", "sticker", "productiebon", "veilingbon", "afleverbrief", "veilingbrief"];
22205
22483
  readonly doc_orientation: readonly ["portrait", "landscape"];
22206
22484
  readonly exact_env: readonly ["staging", "live"];
22207
22485
  readonly exact_push_status: readonly ["pending", "sent", "error"];