@flamingo-stack/openframe-frontend-core 0.0.736 → 0.0.737
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/dist/build/export-map.json +1 -1
- package/dist/{chunk-T27CVQBO.cjs → chunk-4FJZ7RJD.cjs} +16 -16
- package/dist/{chunk-URX2YTCL.cjs → chunk-4ISP3XP4.cjs} +42 -36
- package/dist/{chunk-BL5GOCHP.cjs → chunk-4RMLAHU2.cjs} +17 -9
- package/dist/{chunk-SZFA2LQR.cjs → chunk-CM35DLKS.cjs} +33 -33
- package/dist/{chunk-7V2KP2TB.cjs → chunk-DA4VS6TS.cjs} +4 -4
- package/dist/{chunk-OJUMVOMP.cjs → chunk-E2JCZU36.cjs} +260 -260
- package/dist/{chunk-UBQSOB3X.cjs → chunk-FA2LATDM.cjs} +4 -4
- package/dist/{chunk-FTGVG6FW.cjs → chunk-KVGBDWYV.cjs} +17 -17
- package/dist/{chunk-JGGSRCRD.cjs → chunk-LW3QSP47.cjs} +11 -11
- package/dist/{chunk-NONQUGRP.cjs → chunk-N6YOOGCD.cjs} +6 -6
- package/dist/chunk-O4MG7FXW.cjs +57 -0
- package/dist/{chunk-P6Z3EBPJ.cjs → chunk-SGVQO5J6.cjs} +9 -9
- package/dist/{chunk-JM54CNZZ.cjs → chunk-TJQYX3QC.cjs} +66 -66
- package/dist/{chunk-ZEX5WU35.cjs → chunk-URIJ6YUG.cjs} +40 -66
- package/dist/{chunk-OV6BGMEL.cjs → chunk-VL4JKXU2.cjs} +125 -113
- package/dist/{chunk-BDF3FNOC.cjs → chunk-VYODTHMR.cjs} +25 -25
- package/dist/{chunk-LIH5OQLY.cjs → chunk-XPP7VCNY.cjs} +3 -3
- package/dist/{cloud-tenants-M55HMW6F.cjs → cloud-tenants-IWQ5FFLY.cjs} +4 -4
- package/dist/components/case-studies/index.cjs +14 -14
- package/dist/components/chat/entity-cards/index.d.ts +1 -0
- package/dist/components/chat/entity-cards/index.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/index.js +2 -0
- package/dist/components/chat/hooks/use-ask-prompts.d.ts +1 -1
- package/dist/components/chat/hooks/use-ask-prompts.js +1 -1
- package/dist/components/chat/index.cjs +5 -3
- package/dist/components/chat/mingo-info-card.d.ts +17 -1
- package/dist/components/chat/mingo-info-card.d.ts.map +1 -1
- package/dist/components/chat/mingo-info-card.js +15 -3
- package/dist/components/contact/index.cjs +5 -5
- package/dist/components/docs/index.cjs +8 -8
- package/dist/components/embeds/index.cjs +5 -5
- package/dist/components/faq/faq-ask-card.d.ts +5 -4
- package/dist/components/faq/faq-ask-card.d.ts.map +1 -1
- package/dist/components/faq/faq-document-page.d.ts +3 -1
- package/dist/components/faq/faq-document-page.d.ts.map +1 -1
- package/dist/components/faq/faq-document-page.js +2 -0
- package/dist/components/faq/faq-section.d.ts +37 -5
- package/dist/components/faq/faq-section.d.ts.map +1 -1
- package/dist/components/faq/faq-section.js +31 -9
- package/dist/components/faq/index.cjs +11 -5
- package/dist/components/faq/index.d.ts +1 -1
- package/dist/components/faq/index.d.ts.map +1 -1
- package/dist/components/faq/index.js +4 -2
- package/dist/components/features/index.cjs +4 -4
- package/dist/components/help-center-pages/delivery-page.d.ts +8 -1
- package/dist/components/help-center-pages/delivery-page.d.ts.map +1 -1
- package/dist/components/help-center-pages/delivery-page.js +16 -4
- package/dist/components/help-center-pages/download-apps-page.d.ts +8 -1
- package/dist/components/help-center-pages/download-apps-page.d.ts.map +1 -1
- package/dist/components/help-center-pages/download-apps-page.js +11 -6
- package/dist/components/help-center-pages/index.cjs +169 -114
- package/dist/components/help-center-pages/onboarding-guides-catalog-page.d.ts +8 -1
- package/dist/components/help-center-pages/onboarding-guides-catalog-page.d.ts.map +1 -1
- package/dist/components/help-center-pages/onboarding-guides-catalog-page.js +26 -14
- package/dist/components/help-center-pages/product-releases-list-page.d.ts +8 -1
- package/dist/components/help-center-pages/product-releases-list-page.d.ts.map +1 -1
- package/dist/components/help-center-pages/product-releases-list-page.js +24 -12
- package/dist/components/help-center-pages/roadmap-page.d.ts +8 -1
- package/dist/components/help-center-pages/roadmap-page.d.ts.map +1 -1
- package/dist/components/help-center-pages/roadmap-page.js +25 -13
- package/dist/components/index.cjs +46 -38
- package/dist/components/meeting-scheduler/index.cjs +20 -20
- package/dist/components/navigation/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.cjs +6 -6
- package/dist/components/product-demo/index.cjs +6 -6
- package/dist/components/shared/dev-section/dev-section-page.d.ts +8 -1
- package/dist/components/shared/dev-section/dev-section-page.d.ts.map +1 -1
- package/dist/components/shared/dev-section/dev-section-page.js +8 -3
- package/dist/components/shared/legal-document/legal-document-page.d.ts +8 -1
- package/dist/components/shared/legal-document/legal-document-page.d.ts.map +1 -1
- package/dist/components/shared/legal-document/legal-document-page.js +4 -1
- package/dist/components/tickets/index.cjs +9 -8
- package/dist/components/ui/index.cjs +6 -4
- package/dist/contexts/assistant-runtime-context.d.ts +5 -5
- package/dist/{devices-WWJZFG6E.cjs → devices-OUHGWA6Y.cjs} +5 -5
- package/dist/{embeddable-chat-76IJ6TQZ.cjs → embeddable-chat-U3C4WWB7.cjs} +64 -64
- package/dist/index.cjs +14 -8
- package/dist/{knowledge-F4YFQT3G.cjs → knowledge-3ZASPWMF.cjs} +5 -5
- package/dist/{logs-GAYEGEZM.cjs → logs-E6Y54P6K.cjs} +12 -12
- package/dist/{policies-ZOVJCJWX.cjs → policies-LAV75B5B.cjs} +8 -8
- package/dist/{software-update-H4YE5GMJ.cjs → software-update-2CAL3AMJ.cjs} +7 -7
- package/dist/types/faq.d.ts +17 -0
- package/dist/types/faq.d.ts.map +1 -1
- package/dist/types/faq.js +4 -0
- package/dist/types/index.cjs +4 -0
- package/package.json +1 -1
- package/src/components/chat/entity-cards/index.ts +1 -0
- package/src/components/chat/hooks/use-ask-prompts.ts +2 -2
- package/src/components/chat/mingo-info-card.tsx +39 -4
- package/src/components/faq/faq-ask-card.tsx +5 -4
- package/src/components/faq/faq-document-page.tsx +4 -0
- package/src/components/faq/faq-section.tsx +83 -14
- package/src/components/faq/index.ts +1 -1
- package/src/components/help-center-pages/delivery-page.tsx +16 -1
- package/src/components/help-center-pages/download-apps-page.tsx +9 -0
- package/src/components/help-center-pages/onboarding-guides-catalog-page.tsx +16 -1
- package/src/components/help-center-pages/product-releases-list-page.tsx +16 -1
- package/src/components/help-center-pages/roadmap-page.tsx +16 -1
- package/src/components/shared/dev-section/dev-section-page.tsx +9 -0
- package/src/components/shared/legal-document/legal-document-page.tsx +9 -0
- package/src/contexts/assistant-runtime-context.tsx +5 -5
- package/src/types/faq.ts +18 -0
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import type { ReactNode } from 'react';
|
|
11
|
+
import type { PageFaqSlot } from '../faq/faq-section';
|
|
11
12
|
import { DeliveryLists } from '../shared/delivery';
|
|
12
13
|
import { DevSectionPage } from '../shared/dev-section';
|
|
13
14
|
|
|
@@ -22,6 +23,12 @@ export interface DeliveryPageProps {
|
|
|
22
23
|
subtitle?: string;
|
|
23
24
|
/** Optional slot rendered below the lists, inside the page chrome. */
|
|
24
25
|
belowContent?: ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* The page's own FAQ block: the topic the page is about (stated by the host,
|
|
28
|
+
* never read from its address) and where the host serves the FAQs. Rendered
|
|
29
|
+
* after the page's content, inside its container. Absent: no FAQ block.
|
|
30
|
+
*/
|
|
31
|
+
faq?: PageFaqSlot;
|
|
25
32
|
/** Render the standalone `<PageShell>`. Default true. Pass false when the host
|
|
26
33
|
* layout already provides the page container (forwarded to `DevSectionPage`). */
|
|
27
34
|
shell?: boolean;
|
|
@@ -34,10 +41,18 @@ export function DeliveryPage({
|
|
|
34
41
|
title,
|
|
35
42
|
subtitle,
|
|
36
43
|
belowContent,
|
|
44
|
+
faq,
|
|
37
45
|
shell,
|
|
38
46
|
}: DeliveryPageProps) {
|
|
39
47
|
return (
|
|
40
|
-
<DevSectionPage
|
|
48
|
+
<DevSectionPage
|
|
49
|
+
sectionKey="delivery"
|
|
50
|
+
backButton={backButton}
|
|
51
|
+
title={title}
|
|
52
|
+
subtitle={subtitle}
|
|
53
|
+
faq={faq}
|
|
54
|
+
shell={shell}
|
|
55
|
+
>
|
|
41
56
|
<DeliveryLists completedApiEndpoint={completedEndpoint} inProgressApiEndpoint={inProgressEndpoint} />
|
|
42
57
|
{belowContent}
|
|
43
58
|
</DevSectionPage>
|
|
@@ -52,6 +52,7 @@ import {
|
|
|
52
52
|
import { cn } from '../../utils/cn';
|
|
53
53
|
import { formatUrlForDisplay } from '../../utils/format';
|
|
54
54
|
import { DESKTOP_OSES, type DesktopOs } from '../../utils/visitor-os';
|
|
55
|
+
import { FaqSection, pageFaqProps, type PageFaqSlot } from '../faq/faq-section';
|
|
55
56
|
import { CommandBox } from '../features/command-box';
|
|
56
57
|
import { AppleLogoIcon } from '../icons-v2-generated/brand-logos/apple-logo-icon';
|
|
57
58
|
import { WindowsLogoGreyIcon } from '../icons-v2-generated/brand-logos/windows-logo-grey-icon';
|
|
@@ -86,6 +87,12 @@ export interface DownloadAppsPageProps {
|
|
|
86
87
|
onDownloadAction?: (event: DownloadActionEvent) => void;
|
|
87
88
|
/** The closing card, under the mobile app: using OpenFrame without installing anything. Default: none. */
|
|
88
89
|
web?: DownloadAppsWebOption;
|
|
90
|
+
/**
|
|
91
|
+
* The page's own FAQ block: the topic the page is about (stated by the host,
|
|
92
|
+
* never read from its address) and where the host serves the FAQs. Rendered
|
|
93
|
+
* after the page's content, inside its container. Absent: no FAQ block.
|
|
94
|
+
*/
|
|
95
|
+
faq?: PageFaqSlot;
|
|
89
96
|
}
|
|
90
97
|
|
|
91
98
|
/** The "no install" card: the host's words and its own button (the page holds no signup link). */
|
|
@@ -281,6 +288,7 @@ export function DownloadAppsPage({
|
|
|
281
288
|
openStoresInNewTab = true,
|
|
282
289
|
onDownloadAction,
|
|
283
290
|
web,
|
|
291
|
+
faq,
|
|
284
292
|
}: DownloadAppsPageProps) {
|
|
285
293
|
const { data, isLoading, error, reload } = useDownloads({ endpoint, initialData });
|
|
286
294
|
// The page adapts to the server's answer: a section exists only for what it names.
|
|
@@ -362,6 +370,7 @@ export function DownloadAppsPage({
|
|
|
362
370
|
{body}
|
|
363
371
|
{web && <WebCard web={web} />}
|
|
364
372
|
</div>
|
|
373
|
+
{faq && <FaqSection {...pageFaqProps(faq)} />}
|
|
365
374
|
</DownloadAppsChrome>
|
|
366
375
|
);
|
|
367
376
|
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import type { ReactNode } from 'react';
|
|
12
12
|
import type { OnboardingGuide } from '../chat/types/entities/onboarding-guide';
|
|
13
|
+
import type { PageFaqSlot } from '../faq/faq-section';
|
|
13
14
|
import { OnboardingGuidesCatalogView } from '../onboarding-guides';
|
|
14
15
|
import { DevSectionPage } from '../shared/dev-section';
|
|
15
16
|
|
|
@@ -32,6 +33,12 @@ export interface OnboardingGuidesCatalogPageProps {
|
|
|
32
33
|
subtitle?: string;
|
|
33
34
|
/** Optional slot rendered below the catalog, inside the page chrome. */
|
|
34
35
|
belowContent?: ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* The page's own FAQ block: the topic the page is about (stated by the host,
|
|
38
|
+
* never read from its address) and where the host serves the FAQs. Rendered
|
|
39
|
+
* after the page's content, inside its container. Absent: no FAQ block.
|
|
40
|
+
*/
|
|
41
|
+
faq?: PageFaqSlot;
|
|
35
42
|
/** Render the standalone `<PageShell>`. Default true. Pass false when the host
|
|
36
43
|
* layout already provides the page container (forwarded to `DevSectionPage`). */
|
|
37
44
|
shell?: boolean;
|
|
@@ -48,10 +55,18 @@ export function OnboardingGuidesCatalogPage({
|
|
|
48
55
|
title,
|
|
49
56
|
subtitle,
|
|
50
57
|
belowContent,
|
|
58
|
+
faq,
|
|
51
59
|
shell,
|
|
52
60
|
}: OnboardingGuidesCatalogPageProps) {
|
|
53
61
|
return (
|
|
54
|
-
<DevSectionPage
|
|
62
|
+
<DevSectionPage
|
|
63
|
+
sectionKey="onboarding"
|
|
64
|
+
backButton={backButton}
|
|
65
|
+
title={title}
|
|
66
|
+
subtitle={subtitle}
|
|
67
|
+
faq={faq}
|
|
68
|
+
shell={shell}
|
|
69
|
+
>
|
|
55
70
|
<OnboardingGuidesCatalogView
|
|
56
71
|
guidesEndpoint={guidesEndpoint}
|
|
57
72
|
sectionsEndpoint={sectionsEndpoint}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import type { ReactNode } from 'react';
|
|
12
12
|
import type { ProductRelease, ProductReleaseListResponse } from '../../types/product-release';
|
|
13
|
+
import type { PageFaqSlot } from '../faq/faq-section';
|
|
13
14
|
import { DevSectionPage } from '../shared/dev-section';
|
|
14
15
|
import { ProductReleasesView, type ProductReleaseCardExtras } from '../shared/product-release';
|
|
15
16
|
|
|
@@ -28,6 +29,12 @@ export interface ProductReleasesListPageProps {
|
|
|
28
29
|
subtitle?: string;
|
|
29
30
|
/** Optional slot rendered below the list, inside the page chrome. */
|
|
30
31
|
belowContent?: ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* The page's own FAQ block: the topic the page is about (stated by the host,
|
|
34
|
+
* never read from its address) and where the host serves the FAQs. Rendered
|
|
35
|
+
* after the page's content, inside its container. Absent: no FAQ block.
|
|
36
|
+
*/
|
|
37
|
+
faq?: PageFaqSlot;
|
|
31
38
|
/** Render the standalone `<PageShell>`. Default true. Pass false when the host
|
|
32
39
|
* layout already provides the page container (forwarded to `DevSectionPage`). */
|
|
33
40
|
shell?: boolean;
|
|
@@ -42,10 +49,18 @@ export function ProductReleasesListPage({
|
|
|
42
49
|
title,
|
|
43
50
|
subtitle,
|
|
44
51
|
belowContent,
|
|
52
|
+
faq,
|
|
45
53
|
shell,
|
|
46
54
|
}: ProductReleasesListPageProps) {
|
|
47
55
|
return (
|
|
48
|
-
<DevSectionPage
|
|
56
|
+
<DevSectionPage
|
|
57
|
+
sectionKey="releases"
|
|
58
|
+
backButton={backButton}
|
|
59
|
+
title={title}
|
|
60
|
+
subtitle={subtitle}
|
|
61
|
+
faq={faq}
|
|
62
|
+
shell={shell}
|
|
63
|
+
>
|
|
49
64
|
<ProductReleasesView
|
|
50
65
|
endpoint={releasesEndpoint}
|
|
51
66
|
basePath={basePath}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import type { ReactNode } from 'react';
|
|
12
12
|
import type { RoadmapItem } from '../chat/types/entities/roadmap-item';
|
|
13
|
+
import type { PageFaqSlot } from '../faq/faq-section';
|
|
13
14
|
import { DevSectionPage } from '../shared/dev-section';
|
|
14
15
|
import { RoadmapView } from '../shared/roadmap';
|
|
15
16
|
import type { UseRoadmapVotingOptions } from '../shared/roadmap';
|
|
@@ -35,6 +36,12 @@ export interface RoadmapPageProps {
|
|
|
35
36
|
/** Optional slot rendered below the list, inside the page chrome — e.g. the
|
|
36
37
|
* hub's related-content rail. */
|
|
37
38
|
belowContent?: ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* The page's own FAQ block: the topic the page is about (stated by the host,
|
|
41
|
+
* never read from its address) and where the host serves the FAQs. Rendered
|
|
42
|
+
* after the page's content, inside its container. Absent: no FAQ block.
|
|
43
|
+
*/
|
|
44
|
+
faq?: PageFaqSlot;
|
|
38
45
|
/** Render the standalone `<PageShell>`. Default true. Pass false when the host
|
|
39
46
|
* layout already provides the page container (forwarded to `DevSectionPage`). */
|
|
40
47
|
shell?: boolean;
|
|
@@ -51,10 +58,18 @@ export function RoadmapPage({
|
|
|
51
58
|
title,
|
|
52
59
|
subtitle,
|
|
53
60
|
belowContent,
|
|
61
|
+
faq,
|
|
54
62
|
shell,
|
|
55
63
|
}: RoadmapPageProps) {
|
|
56
64
|
return (
|
|
57
|
-
<DevSectionPage
|
|
65
|
+
<DevSectionPage
|
|
66
|
+
sectionKey="roadmap"
|
|
67
|
+
backButton={backButton}
|
|
68
|
+
title={title}
|
|
69
|
+
subtitle={subtitle}
|
|
70
|
+
faq={faq}
|
|
71
|
+
shell={shell}
|
|
72
|
+
>
|
|
58
73
|
<RoadmapView
|
|
59
74
|
endpoint={roadmapEndpoint}
|
|
60
75
|
initialItems={initialItems}
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
OPENFRAME_DEV_SECTIONS,
|
|
23
23
|
type OpenframeDevSectionKey,
|
|
24
24
|
} from '../../../utils/dev-sections/openframe-dev-sections';
|
|
25
|
+
import { FaqSection, pageFaqProps, type PageFaqSlot } from '../../faq/faq-section';
|
|
25
26
|
import { PageShell, PageLayout } from '../../ui';
|
|
26
27
|
import { DevSectionView } from './dev-section-view';
|
|
27
28
|
|
|
@@ -51,6 +52,12 @@ export interface DevSectionPageProps {
|
|
|
51
52
|
* `false` when the host layout already provides the page container (e.g.
|
|
52
53
|
* openframe-frontend's `AppLayout` `<main>`): then only the
|
|
53
54
|
* `page-shell-content` padding box is rendered, avoiding a nested `<main>`. */
|
|
55
|
+
/**
|
|
56
|
+
* The page's own FAQ block: the topic the page is about (stated by the host,
|
|
57
|
+
* never read from its address) and where the host serves the FAQs. Rendered
|
|
58
|
+
* after the page's content, inside its container. Absent: no FAQ block.
|
|
59
|
+
*/
|
|
60
|
+
faq?: PageFaqSlot;
|
|
54
61
|
shell?: boolean;
|
|
55
62
|
}
|
|
56
63
|
|
|
@@ -61,6 +68,7 @@ export function DevSectionPage({
|
|
|
61
68
|
backButton,
|
|
62
69
|
title,
|
|
63
70
|
subtitle,
|
|
71
|
+
faq,
|
|
64
72
|
shell = true,
|
|
65
73
|
}: DevSectionPageProps) {
|
|
66
74
|
const router = useRouter();
|
|
@@ -95,6 +103,7 @@ export function DevSectionPage({
|
|
|
95
103
|
<DevSectionView sectionKey={sectionKey} showHeading={false} preControls={preControls}>
|
|
96
104
|
{children}
|
|
97
105
|
</DevSectionView>
|
|
106
|
+
{faq && <FaqSection {...pageFaqProps(faq)} />}
|
|
98
107
|
</PageLayout>
|
|
99
108
|
);
|
|
100
109
|
|
|
@@ -21,6 +21,7 @@ import type { ComponentType } from 'react';
|
|
|
21
21
|
import Link from '../../../embed-shims/next-link';
|
|
22
22
|
import { useRouter } from '../../../embed-shims/next-navigation';
|
|
23
23
|
import { formatLegalDate } from '../../../utils/format';
|
|
24
|
+
import { FaqSection, pageFaqProps, type PageFaqSlot } from '../../faq/faq-section';
|
|
24
25
|
import { PageShell, PageLayout } from '../../ui';
|
|
25
26
|
import { RichMarkdownRenderer } from '../../ui/markdown';
|
|
26
27
|
import { useLegalDocs, type LegalDocument } from './use-legal-docs';
|
|
@@ -64,6 +65,12 @@ export interface LegalDocumentPageProps {
|
|
|
64
65
|
/** Back-button config — same pattern as `DevSectionPage`. Pass `false`
|
|
65
66
|
* to hide. Default `{ label: 'Back to home', href: '/' }`. */
|
|
66
67
|
backButton?: { label?: string; href?: string } | false;
|
|
68
|
+
/**
|
|
69
|
+
* The page's own FAQ block: the topic the page is about (stated by the host,
|
|
70
|
+
* never read from its address) and where the host serves the FAQs. Rendered
|
|
71
|
+
* after the page's content, inside its container. Absent: no FAQ block.
|
|
72
|
+
*/
|
|
73
|
+
faq?: PageFaqSlot;
|
|
67
74
|
/** Render the standalone `<PageShell>`. Default true. Pass false when the host
|
|
68
75
|
* layout already provides the page container — only the padding box renders,
|
|
69
76
|
* avoiding a nested `<main>`. */
|
|
@@ -83,6 +90,7 @@ export function LegalDocumentPage({
|
|
|
83
90
|
apiEndpoint,
|
|
84
91
|
MarkdownRenderer = RichMarkdownRenderer,
|
|
85
92
|
backButton,
|
|
93
|
+
faq,
|
|
86
94
|
shell = true,
|
|
87
95
|
}: LegalDocumentPageProps) {
|
|
88
96
|
const router = useRouter();
|
|
@@ -161,6 +169,7 @@ export function LegalDocumentPage({
|
|
|
161
169
|
</div>
|
|
162
170
|
</div>
|
|
163
171
|
</div>
|
|
172
|
+
{faq && <FaqSection {...pageFaqProps(faq)} />}
|
|
164
173
|
</PageLayout>
|
|
165
174
|
);
|
|
166
175
|
|
|
@@ -56,11 +56,11 @@ export interface AssistantRuntime {
|
|
|
56
56
|
source?: string;
|
|
57
57
|
/**
|
|
58
58
|
* GET endpoint the questions are read from:
|
|
59
|
-
* `<url>?count=<n>&
|
|
60
|
-
* `
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
59
|
+
* `<url>?count=<n>&topic=<topic>&exclude=<id,id>` → `{ prompts: AskPrompt[] }`
|
|
60
|
+
* `topic` is ANY string: the host decides what topics exist (the hub: the
|
|
61
|
+
* topics of its FAQs, set in the FAQ admin), so a new topic needs no change
|
|
62
|
+
* here. Hub: '/api/faqs/questions'. Absent: an "ask" surface shows its
|
|
63
|
+
* launcher with no questions.
|
|
64
64
|
*/
|
|
65
65
|
askPromptsUrl?: string;
|
|
66
66
|
/**
|
package/src/types/faq.ts
CHANGED
|
@@ -1,8 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two kinds of FAQ. An `answer` is a question with its written answer (the
|
|
3
|
+
* accordion, FAQPage JSON-LD). An `ask` is a question the assistant answers: it
|
|
4
|
+
* has a `prompt` (what is sent to the chat) and no written answer, and is what
|
|
5
|
+
* every "ask the assistant" surface offers.
|
|
6
|
+
*/
|
|
7
|
+
export const FAQ_KINDS = ['answer', 'ask'] as const;
|
|
8
|
+
export type FaqKind = (typeof FAQ_KINDS)[number];
|
|
9
|
+
|
|
1
10
|
export interface Faq {
|
|
2
11
|
id: number;
|
|
3
12
|
question: string;
|
|
4
13
|
answer: string;
|
|
5
14
|
section?: string | null;
|
|
15
|
+
/** Absent on a host that predates kinds: an `answer`. */
|
|
16
|
+
kind?: FaqKind;
|
|
17
|
+
/** An `ask` FAQ's prompt for the chat; null on an `answer`. */
|
|
18
|
+
prompt?: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* The places the FAQ is written for, shared by both kinds: a page's topic
|
|
21
|
+
* (`pricing`, `careers`, `home`) or a section's. Empty: written for no place.
|
|
22
|
+
*/
|
|
23
|
+
topics?: string[];
|
|
6
24
|
display_order: number;
|
|
7
25
|
is_active: boolean;
|
|
8
26
|
created_at: string;
|