@ezychat/web 0.1.59 → 0.1.61
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/dist-lib/chunks/admin-DJH4L6VN.js +896 -0
- package/dist-lib/chunks/admin-i6F-0wNq.js +897 -0
- package/dist-lib/chunks/{inbox-Dn_zMX5x.js → inbox-DI6Z9gdw.js} +28 -3
- package/dist-lib/chunks/{inbox-CostSOFa.js → inbox-hT-ebVtf.js} +28 -3
- package/dist-lib/ezychat-web.css +1 -1
- package/dist-lib/index.js +12487 -8177
- package/dist-lib/types/admin/AdminLayout.d.ts +8 -0
- package/dist-lib/types/admin/AgentGroupsCard.d.ts +16 -0
- package/dist-lib/types/admin/ReportCharts.d.ts +48 -0
- package/dist-lib/types/admin/ReportsPage.d.ts +13 -0
- package/dist-lib/types/admin/connectors/AgentConnectorsCard.d.ts +8 -0
- package/dist-lib/types/admin/connectors/AgentPicker.d.ts +9 -0
- package/dist-lib/types/admin/connectors/BookingSettingsCard.d.ts +13 -0
- package/dist-lib/types/admin/connectors/ConnectorDetailPage.d.ts +8 -0
- package/dist-lib/types/admin/connectors/ConnectorsGalleryPage.d.ts +7 -0
- package/dist-lib/types/admin/connectors/GoogleCalendarAccountCard.d.ts +7 -0
- package/dist-lib/types/admin/connectors/PartnerConnectionCard.d.ts +10 -0
- package/dist-lib/types/admin/connectors/PartnerConnectorPage.d.ts +8 -0
- package/dist-lib/types/admin/connectors/PartnerSettingsCard.d.ts +18 -0
- package/dist-lib/types/admin/connectors/catalog.d.ts +41 -0
- package/dist-lib/types/admin/connectors/connector-ui.d.ts +49 -0
- package/dist-lib/types/admin/connectors/list.d.ts +14 -0
- package/dist-lib/types/api/ai-groups.d.ts +53 -0
- package/dist-lib/types/api/ai.d.ts +18 -6
- package/dist-lib/types/api/connector-list.d.ts +428 -0
- package/dist-lib/types/api/connectors.d.ts +106 -0
- package/dist-lib/types/api/queries.d.ts +60 -1
- package/dist-lib/types/api/reply-suggestions.d.ts +1 -1
- package/dist-lib/types/api/voice.d.ts +2 -2
- package/dist-lib/types/extensions/types.d.ts +7 -1
- package/dist-lib/types/i18n/resources.d.ts +539 -0
- package/dist-lib/types/inbox/ConversationHeader.d.ts +4 -2
- package/dist-lib/types/inbox/GroupAiRow.d.ts +16 -0
- package/dist-lib/types/inbox/GroupPanel.d.ts +3 -1
- package/dist-lib/types/lib/format.d.ts +5 -0
- package/dist-lib/types/lib/links.d.ts +9 -0
- package/package.json +2 -2
- package/dist-lib/chunks/admin-BfXPHTDq.js +0 -779
- package/dist-lib/chunks/admin-BzKDTnlu.js +0 -780
|
@@ -5,6 +5,10 @@ import { type WebExtension, type WebExtensionAdminSection } from '../extensions'
|
|
|
5
5
|
* Inboxes never show together: see `visibleAdminNav`.
|
|
6
6
|
*/
|
|
7
7
|
export declare const ADMIN_NAV: readonly [{
|
|
8
|
+
readonly to: "reports";
|
|
9
|
+
readonly labelKey: "nav.reports";
|
|
10
|
+
readonly icon: LucideIcon;
|
|
11
|
+
}, {
|
|
8
12
|
readonly to: "members";
|
|
9
13
|
readonly labelKey: "nav.members";
|
|
10
14
|
readonly icon: LucideIcon;
|
|
@@ -12,6 +16,10 @@ export declare const ADMIN_NAV: readonly [{
|
|
|
12
16
|
readonly to: "quick-replies";
|
|
13
17
|
readonly labelKey: "nav.quickReplies";
|
|
14
18
|
readonly icon: LucideIcon;
|
|
19
|
+
}, {
|
|
20
|
+
readonly to: "connectors";
|
|
21
|
+
readonly labelKey: "nav.connectors";
|
|
22
|
+
readonly icon: LucideIcon;
|
|
15
23
|
}, {
|
|
16
24
|
readonly to: "whatsapp";
|
|
17
25
|
readonly labelKey: "nav.whatsapp";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Lite's only inbox keeps the name migration 014 gave inbox 1 (a product name, never translated). */
|
|
2
|
+
export declare const LITE_INBOX_NAME = "WhatsApp";
|
|
3
|
+
/**
|
|
4
|
+
* Agent page → Groups (design docs/features/ai-groups/design.md): the agent's "Answer in groups
|
|
5
|
+
* (when tagged or quoted)" switch and, when on, the groups of the agent's inbox, each with its own
|
|
6
|
+
* switch (new groups start off) and a link to the group chat. The same per-group switch is in the
|
|
7
|
+
* group's info panel.
|
|
8
|
+
*/
|
|
9
|
+
export declare function AgentGroupsCard({ agentId, name, agentEnabled, inboxName, }: Readonly<{
|
|
10
|
+
agentId: number;
|
|
11
|
+
name: string;
|
|
12
|
+
/** The agent's saved on/off. */
|
|
13
|
+
agentEnabled: boolean;
|
|
14
|
+
/** The name of the agent's inbox; null = the agent answers no inbox. */
|
|
15
|
+
inboxName: string | null;
|
|
16
|
+
}>): import("react").JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { Report, ReportDay } from '@ezychat/shared';
|
|
3
|
+
export declare function useReportFormat(): {
|
|
4
|
+
weekday: (wd: number, width?: "short" | "long") => string;
|
|
5
|
+
day: (date: string, withWeekday?: boolean) => string;
|
|
6
|
+
hour: (h: number) => string;
|
|
7
|
+
number: (n: number) => string;
|
|
8
|
+
};
|
|
9
|
+
/** 0 = Monday … 6 = Sunday of a `YYYY-MM-DD`. */
|
|
10
|
+
export declare function weekdayOf(date: string): number;
|
|
11
|
+
/** A report card: title, one-line finding and a Chart / Table switch. */
|
|
12
|
+
export declare function ChartCard({ title, finding, table, children, testId, }: {
|
|
13
|
+
title: string;
|
|
14
|
+
finding?: React.ReactNode;
|
|
15
|
+
table?: React.ReactNode;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
testId?: string;
|
|
18
|
+
}): React.JSX.Element;
|
|
19
|
+
/** The table behind every "Show as table" (first column text, the rest numbers). */
|
|
20
|
+
export declare function NumberTable({ head, rows }: {
|
|
21
|
+
head: string[];
|
|
22
|
+
rows: React.ReactNode[][];
|
|
23
|
+
}): React.JSX.Element;
|
|
24
|
+
/** Messages from customers per day; weekends lighter, the busiest day named until another is picked. */
|
|
25
|
+
export declare function DailyChart({ daily }: {
|
|
26
|
+
daily: ReportDay[];
|
|
27
|
+
}): React.JSX.Element;
|
|
28
|
+
/** Average messages from customers per weekday, Monday first; the busiest weekday stands out. */
|
|
29
|
+
export declare function WeekdayChart({ weekdays }: {
|
|
30
|
+
weekdays: Report['weekdays'];
|
|
31
|
+
}): React.JSX.Element;
|
|
32
|
+
/** Busy times: weekday rows × 24 hours, darker = more messages from customers. */
|
|
33
|
+
export declare function HoursHeatmap({ hours }: {
|
|
34
|
+
hours: number[][];
|
|
35
|
+
}): React.JSX.Element;
|
|
36
|
+
/** New customers per day: a line with the area under it. */
|
|
37
|
+
export declare function NewCustomersChart({ daily }: {
|
|
38
|
+
daily: ReportDay[];
|
|
39
|
+
}): React.JSX.Element;
|
|
40
|
+
/** Horizontal bars, largest first, with count and share. */
|
|
41
|
+
export declare function RankedBars({ rows, }: {
|
|
42
|
+
rows: Array<{
|
|
43
|
+
key: string;
|
|
44
|
+
label: string;
|
|
45
|
+
count: number;
|
|
46
|
+
action?: React.ReactNode;
|
|
47
|
+
}>;
|
|
48
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Admin → Reports (design: docs/features/reports/design.md): how busy the WhatsApp numbers are
|
|
4
|
+
* (busy days, busy times, new customers) and how fast the team and the AI answer, for 7, 30 or 90
|
|
5
|
+
* days. Counted from this computer's database only; nothing is sent anywhere.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ReportsPage(): React.JSX.Element;
|
|
8
|
+
/** The two hours in a row with the most messages from customers; null when there are none. */
|
|
9
|
+
export declare function busiestBlock(hours: number[][]): {
|
|
10
|
+
wd: number;
|
|
11
|
+
h: number;
|
|
12
|
+
v: number;
|
|
13
|
+
} | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent page → Connectors: one summary row per connected connector (what this agent may do there)
|
|
3
|
+
* that opens the connector's Settings tab for this agent. Settings live on the connector's page.
|
|
4
|
+
*/
|
|
5
|
+
export declare function AgentConnectorsCard({ agentId, name, }: Readonly<{
|
|
6
|
+
agentId: number;
|
|
7
|
+
name: string;
|
|
8
|
+
}>): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { AiAgentSummary } from '@ezychat/shared';
|
|
3
|
+
/**
|
|
4
|
+
* A connector's Settings tab: one AI agent at a time (`&agent=<id>` picks it; a picker shows with
|
|
5
|
+
* 2+ agents). `render` draws the chosen agent's settings.
|
|
6
|
+
*/
|
|
7
|
+
export declare function AgentPicker({ render }: {
|
|
8
|
+
render: (agent: AiAgentSummary) => ReactNode;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type GoogleCalendarStatus } from '@ezychat/shared';
|
|
2
|
+
/**
|
|
3
|
+
* Connectors → Google Calendar → Settings, for one AI agent: the calendar it uses, Check free
|
|
4
|
+
* times (on by default), Book appointments (off until an admin turns it on) and the booking rules
|
|
5
|
+
* the server enforces.
|
|
6
|
+
*/
|
|
7
|
+
export declare function BookingSettingsCard({ agentId, name, status, onConnect, }: Readonly<{
|
|
8
|
+
agentId: number;
|
|
9
|
+
name: string;
|
|
10
|
+
status: GoogleCalendarStatus;
|
|
11
|
+
/** Shows the account card (Overview tab) to connect. */
|
|
12
|
+
onConnect: () => void;
|
|
13
|
+
}>): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `/admin/connectors/:id`: one page per connector. The app's own connectors come first: Google
|
|
3
|
+
* Calendar has Overview (what it does, the Google account, your data), Settings (per AI agent),
|
|
4
|
+
* Activity and Bookings tabs (`?tab=`, `&agent=`); the custom connector needs Enterprise. Every
|
|
5
|
+
* other page is built from the connector's entry in the connector list. A connector an extension
|
|
6
|
+
* provides opens the extension's page.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ConnectorDetailPage(): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Admin → Connectors: a gallery of connectors from the connector list the server keeps (refreshed
|
|
3
|
+
* when the page opens), plus the app's own built-in Google Calendar and the custom MCP connector.
|
|
4
|
+
* Each card opens the connector's own page (details, settings, activity), or the page an extension
|
|
5
|
+
* provides. Connected ones come first; search and a category filter narrow the list.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ConnectorsGalleryPage(): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Google account EzyChat uses (one per install): connect, its state, its calendars and
|
|
3
|
+
* Disconnect. Which calendar each AI agent uses lives on the Settings tab.
|
|
4
|
+
*/
|
|
5
|
+
export declare function GoogleCalendarAccountCard({ onOpenSettings, }: Readonly<{
|
|
6
|
+
onOpenSettings?: () => void;
|
|
7
|
+
}>): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type GalleryConnector } from '@ezychat/shared';
|
|
2
|
+
/**
|
|
3
|
+
* Overview → Connection of a partner connector: Connect for its sign-in type (the partner's page,
|
|
4
|
+
* an API key, a form or nothing), the waiting card while the partner's page is open, the account
|
|
5
|
+
* or key end once connected, Test connection and Disconnect.
|
|
6
|
+
*/
|
|
7
|
+
export declare function PartnerConnectionCard({ g, onOpenSettings, }: {
|
|
8
|
+
g: GalleryConnector;
|
|
9
|
+
onOpenSettings: () => void;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `/admin/connectors/:id` for a connector from the connector list: a partner (MCP) connector gets
|
|
3
|
+
* Overview, Settings per AI agent and Activity; a coming-soon one its texts and Vote; one that
|
|
4
|
+
* needs a newer EzyChat or Enterprise its texts only.
|
|
5
|
+
*/
|
|
6
|
+
export declare function ListConnectorPage({ id }: {
|
|
7
|
+
id: string;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ConnectorAgentSettings, type ConnectorEntry } from '@ezychat/shared';
|
|
2
|
+
/** Saved values over the entry's defaults; Look-ups start on, tools that change data off. */
|
|
3
|
+
export declare function withDefaults(entry: ConnectorEntry, saved: ConnectorAgentSettings): ConnectorAgentSettings;
|
|
4
|
+
/**
|
|
5
|
+
* Settings tab of a partner connector, for one AI agent: the entry's settings form, one switch per
|
|
6
|
+
* tool (tools that change data start off) and the rules the AI always follows (the core rules plus
|
|
7
|
+
* each tool's declared guards in plain words). Save stores both for this agent.
|
|
8
|
+
*/
|
|
9
|
+
export declare function PartnerSettingsCard({ entry, agentId, agentName, }: {
|
|
10
|
+
entry: ConnectorEntry;
|
|
11
|
+
agentId: number;
|
|
12
|
+
agentName: string;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
/** "Rules the AI always follows": the core rules and each tool's declared guards in plain words. */
|
|
15
|
+
export declare function GuardRules({ entry, language }: {
|
|
16
|
+
entry: ConnectorEntry;
|
|
17
|
+
language: string;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type LucideIcon } from 'lucide-react';
|
|
2
|
+
import type { ConnectorEntry, GoogleCalendarState } from '@ezychat/shared';
|
|
3
|
+
/**
|
|
4
|
+
* Admin → Connectors: what the app itself provides next to the connector list (design
|
|
5
|
+
* docs/features/connector-list/design.md). The list (server, `GET /api/connectors/list`) gives
|
|
6
|
+
* every partner and coming-soon connector; the app keeps only its own features here: the built-in
|
|
7
|
+
* Google Calendar (its pages and tabs live in the app) and the custom MCP connector (Enterprise,
|
|
8
|
+
* linked by its web extension through `connectorLinks`). Texts are catalog keys under
|
|
9
|
+
* `connectors.items.<id>` and `connectors.tools.<tool>` (admin namespace).
|
|
10
|
+
*/
|
|
11
|
+
export declare const CONNECTOR_CATEGORIES: readonly ["booking", "accounting", "crm", "data", "payments", "commerce", "custom", "other"];
|
|
12
|
+
export type ConnectorCategory = (typeof CONNECTOR_CATEGORIES)[number];
|
|
13
|
+
/** The gallery filter of each list category (the list's names differ from the app's keys). */
|
|
14
|
+
export declare const LIST_CATEGORY: Record<ConnectorEntry['category'], ConnectorCategory>;
|
|
15
|
+
/** The icon of a list entry without its own icon file. */
|
|
16
|
+
export declare const CATEGORY_ICON: Record<ConnectorCategory, LucideIcon>;
|
|
17
|
+
/** What the AI may do with the built-in Google Calendar. */
|
|
18
|
+
export type ConnectorTool = 'checkFree' | 'book';
|
|
19
|
+
export declare const CONNECTOR_IDS: readonly ["google-calendar", "custom-mcp"];
|
|
20
|
+
export type ConnectorId = (typeof CONNECTOR_IDS)[number];
|
|
21
|
+
export interface CatalogConnector {
|
|
22
|
+
id: ConnectorId;
|
|
23
|
+
icon: LucideIcon;
|
|
24
|
+
category: ConnectorCategory;
|
|
25
|
+
/** `core`: every edition. `enterprise`: greyed out unless an extension links it. */
|
|
26
|
+
edition: 'core' | 'enterprise';
|
|
27
|
+
/** Look-ups (read) and actions that change data. */
|
|
28
|
+
tools: readonly {
|
|
29
|
+
key: ConnectorTool;
|
|
30
|
+
access: 'read' | 'write';
|
|
31
|
+
}[];
|
|
32
|
+
}
|
|
33
|
+
export declare const CONNECTORS: readonly CatalogConnector[];
|
|
34
|
+
export declare function findConnector(id: string | undefined): CatalogConnector | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* What a gallery card shows. `linked`: an extension provides the connector's page (no badge here;
|
|
37
|
+
* that page shows its own state). `needsUpdate`: the list entry asks for a newer EzyChat;
|
|
38
|
+
* `delisted`: connected, but no longer in the connector list (it keeps working).
|
|
39
|
+
*/
|
|
40
|
+
export type ConnectorStatus = 'connected' | 'attention' | 'notConnected' | 'comingSoon' | 'enterprise' | 'linked' | 'needsUpdate' | 'delisted';
|
|
41
|
+
export declare function connectorStatus(c: CatalogConnector, google: GoogleCalendarState | undefined, extensionLink: string | undefined): ConnectorStatus;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type LucideIcon } from 'lucide-react';
|
|
2
|
+
import { type ConnectorEntry } from '@ezychat/shared';
|
|
3
|
+
import type { ConnectorStatus } from './catalog';
|
|
4
|
+
/** Connector pages that web extensions provide, by catalog id (the first extension wins). */
|
|
5
|
+
export declare function useConnectorLinks(): Partial<Record<string, string>>;
|
|
6
|
+
/** Status badge on gallery cards and the connector page header (none for `linked`). */
|
|
7
|
+
export declare function ConnectorStatusBadge({ status }: {
|
|
8
|
+
status: ConnectorStatus;
|
|
9
|
+
}): import("react").JSX.Element | null;
|
|
10
|
+
/** "Beta" next to the status on cards and page headers, when the connector list marks the entry. */
|
|
11
|
+
export declare function BetaBadge({ show }: Readonly<{
|
|
12
|
+
show: boolean;
|
|
13
|
+
}>): import("react").JSX.Element | null;
|
|
14
|
+
/** The entry's notice from the connector list, above Connect; titled Beta for a beta entry. */
|
|
15
|
+
export declare function ConnectorNotice({ entry }: Readonly<{
|
|
16
|
+
entry: ConnectorEntry | null;
|
|
17
|
+
}>): import("react").JSX.Element | null;
|
|
18
|
+
/** The connector list's entry for one of the app's own connectors (e.g. its Beta mark and notice). */
|
|
19
|
+
export declare function useBuiltinEntry(builtinId: string): ConnectorEntry | null;
|
|
20
|
+
/**
|
|
21
|
+
* The connector's icon in a calm tile: the icon file from the connector list (served by the
|
|
22
|
+
* server, checked against the list's hash) or a Lucide icon (no brand logos in the app).
|
|
23
|
+
*/
|
|
24
|
+
export declare function ConnectorIcon({ c, size, muted, }: {
|
|
25
|
+
c: {
|
|
26
|
+
icon: LucideIcon;
|
|
27
|
+
image?: string;
|
|
28
|
+
};
|
|
29
|
+
size?: 'md' | 'lg';
|
|
30
|
+
muted?: boolean;
|
|
31
|
+
}): import("react").JSX.Element;
|
|
32
|
+
/** "Connectors › <name>" above a connector page. */
|
|
33
|
+
export declare function ConnectorBreadcrumb({ name }: {
|
|
34
|
+
name: string;
|
|
35
|
+
}): import("react").JSX.Element;
|
|
36
|
+
/**
|
|
37
|
+
* "Vote for this connector": opens a ready message to the EzyChat team (WhatsApp in Lite). Nothing
|
|
38
|
+
* is counted in the app (no tracking in Lite); hidden when the product sets the link to null.
|
|
39
|
+
*/
|
|
40
|
+
export declare function VoteButton({ name, size }: {
|
|
41
|
+
name: string;
|
|
42
|
+
size?: 'sm' | 'touch';
|
|
43
|
+
}): import("react").JSX.Element | null;
|
|
44
|
+
/** "Open Google Calendar" / "Open in Google Calendar": opens Google in the browser (outside the app). */
|
|
45
|
+
export declare function GoogleCalendarLink({ href, label, variant, }: {
|
|
46
|
+
href: string;
|
|
47
|
+
label: string;
|
|
48
|
+
variant?: 'outline' | 'ghost';
|
|
49
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { LucideIcon } from 'lucide-react';
|
|
2
|
+
import type { ConnectorConnectionView, ConnectorEntry, ConnectorTool, GalleryConnector } from '@ezychat/shared';
|
|
3
|
+
import { type ConnectorStatus } from './catalog';
|
|
4
|
+
/** A partner connection that exists (working or not): it has settings, activity and Disconnect. */
|
|
5
|
+
export declare function isLinked(connection: ConnectorConnectionView | null | undefined): boolean;
|
|
6
|
+
/** The card and header status of a connector from the list. */
|
|
7
|
+
export declare function listStatus(g: GalleryConnector): ConnectorStatus;
|
|
8
|
+
/** Saved tool switches over the defaults: look-ups start on, tools that change data off. */
|
|
9
|
+
export declare function withToolDefaults(tools: readonly ConnectorTool[], saved: Record<string, boolean>): Record<string, boolean>;
|
|
10
|
+
/** The icon tile of an entry: its own icon file from the list, else its category's icon. */
|
|
11
|
+
export declare function entryIcon(entry: ConnectorEntry): {
|
|
12
|
+
icon: LucideIcon;
|
|
13
|
+
image?: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI agents in WhatsApp groups (design docs/features/ai-groups/design.md): the agent's "Answer in
|
|
3
|
+
* groups" switch with the groups of its inbox (admins), and each group's own switch.
|
|
4
|
+
*/
|
|
5
|
+
export declare const aiGroupsKey: readonly ["ai-groups"];
|
|
6
|
+
export declare const agentGroupsKey: (agentId: number) => readonly ["ai-groups", "agent", number];
|
|
7
|
+
export declare const groupChatAiKey: (jid: string) => readonly ["ai-groups", "chat", string];
|
|
8
|
+
export declare function useAgentGroups(agentId: number): import("@tanstack/react-query").UseQueryResult<{
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
inboxName: string | null;
|
|
11
|
+
groups: {
|
|
12
|
+
jid: string;
|
|
13
|
+
name: string;
|
|
14
|
+
memberCount: number | null;
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
paused: boolean;
|
|
17
|
+
}[];
|
|
18
|
+
loopGuard: number;
|
|
19
|
+
}, Error>;
|
|
20
|
+
export declare function useSetAnswerInGroups(agentId: number): import("@tanstack/react-query").UseMutationResult<{
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
inboxName: string | null;
|
|
23
|
+
groups: {
|
|
24
|
+
jid: string;
|
|
25
|
+
name: string;
|
|
26
|
+
memberCount: number | null;
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
paused: boolean;
|
|
29
|
+
}[];
|
|
30
|
+
loopGuard: number;
|
|
31
|
+
}, Error, boolean, unknown>;
|
|
32
|
+
/** Whether the AI answers tags and quotes in this group (anyone who may open the chat). */
|
|
33
|
+
export declare function useGroupChatAi(jid: string | null): import("@tanstack/react-query").UseQueryResult<{
|
|
34
|
+
enabled: boolean;
|
|
35
|
+
agentId: number | null;
|
|
36
|
+
agentName: string | null;
|
|
37
|
+
agentEnabled: boolean;
|
|
38
|
+
agentAnswersGroups: boolean;
|
|
39
|
+
paused: boolean;
|
|
40
|
+
}, Error>;
|
|
41
|
+
/** Admins: switch one group on or off (Group info and the agent page list). */
|
|
42
|
+
export declare function useSetGroupChatAi(): import("@tanstack/react-query").UseMutationResult<{
|
|
43
|
+
enabled: boolean;
|
|
44
|
+
agentId: number | null;
|
|
45
|
+
agentName: string | null;
|
|
46
|
+
agentEnabled: boolean;
|
|
47
|
+
agentAnswersGroups: boolean;
|
|
48
|
+
paused: boolean;
|
|
49
|
+
}, Error, {
|
|
50
|
+
enabled: boolean;
|
|
51
|
+
} & {
|
|
52
|
+
jid: string;
|
|
53
|
+
}, unknown>;
|
|
@@ -19,9 +19,9 @@ export declare function useAiMember(): import("@tanstack/react-query").UseQueryR
|
|
|
19
19
|
inboxIds?: number[] | undefined;
|
|
20
20
|
} | null;
|
|
21
21
|
settings: {
|
|
22
|
+
enabled: boolean;
|
|
22
23
|
displayName: string;
|
|
23
24
|
mode: "api" | "chatgpt" | "claude";
|
|
24
|
-
enabled: boolean;
|
|
25
25
|
model: string;
|
|
26
26
|
instructions: string;
|
|
27
27
|
handoffRules?: string | undefined;
|
|
@@ -100,6 +100,17 @@ export declare function useAiTry(): import("@tanstack/react-query").UseMutationR
|
|
|
100
100
|
source: string;
|
|
101
101
|
ok: boolean;
|
|
102
102
|
ms: number;
|
|
103
|
+
calendar?: {
|
|
104
|
+
action: "checked" | "booked";
|
|
105
|
+
start?: string | undefined;
|
|
106
|
+
end?: string | undefined;
|
|
107
|
+
} | undefined;
|
|
108
|
+
group?: {
|
|
109
|
+
kind: "paused" | "answered" | "handover";
|
|
110
|
+
member: string | null;
|
|
111
|
+
quoted?: boolean | undefined;
|
|
112
|
+
} | undefined;
|
|
113
|
+
notRun?: boolean | undefined;
|
|
103
114
|
}[] | undefined;
|
|
104
115
|
}, Error, {
|
|
105
116
|
question: string;
|
|
@@ -109,6 +120,7 @@ export declare function useAiTry(): import("@tanstack/react-query").UseMutationR
|
|
|
109
120
|
handoffRules?: string | undefined;
|
|
110
121
|
};
|
|
111
122
|
agentId?: number | undefined;
|
|
123
|
+
group?: boolean | undefined;
|
|
112
124
|
}, unknown>;
|
|
113
125
|
/**
|
|
114
126
|
* Edit with AI: a suggested rewrite of one box; nothing is saved (the page's Save does that).
|
|
@@ -175,9 +187,9 @@ export declare function useAiMemberAction(): import("@tanstack/react-query").Use
|
|
|
175
187
|
inboxIds?: number[] | undefined;
|
|
176
188
|
} | null;
|
|
177
189
|
settings: {
|
|
190
|
+
enabled: boolean;
|
|
178
191
|
displayName: string;
|
|
179
192
|
mode: "api" | "chatgpt" | "claude";
|
|
180
|
-
enabled: boolean;
|
|
181
193
|
model: string;
|
|
182
194
|
instructions: string;
|
|
183
195
|
handoffRules?: string | undefined;
|
|
@@ -219,8 +231,8 @@ export declare const AiAgentList: z.ZodObject<{
|
|
|
219
231
|
displayName: z.ZodString;
|
|
220
232
|
enabled: z.ZodBoolean;
|
|
221
233
|
preset: z.ZodEnum<{
|
|
222
|
-
sales: "sales";
|
|
223
234
|
custom: "custom";
|
|
235
|
+
sales: "sales";
|
|
224
236
|
faq: "faq";
|
|
225
237
|
}>;
|
|
226
238
|
inboxId: z.ZodNullable<z.ZodNumber>;
|
|
@@ -257,9 +269,9 @@ export declare function useAiAgent(agentId: number | null): import("@tanstack/re
|
|
|
257
269
|
documentCount: number;
|
|
258
270
|
};
|
|
259
271
|
settings: {
|
|
272
|
+
enabled: boolean;
|
|
260
273
|
displayName: string;
|
|
261
274
|
mode: "api" | "chatgpt" | "claude";
|
|
262
|
-
enabled: boolean;
|
|
263
275
|
model: string;
|
|
264
276
|
instructions: string;
|
|
265
277
|
handoffRules?: string | undefined;
|
|
@@ -344,9 +356,9 @@ export declare function useAiAgentAction(agentId: number | null): import("@tanst
|
|
|
344
356
|
documentCount: number;
|
|
345
357
|
};
|
|
346
358
|
settings: {
|
|
359
|
+
enabled: boolean;
|
|
347
360
|
displayName: string;
|
|
348
361
|
mode: "api" | "chatgpt" | "claude";
|
|
349
|
-
enabled: boolean;
|
|
350
362
|
model: string;
|
|
351
363
|
instructions: string;
|
|
352
364
|
handoffRules?: string | undefined;
|
|
@@ -377,9 +389,9 @@ export declare function useAddAgentText(): import("@tanstack/react-query").UseMu
|
|
|
377
389
|
documentCount: number;
|
|
378
390
|
};
|
|
379
391
|
settings: {
|
|
392
|
+
enabled: boolean;
|
|
380
393
|
displayName: string;
|
|
381
394
|
mode: "api" | "chatgpt" | "claude";
|
|
382
|
-
enabled: boolean;
|
|
383
395
|
model: string;
|
|
384
396
|
instructions: string;
|
|
385
397
|
handoffRules?: string | undefined;
|