@ezychat/web 0.1.78 → 0.1.80

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 (37) hide show
  1. package/dist-lib/chunks/{admin-Bw0RmdAy.js → admin-D4nMrYTV.js} +48 -5
  2. package/dist-lib/chunks/{admin-Vk_4QCBI.js → admin-SGy97Cay.js} +46 -5
  3. package/dist-lib/chunks/{inbox-g6IVD36a.js → inbox-BIHKs_xm.js} +182 -5
  4. package/dist-lib/chunks/{inbox-BP7OELj9.js → inbox-DaYVsh_k.js} +182 -5
  5. package/dist-lib/ezychat-web.css +1 -1
  6. package/dist-lib/index.js +9424 -7113
  7. package/dist-lib/public/badge-96.png +0 -0
  8. package/dist-lib/sw.ts +2 -1
  9. package/dist-lib/types/admin/AgentScheduledTasksCard.d.ts +10 -0
  10. package/dist-lib/types/admin/MemberChatsField.d.ts +11 -0
  11. package/dist-lib/types/admin/NewChatSection.d.ts +7 -0
  12. package/dist-lib/types/admin/ScheduledRunsDialog.d.ts +12 -0
  13. package/dist-lib/types/admin/ScheduledTaskDialog.d.ts +18 -0
  14. package/dist-lib/types/admin/scheduled-format.d.ts +16 -0
  15. package/dist-lib/types/api/ai.d.ts +5 -1
  16. package/dist-lib/types/api/forward.d.ts +76 -0
  17. package/dist-lib/types/api/inbox-mutations.d.ts +16 -0
  18. package/dist-lib/types/api/message-changes.d.ts +24 -2
  19. package/dist-lib/types/api/new-chat.d.ts +55 -0
  20. package/dist-lib/types/api/queries.d.ts +98 -8
  21. package/dist-lib/types/api/scheduled-tasks.d.ts +145 -0
  22. package/dist-lib/types/api/templates.d.ts +12 -1
  23. package/dist-lib/types/askezy/AskEzyButton.d.ts +1 -1
  24. package/dist-lib/types/auth/chat-scope.d.ts +7 -0
  25. package/dist-lib/types/i18n/resources.d.ts +339 -0
  26. package/dist-lib/types/inbox/Composer.d.ts +4 -1
  27. package/dist-lib/types/inbox/ForwardDialog.d.ts +11 -0
  28. package/dist-lib/types/inbox/MediaView.d.ts +3 -0
  29. package/dist-lib/types/inbox/MessageActions.d.ts +7 -2
  30. package/dist-lib/types/inbox/MessageBubble.d.ts +4 -0
  31. package/dist-lib/types/inbox/NewChatDialog.d.ts +2 -0
  32. package/dist-lib/types/inbox/ReactionPicker.d.ts +3 -1
  33. package/dist-lib/types/inbox/ReplyWindow.d.ts +16 -0
  34. package/dist-lib/types/inbox/message-changes.d.ts +12 -0
  35. package/dist-lib/types/inbox/useDirectory.d.ts +3 -0
  36. package/dist-lib/types/lib/file-transfer.d.ts +13 -1
  37. package/package.json +2 -2
