@bcrumbs.net/inbox 0.0.64 → 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.
- package/assets/ar/inbox.json +37 -6
- package/assets/en/inbox.json +37 -6
- package/e2e/checkout/checkout.flows.d.ts +6 -0
- package/e2e/support/auth.d.ts +7 -3
- package/index.cjs.js +38317 -1108
- package/index.esm.js +38320 -1111
- package/package.json +1 -1
- package/src/app/ai/components/Crumby/CrumbyChatError.d.ts +9 -0
- package/src/app/ai/components/Crumby/CrumbyChatErrorBoundary.d.ts +13 -0
- package/src/app/ai/components/Crumby/CrumbyHeader.d.ts +9 -0
- package/src/app/ai/components/Crumby/CrumbyPageContext.d.ts +22 -0
- package/src/app/ai/components/Crumby/CrumbyRuntimeProvider.d.ts +9 -0
- package/src/app/ai/components/CrumbySettings/CrumbyEditsBanner.d.ts +14 -0
- package/src/app/ai/components/CrumbySettings/VoiceSettingsSection.d.ts +9 -0
- package/src/app/ai/components/playground/Button.d.ts +1 -1
- package/src/app/ai/components/playground/TooltipIconButton.d.ts +1 -1
- package/src/app/ai/components/sources/mediaTypeForFile.d.ts +8 -0
- package/src/app/ai/config/promptSettings.d.ts +31 -0
- package/src/app/ai/hooks/usePromptCopilot.d.ts +22 -0
- package/src/app/ai/tools/PromptEditorTool.d.ts +2 -0
- package/src/app/ai/types/index.d.ts +1 -1
- package/src/app/ai/utils/clientToolResubmit.d.ts +8 -0
- package/src/app/ai/utils/crumbyChatFetch.d.ts +15 -0
- package/src/app/auth/components/password-page/AuthPasswordPageLayout.d.ts +3 -1
- package/src/app/auth/components/password-page/PasswordSuccessView.d.ts +2 -1
- package/src/app/auth/config/authProvider.d.ts +20 -2
- package/src/app/auth/config/clerkAppearance.d.ts +51 -52
- package/src/app/auth/pages/Login.d.ts +1 -1
- package/src/app/auth/pages/Register.d.ts +1 -0
- package/src/app/billing/pages/GatewayWelcomePage.d.ts +4 -1
- package/src/app/broadcast/components/BroadcastAnalysisReciepientsHeader.d.ts +2 -1
- package/src/app/broadcast/components/BroadcastDetailsSection.d.ts +3 -1
- package/src/app/dashboard/components/AgentCard.d.ts +2 -1
- package/src/app/dashboard/components/AgentsCard.d.ts +4 -2
- package/src/app/dashboard/components/BroadcastDashboard.d.ts +3 -1
- package/src/app/dashboard/components/ChatsByLifeCycleCard.d.ts +13 -0
- package/src/app/dashboard/components/DashboardFilters.d.ts +27 -0
- package/src/app/dashboard/components/DashboardPdfCaptureArea.d.ts +11 -0
- package/src/app/dashboard/components/DashboardPdfExportButton.d.ts +7 -0
- package/src/app/dashboard/components/DashboardPdfHeader.d.ts +11 -0
- package/src/app/dashboard/components/DashboardSections.d.ts +7 -2
- package/src/app/dashboard/components/InboxDashboard.d.ts +3 -1
- package/src/app/dashboard/hooks/useDashboardPdfMeta.d.ts +31 -0
- package/src/app/dashboard/hooks/useDashboardTabsPdfExport.d.ts +26 -0
- package/src/app/dashboard/utils/dashboardReportExports.d.ts +16 -1
- package/src/app/dashboard/utils/exportDashboardPdf.d.ts +19 -0
- package/src/app/dashboard/utils/lifecycleStages.d.ts +53 -0
- package/src/app/dashboard/utils/reportHelpers.d.ts +9 -0
- package/src/app/gatewayHome/components/ChecklistStep.d.ts +15 -0
- package/src/app/gatewayHome/components/CreditBalanceCard.d.ts +6 -0
- package/src/app/gatewayHome/components/MessageStats.d.ts +5 -0
- package/src/app/gatewayHome/components/SetupChecklist.d.ts +11 -0
- package/src/app/gatewayHome/components/console/QuickstartConsole.d.ts +11 -0
- package/src/app/gatewayHome/components/console/RunRequestBar.d.ts +15 -0
- package/src/app/gatewayHome/components/console/consoleStyles.d.ts +77 -0
- package/src/app/gatewayHome/components/steps/ApiKeyStepBody.d.ts +8 -0
- package/src/app/gatewayHome/components/steps/ChannelStepBody.d.ts +3 -0
- package/src/app/gatewayHome/components/steps/MetaStepBody.d.ts +6 -0
- package/src/app/gatewayHome/components/steps/WebhookStepBody.d.ts +7 -0
- package/src/app/gatewayHome/components/styles.d.ts +29 -0
- package/src/app/gatewayHome/config/constants.d.ts +22 -0
- package/src/app/gatewayHome/hooks/useGatewaySetup.d.ts +59 -0
- package/src/app/gatewayHome/hooks/useMessageStats.d.ts +17 -0
- package/src/app/gatewayHome/hooks/useQuickstartRequest.d.ts +31 -0
- package/src/app/gatewayHome/hooks/useSendableTemplates.d.ts +9 -0
- package/src/app/gatewayHome/pages/GatewayHomePage.d.ts +1 -0
- package/src/app/gatewayHome/types/index.d.ts +21 -0
- package/src/app/gatewayHome/utils/buildRequestBody.d.ts +7 -0
- package/src/app/gatewayHome/utils/buildSnippet.d.ts +9 -0
- package/src/app/gatewayHome/utils/sendTestMessage.d.ts +3 -0
- package/src/app/gatewayHome/utils/setupStorage.d.ts +8 -0
- package/src/app/gatewayHome/utils/templateHasParameters.d.ts +6 -0
- package/src/app/generic/components/HeaderImageInput.d.ts +3 -1
- package/src/app/generic/components/MessagePreview.d.ts +1 -1
- package/src/app/generic/components/PreviewHeaderDocument.d.ts +5 -0
- package/src/app/generic/utils/chunkErrorRecovery.d.ts +7 -0
- package/src/app/generic/utils/onesignal.d.ts +13 -0
- package/src/app/inbox/calls/useIncomingCallAlerts.d.ts +2 -0
- package/src/app/inbox/components/Calls/ActiveCallControls.d.ts +6 -0
- package/src/app/inbox/components/Calls/IncomingCallBanner.d.ts +6 -0
- package/src/app/inbox/components/Chat/QuickReplyEmpty.d.ts +5 -0
- package/src/app/inbox/components/Chat/QuickReplyPickerMenu.d.ts +2 -2
- package/src/app/inbox/components/NewDetails/ClientSection.d.ts +3 -1
- package/src/app/inbox/components/NewDetails/SuggestedAssignee.d.ts +7 -0
- package/src/app/inbox/components/NewDetails/SuggestedStage.d.ts +13 -0
- package/src/app/inbox/components/NewDetails/SuggestedTags.d.ts +18 -0
- package/src/app/inbox/components/NewDetails/SuggestionItems.d.ts +16 -0
- package/src/app/inbox/constants/index.d.ts +1 -0
- package/src/app/inbox/context/CallSession.d.ts +16 -0
- package/src/app/inbox/context/SuggestionsContext.d.ts +25 -0
- package/src/app/inbox/hooks/useAgentSuggestions.d.ts +20 -0
- package/src/app/inbox/hooks/useApplySuggestion.d.ts +18 -0
- package/src/app/inbox/hooks/useConversationsPerodicFetch.d.ts +30 -0
- package/src/app/inbox/hooks/useIncomingCallAlerts.d.ts +2 -0
- package/src/app/inbox/hooks/useNewSortedEvents.d.ts +1 -1
- package/src/app/inbox/hooks/useQuickReplyPicker.d.ts +5 -3
- package/src/app/inbox/pages/InboxPage.d.ts +1 -1
- package/src/app/inbox/utils/callUi.d.ts +25 -0
- package/src/app/inbox/utils/convSuggestions.d.ts +59 -0
- package/src/app/inbox/utils/convSuggestionsStorage.d.ts +20 -0
- package/src/app/inbox/utils/sounds.d.ts +2 -0
- package/src/app/layout/hooks/useCallsEnabled.d.ts +1 -0
- package/src/app/layout/hooks/useGatewayPlanEnabled.d.ts +5 -0
- package/src/app/layout/hooks/useWebchatEnabled.d.ts +5 -0
- package/src/app/managemnet/components/channels/ChannelItem.d.ts +2 -1
- package/src/app/managemnet/components/channels/ChannelSettingsDrawer.d.ts +15 -0
- package/src/app/managemnet/components/channels/ShareChannelLinkDialog.d.ts +11 -0
- package/src/app/managemnet/components/channels/WebChatSnippetBlock.d.ts +7 -0
- package/src/app/managemnet/config/webchat.d.ts +5 -0
- package/src/app/managemnet/pages/connectChannel/ConnectChannel.d.ts +2 -0
- package/src/app/managemnet/pages/generalSettings/NoiseFilterSettings.d.ts +8 -0
- package/src/app/managemnet/pages/generalSettings/noiseFilterConstants.d.ts +24 -0
- package/src/app/managemnet/utils/webChatSnippet.d.ts +2 -0
- package/src/app/onboarding/components/OnboardingView.d.ts +3 -1
- package/src/app/onboarding/components/useOnboardingChecklist.d.ts +12 -9
- package/src/app/onboarding/constants/workspaceProfileOptions.d.ts +30 -0
- package/src/app/onboarding/utils/onboardingApi.d.ts +23 -0
- package/src/app/onboarding/utils/onboardingChecklistStorage.d.ts +42 -49
- package/src/app/resources/components/Integrations/ChannelDialogLayout.d.ts +6 -1
- package/src/app/resources/components/Integrations/RenderCorrectIntegrationFlow.d.ts +3 -1
- package/src/app/resources/components/Integrations/WebChat/index.d.ts +8 -0
- package/src/app/resources/components/Integrations/WhatsApp/index.d.ts +1 -0
- package/src/app/resources/hooks/useFBPagesHook.d.ts +4 -2
- package/src/app/resources/hooks/useWabaHook.d.ts +5 -4
- package/src/app/resources/utils/channelSetupTracking.d.ts +21 -0
- package/src/app/resources/utils/facebookSdk.d.ts +11 -0
- package/src/app/subscriptions/components/NewSubscription/OnboardingStepper.d.ts +2 -2
- package/src/app/subscriptions/components/NewSubscription/SubscriptionName.d.ts +2 -0
- package/src/app/subscriptions/components/NewSubscription/WorkspaceProfile.d.ts +18 -0
- package/src/app/subscriptions/components/NewSubscription/WorkspaceStepLayout.d.ts +5 -2
- package/src/app/subscriptions/hooks/useWorkspaceProfileSubmit.d.ts +12 -0
- package/src/app/subscriptions/utils/newWorkspaceContext.d.ts +8 -0
- package/src/assets/locales/translations.d.ts +319 -20
- package/src/config/constants.d.ts +1 -2
- package/src/graphql.autogenerated.d.ts +1907 -117
- package/src/testUtils/bcUiMock.d.ts +16 -0
- package/src/utils/colorPool.d.ts +1 -2
- package/src/utils/getActiveChannelList.d.ts +6 -1
- package/src/utils/globalHelper.d.ts +22 -0
- package/src/app/billing/pages/GuidePage.d.ts +0 -1
- package/src/app/contact/components/ImportProgressDialog.d.ts +0 -14
- package/src/app/managemnet/components/channels/EditChannelDialog.d.ts +0 -11
- package/src/app/onboarding/utils/onboardingChecklistPersistence.d.ts +0 -18
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ClientSuggestionsPayload, ConvSuggestionsPayload } from '../../../graphql.autogenerated';
|
|
2
|
+
/** Conversations kept per workspace; the least recently used are dropped first. */
|
|
3
|
+
export declare const MAX_CACHED_CONVERSATIONS = 100;
|
|
4
|
+
/** Cached suggestions older than this are fetched again even if no new messages arrived. */
|
|
5
|
+
export declare const SUGGESTIONS_CACHE_TTL_MS: number;
|
|
6
|
+
export type CachedSuggestions = {
|
|
7
|
+
/** Message bucket the suggestions were fetched for (see getSuggestionsBucket). */
|
|
8
|
+
bucket: number;
|
|
9
|
+
savedAt: number;
|
|
10
|
+
conversation: ConvSuggestionsPayload | null;
|
|
11
|
+
client: ClientSuggestionsPayload | null;
|
|
12
|
+
/** Suggestion keys the agent dismissed or applied in this conversation. */
|
|
13
|
+
hidden: string[];
|
|
14
|
+
};
|
|
15
|
+
/** The cached entry for a conversation (any bucket), used to restore dismissed suggestions. */
|
|
16
|
+
export declare function readCachedConversation(workspaceId: number, convId: string): CachedSuggestions | undefined;
|
|
17
|
+
/** Cached suggestions for this exact message bucket, if still fresh. */
|
|
18
|
+
export declare function readCachedSuggestions(workspaceId: number, convId: string, bucket: number, now?: number): CachedSuggestions | undefined;
|
|
19
|
+
export declare function saveSuggestions(workspaceId: number, convId: string, result: Pick<CachedSuggestions, 'bucket' | 'conversation' | 'client'>, now?: number): void;
|
|
20
|
+
export declare function saveHidden(workspaceId: number, convId: string, hidden: string[], now?: number): void;
|
|
@@ -2,3 +2,5 @@ export declare function setInboxAudioBaseUrl(baseUrl?: string | null): void;
|
|
|
2
2
|
export declare function getInboxAudioBaseUrl(): string;
|
|
3
3
|
export declare function playRecMessageSound(): void;
|
|
4
4
|
export declare function playSendMessageSound(): void;
|
|
5
|
+
export declare function playIncomingCallSound(): void;
|
|
6
|
+
export declare function stopIncomingCallSound(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useCallsEnabled: () => boolean;
|
|
@@ -5,7 +5,8 @@ interface ChannelItemProps {
|
|
|
5
5
|
identifier?: string;
|
|
6
6
|
onDelete: (id: string) => void;
|
|
7
7
|
onEdit: (id: string) => void;
|
|
8
|
+
onAssign: (id: string) => void;
|
|
8
9
|
rtl?: boolean;
|
|
9
10
|
}
|
|
10
|
-
declare const ChannelItem: ({ id, name, date, identifier, onDelete, onEdit, rtl }: ChannelItemProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const ChannelItem: ({ id, name, date, identifier, onDelete, onEdit, onAssign, rtl }: ChannelItemProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
12
|
export default ChannelItem;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Tabs of the channel settings drawer. `assign` holds the conversation routing settings. */
|
|
2
|
+
export type ChannelSettingsTab = 'general' | 'assign';
|
|
3
|
+
type ChannelSettingsDrawerProps = {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onSuccess: () => void;
|
|
7
|
+
channelId: string;
|
|
8
|
+
channelType: string;
|
|
9
|
+
channelTypeName: string;
|
|
10
|
+
/** Tab the drawer opens on: `general` for the Edit action, `assign` for the Assign action. */
|
|
11
|
+
initialTab?: ChannelSettingsTab;
|
|
12
|
+
rtl?: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare const ChannelSettingsDrawer: ({ isOpen, onClose, onSuccess, channelId, channelType, channelTypeName, initialTab, rtl, }: ChannelSettingsDrawerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default ChannelSettingsDrawer;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface ShareChannelLinkDialogProps {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
url: string | null;
|
|
4
|
+
loading: boolean;
|
|
5
|
+
channelTypeName: string;
|
|
6
|
+
onBack: () => void;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
rtl?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const ShareChannelLinkDialog: ({ isOpen, url, loading, channelTypeName, onBack, onClose, rtl, }: ShareChannelLinkDialogProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default ShareChannelLinkDialog;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type WebChatSnippetBlockProps = {
|
|
2
|
+
/** Script tag from buildWebChatSnippet. */
|
|
3
|
+
snippet: string;
|
|
4
|
+
};
|
|
5
|
+
/** Embed snippet for a new web chat channel, with a copy button. */
|
|
6
|
+
declare const WebChatSnippetBlock: ({ snippet }: WebChatSnippetBlockProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default WebChatSnippetBlock;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Script-tag web chat bundle (packages/websdk → script/bc-sdk.js), used in the embed snippet shown
|
|
3
|
+
* after creating a web chat channel. Not hosted yet: point this at the final host.
|
|
4
|
+
*/
|
|
5
|
+
export declare const WEBCHAT_SDK_URL = "https://gateway.bcrumbs.net/channels/bc-sdk.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type NoiseFilterFormState } from './noiseFilterConstants';
|
|
2
|
+
export type NoiseFilterSettingsProps = {
|
|
3
|
+
loading: boolean;
|
|
4
|
+
value: NoiseFilterFormState;
|
|
5
|
+
onChange: (next: NoiseFilterFormState) => void;
|
|
6
|
+
};
|
|
7
|
+
declare const NoiseFilterSettings: ({ loading, value, onChange }: NoiseFilterSettingsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default NoiseFilterSettings;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const DEFAULT_RULES_THRESHOLD = 0.9;
|
|
2
|
+
export declare const DEFAULT_SPAM_HIGH_THRESHOLD = 0.85;
|
|
3
|
+
export declare const DEFAULT_BORDERLINE_BAND = 0.1;
|
|
4
|
+
export declare const DEFAULT_HIGH_INTENT_THRESHOLD = 0.7;
|
|
5
|
+
export declare const DEFAULT_MAX_LINKS_PER_MESSAGE = 3;
|
|
6
|
+
export declare const DEFAULT_DENY_PATTERNS: readonly [string, string, string];
|
|
7
|
+
/** Same text the bot uses when triagePrompt is empty. */
|
|
8
|
+
export declare const DEFAULT_NOISE_FILTER_TRIAGE_PROMPT: string;
|
|
9
|
+
export type NoiseFilterFormState = {
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
rulesThreshold: number;
|
|
12
|
+
spamHighThreshold: number;
|
|
13
|
+
borderlineBand: number;
|
|
14
|
+
highIntentThreshold: number;
|
|
15
|
+
triagePrompt: string;
|
|
16
|
+
denyPatternsText: string;
|
|
17
|
+
maxLinksPerMessage: number;
|
|
18
|
+
};
|
|
19
|
+
export declare const DEFAULT_NOISE_FILTER_FORM: NoiseFilterFormState;
|
|
20
|
+
export declare function parseDenyPatternsText(value: string): string[];
|
|
21
|
+
export declare function formatDenyPatterns(patterns: string[] | null | undefined): string;
|
|
22
|
+
export declare function clampUnitInterval(value: number, fallback: number): number;
|
|
23
|
+
export declare function clampPositiveInt(value: number, fallback: number): number;
|
|
24
|
+
export declare function noiseFilterFormsEqual(a: NoiseFilterFormState, b: NoiseFilterFormState): boolean;
|
|
@@ -4,6 +4,8 @@ export type OnboardingViewProps = {
|
|
|
4
4
|
checklistState: OnboardingChecklistState | null;
|
|
5
5
|
completedCount: number;
|
|
6
6
|
celebrateStepId: OnboardingChecklistStepId | null;
|
|
7
|
+
/** Steps whose completion is still in flight; shown as a spinner instead of a checkbox. */
|
|
8
|
+
pendingStepIds: Set<OnboardingChecklistStepId>;
|
|
7
9
|
/** Show the "Ask crumby…" input (hidden when Crumby chat is unavailable). */
|
|
8
10
|
showInput: boolean;
|
|
9
11
|
rtl: boolean;
|
|
@@ -16,4 +18,4 @@ export type OnboardingViewProps = {
|
|
|
16
18
|
onFinish: () => void;
|
|
17
19
|
};
|
|
18
20
|
/** Onboarding mode of the unified widget: welcome header, setup checklist, AI input. */
|
|
19
|
-
export declare function OnboardingView({ applicableStepIds, checklistState, completedCount, celebrateStepId, showInput, rtl, toggleStep, onOpenStep, onClose, onSendToChat, onFinish, }: OnboardingViewProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function OnboardingView({ applicableStepIds, checklistState, completedCount, celebrateStepId, pendingStepIds, showInput, rtl, toggleStep, onOpenStep, onClose, onSendToChat, onFinish, }: OnboardingViewProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -2,29 +2,32 @@ import { type OnboardingChecklistState, type OnboardingChecklistStepId } from '.
|
|
|
2
2
|
export type UseOnboardingChecklist = {
|
|
3
3
|
/** Steps relevant for the current plan (drops Crumby steps when AI is disabled). */
|
|
4
4
|
applicableStepIds: OnboardingChecklistStepId[];
|
|
5
|
-
/** Parsed checklist, or null when
|
|
5
|
+
/** Parsed checklist, or null when the workspace has no active checklist. */
|
|
6
6
|
checklistState: OnboardingChecklistState | null;
|
|
7
7
|
/** Number of applicable steps the user has completed. */
|
|
8
8
|
completedCount: number;
|
|
9
|
-
/** True while there is a
|
|
9
|
+
/** True while there is a checklist with at least one applicable step still open. */
|
|
10
10
|
isActive: boolean;
|
|
11
11
|
/** Step currently playing the completion sweep, or null. */
|
|
12
12
|
celebrateStepId: OnboardingChecklistStepId | null;
|
|
13
|
-
/**
|
|
13
|
+
/** Steps whose completion is still in flight, so the row can show progress. */
|
|
14
|
+
pendingStepIds: Set<OnboardingChecklistStepId>;
|
|
15
|
+
/** One-shot request to auto-open the widget on onboarding. */
|
|
14
16
|
shouldAutoOpen: boolean;
|
|
15
17
|
/** Toggle a step's completed flag (manual checkbox). */
|
|
16
18
|
toggleStep: (stepId: OnboardingChecklistStepId) => void;
|
|
17
19
|
/** Clears the one-shot auto-open request once the widget has acted on it. */
|
|
18
20
|
consumeAutoOpen: () => void;
|
|
19
|
-
/** Run when the widget panel closes:
|
|
21
|
+
/** Run when the widget panel closes: dismisses a finished checklist. */
|
|
20
22
|
onPanelClosed: () => void;
|
|
21
|
-
/** Finish onboarding now (Get started button)
|
|
23
|
+
/** Finish onboarding now (Get started button). */
|
|
22
24
|
dismissChecklist: () => void;
|
|
23
25
|
};
|
|
24
26
|
/**
|
|
25
|
-
* Owns the onboarding-checklist state
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
27
|
+
* Owns the onboarding-checklist state for the Crumby widget.
|
|
28
|
+
*
|
|
29
|
+
* Reads from the auth service rather than cookies. The service decides whether a workspace
|
|
30
|
+
* has an active checklist, so the create-if-pending dance is gone — with it the bug where a
|
|
31
|
+
* brand-new workspace got no checklist because an existing one consumed the pending flag.
|
|
29
32
|
*/
|
|
30
33
|
export declare function useOnboardingChecklist(): UseOnboardingChecklist;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fallback values for the workspace profile fields.
|
|
3
|
+
*
|
|
4
|
+
* The auth service owns the accepted values and WorkspaceProfile reads them from the
|
|
5
|
+
* onboardingOptions query. These only cover the moment before that query resolves, so the
|
|
6
|
+
* dropdowns are never empty on first paint. They mirror `src/app/constants/onboarding.ts`
|
|
7
|
+
* in the auth service; if they drift, the service rejects the value rather than storing it.
|
|
8
|
+
*/
|
|
9
|
+
/** Fixed by the ticket. Labels carry the typographic form; values stay ASCII. */
|
|
10
|
+
export declare const COMPANY_SIZE_OPTIONS: {
|
|
11
|
+
value: string;
|
|
12
|
+
labelKey: string;
|
|
13
|
+
}[];
|
|
14
|
+
export declare const INDUSTRY_OPTIONS: string[];
|
|
15
|
+
export declare const CREATOR_ROLE_OPTIONS: string[];
|
|
16
|
+
export declare const USE_CASE_OPTIONS: string[];
|
|
17
|
+
export type WorkspaceProfileValues = {
|
|
18
|
+
industry: string;
|
|
19
|
+
companySize: string;
|
|
20
|
+
creatorRole: string;
|
|
21
|
+
useCase: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const EMPTY_WORKSPACE_PROFILE: WorkspaceProfileValues;
|
|
24
|
+
export type WorkspaceProfileOptions = {
|
|
25
|
+
industries: string[];
|
|
26
|
+
companySizes: string[];
|
|
27
|
+
creatorRoles: string[];
|
|
28
|
+
useCases: string[];
|
|
29
|
+
};
|
|
30
|
+
export declare const DEFAULT_WORKSPACE_PROFILE_OPTIONS: WorkspaceProfileOptions;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type OnboardingStepId, type WorkspaceOnboardingFragment } from '../../../graphql.autogenerated';
|
|
2
|
+
/**
|
|
3
|
+
* Server-backed onboarding checklist, replacing the cookie store.
|
|
4
|
+
*
|
|
5
|
+
* Imperative rather than hook-based on purpose: the step call sites are effects inside
|
|
6
|
+
* unrelated features (inbox polling, playground messages, dialogs), so they cannot mount a
|
|
7
|
+
* mutation hook. The widget is the only consumer that renders from this state, and it holds
|
|
8
|
+
* it in `useOnboardingChecklist`.
|
|
9
|
+
*/
|
|
10
|
+
export type OnboardingRecord = WorkspaceOnboardingFragment;
|
|
11
|
+
/** Fired after any change so an open widget refreshes. */
|
|
12
|
+
export declare const ONBOARDING_CHECKLIST_UPDATED_EVENT = "showcase-onboarding-checklist-updated";
|
|
13
|
+
export declare function getCachedOnboarding(workspaceId: number): OnboardingRecord | null | undefined;
|
|
14
|
+
export declare function primeOnboardingCache(workspaceId: number, record: OnboardingRecord | null): void;
|
|
15
|
+
export declare function clearOnboardingCache(): void;
|
|
16
|
+
export declare function fetchOnboarding(workspaceId: number): Promise<OnboardingRecord | null>;
|
|
17
|
+
/**
|
|
18
|
+
* Idempotent server-side, so this fires without checking first. Failures are swallowed:
|
|
19
|
+
* losing a checklist tick must never surface as an error over the action the user actually
|
|
20
|
+
* performed.
|
|
21
|
+
*/
|
|
22
|
+
export declare function completeStep(workspaceId: number, stepId: OnboardingStepId): Promise<OnboardingRecord | null>;
|
|
23
|
+
export declare function dismissOnboarding(workspaceId: number): Promise<OnboardingRecord | null>;
|
|
@@ -1,65 +1,58 @@
|
|
|
1
|
-
|
|
1
|
+
import { OnboardingStepId } from '../../../graphql.autogenerated';
|
|
2
|
+
import { type OnboardingRecord } from './onboardingApi';
|
|
3
|
+
/**
|
|
4
|
+
* Checklist step ids and the call-site helpers.
|
|
5
|
+
*
|
|
6
|
+
* State now lives on the auth service (see ./onboardingApi). What used to be a cookie
|
|
7
|
+
* read is a cached lookup, and what used to be a cookie write is a mutation. The exported
|
|
8
|
+
* shapes are unchanged so the call sites that mark a step done did not have to move.
|
|
9
|
+
*
|
|
10
|
+
* Gone with the server move: the TTL, the per-user "pending" flag and the dismissed marker.
|
|
11
|
+
* The service decides whether a workspace has an active checklist, which also removes the
|
|
12
|
+
* bug where the pending flag was consumed by whichever workspace happened to load first.
|
|
13
|
+
*/
|
|
2
14
|
export declare const ONBOARDING_CHECKLIST_UPDATED_EVENT = "showcase-onboarding-checklist-updated";
|
|
3
|
-
|
|
4
|
-
export type OnboardingChecklistStepId =
|
|
5
|
-
|
|
6
|
-
startedAt: string;
|
|
7
|
-
completed: Record<OnboardingChecklistStepId, boolean>;
|
|
8
|
-
};
|
|
15
|
+
/** Aliased to the schema enum so a step added server-side cannot silently drift. */
|
|
16
|
+
export type OnboardingChecklistStepId = OnboardingStepId;
|
|
17
|
+
/** Display order, which the schema does not carry. */
|
|
9
18
|
export declare const ONBOARDING_CHECKLIST_STEP_IDS: OnboardingChecklistStepId[];
|
|
10
19
|
/** Last checklist steps; only shown when Crumby / workspace AI is enabled */
|
|
11
20
|
export declare const ONBOARDING_CHECKLIST_CRUMBY_STEP_IDS: OnboardingChecklistStepId[];
|
|
12
21
|
export declare function getApplicableOnboardingChecklistStepIds(isCrumbyEnabled: boolean): OnboardingChecklistStepId[];
|
|
13
|
-
export declare function isOnboardingChecklistCompleteForCrumbySetting(state: OnboardingChecklistState, isCrumbyEnabled: boolean): boolean;
|
|
14
|
-
export declare function getOnboardingChecklistStorageKey(userId: string | number, workspaceId?: string | number | null): string;
|
|
15
|
-
/** Pre-workspace-scoping key: showcase_onboarding_checklist_{userId} */
|
|
16
|
-
export declare function getLegacyOnboardingChecklistStorageKey(userId: string | number): string;
|
|
17
|
-
/**
|
|
18
|
-
* Load checklist for user + workspace from the durable (cookie) store. Migrates the older
|
|
19
|
-
* localStorage keys (scoped, legacy user-only, empty-workspace) into the cookie store once.
|
|
20
|
-
* Returns null when workspace context is not available.
|
|
21
|
-
*/
|
|
22
|
-
export declare function loadOnboardingChecklistState(userId: string | number, workspaceId?: string | number | null): OnboardingChecklistState | null;
|
|
23
22
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* first load and creates the checklist scoped to whichever workspace the user landed in.
|
|
23
|
+
* Shape the widget renders. Kept as a map rather than the server's array so the existing
|
|
24
|
+
* components and their `completed[stepId]` lookups did not need rewriting.
|
|
27
25
|
*/
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export declare function
|
|
36
|
-
export declare function markOnboardingChecklistDismissed(userId: string | number, workspaceId?: string | number | null): void;
|
|
37
|
-
/** One-shot: open checklist popover after sign-in (session tab only). */
|
|
38
|
-
export declare const ONBOARDING_CHECKLIST_SESSION_AUTOPEN_KEY = "showcase_onboarding_checklist_session_autopen";
|
|
39
|
-
export declare function clearOnboardingChecklistSessionAutopen(): void;
|
|
40
|
-
export declare function shouldOpenOnboardingChecklistFromSession(): boolean;
|
|
41
|
-
export declare function createDefaultOnboardingChecklistState(): OnboardingChecklistState;
|
|
42
|
-
export declare function parseOnboardingChecklistState(value: unknown): OnboardingChecklistState | null;
|
|
43
|
-
/**
|
|
44
|
-
* Call after a successful sign-in. If the user has no active checklist yet, sets a short-lived
|
|
45
|
-
* pending flag so the layout widget can create `startedAt` only on the first load after login
|
|
46
|
-
* (not for sessions that never went through sign-in in this browser).
|
|
47
|
-
*/
|
|
48
|
-
export declare function notifyOnboardingChecklistAfterSignIn(userId: string | number): void;
|
|
26
|
+
export type OnboardingChecklistState = {
|
|
27
|
+
startedAt: string;
|
|
28
|
+
completed: Record<OnboardingChecklistStepId, boolean>;
|
|
29
|
+
};
|
|
30
|
+
export declare function toChecklistState(record: OnboardingRecord | null): OnboardingChecklistState | null;
|
|
31
|
+
export declare function isOnboardingChecklistCompleteForCrumbySetting(state: OnboardingChecklistState, isCrumbyEnabled: boolean): boolean;
|
|
32
|
+
/** Active workspace id, or null before the context is known. */
|
|
33
|
+
export declare function readChecklistWorkspaceId(workspaceId?: string | number | null): number | null;
|
|
49
34
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
35
|
+
* Checklist for the active workspace from the local cache, or null when there is none.
|
|
36
|
+
*
|
|
37
|
+
* Synchronous on purpose. Call sites use it to decide whether to bother marking a step, and
|
|
38
|
+
* they run on every inbox poll and every playground message — a network call there would be
|
|
39
|
+
* far more expensive than the check is worth. The cache is populated by the widget, which
|
|
40
|
+
* mounts on every page.
|
|
53
41
|
*/
|
|
54
42
|
export declare function getActiveOnboardingChecklistState(userId: string | number | null | undefined, workspaceId?: string | number | null): OnboardingChecklistState | null;
|
|
55
43
|
export type MarkOnboardingChecklistStepOptions = {
|
|
56
|
-
/**
|
|
44
|
+
/** Retained for call-site compatibility; the server is the authority on current state. */
|
|
57
45
|
knownActiveState?: OnboardingChecklistState;
|
|
58
46
|
workspaceId?: string | number | null;
|
|
59
47
|
};
|
|
60
48
|
/**
|
|
61
|
-
* Marks a
|
|
62
|
-
*
|
|
49
|
+
* Marks a step done when the user performs the real action.
|
|
50
|
+
*
|
|
51
|
+
* Fire and forget: the mutation is idempotent and the service no-ops when the workspace has
|
|
52
|
+
* no checklist, so this does not gate on local state and cannot fail the action it follows.
|
|
53
|
+
*
|
|
54
|
+
* The signed-in user is read from `auth` rather than passed in. Server-side the step is keyed
|
|
55
|
+
* to the workspace and the caller is taken from the bearer token, so the id is only needed to
|
|
56
|
+
* confirm a session exists — which every call site would otherwise have to thread in itself.
|
|
63
57
|
*/
|
|
64
|
-
export declare function markOnboardingChecklistStepComplete(
|
|
65
|
-
export declare function tryMarkOnboardingChecklistStepFromAuth(stepId: OnboardingChecklistStepId): void;
|
|
58
|
+
export declare function markOnboardingChecklistStepComplete(stepId: OnboardingChecklistStepId, options?: MarkOnboardingChecklistStepOptions): void;
|
|
@@ -19,6 +19,11 @@ export interface ChannelDialogLayoutProps {
|
|
|
19
19
|
supportUrl?: string;
|
|
20
20
|
onNext: () => void;
|
|
21
21
|
isNextDisabled: boolean;
|
|
22
|
+
isNextLoading?: boolean;
|
|
22
23
|
rtl?: boolean;
|
|
24
|
+
/** Opens the magic-link share step. Hidden on the public connect page. */
|
|
25
|
+
onShareLink?: () => void;
|
|
26
|
+
/** Renders the form in the page instead of a dialog. */
|
|
27
|
+
inline?: boolean;
|
|
23
28
|
}
|
|
24
|
-
export declare const ChannelDialogLayout: ({ isOpen, onClose, channelName, setChannelName, channelTypeName, icon, extraFields, videoUrl, supportUrl, onNext, isNextDisabled, rtl, }: ChannelDialogLayoutProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare const ChannelDialogLayout: ({ isOpen, onClose, channelName, setChannelName, channelTypeName, icon, extraFields, videoUrl, supportUrl, onNext, isNextDisabled, isNextLoading, rtl, onShareLink, inline, }: ChannelDialogLayoutProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -8,11 +8,13 @@ export interface ChannelFlowExtendedProps {
|
|
|
8
8
|
channelTypeName: string;
|
|
9
9
|
icon?: React.ReactNode;
|
|
10
10
|
rtl?: boolean;
|
|
11
|
+
onShareLink?: () => void;
|
|
12
|
+
inline?: boolean;
|
|
11
13
|
}
|
|
12
14
|
interface RenderCorrectIntegrationFlowProps extends IntegrationFlowComponentProps<IntegrationWithSecrets>, ChannelFlowExtendedProps {
|
|
13
15
|
type: IntegrationType;
|
|
14
16
|
}
|
|
15
|
-
export declare const RenderCorrectIntegrationFlow: ({ type, setInitialValues, cancel, isOpen, channelName, setChannelName, channelTypeName, icon, rtl, }: RenderCorrectIntegrationFlowProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
17
|
+
export declare const RenderCorrectIntegrationFlow: ({ type, setInitialValues, cancel, isOpen, channelName, setChannelName, channelTypeName, icon, rtl, onShareLink, inline, }: RenderCorrectIntegrationFlowProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
16
18
|
export declare const RenderCorrectIntegrationFlowCancelledMessage: ({ type, tryAgain, }: {
|
|
17
19
|
type: IntegrationType;
|
|
18
20
|
tryAgain: () => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IntegrationWithSecrets } from '../../../../../graphql.autogenerated';
|
|
3
|
+
import { IntegrationFlowComponentProps } from '../types';
|
|
4
|
+
import { ChannelFlowExtendedProps } from '../RenderCorrectIntegrationFlow';
|
|
5
|
+
type Props = IntegrationFlowComponentProps<IntegrationWithSecrets> & ChannelFlowExtendedProps;
|
|
6
|
+
/** Website live chat needs only a name: visitors connect through bc-channels, so there are no credentials. */
|
|
7
|
+
export declare const WebChatChannel: React.FC<Props>;
|
|
8
|
+
export {};
|
|
@@ -3,5 +3,6 @@ import { IntegrationWithSecrets } from '../../../../../graphql.autogenerated';
|
|
|
3
3
|
import { IntegrationFlowComponentProps } from '../types';
|
|
4
4
|
import { ChannelFlowExtendedProps } from '../RenderCorrectIntegrationFlow';
|
|
5
5
|
type Props = IntegrationFlowComponentProps<IntegrationWithSecrets> & ChannelFlowExtendedProps;
|
|
6
|
+
export declare const WhatsAppReconnect: React.FC<IntegrationFlowComponentProps<IntegrationWithSecrets>>;
|
|
6
7
|
export declare const WhatsApp: React.FC<Props>;
|
|
7
8
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ChannelSetupProvider } from '../utils/channelSetupTracking';
|
|
1
2
|
declare global {
|
|
2
3
|
interface Window {
|
|
3
4
|
FB: any;
|
|
@@ -8,8 +9,9 @@ export interface FBPage {
|
|
|
8
9
|
name: string;
|
|
9
10
|
access_token: string;
|
|
10
11
|
}
|
|
11
|
-
declare function useFBPagesHook(scope: string): {
|
|
12
|
-
login: (onResult: (fbUserAccessToken: string, pages: FBPage[]) => void) => void
|
|
12
|
+
declare function useFBPagesHook(scope: string, provider: ChannelSetupProvider): {
|
|
13
|
+
login: (onResult: (fbUserAccessToken: string, pages: FBPage[]) => void) => Promise<void>;
|
|
13
14
|
error: string | null;
|
|
15
|
+
pending: boolean;
|
|
14
16
|
};
|
|
15
17
|
export default useFBPagesHook;
|
|
@@ -4,10 +4,11 @@ declare global {
|
|
|
4
4
|
}
|
|
5
5
|
}
|
|
6
6
|
declare function useWabaHook(): {
|
|
7
|
-
login: () => void
|
|
8
|
-
phoneId: undefined;
|
|
9
|
-
wabaId: undefined;
|
|
10
|
-
accessToken: undefined;
|
|
7
|
+
login: () => Promise<void>;
|
|
8
|
+
phoneId: string | undefined;
|
|
9
|
+
wabaId: string | undefined;
|
|
10
|
+
accessToken: string | undefined;
|
|
11
11
|
error: string | null;
|
|
12
|
+
pending: boolean;
|
|
12
13
|
};
|
|
13
14
|
export default useWabaHook;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { PostHog } from 'posthog-js';
|
|
2
|
+
/** Funnel / UX events for the channel setup dialogs (WhatsApp, Facebook, Instagram). */
|
|
3
|
+
export declare const ChannelSetupEvents: {
|
|
4
|
+
readonly Started: "Channel Setup Started";
|
|
5
|
+
readonly Failed: "Channel Setup Failed";
|
|
6
|
+
readonly Timeout: "Channel Setup Timeout";
|
|
7
|
+
};
|
|
8
|
+
/** Why a provider handoff ended without an access token. */
|
|
9
|
+
export declare const ChannelSetupFailureReason: {
|
|
10
|
+
readonly SdkUnavailable: "sdk_unavailable";
|
|
11
|
+
readonly PopupClosed: "popup_closed";
|
|
12
|
+
readonly Denied: "denied";
|
|
13
|
+
};
|
|
14
|
+
export type ChannelSetupProvider = 'whatsapp' | 'facebook' | 'instagram';
|
|
15
|
+
/** Map a failed Meta FB.login response to a single failure reason vocabulary. */
|
|
16
|
+
export declare function failureReasonFromLoginStatus(res: {
|
|
17
|
+
status?: string;
|
|
18
|
+
} | null | undefined): string;
|
|
19
|
+
export declare function captureChannelSetupStarted(posthog: PostHog | null | undefined, provider: ChannelSetupProvider): void;
|
|
20
|
+
export declare function captureChannelSetupFailed(posthog: PostHog | null | undefined, provider: ChannelSetupProvider, reason: string): void;
|
|
21
|
+
export declare function captureChannelSetupTimeout(posthog: PostHog | null | undefined, provider: ChannelSetupProvider): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** True once the GTM-loaded Facebook SDK exposes FB.login. */
|
|
2
|
+
export declare function isFacebookSdkReady(): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Resolve once the Facebook SDK can accept a login call, or resolve false when
|
|
5
|
+
* the deadline passes. A false result means the SDK never arrived, for example
|
|
6
|
+
* an ad blocker removed the script.
|
|
7
|
+
*
|
|
8
|
+
* @param timeoutMs how long to wait for the SDK before giving up
|
|
9
|
+
* @param pollMs how often to re-check for the SDK
|
|
10
|
+
*/
|
|
11
|
+
export declare function waitForFacebookSdk(timeoutMs?: number, pollMs?: number): Promise<boolean>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type OnboardingStepStatus = 'complete' | 'active' | 'upcoming';
|
|
2
|
-
export type OnboardingStepKey = 'registration' | 'workspace' | 'checkout';
|
|
2
|
+
export type OnboardingStepKey = 'registration' | 'workspace' | 'personalization' | 'checkout';
|
|
3
3
|
type OnboardingStepperProps = {
|
|
4
|
-
/** Status per step; defaults to registration complete, workspace active,
|
|
4
|
+
/** Status per step; defaults to registration complete, workspace active, the rest upcoming. */
|
|
5
5
|
statuses?: Partial<Record<OnboardingStepKey, OnboardingStepStatus>>;
|
|
6
6
|
};
|
|
7
7
|
export declare const OnboardingStepper: ({ statuses }: OnboardingStepperProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
type SubscriptionNameProps = {
|
|
2
2
|
onSubmit: (companyName: string) => void;
|
|
3
|
+
/** False when the user already has a workspace: creating another one is not an onboarding flow. */
|
|
4
|
+
showStepper?: boolean;
|
|
3
5
|
};
|
|
4
6
|
export declare const SubscriptionName: (props: SubscriptionNameProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
7
|
export default SubscriptionName;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type WorkspaceProfileOptions, type WorkspaceProfileValues } from '../../../onboarding/constants/workspaceProfileOptions';
|
|
2
|
+
type WorkspaceProfileProps = {
|
|
3
|
+
onSubmit: (values: WorkspaceProfileValues) => void;
|
|
4
|
+
/** Lets the caller skip ahead; the answers are optional, not a gate on checkout. */
|
|
5
|
+
onSkip: () => void;
|
|
6
|
+
submitting?: boolean;
|
|
7
|
+
/** False when the user already has a workspace: creating another one is not an onboarding flow. */
|
|
8
|
+
showStepper?: boolean;
|
|
9
|
+
/** Overrides the onboardingOptions query; used by tests and stories. */
|
|
10
|
+
options?: WorkspaceProfileOptions;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Collected between naming the workspace and checkout. Every answer is optional — this is
|
|
14
|
+
* segmentation data, not something the product needs to run, so it must never block a user
|
|
15
|
+
* from reaching checkout.
|
|
16
|
+
*/
|
|
17
|
+
export declare const WorkspaceProfile: ({ onSubmit, onSkip, submitting, showStepper, options, }: WorkspaceProfileProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default WorkspaceProfile;
|
|
@@ -2,10 +2,13 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { OnboardingStepKey, OnboardingStepStatus } from './OnboardingStepper';
|
|
3
3
|
type WorkspaceStepLayoutProps = {
|
|
4
4
|
statuses?: Partial<Record<OnboardingStepKey, OnboardingStepStatus>>;
|
|
5
|
-
|
|
5
|
+
/** Hidden when the user already owns a workspace — the stepper only frames first-time onboarding. */
|
|
6
|
+
showStepper?: boolean;
|
|
7
|
+
/** Optional: the personalization step is a form-only screen. */
|
|
8
|
+
illustration?: string;
|
|
6
9
|
title: string;
|
|
7
10
|
subtitle?: string;
|
|
8
11
|
children?: ReactNode;
|
|
9
12
|
};
|
|
10
|
-
export declare const WorkspaceStepLayout: ({ statuses, illustration, title, subtitle, children, }: WorkspaceStepLayoutProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const WorkspaceStepLayout: ({ statuses, showStepper, illustration, title, subtitle, children, }: WorkspaceStepLayoutProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
14
|
export default WorkspaceStepLayout;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { WorkspaceProfileValues } from '../../onboarding/constants/workspaceProfileOptions';
|
|
2
|
+
/**
|
|
3
|
+
* Submits the company profile answers collected between naming a workspace and checkout.
|
|
4
|
+
*
|
|
5
|
+
* Failures are swallowed on purpose: these answers are segmentation data, so losing them
|
|
6
|
+
* must never keep a user from reaching checkout.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useWorkspaceProfileSubmit(): {
|
|
9
|
+
submitProfile: (workspaceId: number, values: WorkspaceProfileValues) => Promise<void>;
|
|
10
|
+
submitting: boolean;
|
|
11
|
+
};
|
|
12
|
+
export default useWorkspaceProfileSubmit;
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
/** Query flag for flows that create a workspace (plan pick, checkout) without using the active workspace context. */
|
|
2
2
|
export declare const NEW_WORKSPACE_QUERY_KEY = "newWorkspace";
|
|
3
3
|
export declare function isCreatingNewWorkspace(pathname: string, search: string): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* The workspace the create page is working on: its id once created (the page keeps it in the URL),
|
|
6
|
+
* null before that, and undefined on any other page. Until the new workspace exists, the active
|
|
7
|
+
* context still points at the previously selected one, so nothing should present that as current.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getCreatePageWorkspaceId(pathname: string, search: string): number | null | undefined;
|
|
10
|
+
/** True on the create page until the new workspace exists. */
|
|
11
|
+
export declare function isNamingNewWorkspace(pathname: string, search: string): boolean;
|
|
4
12
|
export declare function newWorkspaceSearch(): string;
|
|
5
13
|
export declare function buildNewWorkspaceSubscriptionPath(): string;
|