@bcrumbs.net/inbox 0.0.55 → 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.
Files changed (41) hide show
  1. package/assets/ar/inbox.json +5 -0
  2. package/assets/en/inbox.json +5 -0
  3. package/d9e9a351fe00b4f8.png +0 -0
  4. package/index.cjs.js +11662 -2230
  5. package/index.esm.js +11666 -2234
  6. package/package.json +2 -2
  7. package/src/app/auth/utils/getValidWorkspaceId.d.ts +4 -0
  8. package/src/app/contact/components/ContactFormFields.d.ts +1 -2
  9. package/src/app/contact/config/contactForm.d.ts +0 -3
  10. package/src/app/dashboard/utils/reportHelpers.d.ts +16 -0
  11. package/src/app/inbox/components/Chat/ChatHeader.d.ts +7 -3
  12. package/src/app/inbox/components/Chat/QuickReplyPickerMenu.d.ts +14 -0
  13. package/src/app/inbox/components/Chat/index.d.ts +4 -2
  14. package/src/app/inbox/components/ConvsList/ConvItem/ActionsMenu.d.ts +1 -1
  15. package/src/app/inbox/components/NewConvList/ConversationItem.d.ts +1 -1
  16. package/src/app/inbox/components/NewConvList/FilterDrawer.d.ts +2 -1
  17. package/src/app/inbox/components/NewConvList/HeaderSection.d.ts +3 -7
  18. package/src/app/inbox/components/NewConvList/index.d.ts +2 -1
  19. package/src/app/inbox/hooks/useCanContribute.d.ts +2 -1
  20. package/src/app/inbox/hooks/useConvAutoComplete.d.ts +15 -0
  21. package/src/app/inbox/hooks/useConvEnhance.d.ts +17 -0
  22. package/src/app/inbox/hooks/useConvFilters.d.ts +6 -2
  23. package/src/app/inbox/hooks/useMyAgent.d.ts +2 -0
  24. package/src/app/inbox/hooks/useQuickReplyPicker.d.ts +18 -0
  25. package/src/app/inbox/hooks/useQuickReplyPickerAnchor.d.ts +7 -0
  26. package/src/app/inbox/utils/convAssistIntent.d.ts +16 -0
  27. package/src/app/inbox/utils/convAssistStorage.d.ts +12 -0
  28. package/src/app/inbox/utils/convs.d.ts +9 -0
  29. package/src/app/inbox/utils/quickReplyPicker.d.ts +13 -0
  30. package/src/app/managemnet/components/WebhookHeadersEditor.d.ts +12 -0
  31. package/src/app/managemnet/components/channels/ChannelTypeCard.d.ts +2 -1
  32. package/src/app/onboarding/components/OnboardingChecklistWidget.d.ts +2 -1
  33. package/src/app/resources/components/ListResources/Utils.d.ts +1 -0
  34. package/src/app/subscriptions/components/Plans/ShowcasePlans.d.ts +3 -1
  35. package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionProfile.d.ts +0 -1
  36. package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionUsageCard.d.ts +1 -2
  37. package/src/app/subscriptions/components/SubscriptionSettings/index.d.ts +6 -0
  38. package/src/app/subscriptions/utils/newWorkspaceContext.d.ts +5 -0
  39. package/src/assets/locales/translations.d.ts +18 -0
  40. package/src/graphql.autogenerated.d.ts +24 -2
  41. package/src/lib/conversation-chat.d.ts +1 -1
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.55",
4
+ "version": "0.0.58",
5
5
  "keyword": [
6
6
  "bcrumbs",
7
7
  "bc-ui",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@bcrumbs.net/bc-shared": "^0.0.9",
28
- "@bcrumbs.net/bc-ui": "^0.0.13",
28
+ "@bcrumbs.net/bc-ui": "^0.0.14",
29
29
  "@bcrumbs.net/bc-api": "^0.0.47",
30
30
  "@azure/storage-blob": "^12.25.0"
31
31
  },
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Returns a positive workspace id from an explicit value or auth context, or undefined if missing/invalid.
3
+ */
4
+ export declare function getValidWorkspaceId(workspaceId?: number | string | null): number | undefined;
@@ -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, isPhoneReadOnly, clientStages, }: ContactFormFieldsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
8
+ declare const ContactFormFields: ({ renderField, renderDroplistField, isEditMode, clientStages, }: ContactFormFieldsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
10
9
  export default ContactFormFields;
@@ -26,9 +26,6 @@ export declare const FORM_INIT: {
26
26
  };
27
27
  phone: {
28
28
  value: string;
29
- };
30
- externalClientId: {
31
- value: string;
32
29
  validations: {
33
30
  validationType: BCValidationTypes;
34
31
  }[];
@@ -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-components").StyledComponent<({ distance, alignItems, justifyContent, marginTop, marginRight, marginBottom, marginLeft, spaceBetween, overflow, children, width, height, dataTestid, minWidth, className, rtl, }: React.PropsWithChildren<import("@bcrumbs.net/bc-ui").HorizontalLayoutProps>) => import("@emotion/react/jsx-runtime").JSX.Element, any, {
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
- }, never>;
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;
@@ -3,7 +3,7 @@ interface ConversationItemProps {
3
3
  conv: Conversation;
4
4
  isActive?: boolean;
5
5
  convClicked: (conv: Conversation) => void;
6
- onConvEnd?: () => void;
6
+ onConvEnd?: (endedConvId: string) => void;
7
7
  agents: Agent[];
8
8
  convStages: Tag[];
9
9
  myAgent: Agent | undefined;
@@ -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, filters, agents, convStages, myAgent, onFiltersChange, setShowStartConv, aiAgents, isTestVariant, isDrawerOpen, onFilterDrawerOpen, }: HeaderSectionProps) => import("@emotion/react/jsx-runtime").JSX.Element;
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;
@@ -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;
@@ -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,2 +1,3 @@
1
- declare const OnboardingChecklistWidget: () => import("@emotion/react/jsx-runtime").JSX.Element | null;
1
+ /// <reference types="react" />
2
+ declare const OnboardingChecklistWidget: () => import("react").ReactPortal | null;
2
3
  export default OnboardingChecklistWidget;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TFunction } from "i18next";