Binary file
package/dist-lib/sw.ts CHANGED
@@ -77,7 +77,8 @@ self.addEventListener('push', (event) => {
77
77
  body: data.body ?? '',
78
78
  tag: data.tag,
79
79
  icon: '/icon-192.png',
80
- badge: '/icon-192.png',
80
+ // Android draws the badge from its alpha only: a full-colour icon becomes a white square.
81
+ badge: '/badge-96.png',
81
82
  data: { url: data.url ?? '/' },
82
83
  };
83
84
  event.waitUntil(self.registration.showNotification(title, options));
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Agent page → Scheduled tasks (design docs/features/scheduled-tasks/design.md): each task makes
3
+ * this agent send one message at a set time to one existing chat or group of its inbox, or nothing
4
+ * when there is nothing to tell. Paused while the agent is off, the AI or WhatsApp is not connected
5
+ * or the app is locked. Admins only.
6
+ */
7
+ export declare function AgentScheduledTasksCard({ agentId, name, }: Readonly<{
8
+ agentId: number;
9
+ name: string;
10
+ }>): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { type MemberChat } from '@ezychat/shared';
2
+ /**
3
+ * "Chats this member can see" in Edit member, for agents only (design docs/features/partner-role):
4
+ * All chats (default, as today) or Only chosen chats, with the chosen list and a search to add more.
5
+ * The dialog saves it with `PUT /api/users/:id/chats`.
6
+ */
7
+ export declare function MemberChatsField({ scope, chats, onChange, }: {
8
+ scope: 'all' | 'chosen';
9
+ chats: MemberChat[];
10
+ onChange(scope: 'all' | 'chosen', chats: MemberChat[]): void;
11
+ }): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Settings → General → New chats (docs/features/new-chat/design.md): admins can always start a chat with
3
+ * a new number; the switch lets team members do it too (off by default). The daily limit per linked
4
+ * WhatsApp number is the admin's choice (default 20, 0 = no limit), shared with AI assistants (MCP).
5
+ * Each change is audited with before/after.
6
+ */
7
+ export declare function NewChatSection(): import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { type ScheduledRun, type ScheduledTask } from '@ezychat/shared';
2
+ /** A run's result as a small badge (a run still going has no result yet). */
3
+ export declare function RunResultBadge({ run }: Readonly<{
4
+ run: Pick<ScheduledRun, 'result'>;
5
+ }>): import("react").JSX.Element;
6
+ /** History: the task's last runs, newest first, with why one sent nothing and a link to the chat. */
7
+ export declare function ScheduledRunsDialog({ agentId, task, timeZone, onClose, }: Readonly<{
8
+ agentId: number;
9
+ task: ScheduledTask;
10
+ timeZone: string;
11
+ onClose: () => void;
12
+ }>): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { type ScheduledTask, type ScheduledTaskChat } from '@ezychat/shared';
2
+ export declare function ChatIcon({ type, className, }: Readonly<{
3
+ type: ScheduledTaskChat['type'];
4
+ className?: string;
5
+ }>): import("react").JSX.Element;
6
+ /**
7
+ * Add or edit a scheduled task: name, Send to (one existing chat or group of the agent's inbox),
8
+ * time and days in the business time zone, the instruction, and Preview (one turn, nothing sent).
9
+ */
10
+ export declare function ScheduledTaskDialog({ agentId, agentName, task, inboxId, timeZone, max, onClose, }: Readonly<{
11
+ agentId: number;
12
+ agentName: string;
13
+ task: ScheduledTask | null;
14
+ inboxId: number;
15
+ timeZone: string;
16
+ max: number;
17
+ onClose: () => void;
18
+ }>): import("react").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { type ScheduledTask } from '@ezychat/shared';
2
+ /** Monday first, as the business week reads. */
3
+ export declare const WEEK: readonly [1, 2, 3, 4, 5, 6, 0];
4
+ /** Rows the card shows before "Show all". */
5
+ export declare const FOLDED_ROWS = 5;
6
+ /**
7
+ * Dates and times of scheduled tasks in the page's language. Task times are wall-clock times of the
8
+ * business time zone (`timeZone`), so run times are shown in that zone too; an unknown zone falls
9
+ * back to the device's own.
10
+ */
11
+ export declare function useScheduledFormat(timeZone: string): {
12
+ time: (hhmm: string) => string;
13
+ when: (ms: number) => string;
14
+ day: (d: number) => string;
15
+ schedule: (task: Pick<ScheduledTask, "dayRule" | "days" | "time">) => string;
16
+ };
@@ -17,6 +17,8 @@ export declare function useAiMember(): import("@tanstack/react-query").UseQueryR
17
17
  aiAgentId?: number | undefined;
18
18
  aiDeleted?: boolean | undefined;
19
19
  inboxIds?: number[] | undefined;
20
+ chatScope?: "all" | "chosen" | undefined;
21
+ chatJids?: string[] | undefined;
20
22
  } | null;
