@carlonicora/nextjs-jsonapi 3.12.0 → 3.14.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/dist/{AssistantInterface-DwdBzS9f.d.ts → AssistantInterface-RvZzlcA_.d.ts} +2 -0
- package/dist/{AssistantInterface-DMh-zApr.d.mts → AssistantInterface-jL56dyNc.d.mts} +2 -0
- package/dist/{AssistantMessageInterface-0zyVingf.d.ts → AssistantMessageInterface-CuaMDs2i.d.ts} +1 -1
- package/dist/{AssistantMessageInterface-ddyG114R.d.mts → AssistantMessageInterface-Du3ShThp.d.mts} +1 -1
- package/dist/{BlockNoteEditor-CR5KH4AI.mjs → BlockNoteEditor-QG5OWH5K.mjs} +4 -4
- package/dist/{BlockNoteEditor-6G27S6P3.js → BlockNoteEditor-WP4K423H.js} +19 -19
- package/dist/{BlockNoteEditor-6G27S6P3.js.map → BlockNoteEditor-WP4K423H.js.map} +1 -1
- package/dist/{BlockNoteViewer-5MITJ7AD.js → BlockNoteViewer-CWFPYYIU.js} +3 -3
- package/dist/{BlockNoteViewer-5MITJ7AD.js.map → BlockNoteViewer-CWFPYYIU.js.map} +1 -1
- package/dist/{BlockNoteViewer-NJKFUNXP.mjs → BlockNoteViewer-P2VKEFRN.mjs} +2 -2
- package/dist/{ai-connection.module-28f-hux0.d.mts → HandbookSectionInterface-BOxIdBdd.d.mts} +54 -1
- package/dist/{ai-connection.module-Bqwh_DnR.d.ts → HandbookSectionInterface-CAXxbDw0.d.ts} +54 -1
- package/dist/{auth.interface-B6ZQLGjS.d.ts → auth.interface-BC1jp_ni.d.ts} +1 -1
- package/dist/{auth.interface-jYD8Gc4P.d.mts → auth.interface-dR2-6gPM.d.mts} +1 -1
- package/dist/billing/index.js +401 -401
- package/dist/billing/index.mjs +3 -3
- package/dist/{chunk-JEGL7KHK.mjs → chunk-46BRB36R.mjs} +2847 -1803
- package/dist/chunk-46BRB36R.mjs.map +1 -0
- package/dist/{chunk-L7DZSTFU.js → chunk-IB7DTXWG.js} +846 -129
- package/dist/chunk-IB7DTXWG.js.map +1 -0
- package/dist/{chunk-OKGGYCO5.js → chunk-OH6GJY4B.js} +2162 -1118
- package/dist/chunk-OH6GJY4B.js.map +1 -0
- package/dist/{chunk-Q2BREXH3.mjs → chunk-OSFYCSTW.mjs} +724 -7
- package/dist/chunk-OSFYCSTW.mjs.map +1 -0
- package/dist/{chunk-HVNEWDRF.mjs → chunk-VZKJIAND.mjs} +2 -2
- package/dist/{chunk-4ETVCRQD.js → chunk-XH4IURUD.js} +7 -7
- package/dist/{chunk-4ETVCRQD.js.map → chunk-XH4IURUD.js.map} +1 -1
- package/dist/client/index.d.mts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.d.mts +270 -7
- package/dist/components/index.d.ts +270 -7
- package/dist/components/index.js +32 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +31 -3
- package/dist/contexts/index.d.mts +17 -5
- package/dist/contexts/index.d.ts +17 -5
- package/dist/contexts/index.js +4 -4
- package/dist/contexts/index.mjs +3 -3
- package/dist/core/index.d.mts +491 -11
- package/dist/core/index.d.ts +491 -11
- package/dist/core/index.js +38 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +37 -1
- package/dist/features/help/index.js +37 -37
- package/dist/features/help/index.mjs +3 -3
- package/dist/features/tokenusage/index.js +101 -101
- package/dist/features/tokenusage/index.mjs +3 -3
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +39 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -2
- package/dist/{notification.interface-DYF56CtE.d.ts → notification.interface-CjzV_KII.d.ts} +1 -1
- package/dist/{notification.interface-BWOCvKRP.d.mts → notification.interface-MnRt1Tjm.d.mts} +1 -1
- package/dist/{s3.service-D_dswjgz.d.mts → s3.service-C0Yq2Sx3.d.mts} +2 -2
- package/dist/{s3.service-DserU9VK.d.ts → s3.service-CUGarZs3.d.ts} +2 -2
- package/dist/server/index.d.mts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +1 -1
- package/dist/{useSocket-BZG9oX-L.d.mts → useSocket-BcH7l7B8.d.mts} +1 -1
- package/dist/{useSocket-CiyTtYFj.d.ts → useSocket-DCZd_eJk.d.ts} +1 -1
- package/package.json +2 -1
- package/src/components/containers/MermaidDiagram.tsx +117 -0
- package/src/components/containers/ReactMarkdownContainer.tsx +98 -15
- package/src/components/containers/index.ts +1 -0
- package/src/components/index.ts +1 -0
- package/src/core/index.ts +5 -0
- package/src/core/registry/ModuleRegistry.ts +4 -0
- package/src/features/assistant/components/parts/AssistantComposer.tsx +22 -3
- package/src/features/assistant/components/parts/AssistantSidebar.tsx +13 -3
- package/src/features/assistant/components/parts/AssistantThreadHeader.tsx +10 -3
- package/src/features/assistant/contexts/AssistantContext.tsx +30 -3
- package/src/features/assistant/contexts/__tests__/AssistantContext.spec.tsx +32 -0
- package/src/features/assistant/data/Assistant.ts +2 -0
- package/src/features/assistant/data/AssistantInterface.ts +2 -0
- package/src/features/assistant/data/AssistantService.ts +4 -0
- package/src/features/assistant-message/components/parts/MessageSourcesContainer.tsx +5 -1
- package/src/features/assistant-message/data/AssistantMessage.ts +27 -2
- package/src/features/content/data/content.interface.ts +1 -1
- package/src/features/handbook/HandbookPageModule.ts +41 -0
- package/src/features/handbook/HandbookSectionModule.ts +35 -0
- package/src/features/handbook/HandbookThreadMessageModule.ts +21 -0
- package/src/features/handbook/HandbookThreadModule.ts +29 -0
- package/src/features/handbook/components/containers/HandbookAdminContainer.tsx +17 -0
- package/src/features/handbook/components/containers/HandbookAskContainer.tsx +142 -0
- package/src/features/handbook/components/containers/HandbookAskSheet.tsx +149 -0
- package/src/features/handbook/components/containers/HandbookPageContainer.tsx +143 -0
- package/src/features/handbook/components/containers/__tests__/HandbookAskContainer.spec.tsx +268 -0
- package/src/features/handbook/components/containers/__tests__/HandbookAskSheet.spec.tsx +143 -0
- package/src/features/handbook/components/containers/__tests__/HandbookPageContainer.spec.tsx +288 -0
- package/src/features/handbook/components/details/HandbookPageDetails.tsx +52 -0
- package/src/features/handbook/components/details/HandbookPageNeighbours.tsx +72 -0
- package/src/features/handbook/components/details/HandbookPageToc.tsx +165 -0
- package/src/features/handbook/components/forms/HandbookSyncButton.tsx +43 -0
- package/src/features/handbook/components/forms/__tests__/HandbookSyncButton.spec.tsx +42 -0
- package/src/features/handbook/components/index.ts +12 -0
- package/src/features/handbook/components/lists/HandbookContents.tsx +196 -0
- package/src/features/handbook/components/lists/HandbookSectionGroup.tsx +153 -0
- package/src/features/handbook/components/lists/__tests__/HandbookContents.spec.tsx +247 -0
- package/src/features/handbook/components/parts/HandbookIndexStatus.tsx +62 -0
- package/src/features/handbook/components/parts/HandbookPageNavigator.tsx +143 -0
- package/src/features/handbook/contexts/HandbookContext.tsx +109 -0
- package/src/features/handbook/contexts/__tests__/HandbookContext.spec.tsx +131 -0
- package/src/features/handbook/data/HandbookPage.spec.ts +136 -0
- package/src/features/handbook/data/HandbookPage.ts +99 -0
- package/src/features/handbook/data/HandbookPageFields.ts +31 -0
- package/src/features/handbook/data/HandbookPageInput.ts +8 -0
- package/src/features/handbook/data/HandbookPageInterface.ts +29 -0
- package/src/features/handbook/data/HandbookPageService.ts +60 -0
- package/src/features/handbook/data/HandbookSection.spec.ts +58 -0
- package/src/features/handbook/data/HandbookSection.ts +73 -0
- package/src/features/handbook/data/HandbookSectionInput.ts +12 -0
- package/src/features/handbook/data/HandbookSectionInterface.ts +26 -0
- package/src/features/handbook/data/HandbookSectionService.ts +26 -0
- package/src/features/handbook/data/HandbookThread.ts +114 -0
- package/src/features/handbook/data/HandbookThreadInterface.ts +31 -0
- package/src/features/handbook/data/HandbookThreadMessage.ts +144 -0
- package/src/features/handbook/data/HandbookThreadMessageInterface.ts +35 -0
- package/src/features/handbook/data/HandbookThreadMessageService.ts +30 -0
- package/src/features/handbook/data/HandbookThreadService.ts +86 -0
- package/src/features/handbook/data/__tests__/HandbookThreadService.spec.ts +112 -0
- package/src/features/handbook/data/handbookDisplay.spec.ts +92 -0
- package/src/features/handbook/data/handbookDisplay.ts +55 -0
- package/src/features/handbook/data/index.ts +16 -0
- package/src/features/handbook/hooks/__tests__/useHandbookAsk.spec.ts +198 -0
- package/src/features/handbook/hooks/useHandbookAsk.ts +213 -0
- package/src/features/handbook/i18n-keys.ts +46 -0
- package/src/features/handbook/index.ts +7 -0
- package/src/features/how-to/components/forms/HowToEditor.tsx +0 -1
- package/src/features/how-to/components/forms/HowToReindexButton.spec.tsx +84 -0
- package/src/features/how-to/components/forms/HowToReindexButton.tsx +46 -0
- package/src/features/how-to/components/index.ts +1 -0
- package/src/features/how-to/components/lists/HowToList.tsx +5 -1
- package/src/features/how-to/data/HowTo.spec.ts +61 -1
- package/src/features/how-to/data/HowToService.ts +13 -0
- package/dist/chunk-JEGL7KHK.mjs.map +0 -1
- package/dist/chunk-L7DZSTFU.js.map +0 -1
- package/dist/chunk-OKGGYCO5.js.map +0 -1
- package/dist/chunk-Q2BREXH3.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-CR5KH4AI.mjs.map → BlockNoteEditor-QG5OWH5K.mjs.map} +0 -0
- /package/dist/{BlockNoteViewer-NJKFUNXP.mjs.map → BlockNoteViewer-P2VKEFRN.mjs.map} +0 -0
- /package/dist/{chunk-HVNEWDRF.mjs.map → chunk-VZKJIAND.mjs.map} +0 -0
package/dist/core/index.d.mts
CHANGED
|
@@ -8,28 +8,28 @@ import { A as AbstractService, N as NextRef, P as PreviousRef } from '../Abstrac
|
|
|
8
8
|
export { H as HttpMethod, S as SelfRef, T as TotalRef, b as clearLastApiMeta, c as clearLastApiTotal, d as getGlobalErrorHandler, a as getLastApiMeta, g as getLastApiTotal, s as setGlobalErrorHandler } from '../AbstractService-B0T7h8fX.mjs';
|
|
9
9
|
import { M as ModuleWithPermissions, g as PermissionUser, A as Action, f as PermissionModule, a as ModuleFactory } from '../types-Bq_UA8Lg.mjs';
|
|
10
10
|
export { d as ModuleDefinition, c as ModulePermissionDefinition, P as PageUrl, b as PermissionCheck, e as PermissionConfig } from '../types-Bq_UA8Lg.mjs';
|
|
11
|
-
import { a as HowToInterface, H as HowToInput, d as AssistantMessageInterface, A as AssistantMessageRole, e as ChunkInterface, C as ChunkRelationshipMeta, b as AssistantMessageType, c as AssistantMessageInput } from '../AssistantMessageInterface-
|
|
12
|
-
export { B as BreadcrumbItemData } from '../AssistantMessageInterface-
|
|
11
|
+
import { a as HowToInterface, H as HowToInput, d as AssistantMessageInterface, A as AssistantMessageRole, e as ChunkInterface, C as ChunkRelationshipMeta, b as AssistantMessageType, c as AssistantMessageInput } from '../AssistantMessageInterface-Du3ShThp.mjs';
|
|
12
|
+
export { B as BreadcrumbItemData } from '../AssistantMessageInterface-Du3ShThp.mjs';
|
|
13
13
|
export { C as ContentFields, D as D3Link, a as D3Node, R as RoleFields, U as UserFields } from '../content.fields-1AlHDtDb.mjs';
|
|
14
14
|
import { ClassValue } from 'clsx';
|
|
15
15
|
export { ClassValue } from 'clsx';
|
|
16
16
|
import * as React from 'react';
|
|
17
17
|
import { ReactElement, ReactNode, JSXElementConstructor } from 'react';
|
|
18
18
|
import { z } from 'zod';
|
|
19
|
-
import { T as TotpAuthenticatorInterface, P as PasskeyInterface } from '../
|
|
20
|
-
export { h as AiConnection, l as AiConnectionEnvDefaults, i as AiConnectionFields, n as AiConnectionInput, m as AiConnectionInterface, p as AiConnectionModule, o as AiConnectionService, j as AiProviderFieldDescriptor, k as AiProviderRegistry, A as AuthComponent, b as getIcon, a as getIconByModule, c as getIconByModuleName, g as getInitials, d as getLucideIcon, e as getLucideIconByModule, f as getLucideIconByModuleName } from '../
|
|
19
|
+
import { T as TotpAuthenticatorInterface, P as PasskeyInterface, H as HandbookPageInterface, q as HandbookSectionInterface } from '../HandbookSectionInterface-BOxIdBdd.mjs';
|
|
20
|
+
export { h as AiConnection, l as AiConnectionEnvDefaults, i as AiConnectionFields, n as AiConnectionInput, m as AiConnectionInterface, p as AiConnectionModule, o as AiConnectionService, j as AiProviderFieldDescriptor, k as AiProviderRegistry, A as AuthComponent, b as getIcon, a as getIconByModule, c as getIconByModuleName, g as getInitials, d as getLucideIcon, e as getLucideIconByModule, f as getLucideIconByModuleName } from '../HandbookSectionInterface-BOxIdBdd.mjs';
|
|
21
21
|
import { PartialBlock } from '@blocknote/core';
|
|
22
22
|
import { ExternalToast } from 'sonner';
|
|
23
|
-
import { e as RoleInterface, R as RoleInput, U as UserInterface, c as CompanyInterface, f as UserInput, b as CompanyInput, C as ContentInterface, a as ContentInput, N as NotificationInterface, d as NotificationInput } from '../notification.interface-
|
|
24
|
-
import { b as AuthInterface, A as AuthInput } from '../auth.interface-
|
|
25
|
-
export { a as AuthQuery } from '../auth.interface-
|
|
26
|
-
import { T as TwoFactorChallengeInterface, c as S3Interface, b as S3Input } from '../s3.service-
|
|
27
|
-
export { A as AuthService, C as CompanyService, a as ContentService, F as FeatureService, N as NotificationService, P as PushService, R as RoleService, S as S3Service, U as UserService } from '../s3.service-
|
|
23
|
+
import { e as RoleInterface, R as RoleInput, U as UserInterface, c as CompanyInterface, f as UserInput, b as CompanyInput, C as ContentInterface, a as ContentInput, N as NotificationInterface, d as NotificationInput } from '../notification.interface-MnRt1Tjm.mjs';
|
|
24
|
+
import { b as AuthInterface, A as AuthInput } from '../auth.interface-dR2-6gPM.mjs';
|
|
25
|
+
export { a as AuthQuery } from '../auth.interface-dR2-6gPM.mjs';
|
|
26
|
+
import { T as TwoFactorChallengeInterface, c as S3Interface, b as S3Input } from '../s3.service-C0Yq2Sx3.mjs';
|
|
27
|
+
export { A as AuthService, C as CompanyService, a as ContentService, F as FeatureService, N as NotificationService, P as PushService, R as RoleService, S as S3Service, U as UserService } from '../s3.service-C0Yq2Sx3.mjs';
|
|
28
28
|
import { PublicKeyCredentialCreationOptionsJSON, RegistrationResponseJSON, PublicKeyCredentialRequestOptionsJSON, AuthenticationResponseJSON } from '@simplewebauthn/browser';
|
|
29
29
|
import { M as MeterInterface, o as MeterSummaryInterface, P as PaymentMethodInterface, S as StripeCustomerInterface, a as StripeInvoiceInterface, j as StripeSubscriptionInterface, I as InvoiceStatus, g as StripeProductInterface, d as StripePriceInterface, h as StripeProductInput, e as PriceRecurring, f as StripePriceInput, i as SubscriptionStatus, k as StripeSubscriptionInput, m as StripeSubscriptionCreateResponse, b as ProrationPreviewInterface, n as StripeUsageInterface, R as ReportUsageInput, U as UsageSummaryInterface, q as PromotionCodeValidationResult } from '../stripe-promotion-code.interface-ClZ7DxS9.mjs';
|
|
30
30
|
export { c as ProrationLineItem, l as StripeSubscriptionCreateMeta, p as UsageRecordInterface } from '../stripe-promotion-code.interface-ClZ7DxS9.mjs';
|
|
31
31
|
import { M as ModuleInterface, F as FeatureInterface } from '../feature.interface-CXb1-vNq.mjs';
|
|
32
|
-
import { a as AssistantInterface, A as AssistantInput } from '../AssistantInterface-
|
|
32
|
+
import { a as AssistantInterface, A as AssistantInput } from '../AssistantInterface-jL56dyNc.mjs';
|
|
33
33
|
import { O as OAuthClientInterface, a as OAuthClientInput, b as OAuthClientCreateRequest, c as OAuthClientCreateResponse, d as OAuthConsentRequest, f as OAuthConsentInfo } from '../oauth.interface-DRE3NAKc.mjs';
|
|
34
34
|
export { A as AVAILABLE_OAUTH_SCOPES, D as DEFAULT_GRANT_TYPES, g as OAUTH_SCOPE_DISPLAY, e as OAuthScopeInfo } from '../oauth.interface-DRE3NAKc.mjs';
|
|
35
35
|
export { b as TokenUsageAdminBreakdownModule, T as TokenUsageAdminSummaryModule, a as TokenUsageAdminTimelineModule, c as configureTokenUsage, g as getTokenUsageCurrency, t as tokenUsageModules } from '../config-n-ZpPmOL.mjs';
|
|
@@ -259,6 +259,10 @@ interface FoundationModuleDefinitions {
|
|
|
259
259
|
Module: ModuleWithPermissions;
|
|
260
260
|
Content: ModuleWithPermissions;
|
|
261
261
|
HowTo: ModuleWithPermissions;
|
|
262
|
+
HandbookPage: ModuleWithPermissions;
|
|
263
|
+
HandbookSection: ModuleWithPermissions;
|
|
264
|
+
HandbookThread: ModuleWithPermissions;
|
|
265
|
+
HandbookThreadMessage: ModuleWithPermissions;
|
|
262
266
|
Assistant: ModuleWithPermissions;
|
|
263
267
|
AssistantMessage: ModuleWithPermissions;
|
|
264
268
|
AssistantAction: ModuleWithPermissions;
|
|
@@ -1917,6 +1921,12 @@ declare class HowToService extends AbstractService {
|
|
|
1917
1921
|
static delete(params: {
|
|
1918
1922
|
howToId: string;
|
|
1919
1923
|
}): Promise<void>;
|
|
1924
|
+
/**
|
|
1925
|
+
* POST /howtos/reindex — re-queues every guide for chunking. Replies 204.
|
|
1926
|
+
* Chunking otherwise only happens on create and update, so a guide that was
|
|
1927
|
+
* never chunked stays invisible to help-mode retrieval with no way back.
|
|
1928
|
+
*/
|
|
1929
|
+
static reindex(): Promise<void>;
|
|
1920
1930
|
static findPublished(params?: {
|
|
1921
1931
|
howToType?: string;
|
|
1922
1932
|
}): Promise<HowToInterface[]>;
|
|
@@ -1938,6 +1948,452 @@ declare class HowToService extends AbstractService {
|
|
|
1938
1948
|
}): Promise<void>;
|
|
1939
1949
|
}
|
|
1940
1950
|
|
|
1951
|
+
declare const HandbookPageModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
1952
|
+
|
|
1953
|
+
/**
|
|
1954
|
+
* One top-level directory of the documentation tree. Like the thread message,
|
|
1955
|
+
* it has no `pageUrl` — a section has no page of its own; it is a heading on
|
|
1956
|
+
* the contents surface and nothing more.
|
|
1957
|
+
*/
|
|
1958
|
+
declare const HandbookSectionModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
1959
|
+
|
|
1960
|
+
/**
|
|
1961
|
+
* One turn of a handbook conversation. Like the thread, it has no `pageUrl` —
|
|
1962
|
+
* a message is only ever read as part of its thread.
|
|
1963
|
+
*/
|
|
1964
|
+
declare const HandbookThreadMessageModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
1965
|
+
|
|
1966
|
+
/**
|
|
1967
|
+
* A persisted handbook conversation.
|
|
1968
|
+
*
|
|
1969
|
+
* It carries no `pageUrl`: a thread is selected inside the ask surface
|
|
1970
|
+
* (`/administration/handbook/chat`), never routed to on its own, and a
|
|
1971
|
+
* `pageUrl` here would add a phantom entry to the RBAC path map.
|
|
1972
|
+
*
|
|
1973
|
+
* `lists` deliberately narrows to the title — the sidebar renders nothing else,
|
|
1974
|
+
* and side-loading every message of every thread into the list payload is what
|
|
1975
|
+
* the single-resource endpoint is for.
|
|
1976
|
+
*/
|
|
1977
|
+
declare const HandbookThreadModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
1978
|
+
|
|
1979
|
+
/**
|
|
1980
|
+
* The handbook is INDEXED in English and SHOWN translated.
|
|
1981
|
+
*
|
|
1982
|
+
* A page's translation lives on the same node as its English original — matched
|
|
1983
|
+
* by `path` at ingest time — and arrives as ordinary attributes beside it.
|
|
1984
|
+
* There is no second id, no locale in any URL and no second resource, so
|
|
1985
|
+
* nothing about ordering, grouping or section membership changes: `path`,
|
|
1986
|
+
* `order` and `section` stay English and are still what every sort reads. Only
|
|
1987
|
+
* the rendered words are resolved here.
|
|
1988
|
+
*
|
|
1989
|
+
* These five functions are the ONE place that resolution happens. A component
|
|
1990
|
+
* reaching for `page.title` directly renders English to an Italian reader, and
|
|
1991
|
+
* a per-component `??` would be five copies of the same rule to keep in step.
|
|
1992
|
+
*
|
|
1993
|
+
* Each parameter is a `Pick` of the interface rather than the whole of it, so a
|
|
1994
|
+
* caller holding a projection — a row from a sparse fieldset, a spec fixture —
|
|
1995
|
+
* passes it without a cast, while a rename on either interface still breaks
|
|
1996
|
+
* this file rather than drifting from it.
|
|
1997
|
+
*/
|
|
1998
|
+
/** The page title to render: the translation when there is one, else English. */
|
|
1999
|
+
declare function handbookPageTitle(page: Pick<HandbookPageInterface, "title" | "displayTitle">): string;
|
|
2000
|
+
/** The page's one-line description, translated when the ingest matched one. */
|
|
2001
|
+
declare function handbookPageSummary(page: Pick<HandbookPageInterface, "summary" | "displaySummary">): string | undefined;
|
|
2002
|
+
/**
|
|
2003
|
+
* The markdown body to render. Detail-only, exactly as `content` is:
|
|
2004
|
+
* `displayContent` is the whole file and is absent from every list payload, so
|
|
2005
|
+
* this is never called on a row that came out of a list read.
|
|
2006
|
+
*/
|
|
2007
|
+
declare function handbookPageContent(page: Pick<HandbookPageInterface, "content" | "displayContent">): string;
|
|
2008
|
+
/** The section heading to render, translated when the ingest matched one. */
|
|
2009
|
+
declare function handbookSectionTitle(section: Pick<HandbookSectionInterface, "title" | "displayTitle">): string;
|
|
2010
|
+
/** The section blurb to render, translated when the ingest matched one. */
|
|
2011
|
+
declare function handbookSectionSummary(section: Pick<HandbookSectionInterface, "summary" | "displaySummary">): string | undefined;
|
|
2012
|
+
|
|
2013
|
+
/**
|
|
2014
|
+
* Handbook pages are created by the backend ingest from files, never by a
|
|
2015
|
+
* client. The input therefore carries identity only — it exists so the model
|
|
2016
|
+
* satisfies AbstractApiData's contract, not because anything writes attributes.
|
|
2017
|
+
*/
|
|
2018
|
+
type HandbookPageInput = {
|
|
2019
|
+
id: string;
|
|
2020
|
+
};
|
|
2021
|
+
|
|
2022
|
+
declare class HandbookPage extends AbstractApiData implements HandbookPageInterface {
|
|
2023
|
+
private _path?;
|
|
2024
|
+
private _title?;
|
|
2025
|
+
private _content?;
|
|
2026
|
+
private _contentHash?;
|
|
2027
|
+
private _wordCount?;
|
|
2028
|
+
private _aiStatus?;
|
|
2029
|
+
private _section?;
|
|
2030
|
+
private _order?;
|
|
2031
|
+
private _summary?;
|
|
2032
|
+
private _displayTitle?;
|
|
2033
|
+
private _displaySummary?;
|
|
2034
|
+
private _displayContent?;
|
|
2035
|
+
get path(): string;
|
|
2036
|
+
get title(): string;
|
|
2037
|
+
get content(): string;
|
|
2038
|
+
get contentHash(): string;
|
|
2039
|
+
get wordCount(): number;
|
|
2040
|
+
get aiStatus(): string | undefined;
|
|
2041
|
+
get section(): string;
|
|
2042
|
+
get order(): string;
|
|
2043
|
+
get summary(): string | undefined;
|
|
2044
|
+
get displayTitle(): string | undefined;
|
|
2045
|
+
get displaySummary(): string | undefined;
|
|
2046
|
+
get displayContent(): string | undefined;
|
|
2047
|
+
rehydrate(data: JsonApiHydratedDataInterface): this;
|
|
2048
|
+
createJsonApi(data: HandbookPageInput): any;
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
/**
|
|
2052
|
+
* An ENUM, not a string array: `ContentListTable` indexes its column map by
|
|
2053
|
+
* these members and `useDataListRetriever` keys rows by the id member, exactly
|
|
2054
|
+
* as HowToFields does.
|
|
2055
|
+
*
|
|
2056
|
+
* `content` and `contentHash` are deliberately absent: they are detail-only,
|
|
2057
|
+
* and a list of a thousand markdown files must not carry their bodies.
|
|
2058
|
+
* `displayContent` — the same body in the reader's language — carries the same
|
|
2059
|
+
* caveat: it names the field for the detail read and is deliberately NOT in the
|
|
2060
|
+
* module's list inclusion.
|
|
2061
|
+
*
|
|
2062
|
+
* `section`, `order` and `summary` are list-safe for the opposite reason: they
|
|
2063
|
+
* are the index fields the contents page groups, orders and describes pages by,
|
|
2064
|
+
* so a list that omitted them could not render a table of contents at all.
|
|
2065
|
+
* `displayTitle` and `displaySummary` travel with them: the manual is indexed
|
|
2066
|
+
* in English and shown translated, so the contents page needs both halves.
|
|
2067
|
+
*/
|
|
2068
|
+
declare enum HandbookPageFields {
|
|
2069
|
+
handbookPageId = "handbookPageId",
|
|
2070
|
+
path = "path",
|
|
2071
|
+
title = "title",
|
|
2072
|
+
displayTitle = "displayTitle",
|
|
2073
|
+
section = "section",
|
|
2074
|
+
order = "order",
|
|
2075
|
+
summary = "summary",
|
|
2076
|
+
displaySummary = "displaySummary",
|
|
2077
|
+
displayContent = "displayContent",
|
|
2078
|
+
wordCount = "wordCount",
|
|
2079
|
+
aiStatus = "aiStatus"
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2082
|
+
declare class HandbookPageService extends AbstractService {
|
|
2083
|
+
/**
|
|
2084
|
+
* `next` / `prev` are not optional extras: `useDataListRetriever` drives
|
|
2085
|
+
* pagination by handing the cursor back here, so a findMany that drops them
|
|
2086
|
+
* renders exactly one page and no navigation, however many rows exist.
|
|
2087
|
+
* Mirrors HowToService.findMany.
|
|
2088
|
+
*/
|
|
2089
|
+
static findMany(params?: {
|
|
2090
|
+
search?: string;
|
|
2091
|
+
fetchAll?: boolean;
|
|
2092
|
+
next?: NextRef;
|
|
2093
|
+
prev?: PreviousRef;
|
|
2094
|
+
}): Promise<HandbookPageInterface[]>;
|
|
2095
|
+
static findOne(params: {
|
|
2096
|
+
id: string;
|
|
2097
|
+
}): Promise<HandbookPageInterface>;
|
|
2098
|
+
/** POST /handbookpages/sync — replies 204; the caller refetches the list. */
|
|
2099
|
+
static sync(): Promise<void>;
|
|
2100
|
+
static delete(params: {
|
|
2101
|
+
id: string;
|
|
2102
|
+
}): Promise<void>;
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
/**
|
|
2106
|
+
* Handbook sections are written only by the backend ingest, which replaces
|
|
2107
|
+
* every one of them on each sync. No client ever posts one; this type exists so
|
|
2108
|
+
* the model can satisfy AbstractApiData's `createJsonApi()` contract.
|
|
2109
|
+
*/
|
|
2110
|
+
type HandbookSectionInput = {
|
|
2111
|
+
id: string;
|
|
2112
|
+
key: string;
|
|
2113
|
+
title: string;
|
|
2114
|
+
summary?: string;
|
|
2115
|
+
order: string;
|
|
2116
|
+
};
|
|
2117
|
+
|
|
2118
|
+
declare class HandbookSection extends AbstractApiData implements HandbookSectionInterface {
|
|
2119
|
+
private _key?;
|
|
2120
|
+
private _title?;
|
|
2121
|
+
private _summary?;
|
|
2122
|
+
private _order?;
|
|
2123
|
+
private _displayTitle?;
|
|
2124
|
+
private _displaySummary?;
|
|
2125
|
+
get key(): string;
|
|
2126
|
+
get title(): string;
|
|
2127
|
+
get summary(): string | undefined;
|
|
2128
|
+
get order(): string;
|
|
2129
|
+
get displayTitle(): string | undefined;
|
|
2130
|
+
get displaySummary(): string | undefined;
|
|
2131
|
+
rehydrate(data: JsonApiHydratedDataInterface): this;
|
|
2132
|
+
/**
|
|
2133
|
+
* Nothing calls this: sections are read-only over HTTP and written only by
|
|
2134
|
+
* the ingest. It exists because every model implements `createJsonApi()`, and
|
|
2135
|
+
* a model that throws on serialisation is a trap for the next writer.
|
|
2136
|
+
*/
|
|
2137
|
+
createJsonApi(data: HandbookSectionInput): any;
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
declare class HandbookSectionService extends AbstractService {
|
|
2141
|
+
/**
|
|
2142
|
+
* Every section in one read, always.
|
|
2143
|
+
*
|
|
2144
|
+
* There are as many sections as an application has documentation directories
|
|
2145
|
+
* — ten or so — so this takes no `fetchAll` argument and no cursor: unlike
|
|
2146
|
+
* the page list, nothing here is ever a second page, and a caller that could
|
|
2147
|
+
* ask for one page of sections would only be able to get it wrong.
|
|
2148
|
+
*/
|
|
2149
|
+
static findMany(): Promise<HandbookSectionInterface[]>;
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
/**
|
|
2153
|
+
* One turn of a persisted handbook conversation.
|
|
2154
|
+
*
|
|
2155
|
+
* It extends `AssistantMessageInterface` rather than restating it: the shared
|
|
2156
|
+
* chat components (`AssistantThread` → `MessageList` → `MessageItem`) are typed
|
|
2157
|
+
* against that interface and take their data as plain props, so a handbook
|
|
2158
|
+
* message that satisfies the same structural contract renders through them with
|
|
2159
|
+
* no adapter. Everything the handbook has no concept of — token counts,
|
|
2160
|
+
* references, citations, approval actions — is answered with the empty value.
|
|
2161
|
+
*
|
|
2162
|
+
* `sources` is the handbook's own addition: repo-relative page paths, in the
|
|
2163
|
+
* order retrieval returned them.
|
|
2164
|
+
*/
|
|
2165
|
+
interface HandbookThreadMessageInterface extends AssistantMessageInterface {
|
|
2166
|
+
get sources(): string[];
|
|
2167
|
+
}
|
|
2168
|
+
/**
|
|
2169
|
+
* The payload of one question appended to an existing thread. `id` is the
|
|
2170
|
+
* client-generated identity every model input in this framework carries; the
|
|
2171
|
+
* append endpoint derives role and position server-side, so the envelope the
|
|
2172
|
+
* model builds sends only `question`.
|
|
2173
|
+
*/
|
|
2174
|
+
type HandbookThreadMessageInput = {
|
|
2175
|
+
id: string;
|
|
2176
|
+
question: string;
|
|
2177
|
+
/**
|
|
2178
|
+
* Scopes retrieval to one handbook page. Set only by the reader's ask sheet,
|
|
2179
|
+
* when the reader turns the "this page only" chip on; absent everywhere else,
|
|
2180
|
+
* and the agent then searches the whole manual.
|
|
2181
|
+
*/
|
|
2182
|
+
handbookPageId?: string;
|
|
2183
|
+
};
|
|
2184
|
+
|
|
2185
|
+
/**
|
|
2186
|
+
* A persisted handbook conversation.
|
|
2187
|
+
*
|
|
2188
|
+
* It extends `AssistantInterface` so the shared chat chrome —
|
|
2189
|
+
* `AssistantSidebar`, `AssistantThreadHeader`, `groupThreadsByBucket` — accepts
|
|
2190
|
+
* it verbatim. It is NOT an Assistant: an Assistant is company scoped and a
|
|
2191
|
+
* platform administrator has no company, so the handbook owns its own threads
|
|
2192
|
+
* and answers `engine` / `boundContentType` / `boundContentId` with `undefined`.
|
|
2193
|
+
*/
|
|
2194
|
+
interface HandbookThreadInterface extends AssistantInterface {
|
|
2195
|
+
/** Side-loaded by `GET /handbookthreads/:id`; empty on the list endpoint. */
|
|
2196
|
+
get messages(): HandbookThreadMessageInterface[];
|
|
2197
|
+
}
|
|
2198
|
+
/**
|
|
2199
|
+
* The payload that opens a thread: the first question. The server derives the
|
|
2200
|
+
* title from it, so nothing else is sent.
|
|
2201
|
+
*/
|
|
2202
|
+
type HandbookThreadInput = {
|
|
2203
|
+
id: string;
|
|
2204
|
+
question: string;
|
|
2205
|
+
/**
|
|
2206
|
+
* Scopes retrieval to one handbook page. Set only by the reader's ask sheet,
|
|
2207
|
+
* when the reader turns the "this page only" chip on; absent everywhere else,
|
|
2208
|
+
* and the agent then searches the whole manual.
|
|
2209
|
+
*/
|
|
2210
|
+
handbookPageId?: string;
|
|
2211
|
+
};
|
|
2212
|
+
|
|
2213
|
+
declare class HandbookThread extends AbstractApiData implements HandbookThreadInterface {
|
|
2214
|
+
private _title?;
|
|
2215
|
+
private _messageCount?;
|
|
2216
|
+
private _messages?;
|
|
2217
|
+
get title(): string;
|
|
2218
|
+
get messageCount(): number;
|
|
2219
|
+
/**
|
|
2220
|
+
* The handbook runs one agent and has no engine choice, so nothing routes on
|
|
2221
|
+
* this. It exists because `AssistantInterface` declares it, which is what
|
|
2222
|
+
* lets the shared chat chrome take a handbook thread unchanged.
|
|
2223
|
+
*/
|
|
2224
|
+
get engine(): string | undefined;
|
|
2225
|
+
/** A handbook thread is never bound to a product resource. */
|
|
2226
|
+
get boundContentType(): string | undefined;
|
|
2227
|
+
get boundContentId(): string | undefined;
|
|
2228
|
+
get messages(): HandbookThreadMessageInterface[];
|
|
2229
|
+
rehydrate(data: JsonApiHydratedDataInterface): this;
|
|
2230
|
+
/**
|
|
2231
|
+
* The envelope `POST /handbookthreads` accepts: the opening question. The
|
|
2232
|
+
* server derives the title from it, so no title is sent and no client id —
|
|
2233
|
+
* the thread's identity is the server's to mint.
|
|
2234
|
+
*
|
|
2235
|
+
* `handbookPageId` rides the same way `question` does, through this method
|
|
2236
|
+
* and never through `overridesJsonApiCreation`. It is written only when the
|
|
2237
|
+
* caller supplied it: the DTO takes it as optional, and sending an explicit
|
|
2238
|
+
* `null` would fail validation rather than mean "the whole manual".
|
|
2239
|
+
*/
|
|
2240
|
+
createJsonApi(data: HandbookThreadInput): {
|
|
2241
|
+
data: {
|
|
2242
|
+
type: string;
|
|
2243
|
+
attributes: {
|
|
2244
|
+
handbookPageId?: string | undefined;
|
|
2245
|
+
question: string;
|
|
2246
|
+
};
|
|
2247
|
+
};
|
|
2248
|
+
included: never[];
|
|
2249
|
+
};
|
|
2250
|
+
/**
|
|
2251
|
+
* The envelope `PATCH /handbookthreads/:id` accepts. A dedicated method
|
|
2252
|
+
* rather than a branch inside `createJsonApi`: the rename sends the title and
|
|
2253
|
+
* nothing else, while a create sends the question and nothing else, and the
|
|
2254
|
+
* service must never hand-build either.
|
|
2255
|
+
*/
|
|
2256
|
+
createRenameJsonApi(params: {
|
|
2257
|
+
id: string;
|
|
2258
|
+
title: string;
|
|
2259
|
+
}): {
|
|
2260
|
+
data: {
|
|
2261
|
+
type: string;
|
|
2262
|
+
id: string;
|
|
2263
|
+
attributes: {
|
|
2264
|
+
title: string;
|
|
2265
|
+
};
|
|
2266
|
+
};
|
|
2267
|
+
included: never[];
|
|
2268
|
+
};
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
/**
|
|
2272
|
+
* One persisted handbook turn.
|
|
2273
|
+
*
|
|
2274
|
+
* The getters below are the structural contract `AssistantMessageInterface`
|
|
2275
|
+
* asks for, which is what lets `AssistantThread` render handbook messages with
|
|
2276
|
+
* no adapter. The handbook has no token accounting, no entity references, no
|
|
2277
|
+
* chunk citations and no approval actions, so those answer `undefined` / `[]`
|
|
2278
|
+
* rather than being faked.
|
|
2279
|
+
*/
|
|
2280
|
+
declare class HandbookThreadMessage extends AbstractApiData implements HandbookThreadMessageInterface {
|
|
2281
|
+
private _role?;
|
|
2282
|
+
private _content?;
|
|
2283
|
+
private _position?;
|
|
2284
|
+
private _sources?;
|
|
2285
|
+
private _isOptimistic;
|
|
2286
|
+
get role(): AssistantMessageRole;
|
|
2287
|
+
get content(): string;
|
|
2288
|
+
get position(): number;
|
|
2289
|
+
get sources(): string[];
|
|
2290
|
+
/** The handbook agent returns no follow-ups. */
|
|
2291
|
+
get suggestedQuestions(): string[];
|
|
2292
|
+
/** Token accounting is not billed against a handbook thread. */
|
|
2293
|
+
get inputTokens(): number | undefined;
|
|
2294
|
+
get outputTokens(): number | undefined;
|
|
2295
|
+
/** The handbook answers from pages, never from product entities. */
|
|
2296
|
+
get references(): ApiDataInterface[];
|
|
2297
|
+
/** Cited pages travel in `sources`, not as Chunk resources. */
|
|
2298
|
+
get citations(): (ChunkInterface & ChunkRelationshipMeta)[];
|
|
2299
|
+
/** Set only by `buildLocal`; a rehydrated message is always real. */
|
|
2300
|
+
get isOptimistic(): boolean;
|
|
2301
|
+
/** There is no operator engine behind the handbook, so never an approval request. */
|
|
2302
|
+
get messageType(): AssistantMessageType;
|
|
2303
|
+
get actionId(): string | undefined;
|
|
2304
|
+
rehydrate(data: JsonApiHydratedDataInterface): this;
|
|
2305
|
+
/**
|
|
2306
|
+
* The envelope `POST /handbookthreads/:id/handbookthreadmessages` accepts:
|
|
2307
|
+
* only the question. Role and position are derived server-side from the
|
|
2308
|
+
* thread, and there is no client-chosen id for the pair of messages the turn
|
|
2309
|
+
* creates.
|
|
2310
|
+
*
|
|
2311
|
+
* `handbookPageId` rides the same way `question` does, through this method
|
|
2312
|
+
* and never through `overridesJsonApiCreation`. It is written only when the
|
|
2313
|
+
* caller supplied it: the DTO takes it as optional, and sending an explicit
|
|
2314
|
+
* `null` would fail validation rather than mean "the whole manual".
|
|
2315
|
+
*/
|
|
2316
|
+
createJsonApi(data: HandbookThreadMessageInput): {
|
|
2317
|
+
data: {
|
|
2318
|
+
type: string;
|
|
2319
|
+
attributes: {
|
|
2320
|
+
handbookPageId?: string | undefined;
|
|
2321
|
+
question: string;
|
|
2322
|
+
};
|
|
2323
|
+
};
|
|
2324
|
+
included: never[];
|
|
2325
|
+
};
|
|
2326
|
+
/**
|
|
2327
|
+
* A message that exists only on the client: the optimistic user turn while
|
|
2328
|
+
* the agent runs, and the failure notice when it does not answer. Mirrors
|
|
2329
|
+
* `AssistantMessage.buildLocal`, which the stateless handbook surface used
|
|
2330
|
+
* before threads existed.
|
|
2331
|
+
*/
|
|
2332
|
+
static buildLocal(params: {
|
|
2333
|
+
role: AssistantMessageRole;
|
|
2334
|
+
content: string;
|
|
2335
|
+
position: number;
|
|
2336
|
+
isOptimistic?: boolean;
|
|
2337
|
+
}): HandbookThreadMessage;
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2340
|
+
declare class HandbookThreadMessageService extends AbstractService {
|
|
2341
|
+
/**
|
|
2342
|
+
* Appends one question to an existing thread and runs the agent turn.
|
|
2343
|
+
*
|
|
2344
|
+
* It returns nothing on purpose: the caller reads the turn back with
|
|
2345
|
+
* `HandbookThreadService.findOne`, which is the one endpoint the contract
|
|
2346
|
+
* guarantees side-loads the full message list. That keeps a single code path
|
|
2347
|
+
* for "load the thread after a mutation" — the same one the sidebar's select
|
|
2348
|
+
* uses — instead of two ways of arriving at the transcript.
|
|
2349
|
+
*
|
|
2350
|
+
* The API answers 400 when the installation has no usable AI configuration
|
|
2351
|
+
* and 403 for a non-administrator; both reach the caller as a thrown error.
|
|
2352
|
+
*/
|
|
2353
|
+
static ask(params: HandbookThreadMessageInput & {
|
|
2354
|
+
threadId: string;
|
|
2355
|
+
}): Promise<void>;
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
declare class HandbookThreadService extends AbstractService {
|
|
2359
|
+
/**
|
|
2360
|
+
* `next` / `prev` are not optional extras: `useDataListRetriever` drives
|
|
2361
|
+
* pagination by handing the cursor back here, so a findMany that drops them
|
|
2362
|
+
* renders exactly one page and no navigation, however many rows exist.
|
|
2363
|
+
* Mirrors HowToService.findMany.
|
|
2364
|
+
*/
|
|
2365
|
+
static findMany(params?: {
|
|
2366
|
+
search?: string;
|
|
2367
|
+
fetchAll?: boolean;
|
|
2368
|
+
next?: NextRef;
|
|
2369
|
+
prev?: PreviousRef;
|
|
2370
|
+
}): Promise<HandbookThreadInterface[]>;
|
|
2371
|
+
/** Returns the thread with its messages side-loaded — the sidebar's select. */
|
|
2372
|
+
static findOne(params: {
|
|
2373
|
+
id: string;
|
|
2374
|
+
}): Promise<HandbookThreadInterface>;
|
|
2375
|
+
/**
|
|
2376
|
+
* Opens a thread with its first question. The response is the thread (title
|
|
2377
|
+
* included); the messages are read back with `findOne`, because only the
|
|
2378
|
+
* single-resource endpoint side-loads them.
|
|
2379
|
+
*
|
|
2380
|
+
* The API answers 400 when the installation has no usable AI configuration
|
|
2381
|
+
* and 403 for a non-administrator; both reach the caller as a thrown error.
|
|
2382
|
+
*
|
|
2383
|
+
* `HandbookThreadInput.handbookPageId` scopes retrieval to one page. It rides
|
|
2384
|
+
* through the model's `createJsonApi()`, exactly as `question` does — there is
|
|
2385
|
+
* no `overridesJsonApiCreation` on this path.
|
|
2386
|
+
*/
|
|
2387
|
+
static create(params: HandbookThreadInput): Promise<HandbookThreadInterface>;
|
|
2388
|
+
static rename(params: {
|
|
2389
|
+
id: string;
|
|
2390
|
+
title: string;
|
|
2391
|
+
}): Promise<void>;
|
|
2392
|
+
static delete(params: {
|
|
2393
|
+
id: string;
|
|
2394
|
+
}): Promise<void>;
|
|
2395
|
+
}
|
|
2396
|
+
|
|
1941
2397
|
declare const AssistantModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
1942
2398
|
|
|
1943
2399
|
declare class Assistant extends AbstractApiData implements AssistantInterface {
|
|
@@ -1964,6 +2420,8 @@ declare class Assistant extends AbstractApiData implements AssistantInterface {
|
|
|
1964
2420
|
} | undefined;
|
|
1965
2421
|
type: string;
|
|
1966
2422
|
attributes: {
|
|
2423
|
+
limitToHandbookPageId?: string | undefined;
|
|
2424
|
+
handbookMode?: boolean | undefined;
|
|
1967
2425
|
limitToHowToId?: string | undefined;
|
|
1968
2426
|
howToMode?: boolean | undefined;
|
|
1969
2427
|
title?: string | undefined;
|
|
@@ -2008,6 +2466,8 @@ declare class AssistantService extends AbstractService {
|
|
|
2008
2466
|
content: string;
|
|
2009
2467
|
howToMode?: boolean;
|
|
2010
2468
|
limitToHowToId?: string;
|
|
2469
|
+
handbookMode?: boolean;
|
|
2470
|
+
limitToHandbookPageId?: string;
|
|
2011
2471
|
/** BlockNote document. Serialised by the model into `content`; never its own attribute. */
|
|
2012
2472
|
contentBlocks?: unknown[];
|
|
2013
2473
|
}): Promise<AssistantMessageInterface[]>;
|
|
@@ -2088,11 +2548,15 @@ declare class AssistantMessage extends AbstractApiData implements AssistantMessa
|
|
|
2088
2548
|
content: string;
|
|
2089
2549
|
howToMode?: boolean;
|
|
2090
2550
|
limitToHowToId?: string;
|
|
2551
|
+
handbookMode?: boolean;
|
|
2552
|
+
limitToHandbookPageId?: string;
|
|
2091
2553
|
contentBlocks?: unknown[];
|
|
2092
2554
|
}): {
|
|
2093
2555
|
data: {
|
|
2094
2556
|
type: string;
|
|
2095
2557
|
attributes: {
|
|
2558
|
+
limitToHandbookPageId?: string | undefined;
|
|
2559
|
+
handbookMode?: boolean | undefined;
|
|
2096
2560
|
limitToHowToId?: string | undefined;
|
|
2097
2561
|
howToMode?: boolean | undefined;
|
|
2098
2562
|
content: string;
|
|
@@ -2104,6 +2568,22 @@ declare class AssistantMessage extends AbstractApiData implements AssistantMessa
|
|
|
2104
2568
|
position: number;
|
|
2105
2569
|
assistantId?: string;
|
|
2106
2570
|
}): AssistantMessage;
|
|
2571
|
+
/**
|
|
2572
|
+
* A message that exists only on the client, for a surface that renders the
|
|
2573
|
+
* chat presentation without persisting a thread.
|
|
2574
|
+
*
|
|
2575
|
+
* `buildOptimistic` is the user-turn case and delegates here. The handbook
|
|
2576
|
+
* ask surface is the other caller: it has no Assistant and no stored
|
|
2577
|
+
* messages, but it renders through MessageList/MessageItem like every other
|
|
2578
|
+
* chat in the product, so it needs both roles.
|
|
2579
|
+
*/
|
|
2580
|
+
static buildLocal(params: {
|
|
2581
|
+
role: AssistantMessageRole;
|
|
2582
|
+
content: string;
|
|
2583
|
+
position: number;
|
|
2584
|
+
assistantId?: string;
|
|
2585
|
+
isOptimistic?: boolean;
|
|
2586
|
+
}): AssistantMessage;
|
|
2107
2587
|
}
|
|
2108
2588
|
|
|
2109
2589
|
declare class AssistantMessageService extends AbstractService {
|
|
@@ -2599,4 +3079,4 @@ declare class AuditLogService extends AbstractService {
|
|
|
2599
3079
|
|
|
2600
3080
|
declare const AuditLogModule: (factory: ModuleFactory) => ModuleWithPermissions;
|
|
2601
3081
|
|
|
2602
|
-
export { AbstractApiData, AbstractService, Action, ApiData, ApiDataInterface, ApiRequestDataTypeInterface, ApiResponseInterface, type AppModuleDefinitions, Assistant, AssistantAction, type AssistantActionInput, type AssistantActionInterface, AssistantActionModule, AssistantActionService, type AssistantActionStatus, AssistantInput, AssistantInterface, AssistantMessage, AssistantMessageInput, AssistantMessageInterface, AssistantMessageModule, AssistantMessageRole, AssistantMessageService, AssistantMessageType, AssistantModule, AssistantService, AuditLog, type AuditLogInterface, AuditLogModule, AuditLogService, Auth, AuthInput, AuthInterface, AuthModule, AuthorModule, BackupCodeVerify, type BackupCodeVerifyInput, BackupCodeVerifyModule, Billing, BillingModule, BillingService, type BlockDiffOptions, BlockNoteDiffUtil, BlockNoteWordDiffRendererUtil, CURRENT_USER_STORAGE_KEY, Chunk, type ChunkInput, ChunkInterface, ChunkModule, ChunkRelationshipMeta, ClientAbstractService, ClientHttpMethod, type ClientNextRef, type ClientPreviousRef, type ClientSelfRef, type ClientTotalRef, type CodiceFiscaleValidationOptions, Company, CompanyFields, CompanyInput, CompanyInterface, CompanyModule, Content, ContentInput, ContentInterface, ContentModule, DataClassRegistry as DataClass, DataClassRegistry, type DiffBlock, type DiffResult, ENV, EndpointCreator, type EndpointQuery, EntityAiStatus, type EntityObject, Feature, FeatureInterface, FeatureModule, FieldSelector, type FormatOption, type FoundationModuleDefinitions, HowTo, HowToFields, HowToInput, HowToInterface, HowToModule, HowToService, type InviteValidation, InvoiceStatus, JsonApiDataFactory, JsonApiHydratedDataInterface, MOBILE_BREAKPOINT, MeterInterface, MeterSummaryInterface, Module, type ModuleDefinitions, ModuleFactory, ModuleInterface, ModuleModule, ModulePathsModule, ModuleRegistrar, ModuleRegistry, ModuleWithPermissions, Modules, NextRef, Notification, NotificationFields, NotificationInput, NotificationInterface, NotificationModule, OAuthClient, OAuthClientCreateRequest, OAuthClientCreateResponse, OAuthClientInput, OAuthClientInterface, OAuthConsentInfo, OAuthConsentRequest, OAuthModule, OAuthService, Passkey, PasskeyAuthenticationOptions, type PasskeyAuthenticationOptionsInput, type PasskeyAuthenticationOptionsInterface, PasskeyAuthenticationOptionsModule, PasskeyInterface, PasskeyModule, PasskeyRegistrationOptions, type PasskeyRegistrationOptionsInput, type PasskeyRegistrationOptionsInterface, PasskeyRegistrationOptionsModule, PasskeyRegistrationVerify, type PasskeyRegistrationVerifyInput, PasskeyRegistrationVerifyModule, PasskeyRename, type PasskeyRenameInput, PasskeyRenameModule, PasskeyVerifyLogin, type PasskeyVerifyLoginInput, PasskeyVerifyLoginModule, PaymentMethod, PaymentMethodInterface, PermissionMappingModule, PermissionModule, PermissionUser, PreviousRef, PriceRecurring, PromotionCodeValidationResult, ProrationPreviewInterface, Push, type PushInput, type PushInterface, PushModule, RbacMatrixModule, ReferralModule, ReferralService, ReferralStats, ReferralStatsModule, RehydrationFactory, ReportUsageInput, Role, RoleInput, RoleInterface, RoleModule, S3, S3Input, S3Interface, S3Module, type SearchResultInterface, StripeCustomer, StripeCustomerInterface, StripeCustomerModule, StripeCustomerService, StripeInvoice, StripeInvoiceInterface, StripeInvoiceModule, StripeInvoiceService, StripePaymentMethodModule, StripePrice, StripePriceFields, StripePriceInput, StripePriceInterface, StripePriceModule, StripePriceService, StripeProduct, StripeProductFields, StripeProductInput, StripeProductInterface, StripeProductModule, StripeProductService, StripePromotionCode, StripePromotionCodeModule, StripePromotionCodeService, StripeSubscription, StripeSubscriptionCreateResponse, StripeSubscriptionInput, StripeSubscriptionInterface, StripeSubscriptionModule, StripeSubscriptionService, StripeUsage, StripeUsageInterface, StripeUsageModule, StripeUsageService, SubscriptionStatus, TableOptions, type ToastOptions, TotpAuthenticator, TotpAuthenticatorInterface, TotpAuthenticatorModule, TotpSetup, type TotpSetupInput, type TotpSetupInterface, TotpSetupModule, TotpVerify, type TotpVerifyInput, TotpVerifyLogin, type TotpVerifyLoginInput, TotpVerifyLoginModule, TotpVerifyModule, TwoFactorChallenge, type TwoFactorChallengeInput, TwoFactorChallengeInterface, TwoFactorChallengeModule, TwoFactorEnable, type TwoFactorEnableInput, TwoFactorEnableModule, TwoFactorService, TwoFactorStatus, type TwoFactorStatusInterface, TwoFactorStatusModule, UsageSummaryInterface, User, UserInput, UserInterface, UserModule, type UserObject, VIEWPORT_COOKIE_NAME, Waitlist, type WaitlistInput, type WaitlistInterface, WaitlistModule, WaitlistService, WaitlistStats, type WaitlistStatsInterface, WaitlistStatsModule, type WaitlistStatus, type WordDiff, checkPermissions, checkPermissionsFromServer, cn, composeRefs, dismissToast, entityObjectSchema, exists, formatCodiceFiscale, formatDate, formatLocalDate, formatPartitaIva, getBootstrapper, getClientGlobalErrorHandler, getTableComponents, getTableOptions, getValueFromPath, hasBootstrapper, isRemoteImageSrc, rehydrate, rehydrateList, resetBootstrapStore, setBootstrapper, setClientGlobalErrorHandler, showCustomToast, showError, showToast, translateData, translateResponse, tryBootstrap, useComposedRefs, useIsMobile, userObjectSchema, validateCodiceFiscale, validateItalianTaxCode, validatePartitaIva };
|
|
3082
|
+
export { AbstractApiData, AbstractService, Action, ApiData, ApiDataInterface, ApiRequestDataTypeInterface, ApiResponseInterface, type AppModuleDefinitions, Assistant, AssistantAction, type AssistantActionInput, type AssistantActionInterface, AssistantActionModule, AssistantActionService, type AssistantActionStatus, AssistantInput, AssistantInterface, AssistantMessage, AssistantMessageInput, AssistantMessageInterface, AssistantMessageModule, AssistantMessageRole, AssistantMessageService, AssistantMessageType, AssistantModule, AssistantService, AuditLog, type AuditLogInterface, AuditLogModule, AuditLogService, Auth, AuthInput, AuthInterface, AuthModule, AuthorModule, BackupCodeVerify, type BackupCodeVerifyInput, BackupCodeVerifyModule, Billing, BillingModule, BillingService, type BlockDiffOptions, BlockNoteDiffUtil, BlockNoteWordDiffRendererUtil, CURRENT_USER_STORAGE_KEY, Chunk, type ChunkInput, ChunkInterface, ChunkModule, ChunkRelationshipMeta, ClientAbstractService, ClientHttpMethod, type ClientNextRef, type ClientPreviousRef, type ClientSelfRef, type ClientTotalRef, type CodiceFiscaleValidationOptions, Company, CompanyFields, CompanyInput, CompanyInterface, CompanyModule, Content, ContentInput, ContentInterface, ContentModule, DataClassRegistry as DataClass, DataClassRegistry, type DiffBlock, type DiffResult, ENV, EndpointCreator, type EndpointQuery, EntityAiStatus, type EntityObject, Feature, FeatureInterface, FeatureModule, FieldSelector, type FormatOption, type FoundationModuleDefinitions, HandbookPage, HandbookPageFields, type HandbookPageInput, HandbookPageInterface, HandbookPageModule, HandbookPageService, HandbookSection, type HandbookSectionInput, HandbookSectionInterface, HandbookSectionModule, HandbookSectionService, HandbookThread, type HandbookThreadInput, type HandbookThreadInterface, HandbookThreadMessage, type HandbookThreadMessageInput, type HandbookThreadMessageInterface, HandbookThreadMessageModule, HandbookThreadMessageService, HandbookThreadModule, HandbookThreadService, HowTo, HowToFields, HowToInput, HowToInterface, HowToModule, HowToService, type InviteValidation, InvoiceStatus, JsonApiDataFactory, JsonApiHydratedDataInterface, MOBILE_BREAKPOINT, MeterInterface, MeterSummaryInterface, Module, type ModuleDefinitions, ModuleFactory, ModuleInterface, ModuleModule, ModulePathsModule, ModuleRegistrar, ModuleRegistry, ModuleWithPermissions, Modules, NextRef, Notification, NotificationFields, NotificationInput, NotificationInterface, NotificationModule, OAuthClient, OAuthClientCreateRequest, OAuthClientCreateResponse, OAuthClientInput, OAuthClientInterface, OAuthConsentInfo, OAuthConsentRequest, OAuthModule, OAuthService, Passkey, PasskeyAuthenticationOptions, type PasskeyAuthenticationOptionsInput, type PasskeyAuthenticationOptionsInterface, PasskeyAuthenticationOptionsModule, PasskeyInterface, PasskeyModule, PasskeyRegistrationOptions, type PasskeyRegistrationOptionsInput, type PasskeyRegistrationOptionsInterface, PasskeyRegistrationOptionsModule, PasskeyRegistrationVerify, type PasskeyRegistrationVerifyInput, PasskeyRegistrationVerifyModule, PasskeyRename, type PasskeyRenameInput, PasskeyRenameModule, PasskeyVerifyLogin, type PasskeyVerifyLoginInput, PasskeyVerifyLoginModule, PaymentMethod, PaymentMethodInterface, PermissionMappingModule, PermissionModule, PermissionUser, PreviousRef, PriceRecurring, PromotionCodeValidationResult, ProrationPreviewInterface, Push, type PushInput, type PushInterface, PushModule, RbacMatrixModule, ReferralModule, ReferralService, ReferralStats, ReferralStatsModule, RehydrationFactory, ReportUsageInput, Role, RoleInput, RoleInterface, RoleModule, S3, S3Input, S3Interface, S3Module, type SearchResultInterface, StripeCustomer, StripeCustomerInterface, StripeCustomerModule, StripeCustomerService, StripeInvoice, StripeInvoiceInterface, StripeInvoiceModule, StripeInvoiceService, StripePaymentMethodModule, StripePrice, StripePriceFields, StripePriceInput, StripePriceInterface, StripePriceModule, StripePriceService, StripeProduct, StripeProductFields, StripeProductInput, StripeProductInterface, StripeProductModule, StripeProductService, StripePromotionCode, StripePromotionCodeModule, StripePromotionCodeService, StripeSubscription, StripeSubscriptionCreateResponse, StripeSubscriptionInput, StripeSubscriptionInterface, StripeSubscriptionModule, StripeSubscriptionService, StripeUsage, StripeUsageInterface, StripeUsageModule, StripeUsageService, SubscriptionStatus, TableOptions, type ToastOptions, TotpAuthenticator, TotpAuthenticatorInterface, TotpAuthenticatorModule, TotpSetup, type TotpSetupInput, type TotpSetupInterface, TotpSetupModule, TotpVerify, type TotpVerifyInput, TotpVerifyLogin, type TotpVerifyLoginInput, TotpVerifyLoginModule, TotpVerifyModule, TwoFactorChallenge, type TwoFactorChallengeInput, TwoFactorChallengeInterface, TwoFactorChallengeModule, TwoFactorEnable, type TwoFactorEnableInput, TwoFactorEnableModule, TwoFactorService, TwoFactorStatus, type TwoFactorStatusInterface, TwoFactorStatusModule, UsageSummaryInterface, User, UserInput, UserInterface, UserModule, type UserObject, VIEWPORT_COOKIE_NAME, Waitlist, type WaitlistInput, type WaitlistInterface, WaitlistModule, WaitlistService, WaitlistStats, type WaitlistStatsInterface, WaitlistStatsModule, type WaitlistStatus, type WordDiff, checkPermissions, checkPermissionsFromServer, cn, composeRefs, dismissToast, entityObjectSchema, exists, formatCodiceFiscale, formatDate, formatLocalDate, formatPartitaIva, getBootstrapper, getClientGlobalErrorHandler, getTableComponents, getTableOptions, getValueFromPath, handbookPageContent, handbookPageSummary, handbookPageTitle, handbookSectionSummary, handbookSectionTitle, hasBootstrapper, isRemoteImageSrc, rehydrate, rehydrateList, resetBootstrapStore, setBootstrapper, setClientGlobalErrorHandler, showCustomToast, showError, showToast, translateData, translateResponse, tryBootstrap, useComposedRefs, useIsMobile, userObjectSchema, validateCodiceFiscale, validateItalianTaxCode, validatePartitaIva };
|