@redhat-cloud-services/types 3.0.0 → 3.1.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.
- package/index.d.ts +21 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export declare type PDFRequestPayload = {
|
|
|
22
22
|
scope: string;
|
|
23
23
|
module: string;
|
|
24
24
|
importName?: string;
|
|
25
|
+
landscape?: boolean;
|
|
25
26
|
fetchDataParams?: Record<string, any>;
|
|
26
27
|
additionalData?: Record<string, any>;
|
|
27
28
|
};
|
|
@@ -119,6 +120,25 @@ export type ChromeWsPayload<T> = {
|
|
|
119
120
|
export type ChromeWsEventListener<T> = (event: ChromeWsPayload<T>) => void;
|
|
120
121
|
export type UnSubscribeFromChromeWsEvent = () => void;
|
|
121
122
|
export type AddChromeWsEventListener = <T>(type: ChromeWsEventTypes, listener: ChromeWsEventListener<T>) => UnSubscribeFromChromeWsEvent;
|
|
123
|
+
export type SearchDataType = 'legacy' | 'generated';
|
|
124
|
+
export interface SearchEntry {
|
|
125
|
+
id: string;
|
|
126
|
+
title: string;
|
|
127
|
+
description: string;
|
|
128
|
+
uri: string;
|
|
129
|
+
pathname: string;
|
|
130
|
+
bundleTitle: string;
|
|
131
|
+
altTitle?: string[];
|
|
132
|
+
icon?: string;
|
|
133
|
+
type: SearchDataType;
|
|
134
|
+
}
|
|
135
|
+
export interface ChromeSearchAPI {
|
|
136
|
+
fillStore: (type: SearchDataType, data: SearchEntry[]) => Promise<void>;
|
|
137
|
+
query: (term: string, type?: SearchDataType, env?: string, limit?: number) => Promise<SearchEntry[]>;
|
|
138
|
+
getAvailableTypes: () => SearchDataType[];
|
|
139
|
+
clearType: (type: SearchDataType) => Promise<void>;
|
|
140
|
+
getCachedData: (type: SearchDataType) => SearchEntry[] | undefined;
|
|
141
|
+
}
|
|
122
142
|
export type DrawerPanelActions = {
|
|
123
143
|
setDrawerPanelContent: (data: {
|
|
124
144
|
scope: string;
|
|
@@ -254,6 +274,7 @@ export interface ChromeAPI {
|
|
|
254
274
|
enablePackagesDebug: () => void;
|
|
255
275
|
requestPdf: (options: PDFRequestOptions) => Promise<void>;
|
|
256
276
|
drawerActions: DrawerPanelActions;
|
|
277
|
+
search?: ChromeSearchAPI;
|
|
257
278
|
}
|
|
258
279
|
declare global {
|
|
259
280
|
interface Window {
|
package/package.json
CHANGED