21
23
  settings: {
22
24
  enabled: boolean;
@@ -95,7 +97,7 @@ export declare function useAiTry(): import("@tanstack/react-query").UseMutationR
95
97
  action: "handoff" | "answer" | "ask_resolution" | "resolve" | "no_reply" | null;
96
98
  model: string | null;
97
99
  error: string | null;
98
- handoffReason?: "asked_for_human" | "missing_facts" | "sensitive" | "needs_action" | "business_rule" | "unsupported_message" | "ai_unavailable" | "lookup_failed" | "confidential_leak" | "window_closed" | null | undefined;
100
+ handoffReason?: "window_closed" | "confidential_leak" | "ai_unavailable" | "lookup_failed" | "asked_for_human" | "missing_facts" | "sensitive" | "needs_action" | "business_rule" | "unsupported_message" | null | undefined;
99
101
  lookups?: {
100
102
  title: string;
101
103
  sourceLabel: string;
@@ -195,6 +197,8 @@ export declare function useAiMemberAction(): import("@tanstack/react-query").Use
195
197
  aiAgentId?: number | undefined;
196
198
  aiDeleted?: boolean | undefined;
197
199
  inboxIds?: number[] | undefined;
200
+ chatScope?: "all" | "chosen" | undefined;
201
+ chatJids?: string[] | undefined;
198
202
  } | null;
199
203
  settings: {
200
204
  enabled: boolean;
@@ -0,0 +1,76 @@
1
+ import { type ForwardMessageBody } from '@ezychat/shared';
2
+ /**
3
+ * Forward one message to 1–5 existing chats (docs/features/forward-message/design.md). The server
4
+ * checks every chat before anything is sent and answers the copies, one per chat.
5
+ */
6
+ export declare function useForwardMessage(): import("@tanstack/react-query").UseMutationResult<{
7
+ messages: {
8
+ id: string;
9
+ chatJid: string;
10
+ senderJid: string | null;
11
+ senderName: string | null;
12
+ fromMe: boolean;
13
+ sentByUserId: number | null;
14
+ type: "text" | "image" | "video" | "audio" | "document" | "sticker" | "system";
15
+ body: string | null;
16
+ mediaUrl: string | null;
17
+ mediaMime: string | null;
18
+ mediaName: string | null;
19
+ mediaStatus: "none" | "pending" | "failed" | "ok";
20
+ quotedId: string | null;
21
+ status: "pending" | "failed" | "sent" | "delivered" | "read";
22
+ error: string | null;
23
+ timestamp: number;
24
+ clientId: string | null;
25
+ reactions: {
26
+ emoji: string;
27
+ senderJid: string | null;
28
+ fromMe: boolean;
29
+ at: number;
30
+ sentByUserId: number | null;
31
+ senderName?: string | null | undefined;
32
+ }[];
33
+ voiceNote?: boolean | undefined;
34
+ template?: {
35
+ name: string;
36
+ language: string;
37
+ } | null | undefined;
38
+ viaAssistant?: boolean | undefined;
39
+ forwarded?: {
40
+ manyTimes: boolean;
41
+ } | null | undefined;
42
+ mediaSize?: number | null | undefined;
43
+ mediaWidth?: number | null | undefined;
44
+ mediaHeight?: number | null | undefined;
45
+ mediaThumbUrl?: string | null | undefined;
46
+ scheduledTask?: {
47
+ id: number;
48
+ name: string | null;
49
+ } | null | undefined;
50
+ transcript?: string | null | undefined;
51
+ transcriptLang?: string | null | undefined;
52
+ transcriptStatus?: "pending" | "failed" | "ok" | "skipped" | "too_long" | "unsupported" | null | undefined;
53
+ senderProfile?: {
54
+ chatJid: string;
55
+ name: string;
56
+ } | null | undefined;
57
+ safety?: {
58
+ itemId: number;
59
+ level: "none" | "warning" | "high";
60
+ rules: ("exeInZip" | "executable" | "doubleExtension" | "scamNumber" | "cantInspect" | "macroFile" | "unlockCodeInMessage" | "openOnComputer" | "lookalikeLink" | "financeUrgency" | "firstFile")[];
61
+ aiReason: string | null;
62
+ locked: boolean;
63
+ deletedBy: string | null;
64
+ status: "open" | "safe" | "reported" | "blocked" | "cleared";
65
+ } | null | undefined;
66
+ editedAt?: number | null | undefined;
67
+ editCount?: number | undefined;
68
+ deletedAt?: number | null | undefined;
69
+ deletedBy?: "phone" | "team" | "sender" | "group_admin" | null | undefined;
70
+ deletedByUserId?: number | null | undefined;
71
+ hidden?: boolean | undefined;
72
+ }[];
73
+ }, Error, {
74
+ id: string;
75
+ body: ForwardMessageBody;
76
+ }, unknown>;
@@ -29,6 +29,13 @@ export declare function useCreateInbox(): import("@tanstack/react-query").UseMut
29
29
  editMessage?: boolean | undefined;
30
30
  deleteForEveryone?: boolean | undefined;
31
31
  deleteForMe?: boolean | undefined;
32
+ mediaLimits?: {
33
+ video?: number | undefined;
34
+ image?: number | undefined;
35
+ audio?: number | undefined;
36
+ document?: number | undefined;
37
+ } | undefined;
38
+ forwardedMark?: boolean | undefined;
32
39
  };
33
40
  memberIds?: number[] | undefined;
34
41
  }, Error, {
@@ -65,6 +72,13 @@ export declare function useUpdateInbox(): import("@tanstack/react-query").UseMut
65
72
  editMessage?: boolean | undefined;
66
73
  deleteForEveryone?: boolean | undefined;
67
74
  deleteForMe?: boolean | undefined;
75
+ mediaLimits?: {
76
+ video?: number | undefined;
77
+ image?: number | undefined;
78
+ audio?: number | undefined;
79
+ document?: number | undefined;
80
+ } | undefined;
81
+ forwardedMark?: boolean | undefined;
68
82
  };
