@ezychat/web 0.1.65 → 0.1.67
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-CxZlJff7.js → admin-8UHO2F19.js} +369 -6
- package/dist-lib/chunks/{admin-Bfr7e_J2.js → admin-aoqHNFwk.js} +369 -6
- package/dist-lib/chunks/common-0sL8O9KV.js +199 -0
- package/dist-lib/chunks/common-CIXHivlt.js +199 -0
- package/dist-lib/chunks/{inbox-B0qUKtSa.js → inbox-CYEiGkVa.js} +60 -2
- package/dist-lib/chunks/{inbox-6O27i4oH.js → inbox-DmBXnPBY.js} +60 -2
- package/dist-lib/ezychat-web.css +1 -1
- package/dist-lib/index.js +12673 -9050
- package/dist-lib/types/admin/AdminLayout.d.ts +4 -0
- package/dist-lib/types/admin/AgentDirectCard.d.ts +13 -0
- package/dist-lib/types/admin/AgentResolutionCard.d.ts +10 -0
- package/dist-lib/types/admin/SafetyPage.d.ts +6 -0
- package/dist-lib/types/admin/SafetyReport.d.ts +10 -0
- package/dist-lib/types/admin/adminUi.d.ts +4 -1
- package/dist-lib/types/api/ai-groups.d.ts +25 -0
- package/dist-lib/types/api/ai.d.ts +43 -4
- package/dist-lib/types/api/inbox-mutations.d.ts +7 -5
- package/dist-lib/types/api/queries.d.ts +56 -14
- package/dist-lib/types/api/safety.d.ts +203 -0
- package/dist-lib/types/api/templates.d.ts +9 -0
- package/dist-lib/types/components/app/InfoTip.d.ts +30 -0
- package/dist-lib/types/components/app/UpgradeEnterprise.d.ts +17 -1
- package/dist-lib/types/components/app/index.d.ts +3 -1
- package/dist-lib/types/extensions/types.d.ts +1 -1
- package/dist-lib/types/i18n/resources.d.ts +544 -0
- package/dist-lib/types/inbox/Composer.d.ts +16 -3
- package/dist-lib/types/inbox/MentionPicker.d.ts +16 -0
- package/dist-lib/types/inbox/SafetyMessage.d.ts +23 -0
- package/dist-lib/types/inbox/mentions.d.ts +42 -0
- package/dist-lib/types/inbox/reply-window.d.ts +5 -0
- package/dist-lib/types/inbox/useDirectory.d.ts +5 -2
- package/dist-lib/types/index.d.ts +2 -0
- package/dist-lib/types/lib/links.d.ts +6 -0
- package/dist-lib/types/lib/tips.d.ts +23 -0
- package/dist-lib/types/lite-import/LiteImportPage.d.ts +4 -0
- package/dist-lib/types/lite-import/LiteSetupStart.d.ts +5 -0
- package/dist-lib/types/lite-import/api.d.ts +42 -0
- package/dist-lib/types/lite-import/bridge.d.ts +27 -0
- package/dist-lib/types/lite-import/notice.d.ts +8 -0
- package/dist-lib/types/lite-import/steps.d.ts +43 -0
- package/dist-lib/types/lite-import/ui.d.ts +38 -0
- package/dist-lib/types/setup/SetupWizard.d.ts +4 -1
- package/package.json +5 -5
- package/dist-lib/chunks/common-C66WoZaM.js +0 -85
- package/dist-lib/chunks/common-CEBPnKob.js +0 -85
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { type ReportPeriod, type SafetyAction, type SafetyActionBody } from '@ezychat/shared';
|
|
2
|
+
/**
|
|
3
|
+
* WhatsApp Safety (docs/features/whatsapp-safety/design.md): Admin → Safety, the chat bar and
|
|
4
|
+
* Admin → Reports → WhatsApp Safety. A message's own finding comes with the message (`safety`).
|
|
5
|
+
*/
|
|
6
|
+
export declare const safetyKeys: {
|
|
7
|
+
state: readonly ["safety"];
|
|
8
|
+
chat: (jid: string) => readonly ["safety", "chat", string];
|
|
9
|
+
report: (days: ReportPeriod) => readonly ["safety", "report", 7 | 30 | 90];
|
|
10
|
+
};
|
|
11
|
+
export declare function useSafety(): import("@tanstack/react-query").UseQueryResult<{
|
|
12
|
+
settings: {
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
ai: boolean;
|
|
15
|
+
autoBlock: boolean;
|
|
16
|
+
deleteAfterDays: 7 | 30 | 90;
|
|
17
|
+
};
|
|
18
|
+
aiReady: boolean;
|
|
19
|
+
items: {
|
|
20
|
+
id: number;
|
|
21
|
+
messageId: string;
|
|
22
|
+
chatJid: string;
|
|
23
|
+
inboxId: number;
|
|
24
|
+
senderName: string;
|
|
25
|
+
phone: string | null;
|
|
26
|
+
group: boolean;
|
|
27
|
+
at: number;
|
|
28
|
+
text: string | null;
|
|
29
|
+
file: {
|
|
30
|
+
name: string | null;
|
|
31
|
+
inside: string[];
|
|
32
|
+
} | null;
|
|
33
|
+
rules: ("exeInZip" | "executable" | "doubleExtension" | "scamNumber" | "cantInspect" | "macroFile" | "unlockCodeInMessage" | "openOnComputer" | "lookalikeLink" | "financeUrgency" | "firstFile")[];
|
|
34
|
+
score: number;
|
|
35
|
+
ruleLevel: "none" | "warning" | "high";
|
|
36
|
+
critical: boolean;
|
|
37
|
+
ai: {
|
|
38
|
+
level: "none" | "warning" | "high";
|
|
39
|
+
category: "none" | "malware_lure" | "phishing" | "impersonation" | "payment_fraud";
|
|
40
|
+
reason: string;
|
|
41
|
+
} | null;
|
|
42
|
+
level: "none" | "warning" | "high";
|
|
43
|
+
status: "open" | "safe" | "reported" | "blocked" | "cleared";
|
|
44
|
+
existingCustomer: boolean;
|
|
45
|
+
quarantined: boolean;
|
|
46
|
+
released: boolean;
|
|
47
|
+
deleted: {
|
|
48
|
+
by: string;
|
|
49
|
+
at: number;
|
|
50
|
+
} | null;
|
|
51
|
+
autoBlocked: boolean;
|
|
52
|
+
scam: boolean;
|
|
53
|
+
blocked: boolean;
|
|
54
|
+
canBlock: boolean;
|
|
55
|
+
downloads: {
|
|
56
|
+
name: string;
|
|
57
|
+
at: number;
|
|
58
|
+
allowed: boolean;
|
|
59
|
+
}[];
|
|
60
|
+
}[];
|
|
61
|
+
blocked: {
|
|
62
|
+
waJid: string;
|
|
63
|
+
phone: string | null;
|
|
64
|
+
name: string;
|
|
65
|
+
by: string | null;
|
|
66
|
+
at: number;
|
|
67
|
+
auto: boolean;
|
|
68
|
+
itemId: number | null;
|
|
69
|
+
}[];
|
|
70
|
+
}, Error>;
|
|
71
|
+
export declare function useSafetyChat(jid: string): import("@tanstack/react-query").UseQueryResult<{
|
|
72
|
+
enabled: boolean;
|
|
73
|
+
scam: boolean;
|
|
74
|
+
blocked: {
|
|
75
|
+
by: string | null;
|
|
76
|
+
at: number;
|
|
77
|
+
auto: boolean;
|
|
78
|
+
} | null;
|
|
79
|
+
maybeHacked: boolean;
|
|
80
|
+
itemId: number | null;
|
|
81
|
+
}, Error>;
|
|
82
|
+
export declare function useSafetyReport(days: ReportPeriod): import("@tanstack/react-query").UseQueryResult<{
|
|
83
|
+
days: 7 | 30 | 90;
|
|
84
|
+
enabled: boolean;
|
|
85
|
+
totals: {
|
|
86
|
+
dangerousFiles: number;
|
|
87
|
+
scamMessages: number;
|
|
88
|
+
riskyDownloads: number;
|
|
89
|
+
refusedDownloads: number;
|
|
90
|
+
numbersBlocked: number;
|
|
91
|
+
autoBlocked: number;
|
|
92
|
+
maybeHacked: number;
|
|
93
|
+
flagged: number;
|
|
94
|
+
falseAlarms: number;
|
|
95
|
+
};
|
|
96
|
+
previous: {
|
|
97
|
+
dangerousFiles: number;
|
|
98
|
+
scamMessages: number;
|
|
99
|
+
riskyDownloads: number;
|
|
100
|
+
refusedDownloads: number;
|
|
101
|
+
numbersBlocked: number;
|
|
102
|
+
autoBlocked: number;
|
|
103
|
+
maybeHacked: number;
|
|
104
|
+
flagged: number;
|
|
105
|
+
falseAlarms: number;
|
|
106
|
+
};
|
|
107
|
+
daily: {
|
|
108
|
+
date: string;
|
|
109
|
+
high: number;
|
|
110
|
+
warning: number;
|
|
111
|
+
}[];
|
|
112
|
+
kinds: {
|
|
113
|
+
kind: "scamNumber" | "macroFile" | "other" | "hiddenProgram" | "fakeLink" | "paymentTrick" | "lockedArchive";
|
|
114
|
+
count: number;
|
|
115
|
+
}[];
|
|
116
|
+
senders: {
|
|
117
|
+
chatJid: string;
|
|
118
|
+
phone: string | null;
|
|
119
|
+
name: string;
|
|
120
|
+
count: number;
|
|
121
|
+
status: "open" | "reported" | "blocked" | "done" | "maybeHacked";
|
|
122
|
+
}[];
|
|
123
|
+
team: {
|
|
124
|
+
name: string;
|
|
125
|
+
riskyDownloads: number;
|
|
126
|
+
refused: number;
|
|
127
|
+
}[];
|
|
128
|
+
}, Error>;
|
|
129
|
+
export declare function useSafetySettings(): import("@tanstack/react-query").UseMutationResult<{
|
|
130
|
+
enabled: boolean;
|
|
131
|
+
ai: boolean;
|
|
132
|
+
autoBlock: boolean;
|
|
133
|
+
deleteAfterDays: 7 | 30 | 90;
|
|
134
|
+
}, Error, Partial<{
|
|
135
|
+
enabled: boolean;
|
|
136
|
+
ai: boolean;
|
|
137
|
+
autoBlock: boolean;
|
|
138
|
+
deleteAfterDays: 7 | 30 | 90;
|
|
139
|
+
}>, unknown>;
|
|
140
|
+
export declare function useSafetyAction(): import("@tanstack/react-query").UseMutationResult<{
|
|
141
|
+
settings: {
|
|
142
|
+
enabled: boolean;
|
|
143
|
+
ai: boolean;
|
|
144
|
+
autoBlock: boolean;
|
|
145
|
+
deleteAfterDays: 7 | 30 | 90;
|
|
146
|
+
};
|
|
147
|
+
aiReady: boolean;
|
|
148
|
+
items: {
|
|
149
|
+
id: number;
|
|
150
|
+
messageId: string;
|
|
151
|
+
chatJid: string;
|
|
152
|
+
inboxId: number;
|
|
153
|
+
senderName: string;
|
|
154
|
+
phone: string | null;
|
|
155
|
+
group: boolean;
|
|
156
|
+
at: number;
|
|
157
|
+
text: string | null;
|
|
158
|
+
file: {
|
|
159
|
+
name: string | null;
|
|
160
|
+
inside: string[];
|
|
161
|
+
} | null;
|
|
162
|
+
rules: ("exeInZip" | "executable" | "doubleExtension" | "scamNumber" | "cantInspect" | "macroFile" | "unlockCodeInMessage" | "openOnComputer" | "lookalikeLink" | "financeUrgency" | "firstFile")[];
|
|
163
|
+
score: number;
|
|
164
|
+
ruleLevel: "none" | "warning" | "high";
|
|
165
|
+
critical: boolean;
|
|
166
|
+
ai: {
|
|
167
|
+
level: "none" | "warning" | "high";
|
|
168
|
+
category: "none" | "malware_lure" | "phishing" | "impersonation" | "payment_fraud";
|
|
169
|
+
reason: string;
|
|
170
|
+
} | null;
|
|
171
|
+
level: "none" | "warning" | "high";
|
|
172
|
+
status: "open" | "safe" | "reported" | "blocked" | "cleared";
|
|
173
|
+
existingCustomer: boolean;
|
|
174
|
+
quarantined: boolean;
|
|
175
|
+
released: boolean;
|
|
176
|
+
deleted: {
|
|
177
|
+
by: string;
|
|
178
|
+
at: number;
|
|
179
|
+
} | null;
|
|
180
|
+
autoBlocked: boolean;
|
|
181
|
+
scam: boolean;
|
|
182
|
+
blocked: boolean;
|
|
183
|
+
canBlock: boolean;
|
|
184
|
+
downloads: {
|
|
185
|
+
name: string;
|
|
186
|
+
at: number;
|
|
187
|
+
allowed: boolean;
|
|
188
|
+
}[];
|
|
189
|
+
}[];
|
|
190
|
+
blocked: {
|
|
191
|
+
waJid: string;
|
|
192
|
+
phone: string | null;
|
|
193
|
+
name: string;
|
|
194
|
+
by: string | null;
|
|
195
|
+
at: number;
|
|
196
|
+
auto: boolean;
|
|
197
|
+
itemId: number | null;
|
|
198
|
+
}[];
|
|
199
|
+
}, Error, {
|
|
200
|
+
id: number;
|
|
201
|
+
action: SafetyAction;
|
|
202
|
+
body?: SafetyActionBody;
|
|
203
|
+
}, unknown>;
|
|
@@ -67,6 +67,15 @@ export declare function useSendTemplate(jid: string): import("@tanstack/react-qu
|
|
|
67
67
|
chatJid: string;
|
|
68
68
|
name: string;
|
|
69
69
|
} | null | undefined;
|
|
70
|
+
safety?: {
|
|
71
|
+
itemId: number;
|
|
72
|
+
level: "none" | "warning" | "high";
|
|
73
|
+
rules: ("exeInZip" | "executable" | "doubleExtension" | "scamNumber" | "cantInspect" | "macroFile" | "unlockCodeInMessage" | "openOnComputer" | "lookalikeLink" | "financeUrgency" | "firstFile")[];
|
|
74
|
+
aiReason: string | null;
|
|
75
|
+
locked: boolean;
|
|
76
|
+
deletedBy: string | null;
|
|
77
|
+
status: "open" | "safe" | "reported" | "blocked" | "cleared";
|
|
78
|
+
} | null | undefined;
|
|
70
79
|
}, Error, {
|
|
71
80
|
name: string;
|
|
72
81
|
language: string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type TipTopic } from '../../lib/tips';
|
|
2
|
+
/** A tip's text when an edition brings its own concept (core topics use `topic`). */
|
|
3
|
+
export interface InfoTipContent {
|
|
4
|
+
/** "What is …?": also the "?" button's accessible name. */
|
|
5
|
+
title: string;
|
|
6
|
+
/** One or two plain sentences. */
|
|
7
|
+
body: string;
|
|
8
|
+
/** Folded "Show steps" lines. */
|
|
9
|
+
steps?: readonly string[];
|
|
10
|
+
/** The outside page where the thing is made (https only). */
|
|
11
|
+
action?: {
|
|
12
|
+
href: string;
|
|
13
|
+
label: string;
|
|
14
|
+
};
|
|
15
|
+
/** A full guide page (https only). */
|
|
16
|
+
guideHref?: string;
|
|
17
|
+
}
|
|
18
|
+
export type InfoTipProps = {
|
|
19
|
+
className?: string;
|
|
20
|
+
} & ({
|
|
21
|
+
topic: TipTopic;
|
|
22
|
+
} | InfoTipContent);
|
|
23
|
+
/**
|
|
24
|
+
* A small "?" after a label or title that names a new concept (API key, model, hand-over…). Click or
|
|
25
|
+
* tap opens a short card: what it is in one or two sentences, then one row of actions (the outside
|
|
26
|
+
* page where it is made, "Show steps" when there are steps, "Full guide"). Steps stay folded until
|
|
27
|
+
* asked for and sit under the buttons, so the buttons stay on screen on a phone. Nothing is sent or
|
|
28
|
+
* saved. Keep it outside the heading or label element so their accessible names stay clean.
|
|
29
|
+
*/
|
|
30
|
+
export declare function InfoTip(props: InfoTipProps): import("react").JSX.Element;
|
|
@@ -1,9 +1,25 @@
|
|
|
1
|
+
import type { DesktopUpgradeBridge, DesktopUpgradeState } from '@ezychat/shared';
|
|
1
2
|
/**
|
|
2
3
|
* The "Upgrade to Enterprise" address, or null when the product hides it: Lite links
|
|
3
4
|
* ezychat.ai/#enterprise (with a campaign tag), another product passes `createInboxApp({ links: { upgrade: null } })`.
|
|
4
5
|
*/
|
|
5
6
|
export declare function useUpgradeUrl(): string | null;
|
|
6
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Lite's Upgrade dialog in the desktop window on the host PC: downloads the EzyChat Enterprise installer,
|
|
9
|
+
* checks it and starts it (the desktop does all of that; the page only asks and shows progress).
|
|
10
|
+
*/
|
|
11
|
+
export declare function UpgradeDialog({ open, onOpenChange, bridge, state, onState, learnMoreUrl, }: {
|
|
12
|
+
open: boolean;
|
|
13
|
+
onOpenChange: (open: boolean) => void;
|
|
14
|
+
bridge: DesktopUpgradeBridge;
|
|
15
|
+
state: DesktopUpgradeState;
|
|
16
|
+
onState: (state: DesktopUpgradeState) => void;
|
|
17
|
+
learnMoreUrl: string;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* The upgrade button: in the desktop window on the host PC it opens the Upgrade dialog (install
|
|
21
|
+
* EzyChat Enterprise); anywhere else it opens the Enterprise page in the browser. Nothing when hidden.
|
|
22
|
+
*/
|
|
7
23
|
export declare function UpgradeButton({ className }: {
|
|
8
24
|
className?: string;
|
|
9
25
|
}): import("react").JSX.Element | null;
|
|
@@ -55,10 +55,12 @@ export declare function ResponsiveDialog({ open, onOpenChange, title, descriptio
|
|
|
55
55
|
export { AppCredits } from './AppCredits';
|
|
56
56
|
export { AboutDialog } from './AboutDialog';
|
|
57
57
|
export { SegmentedControl, type SegmentedOption } from './SegmentedControl';
|
|
58
|
-
export declare function PageHeader({ title, description, actions, className, }: {
|
|
58
|
+
export declare function PageHeader({ title, description, actions, titleTip, className, }: {
|
|
59
59
|
title: React.ReactNode;
|
|
60
60
|
description?: React.ReactNode;
|
|
61
61
|
actions?: React.ReactNode;
|
|
62
|
+
/** A "?" (`InfoTip`) after the title, kept outside the heading so its name stays clean. */
|
|
63
|
+
titleTip?: React.ReactNode;
|
|
62
64
|
className?: string;
|
|
63
65
|
}): React.JSX.Element;
|
|
64
66
|
export interface Column<T> {
|
|
@@ -36,7 +36,7 @@ export interface WebExtensionRoute {
|
|
|
36
36
|
section?: WebExtensionAdminSection;
|
|
37
37
|
}
|
|
38
38
|
/** Core admin sections an extension admin route may sit under (the `ADMIN_NAV` paths). */
|
|
39
|
-
export declare const WEB_EXTENSION_ADMIN_SECTIONS: readonly ["reports", "members", "quick-replies", "connectors", "whatsapp", "inboxes", "tunnel", "settings", "audit"];
|
|
39
|
+
export declare const WEB_EXTENSION_ADMIN_SECTIONS: readonly ["reports", "safety", "members", "quick-replies", "connectors", "whatsapp", "inboxes", "tunnel", "settings", "audit"];
|
|
40
40
|
export type WebExtensionAdminSection = (typeof WEB_EXTENSION_ADMIN_SECTIONS)[number];
|
|
41
41
|
/** A small badge on an admin nav link: a count, or a dot that asks for attention. */
|
|
42
42
|
export interface WebExtensionNavBadge {
|