@bcrumbs.net/inbox 0.0.63 → 0.0.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/assets/ar/inbox.json +40 -6
  2. package/assets/en/inbox.json +40 -6
  3. package/e2e/auth.setup.d.ts +1 -0
  4. package/e2e/checkout/checkout.flows.d.ts +24 -0
  5. package/e2e/global.teardown.d.ts +1 -0
  6. package/e2e/support/auth.d.ts +22 -0
  7. package/e2e/support/cleanup.d.ts +20 -0
  8. package/e2e/support/config.d.ts +23 -0
  9. package/e2e/support/fixtures.d.ts +16 -0
  10. package/e2e/support/identifiers.d.ts +13 -0
  11. package/e2e/support/index.d.ts +6 -0
  12. package/index.cjs.js +39202 -1083
  13. package/index.esm.js +39206 -1088
  14. package/package.json +2 -2
  15. package/playwright.config.d.ts +0 -4
  16. package/src/app/ai/components/Crumby/CrumbyChatError.d.ts +9 -0
  17. package/src/app/ai/components/Crumby/CrumbyChatErrorBoundary.d.ts +13 -0
  18. package/src/app/ai/components/Crumby/CrumbyHeader.d.ts +9 -0
  19. package/src/app/ai/components/Crumby/CrumbyPageContext.d.ts +22 -0
  20. package/src/app/ai/components/Crumby/CrumbyRuntimeProvider.d.ts +9 -0
  21. package/src/app/ai/components/CrumbySettings/CrumbyEditsBanner.d.ts +14 -0
  22. package/src/app/ai/components/CrumbySettings/VoiceSettingsSection.d.ts +9 -0
  23. package/src/app/ai/components/playground/Button.d.ts +1 -1
  24. package/src/app/ai/components/playground/ThreadMessages.d.ts +3 -1
  25. package/src/app/ai/components/playground/TooltipIconButton.d.ts +1 -1
  26. package/src/app/ai/components/sources/mediaTypeForFile.d.ts +8 -0
  27. package/src/app/ai/config/promptSettings.d.ts +31 -0
  28. package/src/app/ai/hooks/usePromptCopilot.d.ts +22 -0
  29. package/src/app/ai/tools/PromptEditorTool.d.ts +2 -0
  30. package/src/app/ai/types/index.d.ts +1 -1
  31. package/src/app/ai/utils/clientToolResubmit.d.ts +8 -0
  32. package/src/app/ai/utils/crumbyChatFetch.d.ts +15 -0
  33. package/src/app/auth/components/AcceptInvitation.d.ts +2 -0
  34. package/src/app/auth/components/AuthLanguagePicker.d.ts +3 -0
  35. package/src/app/auth/components/AuthVisualCarousel.d.ts +1 -0
  36. package/src/app/auth/components/ClerkSessionBridge.d.ts +4 -0
  37. package/src/app/auth/components/password-page/AuthPasswordPageLayout.d.ts +3 -1
  38. package/src/app/auth/components/password-page/PasswordSuccessView.d.ts +2 -1
  39. package/src/app/auth/config/authProvider.d.ts +20 -2
  40. package/src/app/auth/config/clerkAppearance.d.ts +152 -49
  41. package/src/app/auth/config/clerkLocalization.d.ts +6 -0
  42. package/src/app/auth/pages/Auth.style.d.ts +14 -0
  43. package/src/app/auth/pages/Login.d.ts +2 -1
  44. package/src/app/auth/pages/Register.d.ts +1 -0
  45. package/src/app/billing/pages/GatewayWelcomePage.d.ts +5 -0
  46. package/src/app/billing/utils/isGatewayPlan.d.ts +2 -0
  47. package/src/app/broadcast/components/BroadcastAnalysisReciepientsHeader.d.ts +2 -1
  48. package/src/app/broadcast/components/BroadcastDetailsSection.d.ts +3 -1
  49. package/src/app/broadcast/constants.d.ts +2 -0
  50. package/src/app/dashboard/components/AgentCard.d.ts +2 -1
  51. package/src/app/dashboard/components/AgentsCard.d.ts +4 -2
  52. package/src/app/dashboard/components/BroadcastDashboard.d.ts +3 -1
  53. package/src/app/dashboard/components/ChatsByLifeCycleCard.d.ts +13 -0
  54. package/src/app/dashboard/components/DashboardFilters.d.ts +27 -0
  55. package/src/app/dashboard/components/DashboardPdfCaptureArea.d.ts +11 -0
  56. package/src/app/dashboard/components/DashboardPdfExportButton.d.ts +7 -0
  57. package/src/app/dashboard/components/DashboardPdfHeader.d.ts +11 -0
  58. package/src/app/dashboard/components/DashboardSections.d.ts +7 -2
  59. package/src/app/dashboard/components/InboxDashboard.d.ts +3 -1
  60. package/src/app/dashboard/hooks/useDashboardPdfMeta.d.ts +31 -0
  61. package/src/app/dashboard/hooks/useDashboardTabsPdfExport.d.ts +26 -0
  62. package/src/app/dashboard/utils/dashboardReportExports.d.ts +16 -1
  63. package/src/app/dashboard/utils/exportDashboardPdf.d.ts +19 -0
  64. package/src/app/dashboard/utils/lifecycleStages.d.ts +53 -0
  65. package/src/app/dashboard/utils/reportHelpers.d.ts +9 -0
  66. package/src/app/gatewayHome/components/ChecklistStep.d.ts +15 -0
  67. package/src/app/gatewayHome/components/CreditBalanceCard.d.ts +6 -0
  68. package/src/app/gatewayHome/components/MessageStats.d.ts +5 -0
  69. package/src/app/gatewayHome/components/SetupChecklist.d.ts +11 -0
  70. package/src/app/gatewayHome/components/console/QuickstartConsole.d.ts +11 -0
  71. package/src/app/gatewayHome/components/console/RunRequestBar.d.ts +15 -0
  72. package/src/app/gatewayHome/components/console/consoleStyles.d.ts +77 -0
  73. package/src/app/gatewayHome/components/steps/ApiKeyStepBody.d.ts +8 -0
  74. package/src/app/gatewayHome/components/steps/ChannelStepBody.d.ts +3 -0
  75. package/src/app/gatewayHome/components/steps/MetaStepBody.d.ts +6 -0
  76. package/src/app/gatewayHome/components/steps/WebhookStepBody.d.ts +7 -0
  77. package/src/app/gatewayHome/components/styles.d.ts +29 -0
  78. package/src/app/gatewayHome/config/constants.d.ts +22 -0
  79. package/src/app/gatewayHome/hooks/useGatewaySetup.d.ts +59 -0
  80. package/src/app/gatewayHome/hooks/useMessageStats.d.ts +17 -0
  81. package/src/app/gatewayHome/hooks/useQuickstartRequest.d.ts +31 -0
  82. package/src/app/gatewayHome/hooks/useSendableTemplates.d.ts +9 -0
  83. package/src/app/gatewayHome/pages/GatewayHomePage.d.ts +1 -0
  84. package/src/app/gatewayHome/types/index.d.ts +21 -0
  85. package/src/app/gatewayHome/utils/buildRequestBody.d.ts +7 -0
  86. package/src/app/gatewayHome/utils/buildSnippet.d.ts +9 -0
  87. package/src/app/gatewayHome/utils/sendTestMessage.d.ts +3 -0
  88. package/src/app/gatewayHome/utils/setupStorage.d.ts +8 -0
  89. package/src/app/gatewayHome/utils/templateHasParameters.d.ts +6 -0
  90. package/src/app/generic/components/HeaderImageInput.d.ts +3 -1
  91. package/src/app/generic/components/MessagePreview.d.ts +1 -1
  92. package/src/app/generic/components/PreviewHeaderDocument.d.ts +5 -0
  93. package/src/app/generic/hooks/usePaginatedQuery.d.ts +1 -0
  94. package/src/app/generic/utils/chunkErrorRecovery.d.ts +7 -0
  95. package/src/app/generic/utils/onesignal.d.ts +13 -0
  96. package/src/app/inbox/calls/useIncomingCallAlerts.d.ts +2 -0
  97. package/src/app/inbox/components/Calls/ActiveCallControls.d.ts +6 -0
  98. package/src/app/inbox/components/Calls/IncomingCallBanner.d.ts +6 -0
  99. package/src/app/inbox/components/Chat/ChatContent.d.ts +3 -1
  100. package/src/app/inbox/components/Chat/QuickReplyEmpty.d.ts +5 -0
  101. package/src/app/inbox/components/Chat/QuickReplyPickerMenu.d.ts +2 -2
  102. package/src/app/inbox/components/NewDetails/ClientSection.d.ts +3 -1
  103. package/src/app/inbox/components/NewDetails/ContactActionsMenu.d.ts +9 -0
  104. package/src/app/inbox/components/NewDetails/SuggestedAssignee.d.ts +7 -0
  105. package/src/app/inbox/components/NewDetails/SuggestedStage.d.ts +13 -0
  106. package/src/app/inbox/components/NewDetails/SuggestedTags.d.ts +18 -0
  107. package/src/app/inbox/components/NewDetails/SuggestionItems.d.ts +16 -0
  108. package/src/app/inbox/components/NewDetails/UserHeader.d.ts +2 -1
  109. package/src/app/inbox/components/Shared/SharedStyle.d.ts +8 -0
  110. package/src/app/inbox/constants/index.d.ts +1 -0
  111. package/src/app/inbox/context/CallSession.d.ts +16 -0
  112. package/src/app/inbox/context/SuggestionsContext.d.ts +25 -0
  113. package/src/app/inbox/hooks/useAgentSuggestions.d.ts +20 -0
  114. package/src/app/inbox/hooks/useApplySuggestion.d.ts +18 -0
  115. package/src/app/inbox/hooks/useConvEnhance.d.ts +3 -1
  116. package/src/app/inbox/hooks/useConversationsPerodicFetch.d.ts +37 -0
  117. package/src/app/inbox/hooks/useIncomingCallAlerts.d.ts +2 -0
  118. package/src/app/inbox/hooks/useNewSortedEvents.d.ts +1 -1
  119. package/src/app/inbox/hooks/useQuickReplyPicker.d.ts +5 -3
  120. package/src/app/inbox/pages/InboxPage.d.ts +1 -1
  121. package/src/app/inbox/utils/callUi.d.ts +25 -0
  122. package/src/app/inbox/utils/convAssistStorage.d.ts +9 -4
  123. package/src/app/inbox/utils/convSuggestions.d.ts +59 -0
  124. package/src/app/inbox/utils/convSuggestionsStorage.d.ts +20 -0
  125. package/src/app/inbox/utils/convs.d.ts +4 -0
  126. package/src/app/inbox/utils/sounds.d.ts +4 -0
  127. package/src/app/layout/components/LogoutPopin.d.ts +6 -3
  128. package/src/app/layout/components/language/index.d.ts +5 -1
  129. package/src/app/layout/constants/index.d.ts +35 -0
  130. package/src/app/layout/hooks/useCallsEnabled.d.ts +1 -0
  131. package/src/app/layout/hooks/useGatewayPlanEnabled.d.ts +5 -0
  132. package/src/app/layout/hooks/useWebchatEnabled.d.ts +5 -0
  133. package/src/app/managemnet/components/channels/ChannelItem.d.ts +2 -1
  134. package/src/app/managemnet/components/channels/ChannelSettingsDrawer.d.ts +15 -0
  135. package/src/app/managemnet/components/channels/ShareChannelLinkDialog.d.ts +11 -0
  136. package/src/app/managemnet/components/channels/WebChatSnippetBlock.d.ts +7 -0
  137. package/src/app/managemnet/config/webchat.d.ts +5 -0
  138. package/src/app/managemnet/config/webhookDefinition.d.ts +4 -0
  139. package/src/app/managemnet/pages/connectChannel/ConnectChannel.d.ts +2 -0
  140. package/src/app/managemnet/pages/generalSettings/NoiseFilterSettings.d.ts +8 -0
  141. package/src/app/managemnet/pages/generalSettings/WritingAssistanceSettings.d.ts +9 -0
  142. package/src/app/managemnet/pages/generalSettings/holidayConstants.d.ts +5 -0
  143. package/src/app/managemnet/pages/generalSettings/noiseFilterConstants.d.ts +24 -0
  144. package/src/app/managemnet/pages/generalSettings/writingConstants.d.ts +6 -0
  145. package/src/app/managemnet/utils/webChatSnippet.d.ts +2 -0
  146. package/src/app/onboarding/components/OnboardingView.d.ts +3 -1
  147. package/src/app/onboarding/components/useOnboardingChecklist.d.ts +12 -9
  148. package/src/app/onboarding/constants/workspaceProfileOptions.d.ts +30 -0
  149. package/src/app/onboarding/utils/onboardingApi.d.ts +23 -0
  150. package/src/app/onboarding/utils/onboardingChecklistStorage.d.ts +42 -49
  151. package/src/app/resources/components/Agents/CreateAgent.d.ts +7 -3
  152. package/src/app/resources/components/Integrations/ChannelDialogLayout.d.ts +6 -1
  153. package/src/app/resources/components/Integrations/RenderCorrectIntegrationFlow.d.ts +3 -1
  154. package/src/app/resources/components/Integrations/WebChat/index.d.ts +8 -0
  155. package/src/app/resources/components/Integrations/WhatsApp/index.d.ts +1 -0
  156. package/src/app/resources/components/ListResources/Utils.d.ts +1 -0
  157. package/src/app/resources/hooks/useFBPagesHook.d.ts +4 -2
  158. package/src/app/resources/hooks/useWabaHook.d.ts +5 -4
  159. package/src/app/resources/utils/channelSetupTracking.d.ts +21 -0
  160. package/src/app/resources/utils/facebookSdk.d.ts +11 -0
  161. package/src/app/subscriptions/components/NewSubscription/OnboardingStepper.d.ts +2 -2
  162. package/src/app/subscriptions/components/NewSubscription/SubscriptionName.d.ts +2 -0
  163. package/src/app/subscriptions/components/NewSubscription/SubscriptionSuccess.d.ts +3 -1
  164. package/src/app/subscriptions/components/NewSubscription/WorkspaceProfile.d.ts +18 -0
  165. package/src/app/subscriptions/components/NewSubscription/WorkspaceStepLayout.d.ts +5 -2
  166. package/src/app/subscriptions/components/Plans/PlanCard.d.ts +3 -1
  167. package/src/app/subscriptions/components/Plans/ShowcasePlans.d.ts +3 -1
  168. package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionCreditsCard.d.ts +5 -0
  169. package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionProfile.d.ts +0 -1
  170. package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionUsers.d.ts +0 -1
  171. package/src/app/subscriptions/components/SubscriptionSettings/index.d.ts +17 -2
  172. package/src/app/subscriptions/constants/Plans.d.ts +2 -1
  173. package/src/app/subscriptions/hooks/useWorkspaceProfileSubmit.d.ts +12 -0
  174. package/src/app/subscriptions/utils/estimateUpgradeProration.d.ts +7 -0
  175. package/src/app/subscriptions/utils/newWorkspaceContext.d.ts +8 -0
  176. package/src/assets/locales/translations.d.ts +444 -0
  177. package/src/config/constants.d.ts +1 -2
  178. package/src/environments/environment.dev.d.ts +2 -0
  179. package/src/environments/types.d.ts +2 -0
  180. package/src/graphql.autogenerated.d.ts +2718 -22
  181. package/src/graphql.billing.autogenerated.d.ts +193 -0
  182. package/src/lib/index.d.ts +1 -0
  183. package/src/testUtils/bcUiMock.d.ts +16 -0
  184. package/src/utils/colorPool.d.ts +1 -2
  185. package/src/utils/getActiveChannelList.d.ts +6 -1
  186. package/src/utils/globalHelper.d.ts +22 -0
  187. package/src/app/contact/components/ImportProgressDialog.d.ts +0 -13
  188. package/src/app/managemnet/components/channels/EditChannelDialog.d.ts +0 -11
  189. package/src/app/onboarding/utils/onboardingChecklistPersistence.d.ts +0 -18
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bcrumbs.net/inbox",
3
3
  "description": "Inbox widget for Bread Crumbs portals",