69
83
  memberIds?: number[] | undefined;
70
84
  }, Error, {
@@ -93,4 +107,6 @@ export declare function useSetUserInboxes(userId: number): import("@tanstack/rea
93
107
  aiAgentId?: number | undefined;
94
108
  aiDeleted?: boolean | undefined;
95
109
  inboxIds?: number[] | undefined;
110
+ chatScope?: "all" | "chosen" | undefined;
111
+ chatJids?: string[] | undefined;
96
112
  }, Error, number[], unknown>;
@@ -46,9 +46,20 @@ export declare function useEditMessage(): import("@tanstack/react-query").UseMut
46
46
  language: string;
47
47
  } | null | undefined;
48
48
  viaAssistant?: boolean | undefined;
49
+ forwarded?: {
50
+ manyTimes: boolean;
51
+ } | null | undefined;
52
+ mediaSize?: number | null | undefined;
53
+ mediaWidth?: number | null | undefined;
54
+ mediaHeight?: number | null | undefined;
55
+ mediaThumbUrl?: string | null | undefined;
56
+ scheduledTask?: {
57
+ id: number;
58
+ name: string | null;
59
+ } | null | undefined;
49
60
  transcript?: string | null | undefined;
50
61
  transcriptLang?: string | null | undefined;
51
- transcriptStatus?: "pending" | "failed" | "ok" | "too_long" | "unsupported" | "skipped" | null | undefined;
62
+ transcriptStatus?: "pending" | "failed" | "ok" | "skipped" | "too_long" | "unsupported" | null | undefined;
52
63
  senderProfile?: {
53
64
  chatJid: string;
54
65
  name: string;
@@ -104,9 +115,20 @@ export declare function useDeleteMessage(): import("@tanstack/react-query").UseM
104
115
  language: string;
105
116
  } | null | undefined;
106
117
  viaAssistant?: boolean | undefined;
