@camunda/camunda-composite-components 0.1.5-rc.0 → 0.1.5-rc.2

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.
Files changed (65) hide show
  1. package/lib/esm/api/api.d.ts +5 -5
  2. package/lib/esm/api/api.js +4 -11
  3. package/lib/esm/api/endpoints.const.d.ts +1 -2
  4. package/lib/esm/api/endpoints.const.js +5 -13
  5. package/lib/esm/api/help-center.d.ts +34 -0
  6. package/lib/esm/api/help-center.js +90 -0
  7. package/lib/esm/api/notifications.js +2 -0
  8. package/lib/esm/components/c3-help-center/c3-help-center.d.ts +16 -0
  9. package/lib/esm/components/c3-help-center/c3-help-center.js +132 -0
  10. package/lib/esm/components/c3-help-center/c3-help-center.types.d.ts +54 -0
  11. package/lib/esm/components/c3-help-center/c3-help-center.types.js +1 -0
  12. package/lib/esm/components/c3-help-center/defaultHelpCenterConfig.d.ts +10 -0
  13. package/lib/esm/components/c3-help-center/defaultHelpCenterConfig.js +418 -0
  14. package/lib/esm/components/c3-help-center/help-center.d.ts +20 -0
  15. package/lib/esm/components/c3-help-center/help-center.js +148 -0
  16. package/lib/esm/components/c3-help-center/recommendations.d.ts +4 -0
  17. package/lib/esm/components/c3-help-center/recommendations.js +53 -0
  18. package/lib/esm/components/c3-help-center/tabs/feedback.d.ts +8 -0
  19. package/lib/esm/components/c3-help-center/tabs/feedback.js +183 -0
  20. package/lib/esm/components/c3-help-center/tabs/tabContent.d.ts +19 -0
  21. package/lib/esm/components/c3-help-center/tabs/tabContent.js +18 -0
  22. package/lib/esm/components/c3-help-center/tile.d.ts +10 -0
  23. package/lib/esm/components/c3-help-center/tile.js +51 -0
  24. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-user-sidebar.js +4 -10
  25. package/lib/esm/components/c3-navigation/c3-navigation.d.ts +1 -1
  26. package/lib/esm/components/c3-navigation/c3-navigation.js +12 -4
  27. package/lib/esm/components/c3-navigation/c3-navigation.types.d.ts +3 -0
  28. package/lib/esm/components/c3-navigation/c3-notification-provider/c3-notification-provider.js +1 -1
  29. package/lib/esm/components/c3-navigation/story-helpers.d.ts +0 -1
  30. package/lib/esm/components/c3-navigation/story-helpers.js +4 -6
  31. package/lib/esm/components/c3-onboarding-survey/c3-onboarding-survey.d.ts +14 -0
  32. package/lib/esm/components/c3-onboarding-survey/c3-onboarding-survey.js +96 -0
  33. package/lib/esm/components/c3-onboarding-survey/defaultOnboardingConfig.d.ts +12 -0
  34. package/lib/esm/components/c3-onboarding-survey/defaultOnboardingConfig.js +188 -0
  35. package/lib/esm/components/c3-onboarding-survey/elements/dropdownSelect.d.ts +15 -0
  36. package/lib/esm/components/c3-onboarding-survey/elements/dropdownSelect.js +61 -0
  37. package/lib/esm/components/c3-onboarding-survey/elements/radioGroupMulti.d.ts +7 -0
  38. package/lib/esm/components/c3-onboarding-survey/elements/radioGroupMulti.js +62 -0
  39. package/lib/esm/components/c3-onboarding-survey/elements/radioGroupSingle.d.ts +7 -0
  40. package/lib/esm/components/c3-onboarding-survey/elements/radioGroupSingle.js +42 -0
  41. package/lib/esm/components/c3-onboarding-survey/elements/textField.d.ts +6 -0
  42. package/lib/esm/components/c3-onboarding-survey/elements/textField.js +10 -0
  43. package/lib/esm/components/c3-onboarding-survey/onboarding.types.d.ts +33 -0
  44. package/lib/esm/components/c3-onboarding-survey/onboarding.types.js +8 -0
  45. package/lib/esm/components/c3-onboarding-survey/onboardingModal.d.ts +22 -0
  46. package/lib/esm/components/c3-onboarding-survey/onboardingModal.js +47 -0
  47. package/lib/esm/components/c3-onboarding-survey/onboardingPage.d.ts +20 -0
  48. package/lib/esm/components/c3-onboarding-survey/onboardingPage.js +42 -0
  49. package/lib/esm/components/c3-onboarding-survey/onboardingSurvey.d.ts +16 -0
  50. package/lib/esm/components/c3-onboarding-survey/onboardingSurvey.js +132 -0
  51. package/lib/esm/components/c3-onboarding-survey/step.d.ts +6 -0
  52. package/lib/esm/components/c3-onboarding-survey/step.js +36 -0
  53. package/lib/esm/components/c3-user-configuration/authToken.d.ts +29 -0
  54. package/lib/esm/components/c3-user-configuration/authToken.js +25 -0
  55. package/lib/esm/components/c3-user-configuration/c3-user-configuration-provider.d.ts +2 -4
  56. package/lib/esm/components/c3-user-configuration/c3-user-configuration-provider.js +3 -10
  57. package/lib/esm/index.d.ts +0 -1
  58. package/lib/esm/index.js +0 -1
  59. package/package.json +23 -21
  60. package/lib/esm/api/profile.d.ts +0 -16
  61. package/lib/esm/api/profile.js +0 -29
  62. package/lib/esm/components/c3-user-configuration/c3-profile-provider/c3-profile-provider.d.ts +0 -10
  63. package/lib/esm/components/c3-user-configuration/c3-profile-provider/c3-profile-provider.js +0 -33
  64. package/lib/esm/components/c3-user-configuration/c3-profile-provider/carbon-theme-provider.d.ts +0 -3
  65. package/lib/esm/components/c3-user-configuration/c3-profile-provider/carbon-theme-provider.js +0 -23
