@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 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 = 'legacy' | 'generated';
124
- export interface SearchEntry {
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
- 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;
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@redhat-cloud-services/types",
3
3
  "description": "TypeScript definitions for @redhat-cloud-services common typings.",
4
- "version": "3.1.0",
4
+ "version": "3.2.1",
5
5
  "main": "index.d.ts",
6
6
  "types": "index.d.ts",
7
7
  "publishConfig": {