@census-ai/census-sdk 0.4.3 → 0.4.5

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.
@@ -207,6 +207,21 @@ interface TrackEventOptions {
207
207
  interface BatchEventsOptions {
208
208
  events: TrackEventOptions[];
209
209
  }
210
+ /**
211
+ * Feature group tag on a request
212
+ */
213
+ interface RequestFeatureGroup {
214
+ id: string;
215
+ name: string;
216
+ color: string | null;
217
+ }
218
+ /**
219
+ * Feature tag on a request
220
+ */
221
+ interface RequestFeature {
222
+ id: string;
223
+ name: string;
224
+ }
210
225
  /**
211
226
  * A user's submitted request (feedback, bug report, feature request)
212
227
  */
@@ -220,6 +235,8 @@ interface Request {
220
235
  rating: number | null;
221
236
  helpful: boolean | null;
222
237
  metadata: Record<string, unknown>;
238
+ feature_group: RequestFeatureGroup | null;
239
+ feature: RequestFeature | null;
223
240
  }
224
241
  /**
225
242
  * Options for fetching requests
@@ -661,11 +678,11 @@ interface RequestsProps {
661
678
  /**
662
679
  * Available tabs in the HelpCenter component
663
680
  */
664
- type HelpCenterTab = 'articles' | 'requests';
681
+ type HelpCenterTab$1 = 'articles' | 'requests';
665
682
  /**
666
683
  * Props for the HelpCenter component
667
684
  */
668
- interface HelpCenterProps {
685
+ interface HelpCenterProps$1 {
669
686
  /**
670
687
  * Which tabs to show. Order determines tab order.
671
688
  * @default ['articles', 'requests']
@@ -680,17 +697,17 @@ interface HelpCenterProps {
680
697
  * // Requests only (e.g., feedback page)
681
698
  * tabs={['requests']}
682
699
  */
683
- tabs?: HelpCenterTab[];
700
+ tabs?: HelpCenterTab$1[];
684
701
  /**
685
702
  * Default tab to show on load
686
703
  * @default First tab in the tabs array
687
704
  */
688
- defaultTab?: HelpCenterTab;
705
+ defaultTab?: HelpCenterTab$1;
689
706
  /**
690
707
  * Custom labels for tabs
691
708
  * @default { articles: 'Articles', requests: 'My Requests' }
692
709
  */
693
- tabLabels?: Partial<Record<HelpCenterTab, string>>;
710
+ tabLabels?: Partial<Record<HelpCenterTab$1, string>>;
694
711
  /**
695
712
  * Show search bar in articles tab
696
713
  * @default true
@@ -720,7 +737,7 @@ interface HelpCenterProps {
720
737
  /**
721
738
  * Callback when the active tab changes
722
739
  */
723
- onTabChange?: (tab: HelpCenterTab) => void;
740
+ onTabChange?: (tab: HelpCenterTab$1) => void;
724
741
  }
725
742
  /**
726
743
  * Props for the CensusProvider component
@@ -1666,25 +1683,18 @@ declare function KnowledgeBase({ showSearch, showCategories, defaultCategory, th
1666
1683
  */
1667
1684
  declare function Requests({ status, type, limit, className, showEmptyState, onRequestClick, }: RequestsProps): react_jsx_runtime.JSX.Element | null;
1668
1685
 
1669
- /**
1670
- * Unified help center component with left navigation showing feature groups.
1671
- *
1672
- * @example
1673
- * ```tsx
1674
- * import { HelpCenter } from '@census-ai/census-sdk/react';
1675
- *
1676
- * function HelpPage() {
1677
- * return (
1678
- * <HelpCenter
1679
- * tabs={['articles', 'requests']}
1680
- * showSearch
1681
- * />
1682
- * );
1683
- * }
1684
- * ```
1685
- */
1686
- declare function HelpCenter({ tabs, defaultTab, tabLabels, showSearch, showCategories: _showCategories, // Reserved for future use
1687
- theme: themeProp, className, onArticleView, onRequestClick, onTabChange, }: HelpCenterProps): react_jsx_runtime.JSX.Element;
1686
+ type HelpCenterTab = 'articles' | 'requests';
1687
+ type HelpCenterTheme = 'light' | 'dark' | 'auto';
1688
+ interface HelpCenterProps {
1689
+ tabs?: HelpCenterTab[];
1690
+ defaultTab?: HelpCenterTab;
1691
+ tabLabels?: Partial<Record<HelpCenterTab, string>>;
1692
+ showSearch?: boolean;
1693
+ className?: string;
1694
+ /** Theme mode: 'light', 'dark', or 'auto' (inherits from system/parent) */
1695
+ theme?: HelpCenterTheme;
1696
+ }
1697
+ declare function HelpCenter({ tabs, defaultTab, tabLabels, showSearch, className, theme: themeProp, }: HelpCenterProps): react_jsx_runtime.JSX.Element;
1688
1698
 
1689
1699
  /**
1690
1700
  * Props for the GuideBuilder component
@@ -2101,4 +2111,4 @@ interface GuideRendererProps {
2101
2111
  */
2102
2112
  declare function GuideRenderer({ guide, onComplete, onDismiss, onStepChange, onCustomAction, globalStyle, startStep, zIndex, }: GuideRendererProps): react_jsx_runtime.JSX.Element | null;
2103
2113
 
2104
- export { type AdvanceTrigger, type Article, type ArticlesOptions, Backdrop, BannerStep, CensusProvider, type CensusProviderProps, type CensusTheme, type CreateGuideOptions, type CreateGuideStepOptions, type Feature, type FeatureGroup, type FeatureGroupsResponse, FeedbackButton, type FeedbackButtonProps, type FeedbackOptions, type FeedbackType, type Guide, GuideBuilder, type GuideFormType, GuideRenderer, type GuideStatus, type GuideStep, type GuideStepAdvanceConfig, type GuideStepDisplayConfig, type GuideStepRichContent, type GuideStepStyleConfig, type GuideStepType, type GuideTriggerType, type GuidesOptions, type GuidesResponse, HelpCenter, type HelpCenterProps, type HelpCenterTab, HotspotStep, KnowledgeBase, type KnowledgeBaseProps, ModalStep, type Position, type Request, Requests, type RequestsOptions, type RequestsProps, type SelectorStrategy, SlideoutStep, StepButtons, StepContent, type TooltipPosition, TooltipStep, type UpdateGuideOptions, type UpdateGuideStepOptions, type UserIdentity, useArticle, useArticles, useCensus, useCensusContext, useFeatureGroups, useFeedback, useGuideBuilder, useGuideRenderer, useGuides, useIdentify, useRequests, useTrack };
2114
+ export { type AdvanceTrigger, type Article, type ArticlesOptions, Backdrop, BannerStep, CensusProvider, type CensusProviderProps, type CensusTheme, type CreateGuideOptions, type CreateGuideStepOptions, type Feature, type FeatureGroup, type FeatureGroupsResponse, FeedbackButton, type FeedbackButtonProps, type FeedbackOptions, type FeedbackType, type Guide, GuideBuilder, type GuideFormType, GuideRenderer, type GuideStatus, type GuideStep, type GuideStepAdvanceConfig, type GuideStepDisplayConfig, type GuideStepRichContent, type GuideStepStyleConfig, type GuideStepType, type GuideTriggerType, type GuidesOptions, type GuidesResponse, HelpCenter, type HelpCenterProps$1 as HelpCenterProps, type HelpCenterTab$1 as HelpCenterTab, type HelpCenterTheme, HotspotStep, KnowledgeBase, type KnowledgeBaseProps, ModalStep, type Position, type Request, Requests, type RequestsOptions, type RequestsProps, type SelectorStrategy, SlideoutStep, StepButtons, StepContent, type TooltipPosition, TooltipStep, type UpdateGuideOptions, type UpdateGuideStepOptions, type UserIdentity, useArticle, useArticles, useCensus, useCensusContext, useFeatureGroups, useFeedback, useGuideBuilder, useGuideRenderer, useGuides, useIdentify, useRequests, useTrack };
@@ -207,6 +207,21 @@ interface TrackEventOptions {
207
207
  interface BatchEventsOptions {
208
208
  events: TrackEventOptions[];
209
209
  }
210
+ /**
211
+ * Feature group tag on a request
212
+ */
213
+ interface RequestFeatureGroup {
214
+ id: string;
215
+ name: string;
216
+ color: string | null;
217
+ }
218
+ /**
219
+ * Feature tag on a request
220
+ */
221
+ interface RequestFeature {
222
+ id: string;
223
+ name: string;
224
+ }
210
225
  /**
211
226
  * A user's submitted request (feedback, bug report, feature request)
212
227
  */
@@ -220,6 +235,8 @@ interface Request {
220
235
  rating: number | null;
221
236
  helpful: boolean | null;
222
237
  metadata: Record<string, unknown>;
238
+ feature_group: RequestFeatureGroup | null;
239
+ feature: RequestFeature | null;
223
240
  }
224
241
  /**
225
242
  * Options for fetching requests
@@ -661,11 +678,11 @@ interface RequestsProps {
661
678
  /**
662
679
  * Available tabs in the HelpCenter component
663
680
  */
664
- type HelpCenterTab = 'articles' | 'requests';
681
+ type HelpCenterTab$1 = 'articles' | 'requests';
665
682
  /**
666
683
  * Props for the HelpCenter component
667
684
  */
668
- interface HelpCenterProps {
685
+ interface HelpCenterProps$1 {
669
686
  /**
670
687
  * Which tabs to show. Order determines tab order.
671
688
  * @default ['articles', 'requests']
@@ -680,17 +697,17 @@ interface HelpCenterProps {
680
697
  * // Requests only (e.g., feedback page)
681
698
  * tabs={['requests']}
682
699
  */
683
- tabs?: HelpCenterTab[];
700
+ tabs?: HelpCenterTab$1[];
684
701
  /**
685
702
  * Default tab to show on load
686
703
  * @default First tab in the tabs array
687
704
  */
688
- defaultTab?: HelpCenterTab;
705
+ defaultTab?: HelpCenterTab$1;
689
706
  /**
690
707
  * Custom labels for tabs
691
708
  * @default { articles: 'Articles', requests: 'My Requests' }
692
709
  */
693
- tabLabels?: Partial<Record<HelpCenterTab, string>>;
710
+ tabLabels?: Partial<Record<HelpCenterTab$1, string>>;
694
711
  /**
695
712
  * Show search bar in articles tab
696
713
  * @default true
@@ -720,7 +737,7 @@ interface HelpCenterProps {
720
737
  /**
721
738
  * Callback when the active tab changes
722
739
  */
723
- onTabChange?: (tab: HelpCenterTab) => void;
740
+ onTabChange?: (tab: HelpCenterTab$1) => void;
724
741
  }
725
742
  /**
726
743
  * Props for the CensusProvider component
@@ -1666,25 +1683,18 @@ declare function KnowledgeBase({ showSearch, showCategories, defaultCategory, th
1666
1683
  */
1667
1684
  declare function Requests({ status, type, limit, className, showEmptyState, onRequestClick, }: RequestsProps): react_jsx_runtime.JSX.Element | null;
1668
1685
 
1669
- /**
1670
- * Unified help center component with left navigation showing feature groups.
1671
- *
1672
- * @example
1673
- * ```tsx
1674
- * import { HelpCenter } from '@census-ai/census-sdk/react';
1675
- *
1676
- * function HelpPage() {
1677
- * return (
1678
- * <HelpCenter
1679
- * tabs={['articles', 'requests']}
1680
- * showSearch
1681
- * />
1682
- * );
1683
- * }
1684
- * ```
1685
- */
1686
- declare function HelpCenter({ tabs, defaultTab, tabLabels, showSearch, showCategories: _showCategories, // Reserved for future use
1687
- theme: themeProp, className, onArticleView, onRequestClick, onTabChange, }: HelpCenterProps): react_jsx_runtime.JSX.Element;
1686
+ type HelpCenterTab = 'articles' | 'requests';
1687
+ type HelpCenterTheme = 'light' | 'dark' | 'auto';
1688
+ interface HelpCenterProps {
1689
+ tabs?: HelpCenterTab[];
1690
+ defaultTab?: HelpCenterTab;
1691
+ tabLabels?: Partial<Record<HelpCenterTab, string>>;
1692
+ showSearch?: boolean;
1693
+ className?: string;
1694
+ /** Theme mode: 'light', 'dark', or 'auto' (inherits from system/parent) */
1695
+ theme?: HelpCenterTheme;
1696
+ }
1697
+ declare function HelpCenter({ tabs, defaultTab, tabLabels, showSearch, className, theme: themeProp, }: HelpCenterProps): react_jsx_runtime.JSX.Element;
1688
1698
 
1689
1699
  /**
1690
1700
  * Props for the GuideBuilder component
@@ -2101,4 +2111,4 @@ interface GuideRendererProps {
2101
2111
  */
2102
2112
  declare function GuideRenderer({ guide, onComplete, onDismiss, onStepChange, onCustomAction, globalStyle, startStep, zIndex, }: GuideRendererProps): react_jsx_runtime.JSX.Element | null;
2103
2113
 
2104
- export { type AdvanceTrigger, type Article, type ArticlesOptions, Backdrop, BannerStep, CensusProvider, type CensusProviderProps, type CensusTheme, type CreateGuideOptions, type CreateGuideStepOptions, type Feature, type FeatureGroup, type FeatureGroupsResponse, FeedbackButton, type FeedbackButtonProps, type FeedbackOptions, type FeedbackType, type Guide, GuideBuilder, type GuideFormType, GuideRenderer, type GuideStatus, type GuideStep, type GuideStepAdvanceConfig, type GuideStepDisplayConfig, type GuideStepRichContent, type GuideStepStyleConfig, type GuideStepType, type GuideTriggerType, type GuidesOptions, type GuidesResponse, HelpCenter, type HelpCenterProps, type HelpCenterTab, HotspotStep, KnowledgeBase, type KnowledgeBaseProps, ModalStep, type Position, type Request, Requests, type RequestsOptions, type RequestsProps, type SelectorStrategy, SlideoutStep, StepButtons, StepContent, type TooltipPosition, TooltipStep, type UpdateGuideOptions, type UpdateGuideStepOptions, type UserIdentity, useArticle, useArticles, useCensus, useCensusContext, useFeatureGroups, useFeedback, useGuideBuilder, useGuideRenderer, useGuides, useIdentify, useRequests, useTrack };
2114
+ export { type AdvanceTrigger, type Article, type ArticlesOptions, Backdrop, BannerStep, CensusProvider, type CensusProviderProps, type CensusTheme, type CreateGuideOptions, type CreateGuideStepOptions, type Feature, type FeatureGroup, type FeatureGroupsResponse, FeedbackButton, type FeedbackButtonProps, type FeedbackOptions, type FeedbackType, type Guide, GuideBuilder, type GuideFormType, GuideRenderer, type GuideStatus, type GuideStep, type GuideStepAdvanceConfig, type GuideStepDisplayConfig, type GuideStepRichContent, type GuideStepStyleConfig, type GuideStepType, type GuideTriggerType, type GuidesOptions, type GuidesResponse, HelpCenter, type HelpCenterProps$1 as HelpCenterProps, type HelpCenterTab$1 as HelpCenterTab, type HelpCenterTheme, HotspotStep, KnowledgeBase, type KnowledgeBaseProps, ModalStep, type Position, type Request, Requests, type RequestsOptions, type RequestsProps, type SelectorStrategy, SlideoutStep, StepButtons, StepContent, type TooltipPosition, TooltipStep, type UpdateGuideOptions, type UpdateGuideStepOptions, type UserIdentity, useArticle, useArticles, useCensus, useCensusContext, useFeatureGroups, useFeedback, useGuideBuilder, useGuideRenderer, useGuides, useIdentify, useRequests, useTrack };