@@ -4,11 +4,11 @@ export declare class HttpError extends Error {
4
4
  constructor(message: string, status: number);
5
5
  }
6
6
  export interface RequestPayload {
7
- base?: "notifications" | "accounts";
7
+ url: string;
8
+ base?: "notifications";
8
9
  stage?: Stage;
9
10
  endpoints?: Endpoints;
10
- url: string;
11
- method: "get" | "post" | "put" | "delete" | "patch";
11
+ method?: "get" | "post" | "put" | "delete" | "patch";
12
12
  headers?: {
13
13
  [key: string]: string;
14
14
  };
@@ -16,9 +16,9 @@ export interface RequestPayload {
16
16
  responseType?: "json" | "text" | "none";
17
17
  camundaAuth?: {
18
18
  token: string;
19
- refreshTokenMethod: () => Promise<string>;
19
+ refreshTokenMethod?: () => Promise<string>;
20
20
  };
21
- body?: {
21
+ body?: string | FormData | {
22
22
  [key: string]: unknown;
23
23
  };
24
24
  }
@@ -1,4 +1,4 @@
1
- import { getEndpoint, NOTIFICATIONS, ACCOUNTS, } from "./endpoints.const";
1
+ import { getEndpoint, NOTIFICATIONS } from "./endpoints.const";
2
2
  import { JWTUtils } from "./jwt.utils";
3
3
  export class HttpError extends Error {
4
4
  status;
@@ -11,7 +11,7 @@ export async function request(payload) {
11
11
  const headers = {};
12
12
  if (payload.camundaAuth) {
13
13
  if (JWTUtils.isExpired(payload.camundaAuth.token)) {
14
- const newToken = await payload.camundaAuth.refreshTokenMethod();
14
+ const newToken = await payload.camundaAuth?.refreshTokenMethod?.();
15
15
  headers.Authorization = `Bearer ${newToken}`;
16
16
  }
17
17
  else {
@@ -29,7 +29,7 @@ export async function request(payload) {
29
29
  break;
30
30
  }
31
31
  }
32
- const body = payload.body ? JSON.stringify(payload.body) : undefined;
32
+ const body = payload.body && type === "json" ? JSON.stringify(payload.body) : undefined;
33
33
  let base;
34
34
  if (payload.base) {
35
35
  switch (payload.base) {
@@ -41,18 +41,11 @@ export async function request(payload) {
41
41
  base = getEndpoint(payload.stage, NOTIFICATIONS);
42
42
  }
43
43
  break;
44
- case "accounts":
45
- if (payload.endpoints?.accounts) {
46
- base = payload.endpoints.accounts;
47
- }
48
- else if (payload.stage) {
49
- base = getEndpoint(payload.stage, ACCOUNTS);
50
- }
51
44
  }
52
45
  }
53
46
  const url = base ? `${base}/${payload.url}` : payload.url;
54
47
  const response = await fetch(url, {
55
- method: payload.method.toUpperCase(),
48
+ method: payload.method ? payload.method.toUpperCase() : "GET",
56
49
  headers,
57
50
  body,
58
51
  });
@@ -6,10 +6,9 @@ export interface Endpoint {
6
6
  }
7
7
  export interface Endpoints {
8
8
  notifications?: string;
9
- accounts?: string;
10
9
  }
11
10
  export declare const NOTIFICATIONS: Endpoint;
12
- export declare const ACCOUNTS: Endpoint;
11
+ export declare const HELPCENTER: Endpoint;
13
12
  export type Stage = "dev" | "int" | "prod";
14
13
  export declare function getEndpoint(stage: Stage, endpoint: Endpoint): string;
15
14
  export declare function getEndpointByOptions(options: {
@@ -4,11 +4,11 @@ export const NOTIFICATIONS = {
4
4
  int: "https://notifications.cloud.ultrawombat.com",
5
5
  prod: "https://notifications.cloud.camunda.io",
6
6
  };
7
- export const ACCOUNTS = {
8
- id: "accounts",
9
- dev: "https://accounts.cloud.dev.ultrawombat.com",
10
- int: "https://accounts.cloud.ultrawombat.com",
11
- prod: "https://accounts.cloud.camunda.io",
7
+ export const HELPCENTER = {
8
+ id: "help-center",
9
+ dev: "https://help.cloud.dev.ultrawombat.com",
10
+ int: "https://notifications.cloud.ultrawombat.com",
11
+ prod: "https://notifications.cloud.camunda.io",
12
12
  };
13
13
  export function getEndpoint(stage, endpoint) {
14
14
  switch (stage) {
@@ -31,14 +31,6 @@ export function getEndpointByOptions(options) {
31
31
  else if (options.stage) {
32
32
  return getEndpoint(options.stage, options.endpoint);
33
33
  }
34
- break;
35
- case "accounts":
36
- if (options.endpoints?.accounts) {
37
- return options.endpoints.accounts;
38
- }
39
- else if (options.stage) {
40
- return getEndpoint(options.stage, options.endpoint);
41
- }
42
34
  }
43
35
  throw new Error(`Missing stage or notifications endpoint`);
44
36
  }
@@ -0,0 +1,34 @@
1
+ import { HelpCenterConfig } from "../components/c3-help-center/defaultHelpCenterConfig";
2
+ import { Cluster, Organization, Persona, TileConfig, WpCardType } from "../components/c3-help-center/c3-help-center.types";
3
+ import { OnboardingConfig } from "../components/c3-onboarding-survey/defaultOnboardingConfig";
4
+ import { RequestPayload } from "./api";
5
+ export declare const getOrg: (stage: string, accessToken: string, orgId: string) => Promise<Organization | null>;
6
+ export declare const getClusters: (stage: string, accessToken: string, orgId: string) => Promise<Cluster[] | null>;
7
+ export declare const getConfig: (accessToken: string, audience: string) => Promise<HelpCenterConfig | null>;
8
+ export declare const getTiles: (tileConfig: TileConfig[], cloudAudience: string, persona: {
9
+ [id: string]: unknown;
10
+ }, clusterIds: string[], email: string, currentOrgId: string, salesPlanType: string, flags: string[]) => Promise<WpCardType[]>;
11
+ export declare const getOnboardingConfig: ({ camundaAuth, audience, }: {
12
+ audience: string;
13
+ camundaAuth: RequestPayload["camundaAuth"];
14
+ }) => Promise<OnboardingConfig>;
15
+ export declare const updatePersona: ({ newPersona, audience, accessToken, orgId, userId, }: {
16
+ newPersona: Persona;
17
+ audience: string;
18
+ orgId: string;
19
+ userId: string;
20
+ accessToken: string;
21
+ }) => Promise<void>;
22
+ export declare const submitSurvey: ({ audience, token, data, }: {
23
+ audience: string;
24
+ token: string;
25
+ data: Persona & {
26
+ email: string;
27
+ orgUuid: string;
28
+ };
29
+ }) => Promise<void>;
30
+ export declare const submitFeedback: ({ token, audience, formData, }: {
31
+ token: string;
32
+ audience: string;
33
+ formData: FormData;
34
+ }) => Promise<any>;
@@ -0,0 +1,90 @@
1
+ import { recommendations } from "../components/c3-help-center/recommendations";
2
+ import { request } from "./api";
3
+ export const getOrg = async (stage, accessToken, orgId) => {
4
+ const headers = {};
5
+ headers.Authorization = `Bearer ${accessToken}`;
6
+ headers["Content-Type"] = "application/json";
7
+ try {
8
+ const response = await fetch(`https://accounts.${stage}/api/organizations/my`, {
9
+ method: "GET",
10
+ headers,
11
+ });
12
+ const orgs = await response.json();
13
+ return orgs.find((org) => org.uuid === orgId);
14
+ }
15
+ catch (error) {
16
+ console.log(error);
17
+ }
18
+ return null;
19
+ };
20
+ export const getClusters = async (stage, accessToken, orgId) => {
21
+ const headers = {};
22
+ headers.Authorization = `Bearer ${accessToken}`;
23
+ headers["Content-Type"] = "application/json";
24
+ try {
25
+ const response = await fetch(`https://console.${stage}/api/orgs/${orgId}/clusters`, {
26
+ method: "GET",
27
+ headers,
28
+ });
29
+ return response.json();
30
+ }
31
+ catch (error) {
32
+ console.log(error);
33
+ }
34
+ return null;
35
+ };
36
+ export const getConfig = async (accessToken, audience) => {
37
+ try {
38
+ const response = await fetch(`https://helpcenter.${audience}/helpcenter/config`, {
39
+ headers: {
40
+ authorization: `Bearer ${accessToken}`,
41
+ "Content-Type": "application/json",
42
+ },
43
+ });
44
+ return response.json();
45
+ }
46
+ catch (error) {
47
+ console.error(error);
48
+ }
49
+ return null;
50
+ };
51
+ export const getTiles = async (tileConfig, cloudAudience, persona, clusterIds, email, currentOrgId, salesPlanType, flags) => {
52
+ const availableTileTypes = recommendations(persona, flags, tileConfig, salesPlanType, clusterIds.length > 0);
53
+ const res = await fetch(`https://camundahelp.wpengine.com/wp-json/camundahelp/v1/cards?card_id=${availableTileTypes.join(",")}`, {
54
+ method: "GET",
55
+ });
56
+ let cards = await res.json();
57
+ cards = cards.map((card) => {
58
+ card.link = card.link?.replaceAll("{cloudAudience}", cloudAudience);
59
+ card.link = card.link?.replaceAll("{currentOrgId}", currentOrgId);
60
+ card.link = card.link?.replaceAll("{clusterId}", clusterIds[0]);
61
+ card.link = card.link?.replaceAll("{email}", email);
62
+ return card;
63
+ });
64
+ return cards;
65
+ };
66
+ export const getOnboardingConfig = ({ camundaAuth, audience, }) => request({
67
+ url: `https://helpcenter.${audience}/survey/config`,
68
+ camundaAuth,
69
+ type: "json",
70
+ });
71
+ export const updatePersona = async ({ newPersona, audience, accessToken, orgId, userId, }) => request({
72
+ url: `https://helpcenter.${audience}/persona`,
73
+ method: "patch",
74
+ camundaAuth: { token: accessToken },
75
+ type: "json",
76
+ body: { persona: newPersona, userId, orgId },
77
+ });
78
+ export const submitSurvey = async ({ audience, token, data, }) => request({
79
+ method: "post",
80
+ url: `https://helpcenter.${audience}/survey/submit`,
81
+ camundaAuth: { token },
82
+ type: "json",
83
+ body: { data },
84
+ });
85
+ export const submitFeedback = async ({ token, audience, formData, }) => request({
86
+ method: "post",
87
+ url: `https://feedback.${audience}/submit`,
88
+ camundaAuth: { token },
89
+ body: formData,
90
+ });
@@ -37,6 +37,7 @@ export class NotificationService {
37
37
  body: {
38
38
  id: eventOptions.id,
39
39
  },
40
+ type: "json",
40
41
  responseType: "text",
41
42
  })
42
43
  .then(() => {
@@ -82,6 +83,7 @@ export class NotificationService {
82
83
  body: {
83
84
  uuids: notificationIds,
84
85
  },
86
+ type: "json",
85
87
  })
86
88
  .then(() => {
87
89
  // do nothing
@@ -0,0 +1,16 @@
1
+ import { FC } from "react";
2
+ import { Persona } from "./c3-help-center.types";
3
+ import { Dict } from "mixpanel-browser";
4
+ export interface C3HelpCenterProps {
5
+ isOpen: boolean;
6
+ origin: "console" | "webmodeler" | "operate" | "tasklist" | "optimize";
7
+ theme?: "light" | "dark";
8
+ flags?: string[];
9
+ activeTab?: string;
10
+ autoStartSurvey?: boolean;
11
+ onPersonaChange?: (persona: Persona) => void;
12
+ onRequestClose?: () => void;
13
+ onRequestOpen?: () => void;
14
+ mixpanelTrack?: (event: string, data: Dict | undefined) => void;
15
+ }
16
+ export declare const C3HelpCenter: FC<C3HelpCenterProps>;
@@ -0,0 +1,132 @@
1
+ import { ComposedModal, Layer } from "@carbon/react";
2
+ import React, { useState } from "react";
3
+ import { HelpCenter } from "./help-center";
4
+ import { defaultHelpCenterConfig } from "./defaultHelpCenterConfig";
5
+ import { C3OnboardingSurvey } from "../c3-onboarding-survey/c3-onboarding-survey";
6
+ import { getClusters, getConfig, getOrg, updatePersona, } from "../../api/help-center";
7
+ import { decodeJWT } from "../c3-user-configuration/authToken";
8
+ import { useUserConfiguration } from "../c3-user-configuration/c3-user-configuration-provider";
9
+ export const C3HelpCenter = ({ autoStartSurvey, origin, flags, isOpen, onRequestClose, mixpanelTrack, onRequestOpen, theme = "light", onPersonaChange, activeTab, }) => {
10
+ const { userToken, activeOrganizationId } = useUserConfiguration() || {};
11
+ const [persona, setPersona] = useState(undefined);
12
+ const [userId, setUserId] = useState("");
13
+ const [token, setToken] = useState("");
14
+ const [audience, setAudience] = useState("");
15
+ const [organization, setOrganization] = useState(null);
16
+ const [clusters, setClusters] = useState([]);
17
+ const [helpCenterConfig, setHelpCenterConfig] = useState(defaultHelpCenterConfig);
18
+ const [email, setEmail] = useState("");
19
+ const [showSurvey, setShowSurvey] = useState(autoStartSurvey);
20
+ const fetchData = async () => {
21
+ const decodedToken = decodeJWT(userToken);
22
+ if (!decodedToken)
23
+ return;
24
+ const { userId, meta, audience, persona } = decodedToken;
25
+ setPersona(persona);
26
+ if (meta)
27
+ setEmail(meta.email);
28
+ const decodedAudience = typeof audience === "string" ? audience : audience?.[0];
29
+ if (userId)
30
+ setUserId(userId);
31
+ if (decodedAudience && userToken && activeOrganizationId) {
32
+ setAudience(decodedAudience);
33
+ const clusters = await getClusters(decodedAudience, userToken, activeOrganizationId);
34
+ setClusters(clusters);
35
+ const org = await getOrg(decodedAudience, userToken, activeOrganizationId);
36
+ setOrganization(org);
37
+ }
38
+ if (autoStartSurvey && !(persona?.wasShown ?? false)) {
39
+ onRequestOpen?.();
40
+ }
41
+ if (decodedAudience && userToken) {
42
+ const onboardConfig = await getConfig(userToken, decodedAudience);
43
+ setHelpCenterConfig(onboardConfig || defaultHelpCenterConfig);
44
+ }
45
+ };
46
+ React.useEffect(() => {
47
+ if (token !== userToken && !!userToken) {
48
+ setToken(userToken);
49
+ fetchData();
50
+ }
51
+ }, [userToken]);
52
+ React.useEffect(() => {
53
+ const tabs = helpCenterConfig.tabs;
54
+ const firstTab = tabs[0].id;
55
+ if (isOpen) {
56
+ mixpanelTrack?.(`helpcenter:open`, {
57
+ to: activeTab ?? firstTab,
58
+ from: origin,
59
+ });
60
+ }
61
+ else {
62
+ setShowSurvey(false);
63
+ }
64
+ }, [isOpen]);
65
+ const onRequestRetakeSurvey = () => {
66
+ const newPersona = {
67
+ ...persona,
68
+ ...{ nextStep: 0, complete: false },
69
+ };
70
+ setPersona(newPersona);
71
+ updatePersona({
72
+ newPersona,
73
+ audience,
74
+ accessToken: userToken || "",
75
+ orgId: activeOrganizationId || "",
76
+ userId,
77
+ });
78
+ onPersonaChange?.(newPersona);
79
+ setShowSurvey(true);
80
+ };
81
+ const onRequestResumeSurvey = () => {
82
+ if (!userToken || !activeOrganizationId)
83
+ return;
84
+ const newPersona = { ...persona, ...{ complete: false, wasShown: true } };
85
+ setPersona(newPersona);
86
+ updatePersona({
87
+ newPersona,
88
+ audience,
89
+ accessToken: userToken,
90
+ orgId: activeOrganizationId,
91
+ userId,
92
+ });
93
+ onPersonaChange?.(newPersona);
94
+ setShowSurvey(true);
95
+ };
96
+ const onRequestSkipSurvey = () => {
97
+ if (!userToken || !activeOrganizationId)
98
+ return;
99
+ const newPersona = { ...persona, ...{ complete: false, wasShown: true } };
100
+ setPersona(newPersona);
101
+ updatePersona({
102
+ newPersona,
103
+ audience,
104
+ accessToken: userToken,
105
+ orgId: activeOrganizationId,
106
+ userId,
107
+ });
108
+ onPersonaChange?.(newPersona);
109
+ setShowSurvey(false);
110
+ };
111
+ const personaCallback = (newPersona) => {
112
+ setPersona(newPersona);
113
+ onPersonaChange?.(newPersona);
114
+ if (newPersona.complete) {
115
+ setShowSurvey(false);
116
+ }
117
+ };
118
+ const closeFn = () => {
119
+ if (persona && userToken && activeOrganizationId) {
120
+ updatePersona({
121
+ newPersona: persona,
122
+ audience,
123
+ accessToken: userToken,
124
+ orgId: activeOrganizationId,
125
+ userId,
126
+ });
127
+ }
128
+ onRequestClose?.();
129
+ };
130
+ return (React.createElement(Layer, null,
131
+ React.createElement(ComposedModal, { open: isOpen, size: "lg", onClose: closeFn, className: "help-center" }, showSurvey || !persona ? (React.createElement(C3OnboardingSurvey, { personaCallback: personaCallback, persona: persona, mixpanelTrack: mixpanelTrack, onRequestClose: closeFn, onRequestSkip: onRequestSkipSurvey, theme: theme, origin: origin, modal: true })) : (React.createElement(HelpCenter, { configuration: helpCenterConfig, persona: persona, audience: audience, organization: organization, clusters: clusters || [], flags: flags, onRequestResumeSurvey: onRequestResumeSurvey, onRequestRetakeSurvey: onRequestRetakeSurvey, onRequestClose: closeFn, mixpanelTrack: mixpanelTrack, email: email, theme: theme, origin: origin, initialTab: activeTab })))));
132
+ };
@@ -0,0 +1,54 @@
1
+ import { TabType } from "./tabs/tabContent";
2
+ export interface Persona {
3
+ role?: string;
4
+ company?: string;
5
+ interestedInExecutingProcess?: boolean;
6
+ goal?: string[];
7
+ orchestrate?: string[];
8
+ client?: string;
9
+ clientToSupport?: string;
10
+ bpmnExperience?: string;
11
+ camunda7Experience?: string;
12
+ nextStep?: number;
13
+ complete?: boolean;
14
+ wasShown?: boolean;
15
+ [attribute: string]: unknown;
16
+ }
17
+ export interface WpCardType {
18
+ image: string;
19
+ title: string;
20
+ description: string;
21
+ timeToComplete?: string;
22
+ cta?: string;
23
+ link?: string;
24
+ card_id: string;
25
+ mixpanelId: string;
26
+ }
27
+ export interface Prerequestite {
28
+ id: string;
29
+ value: string;
30
+ not: boolean;
31
+ }
32
+ export interface TileConfig {
33
+ id: string;
34
+ bool: string;
35
+ prerequestites: Prerequestite[] | boolean;
36
+ }
37
+ export type Cluster = {
38
+ uuid: string;
39
+ };
40
+ export type Tab = {
41
+ id: string;
42
+ label: string;
43
+ title: string;
44
+ tiles: TileConfig[];
45
+ tiletype: TabType;
46
+ };
47
+ export type Organization = {
48
+ uuid: string;
49
+ organizationToSalesPlan?: {
50
+ salesPlan?: {
51
+ salesPlanType: string;
52
+ };
53
+ };
54
+ };
@@ -0,0 +1,10 @@
1
+ import { Tab } from "./c3-help-center.types";
2
+ export type HelpCenterConfig = {
3
+ tabs: Tab[];
4
+ links: {
5
+ label: string;
6
+ link: string;
7
+ id: string;
8
+ }[];
9
+ };
10
+ export declare const defaultHelpCenterConfig: HelpCenterConfig;