2
3
  import { Row, Action } from "@bcrumbs.net/bc-ui";
3
4
  import { ResourceDefinition } from "../../config";
@@ -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;
@@ -2,7 +2,6 @@ type SubscriptionProfileRouteProps = {
2
2
  subscriptionId: string;
3
3
  subscriptionName: string;
4
4
  subscriptionAccountId: string;
5
- subscriptionType: string;
6
5
  subscriptionCreateDate: string;
7
6
  onUpdate: () => any;
8
7
  updateCompany: (id: string, name: string) => any;
@@ -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: ({ subscriptionType, usersCount, workspaceId }: SubscriptionUsageCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
5
+ declare const SubscriptionUsageCard: ({ usersCount, workspaceId }: SubscriptionUsageCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
6
  export default SubscriptionUsageCard;
@@ -1,3 +1,9 @@
1
+ export type WorkspaceCompany = {
2
+ Id: number;
3
+ Name: string;
4
+ AccountId?: string | null;
5
+ CreateDate?: string | null;
6
+ };
1
7
  export declare enum TABS {
2
8
  PROFILE = "PROFILE",
3
9
  USERS = "USERS",
@@ -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;
@@ -963,6 +963,13 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
963
963
  searchPlaceholder: string;
964
964
  noWebhooks: string;
965
965
  loadingMoreText: string;
966
+ headers: {
967
+ title: string;
968
+ keyPlaceholder: string;
969
+ valuePlaceholder: string;
970
+ addHeader: string;
971
+ incompleteRow: string;
972
+ };
966
973
  crm: {
967
974
  title: string;
968
975
  addIntegration: string;
@@ -1224,6 +1231,17 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
1224
1231
  label: string;
1225
1232
  description: string;
1226
1233
  };
1234
+ responseMessages: {
1235
+ cardTitle: string;
1236
+ emptyResponseFallbackMessage: {
1237
+ label: string;
1238
+ description: string;
1239
+ };
1240
+ closingMessage: {
1241
+ label: string;
1242
+ description: string;
1243
+ };
1244
+ };
1227
1245
  };
1228
1246
  };
1229
1247
  files: {
@@ -222,6 +222,8 @@ export type AgentReport = {
222
222
  createdAt: Scalars['DateTime']['output'];
223
223
  /** The CSAT percentage (4 and 5 ratings over rated conversations). */
224
224
  csat: Scalars['Float']['output'];
225
+ /** Conversations included in avgFirstResponseTime (client messaged before the agent replied). */
226
+ firstResponseConversationCount: Scalars['Int']['output'];
225
227
  id: Scalars['ID']['output'];
226
228
  /** The integration (channel) this daily aggregate was computed for, when present. */
227
229
  integrationId?: Maybe<Scalars['ID']['output']>;
@@ -926,9 +928,11 @@ export type Configurations = {
926
928
  askForName?: Maybe<Scalars['Boolean']['output']>;
927
929
  askForSurname?: Maybe<Scalars['Boolean']['output']>;
928
930
  clientTagRules?: Maybe<Array<TagRule>>;
931
+ closingMessage?: Maybe<Scalars['String']['output']>;
929
932
  constraints?: Maybe<Scalars['String']['output']>;
930
933
  contextPrompt?: Maybe<Scalars['String']['output']>;
931
934
  convTagRules?: Maybe<Array<TagRule>>;
935
+ emptyResponseFallbackMessage?: Maybe<Scalars['String']['output']>;
932
936
  endEnabled?: Maybe<Scalars['Boolean']['output']>;
933
937
  handoverEnabled?: Maybe<Scalars['Boolean']['output']>;
934
938
  personaPrompt?: Maybe<Scalars['String']['output']>;
@@ -941,9 +945,11 @@ export type ConfigurationsInput = {
941
945
  askForName?: InputMaybe<Scalars['Boolean']['input']>;
942
946
  askForSurname?: InputMaybe<Scalars['Boolean']['input']>;
943
947
  clientTagRules?: InputMaybe<Array<TagRuleInput>>;
948
+ closingMessage?: InputMaybe<Scalars['String']['input']>;
944
949
  constraints?: InputMaybe<Scalars['String']['input']>;
945
950
  contextPrompt?: InputMaybe<Scalars['String']['input']>;
946
951
  convTagRules?: InputMaybe<Array<TagRuleInput>>;
952
+ emptyResponseFallbackMessage?: InputMaybe<Scalars['String']['input']>;
947
953
  endEnabled?: InputMaybe<Scalars['Boolean']['input']>;
948
954
  handoverEnabled?: InputMaybe<Scalars['Boolean']['input']>;
949
955
  personaPrompt?: InputMaybe<Scalars['String']['input']>;
@@ -1273,6 +1279,8 @@ export type ConversationReport = {
1273
1279
  createdAt: Scalars['DateTime']['output'];
1274
1280
  /** The CSAT percentage (4 and 5 ratings over rated conversations). */
1275
1281
  csat: Scalars['Float']['output'];
1282
+ /** Conversations included in avgFirstResponseTime (client messaged before the agent replied). */
1283
+ firstResponseConversationCount: Scalars['Int']['output'];
1276
1284
  /** The hour of the conversation report. */
1277
1285
  hour: Scalars['Int']['output'];
1278
1286
  /** The id of the conversation report. */
@@ -3005,6 +3013,8 @@ export type AiFragment = {
3005
3013
  rolePrompt?: string | null;
3006
3014
  personaPrompt?: string | null;
3007
3015
  constraints?: string | null;
3016
+ emptyResponseFallbackMessage?: string | null;
3017
+ closingMessage?: string | null;
3008
3018
  clientTagRules?: Array<{
3009
3019
  __typename?: 'TagRule';
3010
3020
  tag: string;
@@ -3049,6 +3059,8 @@ export type AiQuery = {
3049
3059
  rolePrompt?: string | null;
3050
3060
  personaPrompt?: string | null;
3051
3061
  constraints?: string | null;
3062
+ emptyResponseFallbackMessage?: string | null;
3063
+ closingMessage?: string | null;
3052
3064
  clientTagRules?: Array<{
3053
3065
  __typename?: 'TagRule';
3054
3066
  tag: string;
@@ -3096,6 +3108,8 @@ export type AisQuery = {
3096
3108
  rolePrompt?: string | null;
3097
3109
  personaPrompt?: string | null;
3098
3110
  constraints?: string | null;
3111
+ emptyResponseFallbackMessage?: string | null;
3112
+ closingMessage?: string | null;
3099
3113
  clientTagRules?: Array<{
3100
3114
  __typename?: 'TagRule';
3101
3115
  tag: string;
@@ -3142,6 +3156,8 @@ export type CreateAiMutation = {
3142
3156
  rolePrompt?: string | null;
3143
3157
  personaPrompt?: string | null;
3144
3158
  constraints?: string | null;
3159
+ emptyResponseFallbackMessage?: string | null;
3160
+ closingMessage?: string | null;
3145
3161
  clientTagRules?: Array<{
3146
3162
  __typename?: 'TagRule';
3147
3163
  tag: string;
@@ -3202,6 +3218,8 @@ export type DeleteAiMutation = {
3202
3218
  rolePrompt?: string | null;
3203
3219
  personaPrompt?: string | null;
3204
3220
  constraints?: string | null;
3221
+ emptyResponseFallbackMessage?: string | null;
3222
+ closingMessage?: string | null;
3205
3223
  clientTagRules?: Array<{
3206
3224
  __typename?: 'TagRule';
3207
3225
  tag: string;
@@ -3262,6 +3280,8 @@ export type PatchAiMutation = {
3262
3280
  rolePrompt?: string | null;
3263
3281
  personaPrompt?: string | null;
3264
3282
  constraints?: string | null;
3283
+ emptyResponseFallbackMessage?: string | null;
3284
+ closingMessage?: string | null;
3265
3285
  clientTagRules?: Array<{
3266
3286
  __typename?: 'TagRule';
3267
3287
  tag: string;
@@ -3849,6 +3869,7 @@ export type AgentReportFragment = {
3849
3869
  agentMessagesCount: number;
3850
3870
  clientMessageCount: number;
3851
3871
  avgFirstResponseTime: number;
3872
+ firstResponseConversationCount: number;
3852
3873
  avgConversationTime: number;
3853
3874
  newClientConvCount?: number | null;
3854
3875
  responseRate: number;
@@ -3866,6 +3887,7 @@ export type ConversationReportFragment = {
3866
3887
  agentMessagesCount: number;
3867
3888
  clientMessageCount: number;
3868
3889
  avgFirstResponseTime: number;
3890
+ firstResponseConversationCount: number;
3869
3891
  avgConversationTime: number;
3870
3892
  newClientConvCount?: number | null;
3871
3893
  responseRate: number;
@@ -3889,6 +3911,7 @@ export type AgentsReportQuery = {
3889
3911
  agentMessagesCount: number;
3890
3912
  clientMessageCount: number;
3891
3913
  avgFirstResponseTime: number;
3914
+ firstResponseConversationCount: number;
3892
3915
  avgConversationTime: number;
3893
3916
  newClientConvCount?: number | null;
3894
3917
  responseRate: number;
@@ -3915,6 +3938,7 @@ export type ConvsReportQuery = {
3915
3938
  agentMessagesCount: number;
3916
3939
  clientMessageCount: number;
3917
3940
  avgFirstResponseTime: number;
3941
+ firstResponseConversationCount: number;
3918
3942
  avgConversationTime: number;
3919
3943
  newClientConvCount?: number | null;
3920
3944
  responseRate: number;
@@ -5751,7 +5775,6 @@ export type WorkspaceFragment = {
5751
5775
  contactPersonEmail?: string | null;
5752
5776
  contactPersonPhoneNumber?: string | null;
5753
5777
  accountId?: string | null;
5754
- subscriptionType?: string | null;
5755
5778
  createDate: any;
5756
5779
  };
5757
5780
  export type WorkspaceSettingsFragment = {
@@ -5836,7 +5859,6 @@ export type WorkspacesQuery = {
5836
5859
  contactPersonEmail?: string | null;
5837
5860
  contactPersonPhoneNumber?: string | null;
5838
5861
  accountId?: string | null;
5839
- subscriptionType?: string | null;
5840
5862
  createDate: any;
5841
5863
  }>;
5842
5864
  pageInfo: {