UNPKG

@cossistant/next

Version:

Next.js-ready SDK for building AI-powered support/chat widgets. Hooks + primitives, WS-driven, TypeScript-first. Next.js-ready, Tailwind optional.

199 lines 5.95 kB
//#region ../react/src/support/text/locales/keys.d.ts type SupportLocale = "en" | "fr" | "es"; type SupportTimeOfDayToken = "morning" | "afternoon" | "evening"; type SupportTimeOfDayValue = { token: SupportTimeOfDayToken; label: string; }; type SupportTextUtils = { formatNumber: (value: number, options?: Intl.NumberFormatOptions) => string; pluralize: (count: number, options: { one: string; other: string; }) => string; titleCase: (value: string) => string; timeOfDay: () => SupportTimeOfDayValue; }; type SupportTextContext = { website: PublicWebsiteResponse | null; visitor: PublicWebsiteResponse["visitor"] | null; humanAgents: AvailableHumanAgent[]; aiAgents: AvailableAIAgent[]; }; declare const supportTextDefinitions: { readonly "common.actions.askQuestion": { readonly variables: undefined; }; readonly "common.actions.attachFiles": { readonly variables: undefined; }; readonly "common.actions.removeFile": { readonly variables: { readonly fileName: string; }; }; readonly "common.brand.watermark": { readonly variables: undefined; }; readonly "common.fallbacks.aiAssistant": { readonly variables: undefined; }; readonly "common.fallbacks.cossistant": { readonly variables: undefined; }; readonly "common.fallbacks.someone": { readonly variables: undefined; }; readonly "common.fallbacks.supportTeam": { readonly variables: undefined; }; readonly "common.fallbacks.unknown": { readonly variables: undefined; }; readonly "common.fallbacks.you": { readonly variables: undefined; }; readonly "common.labels.aiAgentIndicator": { readonly variables: undefined; }; readonly "common.labels.supportOnline": { readonly variables: undefined; }; readonly "page.conversationHistory.showMore": { readonly variables: { readonly count: number; }; }; readonly "page.conversationHistory.title": { readonly variables: undefined; }; readonly "page.home.greeting": { readonly variables: { readonly visitorName: string | undefined; }; readonly optional: true; }; readonly "page.home.history.more": { readonly variables: { readonly count: number; }; }; readonly "page.home.tagline": { readonly variables: { readonly websiteName: string | null; }; readonly optional: true; }; readonly "component.conversationButtonLink.fallbackTitle": { readonly variables: undefined; }; readonly "component.conversationButtonLink.lastMessage.agent": { readonly variables: { readonly name: string; readonly time: string; }; }; readonly "component.conversationButtonLink.lastMessage.visitor": { readonly variables: { readonly time: string; }; }; readonly "component.conversationButtonLink.typing": { readonly variables: { readonly name: string; }; }; readonly "component.conversationEvent.assigned": { readonly variables: { readonly actorName: string; }; }; readonly "component.conversationEvent.unassigned": { readonly variables: { readonly actorName: string; }; }; readonly "component.conversationEvent.default": { readonly variables: { readonly actorName: string; }; }; readonly "component.conversationEvent.participantJoined": { readonly variables: { readonly actorName: string; }; }; readonly "component.conversationEvent.participantLeft": { readonly variables: { readonly actorName: string; }; }; readonly "component.conversationEvent.participantRequested": { readonly variables: { readonly actorName: string; }; }; readonly "component.conversationEvent.priorityChanged": { readonly variables: { readonly actorName: string; }; }; readonly "component.conversationEvent.reopened": { readonly variables: { readonly actorName: string; }; }; readonly "component.conversationEvent.resolved": { readonly variables: { readonly actorName: string; }; }; readonly "component.conversationEvent.statusChanged": { readonly variables: { readonly actorName: string; }; }; readonly "component.conversationEvent.tagAdded": { readonly variables: { readonly actorName: string; }; }; readonly "component.conversationEvent.tagRemoved": { readonly variables: { readonly actorName: string; }; }; readonly "component.multimodalInput.placeholder": { readonly variables: undefined; }; readonly "component.multimodalInput.remove": { readonly variables: { readonly fileName: string; }; }; readonly "component.navigation.articles": { readonly variables: undefined; }; readonly "component.navigation.home": { readonly variables: undefined; }; readonly "component.message.timestamp.aiIndicator": { readonly variables: undefined; }; }; type SupportTextDefinitions = typeof supportTextDefinitions; type SupportTextKey = keyof SupportTextDefinitions; type SupportTextVariables<K extends SupportTextKey> = SupportTextDefinitions[K]["variables"]; type OptionalFlag<K extends SupportTextKey> = SupportTextDefinitions[K] extends { optional: true; } ? true : false; type MessageVariables<K extends SupportTextKey, Vars = SupportTextVariables<K>> = Vars extends undefined ? undefined : OptionalFlag<K> extends true ? Vars | undefined : Vars; type SupportTextMessage<K extends SupportTextKey, Vars = SupportTextVariables<K>> = string | ((args: { variables: MessageVariables<K, Vars>; context: SupportTextContext; utils: SupportTextUtils; }) => string); type SupportTextContentOverrides<Locale extends string = SupportLocale> = Partial<{ [K in SupportTextKey]: SupportTextMessage<K> | Partial<Record<SupportLocale | Locale, SupportTextMessage<K>>> }>; //#endregion export { SupportLocale, SupportTextContentOverrides }; //# sourceMappingURL=keys.d.ts.map