@redhat-cloud-services/types 3.2.0 → 3.3.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 CHANGED
@@ -108,10 +108,6 @@ export type EnableTopicsArgs = [{
108
108
  names: string[];
109
109
  append?: boolean;
110
110
  }] | string[];
111
- type SearchNavItemPermission<T extends keyof VisibilityFunctions = 'isOrgAdmin'> = {
112
- method: T;
113
- args: Parameters<VisibilityFunctions[T]>;
114
- };
115
111
  export type ChromeWsEventTypes = 'com.redhat.console.notifications.drawer';
116
112
  export type ChromeWsPayload<T> = {
117
113
  data: T;
@@ -124,25 +120,32 @@ export type ChromeWsPayload<T> = {
124
120
  export type ChromeWsEventListener<T> = (event: ChromeWsPayload<T>) => void;
125
121
  export type UnSubscribeFromChromeWsEvent = () => void;
126
122
  export type AddChromeWsEventListener = <T>(type: ChromeWsEventTypes, listener: ChromeWsEventListener<T>) => UnSubscribeFromChromeWsEvent;
127
- export type SearchDataType = 'legacy' | 'generated';
128
- export interface SearchEntry {
129
- id: string;
123
+ export type SearchDataType = 'services' | 'quickstarts';
124
+ export type SearchEntry = {
130
125
  title: string;
131
- description: string;
132
126
  uri: string;
133
127
  pathname: string;
128
+ description: string;
129
+ icon?: string;
130
+ id: string;
134
131
  bundleTitle: string;
135
132
  altTitle?: string[];
136
- icon?: string;
137
133
  type: SearchDataType;
138
- permissions?: SearchNavItemPermission[];
134
+ };
135
+ export declare enum ReleaseEnv {
136
+ STABLE = "STABLE",
137
+ PREVIEW = "PREVIEW"
139
138
  }
139
+ export type ResultItem = {
140
+ title: string;
141
+ description: string;
142
+ bundleTitle: string;
143
+ pathname: string;
144
+ id: string;
145
+ };
140
146
  export interface ChromeSearchAPI {
141
- fillStore: (type: SearchDataType, data: SearchEntry[]) => Promise<void>;
142
- query: (term: string, type?: SearchDataType, env?: string, limit?: number) => Promise<SearchEntry[]>;
143
- getAvailableTypes: () => SearchDataType[];
144
- clearType: (type: SearchDataType) => Promise<void>;
145
- getCachedData: (type: SearchDataType) => SearchEntry[] | undefined;
147
+ query: (term: string, type: SearchDataType, env?: ReleaseEnv) => Promise<ResultItem[]>;
148
+ insert: (data: SearchEntry) => Promise<void>;
146
149
  }
147
150
  export type DrawerPanelActions = {
148
151
  setDrawerPanelContent: (data: {
@@ -279,6 +282,9 @@ export interface ChromeAPI {
279
282
  enablePackagesDebug: () => void;
280
283
  requestPdf: (options: PDFRequestOptions) => Promise<void>;
281
284
  drawerActions: DrawerPanelActions;
285
+ useVirtualAssistant?: () => {
286
+ openVA: (message: string) => void;
287
+ };
282
288
  search?: ChromeSearchAPI;
283
289
  }
284
290
  declare global {
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.2.0",
4
+ "version": "3.3.0",
5
5
  "main": "index.d.ts",
6
6
  "types": "index.d.ts",
7
7
  "publishConfig": {