@bcrumbs.net/inbox 0.0.55 → 0.0.59
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/{cb9c022b3cf80e0f.svg → 2998ffe42c3436c0.svg} +43 -43
- package/{594c01a9720e0657.svg → 396ba1d86a9997b1.svg} +42 -42
- package/assets/ar/inbox.json +268 -263
- package/assets/en/inbox.json +270 -265
- package/d9e9a351fe00b4f8.png +0 -0
- package/index.cjs.d.ts +1 -1
- package/index.cjs.js +24277 -15000
- package/index.esm.d.ts +1 -1
- package/index.esm.js +24282 -15005
- package/package.json +3 -3
- package/src/app/auth/utils/getValidWorkspaceId.d.ts +4 -0
- package/src/app/broadcast/utils/helper.d.ts +2 -1
- package/src/app/contact/components/ContactFormFields.d.ts +1 -2
- package/src/app/contact/config/contactForm.d.ts +0 -3
- package/src/app/dashboard/components/DashboardSections.d.ts +6 -2
- package/src/app/dashboard/components/OpenedChatsCard.d.ts +2 -1
- package/src/app/dashboard/components/TagPerformanceCard.d.ts +8 -0
- package/src/app/dashboard/utils/dateHelpers.d.ts +3 -0
- package/src/app/dashboard/utils/reportHelpers.d.ts +16 -0
- package/src/app/inbox/components/Chat/ChatContent.d.ts +1 -0
- package/src/app/inbox/components/Chat/ChatHeader.d.ts +7 -3
- package/src/app/inbox/components/Chat/QuickReplyPickerMenu.d.ts +14 -0
- package/src/app/inbox/components/Chat/index.d.ts +4 -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 +2 -1
- package/src/app/inbox/components/NewConvList/HeaderSection.d.ts +3 -7
- package/src/app/inbox/components/NewConvList/index.d.ts +2 -1
- package/src/app/inbox/components/Shared/SharedStyle.d.ts +0 -6
- package/src/app/inbox/hooks/useCanContribute.d.ts +4 -2
- 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/useMyAgent.d.ts +2 -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 +9 -0
- package/src/app/inbox/utils/quickReplyPicker.d.ts +13 -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/onboarding/components/OnboardingChecklistWidget.d.ts +2 -1
- package/src/app/resources/components/Integrations/Facebook/PagePickerPopup.d.ts +1 -2
- package/src/app/resources/components/Integrations/Facebook/index.d.ts +3 -1
- package/src/app/resources/hooks/useFBPagesHook.d.ts +1 -0
- package/src/app/subscriptions/components/Plans/ShowcasePlans.d.ts +3 -1
- package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionProfile.d.ts +0 -1
- package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionUsageCard.d.ts +1 -2
- package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionUsers.d.ts +1 -1
- package/src/app/subscriptions/components/SubscriptionSettings/index.d.ts +6 -0
- package/src/app/subscriptions/utils/newWorkspaceContext.d.ts +5 -0
- package/src/assets/locales/translations.d.ts +43 -0
- package/src/graphql.autogenerated.d.ts +170 -3
- package/src/graphql.billing.autogenerated.d.ts +169 -0
- package/src/lib/conversation-chat.d.ts +1 -1
- package/src/utils/zohoOAuth.d.ts +16 -0
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.
|
|
4
|
+
"version": "0.0.59",
|
|
5
5
|
"keyword": [
|
|
6
6
|
"bcrumbs",
|
|
7
7
|
"bc-ui",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"graphql": "15.4.0"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@bcrumbs.net/bc-shared": "^0.0.
|
|
28
|
-
"@bcrumbs.net/bc-ui": "^0.0.
|
|
27
|
+
"@bcrumbs.net/bc-shared": "^0.0.10",
|
|
28
|
+
"@bcrumbs.net/bc-ui": "^0.0.15",
|
|
29
29
|
"@bcrumbs.net/bc-api": "^0.0.47",
|
|
30
30
|
"@azure/storage-blob": "^12.25.0"
|
|
31
31
|
},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const formatLocalizedDate: (date: string | null | undefined, locale?: string) => string;
|
|
2
|
+
export declare const fullDateTimeFormat: (date: string | null | undefined, locale?: string) => string;
|
|
2
3
|
/**
|
|
3
4
|
* Template sends store `content` as JSON: `{ name, language: { code }, components }`.
|
|
4
5
|
*/
|
|
@@ -2,9 +2,8 @@ import { Tag } from '../../../graphql.autogenerated';
|
|
|
2
2
|
interface ContactFormFieldsProps {
|
|
3
3
|
renderField: any;
|
|
4
4
|
isEditMode?: boolean;
|
|
5
|
-
isPhoneReadOnly?: boolean;
|
|
6
5
|
renderDroplistField?: any;
|
|
7
6
|
clientStages?: Tag[];
|
|
8
7
|
}
|
|
9
|
-
declare const ContactFormFields: ({ renderField, renderDroplistField, isEditMode,
|
|
8
|
+
declare const ContactFormFields: ({ renderField, renderDroplistField, isEditMode, clientStages, }: ContactFormFieldsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
9
|
export default ContactFormFields;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Agent, AgentsReportQuery, ConvsReportQuery, Conversation } from '../../../graphql.autogenerated';
|
|
1
|
+
import { Agent, AgentsReportQuery, ConvTagsReportQuery, ConvsReportQuery, Conversation } from '../../../graphql.autogenerated';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
type AgentReportNode = NonNullable<AgentsReportQuery['agentsReport']['nodes']>[number];
|
|
4
|
+
type ConvTagReportNode = NonNullable<ConvTagsReportQuery['convTagsReport']['nodes']>[number];
|
|
4
5
|
type ConvReportNode = NonNullable<ConvsReportQuery['convsReport']['nodes']>[number];
|
|
5
6
|
type ReportNode = AgentReportNode | ConvReportNode;
|
|
6
7
|
interface DashboardSectionsProps {
|
|
@@ -9,6 +10,8 @@ interface DashboardSectionsProps {
|
|
|
9
10
|
agentsReportData?: AgentReportNode[];
|
|
10
11
|
agentsLoading?: boolean;
|
|
11
12
|
agentsReportLoading?: boolean;
|
|
13
|
+
convTagsReportData?: ConvTagReportNode[];
|
|
14
|
+
convTagsReportLoading?: boolean;
|
|
12
15
|
totalMessages?: number;
|
|
13
16
|
convsLoading?: boolean;
|
|
14
17
|
integrationId?: string;
|
|
@@ -18,7 +21,8 @@ interface DashboardSectionsProps {
|
|
|
18
21
|
liveConvs?: Conversation[] | null;
|
|
19
22
|
startDate: string;
|
|
20
23
|
endDate: string;
|
|
24
|
+
selectedPeriod: string;
|
|
21
25
|
reportNodes: ReportNode[];
|
|
22
26
|
}
|
|
23
|
-
declare const _default: React.MemoExoticComponent<({ agentsData, allAgentsData, agentsReportData, agentsLoading, agentsReportLoading, totalMessages, convsLoading, integrationId, agentIds, assignedConversations, unassignedConversations, liveConvs, startDate, endDate, reportNodes, }: DashboardSectionsProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
|
|
27
|
+
declare const _default: React.MemoExoticComponent<({ agentsData, allAgentsData, agentsReportData, agentsLoading, agentsReportLoading, convTagsReportData, convTagsReportLoading, totalMessages, convsLoading, integrationId, agentIds, assignedConversations, unassignedConversations, liveConvs, startDate, endDate, selectedPeriod, reportNodes, }: DashboardSectionsProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
|
|
24
28
|
export default _default;
|
|
@@ -2,7 +2,8 @@ export interface AllChatsCardProps {
|
|
|
2
2
|
totalMessages?: number;
|
|
3
3
|
assignedConversations?: number;
|
|
4
4
|
unassignedConversations?: number;
|
|
5
|
+
selectedPeriod?: string;
|
|
5
6
|
loading?: boolean;
|
|
6
7
|
}
|
|
7
|
-
declare const OpenedChatsCard: ({ totalMessages, assignedConversations, unassignedConversations, loading, }: AllChatsCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const OpenedChatsCard: ({ totalMessages, assignedConversations, unassignedConversations, selectedPeriod, loading, }: AllChatsCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
9
|
export default OpenedChatsCard;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ConvTagsReportQuery } from '../../../graphql.autogenerated';
|
|
2
|
+
type ConvTagReportNode = NonNullable<ConvTagsReportQuery['convTagsReport']['nodes']>[number];
|
|
3
|
+
interface TagPerformanceCardProps {
|
|
4
|
+
data?: ConvTagReportNode[];
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const TagPerformanceCard: ({ data, loading }: TagPerformanceCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default TagPerformanceCard;
|
|
@@ -21,4 +21,7 @@ export declare const getBroadcastReportQueryDateRange: (period?: string) => {
|
|
|
21
21
|
startDate?: string;
|
|
22
22
|
endDate?: string;
|
|
23
23
|
};
|
|
24
|
+
export declare const PERIOD_TRANSLATION_KEYS: Record<string, string>;
|
|
25
|
+
export declare const getPeriodTranslationKey: (period: string) => string;
|
|
26
|
+
export declare const isDateInRange: (date: string | Date, startDate: string, endDate: string) => boolean;
|
|
24
27
|
export declare const formatTime: (seconds: number) => string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TODO(remove by 2026-12-04): Delete the legacy fallback branch in getFirstResponseWeightForReport
|
|
3
|
+
* six months after firstResponseConversationCount shipped. By then, pre-migration report rows
|
|
4
|
+
* should no longer need conversationCount as a stand-in weight.
|
|
5
|
+
*/
|
|
6
|
+
/** Fields needed to weight avgFirstResponseTime when aggregating report rows. */
|
|
7
|
+
export type FirstResponseReportSlice = {
|
|
8
|
+
conversationCount?: number | null;
|
|
9
|
+
firstResponseConversationCount?: number | null;
|
|
10
|
+
avgFirstResponseTime?: number | null;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Weight for blending avgFirstResponseTime across report nodes.
|
|
14
|
+
* Uses firstResponseConversationCount when present.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getFirstResponseWeightForReport(node: FirstResponseReportSlice): number;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Conversation } from '../../../../../src/graphql.autogenerated';
|
|
3
3
|
interface Props {
|
|
4
4
|
selectedConv: Conversation;
|
|
5
|
-
onConvEnd?: () => void;
|
|
5
|
+
onConvEnd?: (endedConvId: string) => void;
|
|
6
6
|
showEndConversationButton?: boolean;
|
|
7
7
|
searchPattern?: string;
|
|
8
8
|
onSearchChange?: (value: string) => void;
|
|
@@ -13,8 +13,12 @@ interface Props {
|
|
|
13
13
|
isLoadingOlderMessages?: boolean;
|
|
14
14
|
onLoadOlderMessages?: () => void;
|
|
15
15
|
}
|
|
16
|
-
export declare const HeaderContainer: import("styled
|
|
16
|
+
export declare const HeaderContainer: import("@emotion/styled").StyledComponent<import("@bcrumbs.net/bc-ui").HorizontalLayoutProps & {
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
} & {
|
|
19
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
20
|
+
} & {
|
|
17
21
|
rtl: boolean;
|
|
18
|
-
},
|
|
22
|
+
}, {}, {}>;
|
|
19
23
|
declare const ChatHeader: React.FC<Props>;
|
|
20
24
|
export default ChatHeader;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Ref } from 'react';
|
|
2
|
+
import { QuickReplyPickerItem } from '../../utils/quickReplyPicker';
|
|
3
|
+
import type { QuickReplyPickerAnchor } from '../../hooks/useQuickReplyPickerAnchor';
|
|
4
|
+
export interface QuickReplyPickerMenuProps {
|
|
5
|
+
anchor: QuickReplyPickerAnchor;
|
|
6
|
+
items: QuickReplyPickerItem[];
|
|
7
|
+
highlightedIndex: number;
|
|
8
|
+
emptyLabel: string;
|
|
9
|
+
menuRef?: Ref<HTMLDivElement>;
|
|
10
|
+
onHighlight: (index: number) => void;
|
|
11
|
+
onSelect: (item: QuickReplyPickerItem) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const QuickReplyPickerMenu: ({ anchor, items, highlightedIndex, emptyLabel, menuRef, onHighlight, onSelect, }: QuickReplyPickerMenuProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default QuickReplyPickerMenu;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ContactMessagePayload, Conversation, Agent } from '../../../../graphql.autogenerated';
|
|
2
2
|
interface Props {
|
|
3
3
|
selectedConv?: Conversation;
|
|
4
|
-
onConvEnd?: () => void;
|
|
4
|
+
onConvEnd?: (endedConvId: string) => void;
|
|
5
5
|
agents?: Agent[];
|
|
6
6
|
logo?: string;
|
|
7
7
|
rtl: boolean;
|
|
@@ -15,6 +15,8 @@ interface Props {
|
|
|
15
15
|
onContactAddContact?: (contact: ContactMessagePayload) => void;
|
|
16
16
|
/** When false, hides the chat header (search, end conversation, etc.). Default true. */
|
|
17
17
|
showHeader?: boolean;
|
|
18
|
+
/** Auth user type (e.g. apiKey). Passed by embedded inbox; omit in portal inbox. */
|
|
19
|
+
userType?: string;
|
|
18
20
|
}
|
|
19
|
-
declare const Chat: ({ selectedConv, onConvEnd, agents, logo, rtl, convsLength, loadingConvs, handleStartConversation, showNoResults, onContactMessage, onContactAddContact, showHeader, }: Props) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare const Chat: ({ selectedConv, onConvEnd, agents, logo, rtl, convsLength, loadingConvs, handleStartConversation, showNoResults, onContactMessage, onContactAddContact, showHeader, userType, }: Props) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
22
|
export default Chat;
|
|
@@ -2,7 +2,7 @@ import { Agent, Conversation, Tag } from '../../../../../graphql.autogenerated';
|
|
|
2
2
|
interface Props {
|
|
3
3
|
conv: Conversation;
|
|
4
4
|
stages: Tag[];
|
|
5
|
-
onConvEnd?: () => void;
|
|
5
|
+
onConvEnd?: (endedConvId: string) => void;
|
|
6
6
|
agents?: Agent[];
|
|
7
7
|
}
|
|
8
8
|
export default function ActionsMenu({ conv, stages, onConvEnd, agents, }: Props): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -12,6 +12,7 @@ interface FilterDrawerProps {
|
|
|
12
12
|
assignableAis: Ai[];
|
|
13
13
|
rtl: boolean;
|
|
14
14
|
conversations: Conversation[];
|
|
15
|
+
conversationTags: Tag[];
|
|
15
16
|
}
|
|
16
|
-
declare const FilterDrawer: ({ isOpen, onClose, filters, onFiltersChange, agents, convStages, integrations, myAgent, assignableAis, rtl, conversations, }: FilterDrawerProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
17
|
+
declare const FilterDrawer: ({ isOpen, onClose, filters, onFiltersChange, agents, convStages, integrations, myAgent, assignableAis, rtl, conversations, conversationTags, }: FilterDrawerProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
17
18
|
export default FilterDrawer;
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import { ActionItem } from '@bcrumbs.net/bc-ui';
|
|
2
2
|
import { ConvsFilters } from '../../utils/convs';
|
|
3
|
-
import { Agent, Ai, Tag } from '../../../../graphql.autogenerated';
|
|
4
3
|
interface HeaderSectionProps {
|
|
5
4
|
agentsMenu: ActionItem[];
|
|
6
5
|
lifeCycleMenu: ActionItem[];
|
|
6
|
+
channelsMenu: ActionItem[];
|
|
7
|
+
tagsMenu: ActionItem[];
|
|
7
8
|
filters: ConvsFilters;
|
|
8
|
-
agents: Agent[];
|
|
9
|
-
convStages: Tag[];
|
|
10
|
-
myAgent: Agent | undefined;
|
|
11
9
|
onFiltersChange: (filters: ConvsFilters) => void;
|
|
12
10
|
setShowStartConv: (show: boolean) => void;
|
|
13
|
-
/** Used to resolve the assignee filter label when filtering by AI */
|
|
14
|
-
aiAgents?: Ai[];
|
|
15
11
|
isTestVariant?: boolean;
|
|
16
12
|
isDrawerOpen?: boolean;
|
|
17
13
|
onFilterDrawerOpen?: () => void;
|
|
18
14
|
}
|
|
19
|
-
declare const HeaderSection: ({ agentsMenu, lifeCycleMenu,
|
|
15
|
+
declare const HeaderSection: ({ agentsMenu, lifeCycleMenu, channelsMenu, tagsMenu, filters, onFiltersChange, setShowStartConv, isTestVariant, isDrawerOpen, onFilterDrawerOpen, }: HeaderSectionProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
16
|
export default HeaderSection;
|
|
@@ -4,6 +4,7 @@ import { Agent, Ai, Conversation, Integration, Tag } from '../../../../graphql.a
|
|
|
4
4
|
interface NewConvListProps {
|
|
5
5
|
agents: Agent[];
|
|
6
6
|
convStages: Tag[];
|
|
7
|
+
conversationTags: Tag[];
|
|
7
8
|
convs: Conversation[];
|
|
8
9
|
loading: boolean;
|
|
9
10
|
selectedConvId?: string;
|
|
@@ -19,5 +20,5 @@ interface NewConvListProps {
|
|
|
19
20
|
isDrawerOpen?: boolean;
|
|
20
21
|
onFilterDrawerOpen?: () => void;
|
|
21
22
|
}
|
|
22
|
-
declare const NewConvList: ({ agents, convStages, convs, loading, selectedConvId, convClicked, onConvEnd, filters, onFiltersChange, setShowStartConv, aiAgents, integrations, scrollContainerRef, isTestVariant, isDrawerOpen, onFilterDrawerOpen, }: NewConvListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare const NewConvList: ({ agents, convStages, conversationTags, convs, loading, selectedConvId, convClicked, onConvEnd, filters, onFiltersChange, setShowStartConv, aiAgents, integrations, scrollContainerRef, isTestVariant, isDrawerOpen, onFilterDrawerOpen, }: NewConvListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
24
|
export default NewConvList;
|
|
@@ -13,12 +13,6 @@ export declare const DetailsSectionLabel: import("@emotion/styled").StyledCompon
|
|
|
13
13
|
export declare const EditButton: import("@emotion/styled").StyledComponent<import("@bcrumbs.net/bc-ui").ButtonProps & import("react").RefAttributes<HTMLButtonElement> & {
|
|
14
14
|
theme?: import("@emotion/react").Theme | undefined;
|
|
15
15
|
}, {}, {}>;
|
|
16
|
-
export declare const TagContainer: import("@emotion/styled").StyledComponent<{
|
|
17
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
18
|
-
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
19
|
-
} & {
|
|
20
|
-
$isMobile?: boolean | undefined;
|
|
21
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
22
16
|
export declare const ClientDetailsContainer: import("@emotion/styled").StyledComponent<{
|
|
23
17
|
theme?: import("@emotion/react").Theme | undefined;
|
|
24
18
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { Role } from '@bcrumbs.net/bc-shared';
|
|
1
2
|
import { Agent, Conversation } from '../../../graphql.autogenerated';
|
|
2
3
|
interface Props {
|
|
3
|
-
|
|
4
|
+
role?: Role;
|
|
4
5
|
selectedConv?: Conversation;
|
|
5
6
|
myAgent?: Agent;
|
|
7
|
+
userType?: string;
|
|
6
8
|
}
|
|
7
|
-
declare const useCanContribute: ({
|
|
9
|
+
declare const useCanContribute: ({ role, selectedConv, myAgent, userType }: Props) => boolean;
|
|
8
10
|
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;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
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;
|
|
2
4
|
/**
|
|
3
5
|
* Resolves the workspace agent for the current session.
|
|
4
6
|
* Portal users match on agent.userId; agent-linked API keys authenticate with agent.id.
|
|
@@ -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;
|
|
@@ -48,6 +49,14 @@ export declare const getMessageStatusIcon: (message: Message | null | undefined)
|
|
|
48
49
|
export declare const getDisplayName: (clientData: ClientQuery['client'] | undefined) => string;
|
|
49
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,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;
|
|
@@ -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;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { IntegrationWithSecrets } from '../../../../../graphql.autogenerated';
|
|
2
2
|
import { FBPage } from '../../../hooks/useFBPagesHook';
|
|
3
|
-
export declare function PagePickerPopup({ onClose, setInitialValues,
|
|
3
|
+
export declare function PagePickerPopup({ onClose, setInitialValues, pages, rtl, }: {
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
setInitialValues: (initialResource: Partial<IntegrationWithSecrets>) => void;
|
|
6
|
-
token?: string;
|
|
7
6
|
pages: FBPage[];
|
|
8
7
|
rtl?: boolean;
|
|
9
8
|
}): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -4,7 +4,9 @@ import { IntegrationFlowComponentProps } from '../types';
|
|
|
4
4
|
import { ChannelFlowExtendedProps } from '../RenderCorrectIntegrationFlow';
|
|
5
5
|
type Props = IntegrationFlowComponentProps<IntegrationWithSecrets> & ChannelFlowExtendedProps;
|
|
6
6
|
export declare const FacebookMessanger: React.FC<Props>;
|
|
7
|
-
export declare const FacebookMessangerReconnect: React.FC<IntegrationFlowComponentProps<IntegrationWithSecrets
|
|
7
|
+
export declare const FacebookMessangerReconnect: React.FC<IntegrationFlowComponentProps<IntegrationWithSecrets> & {
|
|
8
|
+
pageId?: string;
|
|
9
|
+
}>;
|
|
8
10
|
export declare const InstaMessanger: React.FC<IntegrationFlowComponentProps<IntegrationWithSecrets>>;
|
|
9
11
|
export declare const InstaMessangerReconnect: React.FC<IntegrationFlowComponentProps<IntegrationWithSecrets>>;
|
|
10
12
|
export {};
|
|
@@ -6,8 +6,10 @@ type ShowcasePlansProps = {
|
|
|
6
6
|
currentPlanType?: PlanType | null;
|
|
7
7
|
/** The billing term the user is currently subscribed to */
|
|
8
8
|
currentTerm?: Term | null;
|
|
9
|
+
/** When true, no plan is highlighted as the current subscription (e.g. new workspace creation). */
|
|
10
|
+
selectingPlan?: boolean;
|
|
9
11
|
processing?: boolean;
|
|
10
12
|
loadingPlanType?: PlanType | null;
|
|
11
13
|
};
|
|
12
|
-
export declare const ShowcasePlans: ({ onPlanPicked, disableFreePlan, currentPlanType, currentTerm, processing, loadingPlanType, }: ShowcasePlansProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const ShowcasePlans: ({ onPlanPicked, disableFreePlan, currentPlanType, currentTerm, selectingPlan, processing, loadingPlanType, }: ShowcasePlansProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
15
|
export default ShowcasePlans;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
type SubscriptionUsageCardProps = {
|
|
2
|
-
subscriptionType: string;
|
|
3
2
|
usersCount: number;
|
|
4
3
|
workspaceId?: number;
|
|
5
4
|
};
|
|
6
|
-
declare const SubscriptionUsageCard: ({
|
|
5
|
+
declare const SubscriptionUsageCard: ({ usersCount, workspaceId }: SubscriptionUsageCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
6
|
export default SubscriptionUsageCard;
|
|
@@ -4,7 +4,7 @@ type SubscriptionProfileRouteProps = {
|
|
|
4
4
|
users: any[];
|
|
5
5
|
refetchUsers: any;
|
|
6
6
|
loadingUsers: boolean;
|
|
7
|
-
inviteUser: (companyId: number,
|
|
7
|
+
inviteUser: (companyId: number, Email: string, actorEmail: string) => Promise<unknown>;
|
|
8
8
|
removeUserFromCompany: (companyId: number, userId: string) => Promise<unknown>;
|
|
9
9
|
};
|
|
10
10
|
export declare const SubscriptionUsers: (props: SubscriptionProfileRouteProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Query flag for flows that create a workspace (plan pick, checkout) without using the active workspace context. */
|
|
2
|
+
export declare const NEW_WORKSPACE_QUERY_KEY = "newWorkspace";
|
|
3
|
+
export declare function isCreatingNewWorkspace(pathname: string, search: string): boolean;
|
|
4
|
+
export declare function newWorkspaceSearch(): string;
|
|
5
|
+
export declare function buildNewWorkspaceSubscriptionPath(): string;
|