118
+ forwarded?: {
119
+ manyTimes: boolean;
120
+ } | null | undefined;
121
+ mediaSize?: number | null | undefined;
122
+ mediaWidth?: number | null | undefined;
123
+ mediaHeight?: number | null | undefined;
124
+ mediaThumbUrl?: string | null | undefined;
125
+ scheduledTask?: {
126
+ id: number;
127
+ name: string | null;
128
+ } | null | undefined;
107
129
  transcript?: string | null | undefined;
108
130
  transcriptLang?: string | null | undefined;
109
- transcriptStatus?: "pending" | "failed" | "ok" | "too_long" | "unsupported" | "skipped" | null | undefined;
131
+ transcriptStatus?: "pending" | "failed" | "ok" | "skipped" | "too_long" | "unsupported" | null | undefined;
110
132
  senderProfile?: {
111
133
  chatJid: string;
112
134
  name: string;
@@ -0,0 +1,55 @@
1
+ import type { NewChatBodyInput } from '@ezychat/shared';
2
+ /** New chat (docs/features/new-chat/design.md). */
3
+ export declare const newChatKey: readonly ["new-chat"];
4
+ /** May the signed-in user start new chats, from which inboxes, and the team's settings. */
5
+ export declare function useNewChatStatus(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<{
6
+ allowed: boolean;
7
+ staffEnabled: boolean;
8
+ dailyLimit: number;
9
+ perUserPerHour: number;
10
+ inboxes: {
11
+ inboxId: number;
12
+ mode: "template" | "unsupported" | "check";
13
+ usedToday: number;
14
+ countryCode: string;
15
+ }[];
16
+ }, Error>;
17
+ /** Admins: the team-members switch and the daily limit (each audited before/after). */
18
+ export declare function useUpdateNewChatSettings(): import("@tanstack/react-query").UseMutationResult<{
19
+ allowed: boolean;
20
+ staffEnabled: boolean;
21
+ dailyLimit: number;
22
+ perUserPerHour: number;
23
+ inboxes: {
24
+ inboxId: number;
25
+ mode: "template" | "unsupported" | "check";
26
+ usedToday: number;
27
+ countryCode: string;
28
+ }[];
29
+ }, Error, {
30
+ staffEnabled?: boolean | undefined;
31
+ dailyLimit?: number | undefined;
32
+ }, unknown>;
33
+ /** Format, own number and an existing chat: never asks WhatsApp, not counted. */
34
+ export declare function useCheckNewChat(): import("@tanstack/react-query").UseMutationResult<{
35
+ next: "existing";
36
+ phone: string;
37
+ chatJid: string;
38
+ } | {
39
+ next: "check";
40
+ phone: string;
41
+ } | {
42
+ next: "template";
43
+ phone: string;
44
+ }, Error, {
45
+ inboxId: number;
46
+ phone: string;
47
+ }, unknown>;
48
+ /** Start: checks the number on WhatsApp, or sends the first template (Business API). */
49
+ export declare function useStartNewChat(): import("@tanstack/react-query").UseMutationResult<{
50
+ chatJid: string;
51
+ created: boolean;
52
+ }, Error, {
53
+ inboxId: number;
54
+ body: NewChatBodyInput;
55
+ }, unknown>;
@@ -1,5 +1,5 @@
1
1
  import { type InfiniteData, type QueryClient } from '@tanstack/react-query';
2
- import { type ReportPeriod, type CreateApiTokenBodyInput, type UpdateApiTokenBody, type Chat, type ChatListResponse, type ChatStatus, type DirectoryUser, type InboxStatusPayload, type Message, type MessageListResponse, type MessageLocateResponse, type PatchUserBody, type Settings, type WaStatus } from '@ezychat/shared';
2
+ import { type ReportPeriod, type CreateApiTokenBodyInput, type UpdateApiTokenBody, type Chat, type ChatListResponse, type ChatStatus, type DirectoryUser, type InboxStatusPayload, type SetMemberChatsBody, type Message, type MessageListResponse, type MessageLocateResponse, type PatchUserBody, type Settings, type WaStatus } from '@ezychat/shared';
3
3
  export interface ChatFilters {
4
4
  status?: ChatStatus;
5
5
  assigned: 'me' | 'none' | 'any';
@@ -26,6 +26,7 @@ export declare const qk: {
26
26
  quickReplies: readonly ["quick-replies"];
27
27
  users: readonly ["users"];
28
28
  directory: readonly ["users", "directory"];
29
+ memberChats: (userId: number) => readonly ["users", number, "chats"];
29
30
  wa: readonly ["wa"];
30
31
  inboxes: readonly ["inboxes"];
31
32
  tunnel: readonly ["tunnel"];
@@ -72,6 +73,8 @@ export declare function useMe(): import("@tanstack/react-query").UseQueryResult<
72
73
  aiAgentId?: number | undefined;
73
74
  aiDeleted?: boolean | undefined;
74
75
  inboxIds?: number[] | undefined;
76
+ chatScope?: "all" | "chosen" | undefined;
77
+ chatJids?: string[] | undefined;
75
78
  } | null, Error>;
76
79
  export declare function useSetupStatus(): import("@tanstack/react-query").UseQueryResult<{
77
80
  needsSetup: boolean;
@@ -96,6 +99,8 @@ export declare function useLogin(): import("@tanstack/react-query").UseMutationR
96
99
  aiAgentId?: number | undefined;
97
100
  aiDeleted?: boolean | undefined;
98
101
  inboxIds?: number[] | undefined;
102
+ chatScope?: "all" | "chosen" | undefined;
103
+ chatJids?: string[] | undefined;
99
104
  } | null, Error, {
100
105
  username: string;
101
106
  password: string;
@@ -121,6 +126,8 @@ export declare function useSetMyLocale(): import("@tanstack/react-query").UseMut
121
126
  aiAgentId?: number | undefined;
122
127
  aiDeleted?: boolean | undefined;
123
128
  inboxIds?: number[] | undefined;
129
+ chatScope?: "all" | "chosen" | undefined;
130
+ chatJids?: string[] | undefined;
124
131
  }, Error, "en" | "ms" | "zh-CN" | null, unknown>;
125
132
  export declare function useChangePassword(): import("@tanstack/react-query").UseMutationResult<unknown, Error, {
126
133
  currentPassword: string;
@@ -138,7 +145,7 @@ export declare function useChats(filters: ChatFilters, opts?: {
138
145
  jid: string;
139
146
  inboxId: number;
140
147
  waJid: string;
141
- type: "group" | "dm";
148
+ type: "dm" | "group";
142
149
  name: string;
143
150
  avatarUrl: string | null;
144
151
  unreadCount: number;
@@ -159,7 +166,7 @@ export declare function useChat(jid: string | null | undefined): import("@tansta
159
166
  jid: string;
160
167
  inboxId: number;
161
168
  waJid: string;
162
- type: "group" | "dm";
169
+ type: "dm" | "group";
163
170
  name: string;
164
171
  avatarUrl: string | null;
165
172
  unreadCount: number;
@@ -282,9 +289,20 @@ export declare function useMessages(jid: string | null | undefined): import("@ta
282
289
  language: string;
283
290
  } | null | undefined;
284
291
  viaAssistant?: boolean | undefined;
292
+ forwarded?: {
293
+ manyTimes: boolean;
294
+ } | null | undefined;
295
+ mediaSize?: number | null | undefined;
296
+ mediaWidth?: number | null | undefined;
297
+ mediaHeight?: number | null | undefined;
298
+ mediaThumbUrl?: string | null | undefined;
299
+ scheduledTask?: {
300
+ id: number;
301
+ name: string | null;
302
+ } | null | undefined;
285
303
  transcript?: string | null | undefined;
286
304
  transcriptLang?: string | null | undefined;
287
- transcriptStatus?: "pending" | "failed" | "ok" | "too_long" | "unsupported" | "skipped" | null | undefined;
305
+ transcriptStatus?: "pending" | "failed" | "ok" | "skipped" | "too_long" | "unsupported" | null | undefined;
288
306
  senderProfile?: {
289
307
  chatJid: string;
290
308
  name: string;
@@ -354,9 +372,20 @@ export declare function useSendText(jid: string): import("@tanstack/react-query"
354
372
  language: string;
355
373
  } | null | undefined;
356
374
  viaAssistant?: boolean | undefined;
375
+ forwarded?: {
376
+ manyTimes: boolean;
377
+ } | null | undefined;
378
+ mediaSize?: number | null | undefined;
379
+ mediaWidth?: number | null | undefined;
380
+ mediaHeight?: number | null | undefined;
381
+ mediaThumbUrl?: string | null | undefined;
382
+ scheduledTask?: {
383
+ id: number;
384
+ name: string | null;
385
+ } | null | undefined;
357
386
  transcript?: string | null | undefined;
358
387
  transcriptLang?: string | null | undefined;
359
- transcriptStatus?: "pending" | "failed" | "ok" | "too_long" | "unsupported" | "skipped" | null | undefined;
388
+ transcriptStatus?: "pending" | "failed" | "ok" | "skipped" | "too_long" | "unsupported" | null | undefined;
360
389
  senderProfile?: {
361
390
  chatJid: string;
362
391
  name: string;
@@ -387,6 +416,8 @@ export interface SendMediaInput {
387
416
  quotedId?: string;
388
417
  /** A recorded Ogg/Opus voice note: sent as a WhatsApp voice note, never with a caption. */
389
418
  voiceNote?: boolean;
419
+ /** A video above the number's video limit goes as a file (a document, full quality). */
420
+ asFile?: boolean;
390
421
  }
391
422
  export declare function useSendMedia(jid: string): import("@tanstack/react-query").UseMutationResult<{
392
423
  id: string;
@@ -420,9 +451,20 @@ export declare function useSendMedia(jid: string): import("@tanstack/react-query
420
451
  language: string;
421
452
  } | null | undefined;
422
453
  viaAssistant?: boolean | undefined;
454
+ forwarded?: {
455
+ manyTimes: boolean;
456
+ } | null | undefined;
457
+ mediaSize?: number | null | undefined;
458
+ mediaWidth?: number | null | undefined;
459
+ mediaHeight?: number | null | undefined;
460
+ mediaThumbUrl?: string | null | undefined;
461
+ scheduledTask?: {
462
+ id: number;
463
+ name: string | null;
464
+ } | null | undefined;
423
465
  transcript?: string | null | undefined;
424
466
  transcriptLang?: string | null | undefined;
425
- transcriptStatus?: "pending" | "failed" | "ok" | "too_long" | "unsupported" | "skipped" | null | undefined;
467
+ transcriptStatus?: "pending" | "failed" | "ok" | "skipped" | "too_long" | "unsupported" | null | undefined;
426
468
  senderProfile?: {
427
469
  chatJid: string;
428
470
  name: string;
@@ -475,9 +517,20 @@ export declare function useRetryMessage(): import("@tanstack/react-query").UseMu
475
517
  language: string;
476
518
  } | null | undefined;
477
519
  viaAssistant?: boolean | undefined;
520
+ forwarded?: {
521
+ manyTimes: boolean;
522
+ } | null | undefined;
523
+ mediaSize?: number | null | undefined;
524
+ mediaWidth?: number | null | undefined;
525
+ mediaHeight?: number | null | undefined;
526
+ mediaThumbUrl?: string | null | undefined;
527
+ scheduledTask?: {
528
+ id: number;
529
+ name: string | null;
530
+ } | null | undefined;
478
531
  transcript?: string | null | undefined;
479
532
  transcriptLang?: string | null | undefined;
480
- transcriptStatus?: "pending" | "failed" | "ok" | "too_long" | "unsupported" | "skipped" | null | undefined;
533
+ transcriptStatus?: "pending" | "failed" | "ok" | "skipped" | "too_long" | "unsupported" | null | undefined;
481
534
  senderProfile?: {
482
535
  chatJid: string;
483
536
  name: string;
@@ -521,7 +574,7 @@ export declare function usePatchChat(jid: string): import("@tanstack/react-query
521
574
  jid: string;
522
575
  inboxId: number;
523
576
  waJid: string;
524
- type: "group" | "dm";
577
+ type: "dm" | "group";
525
578
  name: string;
526
579
  avatarUrl: string | null;
527
580
  unreadCount: number;
@@ -673,6 +726,8 @@ export declare function useUsers(opts?: {
673
726
  aiAgentId?: number | undefined;
674
727
  aiDeleted?: boolean | undefined;
675
728
  inboxIds?: number[] | undefined;
729
+ chatScope?: "all" | "chosen" | undefined;
730
+ chatJids?: string[] | undefined;
676
731
  }[], Error>;
677
732
  /** Public team-member fields every logged-in user may see (`GET /api/users/directory`). */
678
733
  export type { DirectoryUser };
@@ -694,6 +749,7 @@ export declare function useUserDirectory(opts?: {
694
749
  aiAgentId?: number | undefined;
695
750
  aiDeleted?: boolean | undefined;
696
751
  aiNoDirect?: boolean | undefined;
752
+ chatJids?: string[] | undefined;
697
753
  }[], Error>;
698
754
  export declare function useCreateUser(): import("@tanstack/react-query").UseMutationResult<{
699
755
  id: number;
@@ -709,6 +765,8 @@ export declare function useCreateUser(): import("@tanstack/react-query").UseMuta
709
765
  aiAgentId?: number | undefined;
710
766
  aiDeleted?: boolean | undefined;
711
767
  inboxIds?: number[] | undefined;
768
+ chatScope?: "all" | "chosen" | undefined;
769
+ chatJids?: string[] | undefined;
712
770
  }, Error, {
713
771
  username: string;
714
772
  displayName: string;
@@ -729,10 +787,35 @@ export declare function usePatchUser(): import("@tanstack/react-query").UseMutat
729
787
  aiAgentId?: number | undefined;
730
788
  aiDeleted?: boolean | undefined;
731
789
  inboxIds?: number[] | undefined;
790
+ chatScope?: "all" | "chosen" | undefined;
791
+ chatJids?: string[] | undefined;
732
792
  }, Error, {
733
793
  id: number;
734
794
  patch: PatchUserBody;
735
795
  }, unknown>;
796
+ /** Admins: an agent's "Chats this member can see" (`GET /api/users/:id/chats`). */
797
+ export declare function useMemberChats(userId: number, opts?: {
798
+ enabled?: boolean;
799
+ }): import("@tanstack/react-query").UseQueryResult<{
800
+ scope: "all" | "chosen";
801
+ chats: {
802
+ jid: string;
803
+ name: string;
804
+ type: "dm" | "group";
805
+ }[];
806
+ }, Error>;
807
+ /** Admins: replaces it (`PUT /api/users/:id/chats`); the members list and assign dropdowns follow. */
808
+ export declare function useSetMemberChats(): import("@tanstack/react-query").UseMutationResult<{
809
+ scope: "all" | "chosen";
810
+ chats: {
811
+ jid: string;
812
+ name: string;
813
+ type: "dm" | "group";
814
+ }[];
815
+ }, Error, {
816
+ userId: number;
817
+ body: SetMemberChatsBody;
818
+ }, unknown>;
736
819
  export declare function useResetPassword(): import("@tanstack/react-query").UseMutationResult<{
737
820
  password: string;
738
821
  }, Error, number, unknown>;
@@ -787,6 +870,13 @@ export declare function useInboxes(opts?: {
787
870
  editMessage?: boolean | undefined;
788
871
  deleteForEveryone?: boolean | undefined;
789
872
  deleteForMe?: boolean | undefined;
873
+ mediaLimits?: {
874
+ video?: number | undefined;
875
+ image?: number | undefined;
876
+ audio?: number | undefined;
877
+ document?: number | undefined;
878
+ } | undefined;
879
+ forwardedMark?: boolean | undefined;
790
880
  };
791
881
  memberIds?: number[] | undefined;
792
882
  }[];