@flowselections/pick-schermen-kwekers 1.0.11 → 1.0.12

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.
@@ -0,0 +1,92 @@
1
+ // This file is automatically generated. Do not edit it directly.
2
+ // On a Lovable preview surface, broker the auth session to the editor over
3
+ // postMessage so the project's preview surfaces share one login; else localStorage.
4
+ export function brokeredPreviewStorage() {
5
+ if (typeof window === 'undefined')
6
+ return undefined;
7
+ const host = location.hostname;
8
+ const PREVIEW_ZONES = ['lovableproject.com', 'lovableproject-dev.com', 'lovable.app', 'gpt-eng.com', 'gptengineer.run'];
9
+ const onPreviewZone = PREVIEW_ZONES.some((z) => host === z || host.endsWith('.' + z));
10
+ // Read the id only from non-user-controlled host positions, so a user-named
11
+ // preview--<name> host can't smuggle another project's id.
12
+ const UUID = '[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}';
13
+ const projectId = onPreviewZone
14
+ ? (host.match(new RegExp('^(?:id-preview(?:-[a-z0-9]+)?|project)--(' + UUID + ')(?:-dev)?(?=\\.|$)', 'i'))?.[1]
15
+ ?? host.match(new RegExp('^(' + UUID + ')(?=[.-])', 'i'))?.[1])
16
+ : undefined;
17
+ const framed = window.parent && window.parent !== window;
18
+ if (!projectId || !framed)
19
+ return localStorage;
20
+ // Post only to the real editor ancestor, validated as a Lovable origin, so the
21
+ // session token can never reach an untrusted embedder.
22
+ const dev = host.endsWith('.lovableproject-dev.com') || host.endsWith('.gpt-eng.com');
23
+ const EDITOR = dev
24
+ ? /^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/
25
+ : /^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/;
26
+ const ancestor = (location.ancestorOrigins && location.ancestorOrigins[0]) || (document.referrer ? new URL(document.referrer).origin : '');
27
+ const editorOrigins = ancestor && EDITOR.test(ancestor)
28
+ ? [ancestor]
29
+ : (dev ? ['https://lovable.dev', 'http://localhost:3000'] : ['https://lovable.dev']);
30
+ const RESULT = 'lovable-preview-auth:result';
31
+ const TIMEOUT = 2000;
32
+ const newId = () => Math.random().toString(36).slice(2) + Date.now().toString(36);
33
+ const request = (type, key, value) => new Promise((resolve) => {
34
+ const requestId = newId();
35
+ let done = false;
36
+ let timer;
37
+ const finish = (r) => {
38
+ if (done)
39
+ return;
40
+ done = true;
41
+ clearTimeout(timer);
42
+ window.removeEventListener('message', onMessage);
43
+ resolve(r);
44
+ };
45
+ const onMessage = (e) => {
46
+ if (editorOrigins.indexOf(e.origin) < 0)
47
+ return;
48
+ const d = e.data;
49
+ if (d && d.type === RESULT && d.requestId === requestId)
50
+ finish(d);
51
+ };
52
+ window.addEventListener('message', onMessage);
53
+ const msg = { type, requestId, projectId, key };
54
+ if (value !== undefined)
55
+ msg['value'] = value;
56
+ // targetOrigin per trusted editor origin, so a session token never reaches an arbitrary embedder.
57
+ for (const origin of editorOrigins)
58
+ window.parent.postMessage(msg, origin);
59
+ timer = setTimeout(() => finish(null), TIMEOUT);
60
+ });
61
+ // The editor may not be listening yet at the first getItem, so retry once.
62
+ let firstGet = true;
63
+ const RETRY_DELAY = 250;
64
+ return {
65
+ getItem: async (key) => {
66
+ let res = await request('lovable-preview-auth:get', key);
67
+ if (!res && firstGet) {
68
+ await new Promise((r) => setTimeout(r, RETRY_DELAY));
69
+ res = await request('lovable-preview-auth:get', key);
70
+ }
71
+ firstGet = false;
72
+ // '' is the logout tombstone: clear the local copy too so it can't resurrect if
73
+ // the broker later goes silent. A null reply means never-synced -> keep local.
74
+ if (res && res.ok && typeof res.value === 'string') {
75
+ if (res.value === '') {
76
+ localStorage.removeItem(key);
77
+ return null;
78
+ }
79
+ return res.value;
80
+ }
81
+ return localStorage.getItem(key);
82
+ },
83
+ setItem: (key, value) => {
84
+ localStorage.setItem(key, value);
85
+ return request('lovable-preview-auth:set', key, value).then(() => undefined);
86
+ },
87
+ removeItem: (key) => {
88
+ localStorage.removeItem(key);
89
+ return request('lovable-preview-auth:remove', key).then(() => undefined);
90
+ },
91
+ };
92
+ }
@@ -692,6 +692,99 @@ export type Database = {
692
692
  };
