@ezychat/web 0.1.43 → 0.1.44
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-BTe2zd0P.js → admin-DQztnhNN.js} +13 -4
- package/dist-lib/chunks/{admin-Bl5gGkqf.js → admin-j22dnMqm.js} +13 -4
- package/dist-lib/chunks/{inbox-IiNeuwOm.js → inbox-Bdg6faLa.js} +5 -2
- package/dist-lib/chunks/{inbox-VvClcCZP.js → inbox-DccyncVL.js} +5 -2
- package/dist-lib/ezychat-web.css +1 -1
- package/dist-lib/index.js +1585 -1464
- package/dist-lib/types/api/queries.d.ts +9 -0
- package/dist-lib/types/api/socket.d.ts +7 -0
- package/dist-lib/types/i18n/resources.d.ts +12 -0
- package/dist-lib/types/inbox/assistant-started.d.ts +6 -0
- package/package.json +2 -2
|
@@ -183,6 +183,7 @@ export declare function useMessages(jid: string | null | undefined): import("@ta
|
|
|
183
183
|
timestamp: number;
|
|
184
184
|
clientId: string | null;
|
|
185
185
|
voiceNote?: boolean | undefined;
|
|
186
|
+
viaAssistant?: boolean | undefined;
|
|
186
187
|
transcript?: string | null | undefined;
|
|
187
188
|
transcriptLang?: string | null | undefined;
|
|
188
189
|
transcriptStatus?: "pending" | "failed" | "ok" | "too_long" | "unsupported" | "skipped" | null | undefined;
|
|
@@ -221,6 +222,7 @@ export declare function useSendText(jid: string): import("@tanstack/react-query"
|
|
|
221
222
|
timestamp: number;
|
|
222
223
|
clientId: string | null;
|
|
223
224
|
voiceNote?: boolean | undefined;
|
|
225
|
+
viaAssistant?: boolean | undefined;
|
|
224
226
|
transcript?: string | null | undefined;
|
|
225
227
|
transcriptLang?: string | null | undefined;
|
|
226
228
|
transcriptStatus?: "pending" | "failed" | "ok" | "too_long" | "unsupported" | "skipped" | null | undefined;
|
|
@@ -259,6 +261,7 @@ export declare function useSendMedia(jid: string): import("@tanstack/react-query
|
|
|
259
261
|
timestamp: number;
|
|
260
262
|
clientId: string | null;
|
|
261
263
|
voiceNote?: boolean | undefined;
|
|
264
|
+
viaAssistant?: boolean | undefined;
|
|
262
265
|
transcript?: string | null | undefined;
|
|
263
266
|
transcriptLang?: string | null | undefined;
|
|
264
267
|
transcriptStatus?: "pending" | "failed" | "ok" | "too_long" | "unsupported" | "skipped" | null | undefined;
|
|
@@ -286,6 +289,7 @@ export declare function useRetryMessage(): import("@tanstack/react-query").UseMu
|
|
|
286
289
|
timestamp: number;
|
|
287
290
|
clientId: string | null;
|
|
288
291
|
voiceNote?: boolean | undefined;
|
|
292
|
+
viaAssistant?: boolean | undefined;
|
|
289
293
|
transcript?: string | null | undefined;
|
|
290
294
|
transcriptLang?: string | null | undefined;
|
|
291
295
|
transcriptStatus?: "pending" | "failed" | "ok" | "too_long" | "unsupported" | "skipped" | null | undefined;
|
|
@@ -498,6 +502,7 @@ export declare function useWaStatus(opts?: {
|
|
|
498
502
|
me: {
|
|
499
503
|
jid: string;
|
|
500
504
|
name: string | null;
|
|
505
|
+
lid?: string | null | undefined;
|
|
501
506
|
} | null;
|
|
502
507
|
qr: string | null;
|
|
503
508
|
lastError: string | null;
|
|
@@ -640,6 +645,8 @@ export declare function useApiTokens(): import("@tanstack/react-query").UseQuery
|
|
|
640
645
|
createdAt: number;
|
|
641
646
|
lastUsedAt: number | null;
|
|
642
647
|
expiresAt: number | null;
|
|
648
|
+
canSend: boolean;
|
|
649
|
+
canMessageNewNumbers: boolean;
|
|
643
650
|
}[], Error>;
|
|
644
651
|
export interface CreateApiTokenVars {
|
|
645
652
|
body: CreateApiTokenBodyInput;
|
|
@@ -659,6 +666,8 @@ export declare function useCreateApiToken(): import("@tanstack/react-query").Use
|
|
|
659
666
|
createdAt: number;
|
|
660
667
|
lastUsedAt: number | null;
|
|
661
668
|
expiresAt: number | null;
|
|
669
|
+
canSend: boolean;
|
|
670
|
+
canMessageNewNumbers: boolean;
|
|
662
671
|
}, Error, CreateApiTokenVars, unknown>;
|
|
663
672
|
/** Revokes a token; one that is already gone (404) counts as revoked. */
|
|
664
673
|
export declare function useRevokeApiToken(): import("@tanstack/react-query").UseMutationResult<void, Error, number, unknown>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
+
import { type QueryClient, type QueryKey } from '@tanstack/react-query';
|
|
2
3
|
export interface TypingEntry {
|
|
3
4
|
userId: number;
|
|
4
5
|
displayName: string;
|
|
@@ -9,6 +10,12 @@ export interface RealtimeValue {
|
|
|
9
10
|
typing: Record<string, TypingEntry[]>;
|
|
10
11
|
emitTyping(jid: string): void;
|
|
11
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* When a load of `queryKey` is running, load it again after it ends: that load was answered before
|
|
15
|
+
* the event that called this, so its result would hide the event's change. (React Query reuses a
|
|
16
|
+
* running first load instead of restarting it, so invalidating right away is not enough.)
|
|
17
|
+
*/
|
|
18
|
+
export declare function reloadAfterRunningLoad(qc: QueryClient, queryKey: QueryKey): void;
|
|
12
19
|
export declare function useRealtime(): RealtimeValue;
|
|
13
20
|
/**
|
|
14
21
|
* Opens one Socket.IO connection while a (fully set-up) user is logged in and mirrors
|
|
@@ -404,6 +404,8 @@ export declare const enResources: {
|
|
|
404
404
|
confirmTitle: string;
|
|
405
405
|
confirmBody: string;
|
|
406
406
|
replyAnyway: string;
|
|
407
|
+
startedByAssistantTitle: string;
|
|
408
|
+
startedByAssistantBody: string;
|
|
407
409
|
};
|
|
408
410
|
composer: {
|
|
409
411
|
placeholder: string;
|
|
@@ -574,6 +576,7 @@ export declare const enResources: {
|
|
|
574
576
|
unsupported: string;
|
|
575
577
|
};
|
|
576
578
|
reply: string;
|
|
579
|
+
viaAssistant: string;
|
|
577
580
|
};
|
|
578
581
|
media: {
|
|
579
582
|
types: {
|
|
@@ -1097,6 +1100,8 @@ export declare const enResources: {
|
|
|
1097
1100
|
revokeBody: string;
|
|
1098
1101
|
revokeConfirm: string;
|
|
1099
1102
|
revoked: string;
|
|
1103
|
+
canSendBadge: string;
|
|
1104
|
+
canNewBadge: string;
|
|
1100
1105
|
};
|
|
1101
1106
|
create: {
|
|
1102
1107
|
title: string;
|
|
@@ -1111,6 +1116,13 @@ export declare const enResources: {
|
|
|
1111
1116
|
expiry365: string;
|
|
1112
1117
|
expiryNever: string;
|
|
1113
1118
|
submit: string;
|
|
1119
|
+
canSend: string;
|
|
1120
|
+
canSendHint: string;
|
|
1121
|
+
canSendWarning: string;
|
|
1122
|
+
canNew: string;
|
|
1123
|
+
canNewHint: string;
|
|
1124
|
+
canNewWarningTitle: string;
|
|
1125
|
+
canNewWarning: string;
|
|
1114
1126
|
};
|
|
1115
1127
|
created: {
|
|
1116
1128
|
title: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Chat, Message } from '@ezychat/shared';
|
|
2
|
+
/**
|
|
3
|
+
* A direct chat an AI assistant started (MCP send_to_new_number) where the customer has not written
|
|
4
|
+
* yet: the whole history is loaded, every message is ours and one of them came from the assistant.
|
|
5
|
+
*/
|
|
6
|
+
export declare function assistantStartedChat(chat: Pick<Chat, 'type'>, messages: readonly Pick<Message, 'fromMe' | 'viaAssistant'>[], hasOlder: boolean): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ezychat/web",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.44",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "EzyChat core: the team inbox web app (React) as a library, with createInboxApp and its extension API.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"build:lib": "node ../../scripts/build-web-lib.mjs"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@ezychat/shared": "0.1.
|
|
43
|
+
"@ezychat/shared": "0.1.44",
|
|
44
44
|
"@fontsource-variable/inter": "^5.3.0",
|
|
45
45
|
"@tanstack/react-query": "^5.104.4",
|
|
46
46
|
"@types/react": "^19.3.0",
|