@redhat-cloud-services/types 0.0.11 → 0.0.13
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 +31 -8
- package/package.json +3 -2
package/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { QuickStartCatalogPage } from '@patternfly/quickstarts';
|
|
1
|
+
import { QuickStart, QuickStartCatalogPage } from '@patternfly/quickstarts';
|
|
2
2
|
import { History } from 'history';
|
|
3
3
|
import { Access } from '@redhat-cloud-services/rbac-client';
|
|
4
|
+
import { AnalyticsBrowser } from '@segment/analytics-next';
|
|
4
5
|
|
|
5
6
|
export declare type HelpTopicLink = {
|
|
6
7
|
href: string;
|
|
@@ -53,7 +54,7 @@ declare type VisibilityFunctions = {
|
|
|
53
54
|
isProd: () => boolean;
|
|
54
55
|
isBeta: () => boolean;
|
|
55
56
|
isHidden: () => true;
|
|
56
|
-
|
|
57
|
+
withEmail: (toHave: string) => Promise<boolean>;
|
|
57
58
|
loosePermissions: (permissions: string[]) => boolean;
|
|
58
59
|
hasPermissions: (permissions: string[]) => boolean;
|
|
59
60
|
hasLocalStorage: (key: string, value: any) => boolean;
|
|
@@ -99,13 +100,13 @@ export interface ChromeAPI {
|
|
|
99
100
|
initialized: boolean;
|
|
100
101
|
experimentalApi: boolean;
|
|
101
102
|
/** Return true if current environment is fedramp */
|
|
102
|
-
isFedramp:
|
|
103
|
+
isFedramp: boolean;
|
|
103
104
|
usePendoFeedback: () => void;
|
|
104
105
|
toggleFeedbackModal: (isOpen: boolean) => void;
|
|
105
|
-
|
|
106
|
+
quickStarts: {
|
|
106
107
|
version: number;
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
updateQuickStarts: (key: string, quickstarts: QuickStart[]) => void;
|
|
109
|
+
toggle: (quickstartId: string) => void;
|
|
109
110
|
Catalog: typeof QuickStartCatalogPage;
|
|
110
111
|
};
|
|
111
112
|
chromeHistory: History;
|
|
@@ -155,9 +156,9 @@ export interface ChromeAPI {
|
|
|
155
156
|
};
|
|
156
157
|
helpTopics: {
|
|
157
158
|
addHelpTopics: (topics: HelpTopic[], enabled?: boolean) => void;
|
|
158
|
-
enableTopics: (...topicsNames: string[]) => Promise<void>;
|
|
159
|
+
enableTopics: (...topicsNames: string[]) => Promise<void[]>;
|
|
159
160
|
disableTopics: (...topicsNames: string[]) => void;
|
|
160
|
-
setActiveTopic: (name: string) => void
|
|
161
|
+
setActiveTopic: (name: string) => Promise<void>;
|
|
161
162
|
closeHelpTopic: () => void;
|
|
162
163
|
};
|
|
163
164
|
hideGlobalFilter: (isHidden: boolean) => void;
|
|
@@ -193,6 +194,28 @@ export interface ChromeAPI {
|
|
|
193
194
|
isAnsibleTrialFlagActive: () => boolean | undefined;
|
|
194
195
|
setAnsibleTrialFlag: () => void;
|
|
195
196
|
clearAnsibleTrialFlag: () => void;
|
|
197
|
+
// segment API
|
|
198
|
+
segment: {
|
|
199
|
+
setPageMetadata: (pageOptions?: Record<string, unknown>) => void;
|
|
200
|
+
};
|
|
201
|
+
analytics: AnalyticsBrowser;
|
|
202
|
+
useGlobalFilter: <T = undefined>(
|
|
203
|
+
callback: (selectedTags?: {
|
|
204
|
+
[key: string]: {
|
|
205
|
+
[key: string]: {
|
|
206
|
+
isSelected?: boolean;
|
|
207
|
+
value: string;
|
|
208
|
+
item?: {
|
|
209
|
+
tagKey?: string;
|
|
210
|
+
tagValue?: string;
|
|
211
|
+
};
|
|
212
|
+
group?: {
|
|
213
|
+
items?: unknown;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
}) => T
|
|
218
|
+
) => T;
|
|
196
219
|
}
|
|
197
220
|
|
|
198
221
|
declare global {
|
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": "0.0.
|
|
4
|
+
"version": "0.0.13",
|
|
5
5
|
"main": "",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"publishConfig": {
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@patternfly/quickstarts": "^2.3.1",
|
|
18
18
|
"@redhat-cloud-services/rbac-client": "^1.0.111",
|
|
19
|
-
"history": "^4.10.1"
|
|
19
|
+
"history": "^4.10.1",
|
|
20
|
+
"@segment/analytics-next": "^1.43.2"
|
|
20
21
|
},
|
|
21
22
|
"author": "",
|
|
22
23
|
"license": "Apache-2.0"
|