@bcrumbs.net/inbox 0.0.52 → 0.0.58
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/{396ba1d86a9997b1.svg → 594c01a9720e0657.svg} +42 -42
- package/assets/ar/inbox.json +268 -256
- package/assets/en/inbox.json +270 -258
- package/{2998ffe42c3436c0.svg → cb9c022b3cf80e0f.svg} +43 -43
- package/d9e9a351fe00b4f8.png +0 -0
- package/index.cjs.d.ts +1 -1
- package/index.cjs.js +4029 -2921
- package/index.esm.d.ts +1 -1
- package/index.esm.js +4033 -2927
- package/package.json +2 -2
- package/src/app/ai/components/CrumbySettings/AutoTagRulesSection.d.ts +14 -0
- package/src/app/ai/components/CrumbySettings/tagRuleUtils.d.ts +28 -0
- package/src/app/auth/components/UserAvatar/AccountSettingsDropdown.d.ts +2 -1
- package/src/app/auth/components/UserAvatar/index.d.ts +2 -1
- package/src/app/auth/pages/CheckAuth.d.ts +10 -0
- package/src/app/auth/pages/Forget.d.ts +1 -3
- package/src/app/auth/pages/Password.d.ts +0 -1
- package/src/app/auth/pages/Profile.d.ts +0 -1
- package/src/app/auth/redux/actions/forgetPasswordAction.d.ts +1 -1
- package/src/app/auth/redux/actions/logoutAction.d.ts +2 -2
- package/src/app/auth/redux/actions/resetPasswordAction.d.ts +2 -2
- package/src/app/auth/redux/auth.types.d.ts +5 -1
- package/src/app/auth/utils/getValidWorkspaceId.d.ts +4 -0
- package/src/app/billing/context/SubscriptionContext.d.ts +3 -1
- package/src/app/billing/utils/pendingPlanPurchaseStorage.d.ts +10 -0
- package/src/app/contact/components/ContactFormFields.d.ts +1 -1
- package/src/app/contact/config/contactForm.d.ts +2 -1
- package/src/app/dashboard/components/BroadcastAnalyticsCard.d.ts +2 -1
- package/src/app/dashboard/utils/buildBroadcastReportOverviewAnalytics.d.ts +2 -0
- package/src/app/dashboard/utils/dateHelpers.d.ts +17 -0
- package/src/app/dashboard/utils/reportHelpers.d.ts +16 -0
- package/src/app/generic/components/HeaderImageInput.d.ts +2 -1
- package/src/app/generic/components/MessagePreview.d.ts +3 -1
- package/src/app/generic/components/PreviewHeaderImage.d.ts +2 -1
- package/src/app/generic/utils/logout.d.ts +1 -1
- package/src/app/inbox/components/Chat/ChatContent.d.ts +1 -3
- package/src/app/inbox/components/Chat/ChatHeader.d.ts +11 -3
- package/src/app/inbox/components/Chat/NoResultsFound.d.ts +3 -0
- package/src/app/inbox/components/Chat/QuickReplyPickerMenu.d.ts +14 -0
- package/src/app/inbox/components/Chat/index.d.ts +7 -2
- package/src/app/inbox/components/ConvsList/ConvItem/ActionsMenu.d.ts +1 -1
- package/src/app/inbox/components/NewConvList/ConversationItem.d.ts +1 -1
- package/src/app/inbox/components/NewConvList/FilterDrawer.d.ts +3 -3
- package/src/app/inbox/components/NewConvList/HeaderSection.d.ts +3 -6
- package/src/app/inbox/components/NewConvList/index.d.ts +2 -1
- package/src/app/inbox/components/NewDetails/ChatDetails.d.ts +3 -2
- package/src/app/inbox/components/NewDetails/ChatDetailsAndTimeline.d.ts +3 -2
- package/src/app/inbox/components/NewDetails/ClientInfo.d.ts +3 -2
- package/src/app/inbox/components/NewDetails/ConversationOverview.d.ts +3 -2
- package/src/app/inbox/components/NewDetails/EditClientInfo.d.ts +3 -2
- package/src/app/inbox/components/NewDetails/index.d.ts +3 -2
- package/src/app/inbox/components/Shared/Inbox.d.ts +9 -7
- package/src/app/inbox/components/Shared/MobileActionSheet.d.ts +9 -0
- package/src/app/inbox/components/Shared/MobileMenu.d.ts +8 -0
- package/src/app/inbox/components/Shared/SharedStyle.d.ts +7 -0
- package/src/app/inbox/components/Shared/mobileMenuStyles.d.ts +20 -0
- package/src/app/inbox/constants/index.d.ts +1 -1
- package/src/app/inbox/hooks/useCanContribute.d.ts +2 -1
- package/src/app/inbox/hooks/useConvAutoComplete.d.ts +15 -0
- package/src/app/inbox/hooks/useConvEnhance.d.ts +17 -0
- package/src/app/inbox/hooks/useConvFilters.d.ts +6 -2
- package/src/app/inbox/hooks/useConversationById.d.ts +8 -0
- package/src/app/inbox/hooks/useInboxAssignableAis.d.ts +3 -0
- package/src/app/inbox/hooks/useMyAgent.d.ts +10 -0
- package/src/app/inbox/hooks/useQuickReplyPicker.d.ts +18 -0
- package/src/app/inbox/hooks/useQuickReplyPickerAnchor.d.ts +7 -0
- package/src/app/inbox/utils/convAssistIntent.d.ts +16 -0
- package/src/app/inbox/utils/convAssistStorage.d.ts +12 -0
- package/src/app/inbox/utils/convs.d.ts +13 -4
- package/src/app/inbox/utils/inboxAssignableAis.d.ts +10 -0
- package/src/app/inbox/utils/mobileInboxStyles.d.ts +6 -0
- package/src/app/inbox/utils/quickReplyPicker.d.ts +13 -0
- package/src/app/layout/components/Header.d.ts +0 -4
- package/src/app/layout/constants/subMenu.d.ts +12 -2
- package/src/app/layout/context/EmbeddedInboxContext.d.ts +3 -0
- package/src/app/layout/context/MobileInboxNavContext.d.ts +9 -0
- package/src/app/layout/hooks/useMobileInboxVersion.d.ts +1 -3
- package/src/app/managemnet/components/CreateQuickReply.d.ts +8 -0
- package/src/app/managemnet/components/WebhookHeadersEditor.d.ts +12 -0
- package/src/app/managemnet/components/channels/ChannelTypeCard.d.ts +2 -1
- package/src/app/managemnet/config/quickReplyDefinition.d.ts +4 -0
- package/src/app/managemnet/pages/quickReplies/index.d.ts +2 -0
- package/src/app/onboarding/components/OnboardingChecklistWidget.d.ts +2 -1
- package/src/app/onboarding/utils/onboardingChecklistStorage.d.ts +4 -0
- package/src/app/resources/components/Integrations/Facebook/NoPagesFoundPopup.d.ts +2 -1
- package/src/app/resources/components/Integrations/Facebook/PagePickerPopup.d.ts +2 -1
- package/src/app/resources/components/ListResources/Utils.d.ts +1 -0
- package/src/app/subscriptions/components/Plans/PlanCard.d.ts +10 -23
- package/src/app/subscriptions/components/Plans/ShowcasePlans.d.ts +7 -4
- package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionHeader.d.ts +1 -10
- package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionPlanLabel.d.ts +8 -0
- package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionProfile.d.ts +0 -1
- package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionProfileCard.d.ts +14 -0
- package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionUsageCard.d.ts +6 -0
- package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionUsers.d.ts +3 -2
- package/src/app/subscriptions/components/SubscriptionSettings/index.d.ts +6 -0
- package/src/app/subscriptions/components/SubscriptionSwitcher/Switcher.d.ts +4 -1
- package/src/app/subscriptions/components/SubscriptionSwitcher/index.d.ts +3 -1
- package/src/app/subscriptions/components/SubscriptionsList.d.ts +1 -0
- package/src/app/subscriptions/utils/newWorkspaceContext.d.ts +5 -0
- package/src/assets/locales/translations.d.ts +80 -0
- package/src/graphql.autogenerated.d.ts +563 -2
- package/src/graphql.billing.autogenerated.d.ts +3 -0
- package/src/lib/EmbeddedMobileMenu.d.ts +9 -0
- package/src/lib/conversation-chat.d.ts +11 -0
- package/src/lib/index.d.ts +4 -0
- package/src/utils/integration.d.ts +6 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ActionItem } from '@bcrumbs.net/bc-ui';
|
|
2
|
+
type Props = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
title: string;
|
|
5
|
+
actions: ActionItem[];
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const MobileActionSheet: ({ open, title, actions, onClose }: Props) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MobileViews } from './mobileMenuStyles';
|
|
2
|
+
export type { MobileViews };
|
|
3
|
+
type MobileMenuProps = {
|
|
4
|
+
activePage: MobileViews;
|
|
5
|
+
setActivePage: (page: MobileViews) => void;
|
|
6
|
+
hideDetails?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const MobileMenu: ({ activePage, setActivePage, hideDetails }: MobileMenuProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -7,6 +7,8 @@ export declare const SectionContainer: import("@emotion/styled").StyledComponent
|
|
|
7
7
|
export declare const DetailsSectionLabel: import("@emotion/styled").StyledComponent<{
|
|
8
8
|
theme?: import("@emotion/react").Theme | undefined;
|
|
9
9
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
10
|
+
} & {
|
|
11
|
+
$isMobile?: boolean | undefined;
|
|
10
12
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
11
13
|
export declare const EditButton: import("@emotion/styled").StyledComponent<import("@bcrumbs.net/bc-ui").ButtonProps & import("react").RefAttributes<HTMLButtonElement> & {
|
|
12
14
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -14,6 +16,8 @@ export declare const EditButton: import("@emotion/styled").StyledComponent<impor
|
|
|
14
16
|
export declare const TagContainer: import("@emotion/styled").StyledComponent<{
|
|
15
17
|
theme?: import("@emotion/react").Theme | undefined;
|
|
16
18
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
19
|
+
} & {
|
|
20
|
+
$isMobile?: boolean | undefined;
|
|
17
21
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
18
22
|
export declare const ClientDetailsContainer: import("@emotion/styled").StyledComponent<{
|
|
19
23
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -24,8 +28,11 @@ export declare const ClientDetailsItem: import("@emotion/styled").StyledComponen
|
|
|
24
28
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
25
29
|
} & {
|
|
26
30
|
highlight?: boolean | undefined;
|
|
31
|
+
$isMobile?: boolean | undefined;
|
|
27
32
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
33
|
+
export declare const getClientDetailsItemCss: (isMobile: boolean) => import("@emotion/react").SerializedStyles;
|
|
28
34
|
export declare const clientDetailsItemCss: import("@emotion/react").SerializedStyles;
|
|
35
|
+
export declare const getClientDetailsItemPhoneCss: (isMobile: boolean) => import("@emotion/react").SerializedStyles;
|
|
29
36
|
export declare const clientDetailsItemPhoneCss: import("@emotion/react").SerializedStyles;
|
|
30
37
|
export declare const createImageContainerStyle: (width: number | string, height: number | string, fontSize?: TextSizeRem, LineHeight?: LineHeightRem) => import("@emotion/react").SerializedStyles;
|
|
31
38
|
export declare const ArchivedLabelStyle: import("@emotion/styled").StyledComponent<{
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type MobileViews = 'convList' | 'chat' | 'details';
|
|
3
|
+
export declare const mobileNavbar: {
|
|
4
|
+
Wrapper: import("@emotion/styled").StyledComponent<{
|
|
5
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
6
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
7
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
8
|
+
Items: import("@emotion/styled").StyledComponent<{
|
|
9
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
11
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {}>;
|
|
12
|
+
Item: import("@emotion/styled").StyledComponent<{
|
|
13
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
14
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
15
|
+
}, import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {}>;
|
|
16
|
+
Icon: import("@emotion/styled").StyledComponent<{
|
|
17
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
18
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
19
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
20
|
+
};
|
|
@@ -15,7 +15,7 @@ export declare const WABA_TEMPLATE_COSTS: {
|
|
|
15
15
|
UTILITY: number;
|
|
16
16
|
AUTHENTIC: number;
|
|
17
17
|
};
|
|
18
|
-
export declare const CONVERSATIONS_LIMIT =
|
|
18
|
+
export declare const CONVERSATIONS_LIMIT = 300;
|
|
19
19
|
export declare const WhatsappLanguageCodes: {
|
|
20
20
|
ar: string;
|
|
21
21
|
en: string;
|
|
@@ -3,6 +3,7 @@ interface Props {
|
|
|
3
3
|
hasAdminOrOwnerRole?: boolean;
|
|
4
4
|
selectedConv?: Conversation;
|
|
5
5
|
myAgent?: Agent;
|
|
6
|
+
userType?: string;
|
|
6
7
|
}
|
|
7
|
-
declare const useCanContribute: ({ hasAdminOrOwnerRole, selectedConv, myAgent }: Props) => boolean;
|
|
8
|
+
declare const useCanContribute: ({ hasAdminOrOwnerRole, selectedConv, myAgent, userType }: Props) => boolean;
|
|
8
9
|
export default useCanContribute;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface UseConvAutoCompleteOptions {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
workspaceId: number | undefined;
|
|
5
|
+
conversationId: string | undefined;
|
|
6
|
+
}
|
|
7
|
+
export declare function useConvAutoComplete({ enabled, workspaceId, conversationId, }: UseConvAutoCompleteOptions): {
|
|
8
|
+
autoCompleteSuggestion: string | undefined;
|
|
9
|
+
isAutoCompleteLoading: boolean;
|
|
10
|
+
composerDraftRef: import("react").MutableRefObject<string>;
|
|
11
|
+
onComposerInputChange: (text: string) => void;
|
|
12
|
+
onAutoCompleteMutate: (suggestion: string | null) => void;
|
|
13
|
+
clearAutoComplete: () => void;
|
|
14
|
+
stopAutoComplete: () => void;
|
|
15
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type MutableRefObject } from 'react';
|
|
2
|
+
export interface UseConvEnhanceOptions {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
workspaceId: number | undefined;
|
|
5
|
+
conversationId: string | undefined;
|
|
6
|
+
composerDraftRef: MutableRefObject<string>;
|
|
7
|
+
onBeforeEnhance?: () => void;
|
|
8
|
+
/** Fired when replace draft is applied so parent can skip auto-complete debounce for that update. */
|
|
9
|
+
onReplaceDraftApplied?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function useConvEnhance({ enabled, workspaceId, conversationId, composerDraftRef, onBeforeEnhance, onReplaceDraftApplied, }: UseConvEnhanceOptions): {
|
|
12
|
+
autoCompleteReplaceDraft: string | undefined;
|
|
13
|
+
autoCompleteReplaceDraftKey: number;
|
|
14
|
+
isEnhanceLoading: boolean;
|
|
15
|
+
fetchEnhance: () => Promise<void>;
|
|
16
|
+
clearReplaceDraft: () => void;
|
|
17
|
+
};
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { Agent, Ai, Conversation, Tag } from '../../../graphql.autogenerated';
|
|
1
|
+
import { Agent, Ai, Conversation, Integration, Tag } from '../../../graphql.autogenerated';
|
|
2
2
|
import { ConvsFilters } from '../utils/convs';
|
|
3
3
|
interface ConvFiltersProps {
|
|
4
4
|
filters?: ConvsFilters;
|
|
5
5
|
onFiltersChange?: (filters: ConvsFilters) => void;
|
|
6
6
|
agents: Agent[];
|
|
7
7
|
convStages: Tag[];
|
|
8
|
+
conversationTags: Tag[];
|
|
9
|
+
integrations: Integration[];
|
|
8
10
|
myAgent: Agent | undefined;
|
|
9
11
|
conversations: Conversation[];
|
|
10
12
|
aiAgents?: Ai[];
|
|
11
13
|
}
|
|
12
|
-
declare const useConvFilters: ({ filters, onFiltersChange, agents, aiAgents, convStages, myAgent, conversations, }: ConvFiltersProps) => {
|
|
14
|
+
declare const useConvFilters: ({ filters, onFiltersChange, agents, aiAgents, convStages, conversationTags, integrations, myAgent, conversations, }: ConvFiltersProps) => {
|
|
13
15
|
getAgentsFilterMenu: (addSeparatorAtLast?: boolean) => import("dist/packages/bc-ui/src").ActionItem[];
|
|
14
16
|
getLifeCycleFilterMenu: (addSeparatorAtLast?: boolean) => import("dist/packages/bc-ui/src").ActionItem[];
|
|
17
|
+
getChannelsFilterMenu: () => import("dist/packages/bc-ui/src").ActionItem[];
|
|
18
|
+
getTagsFilterMenu: () => import("dist/packages/bc-ui/src").ActionItem[];
|
|
15
19
|
};
|
|
16
20
|
export default useConvFilters;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Conversation } from '../../../graphql.autogenerated';
|
|
2
|
+
declare function useConversationById(convId: string | undefined, skip?: boolean): {
|
|
3
|
+
conversation: Conversation | undefined;
|
|
4
|
+
loading: boolean;
|
|
5
|
+
error: import("@apollo/client").ApolloError | undefined;
|
|
6
|
+
refetch: () => void;
|
|
7
|
+
};
|
|
8
|
+
export default useConversationById;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Agent } from '../../../graphql.autogenerated';
|
|
2
|
+
/** Workspace admin API key — not linked to an agent (`agentApiKey` is agent-linked). */
|
|
3
|
+
export declare const isWorkspaceAdminApiKey: (userType: string | undefined) => boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Resolves the workspace agent for the current session.
|
|
6
|
+
* Portal users match on agent.userId; agent-linked API keys authenticate with agent.id.
|
|
7
|
+
*/
|
|
8
|
+
export declare function findMyAgent(agents: Agent[] | null | undefined, userId: string | undefined, userType: string | undefined): Agent | undefined;
|
|
9
|
+
declare const useMyAgent: (agents?: Agent[] | null) => Agent | undefined;
|
|
10
|
+
export default useMyAgent;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { QuickReplyPickerItem } from '../utils/quickReplyPicker';
|
|
3
|
+
export interface UseQuickReplyPickerOptions {
|
|
4
|
+
workspaceId: number | undefined;
|
|
5
|
+
conversationId: string | undefined;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
noteMode: boolean;
|
|
8
|
+
onSelect: (content: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function useQuickReplyPicker({ workspaceId, conversationId, enabled, noteMode, onSelect, }: UseQuickReplyPickerOptions): {
|
|
11
|
+
isOpen: boolean;
|
|
12
|
+
filteredItems: QuickReplyPickerItem[];
|
|
13
|
+
highlightedIndex: number;
|
|
14
|
+
setHighlightedIndex: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
15
|
+
onComposerInputChange: (text: string) => void;
|
|
16
|
+
selectItem: (item: QuickReplyPickerItem) => void;
|
|
17
|
+
dismiss: () => void;
|
|
18
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
export interface QuickReplyPickerAnchor {
|
|
3
|
+
left: number;
|
|
4
|
+
bottom: number;
|
|
5
|
+
width: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function useQuickReplyPickerAnchor(chatRootRef: RefObject<HTMLDivElement | null>, isOpen: boolean, isMobile: boolean): QuickReplyPickerAnchor | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const AUTO_COMPLETE_DEBOUNCE_MS = 800;
|
|
2
|
+
export declare const MIN_DRAFT_CHARS = 10;
|
|
3
|
+
export declare const AUTO_COMPLETE_CACHE_SIZE = 20;
|
|
4
|
+
export declare function shouldTriggerAutoComplete(draft: string): boolean;
|
|
5
|
+
export declare function normalizeSuggestion(fullText: string, currentInput: string): string;
|
|
6
|
+
export declare function buildAutoCompleteCacheKey(workspaceId: number, convId: string, draft: string): string;
|
|
7
|
+
export declare function buildAutoCompleteConvKeyPrefix(workspaceId: number, convId: string): string;
|
|
8
|
+
export declare class AutoCompleteCache {
|
|
9
|
+
private readonly maxSize;
|
|
10
|
+
private readonly order;
|
|
11
|
+
private readonly store;
|
|
12
|
+
constructor(maxSize?: number);
|
|
13
|
+
get(key: string): string | undefined;
|
|
14
|
+
set(key: string, suffix: string): void;
|
|
15
|
+
clear(): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Enhance cache key: workspace + draft only (no conversation). */
|
|
2
|
+
export declare function buildEnhanceCacheKey(workspaceId: number, draft: string): string;
|
|
3
|
+
export declare function getPersistedAutoComplete(workspaceId: number, cacheKey: string): string | undefined;
|
|
4
|
+
export declare function setPersistedAutoComplete(workspaceId: number, cacheKey: string, suffix: string): void;
|
|
5
|
+
/** Removes all auto-complete entries for a conversation (e.g. when it is closed). */
|
|
6
|
+
export declare function clearPersistedAutoCompleteForConversation(workspaceId: number, convId: string): void;
|
|
7
|
+
export declare function getPersistedEnhance(workspaceId: number, draft: string): string | undefined;
|
|
8
|
+
export declare function setPersistedEnhance(workspaceId: number, draft: string, enhancedText: string): void;
|
|
9
|
+
/** Warm in-memory LRU from localStorage (bounded). */
|
|
10
|
+
export declare function hydrateAutoCompleteMemoryCache(workspaceId: number, memoryCache: {
|
|
11
|
+
set: (key: string, suffix: string) => void;
|
|
12
|
+
}): void;
|
|
@@ -9,6 +9,7 @@ export type ConvsFilters = {
|
|
|
9
9
|
stageId?: string | null;
|
|
10
10
|
nameOrPhone?: string;
|
|
11
11
|
integrationId?: string | null;
|
|
12
|
+
tagValue?: string | null;
|
|
12
13
|
};
|
|
13
14
|
export interface AgentConversationCounts {
|
|
14
15
|
total: number;
|
|
@@ -21,16 +22,16 @@ interface BuildAgentsMenuOptions {
|
|
|
21
22
|
selectedAgentId: string | null | undefined;
|
|
22
23
|
selectedAiId: string | null | undefined;
|
|
23
24
|
onAgentSelect: (agentId: string, agentName?: string) => void;
|
|
24
|
-
|
|
25
|
+
/** Workspace assistants shown after “Unassigned”; excludes internal-only AIs */
|
|
26
|
+
assignableAis?: Ai[];
|
|
27
|
+
onAssignableAiSelect?: (aiId: string) => void;
|
|
25
28
|
onUnassigneeSelect?: () => void;
|
|
26
29
|
t: any;
|
|
27
|
-
crumbyAi?: Ai;
|
|
28
30
|
includeAllOption?: boolean;
|
|
29
31
|
onAllSelect?: () => void;
|
|
30
32
|
addSeparatorAtLast?: boolean;
|
|
31
33
|
counts?: AgentConversationCounts;
|
|
32
34
|
showAllAgents?: boolean;
|
|
33
|
-
isCrumbyEnabled?: boolean;
|
|
34
35
|
}
|
|
35
36
|
interface BuildLifeCycleMenuOptions {
|
|
36
37
|
convStages: Tag[];
|
|
@@ -46,8 +47,16 @@ export declare function isOutside24HourWindow(message: Message | null | undefine
|
|
|
46
47
|
export declare function formatSeconds(value: number): string;
|
|
47
48
|
export declare const getMessageStatusIcon: (message: Message | null | undefined) => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
48
49
|
export declare const getDisplayName: (clientData: ClientQuery['client'] | undefined) => string;
|
|
49
|
-
export declare const buildAgentsMenu: ({ agents, myAgent, selectedAgentId, selectedAiId, onAgentSelect,
|
|
50
|
+
export declare const buildAgentsMenu: ({ agents, myAgent, selectedAgentId, selectedAiId, onAgentSelect, assignableAis, onAssignableAiSelect, onUnassigneeSelect, t, includeAllOption, onAllSelect, addSeparatorAtLast, counts, showAllAgents, }: BuildAgentsMenuOptions) => ActionItem[];
|
|
50
51
|
export declare const buildLifeCycleMenu: ({ convStages, selectedStageId, onStageSelect, t, addSeparatorAtLast, }: BuildLifeCycleMenuOptions) => ActionItem[];
|
|
52
|
+
interface BuildTagsMenuOptions {
|
|
53
|
+
conversationTags: Tag[];
|
|
54
|
+
selectedTagValue: string | null | undefined;
|
|
55
|
+
onTagSelect: (tagValue: string) => void;
|
|
56
|
+
onAllSelect: () => void;
|
|
57
|
+
t: any;
|
|
58
|
+
}
|
|
59
|
+
export declare const buildTagsMenu: ({ conversationTags, selectedTagValue, onTagSelect, onAllSelect, t, }: BuildTagsMenuOptions) => ActionItem[];
|
|
51
60
|
export declare const formatPhoneForWhatsApp: (phone: string | null | undefined) => string;
|
|
52
61
|
interface BuildChannelsMenuOptions {
|
|
53
62
|
integrations: Integration[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Ai } from '../../../graphql.autogenerated';
|
|
2
|
+
/** Stored name for the primary Crumby assistant record */
|
|
3
|
+
export declare const CRUMBY_AI_RECORD_NAME = "Crumby AI";
|
|
4
|
+
/** Primary Crumby assistant rows first, then remaining AIs by name */
|
|
5
|
+
export declare function sortInboxAssignableAis(ais: Ai[]): Ai[];
|
|
6
|
+
/**
|
|
7
|
+
* Workspace AIs users may assign or filter by in the inbox.
|
|
8
|
+
* Excludes internal assistants and hides Crumby when the feature flag is off.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getInboxAssignableAis(aiAgents: Ai[] | undefined, isCrumbyEnabled: boolean): Ai[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LineHeightRem, TextSizeRem } from '@bcrumbs.net/bc-ui';
|
|
2
|
+
/** Desktop → mobile font step-up for inbox UI */
|
|
3
|
+
export declare const mobileText: (desktop: TextSizeRem, mobile: TextSizeRem, isMobile: boolean) => TextSizeRem;
|
|
4
|
+
export declare const mobileLineHeight: (desktop: LineHeightRem, mobile: LineHeightRem, isMobile: boolean) => LineHeightRem;
|
|
5
|
+
export declare const mobileFullWidthButtonCss: import("@emotion/react").SerializedStyles;
|
|
6
|
+
export declare const bcChatMobileFontVars: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function isQuickReplyPickerDraft(draft: string): boolean;
|
|
2
|
+
export declare function parseQuickReplyQuery(draft: string): string | null;
|
|
3
|
+
export declare function normalizeQuickReplyCommand(command: string): string;
|
|
4
|
+
export declare function formatQuickReplyCommand(command: string): string;
|
|
5
|
+
export interface QuickReplyPickerItem {
|
|
6
|
+
id: string;
|
|
7
|
+
command: string;
|
|
8
|
+
content: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function filterQuickReplies<T extends {
|
|
11
|
+
command: string;
|
|
12
|
+
}>(items: T[], draft: string): T[];
|
|
13
|
+
export declare function clampHighlightedIndex(index: number, itemCount: number): number;
|
|
@@ -3,10 +3,6 @@ import { CommandPaletteItem } from './CommandPalette';
|
|
|
3
3
|
export declare const HeaderContainer: import("@emotion/styled").StyledComponent<{
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
5
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
6
|
-
} & {
|
|
7
|
-
rtl: boolean;
|
|
8
|
-
mobileInboxVersion: boolean;
|
|
9
|
-
hasSubMenu?: boolean | undefined;
|
|
10
6
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
7
|
export declare const Separator: import("@emotion/styled").StyledComponent<{
|
|
12
8
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -12,7 +12,7 @@ export declare const ManagementSubmenu: ({
|
|
|
12
12
|
}[];
|
|
13
13
|
} | {
|
|
14
14
|
title: string;
|
|
15
|
-
items: {
|
|
15
|
+
items: ({
|
|
16
16
|
label: string;
|
|
17
17
|
title: string;
|
|
18
18
|
link: string;
|
|
@@ -20,7 +20,17 @@ export declare const ManagementSubmenu: ({
|
|
|
20
20
|
action: string;
|
|
21
21
|
description: string;
|
|
22
22
|
tags: string[];
|
|
23
|
-
|
|
23
|
+
hide?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
label: string;
|
|
26
|
+
hide: boolean;
|
|
27
|
+
title: string;
|
|
28
|
+
link: string;
|
|
29
|
+
icon: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
30
|
+
action: string;
|
|
31
|
+
description: string;
|
|
32
|
+
tags: string[];
|
|
33
|
+
})[];
|
|
24
34
|
hide?: undefined;
|
|
25
35
|
})[];
|
|
26
36
|
export declare const ContactSubmenu: {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { MobileViews } from '../../inbox/components/Shared/Inbox';
|
|
3
|
+
type MobileInboxNavContextValue = {
|
|
4
|
+
activePage: MobileViews;
|
|
5
|
+
setActivePage: (page: MobileViews) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const MobileInboxNavProvider: ({ children }: PropsWithChildren) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const useMobileInboxNav: () => MobileInboxNavContextValue;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { QuickReply } from '../../../graphql.autogenerated';
|
|
2
|
+
interface CreateQuickReplyProps {
|
|
3
|
+
quickReply?: QuickReply;
|
|
4
|
+
onSuccess?: () => void;
|
|
5
|
+
onCancel?: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare const CreateQuickReply: ({ quickReply, onSuccess, onCancel }: CreateQuickReplyProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default CreateQuickReply;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type WebhookHeaderEntry = {
|
|
2
|
+
key: string;
|
|
3
|
+
value: string;
|
|
4
|
+
};
|
|
5
|
+
interface WebhookHeadersEditorProps {
|
|
6
|
+
entries: WebhookHeaderEntry[];
|
|
7
|
+
onChange: (entries: WebhookHeaderEntry[]) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function entriesToHeadersRecord(entries: WebhookHeaderEntry[]): Record<string, string> | undefined;
|
|
10
|
+
export declare function hasIncompleteHeaderEntry(entries: WebhookHeaderEntry[]): boolean;
|
|
11
|
+
declare const WebhookHeadersEditor: ({ entries, onChange }: WebhookHeadersEditorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default WebhookHeadersEditor;
|
|
@@ -10,6 +10,7 @@ interface ChannelTypeCardProps {
|
|
|
10
10
|
channels: ChannelIntegration[];
|
|
11
11
|
onChannelDelete: (id: string) => void;
|
|
12
12
|
onChannelCreated: () => void;
|
|
13
|
+
loading?: boolean;
|
|
13
14
|
}
|
|
14
|
-
declare const ChannelTypeCard: ({ type, channels, onChannelDelete, onChannelCreated }: ChannelTypeCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare const ChannelTypeCard: ({ type, channels, onChannelDelete, onChannelCreated, loading }: ChannelTypeCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
16
|
export default ChannelTypeCard;
|
|
@@ -7,6 +7,10 @@ export type OnboardingChecklistState = {
|
|
|
7
7
|
completed: Record<OnboardingChecklistStepId, boolean>;
|
|
8
8
|
};
|
|
9
9
|
export declare const ONBOARDING_CHECKLIST_STEP_IDS: OnboardingChecklistStepId[];
|
|
10
|
+
/** Last checklist steps; only shown when Crumby / workspace AI is enabled */
|
|
11
|
+
export declare const ONBOARDING_CHECKLIST_CRUMBY_STEP_IDS: OnboardingChecklistStepId[];
|
|
12
|
+
export declare function getApplicableOnboardingChecklistStepIds(isCrumbyEnabled: boolean): OnboardingChecklistStepId[];
|
|
13
|
+
export declare function isOnboardingChecklistCompleteForCrumbySetting(state: OnboardingChecklistState, isCrumbyEnabled: boolean): boolean;
|
|
10
14
|
export declare function getOnboardingChecklistStorageKey(userId: string | number): string;
|
|
11
15
|
export declare function getOnboardingChecklistPendingKey(userId: string | number): string;
|
|
12
16
|
/** One-shot: open checklist popover after sign-in (session tab only). */
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { IntegrationWithSecrets } from '../../../../../graphql.autogenerated';
|
|
2
2
|
import { FBPage } from '../../../hooks/useFBPagesHook';
|
|
3
|
-
export declare function PagePickerPopup({ onClose, setInitialValues, token, pages, }: {
|
|
3
|
+
export declare function PagePickerPopup({ onClose, setInitialValues, token, pages, rtl, }: {
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
setInitialValues: (initialResource: Partial<IntegrationWithSecrets>) => void;
|
|
6
6
|
token?: string;
|
|
7
7
|
pages: FBPage[];
|
|
8
|
+
rtl?: boolean;
|
|
8
9
|
}): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,26 +1,13 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { Color } from '@bcrumbs.net/bc-ui';
|
|
3
|
-
import { PlanFrequency } from '../../constants/Plans';
|
|
4
1
|
export type PlanCardProps = {
|
|
5
|
-
upgrading?: boolean;
|
|
6
|
-
onActionClick?: () => void;
|
|
7
|
-
available?: boolean;
|
|
8
|
-
current?: boolean;
|
|
9
|
-
processing?: boolean;
|
|
10
|
-
loading?: boolean;
|
|
11
|
-
children?: ReactNode;
|
|
12
|
-
frequency: PlanFrequency;
|
|
13
2
|
name: string;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
borderColor?: Color;
|
|
24
|
-
boxBorderColor?: Color;
|
|
3
|
+
price: number;
|
|
4
|
+
subtitle: string;
|
|
5
|
+
features: string[];
|
|
6
|
+
isCurrent: boolean;
|
|
7
|
+
isPopular?: boolean;
|
|
8
|
+
onChoose: () => void;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
processing?: boolean;
|
|
11
|
+
available?: boolean;
|
|
25
12
|
};
|
|
26
|
-
export declare function PlanCard({
|
|
13
|
+
export declare function PlanCard({ name, price, subtitle, features, isCurrent, isPopular, onChoose, loading, processing, available, }: PlanCardProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { PlanTypes } from '../../constants/Plans';
|
|
2
|
-
import { PlanType } from '../../../../graphql.billing.autogenerated';
|
|
2
|
+
import { PlanType, Term } from '../../../../graphql.billing.autogenerated';
|
|
3
3
|
type ShowcasePlansProps = {
|
|
4
|
-
onPlanPicked: (plan: PlanTypes) => void;
|
|
4
|
+
onPlanPicked: (plan: PlanTypes, term: Term, includeAi: boolean) => void;
|
|
5
5
|
disableFreePlan?: boolean;
|
|
6
6
|
currentPlanType?: PlanType | null;
|
|
7
|
-
|
|
7
|
+
/** The billing term the user is currently subscribed to */
|
|
8
|
+
currentTerm?: Term | null;
|
|
9
|
+
/** When true, no plan is highlighted as the current subscription (e.g. new workspace creation). */
|
|
10
|
+
selectingPlan?: boolean;
|
|
8
11
|
processing?: boolean;
|
|
9
12
|
loadingPlanType?: PlanType | null;
|
|
10
13
|
};
|
|
11
|
-
export declare const ShowcasePlans: ({ onPlanPicked, disableFreePlan, currentPlanType,
|
|
14
|
+
export declare const ShowcasePlans: ({ onPlanPicked, disableFreePlan, currentPlanType, currentTerm, selectingPlan, processing, loadingPlanType, }: ShowcasePlansProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
15
|
export default ShowcasePlans;
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
isEditing: boolean;
|
|
3
|
-
onEdit: () => void;
|
|
4
|
-
onSave: () => void;
|
|
5
|
-
loading: boolean;
|
|
6
|
-
onCancel: () => void;
|
|
7
|
-
disabledSave: boolean;
|
|
8
|
-
workspaceId?: number;
|
|
9
|
-
}
|
|
10
|
-
declare const SubscriptionHeader: ({ isEditing, onEdit, onSave, onCancel, loading, disabledSave, workspaceId, }: SubscriptionHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
1
|
+
declare const SubscriptionHeader: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
2
|
export default SubscriptionHeader;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SubscriptionStatus } from '../../../../graphql.billing.autogenerated';
|
|
2
|
+
type SubscriptionPlanLabelProps = {
|
|
3
|
+
planLabel: string;
|
|
4
|
+
status?: SubscriptionStatus | null;
|
|
5
|
+
};
|
|
6
|
+
export declare function SubscriptionPlanLabel({ planLabel, status }: SubscriptionPlanLabelProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function isSubscriptionCancelled(status?: SubscriptionStatus | null): boolean;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type SubscriptionProfileCardProps = {
|
|
2
|
+
workspaceId?: string | number;
|
|
3
|
+
subscriptionCreateDate: string;
|
|
4
|
+
isEditing: boolean;
|
|
5
|
+
onEdit: () => void;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
loading: boolean;
|
|
8
|
+
name?: string;
|
|
9
|
+
onNameChange?: (name: string) => void;
|
|
10
|
+
handleUpdateCompany?: (name: string) => Promise<void>;
|
|
11
|
+
disabledSave: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare const SubscriptionProfileCard: ({ subscriptionCreateDate, isEditing, onEdit, onCancel, loading, name, onNameChange, handleUpdateCompany, disabledSave, workspaceId: workspaceIdProp, }: SubscriptionProfileCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default SubscriptionProfileCard;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type SubscriptionUsageCardProps = {
|
|
2
|
+
usersCount: number;
|
|
3
|
+
workspaceId?: number;
|
|
4
|
+
};
|
|
5
|
+
declare const SubscriptionUsageCard: ({ usersCount, workspaceId }: SubscriptionUsageCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default SubscriptionUsageCard;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
type SubscriptionProfileRouteProps = {
|
|
2
|
-
|
|
2
|
+
/** Company / workspace id from membership (REST); used for invite/remove context switching, not for core GraphQL Int `workspaceId`. */
|
|
3
|
+
subscriptionId?: number | string;
|
|
3
4
|
users: any[];
|
|
4
5
|
refetchUsers: any;
|
|
5
6
|
loadingUsers: boolean;
|
|
6
|
-
inviteUser: (email: string) => Promise<unknown>;
|
|
7
|
+
inviteUser: (companyId: number, email: string) => Promise<unknown>;
|
|
7
8
|
removeUserFromCompany: (companyId: number, userId: string) => Promise<unknown>;
|
|
8
9
|
};
|
|
9
10
|
export declare const SubscriptionUsers: (props: SubscriptionProfileRouteProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|