@visma-swno/vsn-navigation 1.1.0-beta.12 → 1.1.0-beta.14

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.
@@ -55,6 +55,37 @@ declare type NonEmptyArray<T> = [T, ...T[]];
55
55
  export declare type SearchConfig = {
56
56
  enabled: boolean;
57
57
  shortcut?: string;
58
+ extraDataSets?: SearchDataSetConfig[];
59
+ };
60
+
61
+ export declare type SearchDataSetConfig = {
62
+ /** Stable unique identifier for the dataset, used for selection and lookup */
63
+ id: string;
64
+ /** User-facing label for display purposes */
65
+ label: string;
66
+ searchFunction: (query: SearchQuery) => Promise<SearchResult>;
67
+ };
68
+
69
+ export declare class SearchError extends Error {
70
+ constructor(message: string);
71
+ }
72
+
73
+ export declare type SearchQuery = {
74
+ abortController: AbortController;
75
+ query: string;
76
+ cursor?: string;
77
+ };
78
+
79
+ export declare type SearchResult = {
80
+ nextCursor?: string;
81
+ results: SearchResultItem[];
82
+ };
83
+
84
+ export declare type SearchResultItem = {
85
+ id: string;
86
+ label: string;
87
+ url: string;
88
+ lines?: [string] | [string, string];
58
89
  };
59
90
 
60
91
  export declare type TreeItem = TreeParent | TreeLeaf;