@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
|
@@ -8,6 +8,10 @@ export declare const ADMIN_NAV: readonly [{
|
|
|
8
8
|
readonly to: "reports";
|
|
9
9
|
readonly labelKey: "nav.reports";
|
|
10
10
|
readonly icon: LucideIcon;
|
|
11
|
+
}, {
|
|
12
|
+
readonly to: "safety";
|
|
13
|
+
readonly labelKey: "nav.safety";
|
|
14
|
+
readonly icon: LucideIcon;
|
|
11
15
|
}, {
|
|
12
16
|
readonly to: "members";
|
|
13
17
|
readonly labelKey: "nav.members";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent page → Direct chats (design docs/features/ai-direct-chats/design.md): the agent's "Answer
|
|
3
|
+
* direct chats" switch, on by default. Off with "Answer in groups" on makes a group-only agent: it
|
|
4
|
+
* never answers or takes a direct chat, teammates cannot assign one to it, and the direct chats it
|
|
5
|
+
* holds go back to the team (after a confirm naming how many). Hidden while the agent's inbox has no
|
|
6
|
+
* WhatsApp groups (the WhatsApp Business API), where the switch does not apply.
|
|
7
|
+
*/
|
|
8
|
+
export declare function AgentDirectCard({ agentId, name, inboxName, }: Readonly<{
|
|
9
|
+
agentId: number;
|
|
10
|
+
name: string;
|
|
11
|
+
/** The name of the agent's inbox; null = the agent answers no inbox (card hidden). */
|
|
12
|
+
inboxName: string | null;
|
|
13
|
+
}>): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent page → "Ask if the question is answered": on, the agent ends an answer with a resolution
|
|
3
|
+
* question and may close the chat on a clear "yes"; off (sales default), it adds no check-in line
|
|
4
|
+
* and never closes a chat. Saves at once, like the Groups switch.
|
|
5
|
+
*/
|
|
6
|
+
export declare function AgentResolutionCard({ agentId, name, enabled, }: Readonly<{
|
|
7
|
+
agentId: number;
|
|
8
|
+
name: string;
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
}>): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Admin → Safety (docs/features/whatsapp-safety/design.md): what WhatsApp Safety flagged (who sent
|
|
3
|
+
* it, from which number, why, who on the team downloaded it), the blocked numbers and the settings.
|
|
4
|
+
* Admins only, every inbox.
|
|
5
|
+
*/
|
|
6
|
+
export declare function SafetyPage(): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { ReportPeriod } from '@ezychat/shared';
|
|
3
|
+
/**
|
|
4
|
+
* Admin → Reports → WhatsApp Safety (docs/features/whatsapp-safety/design.md): what reached the
|
|
5
|
+
* team (dangerous files, scam messages), what the team did with it (risky downloads, blocks) and
|
|
6
|
+
* whether the checks are set right (false alarms), for the same 7 / 30 / 90 days as the page.
|
|
7
|
+
*/
|
|
8
|
+
export declare function SafetyReportSection({ days }: {
|
|
9
|
+
days: ReportPeriod;
|
|
10
|
+
}): React.JSX.Element | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { TipTopic } from '../lib/tips';
|
|
2
3
|
/** Props a Field hands to its control so label, hint and error are wired up for a11y. */
|
|
3
4
|
export interface FieldControlProps {
|
|
4
5
|
id: string;
|
|
@@ -6,13 +7,15 @@ export interface FieldControlProps {
|
|
|
6
7
|
'aria-invalid'?: true;
|
|
7
8
|
}
|
|
8
9
|
/** Label + control + hint/error text. The control is rendered by `children(props)`. */
|
|
9
|
-
export declare function Field({ label, hint, error, className, labelClassName, children, }: {
|
|
10
|
+
export declare function Field({ label, hint, error, className, labelClassName, tip, children, }: {
|
|
10
11
|
label: React.ReactNode;
|
|
11
12
|
hint?: React.ReactNode;
|
|
12
13
|
error?: React.ReactNode;
|
|
13
14
|
className?: string;
|
|
14
15
|
/** For example `sr-only` when a card title already shows the same words. */
|
|
15
16
|
labelClassName?: string;
|
|
17
|
+
/** A "?" after the label that explains the concept (`InfoTip`), outside the label element. */
|
|
18
|
+
tip?: TipTopic;
|
|
16
19
|
children: (props: FieldControlProps) => React.ReactNode;
|
|
17
20
|
}): React.JSX.Element;
|
|
18
21
|
/**
|
|
@@ -16,6 +16,9 @@ export declare function useAgentGroups(agentId: number): import("@tanstack/react
|
|
|
16
16
|
paused: boolean;
|
|
17
17
|
}[];
|
|
18
18
|
loopGuard: number;
|
|
19
|
+
answerDirect: boolean;
|
|
20
|
+
directAvailable: boolean;
|
|
21
|
+
heldDirect: number;
|
|
19
22
|
}, Error>;
|
|
20
23
|
export declare function useSetAnswerInGroups(agentId: number): import("@tanstack/react-query").UseMutationResult<{
|
|
21
24
|
enabled: boolean;
|
|
@@ -28,6 +31,28 @@ export declare function useSetAnswerInGroups(agentId: number): import("@tanstack
|
|
|
28
31
|
paused: boolean;
|
|
29
32
|
}[];
|
|
30
33
|
loopGuard: number;
|
|
34
|
+
answerDirect: boolean;
|
|
35
|
+
directAvailable: boolean;
|
|
36
|
+
heldDirect: number;
|
|
37
|
+
}, Error, boolean, unknown>;
|
|
38
|
+
/**
|
|
39
|
+
* "Answer direct chats" (design docs/features/ai-direct-chats/design.md): off makes a group-only
|
|
40
|
+
* agent. The team directory follows (`aiNoDirect` leaves the agent out of direct-chat assignment).
|
|
41
|
+
*/
|
|
42
|
+
export declare function useSetAnswerDirect(agentId: number): import("@tanstack/react-query").UseMutationResult<{
|
|
43
|
+
enabled: boolean;
|
|
44
|
+
inboxName: string | null;
|
|
45
|
+
groups: {
|
|
46
|
+
jid: string;
|
|
47
|
+
name: string;
|
|
48
|
+
memberCount: number | null;
|
|
49
|
+
enabled: boolean;
|
|
50
|
+
paused: boolean;
|
|
51
|
+
}[];
|
|
52
|
+
loopGuard: number;
|
|
53
|
+
answerDirect: boolean;
|
|
54
|
+
directAvailable: boolean;
|
|
55
|
+
heldDirect: number;
|
|
31
56
|
}, Error, boolean, unknown>;
|
|
32
57
|
/** Whether the AI answers tags and quotes in this group (anyone who may open the chat). */
|
|
33
58
|
export declare function useGroupChatAi(jid: string | null): import("@tanstack/react-query").UseQueryResult<{
|
|
@@ -12,7 +12,7 @@ export declare function useAiMember(): import("@tanstack/react-query").UseQueryR
|
|
|
12
12
|
disabled: boolean;
|
|
13
13
|
createdAt: number;
|
|
14
14
|
locale: "en" | "ms" | "zh-CN" | null;
|
|
15
|
-
kind?: "
|
|
15
|
+
kind?: "ai" | "human" | undefined;
|
|
16
16
|
aiRole?: "sales" | undefined;
|
|
17
17
|
aiAgentId?: number | undefined;
|
|
18
18
|
aiDeleted?: boolean | undefined;
|
|
@@ -52,6 +52,7 @@ export declare function useAiMember(): import("@tanstack/react-query").UseQueryR
|
|
|
52
52
|
preset: "sales" | "custom" | "faq";
|
|
53
53
|
inboxId: number | null;
|
|
54
54
|
documentCount: number;
|
|
55
|
+
resolutionCheck?: boolean | undefined;
|
|
55
56
|
}[];
|
|
56
57
|
maxAgents: number;
|
|
57
58
|
}, Error>;
|
|
@@ -89,7 +90,7 @@ export declare function useAiTest(): import("@tanstack/react-query").UseMutation
|
|
|
89
90
|
export declare function useAiTry(): import("@tanstack/react-query").UseMutationResult<{
|
|
90
91
|
ok: boolean;
|
|
91
92
|
reply: string | null;
|
|
92
|
-
action: "
|
|
93
|
+
action: "handoff" | "answer" | "ask_resolution" | "resolve" | "no_reply" | null;
|
|
93
94
|
model: string | null;
|
|
94
95
|
error: string | null;
|
|
95
96
|
handoffReason?: "asked_for_human" | "missing_facts" | "sensitive" | "needs_action" | "business_rule" | "unsupported_message" | "ai_unavailable" | "lookup_failed" | "confidential_leak" | "window_closed" | null | undefined;
|
|
@@ -106,7 +107,7 @@ export declare function useAiTry(): import("@tanstack/react-query").UseMutationR
|
|
|
106
107
|
end?: string | undefined;
|
|
107
108
|
} | undefined;
|
|
108
109
|
group?: {
|
|
109
|
-
kind: "paused" | "
|
|
110
|
+
kind: "paused" | "handover" | "answered";
|
|
110
111
|
member: string | null;
|
|
111
112
|
quoted?: boolean | undefined;
|
|
112
113
|
} | undefined;
|
|
@@ -180,7 +181,7 @@ export declare function useAiMemberAction(): import("@tanstack/react-query").Use
|
|
|
180
181
|
disabled: boolean;
|
|
181
182
|
createdAt: number;
|
|
182
183
|
locale: "en" | "ms" | "zh-CN" | null;
|
|
183
|
-
kind?: "
|
|
184
|
+
kind?: "ai" | "human" | undefined;
|
|
184
185
|
aiRole?: "sales" | undefined;
|
|
185
186
|
aiAgentId?: number | undefined;
|
|
186
187
|
aiDeleted?: boolean | undefined;
|
|
@@ -220,6 +221,7 @@ export declare function useAiMemberAction(): import("@tanstack/react-query").Use
|
|
|
220
221
|
preset: "sales" | "custom" | "faq";
|
|
221
222
|
inboxId: number | null;
|
|
222
223
|
documentCount: number;
|
|
224
|
+
resolutionCheck?: boolean | undefined;
|
|
223
225
|
}[];
|
|
224
226
|
maxAgents: number;
|
|
225
227
|
}, Error, AiMemberAction, unknown>;
|
|
@@ -237,6 +239,7 @@ export declare const AiAgentList: z.ZodObject<{
|
|
|
237
239
|
}>;
|
|
238
240
|
inboxId: z.ZodNullable<z.ZodNumber>;
|
|
239
241
|
documentCount: z.ZodNumber;
|
|
242
|
+
resolutionCheck: z.ZodOptional<z.ZodBoolean>;
|
|
240
243
|
}, z.core.$strip>>;
|
|
241
244
|
maxAgents: z.ZodNumber;
|
|
242
245
|
}, z.core.$strip>;
|
|
@@ -254,6 +257,7 @@ export declare function useAiAgents(): import("@tanstack/react-query").UseQueryR
|
|
|
254
257
|
preset: "sales" | "custom" | "faq";
|
|
255
258
|
inboxId: number | null;
|
|
256
259
|
documentCount: number;
|
|
260
|
+
resolutionCheck?: boolean | undefined;
|
|
257
261
|
}[];
|
|
258
262
|
maxAgents: number;
|
|
259
263
|
}, Error>;
|
|
@@ -267,6 +271,7 @@ export declare function useAiAgent(agentId: number | null): import("@tanstack/re
|
|
|
267
271
|
preset: "sales" | "custom" | "faq";
|
|
268
272
|
inboxId: number | null;
|
|
269
273
|
documentCount: number;
|
|
274
|
+
resolutionCheck?: boolean | undefined;
|
|
270
275
|
};
|
|
271
276
|
settings: {
|
|
272
277
|
enabled: boolean;
|
|
@@ -287,6 +292,37 @@ export declare function useAiAgent(agentId: number | null): import("@tanstack/re
|
|
|
287
292
|
internal: boolean;
|
|
288
293
|
}[];
|
|
289
294
|
}, Error>;
|
|
295
|
+
/** The agent's "Ask if the question is answered" switch; saves at once. */
|
|
296
|
+
export declare function useSetResolutionCheck(agentId: number): import("@tanstack/react-query").UseMutationResult<{
|
|
297
|
+
agent: {
|
|
298
|
+
id: number;
|
|
299
|
+
userId: number;
|
|
300
|
+
displayName: string;
|
|
301
|
+
enabled: boolean;
|
|
302
|
+
preset: "sales" | "custom" | "faq";
|
|
303
|
+
inboxId: number | null;
|
|
304
|
+
documentCount: number;
|
|
305
|
+
resolutionCheck?: boolean | undefined;
|
|
306
|
+
};
|
|
307
|
+
settings: {
|
|
308
|
+
enabled: boolean;
|
|
309
|
+
displayName: string;
|
|
310
|
+
mode: "api" | "chatgpt" | "claude";
|
|
311
|
+
model: string;
|
|
312
|
+
instructions: string;
|
|
313
|
+
handoffRules?: string | undefined;
|
|
314
|
+
};
|
|
315
|
+
documents: {
|
|
316
|
+
id: number;
|
|
317
|
+
name: string;
|
|
318
|
+
kind: "text" | "file";
|
|
319
|
+
size: number;
|
|
320
|
+
characters: number;
|
|
321
|
+
createdAt: number;
|
|
322
|
+
updatedAt: number;
|
|
323
|
+
internal: boolean;
|
|
324
|
+
}[];
|
|
325
|
+
}, Error, boolean, unknown>;
|
|
290
326
|
/** One Business context item of an agent with its text (full for text, a preview for files). */
|
|
291
327
|
export declare function useAiAgentDocument(agentId: number, id: number | null): import("@tanstack/react-query").UseQueryResult<{
|
|
292
328
|
id: number;
|
|
@@ -343,6 +379,7 @@ export declare function useAiAgentAction(agentId: number | null): import("@tanst
|
|
|
343
379
|
preset: "sales" | "custom" | "faq";
|
|
344
380
|
inboxId: number | null;
|
|
345
381
|
documentCount: number;
|
|
382
|
+
resolutionCheck?: boolean | undefined;
|
|
346
383
|
}[];
|
|
347
384
|
maxAgents: number;
|
|
348
385
|
} | {
|
|
@@ -354,6 +391,7 @@ export declare function useAiAgentAction(agentId: number | null): import("@tanst
|
|
|
354
391
|
preset: "sales" | "custom" | "faq";
|
|
355
392
|
inboxId: number | null;
|
|
356
393
|
documentCount: number;
|
|
394
|
+
resolutionCheck?: boolean | undefined;
|
|
357
395
|
};
|
|
358
396
|
settings: {
|
|
359
397
|
enabled: boolean;
|
|
@@ -387,6 +425,7 @@ export declare function useAddAgentText(): import("@tanstack/react-query").UseMu
|
|
|
387
425
|
preset: "sales" | "custom" | "faq";
|
|
388
426
|
inboxId: number | null;
|
|
389
427
|
documentCount: number;
|
|
428
|
+
resolutionCheck?: boolean | undefined;
|
|
390
429
|
};
|
|
391
430
|
settings: {
|
|
392
431
|
enabled: boolean;
|
|
@@ -3,10 +3,10 @@ import { type WaAction } from './queries';
|
|
|
3
3
|
export declare function useCreateInbox(): import("@tanstack/react-query").UseMutationResult<{
|
|
4
4
|
id: number;
|
|
5
5
|
name: string;
|
|
6
|
-
tone: "
|
|
6
|
+
tone: "warning" | "success" | "primary" | "info";
|
|
7
7
|
number: string | null;
|
|
8
8
|
status: {
|
|
9
|
-
state: "open" | "qr" | "disconnected" | "connecting" | "logged_out" | "replaced"
|
|
9
|
+
state: "open" | "blocked" | "qr" | "disconnected" | "connecting" | "logged_out" | "replaced";
|
|
10
10
|
me: {
|
|
11
11
|
jid: string;
|
|
12
12
|
name: string | null;
|
|
@@ -25,6 +25,7 @@ export declare function useCreateInbox(): import("@tanstack/react-query").UseMut
|
|
|
25
25
|
replyWindowHours: number | null;
|
|
26
26
|
templates: boolean;
|
|
27
27
|
needsPublicUrl: boolean;
|
|
28
|
+
mentions?: boolean | undefined;
|
|
28
29
|
};
|
|
29
30
|
memberIds?: number[] | undefined;
|
|
30
31
|
}, Error, {
|
|
@@ -35,10 +36,10 @@ export declare function useCreateInbox(): import("@tanstack/react-query").UseMut
|
|
|
35
36
|
export declare function useUpdateInbox(): import("@tanstack/react-query").UseMutationResult<{
|
|
36
37
|
id: number;
|
|
37
38
|
name: string;
|
|
38
|
-
tone: "
|
|
39
|
+
tone: "warning" | "success" | "primary" | "info";
|
|
39
40
|
number: string | null;
|
|
40
41
|
status: {
|
|
41
|
-
state: "open" | "qr" | "disconnected" | "connecting" | "logged_out" | "replaced"
|
|
42
|
+
state: "open" | "blocked" | "qr" | "disconnected" | "connecting" | "logged_out" | "replaced";
|
|
42
43
|
me: {
|
|
43
44
|
jid: string;
|
|
44
45
|
name: string | null;
|
|
@@ -57,6 +58,7 @@ export declare function useUpdateInbox(): import("@tanstack/react-query").UseMut
|
|
|
57
58
|
replyWindowHours: number | null;
|
|
58
59
|
templates: boolean;
|
|
59
60
|
needsPublicUrl: boolean;
|
|
61
|
+
mentions?: boolean | undefined;
|
|
60
62
|
};
|
|
61
63
|
memberIds?: number[] | undefined;
|
|
62
64
|
}, Error, {
|
|
@@ -80,7 +82,7 @@ export declare function useSetUserInboxes(userId: number): import("@tanstack/rea
|
|
|
80
82
|
disabled: boolean;
|
|
81
83
|
createdAt: number;
|
|
82
84
|
locale: "en" | "ms" | "zh-CN" | null;
|
|
83
|
-
kind?: "
|
|
85
|
+
kind?: "ai" | "human" | undefined;
|
|
84
86
|
aiRole?: "sales" | undefined;
|
|
85
87
|
aiAgentId?: number | undefined;
|
|
86
88
|
aiDeleted?: boolean | undefined;
|
|
@@ -67,7 +67,7 @@ export declare function useMe(): import("@tanstack/react-query").UseQueryResult<
|
|
|
67
67
|
disabled: boolean;
|
|
68
68
|
createdAt: number;
|
|
69
69
|
locale: "en" | "ms" | "zh-CN" | null;
|
|
70
|
-
kind?: "
|
|
70
|
+
kind?: "ai" | "human" | undefined;
|
|
71
71
|
aiRole?: "sales" | undefined;
|
|
72
72
|
aiAgentId?: number | undefined;
|
|
73
73
|
aiDeleted?: boolean | undefined;
|
|
@@ -91,7 +91,7 @@ export declare function useLogin(): import("@tanstack/react-query").UseMutationR
|
|
|
91
91
|
disabled: boolean;
|
|
92
92
|
createdAt: number;
|
|
93
93
|
locale: "en" | "ms" | "zh-CN" | null;
|
|
94
|
-
kind?: "
|
|
94
|
+
kind?: "ai" | "human" | undefined;
|
|
95
95
|
aiRole?: "sales" | undefined;
|
|
96
96
|
aiAgentId?: number | undefined;
|
|
97
97
|
aiDeleted?: boolean | undefined;
|
|
@@ -116,7 +116,7 @@ export declare function useSetMyLocale(): import("@tanstack/react-query").UseMut
|
|
|
116
116
|
disabled: boolean;
|
|
117
117
|
createdAt: number;
|
|
118
118
|
locale: "en" | "ms" | "zh-CN" | null;
|
|
119
|
-
kind?: "
|
|
119
|
+
kind?: "ai" | "human" | undefined;
|
|
120
120
|
aiRole?: "sales" | undefined;
|
|
121
121
|
aiAgentId?: number | undefined;
|
|
122
122
|
aiDeleted?: boolean | undefined;
|
|
@@ -131,7 +131,7 @@ export declare function useChats(filters: ChatFilters): import("@tanstack/react-
|
|
|
131
131
|
jid: string;
|
|
132
132
|
inboxId: number;
|
|
133
133
|
waJid: string;
|
|
134
|
-
type: "
|
|
134
|
+
type: "group" | "dm";
|
|
135
135
|
name: string;
|
|
136
136
|
avatarUrl: string | null;
|
|
137
137
|
unreadCount: number;
|
|
@@ -152,7 +152,7 @@ export declare function useChat(jid: string | null | undefined): import("@tansta
|
|
|
152
152
|
jid: string;
|
|
153
153
|
inboxId: number;
|
|
154
154
|
waJid: string;
|
|
155
|
-
type: "
|
|
155
|
+
type: "group" | "dm";
|
|
156
156
|
name: string;
|
|
157
157
|
avatarUrl: string | null;
|
|
158
158
|
unreadCount: number;
|
|
@@ -227,7 +227,7 @@ export declare function useReport(days: ReportPeriod): import("@tanstack/react-q
|
|
|
227
227
|
team: {
|
|
228
228
|
userId: number | null;
|
|
229
229
|
name: string;
|
|
230
|
-
kind: "phone" | "
|
|
230
|
+
kind: "phone" | "ai" | "human";
|
|
231
231
|
chats: number;
|
|
232
232
|
replies: number;
|
|
233
233
|
medianReplyMinutes: number | null;
|
|
@@ -280,6 +280,15 @@ export declare function useMessages(jid: string | null | undefined): import("@ta
|
|
|
280
280
|
chatJid: string;
|
|
281
281
|
name: string;
|
|
282
282
|
} | null | undefined;
|
|
283
|
+
safety?: {
|
|
284
|
+
itemId: number;
|
|
285
|
+
level: "none" | "warning" | "high";
|
|
286
|
+
rules: ("exeInZip" | "executable" | "doubleExtension" | "scamNumber" | "cantInspect" | "macroFile" | "unlockCodeInMessage" | "openOnComputer" | "lookalikeLink" | "financeUrgency" | "firstFile")[];
|
|
287
|
+
aiReason: string | null;
|
|
288
|
+
locked: boolean;
|
|
289
|
+
deletedBy: string | null;
|
|
290
|
+
status: "open" | "safe" | "reported" | "blocked" | "cleared";
|
|
291
|
+
} | null | undefined;
|
|
283
292
|
}[];
|
|
284
293
|
nextBefore: string | null;
|
|
285
294
|
}, unknown>, Error>;
|
|
@@ -288,6 +297,10 @@ export declare function flattenMessages(data: MessagesData | undefined): Message
|
|
|
288
297
|
export interface SendTextInput {
|
|
289
298
|
text: string;
|
|
290
299
|
quotedId?: string;
|
|
300
|
+
/** Group chats: the tagged members' addresses (the text carries their `@<number>` tags). */
|
|
301
|
+
mentions?: string[];
|
|
302
|
+
/** The text as the box showed it (`@Name`), for the pending bubble until the server answers. */
|
|
303
|
+
shown?: string;
|
|
291
304
|
/** Generate with `newClientId()` (crypto.randomUUID). */
|
|
292
305
|
clientId: string;
|
|
293
306
|
}
|
|
@@ -331,6 +344,15 @@ export declare function useSendText(jid: string): import("@tanstack/react-query"
|
|
|
331
344
|
chatJid: string;
|
|
332
345
|
name: string;
|
|
333
346
|
} | null | undefined;
|
|
347
|
+
safety?: {
|
|
348
|
+
itemId: number;
|
|
349
|
+
level: "none" | "warning" | "high";
|
|
350
|
+
rules: ("exeInZip" | "executable" | "doubleExtension" | "scamNumber" | "cantInspect" | "macroFile" | "unlockCodeInMessage" | "openOnComputer" | "lookalikeLink" | "financeUrgency" | "firstFile")[];
|
|
351
|
+
aiReason: string | null;
|
|
352
|
+
locked: boolean;
|
|
353
|
+
deletedBy: string | null;
|
|
354
|
+
status: "open" | "safe" | "reported" | "blocked" | "cleared";
|
|
355
|
+
} | null | undefined;
|
|
334
356
|
}, Error, SendTextInput, {
|
|
335
357
|
clientId: string;
|
|
336
358
|
}>;
|
|
@@ -382,6 +404,15 @@ export declare function useSendMedia(jid: string): import("@tanstack/react-query
|
|
|
382
404
|
chatJid: string;
|
|
383
405
|
name: string;
|
|
384
406
|
} | null | undefined;
|
|
407
|
+
safety?: {
|
|
408
|
+
itemId: number;
|
|
409
|
+
level: "none" | "warning" | "high";
|
|
410
|
+
rules: ("exeInZip" | "executable" | "doubleExtension" | "scamNumber" | "cantInspect" | "macroFile" | "unlockCodeInMessage" | "openOnComputer" | "lookalikeLink" | "financeUrgency" | "firstFile")[];
|
|
411
|
+
aiReason: string | null;
|
|
412
|
+
locked: boolean;
|
|
413
|
+
deletedBy: string | null;
|
|
414
|
+
status: "open" | "safe" | "reported" | "blocked" | "cleared";
|
|
415
|
+
} | null | undefined;
|
|
385
416
|
}, Error, SendMediaInput, void>;
|
|
386
417
|
export declare function useRetryMessage(): import("@tanstack/react-query").UseMutationResult<{
|
|
387
418
|
id: string;
|
|
@@ -422,6 +453,15 @@ export declare function useRetryMessage(): import("@tanstack/react-query").UseMu
|
|
|
422
453
|
chatJid: string;
|
|
423
454
|
name: string;
|
|
424
455
|
} | null | undefined;
|
|
456
|
+
safety?: {
|
|
457
|
+
itemId: number;
|
|
458
|
+
level: "none" | "warning" | "high";
|
|
459
|
+
rules: ("exeInZip" | "executable" | "doubleExtension" | "scamNumber" | "cantInspect" | "macroFile" | "unlockCodeInMessage" | "openOnComputer" | "lookalikeLink" | "financeUrgency" | "firstFile")[];
|
|
460
|
+
aiReason: string | null;
|
|
461
|
+
locked: boolean;
|
|
462
|
+
deletedBy: string | null;
|
|
463
|
+
status: "open" | "safe" | "reported" | "blocked" | "cleared";
|
|
464
|
+
} | null | undefined;
|
|
425
465
|
}, Error, string, unknown>;
|
|
426
466
|
/**
|
|
427
467
|
* The linked number reacts to a message (`emoji` '' removes the reaction). The answer carries the
|
|
@@ -446,7 +486,7 @@ export declare function usePatchChat(jid: string): import("@tanstack/react-query
|
|
|
446
486
|
jid: string;
|
|
447
487
|
inboxId: number;
|
|
448
488
|
waJid: string;
|
|
449
|
-
type: "
|
|
489
|
+
type: "group" | "dm";
|
|
450
490
|
name: string;
|
|
451
491
|
avatarUrl: string | null;
|
|
452
492
|
unreadCount: number;
|
|
@@ -593,7 +633,7 @@ export declare function useUsers(opts?: {
|
|
|
593
633
|
disabled: boolean;
|
|
594
634
|
createdAt: number;
|
|
595
635
|
locale: "en" | "ms" | "zh-CN" | null;
|
|
596
|
-
kind?: "
|
|
636
|
+
kind?: "ai" | "human" | undefined;
|
|
597
637
|
aiRole?: "sales" | undefined;
|
|
598
638
|
aiAgentId?: number | undefined;
|
|
599
639
|
aiDeleted?: boolean | undefined;
|
|
@@ -614,10 +654,11 @@ export declare function useUserDirectory(opts?: {
|
|
|
614
654
|
role: "admin" | "agent";
|
|
615
655
|
disabled: boolean;
|
|
616
656
|
inboxIds: "all" | number[];
|
|
617
|
-
kind?: "
|
|
657
|
+
kind?: "ai" | "human" | undefined;
|
|
618
658
|
aiRole?: "sales" | undefined;
|
|
619
659
|
aiAgentId?: number | undefined;
|
|
620
660
|
aiDeleted?: boolean | undefined;
|
|
661
|
+
aiNoDirect?: boolean | undefined;
|
|
621
662
|
}[], Error>;
|
|
622
663
|
export declare function useCreateUser(): import("@tanstack/react-query").UseMutationResult<{
|
|
623
664
|
id: number;
|
|
@@ -628,7 +669,7 @@ export declare function useCreateUser(): import("@tanstack/react-query").UseMuta
|
|
|
628
669
|
disabled: boolean;
|
|
629
670
|
createdAt: number;
|
|
630
671
|
locale: "en" | "ms" | "zh-CN" | null;
|
|
631
|
-
kind?: "
|
|
672
|
+
kind?: "ai" | "human" | undefined;
|
|
632
673
|
aiRole?: "sales" | undefined;
|
|
633
674
|
aiAgentId?: number | undefined;
|
|
634
675
|
aiDeleted?: boolean | undefined;
|
|
@@ -648,7 +689,7 @@ export declare function usePatchUser(): import("@tanstack/react-query").UseMutat
|
|
|
648
689
|
disabled: boolean;
|
|
649
690
|
createdAt: number;
|
|
650
691
|
locale: "en" | "ms" | "zh-CN" | null;
|
|
651
|
-
kind?: "
|
|
692
|
+
kind?: "ai" | "human" | undefined;
|
|
652
693
|
aiRole?: "sales" | undefined;
|
|
653
694
|
aiAgentId?: number | undefined;
|
|
654
695
|
aiDeleted?: boolean | undefined;
|
|
@@ -664,7 +705,7 @@ export declare function useRevokeSessions(): import("@tanstack/react-query").Use
|
|
|
664
705
|
export declare function useWaStatus(opts?: {
|
|
665
706
|
enabled?: boolean;
|
|
666
707
|
}): import("@tanstack/react-query").UseQueryResult<{
|
|
667
|
-
state: "open" | "qr" | "disconnected" | "connecting" | "logged_out" | "replaced"
|
|
708
|
+
state: "open" | "blocked" | "qr" | "disconnected" | "connecting" | "logged_out" | "replaced";
|
|
668
709
|
me: {
|
|
669
710
|
jid: string;
|
|
670
711
|
name: string | null;
|
|
@@ -685,10 +726,10 @@ export declare function useInboxes(opts?: {
|
|
|
685
726
|
inboxes: {
|
|
686
727
|
id: number;
|
|
687
728
|
name: string;
|
|
688
|
-
tone: "
|
|
729
|
+
tone: "warning" | "success" | "primary" | "info";
|
|
689
730
|
number: string | null;
|
|
690
731
|
status: {
|
|
691
|
-
state: "open" | "qr" | "disconnected" | "connecting" | "logged_out" | "replaced"
|
|
732
|
+
state: "open" | "blocked" | "qr" | "disconnected" | "connecting" | "logged_out" | "replaced";
|
|
692
733
|
me: {
|
|
693
734
|
jid: string;
|
|
694
735
|
name: string | null;
|
|
@@ -707,6 +748,7 @@ export declare function useInboxes(opts?: {
|
|
|
707
748
|
replyWindowHours: number | null;
|
|
708
749
|
templates: boolean;
|
|
709
750
|
needsPublicUrl: boolean;
|
|
751
|
+
mentions?: boolean | undefined;
|
|
710
752
|
};
|
|
711
753
|
memberIds?: number[] | undefined;
|
|
712
754
|
}[];
|