@bcrumbs.net/inbox 0.0.66 → 0.0.68

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/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.66",
4
+ "version": "0.0.68",
5
5
  "keyword": [
6
6
  "bcrumbs",
7
7
  "bc-ui",
@@ -21,7 +21,7 @@
21
21
  "i18n-iso-countries": "^7.0.0",
22
22
  "apollo-link-rest": "^0.9.0",
23
23
  "@apollo/client": "3.13.8",
24
- "graphql": "15.4.0"
24
+ "graphql": "^15.4.0"
25
25
  },
26
26
  "dependencies": {
27
27
  "@bcrumbs.net/bc-shared": "^0.0.11",
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Clerk's show-password button: swap its built-in icon for our BCIcons
3
+ * (ShowPassword / HidePassword) and keep it on the inline-end side so it
4
+ * mirrors with the page direction (right in LTR, left in RTL).
5
+ */
6
+ export declare const clerkPasswordToggleStyles: string;
@@ -2,12 +2,11 @@ import { ConvStagesReportQuery } from '../../../graphql.autogenerated';
2
2
  type ConvLifecycleReportNode = NonNullable<ConvStagesReportQuery['convStagesReport']['nodes']>[number];
3
3
  export type ChatsByLifeCycleCardProps = {
4
4
  convLifecycleReportData: ConvLifecycleReportNode[];
5
- /** Workspace lifecycle stage names in configured order; drives slice order and colors. */
5
+ /** Workspace lifecycle stage names in configured order; drives export column order and tie order. */
6
6
  configuredStages?: string[];
7
- selectedPeriod?: string;
8
7
  loading?: boolean;
9
8
  startDate?: string;
10
9
  endDate?: string;
11
10
  };
12
- declare const ChatsByLifeCycleCard: ({ convLifecycleReportData, configuredStages, selectedPeriod, loading, startDate, endDate, }: ChatsByLifeCycleCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
11
+ declare const ChatsByLifeCycleCard: ({ convLifecycleReportData, configuredStages, loading, startDate, endDate, }: ChatsByLifeCycleCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
13
12
  export default ChatsByLifeCycleCard;
@@ -27,8 +27,7 @@ interface DashboardSectionsProps {
27
27
  periodFilteredLiveConvs?: Conversation[];
28
28
  startDate: string;
29
29
  endDate: string;
30
- selectedPeriod: string;
31
30
  reportNodes: ReportNode[];
32
31
  }
33
- declare const _default: React.MemoExoticComponent<({ agentsData, allAgentsData, agentsReportData, agentsLoading, agentsReportLoading, convTagsReportData, convTagsReportLoading, totalMessages, convsLoading, integrationId, agentIds, assignedConversations, unassignedConversations, liveConvs, periodFilteredLiveConvs, startDate, endDate, selectedPeriod, reportNodes, convLifecycleReportData, convLifecycleStages, convLifecycleReportLoading, }: DashboardSectionsProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
32
+ declare const _default: React.MemoExoticComponent<({ agentsData, allAgentsData, agentsReportData, agentsLoading, agentsReportLoading, convTagsReportData, convTagsReportLoading, totalMessages, convsLoading, integrationId, agentIds, assignedConversations, unassignedConversations, liveConvs, periodFilteredLiveConvs, startDate, endDate, reportNodes, convLifecycleReportData, convLifecycleStages, convLifecycleReportLoading, }: DashboardSectionsProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
34
33
  export default _default;
@@ -3,11 +3,10 @@ export interface AllChatsCardProps {
3
3
  totalMessages?: number;
4
4
  assignedConversations?: number;
5
5
  unassignedConversations?: number;
6
- selectedPeriod?: string;
7
6
  loading?: boolean;
8
7
  conversations?: Pick<Conversation, 'createdAt' | 'assigneeId'>[];
9
8
  startDate?: string;
10
9
  endDate?: string;
11
10
  }
12
- declare const OpenedChatsCard: ({ totalMessages, assignedConversations, unassignedConversations, selectedPeriod, loading, conversations, startDate, endDate, }: AllChatsCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
11
+ declare const OpenedChatsCard: ({ totalMessages, assignedConversations, unassignedConversations, loading, conversations, startDate, endDate, }: AllChatsCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
13
12
  export default OpenedChatsCard;
@@ -1,53 +1,45 @@
1
1
  /** Stage key for conversations that have no lifecycle stage. */
2
2
  export declare const NOT_SET_STAGE = "notSet";
3
- /**
4
- * Main colors for lifecycle slices (light surface), assigned in this fixed order to stages 1–8.
5
- * The order is what keeps neighbouring slices apart for colour-blind readers: it was checked
6
- * with a palette validator for 2–8 slices, including the last-to-first pair a donut closes.
7
- * Change the values or the order only after re-running that validation.
8
- */
9
- export declare const LIFECYCLE_STAGE_COLORS: readonly ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4", "#008300", "#4a3aa7", "#e34948"];
10
- /**
11
- * Extra main colors for stages 9–12. Each one stays clearly apart from every other main color
12
- * (ΔE ≥ 15 for normal vision and ≥ 8 for colour-blind vision), not just from its neighbours.
13
- * Light blue is faint on white (about 2:1), so the legend label carries it.
14
- */
15
- export declare const LIFECYCLE_STAGE_EXTRA_COLORS: readonly ["#92074c", "#82b5ef", "#ac4aa6", "#7706fd"];
16
- /**
17
- * Lighter or darker versions of main hues for stages 13–18. They keep neighbouring slices apart,
18
- * but each sits close to one of the main colors, so these stages lean more on the legend labels.
19
- */
20
- export declare const LIFECYCLE_STAGE_VARIANT_COLORS: readonly ["#9f0117", "#a56f00", "#ab446e", "#52bc4c", "#a33902", "#01724d"];
21
- /** Conversations without a stage read as "no data", so they get a neutral. */
22
- export declare const NOT_SET_STAGE_COLOR = "#9da4ae";
23
- /** Stages past the sequence (19 and up) share one darker neutral, so no series color ever means two stages. */
24
- export declare const LIFECYCLE_OVERFLOW_COLOR = "#6c737f";
3
+ /** Pseudo-stage that holds every stage past the top slices. */
4
+ export declare const OTHERS_STAGE = "__others__";
25
5
  export interface LifecycleStageNode {
26
6
  stage: string;
27
7
  conversationCount: number;
28
8
  createdAt: string;
29
9
  }
30
- export interface LifecycleStageTotal {
31
- /** Canonical stage key: the configured stage name, the raw report name, or NOT_SET_STAGE. */
10
+ export interface LifecycleStageCount {
11
+ /** Canonical stage key: the configured stage name, the raw report name, NOT_SET_STAGE or OTHERS_STAGE. */
32
12
  stage: string;
33
13
  value: number;
14
+ }
15
+ export interface LifecycleStageTotal extends LifecycleStageCount {
34
16
  color: string;
35
17
  }
18
+ export interface LifecycleChartPalette {
19
+ /** Slice colors in rank order; its length is how many stages get their own colored slice. */
20
+ colors: readonly string[];
21
+ /** Color for the leftover / "Others" slice (the last, lightest palette color). */
22
+ othersColor: string;
23
+ }
36
24
  /**
37
25
  * Maps a report stage name onto the workspace's configured spelling (case-insensitive),
38
26
  * and folds blank or "notSet" values into NOT_SET_STAGE.
39
27
  */
40
28
  export declare function createStageResolver(configuredStages: string[]): (stage?: string | null) => string;
41
29
  /**
42
- * Orders every stage the chart may show: configured stages in workspace order, then stages the
43
- * report returned that are no longer configured (alphabetically), then "not set".
44
- * A stage's color comes from its position here, so it stays the same when filters hide other stages.
30
+ * Orders every reported stage: configured stages in workspace order, then stages the report
31
+ * returned that are no longer configured (alphabetically), then "not set".
45
32
  */
46
33
  export declare function orderLifecycleStages(configuredStages: string[], reportedStages: Iterable<string>): string[];
47
- /** Color for the stage at `index` of the ordered stage list. */
48
- export declare function lifecycleStageColor(stage: string, index: number): string;
49
34
  /**
50
- * Sums conversations per stage across days and channels, in chart order.
51
- * Stages with no conversations are left out; colors still follow each stage's position.
35
+ * Sums conversations per stage across days and channels, in configured stage order.
36
+ * Stages with no conversations are left out.
37
+ */
38
+ export declare function countLifecycleStages(nodes: LifecycleStageNode[], configuredStages: string[]): LifecycleStageCount[];
39
+ /**
40
+ * Pie slices, biggest first. The top stages take the palette colors in order; when there are more
41
+ * stages than colors, the rest fold into one OTHERS_STAGE slice (a lone leftover keeps its name),
42
+ * so the chart never shows more than colors.length + 1 slices.
43
+ * Equal counts keep their configured order.
52
44
  */
53
- export declare function buildLifecycleStageTotals(nodes: LifecycleStageNode[], configuredStages: string[]): LifecycleStageTotal[];
45
+ export declare function buildLifecycleChartSlices(counts: LifecycleStageCount[], { colors, othersColor }: LifecycleChartPalette): LifecycleStageTotal[];
@@ -0,0 +1,4 @@
1
+ /**
2
+ * `/account/guide` — Gateway setup home. Inbox and other plans redirect to Inbox.
3
+ */
4
+ export default function GuidePage(): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -8,9 +8,10 @@ interface HeaderSectionProps {
8
8
  filters: ConvsFilters;
9
9
  onFiltersChange: (filters: ConvsFilters) => void;
10
10
  setShowStartConv: (show: boolean) => void;
11
+ canStartConversation?: boolean;
11
12
  isTestVariant?: boolean;
12
13
  isDrawerOpen?: boolean;
13
14
  onFilterDrawerOpen?: () => void;
14
15
  }
15
- declare const HeaderSection: ({ agentsMenu, lifeCycleMenu, channelsMenu, tagsMenu, filters, onFiltersChange, setShowStartConv, isTestVariant, isDrawerOpen, onFilterDrawerOpen, }: HeaderSectionProps) => import("@emotion/react/jsx-runtime").JSX.Element;
16
+ declare const HeaderSection: ({ agentsMenu, lifeCycleMenu, channelsMenu, tagsMenu, filters, onFiltersChange, setShowStartConv, canStartConversation, isTestVariant, isDrawerOpen, onFilterDrawerOpen, }: HeaderSectionProps) => import("@emotion/react/jsx-runtime").JSX.Element;
16
17
  export default HeaderSection;
@@ -13,6 +13,8 @@ interface NewConvListProps {
13
13
  filters: ConvsFilters;
14
14
  onFiltersChange: (filters: ConvsFilters) => void;
15
15
  setShowStartConv: (show: boolean) => void;
16
+ /** Whether a WhatsApp channel exists, so a new conversation can be started. */
17
+ canStartConversation?: boolean;
16
18
  aiAgents: Ai[];
17
19
  integrations: Integration[];
18
20
  scrollContainerRef?: RefObject<HTMLDivElement>;
@@ -20,5 +22,5 @@ interface NewConvListProps {
20
22
  isDrawerOpen?: boolean;
21
23
  onFilterDrawerOpen?: () => void;
22
24
  }
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;
25
+ declare const NewConvList: ({ agents, convStages, conversationTags, convs, loading, selectedConvId, convClicked, onConvEnd, filters, onFiltersChange, setShowStartConv, canStartConversation, aiAgents, integrations, scrollContainerRef, isTestVariant, isDrawerOpen, onFilterDrawerOpen, }: NewConvListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
24
26
  export default NewConvList;
@@ -0,0 +1,8 @@
1
+ import { Role } from '../../../graphql.autogenerated';
2
+ /** Roles an agent-linked API key can carry, highest first. */
3
+ export declare const API_KEY_ROLES: Role[];
4
+ /** Matches the backend default for keys created without a role. */
5
+ export declare const DEFAULT_API_KEY_ROLE: Role;
6
+ export declare const API_KEY_ROLE_I18N: Record<string, string>;
7
+ /** Key roles the current member may grant: never above their own role. */
8
+ export declare function getGrantableApiKeyRoles(callerRole?: string): Role[];
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * Script-tag web chat bundle (packages/websdk → script/bc-sdk.js), used in the embed snippet shown
3
- * after creating a web chat channel. Not hosted yet: point this at the final host.
3
+ * after creating a web chat channel. websdk's CI publishes it to cdn.bcrumbs.net on every push to
4
+ * main: this latest URL is cached for 5 minutes, and `bc-sdk/bc-sdk-<version>.js` is a pinned copy.
5
+ * (bc-sdk-1.0.0.js is the legacy section loader used by Page Sections, not the web chat.)
4
6
  */
5
- export declare const WEBCHAT_SDK_URL = "https://gateway.bcrumbs.net/channels/bc-sdk.js";
7
+ export declare const WEBCHAT_SDK_URL = "https://cdn.bcrumbs.net/bc-sdk/bc-sdk.js";
@@ -0,0 +1,5 @@
1
+ /** Droplist options for the roles the current member can give an API key. */
2
+ export declare const useApiKeyRoleOptions: () => {
3
+ text: string;
4
+ value: import("../../../graphql.autogenerated").Role;
5
+ }[];
@@ -1,2 +1,3 @@
1
+ export declare function preloadApp(): void;
1
2
  declare function AppWrapper(): import("@emotion/react/jsx-runtime").JSX.Element;
2
3
  export default AppWrapper;
@@ -833,8 +833,8 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
833
833
  agentPerformance: string;
834
834
  agents: string;
835
835
  openedChats: string;
836
- openedChatsForPeriod: string;
837
- chatLifecycleForPeriod: string;
836
+ chatLifecycle: string;
837
+ lifecycleOthers: string;
838
838
  agent: string;
839
839
  rating: string;
840
840
  messagesSent: string;
@@ -1375,6 +1375,8 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
1375
1375
  linkedAgent: string;
1376
1376
  noLinkedAgent: string;
1377
1377
  agentLinkNote: string;
1378
+ role: string;
1379
+ fullAccess: string;
1378
1380
  searchPlaceholder: string;
1379
1381
  noApiKeys: string;
1380
1382
  loadingMoreText: string;