4
- "version": "0.0.63",
4
+ "version": "0.0.65",
5
5
  "keyword": [
6
6
  "bcrumbs",
7
7
  "bc-ui",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@bcrumbs.net/bc-shared": "^0.0.11",
28
- "@bcrumbs.net/bc-ui": "^0.0.16",
28
+ "@bcrumbs.net/bc-ui": "^0.0.17",
29
29
  "@bcrumbs.net/bc-api": "^0.0.49",
30
30
  "@azure/storage-blob": "^12.25.0"
31
31
  },
@@ -1,7 +1,3 @@
1
- /**
2
- * Read environment variables from file.
3
- * https://github.com/motdotla/dotenv
4
- */
5
1
  /**
6
2
  * See https://playwright.dev/docs/test-configuration.
7
3
  */
@@ -0,0 +1,9 @@
1
+ import { type FC } from 'react';
2
+ export type CrumbyChatErrorProps = {
3
+ rtl: boolean;
4
+ onClose: () => void;
5
+ /** Starts a fresh chat session in place of the crashed one. */
6
+ onRestart: () => void;
7
+ };
8
+ /** Shown in the Crumby panel when the chat crashed, instead of blanking the portal. */
9
+ export declare const CrumbyChatError: FC<CrumbyChatErrorProps>;
@@ -0,0 +1,13 @@
1
+ import { type ReactElement, type ReactNode } from 'react';
2
+ type RenderFallback = (resetError: () => void) => ReactElement | null;
3
+ type CrumbyChatErrorBoundaryProps = {
4
+ /** Rendered after a crash (null while the panel is closed); `resetError` remounts the children, i.e. a fresh chat runtime. */
5
+ renderFallback: RenderFallback;
6
+ children: ReactNode;
7
+ };
8
+ /**
9
+ * Keeps a Crumby chat render crash (e.g. assistant-ui losing a message mid-render after a
10
+ * failed run) inside the chat panel instead of unmounting the whole portal into a white page.
11
+ */
12
+ export declare const CrumbyChatErrorBoundary: ({ renderFallback, children }: CrumbyChatErrorBoundaryProps) => import("@emotion/react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,9 @@
1
+ import { type FC } from 'react';
2
+ export type CrumbyHeaderProps = {
3
+ rtl: boolean;
4
+ onClose: () => void;
5
+ /** When set, shows a back arrow (e.g. back to the onboarding checklist). */
6
+ onBack?: () => void;
7
+ };
8
+ /** Crumby panel header: optional back arrow, brand, close button. */
9
+ export declare const CrumbyHeader: FC<CrumbyHeaderProps>;
@@ -0,0 +1,22 @@
1
+ import { type MutableRefObject } from 'react';
2
+ import type { PromptSectionChange, PromptSectionsUpdateResult, PromptState } from '../../config/promptSettings';
3
+ /** Lets Crumby read and edit the Prompt settings form while that page is mounted. */
4
+ export type PromptEditorBridge = {
5
+ getSections: () => PromptState;
6
+ applyChanges: (changes: PromptSectionChange[]) => PromptSectionsUpdateResult;
7
+ };
8
+ type CrumbyPageContextValue = {
9
+ /** Ref (not state) so the chat transport always reads the latest page values at send time. */
10
+ promptEditorRef: MutableRefObject<PromptEditorBridge | null>;
11
+ isPromptEditorActive: boolean;
12
+ registerPromptEditor: (bridge: PromptEditorBridge) => () => void;
13
+ /** Increments on every open request; the widget opens its chat when it changes. */
14
+ openRequestId: number;
15
+ requestOpen: () => void;
16
+ };
17
+ /** Shares page-level state between portal pages and the Crumby widget mounted in the layout. */
18
+ export declare const CrumbyPageProvider: ({ children }: {
19
+ children: React.ReactNode;
20
+ }) => import("@emotion/react/jsx-runtime").JSX.Element;
21
+ export declare const useCrumbyPageContext: () => CrumbyPageContextValue;
22
+ export {};
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ type CrumbyRuntimeProviderProps = {
3
+ api: string;
4
+ userId?: string;
5
+ children: React.ReactNode;
6
+ };
7
+ /** Chat runtime for the Crumby widget, wired to the crumby-assist gateway endpoint. */
8
+ export declare const CrumbyRuntimeProvider: ({ api, userId, children }: CrumbyRuntimeProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { PromptKey } from '../../config/promptSettings';
2
+ type CrumbyEditsBannerProps = {
3
+ editedSections: PromptKey[];
4
+ canUndo: boolean;
5
+ onUndo: () => void;
6
+ onDiscard: () => void;
7
+ onSave: () => void;
8
+ saveDisabled: boolean;
9
+ saving: boolean;
10
+ rtl?: boolean;
11
+ };
12
+ /** Tells the user Crumby changed prompt sections and offers save / undo / discard. */
13
+ declare const CrumbyEditsBanner: ({ editedSections, canUndo, onUndo, onDiscard, onSave, saveDisabled, saving, rtl, }: CrumbyEditsBannerProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
14
+ export default CrumbyEditsBanner;
@@ -0,0 +1,9 @@
1
+ type Props = {
2
+ language: string;
3
+ voiceId: string;
4
+ voiceName: string;
5
+ onLanguageChange: (language: string) => void;
6
+ onVoiceChange: (voiceId: string, voiceName: string) => void;
7
+ };
8
+ declare const VoiceSettingsSection: ({ language, voiceId, voiceName, onLanguageChange, onVoiceChange }: Props) => import("@emotion/react/jsx-runtime").JSX.Element;
9
+ export default VoiceSettingsSection;
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  declare const buttonVariants: (props?: ({
4
- variant?: "outline" | "default" | "ghost" | null | undefined;
4
+ variant?: "default" | "outline" | "ghost" | null | undefined;
5
5
  size?: "default" | "icon" | null | undefined;
6
6
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
7
  declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
@@ -1,6 +1,8 @@
1
1
  type ThreadMessagesProps = {
2
2
  /** Overrides the container padding (defaults to 24px) when the parent already provides some (e.g. Crumby ChatView surface). */
3
3
  padding?: string;
4
+ /** Overrides the message-text size for the compact Crumby chat (e.g. `TextSizeRem.XS`). Unset in the playground. */
5
+ fontSize?: string;
4
6
  };
5
- declare const ThreadMessages: ({ padding }: ThreadMessagesProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
+ declare const ThreadMessages: ({ padding, fontSize }: ThreadMessagesProps) => import("@emotion/react/jsx-runtime").JSX.Element;
6
8
  export default ThreadMessages;
@@ -5,7 +5,7 @@ export type TooltipIconButtonProps = ComponentPropsWithoutRef<typeof Button> & {
5
5
  side?: "top" | "bottom" | "left" | "right";
6
6
  };
7
7
  export declare const TooltipIconButton: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("class-variance-authority").VariantProps<(props?: ({
8
- variant?: "outline" | "default" | "ghost" | null | undefined;
8
+ variant?: "default" | "outline" | "ghost" | null | undefined;
9
9
  size?: "default" | "icon" | null | undefined;
10
10
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & {
11
11
  asChild?: boolean | undefined;
@@ -0,0 +1,8 @@
1
+ import { MediaType } from '../../../../graphql.autogenerated';
2
+ interface UploadType {
3
+ mediaType: MediaType;
4
+ contentType: string;
5
+ }
6
+ export declare function uploadTypeForFile(fileName: string): UploadType;
7
+ export declare function fileWithContentType(file: File, contentType: string): File;
8
+ export {};
@@ -0,0 +1,31 @@
1
+ import type { ConfigurationsInput } from '../../../graphql.autogenerated';
2
+ export type PromptKey = 'contextPrompt' | 'rolePrompt' | 'personaPrompt' | 'workflowPrompt' | 'constraints';
3
+ export type PromptState = Record<PromptKey, string>;
4
+ export type PromptSectionChange = {
5
+ section: PromptKey;
6
+ value: string;
7
+ };
8
+ export type PromptSectionsUpdateResult = {
9
+ ok: true;
10
+ updatedSections: PromptKey[];
11
+ } | {
12
+ ok: false;
13
+ error: string;
14
+ };
15
+ export declare const PROMPT_FIELDS: PromptKey[];
16
+ export declare const PROMPT_CHARACTER_LIMITS: Record<PromptKey, number>;
17
+ export declare const EMPTY_PROMPTS: PromptState;
18
+ /** Must match PROMPT_EDITOR_PAGE / UPDATE_PROMPT_SECTIONS_TOOL in the bot's crumby-assistance prompt editor. */
19
+ export declare const PROMPT_EDITOR_PAGE = "aiPromptSettings";
20
+ export declare const UPDATE_PROMPT_SECTIONS_TOOL = "updatePromptSections";
21
+ export declare const isPromptKey: (value: unknown) => value is PromptKey;
22
+ export declare const getPromptState: (configuration?: {
23
+ contextPrompt?: string | null | undefined;
24
+ rolePrompt?: string | null | undefined;
25
+ personaPrompt?: string | null | undefined;
26
+ workflowPrompt?: string | null | undefined;
27
+ constraints?: string | null | undefined;
28
+ } | null | undefined) => PromptState;
29
+ export declare const getPromptConfigurationInput: (prompts: PromptState) => Pick<ConfigurationsInput, PromptKey>;
30
+ /** Validates Crumby's proposed section changes; returns an error message the model can act on, or null. */
31
+ export declare const validatePromptSectionChanges: (changes: unknown) => string | null;
@@ -0,0 +1,22 @@
1
+ import { type Dispatch, type SetStateAction } from 'react';
2
+ import { type PromptKey, type PromptState } from '../config/promptSettings';
3
+ type UsePromptCopilotOptions = {
4
+ prompts: PromptState;
5
+ setPrompts: Dispatch<SetStateAction<PromptState>>;
6
+ /** Last saved values; a new object here (save / refetch) resets Crumby's edit history. */
7
+ savedPrompts: PromptState;
8
+ /** Register with Crumby only once the saved values are loaded, so loading can't overwrite edits. */
9
+ enabled: boolean;
10
+ };
11
+ /**
12
+ * Connects the Prompt settings form to Crumby: Crumby's edits land as unsaved changes
13
+ * that the user can save, undo step by step, revert per section, or discard.
14
+ */
15
+ declare const usePromptCopilot: ({ prompts, setPrompts, savedPrompts, enabled }: UsePromptCopilotOptions) => {
16
+ crumbyEditedSections: PromptKey[];
17
+ canUndo: boolean;
18
+ undoLast: () => void;
19
+ revertSection: (key: PromptKey) => void;
20
+ discardAll: () => void;
21
+ };
22
+ export default usePromptCopilot;
@@ -0,0 +1,2 @@
1
+ /** Registers the client-executed tool that writes Crumby's edits into the Prompt settings form. */
2
+ export declare const PromptEditorTool: () => null;
@@ -43,7 +43,7 @@ export interface SourcesSummary {
43
43
  size: number;
44
44
  };
45
45
  }
46
- export type SupportedFileType = 'TXT' | 'MD' | 'JSON' | 'HTML';
46
+ export type SupportedFileType = 'TXT' | 'MD' | 'JSON' | 'HTML' | 'PDF';
47
47
  export interface FileValidationResult {
48
48
  isValid: boolean;
49
49
  error?: string;
@@ -0,0 +1,8 @@
1
+ import { type UIMessage } from 'ai';
2
+ /**
3
+ * `sendAutomaticallyWhen` for the Crumby chat: resubmit only after our client tool produced its output.
4
+ * Server tools finish inside the same request, so resubmitting for them would loop.
5
+ */
6
+ export declare const shouldResubmitAfterClientTool: ({ messages }: {
7
+ messages: UIMessage[];
8
+ }) => boolean;
@@ -0,0 +1,15 @@
1
+ type FetchFn = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
2
+ type CrumbyChatFetchOptions = {
3
+ /** Token for each request; defaults to the live Clerk JWT, falling back to the stored token. */
4
+ getToken?: () => Promise<string | null | undefined>;
5
+ /** Forced refresh used once after a 401. */
6
+ refreshToken?: () => Promise<string | null>;
7
+ fetchImpl?: FetchFn;
8
+ };
9
+ /**
10
+ * Fetch for the Crumby chat transport. The chat runtime is created once and outlives the
11
+ * short-lived (~60s) Clerk JWT, so the token is read per request instead of being baked
12
+ * into the transport headers. A 401 gets one retry with a force-refreshed token.
13
+ */
14
+ export declare const createCrumbyChatFetch: ({ getToken, refreshToken, fetchImpl, }?: CrumbyChatFetchOptions) => FetchFn;
15
+ export {};
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,3 @@
1
+ /** Top-corner language control for unauthenticated auth screens. */
2
+ export declare function AuthLanguagePicker(): import("@emotion/react/jsx-runtime").JSX.Element;
3
+ export default AuthLanguagePicker;
@@ -0,0 +1 @@
1
+ export declare const AuthVisualCarousel: () => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -2,6 +2,10 @@
2
2
  * Keeps localStorage.token in sync with the Clerk session JWT so Apollo handleAuth
3
3
  * and BCRoutesGuard continue to work without per-client changes.
4
4
  *
5
+ * Clerk session *tokens* stay short-lived (~60s default). The Clerk *session*
6
+ * (cookie) is configured for 30 days in the Clerk Dashboard. This bridge refreshes
7
+ * the JWT in place and does not treat JWT expiry as logout.
8
+ *
5
9
  * Prefer the AspNetUsers id returned by /auth/authorize so the rest of the portal
6
10
  * keeps seeing the same user id shape as legacy login.
7
11
  *
@@ -2,6 +2,8 @@ import { ReactNode } from 'react';
2
2
  type AuthPasswordPageLayoutProps = {
3
3
  children: ReactNode;
4
4
  backgroundImage?: string;
5
+ cardMaxWidth?: number;
6
+ showLanguagePicker?: boolean;
5
7
  };
6
- export declare function AuthPasswordPageLayout({ children, backgroundImage }: AuthPasswordPageLayoutProps): import("@emotion/react/jsx-runtime").JSX.Element;
8
+ export declare function AuthPasswordPageLayout({ children, backgroundImage, cardMaxWidth, showLanguagePicker, }: AuthPasswordPageLayoutProps): import("@emotion/react/jsx-runtime").JSX.Element;
7
9
  export {};
@@ -3,6 +3,7 @@ type PasswordSuccessViewProps = {
3
3
  subtitle: string;
4
4
  actionLabel?: string;
5
5
  onAction?: () => void;
6
+ hideIcon?: boolean;
6
7
  };
7
- export declare function PasswordSuccessView({ title, subtitle, actionLabel, onAction }: PasswordSuccessViewProps): import("@emotion/react/jsx-runtime").JSX.Element;
8
+ export declare function PasswordSuccessView({ title, subtitle, actionLabel, onAction, hideIcon }: PasswordSuccessViewProps): import("@emotion/react/jsx-runtime").JSX.Element;
8
9
  export {};
@@ -1,4 +1,13 @@
1
1
  import type { AuthProvider } from '../../../environments/types';
2
+ export declare const CLERK_ENABLED_FLAG = "clerk_enabled";
3
+ /**
4
+ * Pin the Clerk JS bundle to one version so the main script and the lazy chunks
5
+ * it loads always come from the same build. Without a pin, clerk-react asks the
6
+ * CDN for the floating `@5` script while that script requests version-pinned
7
+ * chunks; any drift makes the chunk fetch fail with ChunkLoadError. Keep this at
8
+ * the latest Clerk JS v5, which matches @clerk/clerk-react v5.
9
+ */
10
+ export declare const CLERK_JS_VERSION = "5.127.2";
2
11
  /**
3
12
  * Selects the frontend auth UI provider. Runtime window._env_ overrides build-time
4
13
  * environment so deployments can flip without a rebuild.
@@ -6,7 +15,16 @@ import type { AuthProvider } from '../../../environments/types';
6
15
  export declare function getAuthProvider(): AuthProvider;
7
16
  export declare function getClerkPublishableKey(): string | undefined;
8
17
  /**
9
- * Clerk UI is only mounted when selected and a publishable key is present, matching
10
- * the auth service's isClerkEnabled() gate.
18
+ * Clerk UI is mounted when a publishable key is present and the PostHog
19
+ * `clerk_enabled` boolean flag is true. Without PostHog, falls back to AUTH_PROVIDER.
11
20
  */
12
21
  export declare function isClerkAuthEnabled(): boolean;
22
+ export type ClerkAuthGate = {
23
+ ready: boolean;
24
+ enabled: boolean;
25
+ };
26
+ /**
27
+ * Subscribes to PostHog feature flags so Clerk vs legacy UI updates when
28
+ * `clerk_enabled` loads or changes. When PostHog is off, `ready` is immediate.
29
+ */
30
+ export declare function useClerkAuthEnabled(): ClerkAuthGate;