693
693
  Relationships: [];
694
694
  };
695
+ artikelen_cache: {
696
+ Row: {
697
+ artikelcode: string;
698
+ bron: string;
699
+ bruto_prijs_cent: number | null;
700
+ created_at: string;
701
+ eenheid: string;
702
+ fabrikant: string | null;
703
+ fetched_at: string;
704
+ gtin: string | null;
705
+ id: string;
706
+ naam: string;
707
+ netto_prijs_cent: number | null;
708
+ omschrijving: string | null;
709
+ raw: Json;
710
+ updated_at: string;
711
+ valuta: string;
712
+ };
713
+ Insert: {
714
+ artikelcode: string;
715
+ bron?: string;
716
+ bruto_prijs_cent?: number | null;
717
+ created_at?: string;
718
+ eenheid?: string;
719
+ fabrikant?: string | null;
720
+ fetched_at?: string;
721
+ gtin?: string | null;
722
+ id?: string;
723
+ naam: string;
724
+ netto_prijs_cent?: number | null;
725
+ omschrijving?: string | null;
726
+ raw?: Json;
727
+ updated_at?: string;
728
+ valuta?: string;
729
+ };
730
+ Update: {
731
+ artikelcode?: string;
732
+ bron?: string;
733
+ bruto_prijs_cent?: number | null;
734
+ created_at?: string;
735
+ eenheid?: string;
736
+ fabrikant?: string | null;
737
+ fetched_at?: string;
738
+ gtin?: string | null;
739
+ id?: string;
740
+ naam?: string;
741
+ netto_prijs_cent?: number | null;
742
+ omschrijving?: string | null;
743
+ raw?: Json;
744
+ updated_at?: string;
745
+ valuta?: string;
746
+ };
747
+ Relationships: [];
748
+ };
749
+ artikelen_veldconfig: {
750
+ Row: {
751
+ bron_pad: string;
752
+ created_at: string;
753
+ id: string;
754
+ label: string;
755
+ sort_order: number;
756
+ type: string;
757
+ updated_at: string;
758
+ veld_key: string;
759
+ zichtbaar_in_detail: boolean;
760
+ zichtbaar_in_lijst: boolean;
761
+ };
762
+ Insert: {
763
+ bron_pad: string;
764
+ created_at?: string;
765
+ id?: string;
766
+ label: string;
767
+ sort_order?: number;
768
+ type?: string;
769
+ updated_at?: string;
770
+ veld_key: string;
771
+ zichtbaar_in_detail?: boolean;
772
+ zichtbaar_in_lijst?: boolean;
773
+ };
774
+ Update: {
775
+ bron_pad?: string;
776
+ created_at?: string;
777
+ id?: string;
778
+ label?: string;
779
+ sort_order?: number;
780
+ type?: string;
781
+ updated_at?: string;
782
+ veld_key?: string;
783
+ zichtbaar_in_detail?: boolean;
784
+ zichtbaar_in_lijst?: boolean;
785
+ };
786
+ Relationships: [];
787
+ };
695
788
  booking_items: {
696
789
  Row: {
697
790
  booking_id: string;
@@ -3220,6 +3313,51 @@ export type Database = {
3220
3313
  };
3221
3314
  Relationships: [];
3222
3315
  };
3316
+ document_printplek_printers: {
3317
+ Row: {
3318
+ created_at: string;
3319
+ documenttype: string;
3320
+ id: string;
3321
+ papierformaat: string | null;
3322
+ print_plek_id: string;
3323
+ printer_id: string | null;
3324
+ updated_at: string;
3325
+ };
3326
+ Insert: {
3327
+ created_at?: string;
3328
+ documenttype: string;
3329
+ id?: string;
3330
+ papierformaat?: string | null;
3331
+ print_plek_id: string;
3332
+ printer_id?: string | null;
3333
+ updated_at?: string;
3334
+ };
3335
+ Update: {
3336
+ created_at?: string;
3337
+ documenttype?: string;
3338
+ id?: string;
3339
+ papierformaat?: string | null;
3340
+ print_plek_id?: string;
3341
+ printer_id?: string | null;
3342
+ updated_at?: string;
3343
+ };
3344
+ Relationships: [
3345
+ {
3346
+ foreignKeyName: "document_printplek_printers_print_plek_id_fkey";
3347
+ columns: ["print_plek_id"];
3348
+ isOneToOne: false;
3349
+ referencedRelation: "print_plekken";
3350
+ referencedColumns: ["id"];
3351
+ },
3352
+ {
3353
+ foreignKeyName: "document_printplek_printers_printer_id_fkey";
3354
+ columns: ["printer_id"];
3355
+ isOneToOne: false;
3356
+ referencedRelation: "printers";
3357
+ referencedColumns: ["id"];
3358
+ }
3359
+ ];
3360
+ };
3223
3361
  document_werkplek_printers: {
3224
3362
  Row: {
3225
3363
  created_at: string;
@@ -9377,6 +9515,9 @@ export type Database = {
9377
9515
  id: string;
9378
9516
  last_error: string | null;
9379
9517
  last_error_at: string | null;
9518
+ last_error_code: string | null;
9519
+ last_gateway_status: number | null;
9520
+ last_response: Json | null;
9380
9521
  last_sent_hash: string | null;
9381
9522
  locked_by: string | null;
9382
9523
  locked_until: string | null;
@@ -9397,6 +9538,9 @@ export type Database = {
9397
9538
  id?: string;
9398
9539
  last_error?: string | null;
9399
9540
  last_error_at?: string | null;
9541
+ last_error_code?: string | null;
9542
+ last_gateway_status?: number | null;
9543
+ last_response?: Json | null;
9400
9544
  last_sent_hash?: string | null;
9401
9545
  locked_by?: string | null;
9402
9546
  locked_until?: string | null;
@@ -9417,6 +9561,9 @@ export type Database = {
9417
9561
  id?: string;
9418
9562
  last_error?: string | null;
9419
9563
  last_error_at?: string | null;
9564
+ last_error_code?: string | null;
9565
+ last_gateway_status?: number | null;
9566
+ last_response?: Json | null;
9420
9567
  last_sent_hash?: string | null;
9421
9568
  locked_by?: string | null;
9422
9569
  locked_until?: string | null;
@@ -13713,6 +13860,103 @@ export type Database = {
13713
13860
  }
13714
13861
  ];
13715
13862
  };
13863
+ print_plek_computers: {
13864
+ Row: {
13865
+ computer_naam: string;
13866
+ created_at: string;
13867
+ id: string;
13868
+ print_plek_id: string;
13869
+ updated_at: string;
13870
+ };
13871
+ Insert: {
13872
+ computer_naam: string;
13873
+ created_at?: string;
13874
+ id?: string;
13875
+ print_plek_id: string;
13876
+ updated_at?: string;
13877
+ };
13878
+ Update: {
13879
+ computer_naam?: string;
13880
+ created_at?: string;
13881
+ id?: string;
13882
+ print_plek_id?: string;
13883
+ updated_at?: string;
13884
+ };
13885
+ Relationships: [
13886
+ {
13887
+ foreignKeyName: "print_plek_computers_print_plek_id_fkey";
13888
+ columns: ["print_plek_id"];
13889
+ isOneToOne: false;
13890
+ referencedRelation: "print_plekken";
13891
+ referencedColumns: ["id"];
13892
+ }
13893
+ ];
13894
+ };
13895
+ print_plek_koppelingen: {
13896
+ Row: {
13897
+ bron: string;
13898
+ bron_id: string;
13899
+ created_at: string;
13900
+ id: string;
13901
+ label: string | null;
13902
+ print_plek_id: string;
13903
+ updated_at: string;
13904
+ };
13905
+ Insert: {
13906
+ bron: string;
13907
+ bron_id: string;
13908
+ created_at?: string;
13909
+ id?: string;
13910
+ label?: string | null;
13911
+ print_plek_id: string;
13912
+ updated_at?: string;
13913
+ };
13914
+ Update: {
13915
+ bron?: string;
13916
+ bron_id?: string;
13917
+ created_at?: string;
13918
+ id?: string;
13919
+ label?: string | null;
13920
+ print_plek_id?: string;
13921
+ updated_at?: string;
13922
+ };
13923
+ Relationships: [
13924
+ {
13925
+ foreignKeyName: "print_plek_koppelingen_print_plek_id_fkey";
13926
+ columns: ["print_plek_id"];
13927
+ isOneToOne: false;
13928
+ referencedRelation: "print_plekken";
13929
+ referencedColumns: ["id"];
13930
+ }
13931
+ ];
13932
+ };
13933
+ print_plekken: {
13934
+ Row: {
13935
+ actief: boolean;
13936
+ created_at: string;
13937
+ id: string;
13938
+ naam: string;
13939
+ omschrijving: string | null;
13940
+ updated_at: string;
13941
+ };
13942
+ Insert: {
13943
+ actief?: boolean;
13944
+ created_at?: string;
13945
+ id?: string;
13946
+ naam: string;
13947
+ omschrijving?: string | null;
13948
+ updated_at?: string;
13949
+ };
13950
+ Update: {
13951
+ actief?: boolean;
13952
+ created_at?: string;
13953
+ id?: string;
13954
+ naam?: string;
13955
+ omschrijving?: string | null;
13956
+ updated_at?: string;
13957
+ };
13958
+ Relationships: [];
13959
+ };
13716
13960
  print_queue_runners: {
13717
13961
  Row: {
13718
13962
  actief: boolean;
@@ -19109,6 +19353,9 @@ export type Database = {
19109
19353
  scheduled_end_time: string | null;
19110
19354
  scheduled_start_time: string | null;
19111
19355
  sequence_number: number;
19356
+ signature_accepted_at: string | null;
19357
+ signature_by_user_id: string | null;
19358
+ signature_name: string | null;
19112
19359
  source_email_meta: Json | null;
19113
19360
  source_mailbox_message_id: string | null;
19114
19361
  source_pdf_path: string | null;
@@ -19144,6 +19391,9 @@ export type Database = {
19144
19391
  scheduled_end_time?: string | null;
19145
19392
  scheduled_start_time?: string | null;
19146
19393
  sequence_number: number;
19394
+ signature_accepted_at?: string | null;
19395
+ signature_by_user_id?: string | null;
19396
+ signature_name?: string | null;
19147
19397
  source_email_meta?: Json | null;
19148
19398
  source_mailbox_message_id?: string | null;
19149
19399
  source_pdf_path?: string | null;
@@ -19179,6 +19429,9 @@ export type Database = {
19179
19429
  scheduled_end_time?: string | null;
19180
19430
  scheduled_start_time?: string | null;
19181
19431
  sequence_number?: number;
19432
+ signature_accepted_at?: string | null;
19433
+ signature_by_user_id?: string | null;
19434
+ signature_name?: string | null;
19182
19435
  source_email_meta?: Json | null;
19183
19436
  source_mailbox_message_id?: string | null;
19184
19437
  source_pdf_path?: string | null;
@@ -21601,6 +21854,23 @@ export type Database = {
21601
21854
  };
21602
21855
  Returns: string;
21603
21856
  };
21857
+ logistics_floriday_finish_push_v2: {
21858
+ Args: {
21859
+ _error?: string;
21860
+ _error_code?: string;
21861
+ _fulfillment_order_id?: string;
21862
+ _gateway_status?: number;
21863
+ _id: string;
21864
+ _max_age_hours?: number;
21865
+ _max_attempts?: number;
21866
+ _ok: boolean;
21867
+ _permanent?: boolean;
21868
+ _response?: Json;
21869
+ _revision: number;
21870
+ _sent_hash?: string;
21871
+ };
21872
+ Returns: string;
21873
+ };
21604
21874
  logistics_floriday_prune_pushes: {
21605
21875
  Args: {
21606
21876
  _days?: number;
@@ -22236,6 +22506,14 @@ export type Database = {
22236
22506
  };
22237
22507
  Returns: Json;
22238
22508
  };
22509
+ pick_print_plekken: {
22510
+ Args: never;
22511
+ Returns: {
22512
+ id: string;
22513
+ naam: string;
22514
+ omschrijving: string;
22515
+ }[];
22516
+ };
22239
22517
  pick_release_expired_locks: {
22240
22518
  Args: never;
22241
22519
  Returns: number;
@@ -22300,6 +22578,13 @@ export type Database = {
22300
22578
  isSetofReturn: false;
22301
22579
  };
22302
22580
  };
22581
+ pick_set_station_print_plek: {
22582
+ Args: {
22583
+ _print_plek_id: string;
22584
+ _station_id: string;
22585
+ };
22586
+ Returns: string;
22587
+ };
22303
22588
  pick_station_dashboard: {
22304
22589
  Args: never;
22305
22590
  Returns: {
@@ -22312,6 +22597,25 @@ export type Database = {
22312
22597
  waiting: number;
22313
22598
  }[];
22314
22599
  };
22600
+ pick_station_print_plek: {
22601
+ Args: {
22602
+ _station_id: string;
22603
+ };
22604
+ Returns: {
22605
+ naam: string;
22606
+ omschrijving: string;
22607
+ print_plek_id: string;
22608
+ }[];
22609
+ };
22610
+ pick_station_print_plekken: {
22611
+ Args: never;
22612
+ Returns: {
22613
+ naam: string;
22614
+ omschrijving: string;
22615
+ print_plek_id: string;
22616
+ station_id: string;
22617
+ }[];
22618
+ };
22315
22619
  pick_station_slugify: {
22316
22620
  Args: {
22317
22621
  _id: string;