@redhat-cloud-services/types 3.1.0 → 3.2.1
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 +18 -10
- package/index.js +6 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -120,24 +120,32 @@ export type ChromeWsPayload<T> = {
|
|
|
120
120
|
export type ChromeWsEventListener<T> = (event: ChromeWsPayload<T>) => void;
|
|
121
121
|
export type UnSubscribeFromChromeWsEvent = () => void;
|
|
122
122
|
export type AddChromeWsEventListener = <T>(type: ChromeWsEventTypes, listener: ChromeWsEventListener<T>) => UnSubscribeFromChromeWsEvent;
|
|
123
|
-
export type SearchDataType = '
|
|
124
|
-
export
|
|
125
|
-
id: string;
|
|
123
|
+
export type SearchDataType = 'services' | 'quickstarts';
|
|
124
|
+
export type SearchEntry = {
|
|
126
125
|
title: string;
|
|
127
|
-
description: string;
|
|
128
126
|
uri: string;
|
|
129
127
|
pathname: string;
|
|
128
|
+
description: string;
|
|
129
|
+
icon?: string;
|
|
130
|
+
id: string;
|
|
130
131
|
bundleTitle: string;
|
|
131
132
|
altTitle?: string[];
|
|
132
|
-
icon?: string;
|
|
133
133
|
type: SearchDataType;
|
|
134
|
+
};
|
|
135
|
+
export declare enum ReleaseEnv {
|
|
136
|
+
STABLE = "STABLE",
|
|
137
|
+
PREVIEW = "PREVIEW"
|
|
134
138
|
}
|
|
139
|
+
export type ResultItem = {
|
|
140
|
+
title: string;
|
|
141
|
+
description: string;
|
|
142
|
+
bundleTitle: string;
|
|
143
|
+
pathname: string;
|
|
144
|
+
id: string;
|
|
145
|
+
};
|
|
135
146
|
export interface ChromeSearchAPI {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
getAvailableTypes: () => SearchDataType[];
|
|
139
|
-
clearType: (type: SearchDataType) => Promise<void>;
|
|
140
|
-
getCachedData: (type: SearchDataType) => SearchEntry[] | undefined;
|
|
147
|
+
query: (term: string, type: SearchDataType, env?: ReleaseEnv) => Promise<ResultItem[]>;
|
|
148
|
+
insert: (data: SearchEntry) => Promise<void>;
|
|
141
149
|
}
|
|
142
150
|
export type DrawerPanelActions = {
|
|
143
151
|
setDrawerPanelContent: (data: {
|
package/index.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReleaseEnv = void 0;
|
|
4
|
+
var ReleaseEnv;
|
|
5
|
+
(function (ReleaseEnv) {
|
|
6
|
+
ReleaseEnv["STABLE"] = "STABLE";
|
|
7
|
+
ReleaseEnv["PREVIEW"] = "PREVIEW";
|
|
8
|
+
})(ReleaseEnv || (exports.ReleaseEnv = ReleaseEnv = {}));
|
|
3
9
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/types/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/types/index.ts"],"names":[],"mappings":";;;AA4JA,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;AACrB,CAAC,EAHW,UAAU,0BAAV,UAAU,QAGrB"}
|
package/package.json
CHANGED